Buggy code:
@ ParentPackage ( "egov" ) @ Results ( { @ Result ( name = NEW , location = "newTradeLicense-new.jsp" ) , @ Result ( name = Constants . ACKNOWLEDGEMENT , location = ( "newTradeLicense-" + ( Constants . ACKNOWLEDGEMENT ) ) + ".jsp" ) , @ Result ( name = Constants . PFACERTIFICATE , location = ( "//WEB-INF//jsp//viewtradelicense//viewTradeLicense-" + ( Constants . PFACERTIFICATE ) ) + ".jsp" ) , @ Result ( name = Constants . MESSAGE , location = ( "newTradeLicense-" + ( Constants . MESSAGE ) ) + ".jsp" ) , @ Result ( name = Constants . BEFORE_RENEWAL , location = ( "newTradeLicense-" + ( Constants . BEFORE_RENEWAL ) ) + ".jsp" ) , @ Result ( name = Constants . ACKNOWLEDGEMENT_RENEW , location = ( "newTradeLicense-" + ( Constants . ACKNOWLEDGEMENT_RENEW ) ) + ".jsp" ) } ) public class NewTradeLicenseAction extends BaseLicenseAction < TradeLicense > { private static final long serialVersionUID = 1L ; private TradeLicense tradeLicense = new TradeLicense ( ) ; private List < LicenseDocumentType > documentTypes = new ArrayList < > ( ) ; private Map < String , String > ownerShipTypeMap ; private String mode ; private String renewAppType ; @ Autowired @ Qualifier ( "tradeLicenseService" ) private TradeLicenseService tradeLicenseService ; public NewTradeLicenseAction ( ) { } @ Override @ SkipValidation @ Action ( "//newtradelicense//newTradeLicense-newForm" ) public String newForm ( ) { } @ ValidationErrorPage ( Constants . NEW ) @ Action ( "//newtradelicense//newTradeLicense-create" ) public String create ( ) { } @ Override @ Action ( "//newtradelicense//newTradeLicense-showForApproval" ) @ SkipValidation public String showForApproval ( ) { } @ Override @ ValidationErrorPage ( Constants . NEW ) @ Action ( "//newtradelicense//newTradeLicense-approve" ) public String approve ( ) { BigDecimal newTradeAreWt = tradeLicense . getTradeArea_weight ( ) ; tradeLicense = tradeLicenseService . getLicenseById ( ( ( Long ) ( getSession ( ) . get ( "model.id" ) ) ) ) ; if ( ( null != ( license ( ) . getState ( ) ) ) && ( license ( ) . getState ( ) . getValue ( ) . contains ( WF_STATE_SANITORY_INSPECTOR_APPROVAL_PENDING ) ) ) { tradeLicense . setTradeArea_weight ( newTradeAreWt ) ; } <START_BUG> if ( ( ( ( ( ( "Submit" . equals ( workFlowAction ) ) && ( mode . equalsIgnoreCase ( VIEW ) ) ) && ( ( tradeLicense . getState ( ) . getValue ( ) . equals ( WF_STATE_COLLECTION_PENDING ) ) || ( tradeLicense . getState ( ) . getValue ( ) . equals ( WF_STATE_RENEWAL_COMM_APPROVED ) ) ) ) && ( ( tradeLicense ) != null ) ) && ( ! ( tradeLicense . isPaid ( ) ) ) ) && ( ! ( workFlowAction . equalsIgnoreCase ( BUTTONREJECT ) ) ) ) { <END_BUG> prepareNewForm ( ) ; final ValidationError vr = new ValidationError ( "license.fee.notcollected" , "license.fee.notcollected" ) ; throw new org . egov . infra . validation . exception . ValidationException ( Arrays . asList ( vr ) ) ; } return super . approve ( ) ; } @ Override @ SkipValidation @ Action ( "//newtradelicense//newTradeLicense-beforeRenew" ) public String beforeRenew ( ) { } @ Override @ ValidationErrorPage ( Constants . BEFORE_RENEWAL ) @ Action ( "//newtradelicense//newTradeLicense-renewal" ) public String renew ( ) { } public void prepareRenew ( ) { } @ Override public void prepareNewForm ( ) { } @ Override public License getModel ( ) { } public WorkflowBean getWorkflowBean ( ) { } public void setWorkflowBean ( final WorkflowBean workflowBean ) { } @ Override protected TradeLicense license ( ) { } @ Override protected AbstractLicenseService < TradeLicense > licenseService ( ) { } public List < LicenseDocumentType > getDocumentTypes ( ) { } public void setDocumentTypes ( final List < LicenseDocumentType > documentTypes ) { } public Map < String , String > getOwnerShipTypeMap ( ) { } public void setOwnerShipTypeMap ( final Map < String , String > ownerShipTypeMap ) { } public String getMode ( ) { } public void setMode ( final String mode ) { } @ Override public String getAdditionalRule ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( ( ( ( "Submit" . equals ( workFlowAction ) ) && ( mode . equalsIgnoreCase ( VIEW ) ) ) && ( tradeLicense . getState ( ) . getValue ( ) . contains ( WF_STATE_COMMISSIONER_APPROVED_STR ) ) ) && ( ( tradeLicense ) != null ) ) && ( ! ( tradeLicense . isPaid ( ) ) ) ) && ( ! ( workFlowAction . equalsIgnoreCase ( BUTTONREJECT ) ) ) ) {