nus-yam/ex-repair huggingface dataset:
Program: 88665
Project: 88665
Buggy source:
/** 
 * handles try/catch (try/catch/finally is separate for simplicity)
 */
private void createTryCatch(polyglot.ast.Try tryStmt){
  polyglot.ast.Block tryBlock=tryStmt.tryBlock();
  soot.jimple.Stmt noop1=soot.jimple.Jimple.v().newNopStmt();
  body.getUnits().add(noop1);
  createBlock(tryBlock);
  soot.jimple.Stmt noop2=soot.jimple.Jimple.v().newNopStmt();
  body.getUnits().add(noop2);
  soot.jimple.Stmt endNoop=soot.jimple.Jimple.v().newNopStmt();
  soot.jimple.Stmt tryEndGoto=soot.jimple.Jimple.v().newGotoStmt(endNoop);
  body.getUnits().add(tryEndGoto);
  Iterator it=tryStmt.catchBlocks().iterator();
  while (it.hasNext()) {
    soot.jimple.Stmt noop3=soot.jimple.Jimple.v().newNopStmt();
    body.getUnits().add(noop3);
    polyglot.ast.Catch catchBlock=(polyglot.ast.Catch)it.next();
    createCatchFormal(catchBlock.formal());
    createBlock(catchBlock.body());
    soot.jimple.Stmt catchEndGoto=soot.jimple.Jimple.v().newGotoStmt(endNoop);
    body.getUnits().add(catchEndGoto);
    soot.Type sootType=Util.getSootType(catchBlock.catchType());
    addToExceptionList(noop1,noop2,noop3,soot.Scene.v().getSootClass(sootType.toString()));
  }
  body.getUnits().add(endNoop);
}

Fixed version (ground truth):
/** 
 * handles try/catch (try/catch/finally is separate for simplicity)
 */
private void createTryCatch(polyglot.ast.Try tryStmt){
  polyglot.ast.Block tryBlock=tryStmt.tryBlock();
  soot.jimple.Stmt noop1=soot.jimple.Jimple.v().newNopStmt();
  body.getUnits().add(noop1);
  if (tryStack == null) {
    tryStack=new Stack();
  }
  tryStack.push(tryStmt);
  createBlock(tryBlock);
  tryStack.pop();
  soot.jimple.Stmt noop2=soot.jimple.Jimple.v().newNopStmt();
  body.getUnits().add(noop2);
  soot.jimple.Stmt endNoop=soot.jimple.Jimple.v().newNopStmt();
  soot.jimple.Stmt tryEndGoto=soot.jimple.Jimple.v().newGotoStmt(endNoop);
  body.getUnits().add(tryEndGoto);
  Iterator it=tryStmt.catchBlocks().iterator();
  while (it.hasNext()) {
    soot.jimple.Stmt noop3=soot.jimple.Jimple.v().newNopStmt();
    body.getUnits().add(noop3);
    polyglot.ast.Catch catchBlock=(polyglot.ast.Catch)it.next();
    createCatchFormal(catchBlock.formal());
    if (catchStack == null) {
      catchStack=new Stack();
    }
    catchStack.push(tryStmt);
    createBlock(catchBlock.body());
    catchStack.pop();
    soot.jimple.Stmt catchEndGoto=soot.jimple.Jimple.v().newGotoStmt(endNoop);
    body.getUnits().add(catchEndGoto);
    soot.Type sootType=Util.getSootType(catchBlock.catchType());
    addToExceptionList(noop1,noop2,noop3,soot.Scene.v().getSootClass(sootType.toString()));
  }
  body.getUnits().add(endNoop);
}
Program: 88669
Project: 88669
Buggy source:
private soot.Local createLocal(String name,soot.Type sootType){
  if (sootType instanceof soot.CharType) {
    sootType=soot.IntType.v();
  }
  soot.Local sootLocal=soot.jimple.Jimple.v().newLocal(name,sootType);
  body.getLocals().add(sootLocal);
  return sootLocal;
}

Fixed version (ground truth):
private soot.Local createLocal(String name,soot.Type sootType){
  soot.Local sootLocal=soot.jimple.Jimple.v().newLocal(name,sootType);
  body.getLocals().add(sootLocal);
  return sootLocal;
}
Program: 88671
Project: 88671
Buggy source:
/** 
 * Class Body Creation
 */
