Data Class code smell? Java object is modified by multiple methods in a row
Basically, whenever you find yourself doing something like:
MyDataStructure data;

call1(data); // modifies data
call2(data); // modifies data
call3(data); // modifies data

you have a big indicator, that the data structure should indeed be a class:
MyDataClass dataClass;

dataClass.call1();
dataClass.call2();
dataClass.call3();

If the call chain depends on a given order, encapsulate this in the class as well:
MyDataClass {

   public void doComplexTask() {
       call1();
       if (resultIsNotGood) throw Exception...
       
       call2();
       ...
       // you get it
   }

   private call1() { ... } // not exposed any more
}