Buggy code:
public class ActionFlowInterceptor extends AbstractInterceptor { private static final long serialVersionUID = - 8931708101962468929L ; public static final Logger LOG = LoggerFactory . getLogger ( ActionFlowInterceptor . class ) ; private static final String PREVIOUS_FLOW_ACTION = "actionFlowPreviousAction" ; private static final String HIGHEST_CURRENT_ACTION_INDEX = "actionFlowHighestCurrentActionIndex" ; private static final String SKIP_ACTIONS = "actionFlowSkipActionsMap" ; private static final String DEFAULT_NEXT_ACTION_NAME = "next" ; private static final String DEFAULT_PREV_ACTION_NAME = "prev" ; protected static final String FIRST_FLOW_ACTION_NAME = "firstFlowAction" ; protected static final String GLOBAL_VIEW_RESULT = "actionFlowViewResult" ; private static final String DEFAULT_VIEW_ACTION_POSTFIX = "View" ; private static final String DEFAULT_VIEW_ACTION_METHOD = "execute" ; private static final String DEFAULT_STEP_PARAM_NAME = "step" ; protected static final String NEXT_ACTION_PARAM = "nextAction" ; protected static final String PREV_ACTION_PARAM = "prevAction" ; protected static final String VIEW_ACTION_PARAM = "viewAction" ; private static final String FLOW_SCOPE_KEY = "actionFlowScope" ; private Map < String , List < PropertyDescriptor > > flowScopeFields ; private String prevSimpleAction ; private String startAction ; private String nextActionName = ActionFlowInterceptor . DEFAULT_NEXT_ACTION_NAME ; private String prevActionName = ActionFlowInterceptor . DEFAULT_PREV_ACTION_NAME ; private boolean forceFlowStepsOrder = true ; private String viewActionPostfix = ActionFlowInterceptor . DEFAULT_VIEW_ACTION_POSTFIX ; private String viewActionMethod = ActionFlowInterceptor . DEFAULT_VIEW_ACTION_METHOD ; private String stepParameterName = ActionFlowInterceptor . DEFAULT_STEP_PARAM_NAME ; private Map < String , ActionFlowStepConfig > flowMap ; private ActionFlowStepsData flowStepsData ; @ Inject private ActionFlowConfigBuilder flowConfigBuilder ; private String actionName ; private int indexCurrent ; @ SuppressWarnings ( "unchecked" ) @ Override public String intercept ( ActionInvocation invocation ) throws Exception { actionName = invocation . getInvocationContext ( ) . getName ( ) ; if ( ( flowMap ) == null ) { initFlowConfiguration ( invocation . getProxy ( ) . getConfig ( ) . getPackageName ( ) ) ; } indexCurrent = - 1 ; Integer stepCount = 1 ; final boolean flowAction ; final boolean lastFlowAction ; if ( flowMap . containsKey ( actionName ) ) { flowAction = true ; indexCurrent = flowMap . get ( actionName ) . getIndex ( ) ; stepCount = indexCurrent ; lastFlowAction = ( flowMap . get ( actionName ) . getNextAction ( ) ) == null ; } else { flowAction = false ; lastFlowAction = false ; } boolean flowViewAction = false ; String plainActionName = null ; if ( actionName . endsWith ( viewActionPostfix ) ) { plainActionName = actionName . substring ( 0 , actionName . indexOf ( viewActionPostfix ) ) ; if ( flowMap . containsKey ( plainActionName ) ) { flowViewAction = true ; stepCount = flowMap . get ( plainActionName ) . getIndex ( ) ; } } Map < String , Object > session = invocation . getInvocationContext ( ) . getSession ( ) ; if ( ( ( startAction ) != null ) && ( startAction . equals ( actionName ) ) ) { clearSession ( session ) ; } if ( ( invocation . getAction ( ) ) instanceof ActionFlowStepsAware ) { flowStepsData . setStepIndex ( stepCount ) ; ( ( ActionFlowStepsAware ) ( invocation . getAction ( ) ) ) . setActionFlowSteps ( flowStepsData ) ; } <START_BUG> if ( flowViewAction ) { <END_BUG> handleFlowScope ( invocation . getAction ( ) , session , true ) ; } if ( ( ( ! flowAction ) && ( ! ( prevActionName . equals ( actionName ) ) ) ) && ( ! ( nextActionName . equals ( actionName ) ) ) ) { prevSimpleAction = actionName ; return invocation . invoke ( ) ; } String previousFlowAction = ( ( String ) ( session . get ( ActionFlowInterceptor . PREVIOUS_FLOW_ACTION ) ) ) ; if ( previousFlowAction == null ) { previousFlowAction = ActionFlowInterceptor . FIRST_FLOW_ACTION_NAME ; } Object [ ] stepParam = ( ( Object [ ] ) ( invocation . getInvocationContext ( ) . getParameters ( ) . get ( stepParameterName ) ) ) ; boolean overriddenWithStep = false ; if ( ( stepParam != null ) && ( ( stepParam . length ) > 0 ) ) { String step = "" + ( stepParam [ 0 ] ) ; if ( step . isEmpty ( ) ) { step = ActionFlowInterceptor . FIRST_FLOW_ACTION_NAME ; } if ( ( ( step != null ) && ( ! ( step . equals ( previousFlowAction ) ) ) ) && ( flowMap . containsKey ( step ) ) ) { if ( ActionFlowInterceptor . LOG . isDebugEnabled ( ) ) { ActionFlowInterceptor . LOG . debug ( ( ( ( ( ( ( ( ( "The<seq2seq4repair_space>'previousFlowAction'<seq2seq4repair_space>value<seq2seq4repair_space>from<seq2seq4repair_space>session<seq2seq4repair_space>is<seq2seq4repair_space>'" + previousFlowAction ) + "',<seq2seq4repair_space>but<seq2seq4repair_space>'" ) + ( stepParameterName ) ) + "'<seq2seq4repair_space>parameter<seq2seq4repair_space>value<seq2seq4repair_space>is<seq2seq4repair_space>'" ) + step ) + "'<seq2seq4repair_space>The<seq2seq4repair_space>'" ) + ( stepParameterName ) ) + "'<seq2seq4repair_space>parameter<seq2seq4repair_space>value<seq2seq4repair_space>will<seq2seq4repair_space>be<seq2seq4repair_space>used<seq2seq4repair_space>for<seq2seq4repair_space>'previousFlowAction'." ) ) ; } previousFlowAction = step ; overriddenWithStep = true ; } } String nextAction = null ; String prevAction = null ; if ( flowMap . containsKey ( previousFlowAction ) ) { nextAction = flowMap . get ( previousFlowAction ) . getNextAction ( ) ; prevAction = flowMap . get ( previousFlowAction ) . getPrevAction ( ) ; } if ( ActionFlowInterceptor . LOG . isDebugEnabled ( ) ) { ActionFlowInterceptor . LOG . debug ( ( ( ( ( ( ( ( actionName ) + "-><seq2seq4repair_space>previousFlowAction:<seq2seq4repair_space>" ) + previousFlowAction ) + ",<seq2seq4repair_space>nextAction:<seq2seq4repair_space>" ) + nextAction ) + ",<seq2seq4repair_space>prevAction:<seq2seq4repair_space>" ) + prevAction ) ) ; } final Integer highestCurrentIndex ; if ( ( session . containsKey ( ActionFlowInterceptor . HIGHEST_CURRENT_ACTION_INDEX ) ) && ( ( session . get ( ActionFlowInterceptor . HIGHEST_CURRENT_ACTION_INDEX ) ) != null ) ) { highestCurrentIndex = ( ( Integer ) ( session . get ( ActionFlowInterceptor . HIGHEST_CURRENT_ACTION_INDEX ) ) ) ; } else { highestCurrentIndex = 0 ; }

Fix:
if ( flowAction || flowViewAction ) {