Buggy code:
public Map getComponentExpression ( String componentID ) { } public void addWorkflowAction ( String eventConsumer , MissionNodeType node , String nodeInfo ) throws ParsingException { if ( ( workflowActions ) == null ) { workflowActions = new ArrayList ( ) ; } else { clearWorkflowActions ( node . getUiAction ( ) . getActionName ( ) ) ; } workflowActions . add ( node . getUiAction ( ) . getActionName ( ) ) ; UIEntity entity = INSTANCE . getEntityManager ( ) . getEntity ( this . name , UIEntity . class ) ; boolean hasActionPanel = false ; List < UIComponentType > panelList = entity . getBody ( ) . getComponents ( ) ; for ( UIComponentType panel : panelList ) { if ( "actionPanel" . equals ( panel . getUIID ( ) ) ) { UIPanelType actionPanel = ( ( UIPanelType ) ( panel ) ) ; UIButtonType button = new UIButtonType ( ) ; button . setUIID ( node . getUiAction ( ) . getActionName ( ) ) ; ExpressionPropertyType property = new ExpressionPropertyType ( ) ; ExpressionType expr = new ExpressionType ( ) ; expr . setExpressionString ( ( ( ( "import<seq2seq4repair_space>org.shaolin.bmdp.runtime.security.UserContext;<seq2seq4repair_space>" + "\n{<seq2seq4repair_space>return<seq2seq4repair_space>UserContext.hasRole(\"" ) + ( node . getParticipant ( ) . getPartyType ( ) ) ) + "\");<seq2seq4repair_space>}" ) ) ; property . setExpression ( expr ) ; button . setVisible ( property ) ; ExpressionPropertyType property1 = new ExpressionPropertyType ( ) ; ExpressionType expr1 = new ExpressionType ( ) ; expr1 . setExpressionString ( ( ( ( ( "import<seq2seq4repair_space>org.shaolin.uimaster.page.security.UserContext;<seq2seq4repair_space>\n" + ( ( ( ( "import<seq2seq4repair_space>org.shaolin.bmdp.runtime.AppContext;<seq2seq4repair_space>\n" + "import<seq2seq4repair_space>org.shaolin.bmdp.workflow.coordinator.ICoordinatorService;<seq2seq4repair_space>\n" ) + "\n{<seq2seq4repair_space>" ) + "\n<seq2seq4repair_space>ICoordinatorService<seq2seq4repair_space>service<seq2seq4repair_space>=<seq2seq4repair_space>(ICoordinatorService)AppContext.get().getService(ICoordinatorService.class);<seq2seq4repair_space>" ) + "\n<seq2seq4repair_space>return<seq2seq4repair_space>service.isTaskExecutedOnNode($beObject.getTaskId(),<seq2seq4repair_space>\"" ) ) + nodeInfo ) + "\");" ) + "\n}" ) ) ; property1 . setExpression ( expr1 ) ; if ( ! ( node . isMultipleInvoke ( ) ) ) { button . setReadOnly ( property1 ) ; } StringPropertyType originalStr = ( ( StringPropertyType ) ( button . getText ( ) ) ) ; if ( originalStr == null ) { originalStr = new StringPropertyType ( ) ; originalStr . setValue ( node . getUiAction ( ) . getActionText ( ) ) ; button . setText ( originalStr ) ; } button . setUIStyle ( "uimaster_workflow_action" ) ; ClickListenerType clickListener = new ClickListenerType ( ) ; FunctionCallType func = new FunctionCallType ( ) ; func . setFunctionName ( ( ( "invokeDynamicFunction(this,<seq2seq4repair_space>'" + ( node . getUiAction ( ) . getActionName ( ) ) ) + "')" ) ) ; clickListener . setHandler ( func ) ; button . getEventListeners ( ) . add ( clickListener ) ; ComponentConstraintType constraint = new ComponentConstraintType ( ) ; constraint . setComponentId ( node . getUiAction ( ) . getActionName ( ) ) ; TableLayoutConstraintType position = new TableLayoutConstraintType ( ) ; position . setX ( 0 ) ; position . setY ( 0 ) ; constraint . setConstraint ( position ) ; actionPanel . getComponents ( ) . add ( button ) ; actionPanel . getLayoutConstraints ( ) . add ( constraint ) ; int count = 0 ; for ( ComponentConstraintType ct : actionPanel . getLayoutConstraints ( ) ) { if ( ( count ++ ) > 0 ) { ( ( TableLayoutConstraintType ) ( ct . getConstraint ( ) ) ) . setX ( 0 ) ; } } TableLayoutType tableLayout = ( ( TableLayoutType ) ( actionPanel . getLayout ( ) ) ) ; tableLayout . getColumnWidthWeights ( ) . add ( 1.0 ) ; FunctionType function = new FunctionType ( ) ; function . setNeedAlert ( Boolean . TRUE ) ; function . setFunctionName ( node . getUiAction ( ) . getActionName ( ) ) ; OpInvokeWorkflowType op = new OpInvokeWorkflowType ( ) ; op . setEventConsumer ( eventConsumer ) ; op . setExpression ( node . getUiAction ( ) . getExpression ( ) ) ; op . setPartyType ( node . getParticipant ( ) . getPartyType ( ) ) ; op . setOperationId ( node . getUiAction ( ) . getActionName ( ) ) ; op . setAdhocNodeName ( node . getName ( ) ) ; function . getOps ( ) . add ( op ) ; entity . getEventHandlers ( ) . add ( function ) ; for ( UIComponentType b : actionPanel . getComponents ( ) ) { if ( "okbtn" . equals ( b . getUIID ( ) ) ) { ExpressionPropertyType property2 = new ExpressionPropertyType ( ) ; ExpressionType expr2 = new ExpressionType ( ) ; <START_BUG> expr2 . setExpressionString ( ( "import<seq2seq4repair_space>org.shaolin.uimaster.page.security.UserContext;<seq2seq4repair_space>\n" + ( ( ( ( ( "import<seq2seq4repair_space>org.shaolin.bmdp.runtime.AppContext;<seq2seq4repair_space>\n" + "import<seq2seq4repair_space>org.shaolin.bmdp.workflow.coordinator.ICoordinatorService;<seq2seq4repair_space>\n" ) + "\n{<seq2seq4repair_space>" ) + "\n<seq2seq4repair_space>ICoordinatorService<seq2seq4repair_space>service<seq2seq4repair_space>=<seq2seq4repair_space>(ICoordinatorService)AppContext.get().getService(ICoordinatorService.class);<seq2seq4repair_space>" ) + "\n<seq2seq4repair_space>return<seq2seq4repair_space>!service.isPendingTask($beObject.getTaskId());<seq2seq4repair_space>" ) + "\n}" ) ) ) ; <END_BUG> property2 . setExpression ( expr2 ) ; b . setReadOnly ( property2 ) ; } } hasActionPanel = true ; break ; } } if ( ! hasActionPanel ) { throw new IllegalStateException ( "Workflow<seq2seq4repair_space>action<seq2seq4repair_space>has<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>added<seq2seq4repair_space>on<seq2seq4repair_space>ActionPanel,<seq2seq4repair_space>this<seq2seq4repair_space>panel<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>defined!" ) ; } UIFormObject . logger . info ( "reload<seq2seq4repair_space>form<seq2seq4repair_space>{}<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>workflow<seq2seq4repair_space>customization" , this . name ) ; load ( ) ; } public void clearWorkflowActions ( String newActionName ) { } public void addDynamicLink ( String uipanel , String uiwidget , String linkInfo ) { } public void addDynamicItem ( HTMLDynamicUIItem item ) throws ClassNotFoundException , EntityNotFoundException , ParsingException { } public List < HTMLDynamicUIItem > getDynamicItems ( String panelId , String filter ) { } public void clearDynamicItems ( ) { } public boolean hasDynamicItems ( ) { } public void addStatsAction ( UITableStatsType uiStatsType ) { } public void clearStatsAction ( ) { } public String getBodyName ( ) { } public List < ParamType > getVariables ( ) { } public Set getReconfigurableVarSet ( ) { } public Map getReconfigurablePropMap ( ) { } public Map getReconfigurationMap ( ) { } public HTMLCellLayout getBodyLayout ( ) { } public void importSelfJS ( HTMLSnapshotContext context , int depth ) throws JspException { } public String importSelfJs ( HTMLSnapshotContext context , UIFormObject tEntityObj ) { } public String importSelfJs ( HTMLSnapshotContext context ) { }

Fix:
expr2 . setExpressionString ( ( "import<seq2seq4repair_space>org.shaolin.uimaster.page.security.UserContext;<seq2seq4repair_space>\n" + ( ( ( ( ( "import<seq2seq4repair_space>org.shaolin.bmdp.runtime.AppContext;<seq2seq4repair_space>\n" + "import<seq2seq4repair_space>org.shaolin.bmdp.workflow.coordinator.ICoordinatorService;<seq2seq4repair_space>\n" ) + "\n{<seq2seq4repair_space>" ) + "\n<seq2seq4repair_space>ICoordinatorService<seq2seq4repair_space>service<seq2seq4repair_space>=<seq2seq4repair_space>(ICoordinatorService)AppContext.get().getService(ICoordinatorService.class);<seq2seq4repair_space>" ) + "\n<seq2seq4repair_space>return<seq2seq4repair_space>service.isPendingTask($beObject.getTaskId());<seq2seq4repair_space>" ) + "\n}" ) ) ) ;