nus-yam/ex-repair huggingface dataset:
Program: 185611
Project: 185611
Buggy source:
/** 
 * Possibly compute the hover. Might return null.
 */
private Object computeHover(IRegion hoverRegion,IJavaElement[] elements){
  Object hover;
  hover=ReflectionUtils.executePrivateMethod(JavadocHover.class,"String_Node_Str",new Class[]{IJavaElement[].class,ITypeRoot.class,IRegion.class,JavadocBrowserInformationControlInput.class},this,new Object[]{elements,getEditorInputJavaElement(),hoverRegion,null});
  if (hover instanceof JavadocBrowserInformationControlInput && elements[0] instanceof IGroovyResolvedElement) {
    JavadocBrowserInformationControlInput input=(JavadocBrowserInformationControlInput)hover;
    hover=new JavadocBrowserInformationControlInput((JavadocBrowserInformationControlInput)input.getPrevious(),input.getElement(),wrapHTML(input,(IGroovyResolvedElement)elements[0]),input.getLeadingImageWidth());
  }
  return hover;
}

Fixed version (ground truth):
/** 
 * Possibly compute the hover. Might return null.
 */
private Object computeHover(IRegion hoverRegion,IJavaElement[] elements){
  JavadocBrowserInformationControlInput hover=getHoverInfo(elements,getEditorInputJavaElement(),hoverRegion,null);
  if (hover != null && elements[0] instanceof IGroovyResolvedElement) {
    hover=new JavadocBrowserInformationControlInput((JavadocBrowserInformationControlInput)hover.getPrevious(),hover.getElement(),wrapHTML(hover,(IGroovyResolvedElement)elements[0]),hover.getLeadingImageWidth());
  }
  return hover;
}
Program: 185612
Project: 185612
Buggy source:
private String createMethodLabel(MethodNode node){
  StringBuilder sb=new StringBuilder();
  sb.append(createClassLabel(node.getReturnType()));
  sb.append("String_Node_Str");
  sb.append(createClassLabel(node.getDeclaringClass()));
  sb.append("String_Node_Str");
  sb.append(node.getName());
  sb.append("String_Node_Str");
  Parameter[] params=node.getParameters();
  if (params != null) {
    for (int i=0; i < params.length; i++) {
      sb.append(createClassLabel(params[i].getType()));
      sb.append("String_Node_Str" + params[i].getName());
      if (i < params.length - 1) {
        sb.append("String_Node_Str");
      }
    }
  }
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
private String createMethodLabel(MethodNode node){
  StringBuilder sb=new StringBuilder();
  sb.append(createClassLabel(node.getReturnType()));
  sb.append("String_Node_Str");
  sb.append(createClassLabel(node.getDeclaringClass()));
  sb.append("String_Node_Str");
  sb.append(node.getName());
  sb.append("String_Node_Str");
  Parameter[] params=node.getParameters();
  if (params != null) {
    for (int i=0, n=params.length; i < n; i+=1) {
      sb.append(createClassLabel(params[i].getType()));
      sb.append("String_Node_Str" + params[i].getName());
      if (i < params.length - 1) {
        sb.append("String_Node_Str");
      }
    }
  }
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 185613
Project: 185613
Buggy source:
public GroovyParser(Object requestor,CompilerOptions options,ProblemReporter problemReporter,boolean allowTransforms,boolean isReconcile){
  this.requestor=requestor;
  this.compilerOptions=options;
  this.problemReporter=problemReporter;
  this.projectName=options.groovyProjectName;
  this.gclClasspath=(options == null ? null : options.groovyClassLoaderPath);
  GroovyClassLoader gcl=getLoaderFor(this.gclClasspath);
  GrapeAwareGroovyClassLoader grabbyLoader=new GrapeAwareGroovyClassLoader(gcl);
  this.compilationUnit=makeCompilationUnit(grabbyLoader,gcl,isReconcile,allowTransforms);
  this.compilationUnit.removeOutputPhaseOperation();
}

Fixed version (ground truth):
public GroovyParser(Object requestor,CompilerOptions compilerOptions,ProblemReporter problemReporter,boolean allowTransforms,boolean isReconcile){
  this.requestor=requestor;
  this.compilerOptions=compilerOptions;
  this.problemReporter=problemReporter;
  this.projectName=compilerOptions.groovyProjectName;
  this.gclClasspath=compilerOptions.groovyClassLoaderPath;
  GroovyClassLoader gcl=getLoaderFor(gclClasspath);
  GrapeAwareGroovyClassLoader grabbyLoader=new GrapeAwareGroovyClassLoader(gcl);
  this.compilationUnit=makeCompilationUnit(grabbyLoader,gcl,isReconcile,allowTransforms);
  this.compilationUnit.removeOutputPhaseOperation();
}
Program: 185614
Project: 185614
Buggy source:
/** 
 * Returns a list of markers that exist at the current ruler location.
 * @return a list of markers that exist at the current ruler location
 */
protected List<IMarker> getMarkers(){
  List<IMarker> breakpoints=new ArrayList<IMarker>();
  IResource resource=getResource();
  IDocument document=getDocument();
  AbstractMarkerAnnotationModel model=getAnnotationModel();
  if (model != null) {
    try {
      IMarker[] markers=null;
      if (resource instanceof IFile)       markers=resource.findMarkers(IBreakpoint.BREAKPOINT_MARKER,true,IResource.DEPTH_INFINITE);
 else {
        IWorkspaceRoot root=ResourcesPlugin.getWorkspace().getRoot();
        markers=root.findMarkers(IBreakpoint.BREAKPOINT_MARKER,true,IResource.DEPTH_INFINITE);
      }
      if (markers != null) {
        IBreakpointManager breakpointManager=DebugPlugin.getDefault().getBreakpointManager();
        for (int i=0; i < markers.length; i++) {
          IBreakpoint breakpoint=breakpointManager.getBreakpoint(markers[i]);
          if (breakpoint != null && breakpointManager.isRegistered(breakpoint) && includesRulerLine(model.getMarkerPosition(markers[i]),document))           breakpoints.add(markers[i]);
        }
      }
    }
 catch (    CoreException x) {
      JDIDebugUIPlugin.log(x.getStatus());
    }
  }
  return breakpoints;
}

Fixed version (ground truth):
/** 
 * Returns a list of markers that exist at the current ruler location.
 */
protected List<IMarker> getMarkers(){
  List<IMarker> breakpoints=Collections.emptyList();
  try {
    IEditorInput editorInput=fTextEditor.getEditorInput();
    IDocumentProvider provider=fTextEditor.getDocumentProvider();
    IAnnotationModel model=provider.getAnnotationModel(editorInput);
    if (model instanceof AbstractMarkerAnnotationModel) {
      IMarker[] markers;
      if (editorInput instanceof IFileEditorInput) {
        markers=((IFileEditorInput)editorInput).getFile().findMarkers(IBreakpoint.BREAKPOINT_MARKER,true,IResource.DEPTH_INFINITE);
      }
 else {
        markers=ResourcesPlugin.getWorkspace().getRoot().findMarkers(IBreakpoint.BREAKPOINT_MARKER,true,IResource.DEPTH_INFINITE);
      }
      if (markers != null) {
        IDocument document=provider.getDocument(editorInput);
        IBreakpointManager breakpointManager=DebugPlugin.getDefault().getBreakpointManager();
        for (        IMarker marker : markers) {
          IBreakpoint breakpoint=breakpointManager.getBreakpoint(marker);
          if (breakpoint != null && breakpointManager.isRegistered(breakpoint) && includesRulerLine(((AbstractMarkerAnnotationModel)model).getMarkerPosition(marker),document)) {
            if (breakpoints.isEmpty())             breakpoints=new ArrayList<IMarker>();
            breakpoints.add(marker);
          }
        }
      }
    }
  }
 catch (  CoreException e) {
    JDIDebugUIPlugin.log(e.getStatus());
  }
catch (  Throwable t) {
    JDIDebugUIPlugin.log(t);
  }
  return breakpoints;
}
Program: 185615
Project: 185615
Buggy source:
/** 
 * Disposes this action
 */
public void dispose(){
  fTextEditor=null;
  fRuler=null;
}

Fixed version (ground truth):
public void dispose(){
  fTextEditor=null;
  fRuler=null;
}
Program: 185616
Project: 185616
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public IContentAssistant getContentAssistant(ISourceViewer sourceViewer){
  ContentAssistant assistant=(ContentAssistant)super.getContentAssistant(sourceViewer);
  ContentAssistProcessor stringProcessor=new JavaCompletionProcessor(getEditor(),assistant,GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS);
  assistant.setContentAssistProcessor(stringProcessor,GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS);
  IContentAssistProcessor processor=assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
  List<CompletionProposalCategory> categories=(List<CompletionProposalCategory>)ReflectionUtils.getPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor);
  List<CompletionProposalCategory> newCategories=new ArrayList<CompletionProposalCategory>(categories.size() - 1);
  for (  CompletionProposalCategory category : categories) {
    if (!JAVA_CONTENT_ASSIST.matcher(category.getId()).matches()) {
      newCategories.add(category);
    }
  }
  ReflectionUtils.setPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor,newCategories);
  return assistant;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public IContentAssistant getContentAssistant(ISourceViewer sourceViewer){
  ContentAssistant assistant=(ContentAssistant)super.getContentAssistant(sourceViewer);
  String contentType=GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS;
  assistant.setContentAssistProcessor(new JavaCompletionProcessor(getEditor(),assistant,contentType),contentType);
  IContentAssistProcessor processor=assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
  List<CompletionProposalCategory> categories=(List<CompletionProposalCategory>)ReflectionUtils.getPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor);
  List<CompletionProposalCategory> newCategories=new ArrayList<CompletionProposalCategory>();
  for (  CompletionProposalCategory category : categories) {
    if (GROOVY_CONTENT_ASSIST.matcher(category.getId()).matches()) {
      newCategories.add(category);
    }
  }
  ReflectionUtils.setPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor,newCategories);
  return assistant;
}
Program: 185617
Project: 185617
Buggy source:
@Override @SuppressWarnings("String_Node_Str") public IContentAssistant getContentAssistant(ISourceViewer sourceViewer){
  ContentAssistant assistant=(ContentAssistant)super.getContentAssistant(sourceViewer);
  ContentAssistProcessor stringProcessor=new JavaCompletionProcessor(getEditor(),assistant,GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS);
  assistant.setContentAssistProcessor(stringProcessor,GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS);
  IContentAssistProcessor processor=assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
  List<CompletionProposalCategory> categories=(List<CompletionProposalCategory>)ReflectionUtils.getPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor);
  List<CompletionProposalCategory> newCategories=new ArrayList<CompletionProposalCategory>(categories.size() - 1);
  for (  CompletionProposalCategory category : categories) {
    if (!category.getId().equals("String_Node_Str") && !category.getId().equals("String_Node_Str") && !category.getId().equals("String_Node_Str")&& !category.getId().equals("String_Node_Str")&& !category.getId().equals("String_Node_Str")&& !category.getId().equals("String_Node_Str")&& !category.getId().equals("String_Node_Str")) {
      newCategories.add(category);
    }
  }
  ReflectionUtils.setPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor,newCategories);
  return assistant;
}

