Buggy code:
public class EvaluationContext implements EvaluationConstants { static final boolean TIMING = false ; static int VAR_CLASS_COUNTER = 0 ; static int CODE_SNIPPET_COUNTER = 0 ; GlobalVariable [ ] variables = new GlobalVariable [ 5 ] ; int variableCount = 0 ; char [ ] [ ] imports = new char [ 0 ] [ ] ; char [ ] packageName = new char [ 0 ] ; boolean varsChanged = true ; VariablesInfo installedVars ; IBinaryType codeSnippetBinary ; char [ ] declaringTypeName ; int [ ] localVariableModifiers ; char [ ] [ ] localVariableTypeNames ; char [ ] [ ] localVariableNames ; boolean isStatic = true ; boolean isConstructorCall = false ; public EvaluationContext ( ) { } public GlobalVariable [ ] allVariables ( ) { } public void complete ( char [ ] codeSnippet , int completionPosition , ISearchableNameEnvironment environment , ICompletionRequestor requestor , Map options ) { } public void deleteVariable ( GlobalVariable variable ) { } private void deployCodeSnippetClassIfNeeded ( IRequestor requestor ) { } public void evaluate ( char [ ] codeSnippet , char [ ] [ ] localVariableTypeNames , char [ ] [ ] localVariableNames , int [ ] localVariableModifiers , char [ ] declaringTypeName , boolean isStatic , boolean isConstructorCall , INameEnvironment environment , Map options , final IRequestor requestor , IProblemFactory problemFactory ) throws InstallException { this . localVariableTypeNames = localVariableTypeNames ; this . localVariableNames = localVariableNames ; this . localVariableModifiers = localVariableModifiers ; this . declaringTypeName = declaringTypeName ; this . isStatic = isStatic ; this . isConstructorCall = isConstructorCall ; this . deployCodeSnippetClassIfNeeded ( requestor ) ; try { class ForwardingRequestor implements IRequestor { boolean hasErrors = false ; public boolean acceptClassFiles ( ClassFile [ ] classFiles , char [ ] codeSnippetClassName ) { return requestor . acceptClassFiles ( classFiles , codeSnippetClassName ) ; } public void acceptProblem ( IProblem problem , char [ ] fragmentSource , int fragmentKind ) { requestor . acceptProblem ( problem , fragmentSource , fragmentKind ) ; if ( problem . isError ( ) ) { hasErrors = true ; } } } ForwardingRequestor forwardingRequestor = new ForwardingRequestor ( ) ; if ( this . varsChanged ) { evaluateVariables ( environment , options , forwardingRequestor , problemFactory ) ; } if ( ! ( forwardingRequestor . hasErrors ) ) { <START_BUG> Evaluator evaluator = new CodeSnippetEvaluator ( CharOperation . concat ( codeSnippet , LINE_SEPARATOR_CHARS ) , this , environment , options , requestor , problemFactory ) ; <END_BUG> ClassFile [ ] classes = null ; if ( EvaluationContext . TIMING ) { long start = System . currentTimeMillis ( ) ; classes = evaluator . getClasses ( ) ; System . out . println ( ( ( ( ( "Time<seq2seq4repair_space>to<seq2seq4repair_space>compile<seq2seq4repair_space>[" + ( new String ( codeSnippet ) ) ) + "]<seq2seq4repair_space>was<seq2seq4repair_space>" ) + ( ( System . currentTimeMillis ( ) ) - start ) ) + "ms" ) ) ; } else { classes = evaluator . getClasses ( ) ; } if ( ( classes != null ) && ( ( classes . length ) > 0 ) ) { char [ ] simpleClassName = evaluator . getClassName ( ) ; char [ ] packageName = this . getPackageName ( ) ; char [ ] qualifiedClassName = ( ( packageName . length ) == 0 ) ? simpleClassName : CharOperation . concat ( packageName , simpleClassName , '.' ) ; ( EvaluationContext . CODE_SNIPPET_COUNTER ) ++ ; requestor . acceptClassFiles ( classes , qualifiedClassName ) ; } } } finally { this . localVariableTypeNames = null ; this . localVariableNames = null ; this . localVariableModifiers = null ; this . declaringTypeName = null ; this . isStatic = true ; this . isConstructorCall = false ; } } public void evaluate ( char [ ] codeSnippet , INameEnvironment environment , Map options , final IRequestor requestor , IProblemFactory problemFactory ) throws InstallException { } public void evaluateImports ( INameEnvironment environment , IRequestor requestor , IProblemFactory problemFactory ) { } public void evaluateVariable ( GlobalVariable variable , INameEnvironment environment , Map options , IRequestor requestor , IProblemFactory problemFactory ) throws InstallException { } public void evaluateVariables ( INameEnvironment environment , Map options , IRequestor requestor , IProblemFactory problemFactory ) throws InstallException { } private byte [ ] getCodeSnippetBytes ( ) { } public static String getCodeSnippetSource ( ) { } public char [ ] [ ] getImports ( ) { } public char [ ] getPackageName ( ) { } IBinaryType getRootCodeSnippetBinary ( ) { } private String getSupportClassFileName ( String simpleName ) { } public GlobalVariable newVariable ( char [ ] typeName , char [ ] name , char [ ] initializer ) { } public void select ( char [ ] codeSnippet , int selectionSourceStart , int selectionSourceEnd , ISearchableNameEnvironment environment , ISelectionRequestor requestor , Map options ) { } public void setImports ( char [ ] [ ] imports ) { } public void setPackageName ( char [ ] packageName ) { } }

Fix:
Evaluator evaluator = new CodeSnippetEvaluator ( codeSnippet , this , environment , options , requestor , problemFactory ) ;