Which code are you referring to? I am not aware of any requirement in the NEC that requires a dishwasher or a disposal to be on a separate circuit. However it is considered good practice.
Since you are asking about two disposals, we are talking about two motor loads. 2017 NEC Article 220.18 (A) Motor Operated and Combination Loads, states that the calculated load of motors or loads, shall be 125% of the largest motor and the sum of all the other motors and loads. HP to Amperage conversion can be found in NEC Table NEC 430.248.
For example if you are installing 2 disposals that are both 1/2 HP the required amperage would be 9.8 amps, 9.8+9.8+(25%*9.8)= 22 amps. So that would be too large for a 20A circuit. If the disposals where 1/3 HP it would change to 7.2+7.2+(25%*7.2)= 16.2 amps, which would fit on a 20A circuit.
This example shows that it would not be wise to put any disposals on the same circuit. Since even though you might install 2 1/3 HP disposals or less, someone in the future could change them out to larger HP later and overload the circuit.
Remember I said it was good electrical practice. A good electrician will always size a circuit to handle all future loads, not just the ones present at the time.
Good luck with your project.