nus-yam/ex-repair huggingface dataset:
Program: 34381
Project: 34381
Buggy source:
/** 
 * Set whether the object is considered modified. Also fires a change event. If the new value is <code>true</code>, the data object is added into a   {@link #getRegistry registry} of opened data objects.If the new value is <code>false</code>, the data object is removed from the registry.
 */
public void setModified(boolean modif){
  super.setModified(modif);
  if (modif) {
    if (getCookie(SaveCookie.class) == null) {
      getCookieSet().add(saveCookie);
    }
  }
 else {
    if (saveCookie.equals(getCookie(SaveCookie.class))) {
      getCookieSet().remove(saveCookie);
    }
  }
}

Fixed version (ground truth):
/** 
 * Set whether the object is considered modified. Also fires a change event. If the new value is <code>true</code>, the data object is added into a   {@link #getRegistry registry} of opened data objects.If the new value is <code>false</code>, the data object is removed from the registry.
 */
public void setModified(boolean modif){
  super.setModified(modif);
  if (isModified()) {
    if (getCookie(SaveCookie.class) == null) {
      getCookieSet().add(saveCookie);
    }
  }
 else {
    if (saveCookie.equals(getCookie(SaveCookie.class))) {
      getCookieSet().remove(saveCookie);
    }
  }
}
Program: 34383
Project: 34383
Buggy source:
@Override public Void visitClass(ClassTree node,Void p){
  JCClassDecl clazz=(JCTree.JCClassDecl)node;
  Symbol.ClassSymbol csym=clazz.sym;
  Type.ClassType ct=(Type.ClassType)csym.type;
  ct.all_interfaces_field=error2Object(ct.all_interfaces_field);
  ct.allparams_field=error2Object(ct.allparams_field);
  ct.interfaces_field=error2Object(ct.interfaces_field);
  ct.typarams_field=error2Object(ct.typarams_field);
  ct.supertype_field=error2Object(ct.supertype_field);
  super.visitClass(node,p);
  for (  JCTree def : clazz.defs) {
    if (def.hasTag(JCTree.Tag.ERRONEOUS)) {
      clazz.defs=com.sun.tools.javac.util.List.filter(clazz.defs,def);
    }
  }
  return null;
}

Fixed version (ground truth):
@Override public Void visitClass(ClassTree node,Void p){
  JCClassDecl clazz=(JCTree.JCClassDecl)node;
  Symbol.ClassSymbol csym=clazz.sym;
  Type.ClassType ct=(Type.ClassType)csym.type;
  ct.all_interfaces_field=error2Object(ct.all_interfaces_field);
  ct.allparams_field=error2Object(ct.allparams_field);
  ct.interfaces_field=error2Object(ct.interfaces_field);
  ct.typarams_field=error2Object(ct.typarams_field);
  ct.supertype_field=error2Object(ct.supertype_field);
  clearAnnotations(clazz.sym.getMetadata());
  super.visitClass(node,p);
  for (  JCTree def : clazz.defs) {
    if (def.hasTag(JCTree.Tag.ERRONEOUS)) {
      clazz.defs=com.sun.tools.javac.util.List.filter(clazz.defs,def);
    }
  }
  return null;
}
Program: 34384
Project: 34384
Buggy source:
@Override public Void visitMethod(MethodTree node,Void p){
  JCTree.JCMethodDecl decl=(JCTree.JCMethodDecl)node;
  Symbol.MethodSymbol msym=decl.sym;
  if (Collections.disjoint(msym.getModifiers(),EnumSet.of(Modifier.NATIVE,Modifier.ABSTRACT))) {
    JCTree.JCNewClass nct=make.NewClass(null,com.sun.tools.javac.util.List.nil(),make.QualIdent(syms.runtimeExceptionType.tsym),com.sun.tools.javac.util.List.of(make.Literal("String_Node_Str")),null);
    nct.type=syms.runtimeExceptionType;
    nct.constructor=syms.runtimeExceptionType.tsym.members().getSymbols(s -> s.getKind() == ElementKind.CONSTRUCTOR && s.type.getParameterTypes().size() == 1 && s.type.getParameterTypes().head.tsym == syms.stringType.tsym).iterator().next();
    decl.body=make.Block(0,com.sun.tools.javac.util.List.of(make.Throw(nct)));
  }
  Type.MethodType mt;
  if (msym.type.hasTag(TypeTag.FORALL)) {
    ForAll fa=(ForAll)msym.type;
    fa.tvars=error2Object(fa.tvars);
    mt=fa.asMethodType();
  }
 else {
    mt=(Type.MethodType)msym.type;
  }
  mt.restype=error2Object(mt.restype);
  mt.argtypes=error2Object(mt.argtypes);
  mt.thrown=error2Object(mt.thrown);
  clearAnnotations(decl.sym.getMetadata());
  return super.visitMethod(node,p);
}