private void createClassBody(polyglot.ast.ClassBody classBody){
  staticFieldInits=null;
  fieldInits=null;
  initializerBlocks=null;
  staticInitializerBlocks=null;
  Iterator it=classBody.members().iterator();
  while (it.hasNext()) {
    Object next=it.next();
    if (next instanceof polyglot.ast.MethodDecl) {
      createMethodDecl((polyglot.ast.MethodDecl)next);
    }
 else     if (next instanceof polyglot.ast.FieldDecl) {
      createFieldDecl((polyglot.ast.FieldDecl)next);
    }
 else     if (next instanceof polyglot.ast.ConstructorDecl) {
      createConstructorDecl((polyglot.ast.ConstructorDecl)next);
    }
 else     if (next instanceof polyglot.ast.ClassDecl) {
    }
 else     if (next instanceof polyglot.ast.Initializer) {
      createInitializer((polyglot.ast.Initializer)next);
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
  handlePrivateAccessors(classBody);
}

Fixed version (ground truth):
/** 
 * Class Body Creation
 */
private void createClassBody(polyglot.ast.ClassBody classBody){
  staticFieldInits=null;
  fieldInits=null;
  initializerBlocks=null;
  staticInitializerBlocks=null;
  handleClassLiteral(classBody);
  handleAssert(classBody);
  Iterator it=classBody.members().iterator();
  while (it.hasNext()) {
    Object next=it.next();
    if (next instanceof polyglot.ast.MethodDecl) {
      createMethodDecl((polyglot.ast.MethodDecl)next);
    }
 else     if (next instanceof polyglot.ast.FieldDecl) {
      createFieldDecl((polyglot.ast.FieldDecl)next);
    }
 else     if (next instanceof polyglot.ast.ConstructorDecl) {
      createConstructorDecl((polyglot.ast.ConstructorDecl)next);
    }
 else     if (next instanceof polyglot.ast.ClassDecl) {
    }
 else     if (next instanceof polyglot.ast.Initializer) {
      createInitializer((polyglot.ast.Initializer)next);
    }
 else {
      throw new RuntimeException("String_Node_Str");
    }
  }
  handlePrivateAccessors(classBody);
}
Program: 88672
Project: 88672
Buggy source:
public void resolveFromJavaFile(soot.SootClass sc){
  sootClass=sc;
  resolveTypes();
  makeASTMap();
  ClassLiteralChecker classLitChecker=new ClassLiteralChecker();
  astNode.visit(classLitChecker);
  ArrayList classLitList=classLitChecker.getList();
  if (!classLitList.isEmpty()) {
    String methodName="String_Node_Str";
    soot.Type methodRetType=soot.RefType.v("String_Node_Str");
    ArrayList paramTypes=new ArrayList();
    paramTypes.add(soot.RefType.v("String_Node_Str"));
    if (!sc.declaresMethod(methodName,paramTypes,methodRetType)) {
      soot.SootMethod sootMethod=new soot.SootMethod(methodName,paramTypes,methodRetType,soot.Modifier.STATIC);
      ClassLiteralMethodSource mSrc=new ClassLiteralMethodSource();
      sootMethod.setSource(mSrc);
      sc.addMethod(sootMethod);
    }
  }
  Iterator classLitIt=classLitList.iterator();
  while (classLitIt.hasNext()) {
    polyglot.ast.ClassLit classLit=(polyglot.ast.ClassLit)classLitIt.next();
    String fieldName="String_Node_Str";
    String type=Util.getSootType(classLit.typeNode().type()).toString();
    type=soot.util.StringTools.replaceAll(type,"String_Node_Str","String_Node_Str");
    fieldName=fieldName + type;
    soot.Type fieldType=soot.RefType.v("String_Node_Str");
    if (!sc.declaresField(fieldName,fieldType)) {
      soot.SootField sootField=new soot.SootField(fieldName,fieldType,soot.Modifier.STATIC);
      sc.addField(sootField);
    }
  }
  AssertStmtChecker asc=new AssertStmtChecker();
  astNode.visit(asc);
  if (asc.isHasAssert()) {
    handleAssert();
  }
  if (astNode instanceof polyglot.ast.SourceFile) {
    createClassToSourceMap((polyglot.ast.SourceFile)astNode);
    createSource((polyglot.ast.SourceFile)astNode);
  }
  addSourceFileTag(sc);
}

Fixed version (ground truth):
public void resolveFromJavaFile(soot.SootClass sc){
  sootClass=sc;
  resolveTypes();
  makeASTMap();
  if (astNode instanceof polyglot.ast.SourceFile) {
    createClassToSourceMap((polyglot.ast.SourceFile)astNode);
    createSource((polyglot.ast.SourceFile)astNode);
  }
  addSourceFileTag(sc);
}
Program: 88674
Project: 88674
Buggy source:
public void update(){
  out.add(new jedd.internal.RelationContainer(new jedd.Attribute[]{srcc.v(),srcm.v(),stmt.v(),tgtc.v(),kind.v(),tgtm.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v(),ST.v(),V2.v(),FD.v(),T2.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),jedd.internal.Jedd.v().copy(jedd.internal.Jedd.v().replace(jedd.internal.Jedd.v().project(in.get(),new jedd.PhysicalDomain[]{H1.v(),V1.v()}),new jedd.PhysicalDomain[]{V2.v()},new jedd.PhysicalDomain[]{V1.v()}),new jedd.PhysicalDomain[]{ST.v()},new jedd.PhysicalDomain[]{V2.v()})));
}

Fixed version (ground truth):
public void update(){
  out.add(new jedd.internal.RelationContainer(new jedd.Attribute[]{srcc.v(),srcm.v(),stmt.v(),tgtc.v(),kind.v(),tgtm.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v(),ST.v(),V2.v(),FD.v(),T2.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),jedd.internal.Jedd.v().copy(jedd.internal.Jedd.v().replace(jedd.internal.Jedd.v().project(in.get(),new jedd.PhysicalDomain[]{V1.v(),H1.v()}),new jedd.PhysicalDomain[]{V2.v()},new jedd.PhysicalDomain[]{V1.v()}),new jedd.PhysicalDomain[]{ST.v()},new jedd.PhysicalDomain[]{V2.v()})));
}
Program: 88675
Project: 88675
Buggy source:
public int size(){
  return (int)new jedd.internal.RelationContainer(new jedd.Attribute[]{kind.v(),stmt.v(),srcm.v(),tgtm.v(),srcc.v(),tgtc.v()},new jedd.PhysicalDomain[]{FD.v(),ST.v(),T1.v(),T2.v(),V1.v(),V2.v()},("String_Node_Str" + "String_Node_Str"),edges).size();
}

Fixed version (ground truth):
public int size(){
  return (int)new jedd.internal.RelationContainer(new jedd.Attribute[]{stmt.v(),srcm.v(),tgtc.v(),srcc.v(),tgtm.v(),kind.v()},new jedd.PhysicalDomain[]{ST.v(),T1.v(),V2.v(),V1.v(),T2.v(),FD.v()},("String_Node_Str" + "String_Node_Str"),edges).size();
}
Program: 88676
Project: 88676
Buggy source:
public Rsrcc_srcm_stmt_kind_tgtc_tgtm edges(){
  return new Rsrcc_srcm_stmt_kind_tgtc_tgtmBDD(new jedd.internal.RelationContainer(new jedd.Attribute[]{kind.v(),stmt.v(),srcm.v(),tgtm.v(),srcc.v(),tgtc.v()},new jedd.PhysicalDomain[]{FD.v(),ST.v(),T1.v(),T2.v(),V1.v(),V2.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"),edges),"String_Node_Str");
}

Fixed version (ground truth):
public Rsrcc_srcm_stmt_kind_tgtc_tgtm edges(){
  return new Rsrcc_srcm_stmt_kind_tgtc_tgtmBDD(new jedd.internal.RelationContainer(new jedd.Attribute[]{stmt.v(),srcm.v(),tgtc.v(),srcc.v(),tgtm.v(),kind.v()},new jedd.PhysicalDomain[]{ST.v(),T1.v(),V2.v(),V1.v(),T2.v(),FD.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"),edges),"String_Node_Str");
}
Program: 88677
Project: 88677
Buggy source:
public boolean update(){
  final jedd.internal.RelationContainer newEdges=new jedd.internal.RelationContainer(new jedd.Attribute[]{srcc.v(),srcm.v(),stmt.v(),kind.v(),tgtc.v(),tgtm.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v(),ST.v(),FD.v(),V2.v(),T2.v()},("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"),in.get());
  newEdges.eqMinus(edges);
  edges.eqUnion(newEdges);
  out.add(new jedd.internal.RelationContainer(new jedd.Attribute[]{kind.v(),stmt.v(),srcm.v(),tgtm.v(),srcc.v(),tgtc.v()},new jedd.PhysicalDomain[]{FD.v(),ST.v(),T1.v(),T2.v(),V1.v(),V2.v()},("String_Node_Str" + "String_Node_Str"),newEdges));
  return !jedd.internal.Jedd.v().equals(jedd.internal.Jedd.v().read(newEdges),jedd.internal.Jedd.v().falseBDD());
}

Fixed version (ground truth):
public boolean update(){
  final jedd.internal.RelationContainer newEdges=new jedd.internal.RelationContainer(new jedd.Attribute[]{srcc.v(),srcm.v(),stmt.v(),kind.v(),tgtc.v(),tgtm.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v(),ST.v(),FD.v(),V2.v(),T2.v()},("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"),in.get());
  newEdges.eqMinus(edges);
  edges.eqUnion(newEdges);
  out.add(new jedd.internal.RelationContainer(new jedd.Attribute[]{stmt.v(),srcm.v(),tgtc.v(),srcc.v(),tgtm.v(),kind.v()},new jedd.PhysicalDomain[]{ST.v(),T1.v(),V2.v(),V1.v(),T2.v(),FD.v()},("String_Node_Str" + "String_Node_Str"),newEdges));
  return !jedd.internal.Jedd.v().equals(jedd.internal.Jedd.v().read(newEdges),jedd.internal.Jedd.v().falseBDD());
}
Program: 88678
Project: 88678
Buggy source:
public Rsrcc_srcm_stmt_kind_tgtc_tgtm edgesOutOf(MethodOrMethodContext m){
  return new Rsrcc_srcm_stmt_kind_tgtc_tgtmBDD(new jedd.internal.RelationContainer(new jedd.Attribute[]{kind.v(),stmt.v(),srcm.v(),tgtm.v(),srcc.v(),tgtc.v()},new jedd.PhysicalDomain[]{FD.v(),ST.v(),T1.v(),T2.v(),V1.v(),V2.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"),jedd.internal.Jedd.v().join(jedd.internal.Jedd.v().read(edges),jedd.internal.Jedd.v().literal(new Object[]{m.context(),m.method()},new jedd.Attribute[]{ctxt.v(),method.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v()}),new jedd.PhysicalDomain[]{T1.v(),V1.v()})),"String_Node_Str");
}

Fixed version (ground truth):
public Rsrcc_srcm_stmt_kind_tgtc_tgtm edgesOutOf(MethodOrMethodContext m){
  return new Rsrcc_srcm_stmt_kind_tgtc_tgtmBDD(new jedd.internal.RelationContainer(new jedd.Attribute[]{stmt.v(),srcm.v(),tgtc.v(),srcc.v(),kind.v(),tgtm.v()},new jedd.PhysicalDomain[]{ST.v(),T1.v(),V2.v(),V1.v(),FD.v(),T2.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"),jedd.internal.Jedd.v().join(jedd.internal.Jedd.v().read(edges),jedd.internal.Jedd.v().literal(new Object[]{m.context(),m.method()},new jedd.Attribute[]{ctxt.v(),method.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v()}),new jedd.PhysicalDomain[]{T1.v(),V1.v()})),"String_Node_Str");
}
Program: 88679
Project: 88679
Buggy source:
public void addEntryPoint(MethodOrMethodContext m){
  entryPoints.eqUnion(jedd.internal.Jedd.v().literal(new Object[]{m.method()},new jedd.Attribute[]{method.v()},new jedd.PhysicalDomain[]{T1.v()}));
}

Fixed version (ground truth):
public void addEntryPoint(MethodOrMethodContext m){
  entryPoints.eqUnion(jedd.internal.Jedd.v().literal(new Object[]{m.method()},new jedd.Attribute[]{method.v()},new jedd.PhysicalDomain[]{T2.v()}));
}
Program: 88681
Project: 88681
Buggy source:
public void update(){
  final jedd.internal.RelationContainer methods=new jedd.internal.RelationContainer(new jedd.Attribute[]{ctxt.v(),method.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),in.get());
  Rsrcc_srcm_stmt_kind_tgtc_tgtm edges=cicg.edgesOutOf(new Rctxt_methodBDD(new jedd.internal.RelationContainer(new jedd.Attribute[]{method.v(),ctxt.v()},new jedd.PhysicalDomain[]{T1.v(),V1.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"),jedd.internal.Jedd.v().join(jedd.internal.Jedd.v().read(jedd.internal.Jedd.v().project(methods,new jedd.PhysicalDomain[]{V1.v()})),jedd.internal.Jedd.v().literal(new Object[]{null},new jedd.Attribute[]{ctxt.v()},new jedd.PhysicalDomain[]{V1.v()}),new jedd.PhysicalDomain[]{})),"String_Node_Str"));
  out.add(new jedd.internal.RelationContainer(new jedd.Attribute[]{kind.v(),stmt.v(),srcm.v(),tgtm.v(),tgtc.v(),srcc.v()},new jedd.PhysicalDomain[]{FD.v(),ST.v(),T1.v(),T2.v(),V2.v(),V1.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),jedd.internal.Jedd.v().join(jedd.internal.Jedd.v().read(jedd.internal.Jedd.v().project(edges.get(),new jedd.PhysicalDomain[]{V1.v()})),methods,new jedd.PhysicalDomain[]{T1.v()})));
}

Fixed version (ground truth):
public void update(){
  final jedd.internal.RelationContainer methods=new jedd.internal.RelationContainer(new jedd.Attribute[]{ctxt.v(),method.v()},new jedd.PhysicalDomain[]{V1.v(),T1.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),in.get());
  Rsrcc_srcm_stmt_kind_tgtc_tgtm edges=cicg.edgesOutOf(new Rctxt_methodBDD(new jedd.internal.RelationContainer(new jedd.Attribute[]{method.v(),ctxt.v()},new jedd.PhysicalDomain[]{T1.v(),V1.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"),jedd.internal.Jedd.v().join(jedd.internal.Jedd.v().read(jedd.internal.Jedd.v().project(methods,new jedd.PhysicalDomain[]{V1.v()})),jedd.internal.Jedd.v().literal(new Object[]{null},new jedd.Attribute[]{ctxt.v()},new jedd.PhysicalDomain[]{V1.v()}),new jedd.PhysicalDomain[]{})),"String_Node_Str"));
  out.add(new jedd.internal.RelationContainer(new jedd.Attribute[]{stmt.v(),srcm.v(),tgtc.v(),tgtm.v(),kind.v(),srcc.v()},new jedd.PhysicalDomain[]{ST.v(),T1.v(),V2.v(),T2.v(),FD.v(),V1.v()},("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"),jedd.internal.Jedd.v().join(jedd.internal.Jedd.v().read(jedd.internal.Jedd.v().project(edges.get(),new jedd.PhysicalDomain[]{V1.v()})),methods,new jedd.PhysicalDomain[]{T1.v()})));
}
Program: 88682
Project: 88682
Buggy source:
private void createClassToSourceMap(polyglot.ast.SourceFile src){
  String srcName=src.source().name();
  String srcFileName=null;
  if (src.package_() != null) {
    String slashedPkg=soot.util.StringTools.replaceAll(src.package_().package_().fullName(),"String_Node_Str",System.getProperty("String_Node_Str"));
    srcFileName=srcName.substring(srcName.lastIndexOf(slashedPkg));
  }
 else {
    srcFileName=srcName.substring(srcName.lastIndexOf(System.getProperty("String_Node_Str")) + 1);
  }
  ArrayList list=new ArrayList();
  Iterator it=src.decls().iterator();
  while (it.hasNext()) {
    polyglot.ast.ClassDecl nextDecl=(polyglot.ast.ClassDecl)it.next();
    addToClassToSourceMap(Util.getSootType(nextDecl.type()).toString(),srcFileName);
  }
}

Fixed version (ground truth):
private void createClassToSourceMap(polyglot.ast.SourceFile src){
  String srcName=src.source().path();
  String srcFileName=null;
  if (src.package_() != null) {
    String slashedPkg=soot.util.StringTools.replaceAll(src.package_().package_().fullName(),"String_Node_Str",System.getProperty("String_Node_Str"));
    srcFileName=srcName.substring(srcName.lastIndexOf(slashedPkg));
  }
 else {
    srcFileName=srcName.substring(srcName.lastIndexOf(System.getProperty("String_Node_Str")) + 1);
  }
  ArrayList list=new ArrayList();
  Iterator it=src.decls().iterator();
  while (it.hasNext()) {
    polyglot.ast.ClassDecl nextDecl=(polyglot.ast.ClassDecl)it.next();
    addToClassToSourceMap(Util.getSootType(nextDecl.type()).toString(),srcFileName);
  }
}
Program: 88683
Project: 88683
Buggy source:
private void createClassToSourceMap(polyglot.ast.SourceFile src){
  String srcName=src.source().name();
  String srcFileName=null;
  if (src.package_() != null) {
    srcFileName=srcName.substring(srcName.lastIndexOf(src.package_().toString()));
  }
 else {
    srcFileName=srcName.substring(srcName.lastIndexOf(System.getProperty("String_Node_Str")) + 1);
  }
  ArrayList list=new ArrayList();
  Iterator it=src.decls().iterator();
  while (it.hasNext()) {
    polyglot.ast.ClassDecl nextDecl=(polyglot.ast.ClassDecl)it.next();
    addToClassToSourceMap(Util.getSootType(nextDecl.type()).toString(),srcFileName);
  }
}

Fixed version (ground truth):
private void createClassToSourceMap(polyglot.ast.SourceFile src){
  String srcName=src.source().name();
  String srcFileName=null;
  if (src.package_() != null) {
    String slashedPkg=soot.util.StringTools.replaceAll(src.package_().package_().fullName(),"String_Node_Str",System.getProperty("String_Node_Str"));
    srcFileName=srcName.substring(srcName.lastIndexOf(slashedPkg));
  }
 else {
    srcFileName=srcName.substring(srcName.lastIndexOf(System.getProperty("String_Node_Str")) + 1);
  }
  ArrayList list=new ArrayList();
  Iterator it=src.decls().iterator();
  while (it.hasNext()) {
    polyglot.ast.ClassDecl nextDecl=(polyglot.ast.ClassDecl)it.next();
    addToClassToSourceMap(Util.getSootType(nextDecl.type()).toString(),srcFileName);
  }
}
Program: 88685
Project: 88685
Buggy source:
/** 
 * ClassToSourceMap is for classes whos names don't match the source file name - ex: multiple top level classes in a single file
 */
private void addToClassToSourceMap(String className,String sourceName){
  if (sourceToClassMap == null) {
    sourceToClassMap=new HashMap();
  }
  if (soot.SourceLocator.v().getSourceToClassMap() == null) {
    soot.SourceLocator.v().setSourceToClassMap(sourceToClassMap);
  }
  if (!soot.SourceLocator.v().getSourceToClassMap().containsKey(className)) {
    soot.SourceLocator.v().addToSourceToClassMap(className,sourceName);
  }
}

Fixed version (ground truth):
/** 
 * ClassToSourceMap is for classes whos names don't match the source file name - ex: multiple top level classes in a single file
 */
private void addToClassToSourceMap(String className,String sourceName){
  if (classToSourceMap == null) {
    classToSourceMap=new HashMap();
  }
  classToSourceMap.put(className,sourceName);
}
Program: 88687
Project: 88687
Buggy source:
/** 
 * adds source file tag to each sootclass
 */
private void addSourceFileTag(soot.SootClass sc){
  if (sc.getTag("String_Node_Str") != null)   return;
  String name=Util.getSourceFileOfClass(sc);
  if (soot.SourceLocator.v().getSourceToClassMap() != null) {
    if (soot.SourceLocator.v().getSourceToClassMap().get(name) != null) {
      name=(String)soot.SourceLocator.v().getSourceToClassMap().get(name);
    }
  }
  name+="String_Node_Str";
  sc.addTag(new soot.tagkit.SourceFileTag(name));
}

Fixed version (ground truth):
/** 
 * adds source file tag to each sootclass
 */
private void addSourceFileTag(soot.SootClass sc){
  if (sc.getTag("String_Node_Str") != null)   return;
  String name=Util.getSourceFileOfClass(sc);
  if (classToSourceMap != null) {
    if (classToSourceMap.containsKey(name)) {
      name=(String)classToSourceMap.get(name);
    }
  }
  name+="String_Node_Str";
  sc.addTag(new soot.tagkit.SourceFileTag(name));
}
Program: 88689
Project: 88689
Buggy source:
public ClassDeclFinder(){
  declFound=null;
}

Fixed version (ground truth):
public ClassDeclFinder(){
  declsFound=new ArrayList();
}
Program: 88690
Project: 88690
Buggy source:
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.ClassDecl) {
    if (((polyglot.ast.ClassDecl)n).type().equals(typeToFind)) {
      declFound=(polyglot.ast.ClassDecl)n;
    }
  }
  return enter(n);
}

Fixed version (ground truth):
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.ClassDecl) {
    if (typesToFind.contains(((polyglot.ast.ClassDecl)n).type())) {
      declsFound.add((polyglot.ast.ClassDecl)n);
    }
  }
  return enter(n);
}
Program: 88692
Project: 88692
Buggy source:
/** 
 * resolve class types - recursively resolving outer class if nec.
 */
private void resolveClassType(polyglot.types.ClassType classType){
  soot.Type sootClassType;
  if (classType.isNested()) {
    resolveClassType(classType.outer());
  }
  if (classType.isLocal()) {
    resolveLocalClass(classType);
  }
  if (classType.isAnonymous()) {
    resolveAnonClass(classType);
  }
  sootClassType=Util.getSootType(classType);
  ClassDeclFinder finder=new ClassDeclFinder();
  finder.typeToFind(classType);
  astNode.visit(finder);
  if (finder.declFound() != null) {
    addNameToAST(((soot.RefType)sootClassType).getClassName());
  }
  SootResolver.v().assertResolvedClassForType(sootClassType);
}

Fixed version (ground truth):
/** 
 * resolve class types - recursively resolving outer class if nec.
 */
private void resolveClassType(polyglot.types.ClassType classType){
  soot.Type sootClassType;
  if (classType.isNested()) {
    resolveClassType(classType.outer());
  }
  if (classType.isLocal()) {
    resolveLocalClass(classType);
  }
  if (classType.isAnonymous()) {
    resolveAnonClass(classType);
  }
  sootClassType=Util.getSootType(classType);
  if (classTypesFound == null) {
    classTypesFound=new ArrayList();
  }
  classTypesFound.add(classType);
  SootResolver.v().assertResolvedClassForType(sootClassType);
}
Program: 88695
Project: 88695
Buggy source:
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.LocalDecl) {
    polyglot.ast.LocalDecl ld=(polyglot.ast.LocalDecl)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  if (n instanceof polyglot.ast.Formal) {
    polyglot.ast.Formal ld=(polyglot.ast.Formal)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  if (n instanceof polyglot.ast.New) {
    if (((polyglot.ast.New)n).anonType() != null) {
      inners.add(new polyglot.util.IdentityKey(((polyglot.ast.New)n).anonType()));
    }
  }
  if (n instanceof polyglot.ast.LocalClassDecl) {
    inners.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalClassDecl)n).decl().type()));
  }
  return enter(n);
}

Fixed version (ground truth):
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.LocalDecl) {
    polyglot.ast.LocalDecl ld=(polyglot.ast.LocalDecl)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  if (n instanceof polyglot.ast.Formal) {
    polyglot.ast.Formal ld=(polyglot.ast.Formal)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  return enter(n);
}
Program: 88696
Project: 88696
Buggy source:
private static soot.Local getLocalOfType(soot.Body body,soot.Type type){
  Iterator it=body.getLocals().iterator();
  while (it.hasNext()) {
    soot.Local l=(soot.Local)it.next();
    if (l.getType().equals(type)) {
      return l;
    }
  }
  return null;
}

Fixed version (ground truth):
private static soot.Local getLocalOfType(soot.Body body,soot.Type type){
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  Iterator it=body.getLocals().iterator();
  while (it.hasNext()) {
    soot.Local l=(soot.Local)it.next();
    if (fh.canStoreType(l.getType(),type)) {
      return l;
    }
  }
  return null;
}
Program: 88697
Project: 88697
Buggy source:
public static soot.Local getThis(soot.Type sootType,soot.Body body,HashMap getThisMap,LocalGenerator lg){
  if (getThisMap.containsKey(sootType)) {
    return (soot.Local)getThisMap.get(sootType);
  }
  soot.Local specialThisLocal=body.getThisLocal();
  if (specialThisLocal.getType().equals(sootType)) {
    getThisMap.put(sootType,specialThisLocal);
    return specialThisLocal;
  }
  if (bodyHasLocal(body,sootType)) {
    soot.Local l=getLocalOfType(body,sootType);
    getThisMap.put(sootType,l);
    return l;
  }
  soot.SootClass classToInvoke=((soot.RefType)specialThisLocal.getType()).getSootClass();
  soot.SootField outerThisField=classToInvoke.getFieldByName("String_Node_Str");
  soot.Local t1=lg.generateLocal(outerThisField.getType());
  soot.jimple.FieldRef fieldRef=soot.jimple.Jimple.v().newInstanceFieldRef(specialThisLocal,outerThisField);
  soot.jimple.AssignStmt fieldAssignStmt=soot.jimple.Jimple.v().newAssignStmt(t1,fieldRef);
  body.getUnits().add(fieldAssignStmt);
  if (t1.getType().equals(sootType)) {
    getThisMap.put(sootType,t1);
    return t1;
  }
  soot.Local t2=t1;
  return getThisGivenOuter(sootType,getThisMap,body,lg,t2);
}

Fixed version (ground truth):
public static soot.Local getThis(soot.Type sootType,soot.Body body,HashMap getThisMap,LocalGenerator lg){
  if (InitialResolver.v().hierarchy() == null) {
    InitialResolver.v().hierarchy(new soot.FastHierarchy());
  }
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  if (getThisMap.containsKey(sootType)) {
    return (soot.Local)getThisMap.get(sootType);
  }
  soot.Local specialThisLocal=body.getThisLocal();
  if (fh.canStoreType(specialThisLocal.getType(),sootType)) {
    getThisMap.put(sootType,specialThisLocal);
    return specialThisLocal;
  }
  if (bodyHasLocal(body,sootType)) {
    soot.Local l=getLocalOfType(body,sootType);
    getThisMap.put(sootType,l);
    return l;
  }
  soot.SootClass classToInvoke=((soot.RefType)specialThisLocal.getType()).getSootClass();
  soot.SootField outerThisField=classToInvoke.getFieldByName("String_Node_Str");
  soot.Local t1=lg.generateLocal(outerThisField.getType());
  soot.jimple.FieldRef fieldRef=soot.jimple.Jimple.v().newInstanceFieldRef(specialThisLocal,outerThisField);
  soot.jimple.AssignStmt fieldAssignStmt=soot.jimple.Jimple.v().newAssignStmt(t1,fieldRef);
  body.getUnits().add(fieldAssignStmt);
  if (fh.canStoreType(t1.getType(),sootType)) {
    getThisMap.put(sootType,t1);
    return t1;
  }
  soot.Local t2=t1;
  return getThisGivenOuter(sootType,getThisMap,body,lg,t2);
}
Program: 88698
Project: 88698
Buggy source:
public static soot.Local getThisGivenOuter(soot.Type sootType,HashMap getThisMap,soot.Body body,LocalGenerator lg,soot.Local t2){
  while (!t2.getType().equals(sootType)) {
    soot.SootClass classToInvoke=((soot.RefType)t2.getType()).getSootClass();
    soot.SootMethod methToInvoke=makeOuterThisAccessMethod(classToInvoke);
    soot.Local t3=lg.generateLocal(methToInvoke.getReturnType());
    ArrayList methParams=new ArrayList();
    methParams.add(t2);
    soot.Local res=getPrivateAccessFieldInvoke(methToInvoke,methParams,body,lg);
    soot.jimple.AssignStmt assign=soot.jimple.Jimple.v().newAssignStmt(t3,res);
    body.getUnits().add(assign);
    t2=t3;
  }
  getThisMap.put(sootType,t2);
  return t2;
}

Fixed version (ground truth):
public static soot.Local getThisGivenOuter(soot.Type sootType,HashMap getThisMap,soot.Body body,LocalGenerator lg,soot.Local t2){
  if (InitialResolver.v().hierarchy() == null) {
    InitialResolver.v().hierarchy(new soot.FastHierarchy());
  }
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  while (!fh.canStoreType(t2.getType(),sootType)) {
    soot.SootClass classToInvoke=((soot.RefType)t2.getType()).getSootClass();
    soot.SootMethod methToInvoke=makeOuterThisAccessMethod(classToInvoke);
    soot.Local t3=lg.generateLocal(methToInvoke.getReturnType());
    ArrayList methParams=new ArrayList();
    methParams.add(t2);
    soot.Local res=getPrivateAccessFieldInvoke(methToInvoke,methParams,body,lg);
    soot.jimple.AssignStmt assign=soot.jimple.Jimple.v().newAssignStmt(t3,res);
    body.getUnits().add(assign);
    t2=t3;
  }
  getThisMap.put(sootType,t2);
  return t2;
}
Program: 88699
Project: 88699
Buggy source:
private static boolean bodyHasLocal(soot.Body body,soot.Type type){
  Iterator it=body.getLocals().iterator();
  while (it.hasNext()) {
    soot.Local l=(soot.Local)it.next();
    if (l.getType().equals(type)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean bodyHasLocal(soot.Body body,soot.Type type){
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  Iterator it=body.getLocals().iterator();
  while (it.hasNext()) {
    soot.Local l=(soot.Local)it.next();
    if (fh.canStoreType(l.getType(),type)) {
      return true;
    }
  }
  return false;
}
Program: 88704
Project: 88704
Buggy source:
/** 
 * Used to add an edge to the call graph. Returns true iff the edge was not already present. 
 */
public boolean addEdge(Edge e){
  if (!edges.add(e))   return false;
  stream.add(e);
  Edge position=null;
  if (e.srcUnit() != null) {
    position=(Edge)srcUnitToEdge.get(e.srcUnit());
    if (position == null) {
      srcUnitToEdge.put(e.srcUnit(),e);
      position=(Edge)srcMethodToEdge.get(e.getSrc());
      if (position == null) {
        srcMethodToEdge.put(e.getSrc(),e);
        position=dummy;
      }
    }
  }
 else {
    position=(Edge)srcMethodToEdge.get(e.getSrc());
    if (position == null) {
      srcMethodToEdge.put(e.getSrc(),e);
      position=dummy;
    }
  }
  e.insertAfterBySrc(position);
  position=(Edge)tgtToEdge.get(e.getTgt());
  if (position == null) {
    tgtToEdge.put(e.getTgt(),e);
    position=dummy;
  }
  e.insertAfterByTgt(position);
  return true;
}

Fixed version (ground truth):
/** 
 * Used to add an edge to the call graph. Returns true iff the edge was not already present. 
 */
public boolean addEdge(Edge e){
  if (!edges.add(e))   return false;
  stream.add(e);
  Edge position=null;
  if (e.srcUnit() != null) {
    position=(Edge)srcUnitToEdge.get(e.srcUnit());
    if (position == null) {
      srcUnitToEdge.put(e.srcUnit(),e);
      position=(Edge)srcMethodToEdge.get(e.getSrc());
      if (position == null) {
        srcMethodToEdge.put(e.getSrc(),e);
        position=dummy;
      }
 else {
        while (position.nextBySrc().getSrc() == e.getSrc()) {
          position=position.nextBySrc();
        }
      }
    }
  }
 else {
    position=(Edge)srcMethodToEdge.get(e.getSrc());
    if (position == null) {
      srcMethodToEdge.put(e.getSrc(),e);
      position=dummy;
    }
 else {
      while (position.nextBySrc().getSrc() == e.getSrc()) {
        position=position.nextBySrc();
      }
    }
  }
  e.insertAfterBySrc(position);
  position=(Edge)tgtToEdge.get(e.getTgt());
  if (position == null) {
    tgtToEdge.put(e.getTgt(),e);
    position=dummy;
  }
  e.insertAfterByTgt(position);
  return true;
}
Program: 88705
Project: 88705
Buggy source:
/** 
 * Returns only the application entry points, not including entry points invoked implicitly by the VM. 
 */
public List application(){
  List ret=new ArrayList();
  addMethod(ret,Scene.v().getMainClass(),sigMain);
  addMethod(ret,Scene.v().getMainClass(),sigClinit);
  return ret;
}

Fixed version (ground truth):
/** 
 * Returns only the application entry points, not including entry points invoked implicitly by the VM. 
 */
public List application(){
  List ret=new ArrayList();
  addMethod(ret,Scene.v().getMainClass(),sigMain);
  for (Iterator clinitIt=clinitsOf(Scene.v().getMainClass()).iterator(); clinitIt.hasNext(); ) {
    final SootMethod clinit=(SootMethod)clinitIt.next();
    ret.add(clinit);
  }
  return ret;
}
Program: 88706
Project: 88706
Buggy source:
public void addStringConstant(Local l,Object srcContext,String constant){
  for (Iterator siteIt=((Collection)stringConstToSites.get(l)).iterator(); siteIt.hasNext(); ) {
    final VirtualCallSite site=(VirtualCallSite)siteIt.next();
    if (constant == null) {
      if (options.verbose()) {
        G.v().out.println("String_Node_Str" + site.getContainer() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
    }
 else {
      if (constant.charAt(0) == '[') {
        if (constant.length() > 1 && constant.charAt(1) == 'L' && constant.charAt(constant.length() - 1) == ';') {
          constant=constant.substring(2,constant.length() - 1);
        }
 else         continue;
      }
      if (!Scene.v().containsClass(constant)) {
        if (options.verbose()) {
          G.v().out.println("String_Node_Str" + constant + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
 else {
        SootClass sootcls=Scene.v().getSootClass(constant);
        if (!sootcls.isApplicationClass()) {
          sootcls.setLibraryClass();
        }
        if (sootcls.declaresMethod(sigClinit)) {
          cm.addStaticEdge(MethodContext.v(site.getContainer(),srcContext),site.getStmt(),sootcls.getMethod(sigClinit),Edge.CLINIT);
        }
      }
    }
  }
}

Fixed version (ground truth):
public void addStringConstant(Local l,Object srcContext,String constant){
  for (Iterator siteIt=((Collection)stringConstToSites.get(l)).iterator(); siteIt.hasNext(); ) {
    final VirtualCallSite site=(VirtualCallSite)siteIt.next();
    if (constant == null) {
      if (options.verbose()) {
        G.v().out.println("String_Node_Str" + site.getContainer() + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
    }
 else {
      if (constant.charAt(0) == '[') {
        if (constant.length() > 1 && constant.charAt(1) == 'L' && constant.charAt(constant.length() - 1) == ';') {
          constant=constant.substring(2,constant.length() - 1);
        }
 else         continue;
      }
      if (!Scene.v().containsClass(constant)) {
        if (options.verbose()) {
          G.v().out.println("String_Node_Str" + constant + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
        }
      }
 else {
        SootClass sootcls=Scene.v().getSootClass(constant);
        if (!sootcls.isApplicationClass()) {
          sootcls.setLibraryClass();
        }
        for (Iterator clinitIt=EntryPoints.v().clinitsOf(sootcls).iterator(); clinitIt.hasNext(); ) {
          final SootMethod clinit=(SootMethod)clinitIt.next();
          cm.addStaticEdge(MethodContext.v(site.getContainer(),srcContext),site.getStmt(),clinit,Edge.CLINIT);
        }
      }
    }
  }
}
Program: 88708
Project: 88708
Buggy source:
private void constantForName(String cls,SootMethod src,Stmt srcUnit){
  if (cls.charAt(0) == '[') {
    if (cls.charAt(1) == 'L' && cls.charAt(cls.length() - 1) == ';') {
      cls=cls.substring(2,cls.length() - 1);
      constantForName(cls,src,srcUnit);
    }
  }
 else {
    if (!Scene.v().containsClass(cls)) {
      if (options.verbose()) {
        G.v().out.println("String_Node_Str" + cls + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
    }
 else {
      SootClass sootcls=Scene.v().getSootClass(cls);
      if (!sootcls.isApplicationClass()) {
        sootcls.setLibraryClass();
      }
      addEdge(src,srcUnit,sootcls,sigClinit,Edge.CLINIT);
    }
  }
}

Fixed version (ground truth):
private void constantForName(String cls,SootMethod src,Stmt srcUnit){
  if (cls.charAt(0) == '[') {
    if (cls.charAt(1) == 'L' && cls.charAt(cls.length() - 1) == ';') {
      cls=cls.substring(2,cls.length() - 1);
      constantForName(cls,src,srcUnit);
    }
  }
 else {
    if (!Scene.v().containsClass(cls)) {
      if (options.verbose()) {
        G.v().out.println("String_Node_Str" + cls + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
      }
    }
 else {
      SootClass sootcls=Scene.v().getSootClass(cls);
      if (!sootcls.isApplicationClass()) {
        sootcls.setLibraryClass();
      }
      for (Iterator clinitIt=EntryPoints.v().clinitsOf(sootcls).iterator(); clinitIt.hasNext(); ) {
        final SootMethod clinit=(SootMethod)clinitIt.next();
        cicg.addEdge(new Edge(src,srcUnit,clinit,Edge.CLINIT));
      }
    }
  }
}
Program: 88709
Project: 88709
Buggy source:
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String fileName=className.replace('.',File.separatorChar) + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(className);
  if (file == null)   return null;
  return new CoffiClassSource(className,file.inputStream());
}

Fixed version (ground truth):
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String fileName=className.replace('.',File.separatorChar) + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(fileName);
  if (file == null)   return null;
  return new CoffiClassSource(className,file.inputStream());
}
Program: 88710
Project: 88710
Buggy source:
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String javaClassName=className;
  if (className.indexOf("String_Node_Str") != -1) {
    javaClassName=className.substring(0,className.indexOf("String_Node_Str"));
  }
  if (SourceLocator.v().getSourceToClassMap() != null) {
    if (SourceLocator.v().getSourceToClassMap().get(javaClassName) != null) {
      javaClassName=(String)SourceLocator.v().getSourceToClassMap().get(javaClassName);
    }
  }
  String fileName=javaClassName.replace('.',File.separatorChar) + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(className);
  if (file == null)   return null;
  if (file.file == null) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str");
  }
  return new JavaClassSource(className,file.file);
}

Fixed version (ground truth):
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String javaClassName=className;
  if (className.indexOf("String_Node_Str") != -1) {
    javaClassName=className.substring(0,className.indexOf("String_Node_Str"));
  }
  if (SourceLocator.v().getSourceToClassMap() != null) {
    if (SourceLocator.v().getSourceToClassMap().get(javaClassName) != null) {
      javaClassName=(String)SourceLocator.v().getSourceToClassMap().get(javaClassName);
    }
  }
  String fileName=javaClassName.replace('.',File.separatorChar) + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(fileName);
  if (file == null)   return null;
  if (file.file == null) {
    throw new RuntimeException("String_Node_Str" + className + "String_Node_Str");
  }
  return new JavaClassSource(className,file.file);
}
Program: 88711
Project: 88711
Buggy source:
public void resolve(SootClass sc){
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + className);
  SootResolver.v().getInitSourceResolver().formAst(fullPath.getPath(),SourceLocator.v().classPath());
  SootResolver.v().getInitSourceResolver().resolveFromJavaFile(sc);
}

Fixed version (ground truth):
public void resolve(SootClass sc){
  if (Options.v().verbose())   G.v().out.println("String_Node_Str" + className);
  SootResolver.v().getInitSourceResolver().formAst(fullPath.getPath(),SourceLocator.v().sourcePath());
  SootResolver.v().getInitSourceResolver().resolveFromJavaFile(sc);
}
Program: 88712
Project: 88712
Buggy source:
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String fileName=className.replace('.',File.separatorChar) + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(className);
  if (file == null)   return null;
  return new JimpleClassSource(className,file.inputStream());
}

Fixed version (ground truth):
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String fileName=className.replace('.',File.separatorChar) + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(fileName);
  if (file == null)   return null;
  return new JimpleClassSource(className,file.inputStream());
}
Program: 88713
Project: 88713
Buggy source:
private FoundFile lookupInDir(String dir,String fileName){
  File f=new File(dir + fileName);
  if (f.canRead()) {
    return new FoundFile(f);
  }
  return null;
}

Fixed version (ground truth):
private FoundFile lookupInDir(String dir,String fileName){
  File f=new File(dir + File.separatorChar + fileName);
  if (f.canRead()) {
    return new FoundFile(f);
  }
  return null;
}
Program: 88714
Project: 88714
Buggy source:
public InputStream inputStream(){
  try {
    if (file != null)     return new FileInputStream(file);
    return zipFile.getInputStream(entry);
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + e);
  }
}

Fixed version (ground truth):
public InputStream inputStream(){
  try {
    if (file != null)     return new FileInputStream(file);
    return doJDKBugWorkaround(zipFile.getInputStream(entry),entry.getSize());
  }
 catch (  IOException e) {
    throw new RuntimeException("String_Node_Str" + e);
  }
}
Program: 88718
Project: 88718
Buggy source:
/** 
 * Adds extra params
 */
private void handleFinalLocalParams(ArrayList sootParams,ArrayList sootParamTypes,soot.SootClass classToInvoke,polyglot.ast.ProcedureCall call){
  HashMap finalsMap=((soot.javaToJimple.PolyglotMethodSource)body.getMethod().getSource()).getFinalsMap();
  if (finalsMap != null) {
    if (finalsMap.containsKey(call)) {
      ArrayList finals=(ArrayList)finalsMap.get(call);
      if (finals != null) {
        Iterator it=finals.iterator();
        while (it.hasNext()) {
          polyglot.types.LocalInstance li=(polyglot.types.LocalInstance)((polyglot.util.IdentityKey)it.next()).object();
          sootParamTypes.add(Util.getSootType(li.type()));
          sootParams.add(getLocal(li));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Adds extra params
 */
private void handleFinalLocalParams(ArrayList sootParams,ArrayList sootParamTypes,soot.SootClass classToInvoke,polyglot.ast.ProcedureCall call){
  HashMap finalsMap=((soot.javaToJimple.PolyglotMethodSource)body.getMethod().getSource()).getFinalsMap();
  if (finalsMap != null) {
    if (finalsMap.containsKey(call)) {
      AnonLocalClassInfo info=(AnonLocalClassInfo)finalsMap.get(call);
      ArrayList finals=info.finalFields();
      if (finals != null) {
        Iterator it=finals.iterator();
        while (it.hasNext()) {
          polyglot.types.LocalInstance li=(polyglot.types.LocalInstance)((polyglot.util.IdentityKey)it.next()).object();
          sootParamTypes.add(Util.getSootType(li.type()));
          sootParams.add(getLocal(li));
        }
      }
    }
  }
}
Program: 88719
Project: 88719
Buggy source:
public polyglot.ast.Node leave(polyglot.ast.Node old,polyglot.ast.Node n,polyglot.visit.NodeVisitor visitor){
  if (n instanceof polyglot.ast.LocalDecl) {
    localDecls.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalDecl)n).localInstance()));
  }
  if (n instanceof polyglot.ast.Local) {
    locals.add(new polyglot.util.IdentityKey(((polyglot.ast.Local)n).localInstance()));
  }
  if (n instanceof polyglot.ast.Formal) {
    localDecls.add(new polyglot.util.IdentityKey(((polyglot.ast.Formal)n).localInstance()));
  }
  return n;
}

Fixed version (ground truth):
public polyglot.ast.Node leave(polyglot.ast.Node old,polyglot.ast.Node n,polyglot.visit.NodeVisitor visitor){
  if (n instanceof polyglot.ast.LocalDecl) {
    localDecls.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalDecl)n).localInstance()));
  }
  if (n instanceof polyglot.ast.Local) {
    if (!(locals.contains(new polyglot.util.IdentityKey(((polyglot.ast.Local)n).localInstance())))) {
      locals.add(new polyglot.util.IdentityKey(((polyglot.ast.Local)n).localInstance()));
    }
  }
  if (n instanceof polyglot.ast.Formal) {
    localDecls.add(new polyglot.util.IdentityKey(((polyglot.ast.Formal)n).localInstance()));
  }
  return n;
}
Program: 88725
Project: 88725
Buggy source:
public void caseDup1_x2Inst(Dup1_x2Inst i){
  Type opType=i.getOpType();
  Type under1Type=i.getUnder1Type();
  Type under2Type=i.getUnder2Type();
  if (isDwordType(opType)) {
    if (!isDwordType(under1Type) && !isDwordType(under2Type))     emit("String_Node_Str");
 else     throw new RuntimeException("String_Node_Str");
  }
 else {
    if (isDwordType(under1Type) || isDwordType(under2Type))     throw new RuntimeException("String_Node_Str");
  }
  emit("String_Node_Str");
}

Fixed version (ground truth):
public void caseDup1_x2Inst(Dup1_x2Inst i){
  Type opType=i.getOp1Type();
  Type under1Type=i.getUnder1Type();
  Type under2Type=i.getUnder2Type();
  if (isDwordType(opType)) {
    if (!isDwordType(under1Type) && !isDwordType(under2Type))     emit("String_Node_Str");
 else     throw new RuntimeException("String_Node_Str");
  }
 else {
    if (isDwordType(under1Type) || isDwordType(under2Type))     throw new RuntimeException("String_Node_Str");
  }
  emit("String_Node_Str");
}
Program: 88726
Project: 88726
Buggy source:
public void caseDup2_x1Inst(Dup2_x1Inst i){
  Type op1Type=i.getOp1Type();
  Type op2Type=i.getOp2Type();
  Type under1Type=i.getUnder1Type();
  if (isDwordType(under1Type)) {
    if (!isDwordType(op1Type) && !isDwordType(under2Type))     throw new RuntimeException("String_Node_Str");
 else     emit("String_Node_Str");
  }
 else {
    if (isDwordType(op1Type) || isDwordType(op2Type))     throw new RuntimeException("String_Node_Str");
  }
  emit("String_Node_Str");
}

Fixed version (ground truth):
public void caseDup2_x1Inst(Dup2_x1Inst i){
  Type op1Type=i.getOp1Type();
  Type op2Type=i.getOp2Type();
  Type under1Type=i.getUnder1Type();
  if (isDwordType(under1Type)) {
    if (!isDwordType(op1Type) && !isDwordType(op2Type))     throw new RuntimeException("String_Node_Str");
 else     emit("String_Node_Str");
  }
 else {
    if (isDwordType(op1Type) || isDwordType(op2Type))     throw new RuntimeException("String_Node_Str");
  }
  emit("String_Node_Str");
}