Buggy code:
private List < OrderItemsBean > orderItemOriginVendor = new ArrayList < OrderItemsBean > ( ) ; private List < OrderItemsBean > orderItemDestinationVendor = new ArrayList < OrderItemsBean > ( ) ; private OperationsBean operationsBean = new OperationsBean ( ) ; private DocumentsBean document = new DocumentsBean ( ) ; private OrderBean order = new OrderBean ( ) ; private ContactBean contact = new ContactBean ( ) ; private AddressBean address = new AddressBean ( ) ; private VendorBean vendor = new VendorBean ( ) ; private DriverBean driver = new DriverBean ( ) ; private TruckBean truck = new TruckBean ( ) ; private TruckBean truckDestination = new TruckBean ( ) ; private ContainerBean container = new ContainerBean ( ) ; private CustomerBean customer = new CustomerBean ( ) ; private OperationsService operationsService ; private VendorService vendorService ; private VesselSchedulesService vesselSchedulesService ; private OrderService orderService ; private CustomerService customerService ; private ParameterService parameterService ; private NotificationService notificationService ; private ClientService clientService ; private CommonUtils commonUtils ; private DocumentsService documentsService ; private ContainerService containerService ; private Map < String , String > driverMap = new LinkedHashMap < String , String > ( ) ; private Map < String , String > trucksMap = new HashMap < String , String > ( ) ; private Map < String , String > bodyTypeMap = new HashMap < String , String > ( ) ; private Map < String , String > plateNumberMap = new HashMap < String , String > ( ) ; private Map < Integer , Integer > grossWeightMap = new HashMap < Integer , Integer > ( ) ; private Map < String , String > vesselMap = new HashMap < String , String > ( ) ; Date filterPickup ; Date filterDelivery ; private String [ ] check ; private String [ ] checkInland ; private String checkLCL ; private String originCity ; private String destinationCity ; private String originCityTruck ; private String destinationCityTruck ; private List < String > nameSizeList ; Map paramMap = new HashMap ( ) ; @ Override public void prepare ( ) { } public String updateCompleteInlandPlanning ( ) { } public String updateCompleteSeaPlanning ( ) { } public String addDriver ( ) { } public String addTrucks ( ) { } public String addVendor ( ) { } private Vendor transformVendorToEntityBean ( VendorBean vendorBean ) { } public Driver transformToEntityBeanDriver ( DriverBean driverBean ) { } private Trucks transformToEntityBeanTrucks ( TruckBean truckBean ) { } private Integer getClientId ( ) { } public String checkItemStatus ( ) { } public String checkItemStatusInland ( ) { List < Integer > planning1 = new ArrayList ( ) ; List < Integer > planning2 = new ArrayList ( ) ; List < Integer > planning3 = new ArrayList ( ) ; List < Integer > onGoing = new ArrayList ( ) ; if ( "" . equals ( orderItem . getEditItem ( ) ) ) { if ( ( check ) == null ) { return "NULL_INPUT" ; } else { for ( int i = 0 ; i < ( check . length ) ; i ++ ) { if ( ( ( check [ i ] . equals ( "false" ) ) || ( check [ i ] . equals ( "null" ) ) ) || ( "" . equals ( check [ i ] ) ) ) { return "NULL_INPUT" ; } Integer orderItemId = Integer . parseInt ( check [ i ] ) ; OrderItems entity = orderService . findOrderItemByOrderItemId ( orderItemId ) ; if ( "PLANNING<seq2seq4repair_space>1" . equals ( entity . getStatus ( ) ) ) { planning1 . add ( orderItemId ) ; if ( ( ( planning2 . size ( ) ) > 0 ) || ( ( planning3 . size ( ) ) > 0 ) ) { return INPUT ; } <START_BUG> } <END_BUG> if ( "PLANNING<seq2seq4repair_space>2" . equals ( entity . getStatus ( ) ) ) { planning2 . add ( orderItemId ) ; if ( ( ( planning1 . size ( ) ) > 0 ) || ( ( planning3 . size ( ) ) > 0 ) ) { return INPUT ; } } else if ( "PLANNING<seq2seq4repair_space>3" . equals ( entity . getStatus ( ) ) ) { planning3 . add ( orderItemId ) ; if ( ( ( planning1 . size ( ) ) > 0 ) || ( ( planning2 . size ( ) ) > 0 ) ) { return INPUT ; } } else if ( "ON<seq2seq4repair_space>GOING" . equals ( entity . getStatus ( ) ) ) { onGoing . add ( orderItemId ) ; if ( ( ( ( planning1 . size ( ) ) > 0 ) || ( ( planning2 . size ( ) ) > 0 ) ) || ( ( planning3 . size ( ) ) > 0 ) ) { return INPUT ; } } } } Map sessionAttributes = ActionContext . getContext ( ) . getSession ( ) ; Orders orderEntity = orderService . findOrdersById ( ( ( Integer ) ( sessionAttributes . get ( "orderIdParam" ) ) ) ) ; sessionAttributes . put ( "checkedItemsInSession" , check ) ; order = transformToOrderFormBean ( orderEntity ) ; nameSizeList = new ArrayList < String > ( ) ; Integer planSize ; List < Integer > planningList = new ArrayList ( ) ; if ( ( planning1 . size ( ) ) == 0 ) { if ( ( planning2 . size ( ) ) == 0 ) { planSize = planning3 . size ( ) ; planningList = planning3 ; } else { planSize = planning2 . size ( ) ; planningList = planning2 ; } } else { planSize = planning1 . size ( ) ; planningList = planning1 ; } for ( int i = 0 ; i < planSize ; i ++ ) { OrderItems orderItemEntity = orderService . findOrderItemByOrderItemId ( planningList . get ( i ) ) ;

Fix:
} else