Fixed version (ground truth):
@Override @SuppressWarnings("String_Node_Str") public IContentAssistant getContentAssistant(ISourceViewer sourceViewer){
  ContentAssistant assistant=(ContentAssistant)super.getContentAssistant(sourceViewer);
  ContentAssistProcessor stringProcessor=new JavaCompletionProcessor(getEditor(),assistant,GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS);
  assistant.setContentAssistProcessor(stringProcessor,GroovyPartitionScanner.GROOVY_MULTILINE_STRINGS);
  IContentAssistProcessor processor=assistant.getContentAssistProcessor(IDocument.DEFAULT_CONTENT_TYPE);
  List<CompletionProposalCategory> categories=(List<CompletionProposalCategory>)ReflectionUtils.getPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor);
  List<CompletionProposalCategory> newCategories=new ArrayList<CompletionProposalCategory>(categories.size() - 1);
  for (  CompletionProposalCategory category : categories) {
    if (!JAVA_CONTENT_ASSIST.matcher(category.getId()).matches()) {
      newCategories.add(category);
    }
  }
  ReflectionUtils.setPrivateField(ContentAssistProcessor.class,"String_Node_Str",processor,newCategories);
  return assistant;
}
Program: 185618
Project: 185618
Buggy source:
@Test public void testTypeChecked4(){
  assumeTrue(isAtLeastGroovy(21));
  String[] sources={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"};
  runConformTest(sources);
}

Fixed version (ground truth):
@Test public void testTypeChecked4(){
  assumeTrue(isAtLeastGroovy(24));
  String[] sources={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"};
  runConformTest(sources);
}
Program: 185619
Project: 185619
Buggy source:
public GroovyConfiguration(GroovyColorManager colorManager,IPreferenceStore preferenceStore,ITextEditor editor){
  super(colorManager,preferenceStore,editor,IJavaPartitions.JAVA_PARTITIONING);
  AbstractJavaScanner stringScanner=new SingleTokenJavaScanner(colorManager,preferenceStore,GROOVY_EDITOR_HIGHLIGHT_STRINGS_COLOR);
  ReflectionUtils.setPrivateField(JavaSourceViewerConfiguration.class,"String_Node_Str",this,stringScanner);
  try {
    IProject project=null;
    if (editor != null && editor instanceof GroovyEditor) {
      IEditorInput input=((GroovyEditor)editor).internalInput;
      if (input instanceof FileEditorInput) {
        project=((FileEditorInput)input).getFile().getProject();
      }
    }
    HighlightingExtenderRegistry registry=GroovyPlugin.getDefault().getTextTools().getHighlightingExtenderRegistry();
    AbstractJavaScanner codeScanner=new GroovyTagScanner(colorManager,registry.getInitialAdditionalRulesForProject(project),registry.getAdditionalRulesForProject(project),registry.getExtraGroovyKeywordsForProject(project),registry.getExtraGJDKKeywordsForProject(project));
    ReflectionUtils.setPrivateField(JavaSourceViewerConfiguration.class,"String_Node_Str",this,codeScanner);
  }
 catch (  CoreException e) {
    GroovyCore.logException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
public GroovyConfiguration(GroovyColorManager colorManager,IPreferenceStore preferenceStore,ITextEditor editor){
  super(colorManager,preferenceStore,editor,IJavaPartitions.JAVA_PARTITIONING);
  AbstractJavaScanner stringScanner=new SingleTokenJavaScanner(colorManager,preferenceStore,GROOVY_EDITOR_HIGHLIGHT_STRINGS_COLOR);
  ReflectionUtils.setPrivateField(JavaSourceViewerConfiguration.class,"String_Node_Str",this,stringScanner);
  try {
    IProject project=null;
    if (editor != null && editor instanceof GroovyEditor) {
      if (editor.getEditorInput() instanceof FileEditorInput) {
        project=((FileEditorInput)editor.getEditorInput()).getFile().getProject();
      }
    }
    HighlightingExtenderRegistry registry=GroovyPlugin.getDefault().getTextTools().getHighlightingExtenderRegistry();
    AbstractJavaScanner codeScanner=new GroovyTagScanner(colorManager,registry.getInitialAdditionalRulesForProject(project),registry.getAdditionalRulesForProject(project),registry.getExtraGroovyKeywordsForProject(project),registry.getExtraGJDKKeywordsForProject(project));
    ReflectionUtils.setPrivateField(JavaSourceViewerConfiguration.class,"String_Node_Str",this,codeScanner);
  }
 catch (  Exception e) {
    GroovyCore.logException("String_Node_Str",e);
  }
}
Program: 185620
Project: 185620
Buggy source:
private void installGroovySemanticHighlighting(){
  try {
    fSemanticManager.uninstall();
    semanticReconciler=new GroovySemanticReconciler();
    semanticReconciler.install(this,(JavaSourceViewer)this.getSourceViewer());
    ReflectionUtils.executePrivateMethod(CompilationUnitEditor.class,"String_Node_Str",new Class[]{IJavaReconcilingListener.class},this,new Object[]{semanticReconciler});
  }
 catch (  SecurityException e) {
    GroovyPlugin.getDefault().logError("String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void installGroovySemanticHighlighting(){
  try {
    fSemanticManager.uninstall();
    semanticReconciler=new GroovySemanticReconciler();
    semanticReconciler.install(this,(JavaSourceViewer)getSourceViewer());
    ReflectionUtils.executePrivateMethod(CompilationUnitEditor.class,"String_Node_Str",new Class[]{IJavaReconcilingListener.class},this,new Object[]{semanticReconciler});
  }
 catch (  Throwable t) {
    GroovyPlugin.getDefault().logError("String_Node_Str",t);
  }
}
Program: 185621
Project: 185621
Buggy source:
private void uninstallGroovySemanticHighlighting(){
  if (semanticHighlightingInstalled()) {
    try {
      semanticReconciler.uninstall();
      ReflectionUtils.executePrivateMethod(CompilationUnitEditor.class,"String_Node_Str",new Class[]{IJavaReconcilingListener.class},this,new Object[]{semanticReconciler});
      semanticReconciler=null;
    }
 catch (    SecurityException e) {
      GroovyPlugin.getDefault().logError("String_Node_Str",e);
    }
  }
}

Fixed version (ground truth):
private void uninstallGroovySemanticHighlighting(){
  if (semanticHighlightingInstalled()) {
    try {
      semanticReconciler.uninstall();
      ReflectionUtils.executePrivateMethod(CompilationUnitEditor.class,"String_Node_Str",new Class[]{IJavaReconcilingListener.class},this,new Object[]{semanticReconciler});
      semanticReconciler=null;
    }
 catch (    Throwable t) {
      GroovyPlugin.getDefault().logError("String_Node_Str",t);
    }
  }
}
Program: 185622
Project: 185622
Buggy source:
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  unsetJavaBreakpointUpdater();
  installGroovySemanticHighlighting();
  IPreferenceStore preferenceStore=getPreferenceStore();
  boolean closeBrackets=preferenceStore.getBoolean(CLOSE_BRACKETS);
  boolean closeStrings=preferenceStore.getBoolean(CLOSE_STRINGS);
  boolean closeBraces=preferenceStore.getBoolean(CLOSE_BRACES);
  boolean closeAngularBrackets=JavaCore.VERSION_1_5.compareTo(preferenceStore.getString(JavaCore.COMPILER_SOURCE)) <= 0;
  groovyBracketInserter.setCloseBracketsEnabled(closeBrackets);
  groovyBracketInserter.setCloseStringsEnabled(closeStrings);
  groovyBracketInserter.setCloseAngularBracketsEnabled(closeAngularBrackets);
  groovyBracketInserter.setCloseBracesEnabled(closeBraces);
  ISourceViewer sourceViewer=getSourceViewer();
  if (sourceViewer instanceof ITextViewerExtension) {
    ((ITextViewerExtension)sourceViewer).prependVerifyKeyListener(groovyBracketInserter);
  }
  disableBracketInserter();
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  super.createPartControl(parent);
  unsetJavaBreakpointUpdater();
  installGroovySemanticHighlighting();
  IPreferenceStore preferenceStore=getPreferenceStore();
  groovyBracketInserter.setCloseBracesEnabled(preferenceStore.getBoolean(CLOSE_BRACES));
  groovyBracketInserter.setCloseBracketsEnabled(preferenceStore.getBoolean(CLOSE_BRACKETS));
  groovyBracketInserter.setCloseStringsEnabled(preferenceStore.getBoolean(CLOSE_STRINGS));
  groovyBracketInserter.setCloseAngularBracketsEnabled(preferenceStore.getString(JavaCore.COMPILER_SOURCE).compareTo(JavaCore.VERSION_1_5) >= 0);
  ISourceViewer sourceViewer=getSourceViewer();
  if (sourceViewer instanceof ITextViewerExtension) {
    ((ITextViewerExtension)sourceViewer).prependVerifyKeyListener(groovyBracketInserter);
  }
  disableBracketInserter();
}
Program: 185623
Project: 185623
Buggy source:
/** 
 * Override this method so that we can get access to the newly initialized annotation model
 */
@Override protected void doSetInput(IEditorInput input) throws CoreException {
  try {
    internalInput=input;
    boolean wasInstalled=semanticHighlightingInstalled();
    if (wasInstalled) {
      uninstallGroovySemanticHighlighting();
    }
    super.doSetInput(input);
    unsetJavaBreakpointUpdater();
    if (wasInstalled) {
      installGroovySemanticHighlighting();
    }
  }
  finally {
    internalInput=null;
  }
}

Fixed version (ground truth):
@Override protected void doSetInput(IEditorInput input) throws CoreException {
  final boolean installed=semanticHighlightingInstalled();
  if (installed) {
    uninstallGroovySemanticHighlighting();
  }
  super.doSetInput(input);
  unsetJavaBreakpointUpdater();
  if (installed) {
    installGroovySemanticHighlighting();
  }
}
Program: 185624
Project: 185624
Buggy source:
/** 
 * Ensure that the Java breakpoint updater is removed because we need to use Groovy's breakpoint updater instead
 */
private void unsetJavaBreakpointUpdater(){
  try {
    ISourceViewer viewer=getSourceViewer();
    if (viewer != null) {
      IAnnotationModel model=viewer.getAnnotationModel();
      if (model instanceof AbstractMarkerAnnotationModel) {
        ReflectionUtils.executePrivateMethod(AbstractMarkerAnnotationModel.class,"String_Node_Str",new Class[]{},model,new Object[]{});
        @SuppressWarnings("String_Node_Str") List<IConfigurationElement> updaterSpecs=(List<IConfigurationElement>)ReflectionUtils.getPrivateField(AbstractMarkerAnnotationModel.class,"String_Node_Str",model);
        for (Iterator<IConfigurationElement> specIter=updaterSpecs.iterator(); specIter.hasNext(); ) {
          IConfigurationElement spec=specIter.next();
          if (spec.getAttribute("String_Node_Str").equals(BreakpointMarkerUpdater.class.getCanonicalName())) {
            specIter.remove();
            break;
          }
        }
      }
    }
  }
 catch (  Exception e) {
    GroovyPlugin.getDefault().logError("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * Ensures that the Java breakpoint updater is removed because we need to use Groovy's breakpoint updater instead.
 */
private void unsetJavaBreakpointUpdater(){
  try {
    ISourceViewer viewer=getSourceViewer();
    if (viewer != null) {
      IAnnotationModel model=viewer.getAnnotationModel();
      if (model instanceof AbstractMarkerAnnotationModel) {
        if (ReflectionUtils.getPrivateField(AbstractMarkerAnnotationModel.class,"String_Node_Str",model) == null) {
          ReflectionUtils.executeNoArgPrivateMethod(AbstractMarkerAnnotationModel.class,"String_Node_Str",model);
        }
        @SuppressWarnings("String_Node_Str") List<IConfigurationElement> updaterSpecs=(List<IConfigurationElement>)ReflectionUtils.getPrivateField(AbstractMarkerAnnotationModel.class,"String_Node_Str",model);
        for (Iterator<IConfigurationElement> specIter=updaterSpecs.iterator(); specIter.hasNext(); ) {
          IConfigurationElement spec=specIter.next();
          if (spec.getAttribute("String_Node_Str").equals(BreakpointMarkerUpdater.class.getCanonicalName())) {
            specIter.remove();
            break;
          }
        }
      }
    }
  }
 catch (  Throwable t) {
    GroovyPlugin.getDefault().logError("String_Node_Str",t);
  }
}
Program: 185625
Project: 185625
Buggy source:
@Override public void visitConstructorCallExpression(ConstructorCallExpression node){
  boolean shouldContinue=handleSimpleExpression(node);
  if (shouldContinue) {
    visitClassReference(node.getType());
    if (node.getArguments() instanceof TupleExpression && ((TupleExpression)node.getArguments()).getExpressions().size() == 1) {
      Expression arg=((TupleExpression)node.getArguments()).getExpressions().get(0);
      if (arg instanceof MapExpression) {
        enclosingConstructorCall=node;
      }
    }
    super.visitConstructorCallExpression(node);
  }
}

Fixed version (ground truth):
@Override public void visitConstructorCallExpression(ConstructorCallExpression node){
  boolean shouldContinue=handleSimpleExpression(node);
  if (shouldContinue) {
    visitClassReference(node.getType());
    if (node.getArguments() instanceof TupleExpression) {
      TupleExpression tuple=(TupleExpression)node.getArguments();
      if (isNotEmpty(tuple.getExpressions())) {
        if ((tuple.getExpressions().size() == 1 && tuple.getExpressions().get(0) instanceof MapExpression) || tuple.getExpression(tuple.getExpressions().size() - 1) instanceof NamedArgumentListExpression) {
          enclosingConstructorCall=node;
        }
      }
    }
    super.visitConstructorCallExpression(node);
  }
}
Program: 185626
Project: 185626
Buggy source:
/** 
 * <ul> <li> argument list (named or positional) <li> chained assignment, as in:   {@code a = b = 1}<li> multi-assignment, as in:   {@code def (a, b) = [1, 2]}</ul>
 */
@Override public void visitTupleExpression(TupleExpression node){
  boolean shouldContinue=handleSimpleExpression(node);
  if (shouldContinue && isNotEmpty(node.getExpressions())) {
    if (node instanceof ArgumentListExpression || node.getExpression(0) instanceof NamedArgumentListExpression) {
      super.visitTupleExpression(node);
    }
  }
}

Fixed version (ground truth):
/** 
 * <ul> <li> argument list (named or positional) <li> chained assignment, as in:   {@code a = b = 1}<li> multi-assignment, as in:   {@code def (a, b) = [1, 2]}</ul>
 */
@Override public void visitTupleExpression(TupleExpression node){
  boolean shouldContinue=handleSimpleExpression(node);
  if (shouldContinue && isNotEmpty(node.getExpressions())) {
    if (node instanceof ArgumentListExpression || node.getExpression(node.getExpressions().size() - 1) instanceof NamedArgumentListExpression) {
      super.visitTupleExpression(node);
    }
  }
}
Program: 185627
Project: 185627
Buggy source:
private ClassNode configureClass(BinaryTypeBinding type){
  if (type.id == TypeIds.T_JavaLangObject) {
    return ClassHelper.OBJECT_TYPE;
  }
 else   if (type.id == TypeIds.T_JavaLangString) {
    return ClassHelper.STRING_TYPE;
  }
 else   if (type.id == TypeIds.T_JavaLangClass) {
    return ClassHelper.CLASS_Type;
  }
  JDTClassNode jcn=new JDTClassNode(type,resolver);
  return jcn;
}

Fixed version (ground truth):
private ClassNode configureClass(BinaryTypeBinding type){
  if (type.id == TypeIds.T_JavaLangObject) {
    return ClassHelper.OBJECT_TYPE;
  }
 else   if (type.id == TypeIds.T_JavaLangString) {
    return ClassHelper.STRING_TYPE;
  }
  return new JDTClassNode(type,resolver);
}
Program: 185628
Project: 185628
Buggy source:
private ClassNode configureSourceType(SourceTypeBinding type){
  JDTClassNode jcn=new JDTClassNode(type,resolver);
  return jcn;
}

Fixed version (ground truth):
private ClassNode configureSourceType(SourceTypeBinding type){
  return new JDTClassNode(type,resolver);
}
Program: 185630
Project: 185630
Buggy source:
/** 
 * Splits the given expression into two parts: the type evaluation part, and the code completion part.
 * @param expression The expression returned by the {@link #findForCompletions(ISourceBuffer,int)} method.
 * @return A string pair, the expression to complete, and the prefix to becompleted.<br> { "", null } if no completion expression could be found String[0] is an expression .<br> String[1] is the empty string if the last character is a '.'.<br> String[1] is 'ident' if the expression ends with '.ident'.<br> String[1] is null if the expression itself is to be used for completion. Also, remove starting '$'. These only occur when inside GStrings, and should not be completed against.
 */
public String[] splitForCompletion(String expression){
  String[] split=splitForCompletionNoTrim(expression);
  if (split[0] != null) {
    split[0]=split[0].trim();
    if (split[0].startsWith("String_Node_Str")) {
      split[0]=split[0].substring(1);
    }
  }
  if (split[1] != null) {
    split[1]=split[1].trim();
    if (split[1].startsWith("String_Node_Str")) {
      split[1]=split[1].substring(1);
    }
  }
  return split;
}

Fixed version (ground truth):
/** 
 * Splits the given expression into two parts: the type evaluation part, and the code completion part.
 * @param expression returned by the {@link #findForCompletions(ISourceBuffer,int)} method
 * @return A string pair, the expression to complete, and the prefix to becompleted.<br> { "", null } if no completion expression could be found String[0] is an expression .<br> String[1] is the empty string if the last character is a '.'.<br> String[1] is 'ident' if the expression ends with '.ident'.<br> String[1] is null if the expression itself is to be used for completion. Also, remove starting '$'. These only occur when inside GStrings, and should not be completed against.
 */
public String[] splitForCompletion(String expression){
  String[] split=splitForCompletionNoTrim(expression);
  if (split[0] != null) {
    split[0]=split[0].trim();
    if (split[0].startsWith("String_Node_Str")) {
      split[0]=split[0].substring(1);
    }
  }
  if (split[1] != null) {
    split[1]=split[1].trim();
    if (split[1].startsWith("String_Node_Str")) {
      split[1]=split[1].substring(1);
    }
  }
  return split;
}
Program: 185631
Project: 185631
Buggy source:
public NameAndLocation findPreviousTypeNameToken(ISourceBuffer buffer,int start){
  int current=start;
  current--;
  while (current >= 0 && !Character.isWhitespace(buffer.charAt(current)) && Character.isJavaIdentifierPart(buffer.charAt(current))) {
    current--;
  }
  if (current < 0 || !Character.isWhitespace(buffer.charAt(current))) {
    return null;
  }
  StringBuilder sb=new StringBuilder();
  while (current >= 0 && (Character.isWhitespace(buffer.charAt(current)) || buffer.charAt(current) == '[' || buffer.charAt(current) == ']') && buffer.charAt(current) != '\n' && buffer.charAt(current) != '\r') {
    sb.append(buffer.charAt(current--));
  }
  if (current < 0 || !Character.isJavaIdentifierPart(buffer.charAt(current))) {
    return null;
  }
  while (current >= 0 && Character.isJavaIdentifierPart(buffer.charAt(current))) {
    sb.append(buffer.charAt(current--));
  }
  if (sb.length() > 0) {
    return new NameAndLocation(sb.reverse().toString(),current + 1);
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
public NameAndLocation findPreviousTypeNameToken(ISourceBuffer buffer,int start){
  int current=Math.min(start,buffer.length()) - 1;
  while (current >= 0 && !Character.isWhitespace(buffer.charAt(current)) && Character.isJavaIdentifierPart(buffer.charAt(current))) {
    current-=1;
  }
  if (current < 0 || !Character.isWhitespace(buffer.charAt(current))) {
    return null;
  }
  StringBuilder sb=new StringBuilder();
  while (current >= 0 && (Character.isWhitespace(buffer.charAt(current)) || buffer.charAt(current) == '[' || buffer.charAt(current) == ']') && buffer.charAt(current) != '\n' && buffer.charAt(current) != '\r') {
    sb.append(buffer.charAt(current--));
  }
  if (current < 0 || !Character.isJavaIdentifierPart(buffer.charAt(current))) {
    return null;
  }
  while (current >= 0 && Character.isJavaIdentifierPart(buffer.charAt(current))) {
    sb.append(buffer.charAt(current--));
  }
  if (sb.length() > 0) {
    return new NameAndLocation(sb.reverse().toString(),current + 1);
  }
 else {
    return null;
  }
}
Program: 185632
Project: 185632
Buggy source:
/** 
 * Finds the end of the String token that exists at initialOffset. searches the document for the next non-word character and returns that as the end
 * @param buffer the document to search
 * @param initialOffset the initial offset
 * @return the offset of the first non-word character starting atinitialOffset
 */
public int findTokenEnd(ISourceBuffer buffer,int initialOffset){
  int candidate=initialOffset;
  while (buffer.length() > candidate) {
    if (!Character.isJavaIdentifierPart(buffer.charAt(candidate))) {
      break;
    }
    candidate+=1;
  }
  return candidate;
}

Fixed version (ground truth):
/** 
 * Finds the end of the String token that exists at initialOffset. searches the document for the next non-word character and returns that as the end
 * @param buffer the document to search
 * @param initialOffset the initial offset
 * @return the offset of the first non-word character starting at initialOffset
 */
public int findTokenEnd(ISourceBuffer buffer,int initialOffset){
  int candidate=initialOffset;
  while (buffer.length() > candidate) {
    if (!Character.isJavaIdentifierPart(buffer.charAt(candidate))) {
      break;
    }
    candidate+=1;
  }
  return candidate;
}
Program: 185633
Project: 185633
Buggy source:
public void addModule(ModuleNode node){
  if (node == null)   return;
  modules.add(node);
  this.sortedModules=null;
  node.setUnit(this);
  addClasses(node.getClasses());
}

Fixed version (ground truth):
public void addModule(ModuleNode node){
  if (node == null)   return;
  modules.add(node);
  node.setUnit(this);
  addClasses(node.getClasses());
}
Program: 185634
Project: 185634
Buggy source:
/** 
 * Adds a class to the unit.
 */
public void addClass(ClassNode node){
  node=node.redirect();
  String name=node.getName();
  ClassNode stored=classes.get(name);
  if (stored != null && stored != node) {
    SourceUnit nodeSource=node.getModule().getContext();
    SourceUnit storedSource=stored.getModule().getContext();
    String txt="String_Node_Str" + node.getName() + "String_Node_Str";
    if (nodeSource == storedSource) {
      txt+="String_Node_Str" + nodeSource.getName() + "String_Node_Str"+ node.getName()+ "String_Node_Str";
      if (node.isScriptBody() || stored.isScriptBody()) {
        txt+="String_Node_Str" + "String_Node_Str";
      }
    }
 else {
      txt+="String_Node_Str" + nodeSource.getName() + "String_Node_Str"+ storedSource.getName()+ "String_Node_Str"+ node.getName()+ "String_Node_Str";
    }
    nodeSource.getErrorCollector().addErrorAndContinue(new SyntaxErrorMessage(new SyntaxException(txt,node.getLineNumber(),node.getColumnNumber(),node.getLastLineNumber(),node.getLastColumnNumber()),nodeSource));
  }
  classes.put(name,node);
  if (classesToCompile.containsKey(name)) {
    ClassNode cn=classesToCompile.get(name);
    cn.setRedirect(node);
    classesToCompile.remove(name);
  }
}

Fixed version (ground truth):
/** 
 * Adds a class to the unit.
 */
public void addClass(ClassNode node){
  node=node.redirect();
  String name=node.getName();
  ClassNode stored=classes.get(name);
  if (stored != null && stored != node) {
    SourceUnit nodeSource=node.getModule().getContext();
    SourceUnit storedSource=stored.getModule().getContext();
    String txt="String_Node_Str" + node.getName() + "String_Node_Str";
    if (nodeSource == storedSource) {
      txt+="String_Node_Str" + nodeSource.getName() + "String_Node_Str"+ node.getName()+ "String_Node_Str";
      if (node.isScriptBody() || stored.isScriptBody()) {
        txt+="String_Node_Str" + "String_Node_Str";
      }
    }
 else {
      txt+="String_Node_Str" + nodeSource.getName() + "String_Node_Str"+ storedSource.getName()+ "String_Node_Str"+ node.getName()+ "String_Node_Str";
    }
    nodeSource.getErrorCollector().addErrorAndContinue(new SyntaxErrorMessage(new SyntaxException(txt,node.getLineNumber(),node.getColumnNumber(),node.getLastLineNumber(),node.getLastColumnNumber()),nodeSource));
  }
  classes.put(name,node);
  sortedClasses=null;
  if (classesToCompile.containsKey(name)) {
    ClassNode cn=classesToCompile.get(name);
    cn.setRedirect(node);
    classesToCompile.remove(name);
  }
}
Program: 185635
Project: 185635
Buggy source:
public void testClosure4(){
  String contents="String_Node_Str";
  assertType(contents,4,6,"String_Node_Str");
}

Fixed version (ground truth):
public void testClosure4(){
  String contents="String_Node_Str";
  assertType(contents,4,6,GroovyUtils.GROOVY_LEVEL > 23 ? "String_Node_Str" : "String_Node_Str");
}
Program: 185636
Project: 185636
Buggy source:
public void testClassReference3(){
  String contents="String_Node_Str";
  int start=contents.indexOf("String_Node_Str");
  int end=start + "String_Node_Str".length();
  assertType(contents,start,end,"String_Node_Str");
}

Fixed version (ground truth):
public void testClassReference3(){
  String contents="String_Node_Str";
  int start=contents.indexOf("String_Node_Str");
  int end=start + "String_Node_Str".length();
  assertType(contents,start,end,GroovyUtils.GROOVY_LEVEL > 23 ? "String_Node_Str" : "String_Node_Str");
}
Program: 185637
Project: 185637
Buggy source:
public boolean isSourceFile(String fileName,boolean isInterestingProject){
  if (isInterestingProject) {
    return Util.isJavaLikeFileName(fileName);
  }
 else {
    return ContentTypeUtils.isJavaLikeButNotGroovyLikeExtension(fileName);
  }
}

Fixed version (ground truth):
public boolean isSourceFile(String fileName,boolean isInterestingProject){
  if (isInterestingProject) {
    return Util.isJavaLikeFileName(fileName);
  }
 else {
    return ContentTypeUtils.isJavaLikeButNotGroovyLikeFileName(fileName);
  }
}
Program: 185638
Project: 185638
Buggy source:
private static boolean isGroovyLikeSourceUnit(ICompilationUnit sourceUnit){
  if (sourceUnit.getFileName() == null || !isJavaLikeButNotGroovyLikeExtension(String.valueOf(sourceUnit.getFileName()))) {
    if (GROOVY_SOURCE_DISCRIMINATOR.matcher(new CharArraySequence(sourceUnit.getContents())).find()) {
      Util.log(1,"String_Node_Str" + String.valueOf(sourceUnit.getContents(),0,Math.min(250,sourceUnit.getContents().length)));
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean isGroovyLikeSourceUnit(ICompilationUnit sourceUnit){
  if (sourceUnit.getFileName() == null || !isJavaLikeButNotGroovyLikeFileName(String.valueOf(sourceUnit.getFileName()))) {
    if (GROOVY_SOURCE_DISCRIMINATOR.matcher(new CharArraySequence(sourceUnit.getContents())).find()) {
      Util.log(1,"String_Node_Str" + String.valueOf(sourceUnit.getContents(),0,Math.min(250,sourceUnit.getContents().length)));
      return true;
    }
  }
  return false;
}
Program: 185639
Project: 185639
Buggy source:
private static ImageDescriptor createDescriptor2(String path){
  ImageDescriptor desc;
  try {
    desc=ImageDescriptor.createFromURL(new java.net.URL(path));
    org.eclipse.swt.graphics.Image img=desc.createImage(false);
    if (img != null) {
      img.dispose();
    }
 else {
      desc=null;
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    desc=null;
  }
  return desc;
}

Fixed version (ground truth):
private static ImageDescriptor createDescriptor2(String path){
  try {
    java.net.URL url=new java.net.URL(path);
    url.openConnection();
    return ImageDescriptor.createFromURL(url);
  }
 catch (  Exception e) {
    return null;
  }
}
Program: 185640
Project: 185640
Buggy source:
public void testInvalidScripts_GRE323_2(){
  if (GroovyUtils.GROOVY_LEVEL < 18) {
    runNegativeTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
 else {
    runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
  }
}

Fixed version (ground truth):
public void testInvalidScripts_GRE323_2(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"});
}
Program: 185641
Project: 185641
Buggy source:
public void testInvalidScripts_GRE323_6(){
  if (GroovyUtils.GROOVY_LEVEL < 18) {
    runNegativeTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  }
 else {
    runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
  }
}

Fixed version (ground truth):
public void testInvalidScripts_GRE323_6(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}
Program: 185642
Project: 185642
Buggy source:
public void testEnumPositions_GRE1072(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
  GroovyCompilationUnitDeclaration decl=getCUDeclFor("String_Node_Str");
  FieldDeclaration fDecl=null;
  fDecl=grabField(decl,"String_Node_Str");
  if (GroovyUtils.GROOVY_LEVEL < 18) {
    assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  }
 else {
    assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  }
  fDecl=grabField(decl,"String_Node_Str");
  if (GroovyUtils.GROOVY_LEVEL < 18) {
    assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  }
 else {
    assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  }
  fDecl=grabField(decl,"String_Node_Str");
  if (GroovyUtils.GROOVY_LEVEL < 18) {
    assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  }
 else {
    assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  }
}

Fixed version (ground truth):
public void testEnumPositions_GRE1072(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"});
  GroovyCompilationUnitDeclaration decl=getCUDeclFor("String_Node_Str");
  FieldDeclaration fDecl=grabField(decl,"String_Node_Str");
  assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  fDecl=grabField(decl,"String_Node_Str");
  assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
  fDecl=grabField(decl,"String_Node_Str");
  assertEquals("String_Node_Str",stringifyFieldDecl(fDecl));
}
Program: 185648
Project: 185648
Buggy source:
/** 
 * Try to get the source locations for field declarations to be as correct as possible
 */
private void fixupSourceLocationsForFieldDeclaration(FieldDeclaration fieldDeclaration,FieldNode fieldNode,boolean isEnumField){
  fieldDeclaration.sourceStart=fieldNode.getNameStart();
  fieldDeclaration.sourceEnd=fieldNode.getNameEnd();
  int line=fieldNode.getLineNumber();
  Javadoc doc=findJavadoc(line);
  fieldDeclaration.javadoc=doc;
  if (isEnumField) {
    fieldDeclaration.declarationSourceStart=doc == null ? fieldNode.getNameStart() : doc.sourceStart;
    fieldDeclaration.declarationSourceEnd=fieldNode.getNameEnd() - 1;
  }
 else {
    fieldDeclaration.declarationSourceStart=doc == null ? fieldNode.getStart() : doc.sourceStart;
    fieldDeclaration.declarationSourceEnd=fieldNode.getEnd() - 1;
  }
  fieldDeclaration.modifiersSourceStart=fieldNode.getStart();
  fieldDeclaration.declarationEnd=fieldNode.getEnd();
  fieldDeclaration.endPart1Position=fieldNode.getNameStart();
  fieldDeclaration.endPart2Position=fieldNode.getEnd() - 1;
}

Fixed version (ground truth):
/** 
 * Try to get the source locations for field declarations to be as correct as possible
 */
private void fixupSourceLocationsForFieldDeclaration(FieldDeclaration fieldDeclaration,FieldNode fieldNode,boolean isEnumField){
  fieldDeclaration.sourceStart=fieldNode.getNameStart();
  fieldDeclaration.sourceEnd=fieldNode.getNameEnd();
  int line=fieldNode.getLineNumber();
  Javadoc doc=findJavadoc(line);
  fieldDeclaration.javadoc=doc;
  if (isEnumField) {
    fieldDeclaration.declarationSourceStart=doc == null ? fieldNode.getStart() : doc.sourceStart;
    fieldDeclaration.declarationSourceEnd=fieldNode.getEnd() - 1;
  }
 else {
    fieldDeclaration.declarationSourceStart=doc == null ? fieldNode.getStart() : doc.sourceStart;
    fieldDeclaration.declarationSourceEnd=fieldNode.getEnd() - 1;
  }
  fieldDeclaration.modifiersSourceStart=fieldNode.getStart();
  fieldDeclaration.declarationEnd=fieldNode.getEnd();
  fieldDeclaration.endPart1Position=fieldNode.getNameStart();
  fieldDeclaration.endPart2Position=fieldNode.getEnd() - 1;
}
Program: 185649
Project: 185649
Buggy source:
/** 
 * Returns an indentation service that uses the right preferences for a given IJavaProject. The same object will be returned if the javaProject is the same as the one from the last request, but a new instance will be created if the project has changed.
 */
public static synchronized GroovyIndentationService get(IJavaProject project){
  if (lastIndenter != null && !project.equals(lastIndenter.project)) {
    disposeLastImpl();
  }
  if (lastIndenter == null) {
    lastIndenter=new GroovyIndentationService(project);
  }
  return lastIndenter;
}

Fixed version (ground truth):
/** 
 * Returns an indentation service that uses the right preferences for a given IJavaProject. The same object will be returned if the javaProject is the same as the one from the last request, but a new instance will be created if the project has changed.
 */
public static synchronized GroovyIndentationService get(IJavaProject project){
  if (lastIndenter != null && project != null && !project.equals(lastIndenter.project)) {
    disposeLastImpl();
  }
  if (lastIndenter == null) {
    lastIndenter=new GroovyIndentationService(project);
  }
  return lastIndenter;
}
Program: 185650
Project: 185650
Buggy source:
public void testImportsBigInteger3(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}

Fixed version (ground truth):
public void testImportsBigInteger3(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}
Program: 185651
Project: 185651
Buggy source:
public void testImportsBigInteger1(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}

Fixed version (ground truth):
public void testImportsBigInteger1(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}
Program: 185652
Project: 185652
Buggy source:
public void testImportsBigDecimal1(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}

Fixed version (ground truth):
public void testImportsBigDecimal1(){
  runConformTest(new String[]{"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"},"String_Node_Str");
}
Program: 185653
Project: 185653
Buggy source:
private ReferenceBinding createTypeRef(char[][] compoundName){
  try {
    if (getTypeFromCompoundName == null) {
      getTypeFromCompoundName=LookupEnvironment.class.getDeclaredMethod("String_Node_Str",char[][].class,boolean.class,boolean.class);
      getTypeFromCompoundName.setAccessible(true);
    }
    return (ReferenceBinding)getTypeFromCompoundName.invoke(environment,new Object[]{compoundName,Boolean.FALSE,Boolean.FALSE});
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private ReferenceBinding createTypeRef(char[][] compoundName){
  return environment.getType(compoundName);
}