Buggy code:
public class ExecutorDebugger implements Debugger { private Integer currentState ; private KRunGraph graph ; private BidiMap < Integer , KRunState > states ; private static Rule defaultPattern ; private static RuleCompilerSteps defaultPatternInfo ; private final Context context ; private final Executor executor ; private final TermLoader loader ; private final KExceptionManager kem ; private final Counter counter ; @ Inject public ExecutorDebugger ( Executor executor , Context context , TermLoader loader , KExceptionManager kem , KRunState . Counter counter ) throws KRunExecutionException { } @ Override public void start ( Term initialConfiguration ) throws KRunExecutionException { } private boolean putState ( KRunState state ) { } public KRunGraph getGraph ( ) { } public Integer getCurrentState ( ) { } public void setCurrentState ( Integer stateNum ) throws IllegalArgumentException { } public KRunState getState ( int stateNum ) { } public void step ( int steps ) throws KRunExecutionException { } public void resume ( ) throws KRunExecutionException { } public SearchResults stepAll ( int steps ) throws KRunExecutionException { if ( ( currentState ) == null ) { throw new IllegalStateException ( ( "Cannot<seq2seq4repair_space>step<seq2seq4repair_space>without<seq2seq4repair_space>a<seq2seq4repair_space>current<seq2seq4repair_space>state<seq2seq4repair_space>to<seq2seq4repair_space>step<seq2seq4repair_space>from.<seq2seq4repair_space>" + ( "If<seq2seq4repair_space>you<seq2seq4repair_space>previously<seq2seq4repair_space>used<seq2seq4repair_space>the<seq2seq4repair_space>search<seq2seq4repair_space>command<seq2seq4repair_space>you<seq2seq4repair_space>must" + "first<seq2seq4repair_space>select<seq2seq4repair_space>a<seq2seq4repair_space>solution<seq2seq4repair_space>with<seq2seq4repair_space>the<seq2seq4repair_space>select<seq2seq4repair_space>command<seq2seq4repair_space>before<seq2seq4repair_space>executing<seq2seq4repair_space>steps<seq2seq4repair_space>of<seq2seq4repair_space>rewrites!" ) ) ) ; } <START_BUG> SearchResults results = executor . search ( null , steps , PLUS , ExecutorDebugger . defaultPattern , getState ( currentState ) . getRawResult ( ) , ExecutorDebugger . defaultPatternInfo ) ; <END_BUG> mergeSearchGraph ( results . getGraph ( ) ) ; currentState = null ; return results ; } private void mergeSearchGraph ( DirectedGraph < KRunState , Transition > graphFragment ) { } private Map . Entry < Integer , KRunState > containsValue ( KRunState state ) { } private KRunState canonicalizeState ( KRunState state ) { } public Transition getEdge ( int state1 , int state2 ) { } public void readFromStdin ( String s ) { } private static class AppendToStdin extends CopyOnWriteTransformer { private String str ; private boolean succeeded ; private boolean inStdin ; private boolean inBuffer ; public AppendToStdin ( String str , Context context ) { } public boolean getSucceeded ( ) { } @ Override public ASTNode visit ( Cell cell , Void _void ) { } @ Override public ASTNode visit ( KApp kapp , Void _void ) { } @ Override public ASTNode visit ( StringBuiltin s , Void _void ) { } } @ Override public void setGraph ( KRunGraph graph ) { } }

Fix:
SearchResults results = executor . search ( null , steps , PLUS , ExecutorDebugger . defaultPattern , getState ( currentState ) . getRawResult ( ) , ExecutorDebugger . defaultPatternInfo , false ) ;