Fixed version (ground truth):
@Override public Void visitMethod(MethodTree node,Void p){
  JCTree.JCMethodDecl decl=(JCTree.JCMethodDecl)node;
  Symbol.MethodSymbol msym=decl.sym;
  if (Collections.disjoint(msym.getModifiers(),EnumSet.of(Modifier.NATIVE,Modifier.ABSTRACT))) {
    JCTree.JCNewClass nct=make.NewClass(null,com.sun.tools.javac.util.List.nil(),make.QualIdent(syms.runtimeExceptionType.tsym),com.sun.tools.javac.util.List.of(make.Literal("String_Node_Str")),null);
    nct.type=syms.runtimeExceptionType;
    nct.constructor=syms.runtimeExceptionType.tsym.members().getSymbols(s -> s.getKind() == ElementKind.CONSTRUCTOR && s.type.getParameterTypes().size() == 1 && s.type.getParameterTypes().head.tsym == syms.stringType.tsym).iterator().next();
    decl.body=make.Block(0,com.sun.tools.javac.util.List.of(make.Throw(nct)));
  }
  Type.MethodType mt;
  if (msym.type.hasTag(TypeTag.FORALL)) {
    ForAll fa=(ForAll)msym.type;
    fa.tvars=error2Object(fa.tvars);
    mt=fa.asMethodType();
  }
 else {
    mt=(Type.MethodType)msym.type;
  }
  clearMethodType(mt);
  if (msym.erasure_field != null && msym.erasure_field.hasTag(TypeTag.METHOD))   clearMethodType((Type.MethodType)msym.erasure_field);
  clearAnnotations(decl.sym.getMetadata());
  return super.visitMethod(node,p);
}
Program: 34385
Project: 34385
Buggy source:
public void testIfMissingObjectOnBootCPUseCPToGuessSourceLevelWithStringBuilder() throws Exception {
  Source ret=guessSourceLevel(false,true,false);
  assertEquals("String_Node_Str",Source.JDK1_7,ret);
}

Fixed version (ground truth):
public void testIfMissingObjectOnBootCPUseCPToGuessSourceLevelWithStringBuilder() throws Exception {
  Source ret=guessSourceLevel(false,true,false);
  assertEquals("String_Node_Str",SourceLevelUtils.JDK1_7,ret);
}
Program: 34386
Project: 34386
Buggy source:
public void testIfMissingObjectOnBootCPUseCPToGuessSourceLevelWithStringBuilderAndAutoCloseable() throws Exception {
  Source ret=guessSourceLevel(false,true,true);
  assertEquals("String_Node_Str",Source.JDK1_7,ret);
}

Fixed version (ground truth):
public void testIfMissingObjectOnBootCPUseCPToGuessSourceLevelWithStringBuilderAndAutoCloseable() throws Exception {
  Source ret=guessSourceLevel(false,true,true);
  assertEquals("String_Node_Str",SourceLevelUtils.JDK1_7,ret);
}
Program: 34388
Project: 34388
Buggy source:
public void testHidesForeignPackage() throws IOException {
  final File wd=FileUtil.normalizeFile(getWorkDir());
  final Collection<Pair<String,Collection<Integer>>> spec=new ArrayList<>();
  spec.add(clz("String_Node_Str",0,9));
  spec.add(clz("String_Node_Str",0));
  spec.add(clz("String_Node_Str",9));
  final File badJar=createMultiReleaseJar(new File(wd,"String_Node_Str"),true,spec);
  final ClassPath cp=ClassPathSupport.createClassPath(FileUtil.urlForArchiveOrDir(badJar));
  CachingFileManager fm=new CachingFileManager(CachingArchiveProvider.getDefault(),cp,Source.JDK1_8,false,true);
  Iterable<JavaFileObject> res=fm.list(StandardLocation.CLASS_PATH,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
  fm=new CachingFileManager(CachingArchiveProvider.getDefault(),cp,Source.JDK1_9,false,true);
  res=fm.list(StandardLocation.CLASS_PATH,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
}

Fixed version (ground truth):
public void testHidesForeignPackage() throws IOException {
  final File wd=FileUtil.normalizeFile(getWorkDir());
  final Collection<Pair<String,Collection<Integer>>> spec=new ArrayList<>();
  spec.add(clz("String_Node_Str",0,9));
  spec.add(clz("String_Node_Str",0));
  spec.add(clz("String_Node_Str",9));
  final File badJar=createMultiReleaseJar(new File(wd,"String_Node_Str"),true,spec);
  final ClassPath cp=ClassPathSupport.createClassPath(FileUtil.urlForArchiveOrDir(badJar));
  CachingFileManager fm=new CachingFileManager(CachingArchiveProvider.getDefault(),cp,SourceLevelUtils.JDK1_8,false,true);
  Iterable<JavaFileObject> res=fm.list(StandardLocation.CLASS_PATH,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
  fm=new CachingFileManager(CachingArchiveProvider.getDefault(),cp,SourceLevelUtils.JDK1_9,false,true);
  res=fm.list(StandardLocation.CLASS_PATH,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
}
Program: 34393
Project: 34393
Buggy source:
public void testList() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  Iterable<JavaFileObject> res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),false);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),false);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
}

Fixed version (ground truth):
public void testList() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  Iterable<JavaFileObject> res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),false);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),false);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str"),toInferedName(fm,res));
}
Program: 34394
Project: 34394
Buggy source:
public void testGetJavaFileForInput() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  JavaFileObject res=fm.getJavaFileForInput(l,"String_Node_Str",JavaFileObject.Kind.CLASS);
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=fm.getJavaFileForInput(l,"String_Node_Str",JavaFileObject.Kind.CLASS);
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
}

