The heaviest locomotives in use by the Staatsspoorwegen on Java were Mallets with a 2-8-8-0 wheel arrangement. ALCO-Brooks built the first eight in 1916 which were originally numbered 1201 to 1208 and later became DD5001 to DD5008. Another batch of twelve were built in 1919 which had the diameter of their low-pressure cylinders reduced form 28 to 26.5 inches. These were originally numbered 1209 to 1220 and later became DD5101 to DD5112. All these locomotives were limited to 40 km/h or 25 mph on the winding and mountainous Cape gauge lines in Indonesia. Nevertheless, they sometimes also had to work in passenger service.
After the ALCO locomotives, ten more were built by three manufacturers which later became class D52. These were designed in metric units and their low-pressure cylinders had a diameter that was between the D50 and D51. In Germany, Hanomag built 1251 to 1253 in 1923 and Hartmann built 1254 to 1256 in 1924. The four with the highest numbers, 1257 to 1260, were built by Werkspoor in the Netherlands in 1923. These ten later got the numbers DD5021 to DD5210. Their approved top speed was 50 km/h or 31 mph. The last ones were used until 1974 and in their last years they sometimes could be seen with only one passenger coach.