nus-yam/ex-repair huggingface dataset:
Program: 185926
Project: 185926
Buggy source:
public void testDoubleAttributeWithBigDecimalValue(){
  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","String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"};
  runNegativeTest(sources,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (GroovyUtils.isAtLeastGroovy(20) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testDoubleAttributeWithBigDecimalValue(){
  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","String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"};
  runNegativeTest(sources,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (GroovyUtils.isAtLeastGroovy(20) ? "String_Node_Str" : "String_Node_Str") + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 185927
Project: 185927
Buggy source:
public void testJava7(){
  if (isEclipse36() || complianceLevel < ClassFileConstants.JDK1_7)   return;
  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"+ "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):
public void testJava7(){
  if (complianceLevel < ClassFileConstants.JDK1_7)   return;
  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"+ "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: 185928
Project: 185928
Buggy source:
public void testHalfFinishedGenericsProgramWithMultipleSuppressionValues(){
  String[] sources={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"};
  runNegativeTest(sources,"String_Node_Str");
}

Fixed version (ground truth):
public void testHalfFinishedGenericsProgramWithMultipleSuppressionValues(){
  String[] sources={"String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"};
  Version v=Platform.getBundle("String_Node_Str").getVersion();
  runNegativeTest(sources,(v.getMajor() == 3 && v.getMinor() < 13) ? "String_Node_Str" : "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 185929
Project: 185929
Buggy source:
public void testJava7_3(){
  if (isEclipse36() || complianceLevel >= ClassFileConstants.JDK1_7)   return;
  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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str","String_Node_Str"};
  runNegativeTest(sources,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testJava7_3(){
  if (complianceLevel >= ClassFileConstants.JDK1_7)   return;
  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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str","String_Node_Str"};
  runNegativeTest(sources,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 185930
Project: 185930
Buggy source:
public void testJava7_2(){
  if (isEclipse36() || complianceLevel >= ClassFileConstants.JDK1_7)   return;
  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"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str","String_Node_Str"};
  runNegativeTest(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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testJava7_2(){
  if (complianceLevel >= ClassFileConstants.JDK1_7)   return;
  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"+ "String_Node_Str"+ "String_Node_Str","String_Node_Str","String_Node_Str"};
  runNegativeTest(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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 185932
Project: 185932
Buggy source:
public void contentTypeChanged(ContentTypeChangeEvent event){
  GROOVY_LIKE_EXTENSIONS=null;
  JAVA_LIKE_BUT_NOT_GROOVY_LIKE_EXTENSIONS=null;
}

Fixed version (ground truth):
public void contentTypeChanged(ContentTypeChangeEvent event){
  GROOVY_FILE_NAMES=null;
  GROOVY_LIKE_EXTENSIONS=null;
  JAVA_LIKE_BUT_NOT_GROOVY_LIKE_EXTENSIONS=null;
}
Program: 185933
Project: 185933
Buggy source:
/** 
 * Returns the registered Java like extensions. Taken from org.eclipse.jdt.internal.core.util.Util.getJavaLikeExtensions
 */
public static char[][] getGroovyLikeExtensions(){
  if (GROOVY_LIKE_EXTENSIONS == null) {
    IContentTypeManager contentTypeManager=Platform.getContentTypeManager();
    if (contentTypeManager == null) {
      GROOVY_LIKE_EXTENSIONS=new char[][]{"String_Node_Str".toCharArray()};
      return GROOVY_LIKE_EXTENSIONS;
    }
    IContentType groovyContentType=contentTypeManager.getContentType(GROOVY_SOURCE_CONTENT_TYPE);
    HashSet<String> fileExtensions=new HashSet<String>();
    IContentType[] contentTypes=contentTypeManager.getAllContentTypes();
    for (int i=0, length=contentTypes.length; i < length; i++) {
      if (contentTypes[i].isKindOf(groovyContentType)) {
        String[] fileExtension=contentTypes[i].getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
        for (int j=0, length2=fileExtension.length; j < length2; j++) {
          fileExtensions.add(fileExtension[j]);
        }
      }
    }
    int length=fileExtensions.size();
    if (length == 0) {
      if (!noGroovyContentTypesErrorLogged) {
        noGroovyContentTypesErrorLogged=true;
        Util.log(new IllegalStateException("String_Node_Str"));
      }
      return new char[][]{"String_Node_Str".toCharArray()};
    }
 else {
      char[][] extensions=new char[length][];
      extensions[0]="String_Node_Str".toCharArray();
      int index=1;
      Iterator<String> iterator=fileExtensions.iterator();
      while (iterator.hasNext()) {
        String fileExtension=iterator.next();
        if ("String_Node_Str".equals(fileExtension))         continue;
        extensions[index++]=fileExtension.toCharArray();
      }
      GROOVY_LIKE_EXTENSIONS=extensions;
    }
  }
  return GROOVY_LIKE_EXTENSIONS;
}

Fixed version (ground truth):
/** 
 * Returns the registered Java like extensions. Taken from org.eclipse.jdt.internal.core.util.Util.getJavaLikeExtensions
 */
public static char[][] getGroovyLikeExtensions(){
  if (GROOVY_LIKE_EXTENSIONS == null) {
    Set<String> fileExtensions=loadGroovyFileExtensions();
    if (fileExtensions.isEmpty()) {
      if (!noGroovyContentTypesErrorLogged) {
        noGroovyContentTypesErrorLogged=true;
        Util.log(new IllegalStateException("String_Node_Str"));
      }
      return new char[][]{"String_Node_Str".toCharArray()};
    }
 else {
      int length=fileExtensions.size();
      char[][] extensions=new char[length][];
      extensions[0]="String_Node_Str".toCharArray();
      int index=1;
      for (      String fileExtension : fileExtensions) {
        if ("String_Node_Str".equals(fileExtension))         continue;
        extensions[index++]=fileExtension.toCharArray();
      }
      GROOVY_LIKE_EXTENSIONS=extensions;
    }
  }
  return GROOVY_LIKE_EXTENSIONS;
}
Program: 185934
Project: 185934
Buggy source:
public static int indexOfGroovyLikeExtension(String fileName){
  int fileNameLength=fileName.length();
  char[][] groovyLikeExtensions=getGroovyLikeExtensions();
  extensions:   for (int i=0, length=groovyLikeExtensions.length; i < length; i++) {
    char[] extension=groovyLikeExtensions[i];
    int extensionLength=extension.length;
    int extensionStart=fileNameLength - extensionLength;
    int dotIndex=extensionStart - 1;
    if (dotIndex < 0)     continue;
    if (fileName.charAt(dotIndex) != '.')     continue;
    for (int j=0; j < extensionLength; j++) {
      if (fileName.charAt(extensionStart + j) != extension[j])       continue extensions;
    }
    return dotIndex;
  }
  return -1;
}

Fixed version (ground truth):
/** 
 * Returns the index of the Groovy like extension of the given file name or -1 if it doesn't end with a known Java like extension. Note this is the index of the '.' even if it is not considered part of the extension. Adapted from  {@link org.eclipse.jdt.internal.core.util.Util#indexOfJavaLikeExtension}.
 */
public static int indexOfGroovyLikeExtension(String fileName){
  if (fileName != null) {
    int fileNameLength=fileName.length();
    if (fileNameLength > 0) {
      for (      char[] extension : getGroovyLikeExtensions()) {
        int offset=(fileNameLength - extension.length);
        if (offset < 1 || fileName.charAt(offset - 1) != '.')         continue;
        if (Arrays.equals(extension,fileName.substring(offset).toCharArray()))         return (offset - 1);
      }
    }
  }
  return -1;
}
Program: 185935
Project: 185935
Buggy source:
/** 
 * Uses the Eclipse content type extension point to determine if a file is a groovy file. Taken from org.eclipse.jdt.internal.core.util.Util.isJavaLikeExtension
 * @param file name (absolute path or simple name is fine)
 * @return true iff the file name is Groovy-like.
 */
public final static boolean isGroovyLikeFileName(char[] fileName){
  if (fileName == null)   return false;
  int fileNameLength=fileName.length;
  char[][] javaLikeExtensions=getGroovyLikeExtensions();
  extensions:   for (int i=0, length=javaLikeExtensions.length; i < length; i++) {
    char[] extension=javaLikeExtensions[i];
    int extensionLength=extension.length;
    int extensionStart=fileNameLength - extensionLength;
    if (extensionStart - 1 < 0)     continue;
    if (fileName[extensionStart - 1] != '.')     continue;
    for (int j=0; j < extensionLength; j++) {
      if (fileName[extensionStart + j] != extension[j])       continue extensions;
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Uses the Eclipse content type extension point to determine if a file is a groovy file.
 * @param fileName (absolute path or simple name is fine)
 * @return {@code true} iff the file name is Groovy-like
 */
public static boolean isGroovyLikeFileName(String fileName){
  if (fileName != null && fileName.length() > 0 && !fileName.endsWith("String_Node_Str")) {
    if (indexOfGroovyLikeExtension(fileName) != -1) {
      return true;
    }
    if (GROOVY_FILE_NAMES == null) {
      GROOVY_FILE_NAMES=loadGroovyFileNames();
    }
    fileName=fileName.substring(fileName.lastIndexOf('/') + 1);
    return GROOVY_FILE_NAMES.contains(fileName);
  }
  return false;
}
Program: 185937
Project: 185937
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185941
Project: 185941
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185945
Project: 185945
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185949
Project: 185949
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185953
Project: 185953
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185957
Project: 185957
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185961
Project: 185961
Buggy source:
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project.  If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Configure an options map (usually retrieved from a CompilerOptions object) based on the project. If anything goes wrong it will configure the options to just build java.
 */
public static void configureOptionsBasedOnNature(Map<String,String> optionMap,IJavaProject javaProject){
  IProject project=javaProject.getProject();
  try {
    if (isGroovyNaturedProject(project)) {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.ENABLED);
      setGroovyClasspath(optionMap,javaProject);
      if (isProbablyGrailsProject(project)) {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,Integer.toString(IsGrails));
      }
 else {
        optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
      }
    }
 else {
      optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
      optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
    }
  }
 catch (  CoreException e) {
    e.printStackTrace();
    optionMap.put(CompilerOptions.OPTIONG_BuildGroovyFiles,CompilerOptions.DISABLED);
    optionMap.put(CompilerOptions.OPTIONG_GroovyFlags,"String_Node_Str");
  }
}
Program: 185964
Project: 185964
Buggy source:
private void myRemoveOccurrenceAnnotations(){
  ReflectionUtils.executePrivateMethod(JavaEditor.class,"String_Node_Str",ReflectionUtils.NO_TYPES,this,ReflectionUtils.NO_ARGS);
}

Fixed version (ground truth):
private void myRemoveOccurrenceAnnotations(){
  ReflectionUtils.executePrivateMethod(JavaEditor.class,"String_Node_Str",new Class[]{},this,new Object[]{});
}
Program: 185965
Project: 185965
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",ReflectionUtils.NO_TYPES,model,ReflectionUtils.NO_ARGS);
        @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().logException("String_Node_Str",e);
  }
}

Fixed version (ground truth):
/** 
 * 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().logException("String_Node_Str",e);
  }
}
Program: 185966
Project: 185966
Buggy source:
/** 
 * Returns true if:<ul> <li>the given type is an existing class and the flag's <code>ACCEPT_CLASSES</code> bit is on <li>the given type is an existing interface and the <code>ACCEPT_INTERFACES</code> bit is on <li>neither the <code>ACCEPT_CLASSES</code> or <code>ACCEPT_INTERFACES</code> bit is on </ul> Otherwise, false is returned.
 */
protected boolean acceptType(IType type,int acceptFlags,boolean isSourceType){
  if (acceptFlags == 0 || acceptFlags == ACCEPT_ALL)   return true;
  if (kind == TypeDeclaration.CLASS_DECL && (acceptFlags & ACCEPT_CLASSES) == 0 && (acceptFlags & ACCEPT_ANNOTATIONS) != 0) {
    IAnnotation[] annos=type.getAnnotations();
    if (annos != null && annos.length > 0) {
      for (      IAnnotation anno : annos) {
        if (anno != null && "String_Node_Str".equals(anno.getElementName())) {
          kind=TypeDeclaration.ANNOTATION_TYPE_DECL;
          break;
        }
      }
    }
  }
  try {
    int kind=isSourceType ? TypeDeclaration.kind(((SourceTypeElementInfo)((SourceType)type).getElementInfo()).getModifiers()) : TypeDeclaration.kind(((IBinaryType)((BinaryType)type).getElementInfo()).getModifiers());
switch (kind) {
case TypeDeclaration.CLASS_DECL:
      return (acceptFlags & ACCEPT_CLASSES) != 0;
case TypeDeclaration.INTERFACE_DECL:
    return (acceptFlags & ACCEPT_INTERFACES) != 0;
case TypeDeclaration.ENUM_DECL:
  return (acceptFlags & ACCEPT_ENUMS) != 0;
default :
return (acceptFlags & ACCEPT_ANNOTATIONS) != 0;
}
}
 catch (JavaModelException npe) {
return false;
}
}

Fixed version (ground truth):
/** 
 * Returns true if:<ul> <li>the given type is an existing class and the flag's <code>ACCEPT_CLASSES</code> bit is on <li>the given type is an existing interface and the <code>ACCEPT_INTERFACES</code> bit is on <li>neither the <code>ACCEPT_CLASSES</code> or <code>ACCEPT_INTERFACES</code> bit is on </ul> Otherwise, false is returned.
 */
protected boolean acceptType(IType type,int acceptFlags,boolean isSourceType){
  if (acceptFlags == 0 || acceptFlags == ACCEPT_ALL)   return true;
  try {
    int kind=isSourceType ? TypeDeclaration.kind(((SourceTypeElementInfo)((SourceType)type).getElementInfo()).getModifiers()) : TypeDeclaration.kind(((IBinaryType)((BinaryType)type).getElementInfo()).getModifiers());
    if (kind == TypeDeclaration.CLASS_DECL && (acceptFlags & ACCEPT_CLASSES) == 0 && (acceptFlags & ACCEPT_ANNOTATIONS) != 0) {
      IAnnotation[] annos=type.getAnnotations();
      if (annos != null && annos.length > 0) {
        for (        IAnnotation anno : annos) {
          if (anno != null && "String_Node_Str".equals(anno.getElementName())) {
            kind=TypeDeclaration.ANNOTATION_TYPE_DECL;
            break;
          }
        }
      }
    }
switch (kind) {
case TypeDeclaration.CLASS_DECL:
      return (acceptFlags & ACCEPT_CLASSES) != 0;
case TypeDeclaration.INTERFACE_DECL:
    return (acceptFlags & ACCEPT_INTERFACES) != 0;
case TypeDeclaration.ENUM_DECL:
  return (acceptFlags & ACCEPT_ENUMS) != 0;
default :
return (acceptFlags & ACCEPT_ANNOTATIONS) != 0;
}
}
 catch (JavaModelException npe) {
return false;
}
}
Program: 185967
Project: 185967
Buggy source:
/** 
 * Returns true if:<ul> <li>the given type is an existing class and the flag's <code>ACCEPT_CLASSES</code> bit is on <li>the given type is an existing interface and the <code>ACCEPT_INTERFACES</code> bit is on <li>neither the <code>ACCEPT_CLASSES</code> or <code>ACCEPT_INTERFACES</code> bit is on </ul> Otherwise, false is returned.
 */
protected boolean acceptType(IType type,int acceptFlags,boolean isSourceType){
  if (acceptFlags == 0 || acceptFlags == ACCEPT_ALL)   return true;
  if (kind == TypeDeclaration.CLASS_DECL && (acceptFlags & ACCEPT_CLASSES) == 0 && (acceptFlags & ACCEPT_ANNOTATIONS) != 0) {
    IAnnotation[] annos=type.getAnnotations();
    if (annos != null && annos.length > 0) {
      for (      IAnnotation anno : annos) {
        if (anno != null && "String_Node_Str".equals(anno.getElementName())) {
          kind=TypeDeclaration.ANNOTATION_TYPE_DECL;
          break;
        }
      }
    }
  }
  try {
    int kind=isSourceType ? TypeDeclaration.kind(((SourceTypeElementInfo)((SourceType)type).getElementInfo()).getModifiers()) : TypeDeclaration.kind(((IBinaryType)((BinaryType)type).getElementInfo()).getModifiers());
switch (kind) {
case TypeDeclaration.CLASS_DECL:
      return (acceptFlags & ACCEPT_CLASSES) != 0;
case TypeDeclaration.INTERFACE_DECL:
    return (acceptFlags & ACCEPT_INTERFACES) != 0;
case TypeDeclaration.ENUM_DECL:
  return (acceptFlags & ACCEPT_ENUMS) != 0;
default :
return (acceptFlags & ACCEPT_ANNOTATIONS) != 0;
}
}
 catch (JavaModelException npe) {
return false;
}
}

Fixed version (ground truth):
/** 
 * Returns true if:<ul> <li>the given type is an existing class and the flag's <code>ACCEPT_CLASSES</code> bit is on <li>the given type is an existing interface and the <code>ACCEPT_INTERFACES</code> bit is on <li>neither the <code>ACCEPT_CLASSES</code> or <code>ACCEPT_INTERFACES</code> bit is on </ul> Otherwise, false is returned.
 */
protected boolean acceptType(IType type,int acceptFlags,boolean isSourceType){
  if (acceptFlags == 0 || acceptFlags == ACCEPT_ALL)   return true;
  try {
    int kind=isSourceType ? TypeDeclaration.kind(((SourceTypeElementInfo)((SourceType)type).getElementInfo()).getModifiers()) : TypeDeclaration.kind(((IBinaryType)((BinaryType)type).getElementInfo()).getModifiers());
    if (kind == TypeDeclaration.CLASS_DECL && (acceptFlags & ACCEPT_CLASSES) == 0 && (acceptFlags & ACCEPT_ANNOTATIONS) != 0) {
      IAnnotation[] annos=type.getAnnotations();
      if (annos != null && annos.length > 0) {
        for (        IAnnotation anno : annos) {
          if (anno != null && "String_Node_Str".equals(anno.getElementName())) {
            kind=TypeDeclaration.ANNOTATION_TYPE_DECL;
            break;
          }
        }
      }
    }
switch (kind) {
case TypeDeclaration.CLASS_DECL:
      return (acceptFlags & ACCEPT_CLASSES) != 0;
case TypeDeclaration.INTERFACE_DECL:
    return (acceptFlags & ACCEPT_INTERFACES) != 0;
case TypeDeclaration.ENUM_DECL:
  return (acceptFlags & ACCEPT_ENUMS) != 0;
default :
return (acceptFlags & ACCEPT_ANNOTATIONS) != 0;
}
}
 catch (JavaModelException npe) {
return false;
}
}
Program: 185969
Project: 185969
Buggy source:
public void testBadCodeCategory_STS3822(){
  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"};
  runNegativeTest(sources,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (GroovyUtils.isAtLeastGroovy(20) ? "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"+ (GroovyUtils.isAtLeastGroovy(20) ? "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"+ (GroovyUtils.isAtLeastGroovy(20) ? "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");
}

Fixed version (ground truth):
public void testBadCodeCategory_STS3822(){
  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"};
  runNegativeTest(sources,"String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str" + (GroovyUtils.isAtLeastGroovy(20) ? "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"+ (GroovyUtils.isAtLeastGroovy(20) ? "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"+ (GroovyUtils.isAtLeastGroovy(20) ? "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"+ (!GroovyUtils.isAtLeastGroovy(20) ? "String_Node_Str" : "String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"));
}
Program: 185970
Project: 185970
Buggy source:
protected void visitAnnotations(AnnotatedNode node,int target){
  if (node.getAnnotations().isEmpty()) {
    return;
  }
  this.currentClass.setAnnotated(true);
  if (!isAnnotationCompatible()) {
    addError("String_Node_Str" + JVM_ERROR_MESSAGE,node);
    return;
  }
  for (  AnnotationNode unvisited : node.getAnnotations()) {
    AnnotationNode visited=visitAnnotation(unvisited);
    boolean isTargetAnnotation=visited.getClassNode().isResolved() && visited.getClassNode().getName().equals("String_Node_Str");
    if (!isTargetAnnotation && !visited.isTargetAllowed(target)) {
      addError("String_Node_Str" + visited.getClassNode().getName() + "String_Node_Str"+ AnnotationNode.targetToName(target),visited);
    }
    visitDeprecation(node,visited);
    visitOverride(node,visited);
  }
}

Fixed version (ground truth):
protected void visitAnnotations(AnnotatedNode node,int target){
  if (node.getAnnotations().isEmpty()) {
    return;
  }
  this.currentClass.setAnnotated(true);
  if (!isAnnotationCompatible()) {
    addError("String_Node_Str" + JVM_ERROR_MESSAGE,node);
    return;
  }
  for (  AnnotationNode unvisited : node.getAnnotations()) {
    AnnotationNode visited=visitAnnotation(unvisited);
    boolean isTargetAnnotation=visited.getClassNode().isResolved() && visited.getClassNode().getName().equals("String_Node_Str");
    if (!isTargetAnnotation && !visited.isTargetAllowed(target)) {
      addError("String_Node_Str" + visited.getClassNode().getName() + "String_Node_Str"+ AnnotationNode.targetToName(target),visited);
    }
    visitDeprecation(node,visited);
  }
}
Program: 185971
Project: 185971
Buggy source:
public void testDuplicateClassesUnnecessaryExceptions_GRE796_2(){
  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" + File.separator + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ File.separator+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ File.separator+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
public void testDuplicateClassesUnnecessaryExceptions_GRE796_2(){
  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" + File.separator + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 185972
Project: 185972
Buggy source:
@Override protected void performRefactoring(ICompilationUnit[] cus,ICleanUp[] cleanUps) throws InvocationTargetException {
}

Fixed version (ground truth):
@Override protected void performRefactoring(ICompilationUnit[] cus,ICleanUp[] cleanUps){
}
Program: 185973
Project: 185973
Buggy source:
private static File createMemLogFile(){
  if (STORE_MEMORY == null || MEM_LOG_DIR == null) {
    return null;
  }
  File logFile=new File(MEM_LOG_DIR,STORE_MEMORY + "String_Node_Str");
  PrintStream stream=null;
  try {
    boolean fileExist=logFile.exists();
    stream=new PrintStream(new FileOutputStream(logFile,true));
    if (stream != null) {
      if (fileExist) {
        stream.println();
      }
      Date date=new Date(System.currentTimeMillis());
      stream.println("String_Node_Str" + STORE_MEMORY);
      stream.println("String_Node_Str" + DateFormat.getDateInstance(3).format(date));
      stream.println("String_Node_Str" + DateFormat.getTimeInstance(3).format(date));
      stream.print("String_Node_Str");
      if (ALL_TESTS_LOG)       stream.print("String_Node_Str");
      stream.print("String_Node_Str");
      stream.println();
      stream.close();
      System.out.println("String_Node_Str" + logFile.getPath() + "String_Node_Str");
      return logFile;
    }
  }
 catch (  FileNotFoundException e) {
  }
 finally {
    if (stream != null) {
      stream.close();
    }
  }
  return null;
}

Fixed version (ground truth):
private static File createMemLogFile(){
  if (STORE_MEMORY == null || MEM_LOG_DIR == null) {
    return null;
  }
  File logFile=new File(MEM_LOG_DIR,STORE_MEMORY + "String_Node_Str");
  PrintStream stream=null;
  try {
    boolean fileExist=logFile.exists();
    stream=new PrintStream(new FileOutputStream(logFile,true));
    if (fileExist) {
      stream.println();
    }
    Date date=new Date(System.currentTimeMillis());
    stream.println("String_Node_Str" + STORE_MEMORY);
    stream.println("String_Node_Str" + DateFormat.getDateInstance(3).format(date));
    stream.println("String_Node_Str" + DateFormat.getTimeInstance(3).format(date));
    stream.print("String_Node_Str");
    if (ALL_TESTS_LOG)     stream.print("String_Node_Str");
    stream.print("String_Node_Str");
    stream.println();
    System.out.println("String_Node_Str" + logFile.getPath() + "String_Node_Str");
    return logFile;
  }
 catch (  FileNotFoundException e) {
    System.err.println("String_Node_Str" + logFile.getPath());
  }
 finally {
    if (stream != null) {
      stream.close();
    }
  }
  return null;
}
Program: 185974
Project: 185974
Buggy source:
/** 
 * Build a test suite with all tests computed from public methods starting with "test" found in the given test class. Test suite name is the given name. Note that this lis maybe reduced using some mechanisms detailed in   {@link #buildTestsList(Class)} method.
 * @param evaluationTestClass
 * @param suiteName
 * @return a test suite ({@link Test})
 */
public static Test buildTestSuite(Class<? extends Test> evaluationTestClass,String suiteName){
  TestSuite suite=new TestSuite(suiteName == null ? evaluationTestClass.getName() : suiteName);
  List<Test> tests=buildTestsList(evaluationTestClass);
  for (int index=0, size=tests.size(); index < size; index++) {
    suite.addTest(tests.get(index));
  }
  return suite;
}

Fixed version (ground truth):
/** 
 * Build a test suite with all tests computed from public methods starting with "test" found in the given test class. Test suite name is the given name. Note that this lis maybe reduced using some mechanisms detailed in   {@link #buildTestsList(Class)} method.
 * @return a test suite ({@link Test})
 */
public static Test buildTestSuite(Class<? extends Test> evaluationTestClass,String suiteName){
  TestSuite suite=new TestSuite(suiteName == null ? evaluationTestClass.getName() : suiteName);
  List<Test> tests=buildTestsList(evaluationTestClass);
  for (int index=0, size=tests.size(); index < size; index++) {
    suite.addTest(tests.get(index));
  }
  return suite;
}
Program: 185975
Project: 185975
Buggy source:
private String createConstantText() throws MalformedTreeException, BadLocationException {
  StringBuilder sb=new StringBuilder();
  IJavaProject javaProject=getCu().getJavaProject();
  sb.append(CodeFormatterUtil.createIndentString(getIndentLevel(),javaProject));
  if (!getVisibility().isEmpty()) {
    sb.append(getVisibility()).append("String_Node_Str");
  }
  sb.append(MODIFIER).append("String_Node_Str").append(getConstantTypeName()).append(constantName).append("String_Node_Str").append(createExpressionText());
  IDocument doc=new Document(sb.toString());
  DefaultGroovyFormatter formatter=new DefaultGroovyFormatter(doc,new FormatterPreferences(unit),getIndentLevel());
  TextEdit edit=formatter.format();
  edit.apply(doc);
  return getDefaultNewlineCharacterTwice() + doc.get();
}

Fixed version (ground truth):
private String createConstantText() throws MalformedTreeException, BadLocationException {
  StringBuilder sb=new StringBuilder();
  IJavaProject javaProject=getCu().getJavaProject();
  sb.append(CodeFormatterUtil.createIndentString(getIndentLevel(),javaProject));
  if (getVisibility().length() > 0) {
    sb.append(getVisibility()).append("String_Node_Str");
  }
  sb.append(MODIFIER).append("String_Node_Str").append(getConstantTypeName()).append(constantName).append("String_Node_Str").append(createExpressionText());
  IDocument doc=new Document(sb.toString());
  DefaultGroovyFormatter formatter=new DefaultGroovyFormatter(doc,new FormatterPreferences(unit),getIndentLevel());
  TextEdit edit=formatter.format();
  edit.apply(doc);
  return getDefaultNewlineCharacterTwice() + doc.get();
}