Fixed version (ground truth):
public void testGetJavaFileForInput() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  JavaFileObject res=fm.getJavaFileForInput(l,"String_Node_Str",JavaFileObject.Kind.CLASS);
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=fm.getJavaFileForInput(l,"String_Node_Str",JavaFileObject.Kind.CLASS);
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
}
Program: 34395
Project: 34395
Buggy source:
public void testGetFileForInput() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  JavaFileObject res=(JavaFileObject)fm.getFileForInput(l,"String_Node_Str","String_Node_Str");
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=(JavaFileObject)fm.getFileForInput(l,"String_Node_Str","String_Node_Str");
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
}

Fixed version (ground truth):
public void testGetFileForInput() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  JavaFileObject res=(JavaFileObject)fm.getFileForInput(l,"String_Node_Str","String_Node_Str");
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=(JavaFileObject)fm.getFileForInput(l,"String_Node_Str","String_Node_Str");
  assertEquals(Arrays.asList("String_Node_Str"),toContent(Collections.<JavaFileObject>singleton(res)));
  assertEquals(Arrays.asList("String_Node_Str"),toInferedName(fm,Collections.<JavaFileObject>singleton(res)));
}
Program: 34396
Project: 34396
Buggy source:
public void testListRecursive() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  Iterable<JavaFileObject> res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toInferedName(fm,res));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),Source.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toInferedName(fm,res));
}

Fixed version (ground truth):
public void testListRecursive() throws IOException {
  ModuleFileManager fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),bCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  JavaFileManager.Location l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  Iterable<JavaFileObject> res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toInferedName(fm,res));
  fm=new ModuleFileManager(CachingArchiveProvider.getDefault(),mvCp,(u) -> Collections.singleton(u),SourceLevelUtils.JDK1_9,StandardLocation.MODULE_PATH,false);
  l=StreamSupport.stream(fm.listLocationsForModules(StandardLocation.MODULE_PATH).spliterator(),true).flatMap((s) -> s.stream()).findFirst().orElse(null);
  assertNotNull(l);
  res=fm.list(l,"String_Node_Str",EnumSet.of(JavaFileObject.Kind.CLASS),true);
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toContent(res));
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str"),toInferedName(fm,res));
}
Program: 34397
Project: 34397
Buggy source:
private void setupUndoRedoShortcut(boolean undo,Action ourAction){
  KeyStroke ks=null;
  FileObject undoRedoFO=FileUtil.getConfigFile(undo ? "String_Node_Str" : "String_Node_Str");
  if (undoRedoFO != null) {
    ContextAwareAction undoRedoAction=SystemAction.get(undo ? org.openide.actions.UndoAction.class : org.openide.actions.RedoAction.class);
    Action a=undoRedoAction.createContextAwareInstance(Lookup.EMPTY);
    AcceleratorBinding.setAccelerator(a,undoRedoFO);
    Object ksObj=a.getValue(Action.ACCELERATOR_KEY);
    if (ksObj instanceof KeyStroke) {
      ks=(KeyStroke)ksObj;
    }
  }
  if (ks == null) {
    ks=Utilities.stringToKey(undo ? "String_Node_Str" : "String_Node_Str");
  }
  String actionId=ourAction.getClass().getName();
  getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(ks,actionId);
  getActionMap().put(actionId,ourAction);
}

Fixed version (ground truth):
private void setupUndoRedoShortcut(boolean undo,Action ourAction){
  KeyStroke ks=null;
  FileObject undoRedoFO=FileUtil.getConfigFile(undo ? "String_Node_Str" : "String_Node_Str");
  if (undoRedoFO != null) {
    Class<? extends SystemAction> undoClass=undo ? org.openide.actions.UndoAction.class : org.openide.actions.RedoAction.class;
    ContextAwareAction undoRedoAction=(ContextAwareAction)SystemAction.get(undoClass);
    Action a=undoRedoAction.createContextAwareInstance(Lookup.EMPTY);
    AcceleratorBinding.setAccelerator(a,undoRedoFO);
    Object ksObj=a.getValue(Action.ACCELERATOR_KEY);
    if (ksObj instanceof KeyStroke) {
      ks=(KeyStroke)ksObj;
    }
  }
  if (ks == null) {
    ks=Utilities.stringToKey(undo ? "String_Node_Str" : "String_Node_Str");
  }
  String actionId=ourAction.getClass().getName();
  getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(ks,actionId);
  getActionMap().put(actionId,ourAction);
}
Program: 34398
Project: 34398
Buggy source:
@Override public void handleQuitRequestWith(AppEvent.QuitEvent e,QuitResponse response){
  handleQuit();
}

Fixed version (ground truth):
@Override public void handleQuitRequestWith(AppEvent.QuitEvent e,QuitResponse response){
  handleQuit();
  response.cancelQuit();
}
Program: 34399
Project: 34399
Buggy source:
@Override public void handleQuitRequestWith(QuitEvent e,QuitResponse response){
  handleQuit();
}

Fixed version (ground truth):
@Override public void handleQuitRequestWith(QuitEvent e,QuitResponse response){
  handleQuit();
  response.cancelQuit();
}
Program: 34401
Project: 34401
Buggy source:
@NonNull JavaFileManager[] getFileManagers(@NonNull Location location,@NullAllowed String hint){
  if (ModuleLocation.isInstance(location)) {
    location=ModuleLocation.cast(location).getBaseLocation();
  }
  if (location == ALL) {
    if (TreeLoaderOutputFileManager.OUTPUT_ROOT.equals(hint)) {
      createTreeLoaderFileManager();
    }
    if (JavacParser.OPTION_PATCH_MODULE.equals(hint)) {
      createPatchFileManager();
      createModuleSrcFileManager();
    }
    final List<JavaFileManager> res=new ArrayList<>(emitted.length);
    for (    JavaFileManager jfm : emitted) {
      if (jfm != null) {
        res.add(jfm);
      }
    }
    return res.toArray(new JavaFileManager[res.size()]);
  }
 else {
    final Entry result=fileManagers.get(location);
    return result == null ? EMPTY : result.get();
  }
}

