Step 1: Recall the law of definite proportions.
The law of definite proportions states that a chemical compound always contains the same elements combined together in the same fixed proportion by mass, irrespective of its source or method of preparation.
Step 2: Analyze the given options.
Option (1):
This statement is related to the law of multiple proportions because it compares two compounds, \(\mathrm{H_2O}\) and \(\mathrm{H_2O_2}\), formed by the same elements in different ratios. Hence, it is incorrect here.
Option (2):
Water always contains hydrogen and oxygen in a fixed mass ratio. Therefore, the percentage of oxygen in water remains constant irrespective of the source. This exactly represents the law of definite proportions.
Option (3):
This statement represents Avogadro's law, not the law of definite proportions.
Option (4):
This statement represents the law of conservation of mass.
Step 3: Final conclusion.
Hence, the correct statement related to the law of definite proportions is
\[
\boxed{\%\text{ of oxygen in }\mathrm{H_2O}\text{ is constant irrespective of the source}}
\]