Polarity is a question of polar groups, as well as their position in the molecule. Thus:
Which molecule has more polar groups, acetanilide or ibuprofen?
Which compound is less polar, ibuprofen or the ortho- isomer?
However, the detailed answer is more complicated.
For your own education:
The polarity of a molecule is expressed by the dipole moment.
The dipole moment of a molecule depends on the partition coefficient and logP.
Partition coefficient (and logP) is a function of polar groups but it does not describe well the polar groups position in the molecule.
Hammett equation describes the position of polar groups but it is valuable only to the same (aromatic) homologues series.
Water solubility is a question of both logP and melting point because the crystal lattice must be destroyed during solvation, too.
Often, the value of dipole moment depends on the acidic or the basic character of the solvent.
(Question 1: Is ibuprofen less polar in acidic or in alkaline solvent medium, and why?)
(Question 2: Is acetanilide’s polarity less or more affected by the acidic or basic character of the solvent than ibuprofen, and why?)