Fixed version (ground truth):
@NonNull JavaFileManager[] getFileManagers(@NonNull Location location,@NullAllowed String hint){
  if (ModuleLocation.isInstance(location)) {
    location=ModuleLocation.cast(location).getBaseLocation();
  }
  if (location == ALL) {
    if (TreeLoaderOutputFileManager.OUTPUT_ROOT.equals(hint)) {
      createTreeLoaderFileManager();
    }
    if (JavacParser.OPTION_PATCH_MODULE.equals(hint)) {
      createPatchFileManager();
      createModuleSrcFileManager();
    }
    if (OutputFileManager.OPTION_SET_CURRENT_ROOT.equals(hint)) {
      createOutputFileManager();
    }
    final List<JavaFileManager> res=new ArrayList<>(emitted.length);
    for (    JavaFileManager jfm : emitted) {
      if (jfm != null) {
        res.add(jfm);
      }
    }
    return res.toArray(new JavaFileManager[res.size()]);
  }
 else {
    final Entry result=fileManagers.get(location);
    return result == null ? EMPTY : result.get();
  }
}
Program: 34403
Project: 34403
Buggy source:
private static String readFile(FileObject fo) throws IOException {
  byte[] arr=new byte[(int)fo.getSize()];
  int len=fo.getInputStream().read(arr);
  assertEquals("String_Node_Str",arr.length,len);
  return new String(arr);
}

Fixed version (ground truth):
private static String readFile(FileObject fo) throws IOException {
  byte[] arr=new byte[(int)fo.getSize()];
  int len=fo.getInputStream().read(arr);
  assertEquals("String_Node_Str",arr.length,len);
  String foRead=new String(arr).replace(System.getProperty("String_Node_Str"),"String_Node_Str");
  return foRead;
}
Program: 34405
Project: 34405
Buggy source:
static Link analyse(String line){
  Matcher matcher=LINE_PATTERN.matcher(line);
  if (matcher.find()) {
    int lineNumber=-1;
    try {
      lineNumber=Integer.parseInt(matcher.group(6));
    }
 catch (    NumberFormatException nfe) {
      return null;
    }
    if (matcher.group(1) == null) {
      return new Link(matcher.group(4).split("String_Node_Str")[0],lineNumber,matcher.start(4),matcher.end(6) + 1);
    }
    return new Link(matcher.group(1) + matcher.group(4).split("String_Node_Str")[0],lineNumber,matcher.start(1),matcher.end(6) + 1);
  }
  return null;
}

Fixed version (ground truth):
static Link analyse(String line){
  Matcher matcher=LINE_PATTERN.matcher(line);
  if (matcher.find()) {
    int lineNumber=-1;
    try {
      lineNumber=Integer.parseInt(matcher.group(6));
    }
 catch (    NumberFormatException nfe) {
      return null;
    }
    if (matcher.group(1) == null) {
      return new Link(matcher.group(4),lineNumber,matcher.start(4),matcher.end(6) + 1);
    }
    return new Link(matcher.group(1) + matcher.group(4),lineNumber,matcher.start(1),matcher.end(6) + 1);
  }
  return null;
}
Program: 34407
Project: 34407
Buggy source:
@Override public void run(){
  try {
    if (dataObject == null) {
      StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(StackLineAnalyser.class,"String_Node_Str",new Object[]{resource}));
      return;
    }
    try {
      EditorCookie editorCookie=(EditorCookie)dataObject.getCookie(EditorCookie.class);
      LineCookie lineCookie=(LineCookie)dataObject.getCookie(LineCookie.class);
      if (editorCookie != null && lineCookie != null && lineNumber != -1) {
        StyledDocument doc=editorCookie.openDocument();
        if (doc != null) {
          if (lineNumber != -1) {
            try {
              Line l=lineCookie.getLineSet().getCurrent(lineNumber - 1);
              if (l != null) {
                l.show(Line.SHOW_GOTO);
                return;
              }
            }
 catch (            IndexOutOfBoundsException oob) {
              StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(StackLineAnalyser.class,"String_Node_Str",new Object[]{lineNumber}));
            }
          }
        }
      }
      OpenCookie openCookie=(OpenCookie)dataObject.getCookie(OpenCookie.class);
      if (openCookie != null) {
        openCookie.open();
        return;
      }
    }
 catch (    IOException e) {
      Exceptions.printStackTrace(e);
    }
  }
  finally {
    handle.finish();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    if (dataObject == null) {
      StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(StackLineAnalyser.class,"String_Node_Str",new Object[]{resources.get(0)}));
      return;
    }
    try {
      EditorCookie editorCookie=(EditorCookie)dataObject.getCookie(EditorCookie.class);
      LineCookie lineCookie=(LineCookie)dataObject.getCookie(LineCookie.class);
      if (editorCookie != null && lineCookie != null && lineNumber != -1) {
        StyledDocument doc=editorCookie.openDocument();
        if (doc != null) {
          if (lineNumber != -1) {
            try {
              Line l=lineCookie.getLineSet().getCurrent(lineNumber - 1);
              if (l != null) {
                l.show(Line.SHOW_GOTO);
                return;
              }
            }
 catch (            IndexOutOfBoundsException oob) {
              StatusDisplayer.getDefault().setStatusText(NbBundle.getMessage(StackLineAnalyser.class,"String_Node_Str",new Object[]{lineNumber}));
            }
          }
        }
      }
      OpenCookie openCookie=(OpenCookie)dataObject.getCookie(OpenCookie.class);
      if (openCookie != null) {
        openCookie.open();
        return;
      }
    }
 catch (    IOException e) {
      Exceptions.printStackTrace(e);
    }
  }
  finally {
    handle.finish();
  }
}
Program: 34409
Project: 34409
Buggy source:
/** 
 * Creates files that instruct the native launcher to perform restart as soon as the Java process finishes. 
 * @since 1.45
 * @throws UnsupportedOperationException some environments (like WebStart)do not support restart and may throw an exception to indicate that
 */
static void markReadyForRestart() throws UnsupportedOperationException {
  if (!TopSecurityManager.class.getClassLoader().getClass().getName().endsWith("String_Node_Str")) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  File userdir=Places.getUserDirectory();
  if (userdir == null) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  File restartFile=new File(userdir,"String_Node_Str");
  if (!restartFile.exists()) {
    try {
      restartFile.createNewFile();
    }
 catch (    IOException x) {
      throw new UnsupportedOperationException(x);
    }
  }
}

Fixed version (ground truth):
/** 
 * Creates files that instruct the native launcher to perform restart as soon as the Java process finishes. 
 * @since 1.45
 * @throws UnsupportedOperationException some environments (like WebStart)do not support restart and may throw an exception to indicate that
 */
static void markReadyForRestart() throws UnsupportedOperationException {
  String classLoaderName=TopSecurityManager.class.getClassLoader().getClass().getName();
  if (!classLoaderName.endsWith("String_Node_Str") && !classLoaderName.endsWith("String_Node_Str")) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  File userdir=Places.getUserDirectory();
  if (userdir == null) {
    throw new UnsupportedOperationException("String_Node_Str");
  }
  File restartFile=new File(userdir,"String_Node_Str");
  if (!restartFile.exists()) {
    try {
      restartFile.createNewFile();
    }
 catch (    IOException x) {
      throw new UnsupportedOperationException(x);
    }
  }
}
Program: 34411
Project: 34411
Buggy source:
public ReachableObjects(Instance root,final ReachableExcludes excludes){
  this.root=root;
  this.excludes=excludes;
}

Fixed version (ground truth):
public ReachableObjects(Instance root,final ReachableExcludes excludes){
  this.root=root;
  this.excludes=excludes;
  alreadyReached=new HashSet();
}
Program: 34412
Project: 34412
Buggy source:
@Override protected Iterator<Instance> getTraversingIterator(Instance popped){
  Collection<Instance> instances=new ArrayList<Instance>();
  for (  Object fv : popped.getFieldValues()) {
    if (fv instanceof ObjectFieldValue) {
      if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
        Instance i=((ObjectFieldValue)fv).getInstance();
        if (i != null) {
          instances.add(i);
        }
      }
    }
  }
  if (popped instanceof ObjectArrayInstance) {
    instances.addAll(((ObjectArrayInstance)popped).getValues());
  }
  return instances.iterator();
}

Fixed version (ground truth):
@Override protected Iterator<Instance> getTraversingIterator(Instance popped){
  Collection<Instance> instances=new ArrayList<Instance>();
  for (  Object fv : popped.getFieldValues()) {
    if (fv instanceof ObjectFieldValue) {
      if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
        Instance i=((ObjectFieldValue)fv).getInstance();
        if (i != null) {
          instances.add(i);
        }
      }
    }
  }
  if (popped instanceof ObjectArrayInstance) {
    for (    Object el : ((ObjectArrayInstance)popped).getValues()) {
      if (el instanceof Instance) {
        instances.add((Instance)el);
      }
    }
  }
  return instances.iterator();
}
Program: 34413
Project: 34413
Buggy source:
@Override protected Iterator<Instance> getSameLevelIterator(Instance popped){
  Collection<Instance> instances=new ArrayList<Instance>();
  for (  Object fv : popped.getFieldValues()) {
    if (fv instanceof ObjectFieldValue) {
      if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
        Instance i=((ObjectFieldValue)fv).getInstance();
        if (i != null) {
          instances.add(i);
        }
      }
    }
  }
  if (popped instanceof ObjectArrayInstance) {
    instances.addAll(((ObjectArrayInstance)popped).getValues());
  }
  return instances.iterator();
}

Fixed version (ground truth):
@Override protected Iterator<Instance> getSameLevelIterator(Instance popped){
  Collection<Instance> instances=new ArrayList<Instance>();
  for (  Object fv : popped.getFieldValues()) {
    if (fv instanceof ObjectFieldValue) {
      if (excludes == null || !excludes.isExcluded(getFQFieldName(((FieldValue)fv).getField()))) {
        Instance i=((ObjectFieldValue)fv).getInstance();
        if (i != null && !alreadyReached.contains(i)) {
          instances.add(i);
          alreadyReached.add(i);
        }
      }
    }
  }
  if (popped instanceof ObjectArrayInstance) {
    for (    Object el : ((ObjectArrayInstance)popped).getValues()) {
      Instance i=(Instance)el;
      if (i != null && !alreadyReached.contains(i)) {
        instances.add(i);
        alreadyReached.add(i);
      }
    }
  }
  return instances.iterator();
}
Program: 34415
Project: 34415
Buggy source:
static boolean isJavaFX(File javaHome){
  return new File(new File(javaHome,"String_Node_Str"),"String_Node_Str").exists() || new File(new File(new File(javaHome,"String_Node_Str"),"String_Node_Str"),"String_Node_Str").exists();
}

Fixed version (ground truth):
static boolean isJavaFX(File javaHome){
  try {
    Class.forName("String_Node_Str");
    return true;
  }
 catch (  ClassNotFoundException ex) {
    return new File(new File(javaHome,"String_Node_Str"),"String_Node_Str").exists() || new File(new File(new File(javaHome,"String_Node_Str"),"String_Node_Str"),"String_Node_Str").exists();
  }
}
Program: 34416
Project: 34416
Buggy source:
@SuppressWarnings("String_Node_Str") private static Object load(Map<?,?> options){
  try {
    return Native.loadLibrary(GENERIC,GnomeKeyringLibrary.class,options);
  }
 catch (  UnsatisfiedLinkError x) {
    if (new File(EXPLICIT_ONEIRIC).isFile()) {
      return Native.loadLibrary(EXPLICIT_ONEIRIC,GnomeKeyringLibrary.class,options);
    }
 else {
      throw x;
    }
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private static Object load(Map<String,?> options){
  try {
    return Native.loadLibrary(GENERIC,GnomeKeyringLibrary.class,options);
  }
 catch (  UnsatisfiedLinkError x) {
    if (new File(EXPLICIT_ONEIRIC).isFile()) {
      return Native.loadLibrary(EXPLICIT_ONEIRIC,GnomeKeyringLibrary.class,options);
    }
 else {
      throw x;
    }
  }
}
Program: 34418
Project: 34418
Buggy source:
public ComputeImports computeCandidatesEx(){
  ComputeImports cache=(ComputeImports)info.getCachedValue(IMPORT_CANDIDATES_KEY);
  if (cache != null) {
    return cache;
  }
  computeCandidates(Collections.<String>emptySet());
  info.putCachedValue(IMPORT_CANDIDATES_KEY,this,CacheClearPolicy.ON_CHANGE);
  return this;
}

Fixed version (ground truth):
public ComputeImports computeCandidatesEx(){
  ComputeImports cache=(ComputeImports)info.getCachedValue(IMPORT_CANDIDATES_KEY);
  if (cache != null) {
    return cache;
  }
  boolean modules=false;
  if (info.getSourceVersion().compareTo(SourceVersion.RELEASE_9) <= 0) {
    if (info.getClasspathInfo().getClassPath(ClasspathInfo.PathKind.SOURCE).findResource("String_Node_Str") != null) {
      modules=true;
    }
  }
  if (modules) {
    ClasspathInfo cpInfo=info.getClasspathInfo();
    ClasspathInfo extraInfo=ClasspathInfo.create(ClassPathSupport.createProxyClassPath(cpInfo.getClassPath(ClasspathInfo.PathKind.BOOT),cpInfo.getClassPath(ClasspathInfo.PathKind.MODULE_BOOT)),ClassPathSupport.createProxyClassPath(cpInfo.getClassPath(ClasspathInfo.PathKind.COMPILE),cpInfo.getClassPath(ClasspathInfo.PathKind.MODULE_COMPILE),cpInfo.getClassPath(ClasspathInfo.PathKind.MODULE_CLASS)),cpInfo.getClassPath(ClasspathInfo.PathKind.SOURCE));
    JavaSource src=JavaSource.create(extraInfo,info.getSnapshot().getSource().getFileObject());
    try {
      src.runUserActionTask(new Task<CompilationController>(){
        @Override public void run(        CompilationController parameter) throws Exception {
          allInfo=parameter;
          parameter.toPhase(JavaSource.Phase.RESOLVED);
          computeCandidates(Collections.<String>emptySet());
        }
      }
,true);
    }
 catch (    IOException ex) {
      Exceptions.printStackTrace(ex);
    }
  }
 else {
    allInfo=info;
    computeCandidates(Collections.<String>emptySet());
  }
  info.putCachedValue(IMPORT_CANDIDATES_KEY,this,CacheClearPolicy.ON_CHANGE);
  return this;
}
Program: 34419
Project: 34419
Buggy source:
@Override public FileEntry getFileEntry(String filename) throws Exception {
  try {
    filename=removeProtocol(filename);
    Log.d("String_Node_Str","String_Node_Str" + filename);
    if ((filename.equals("String_Node_Str")) || (filename.equals("String_Node_Str")))     return getRootFileEntry();
    Metadata dbEntry=dbxClient.files().getMetadata(filename);
    return convertToFileEntry(dbEntry);
  }
 catch (  DbxException e) {
    throw convertException(e);
  }
}

Fixed version (ground truth):
@Override public FileEntry getFileEntry(String filename) throws Exception {
  try {
    filename=removeProtocol(filename);
    Log.d("String_Node_Str","String_Node_Str" + filename);
    if ((filename.equals("String_Node_Str")) || (filename.equals("String_Node_Str")))     return getRootFileEntry();
    if (filename.endsWith("String_Node_Str"))     filename=filename.substring(0,filename.length() - 1);
    Metadata dbEntry=dbxClient.files().getMetadata(filename);
    return convertToFileEntry(dbEntry);
  }
 catch (  DbxException e) {
    throw convertException(e);
  }
}
Program: 34420
Project: 34420
Buggy source:
@Override public String getDisplayName(String path){
  if (path.endsWith("String_Node_Str"))   path=path.substring(0,path.length() - 1);
  int lastIndex=path.lastIndexOf("String_Node_Str");
  if (lastIndex >= 0)   return path.substring(lastIndex + 1);
 else   return path;
}

Fixed version (ground truth):
@Override public String getDisplayName(String path){
  try {
    ConnectionInfo ci=splitStringToConnectionInfo(path);
    return ci.URL;
  }
 catch (  Exception e) {
    return getDisplayNameFromHref(path);
  }
}
Program: 34422
Project: 34422
Buggy source:
private void onKp2aLockKeyPressed(){
  sendBroadcast(new Intent("String_Node_Str"));
}

Fixed version (ground truth):
private void onKp2aLockKeyPressed(){
  String action=getPackageName() + "String_Node_Str";
  android.util.Log.i("String_Node_Str","String_Node_Str" + action);
  sendBroadcast(new Intent(action));
}
Program: 34423
Project: 34423
Buggy source:
@Override public void onActivityResult(final JavaFileStorage.FileStorageSetupActivity setupAct,int requestCode,int resultCode,Intent data){
  logDebug("String_Node_Str" + requestCode + "String_Node_Str"+ resultCode);
switch (requestCode) {
case REQUEST_ACCOUNT_PICKER:
    logDebug("String_Node_Str");
  if (resultCode == Activity.RESULT_OK && data != null && data.getExtras() != null) {
    String accountName=data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
    if (accountName != null) {
      logDebug("String_Node_Str" + accountName);
      initializeAccountOrPath(setupAct,accountName);
      return;
    }
  }
Log.i(TAG,"String_Node_Str");
((Activity)setupAct).setResult(Activity.RESULT_CANCELED,data);
((Activity)setupAct).finish();
case REQUEST_AUTHORIZATION:
if (resultCode == Activity.RESULT_OK) {
String accountName=data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
if (accountName != null) {
Log.d(TAG,"String_Node_Str" + accountName);
initializeAccountOrPath(setupAct,accountName);
}
 else {
Log.d(TAG,"String_Node_Str");
}
}
 else {
Log.i(TAG,"String_Node_Str");
((Activity)setupAct).setResult(Activity.RESULT_CANCELED,data);
((Activity)setupAct).finish();
}
}
}

Fixed version (ground truth):
@Override public void onActivityResult(final JavaFileStorage.FileStorageSetupActivity setupAct,int requestCode,int resultCode,Intent data){
  logDebug("String_Node_Str" + requestCode + "String_Node_Str"+ resultCode);
switch (requestCode) {
case REQUEST_ACCOUNT_PICKER:
    logDebug("String_Node_Str");
  if (resultCode == Activity.RESULT_OK && data != null && data.getExtras() != null) {
    String accountName=data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
    if (accountName != null) {
      logDebug("String_Node_Str" + accountName);
      initializeAccountOrPath(setupAct,accountName);
      return;
    }
  }
logDebug("String_Node_Str");
((Activity)setupAct).setResult(Activity.RESULT_CANCELED,data);
((Activity)setupAct).finish();
case REQUEST_AUTHORIZATION:
if (resultCode == Activity.RESULT_OK) {
String accountName=data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
if (accountName != null) {
logDebug("String_Node_Str" + accountName);
initializeAccountOrPath(setupAct,accountName);
}
 else {
logDebug("String_Node_Str");
}
}
 else {
logDebug("String_Node_Str");
((Activity)setupAct).setResult(Activity.RESULT_CANCELED,data);
((Activity)setupAct).finish();
}
}
}
Program: 34424
Project: 34424
Buggy source:
@Override protected AsyncTaskResult<String> doInBackground(Object... arg0){
  try {
    if (!mAccountData.containsKey(accountName)) {
      AccountData newAccountData=new AccountData();
      newAccountData.drive=createDriveService(accountName,activity);
      mAccountData.put(accountName,newAccountData);
      logDebug("String_Node_Str" + accountName);
      newAccountData.mFolderCache=buildFoldersCache(accountName);
      About about=newAccountData.drive.about().get().execute();
      newAccountData.mRootFolderId=about.getRootFolderId();
    }
    if (setupAct.getProcessName().equals(PROCESS_NAME_SELECTFILE))     setupAct.getState().putString(EXTRA_PATH,getRootPathForAccount(accountName));
    return new AsyncTaskResult<String>("String_Node_Str");
  }
 catch (  Exception anyError) {
    return new AsyncTaskResult<String>(anyError);
  }
}

Fixed version (ground truth):
@Override protected AsyncTaskResult<String> doInBackground(Object... arg0){
  try {
    if (!mAccountData.containsKey(accountName)) {
      AccountData newAccountData=new AccountData();
      newAccountData.drive=createDriveService(accountName,activity);
      mAccountData.put(accountName,newAccountData);
      logDebug("String_Node_Str" + accountName);
      finishInitialization(newAccountData,accountName);
    }
    if (setupAct.getProcessName().equals(PROCESS_NAME_SELECTFILE))     setupAct.getState().putString(EXTRA_PATH,getRootPathForAccount(accountName));
    return new AsyncTaskResult<String>("String_Node_Str");
  }
 catch (  Exception anyError) {
    return new AsyncTaskResult<String>(anyError);
  }
}
Program: 34426
Project: 34426
Buggy source:
@Override public FileEntry getFileEntry(String filename) throws Exception {
  try {
    logDebug("String_Node_Str" + filename);
    GDrivePath gdrivePath=new GDrivePath(filename);
    FileEntry res=convertToFileEntry(getFileForPath(gdrivePath,getDriveService(gdrivePath.getAccount())),filename);
    logDebug("String_Node_Str" + res);
    return res;
  }
 catch (  Exception e) {
    Log.d(TAG,"String_Node_Str" + e);
    throw convertException(e);
  }
}

Fixed version (ground truth):
@Override public FileEntry getFileEntry(String filename) throws Exception {
  try {
    logDebug("String_Node_Str" + filename);
    GDrivePath gdrivePath=new GDrivePath(filename);
    FileEntry res=convertToFileEntry(getFileForPath(gdrivePath,getDriveService(gdrivePath.getAccount())),filename);
    logDebug("String_Node_Str" + res);
    return res;
  }
 catch (  Exception e) {
    logDebug("String_Node_Str" + e);
    throw convertException(e);
  }
}
Program: 34428
Project: 34428
Buggy source:
public String getGDriveId() throws InvalidPathException, UnsupportedEncodingException {
  String pathWithoutTrailingSlash=mAccountLocalPath;
  if (pathWithoutTrailingSlash.endsWith("String_Node_Str"))   pathWithoutTrailingSlash=pathWithoutTrailingSlash.substring(0,pathWithoutTrailingSlash.length() - 1);
  if (pathWithoutTrailingSlash.equals("String_Node_Str")) {
    return mAccountData.get(mAccount).mRootFolderId;
  }
  String lastPart=pathWithoutTrailingSlash.substring(pathWithoutTrailingSlash.lastIndexOf(NAME_ID_SEP) + NAME_ID_SEP.length());
  if (lastPart.contains("String_Node_Str"))   throw new InvalidPathException("String_Node_Str" + mAccountLocalPath);
  return decode(lastPart);
}

Fixed version (ground truth):
public String getGDriveId() throws InvalidPathException, IOException {
  String pathWithoutTrailingSlash=mAccountLocalPath;
  if (pathWithoutTrailingSlash.endsWith("String_Node_Str"))   pathWithoutTrailingSlash=pathWithoutTrailingSlash.substring(0,pathWithoutTrailingSlash.length() - 1);
  if (pathWithoutTrailingSlash.equals("String_Node_Str")) {
    AccountData accountData=mAccountData.get(mAccount);
    finishInitialization(accountData,mAccount);
    return accountData.mRootFolderId;
  }
  String lastPart=pathWithoutTrailingSlash.substring(pathWithoutTrailingSlash.lastIndexOf(NAME_ID_SEP) + NAME_ID_SEP.length());
  if (lastPart.contains("String_Node_Str"))   throw new InvalidPathException("String_Node_Str" + mAccountLocalPath);
  return decode(lastPart);
}
Program: 34429
Project: 34429
Buggy source:
protected void finishActivityWithSuccess(FileStorageSetupActivity setupActivity){
  Activity activity=(Activity)setupActivity;
  if (setupActivity.getProcessName().equals(PROCESS_NAME_FILE_USAGE_SETUP)) {
    Intent data=new Intent();
    data.putExtra(EXTRA_IS_FOR_SAVE,setupActivity.isForSave());
    data.putExtra(EXTRA_PATH,setupActivity.getPath());
    activity.setResult(RESULT_FILEUSAGE_PREPARED,data);
    activity.finish();
    return;
  }
  if (setupActivity.getProcessName().equals(PROCESS_NAME_SELECTFILE)) {
    Intent data=new Intent();
    String path=setupActivity.getState().getString(EXTRA_PATH);
    if (path != null)     data.putExtra(EXTRA_PATH,path);
    activity.setResult(RESULT_FILECHOOSER_PREPARED,data);
    activity.finish();
    return;
  }
  Log.w("String_Node_Str","String_Node_Str" + setupActivity.getProcessName());
}

Fixed version (ground truth):
protected void finishActivityWithSuccess(FileStorageSetupActivity setupActivity){
  Activity activity=(Activity)setupActivity;
  if (setupActivity.getProcessName().equals(PROCESS_NAME_FILE_USAGE_SETUP)) {
    Intent data=new Intent();
    data.putExtra(EXTRA_IS_FOR_SAVE,setupActivity.isForSave());
    data.putExtra(EXTRA_PATH,setupActivity.getPath());
    activity.setResult(RESULT_FILEUSAGE_PREPARED,data);
    activity.finish();
    return;
  }
  if (setupActivity.getProcessName().equals(PROCESS_NAME_SELECTFILE)) {
    Intent data=new Intent();
    String path=setupActivity.getState().getString(EXTRA_PATH);
    if (path != null)     data.putExtra(EXTRA_PATH,path);
    activity.setResult(RESULT_FILECHOOSER_PREPARED,data);
    activity.finish();
    return;
  }
  logDebug("String_Node_Str" + setupActivity.getProcessName());
}