nus-yam/ex-repair huggingface dataset:
Program: 99834
Project: 99834
Buggy source:
protected void populateScope(JavaSourceAnalysisEngine engine,Collection<String> sources,List<String> libs) throws IOException {
  IDEIRTestUtil.populateScope(projectName,engine,sources,libs);
}

Fixed version (ground truth):
@Override protected void populateScope(JavaSourceAnalysisEngine engine,Collection<String> sources,List<String> libs) throws IOException {
  IDEIRTestUtil.populateScope(projectName,(JDTJavaSourceAnalysisEngine)engine,sources,libs);
}
Program: 99835
Project: 99835
Buggy source:
public static void populateScope(String projectName,JavaSourceAnalysisEngine engine,Collection<String> sources,List<String> libs) throws IOException {
}

Fixed version (ground truth):
public static void populateScope(String projectName,JDTJavaSourceAnalysisEngine engine,Collection<String> sources,List<String> libs) throws IOException {
}
Program: 99836
Project: 99836
Buggy source:
protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference,IClassHierarchy cha,IClassLoader parent,AnalysisScope scope) throws IOException {
  if (classLoaderReference.equals(JavaSourceAnalysisScope.SOURCE)) {
    ClassLoaderImpl cl=new JDTSourceLoaderImpl(classLoaderReference,parent,getExclusions(),cha);
    cl.init(scope.getModules(classLoaderReference));
    return cl;
  }
 else {
    return super.makeNewClassLoader(classLoaderReference,cha,parent,scope);
  }
}

Fixed version (ground truth):
protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference,IClassHierarchy cha,IClassLoader parent,AnalysisScope scope) throws IOException {
  if (classLoaderReference.equals(JavaSourceAnalysisScope.SOURCE)) {
    ClassLoaderImpl cl=makeSourceLoader(classLoaderReference,cha,parent);
    cl.init(scope.getModules(classLoaderReference));
    return cl;
  }
 else {
    return super.makeNewClassLoader(classLoaderReference,cha,parent,scope);
  }
}
Program: 99837
Project: 99837
Buggy source:
@SuppressWarnings("String_Node_Str") public void loadAllSources(Set modules){
}

Fixed version (ground truth):
public void loadAllSources(Set modules){
}
Program: 99838
Project: 99838
Buggy source:
protected void loadAllSources(Set<ModuleEntry> modules){
  getTranslator().loadAllSources(modules);
  fTypeMap=null;
}

Fixed version (ground truth):
protected void loadAllSources(Set<ModuleEntry> modules){
  getTranslator().loadAllSources(modules);
}
Program: 99840
Project: 99840
Buggy source:
/** 
 * Build an IR, then check integrity on two flavors of CFG
 */
private void doMethod(String methodSig){
  try {
    AnalysisScope scope=AnalysisScopeReader.makePrimordialScope(FileProvider.getFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS));
    ClassHierarchy cha=ClassHierarchy.make(scope);
    MethodReference mr=StringStuff.makeMethodReference(Language.JAVA,methodSig);
    IMethod m=cha.resolveMethod(mr);
    if (m == null) {
      Assertions.UNREACHABLE("String_Node_Str" + mr);
    }
    AnalysisOptions options=new AnalysisOptions();
    AnalysisCache cache=new AnalysisCache();
    options.getSSAOptions().setPiNodePolicy(SSAOptions.getAllBuiltInPiNodes());
    IR ir=cache.getSSACache().findOrCreateIR(m,Everywhere.EVERYWHERE,options.getSSAOptions());
    ControlFlowGraph<SSAInstruction,ISSABasicBlock> cfg=ir.getControlFlowGraph();
    try {
      GraphIntegrity.check(cfg);
    }
 catch (    UnsoundGraphException e) {
      e.printStackTrace();
      System.err.println(ir);
      Assert.assertTrue("String_Node_Str" + methodSig,false);
    }
    try {
      GraphIntegrity.check(cfg);
    }
 catch (    UnsoundGraphException e) {
      e.printStackTrace();
      System.err.println(ir);
      System.err.println(cfg);
      Assert.assertTrue("String_Node_Str" + methodSig,false);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    Assertions.UNREACHABLE();
  }
}

Fixed version (ground truth):
/** 
 * Build an IR, then check integrity on two flavors of CFG
 */
private void doMethod(String methodSig){
  try {
    MethodReference mr=StringStuff.makeMethodReference(Language.JAVA,methodSig);
    IMethod m=cha.resolveMethod(mr);
    if (m == null) {
      Assertions.UNREACHABLE("String_Node_Str" + mr);
    }
    AnalysisOptions options=new AnalysisOptions();
    AnalysisCache cache=new AnalysisCache();
    options.getSSAOptions().setPiNodePolicy(SSAOptions.getAllBuiltInPiNodes());
    IR ir=cache.getSSACache().findOrCreateIR(m,Everywhere.EVERYWHERE,options.getSSAOptions());
    ControlFlowGraph<SSAInstruction,ISSABasicBlock> cfg=ir.getControlFlowGraph();
    try {
      GraphIntegrity.check(cfg);
    }
 catch (    UnsoundGraphException e) {
      e.printStackTrace();
      System.err.println(ir);
      Assert.assertTrue("String_Node_Str" + methodSig,false);
    }
    try {
      GraphIntegrity.check(cfg);
    }
 catch (    UnsoundGraphException e) {
      e.printStackTrace();
      System.err.println(ir);
      System.err.println(cfg);
      Assert.assertTrue("String_Node_Str" + methodSig,false);
    }
  }
 catch (  Exception e) {
    e.printStackTrace();
    Assertions.UNREACHABLE();
  }
}
Program: 99843
Project: 99843
Buggy source:
/** 
 * Initialize internal data structures
 * @throws IllegalArgumentException if modules is null
 */
public void init(List<Module> modules) throws IOException {
  if (modules == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Set<ModuleEntry> classModuleEntries=HashSetFactory.make();
  Set<ModuleEntry> sourceModuleEntries=HashSetFactory.make();
  for (Iterator<Module> it=modules.iterator(); it.hasNext(); ) {
    Module archive=it.next();
    Set<ModuleEntry> classFiles=getClassFiles(archive);
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + archive);
    }
    removeClassFiles(classFiles,classModuleEntries);
    for (Iterator<ModuleEntry> it2=classFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      classModuleEntries.add(file);
    }
    Set<ModuleEntry> sourceFiles=getSourceFiles(archive);
    for (Iterator<ModuleEntry> it2=sourceFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      sourceModuleEntries.add(file);
    }
  }
  loadAllClasses(classModuleEntries);
  loadAllSources(sourceModuleEntries);
}

Fixed version (ground truth):
/** 
 * Initialize internal data structures
 * @throws IllegalArgumentException if modules is null
 */
public void init(List<Module> modules) throws IOException {
  if (modules == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Set<ModuleEntry> classModuleEntries=HashSetFactory.make();
  Set<ModuleEntry> sourceModuleEntries=HashSetFactory.make();
  for (Iterator<Module> it=modules.iterator(); it.hasNext(); ) {
    Module archive=it.next();
    if (DEBUG_LEVEL > 0) {
      System.err.println("String_Node_Str" + archive);
    }
    if (OPTIMIZE_JAR_FILE_IO && archive instanceof JarFileModule) {
      getJarFileContents((JarFileModule)archive);
    }
    Set<ModuleEntry> classFiles=getClassFiles(archive);
    removeClassFiles(classFiles,classModuleEntries);
    Set<ModuleEntry> sourceFiles=getSourceFiles(archive);
    Map<String,Object> allClassAndSourceFileContents=null;
    if (OPTIMIZE_JAR_FILE_IO) {
    }
    loadAllClasses(classFiles,allClassAndSourceFileContents);
    loadAllSources(sourceFiles);
    for (Iterator<ModuleEntry> it2=classFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      classModuleEntries.add(file);
    }
    for (Iterator<ModuleEntry> it2=sourceFiles.iterator(); it2.hasNext(); ) {
      ModuleEntry file=it2.next();
      sourceModuleEntries.add(file);
    }
  }
}
Program: 99845
Project: 99845
Buggy source:
@Test public void testTestCD5() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  AnalysisScope scope=findOrCreateAnalysisScope();
  IClassHierarchy cha=findOrCreateCHA(scope);
  Iterable<Entrypoint> entrypoints=com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope,cha,TestConstants.SLICE_TESTCD5);
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  CallGraphBuilder builder=Util.makeZeroOneCFABuilder(options,new AnalysisCache(),cha,scope);
  CallGraph cg=builder.makeCallGraph(options,null);
  CGNode main=findMainMethod(cg);
  Statement s=new MethodEntryStatement(main);
  System.err.println("String_Node_Str" + s);
  Collection<Statement> slice=Slicer.computeForwardSlice(s,cg,builder.getPointerAnalysis(),DataDependenceOptions.NONE,ControlDependenceOptions.FULL);
  dumpSlice(slice);
  Assert.assertTrue(slice.size() > 1);
}

Fixed version (ground truth):
@Test public void testTestCD5() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  AnalysisScope scope=findOrCreateAnalysisScope();
  IClassHierarchy cha=findOrCreateCHA(scope);
  Iterable<Entrypoint> entrypoints=com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope,cha,TestConstants.SLICE_TESTCD5);
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  CallGraphBuilder builder=Util.makeZeroOneCFABuilder(options,new AnalysisCache(),cha,scope);
  CallGraph cg=builder.makeCallGraph(options,null);
  CGNode main=findMainMethod(cg);
  Statement s=new MethodEntryStatement(main);
  System.err.println("String_Node_Str" + s);
  Collection<Statement> slice=Slicer.computeForwardSlice(s,cg,builder.getPointerAnalysis(),DataDependenceOptions.NONE,ControlDependenceOptions.NO_EXCEPTIONAL_EDGES);
  dumpSlice(slice);
  Assert.assertTrue(slice.size() > 1);
}
Program: 99846
Project: 99846
Buggy source:
public void setPc(int pc){
  Integer lineNum=pcToLine.get(pc);
  if (lineNum != null) {
    irLines.ensureIndexIsVisible(lineNum);
    irLines.setSelectedIndex(lineNum);
  }
}

Fixed version (ground truth):
public void setPc(int pc){
  Integer lineNum=pcToLine.get(pc);
  if (lineNum != null) {
    irLines.ensureIndexIsVisible(lineNum);
    irLines.setSelectedIndex(lineNum);
  }
 else {
    removeSelection();
  }
}
Program: 99847
Project: 99847
Buggy source:
public void setIRAndPc(IR ir,int pc){
  setIR(ir);
  if (pc != NA) {
    setPc(pc);
  }
 else {
    int curSelectedIndex=irLines.getSelectedIndex();
    irLines.removeSelectionInterval(curSelectedIndex,curSelectedIndex);
  }
}

Fixed version (ground truth):
public void setIRAndPc(IR ir,int pc){
  setIR(ir);
  if (pc != NA) {
    setPc(pc);
  }
 else {
    removeSelection();
  }
}
Program: 99848
Project: 99848
Buggy source:
public void setSource(URL url,int sourceLine){
  sourceCodeLocation.setText("String_Node_Str" + url);
  loadSource(url);
  if (sourceLine != IrViewer.NA) {
    sourceCodeLines.ensureIndexIsVisible(sourceLine - 1);
    sourceCodeLines.setSelectedIndex(sourceLine - 1);
    sourceCodeLines.validate();
  }
}

Fixed version (ground truth):
public void setSource(URL url,int sourceLine){
  boolean succsess=loadSource(url);
  if (succsess) {
    sourceCodeLocation.setText("String_Node_Str" + url);
    if (sourceLine != IrViewer.NA) {
      sourceCodeLines.ensureIndexIsVisible(sourceLine - 1);
      sourceCodeLines.setSelectedIndex(sourceLine - 1);
      sourceCodeLines.validate();
    }
  }
 else {
    sourceCodeLocation.setText("String_Node_Str" + url);
  }
}
Program: 99849
Project: 99849
Buggy source:
public void removeSource(){
  sourceURL=null;
  sourceCodeLocation=new JTextField("String_Node_Str");
  sourceCodeLinesList.clear();
  sourceCodeLines.validate();
}

Fixed version (ground truth):
public void removeSource(){
  sourceURL=null;
  sourceCodeLocation.setText("String_Node_Str");
  sourceCodeLinesList.clear();
  sourceCodeLines.validate();
}
Program: 99850
Project: 99850
Buggy source:
public void handleSimpleTag(HTML.Tag t,MutableAttributeSet a,int pos){
  System.out.println("String_Node_Str" + t);
  if (script) {
    try {
      writeEmbeddedScript("String_Node_Str" + t);
      Enumeration names=a.getAttributeNames();
      while (names.hasMoreElements()) {
        Object name=names.nextElement();
        Object val=a.getAttribute(name);
        writeEmbeddedScript("String_Node_Str" + name + "String_Node_Str"+ val+ "String_Node_Str");
      }
      writeEmbeddedScript("String_Node_Str" + t + "String_Node_Str");
    }
 catch (    IOException e) {
    }
  }
 else {
    String nm=createElement(t,a);
    endElement(nm);
  }
}

Fixed version (ground truth):
public void handleSimpleTag(HTML.Tag t,MutableAttributeSet a,int pos){
  System.out.println("String_Node_Str" + t);
  if (script) {
  }
 else {
    String nm=createElement(t,a,pos);
    endElement(nm);
  }
}
Program: 99852
Project: 99852
Buggy source:
public void handleEndTag(HTML.Tag t,int pos){
  if (t.toString().toUpperCase().equals("String_Node_Str")) {
    System.out.println("String_Node_Str");
    try {
      writeEmbeddedScript("String_Node_Str");
    }
 catch (    IOException e) {
    }
    script=false;
  }
  endElement(stack.pop());
}

Fixed version (ground truth):
public void handleEndTag(HTML.Tag t,int pos){
  if (t.toString().toUpperCase().equals("String_Node_Str")) {
    System.out.println("String_Node_Str");
    if (script)     try {
      int scriptEnd=pos;
      InputStreamReader script=new InputStreamReader(input.openStream());
      char[] buf=new char[scriptEnd];
      script.read(buf);
      String s=String.valueOf(buf,scriptStart,scriptEnd - scriptStart);
      writeEmbeddedScript(s.substring(s.indexOf('>') + 1));
    }
 catch (    IOException e) {
    }
    script=false;
  }
  endElement(stack.pop());
}
Program: 99853
Project: 99853
Buggy source:
private void writeEmbeddedScript(String text) throws IOException {
  embeddedScriptFile.write(text);
  embeddedScriptFile.write("String_Node_Str");
}

Fixed version (ground truth):
private void writeEmbeddedScript(String text) throws IOException {
  embeddedScriptFile.write(text);
}
Program: 99854
Project: 99854
Buggy source:
public void handleStartTag(HTML.Tag t,MutableAttributeSet a,int pos){
  String varName=createElement(t,a);
  stack.push(varName);
}

Fixed version (ground truth):
public void handleStartTag(HTML.Tag t,MutableAttributeSet a,int pos){
  String varName=createElement(t,a,pos);
  stack.push(varName);
}
Program: 99855
Project: 99855
Buggy source:
public boolean isExit(Statement n){
switch (n.getKind()) {
case PARAM_CALLEE:
case HEAP_PARAM_CALLEE:
case PHI:
case PI:
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case HEAP_RET_CALLER:
case NORMAL:
case EXC_RET_CALLER:
case METHOD_ENTRY:
case CATCH:
    return false;
case HEAP_RET_CALLEE:
case EXC_RET_CALLEE:
case NORMAL_RET_CALLEE:
case METHOD_EXIT:
  return true;
default :
Assertions.UNREACHABLE(n.toString());
return false;
}
}

Fixed version (ground truth):
public boolean isExit(Statement n){
switch (n.getKind()) {
case PARAM_CALLEE:
case HEAP_PARAM_CALLEE:
case HEAP_PARAM_CALLER:
case PHI:
case PI:
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case HEAP_RET_CALLER:
case NORMAL:
case EXC_RET_CALLER:
case METHOD_ENTRY:
case CATCH:
    return false;
case HEAP_RET_CALLEE:
case EXC_RET_CALLEE:
case NORMAL_RET_CALLEE:
case METHOD_EXIT:
  return true;
default :
Assertions.UNREACHABLE(n.toString());
return false;
}
}
Program: 99856
Project: 99856
Buggy source:
public HTMLEditorKit.ParserCallback createCallback(URL input,FileWriter domTreeFile,FileWriter embeddedScriptFile,FileWriter entrypointFile){
  return new HTMLCallback(input,domTreeFile,embeddedScriptFile,entrypointFile);
}

Fixed version (ground truth):
public HTMLCallback createCallback(URL input,FileWriter domTreeFile,FileWriter embeddedScriptFile,FileWriter entrypointFile){
  return new HTMLCallback(input,domTreeFile,embeddedScriptFile,entrypointFile);
}
Program: 99857
Project: 99857
Buggy source:
public void generate(URL input,File outFile) throws IOException {
  InputStreamReader fr=getStream(input);
  FileWriter out=new FileWriter(outFile);
  FileWriter out1=new FileWriter(temp1);
  FileWriter out2=new FileWriter(temp2);
  FileWriter out3=new FileWriter(temp3);
  ParserDelegator pd=new ParserDelegator();
  HTMLEditorKit.ParserCallback cb=callbackFactory.createCallback(input,out1,out2,out3);
  pd.parse(fr,cb,ignoreCharset);
  out1.close();
  out2.close();
  out3.close();
  out.write("String_Node_Str" + input + "String_Node_Str");
  writeRegion(out,"String_Node_Str",temp2);
  writeRegion(out,"String_Node_Str",temp1);
  out.write("String_Node_Str");
  writeRegion(out,"String_Node_Str",temp3);
  out.write("String_Node_Str");
  generateTrailer(out,cb);
  out.close();
}

Fixed version (ground truth):
public void generate(URL input,File outFile) throws IOException {
  InputStreamReader fr=getStream(input);
  FileWriter out=new FileWriter(outFile);
  FileWriter out1=new FileWriter(temp1);
  FileWriter out2=new FileWriter(temp2);
  FileWriter out3=new FileWriter(temp3);
  ParserDelegator pd=new ParserDelegator();
  HTMLCallback cb=callbackFactory.createCallback(input,out1,out2,out3);
  pd.parse(fr,cb,ignoreCharset);
  out1.flush();
  out1.close();
  out2.flush();
  out2.close();
  out3.flush();
  out3.close();
  out.write("String_Node_Str" + input + "String_Node_Str");
  writeRegion(out,"String_Node_Str",temp2);
  writeRegion(out,"String_Node_Str",temp1);
  out.write("String_Node_Str");
  writeRegion(out,"String_Node_Str",temp3);
  out.write("String_Node_Str");
  generateTrailer(out,cb);
  out.close();
}
Program: 99859
Project: 99859
Buggy source:
private void getScript(char[] data){
  if (script) {
    try {
      writeEmbeddedScript(data);
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void getScript(char[] data){
  if (script) {
    try {
      writeEmbeddedScript(data,data.length);
    }
 catch (    IOException e) {
      System.out.println("String_Node_Str");
    }
  }
}
Program: 99860
Project: 99860
Buggy source:
protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  if (DEBUG)   System.err.println(("String_Node_Str" + N));
  String fnName=composeEntityName(definingContext,N);
  if (DEBUG)   System.err.println(cfg);
  symtab.getConstant("String_Node_Str");
  symtab.getConstant("String_Node_Str");
  for (int i=0; i < 15; i++) {
    symtab.getConstant(i);
  }
  ((JavaScriptLoader)loader).defineCodeBodyCode("String_Node_Str" + fnName,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
}

Fixed version (ground truth):
protected void defineFunction(CAstEntity N,WalkContext definingContext,AbstractCFG cfg,SymbolTable symtab,boolean hasCatchBlock,TypeReference[][] caughtTypes,boolean hasMonitorOp,AstLexicalInformation LI,DebuggingInformation debugInfo){
  if (DEBUG)   System.err.println(("String_Node_Str" + N));
  String fnName=composeEntityName(definingContext,N);
  if (DEBUG)   System.err.println(cfg);
  symtab.getConstant("String_Node_Str");
  symtab.getConstant("String_Node_Str");
  for (int i=0; i < 20; i++) {
    symtab.getConstant(i);
  }
  ((JavaScriptLoader)loader).defineCodeBodyCode("String_Node_Str" + fnName,cfg,symtab,hasCatchBlock,caughtTypes,hasMonitorOp,LI,debugInfo);
}
Program: 99861
Project: 99861
Buggy source:
protected void doFieldWrite(WalkContext context,int receiver,CAstNode elt,CAstNode parent,int rval){
  this.visit(elt,context,this);
  if (elt.getKind() == CAstNode.CONSTANT && elt.getValue() instanceof String) {
    context.cfg().addInstruction(((JSInstructionFactory)insts).PutInstruction(receiver,rval,(String)elt.getValue()));
  }
 else {
    context.cfg().addInstruction(((JSInstructionFactory)insts).PropertyWrite(receiver,getValue(elt),rval));
  }
}

Fixed version (ground truth):
protected void doFieldWrite(WalkContext context,int receiver,CAstNode elt,CAstNode parent,int rval){
}
Program: 99864
Project: 99864
Buggy source:
/** 
 * create a demand points-to analysis runner using a   {@link DemandPointerFlowGraph} as the underlying flow graph.
 * @see #make(CallGraph,HeapModel,MemoryAccessMap,IClassHierarchy,AnalysisOptions,StateMachineFactory,IFlowGraph)
 */
public static DemandRefinementPointsTo makeWithDefaultFlowGraph(CallGraph cg,HeapModel model,MemoryAccessMap mam,IClassHierarchy cha,AnalysisOptions options,StateMachineFactory<IFlowLabel> stateMachineFactory){
  return make(cg,new ThisFilteringHeapModel(model,cha),mam,cha,options,stateMachineFactory,new DemandPointerFlowGraph(cg,model,mam,cha));
}

Fixed version (ground truth):
/** 
 * create a demand points-to analysis runner
 * @param cg the underlying call graph for the analysis
 * @param model the heap model to be used for the analysis
 * @param mam indicates what code reads or writes each field
 * @param cha
 * @param options
 * @param stateMachineFactory factory for state machines to track additional properties like calling context
 */
public static DemandRefinementPointsTo makeWithDefaultFlowGraph(CallGraph cg,HeapModel model,MemoryAccessMap mam,IClassHierarchy cha,AnalysisOptions options,StateMachineFactory<IFlowLabel> stateMachineFactory){
  final ThisFilteringHeapModel thisFilteringHeapModel=new ThisFilteringHeapModel(model,cha);
  return new DemandRefinementPointsTo(cg,thisFilteringHeapModel,mam,cha,options,stateMachineFactory,new DemandPointerFlowGraph(cg,thisFilteringHeapModel,mam,cha));
}
Program: 99865
Project: 99865
Buggy source:
@Override public void visitCheckCast(SSACheckCastInstruction instruction){
  TypeAbstraction typeAbs=null;
  for (  TypeReference type : instruction.getDeclaredResultTypes()) {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      typeAbs=BOTTOM;
    }
 else {
      if (typeAbs == null) {
        typeAbs=new ConeType(klass);
      }
 else {
        typeAbs=typeAbs.meet(new ConeType(klass));
      }
    }
  }
}

Fixed version (ground truth):
@Override public void visitCheckCast(SSACheckCastInstruction instruction){
  TypeAbstraction typeAbs=null;
  for (  TypeReference type : instruction.getDeclaredResultTypes()) {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      typeAbs=BOTTOM;
    }
 else {
      if (typeAbs == null) {
        typeAbs=new ConeType(klass);
      }
 else {
        typeAbs=typeAbs.meet(new ConeType(klass));
      }
    }
  }
  result=new DeclaredTypeOperator(typeAbs);
}
Program: 99866
Project: 99866
Buggy source:
public static int countNormals(Collection<Statement> slice){
  int count=0;
  for (  Statement s : slice) {
    if (s.getKind().equals(Statement.Kind.NORMAL)) {
      NormalStatement ns=(NormalStatement)s;
      count++;
    }
  }
  return count;
}

Fixed version (ground truth):
public static int countNormals(Collection<Statement> slice){
  int count=0;
  for (  Statement s : slice) {
    if (s.getKind().equals(Statement.Kind.NORMAL)) {
      count++;
    }
  }
  return count;
}
Program: 99867
Project: 99867
Buggy source:
public static CGNode findMainMethod(CallGraph cg){
  Descriptor d=Descriptor.findOrCreateUTF8("String_Node_Str");
  Atom name=Atom.findOrCreateUnicodeAtom("String_Node_Str");
  for (Iterator<? extends CGNode> it=cg.getSuccNodes(cg.getFakeRootNode()); it.hasNext(); ) {
    CGNode n=it.next();
    if (n.getMethod().getName().equals(name) && n.getMethod().getDescriptor().equals(d)) {
      return n;
    }
  }
  Assertions.UNREACHABLE("String_Node_Str");
  return null;
}

Fixed version (ground truth):
public static CGNode findMainMethod(CallGraph cg){
  Descriptor d=Descriptor.findOrCreateUTF8("String_Node_Str");
  Atom name=Atom.findOrCreateUnicodeAtom("String_Node_Str");
  return findMethod(cg,d,name);
}
Program: 99868
Project: 99868
Buggy source:
/** 
 * Create nodes corresponding to <ul> <li> phi instructions <li> getCaughtExceptions </ul>
 */
private void createSpecialStatements(IR ir){
  for (Iterator<SSAInstruction> it=ir.iterateAllInstructions(); it.hasNext(); ) {
    SSAInstruction s=it.next();
    if (s instanceof SSAPhiInstruction) {
      delegate.addNode(new PhiStatement(node,(SSAPhiInstruction)s));
    }
 else     if (s instanceof SSAGetCaughtExceptionInstruction) {
      delegate.addNode(new GetCaughtExceptionStatement(node,(SSAGetCaughtExceptionInstruction)s));
    }
 else     if (s instanceof SSAPiInstruction) {
      delegate.addNode(new PiStatement(node,(SSAPiInstruction)s));
    }
  }
}

Fixed version (ground truth):
/** 
 * Create nodes corresponding to <ul> <li>phi instructions <li>getCaughtExceptions </ul>
 */
private void createSpecialStatements(IR ir){
  for (Iterator<SSAInstruction> it=ir.iterateAllInstructions(); it.hasNext(); ) {
    SSAInstruction s=it.next();
    if (s instanceof SSAPhiInstruction) {
      delegate.addNode(new PhiStatement(node,(SSAPhiInstruction)s));
    }
 else     if (s instanceof SSAGetCaughtExceptionInstruction) {
      delegate.addNode(new GetCaughtExceptionStatement(node,(SSAGetCaughtExceptionInstruction)s));
    }
 else     if (s instanceof SSAPiInstruction) {
      delegate.addNode(new PiStatement(node,(SSAPiInstruction)s));
    }
  }
}
Program: 99869
Project: 99869
Buggy source:
/** 
 * Create nodes in the graph corresponding to "normal" (bytecode) instructions
 */
private void createNormalStatements(IR ir,Map<CGNode,OrdinalSet<PointerKey>> ref){
  SSAInstruction[] instructions=ir.getInstructions();
  for (int i=0; i < instructions.length; i++) {
    SSAInstruction s=instructions[i];
    if (s instanceof SSAGetCaughtExceptionInstruction) {
      continue;
    }
    if (s != null) {
      delegate.addNode(new NormalStatement(node,i));
    }
    if (s instanceof SSAAbstractInvokeInstruction) {
      addParamPassingStatements(i,ref,ir);
    }
  }
}

Fixed version (ground truth):
/** 
 * Create nodes in the graph corresponding to "normal" (bytecode) instructions
 */
private void createNormalStatements(IR ir,Map<CGNode,OrdinalSet<PointerKey>> ref){
  SSAInstruction[] instructions=ir.getInstructions();
  for (int i=0; i < instructions.length; i++) {
    SSAInstruction s=instructions[i];
    if (s instanceof SSAGetCaughtExceptionInstruction) {
      continue;
    }
    if (s != null) {
      final NormalStatement statement=new NormalStatement(node,i);
      delegate.addNode(statement);
      if (s instanceof SSAAbstractInvokeInstruction) {
        callSite2Statement.put(((SSAAbstractInvokeInstruction)s).getCallSite(),statement);
        addParamPassingStatements(i,ref,ir);
      }
    }
  }
}
Program: 99870
Project: 99870
Buggy source:
public Iterator<? extends Statement> getCallSites(Statement r,PDG callee){
switch (r.getKind()) {
case EXC_RET_CALLER:
{
      ExceptionalReturnCaller n=(ExceptionalReturnCaller)r;
      SSAAbstractInvokeInstruction call=n.getInstruction();
      PDG pdg=getProcOf(r);
      return pdg.getCallerParamStatements(call).iterator();
    }
case NORMAL_RET_CALLER:
{
    NormalReturnCaller n=(NormalReturnCaller)r;
    SSAAbstractInvokeInstruction call=n.getInstruction();
    PDG pdg=getProcOf(r);
    return pdg.getCallerParamStatements(call).iterator();
  }
case HEAP_RET_CALLER:
{
  HeapStatement.HeapReturnCaller n=(HeapStatement.HeapReturnCaller)r;
  SSAAbstractInvokeInstruction call=n.getCall();
  PDG pdg=getProcOf(r);
  return pdg.getCallerParamStatements(call).iterator();
}
default :
Assertions.UNREACHABLE(r.getKind().toString());
return null;
}
}

Fixed version (ground truth):
public Iterator<? extends Statement> getCallSites(Statement r,PDG callee){
switch (r.getKind()) {
case EXC_RET_CALLER:
{
      ExceptionalReturnCaller n=(ExceptionalReturnCaller)r;
      SSAAbstractInvokeInstruction call=n.getInstruction();
      PDG pdg=getProcOf(r);
      return pdg.getCallStatements(call).iterator();
    }
case NORMAL_RET_CALLER:
{
    NormalReturnCaller n=(NormalReturnCaller)r;
    SSAAbstractInvokeInstruction call=n.getInstruction();
    PDG pdg=getProcOf(r);
    return pdg.getCallStatements(call).iterator();
  }
case HEAP_RET_CALLER:
{
  HeapStatement.HeapReturnCaller n=(HeapStatement.HeapReturnCaller)r;
  SSAAbstractInvokeInstruction call=n.getCall();
  PDG pdg=getProcOf(r);
  return pdg.getCallStatements(call).iterator();
}
default :
Assertions.UNREACHABLE(r.getKind().toString());
return null;
}
}
Program: 99871
Project: 99871
Buggy source:
public JDTJava15IRTests(){
  super("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public JDTJava15IRTests(){
  super("String_Node_Str");
}
Program: 99872
Project: 99872
Buggy source:
public JDTJavaIRTests(){
  super("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public JDTJavaIRTests(){
  super("String_Node_Str");
}
Program: 99873
Project: 99873
Buggy source:
public PolyglotJavaIRTests(){
  super("String_Node_Str");
}

Fixed version (ground truth):
public PolyglotJavaIRTests(){
  super(null);
}
Program: 99874
Project: 99874
Buggy source:
protected String singleJavaPkgInputForTest(String pkgName){
  return pkgName + File.separator + getName().substring(4)+ "String_Node_Str";
}

Fixed version (ground truth):
protected String singleJavaPkgInputForTest(String pkgName){
  return pkgName + File.separator + getTestName().substring(4)+ "String_Node_Str";
}
Program: 99875
Project: 99875
Buggy source:
protected String singleInputForTest(){
  return getName().substring(4);
}

Fixed version (ground truth):
protected String singleInputForTest(){
  return getTestName().substring(4);
}
Program: 99876
Project: 99876
Buggy source:
protected String singleJavaInputForTest(){
  return getName().substring(4) + "String_Node_Str";
}

Fixed version (ground truth):
protected String singleJavaInputForTest(){
  return getTestName().substring(4) + "String_Node_Str";
}
Program: 99877
Project: 99877
Buggy source:
public IRTests(String name,String projectName){
  this.name=name;
  this.projectName=projectName;
}

Fixed version (ground truth):
protected IRTests(String projectName){
  this.projectName=projectName;
}
Program: 99878
Project: 99878
Buggy source:
protected String[] simplePkgTestEntryPoint(String pkgName){
  return new String[]{"String_Node_Str" + pkgName + "String_Node_Str"+ getName().substring(4)};
}

Fixed version (ground truth):
protected String[] simplePkgTestEntryPoint(String pkgName){
  return new String[]{"String_Node_Str" + pkgName + "String_Node_Str"+ getTestName().substring(4)};
}
Program: 99879
Project: 99879
Buggy source:
protected String[] simpleTestEntryPoint(){
  return new String[]{"String_Node_Str" + getName().substring(4)};
}

Fixed version (ground truth):
protected String[] simpleTestEntryPoint(){
  return new String[]{"String_Node_Str" + getTestName().substring(4)};
}
Program: 99880
Project: 99880
Buggy source:
public JLexTest(String name){
  super(name,null);
}

Fixed version (ground truth):
public JLexTest(){
  super(null);
}
Program: 99881
Project: 99881
Buggy source:
public JavaIRTests(String name){
  this(name,null);
}

Fixed version (ground truth):
public JavaIRTests(){
  this(null);
}
Program: 99882
Project: 99882
Buggy source:
public NameAwareTestClassRunner(Class<?> klass) throws InitializationError {
  super(klass);
}

Fixed version (ground truth):
public NameAwareTestClassRunner(Class<?> klass){
  super(klass);
}
Program: 99883
Project: 99883
Buggy source:
public SyncDuplicatorTest(String name){
  super(name,null);
}

Fixed version (ground truth):
public SyncDuplicatorTest(){
  super(null);
}
Program: 99884
Project: 99884
Buggy source:
@Test public void testFlowsToLocals() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  doFlowsToSizeTest(TestInfo.FLOWSTO_TEST_LOCALS,1);
}

Fixed version (ground truth):
@Test public void testFlowsToLocals() throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  doFlowsToSizeTest(TestInfo.FLOWSTO_TEST_LOCALS,4);
}
Program: 99885
Project: 99885
Buggy source:
/** 
 * get all the pointer keys that some instance key can flow to
 */
public Pair<PointsToResult,Collection<PointerKey>> getFlowsTo(InstanceKey ik){
}

Fixed version (ground truth):
/** 
 * get all the pointer keys that some instance key can flow to
 * @return a pair consisting of (1) a {@link PointsToResult} indicating whether a flows-to set was computed, and (2) the lastcomputed flows-to set for the instance key (possibly <code>null</code> if no flows-to set could be computed in the budget)
 */
public Pair<PointsToResult,Collection<PointerKey>> getFlowsTo(InstanceKey ik){
}
Program: 99886
Project: 99886
Buggy source:
/** 
 * returns the instance key corresponding to the single allocation site of type FlowsToType
 */
private static InstanceKey getFlowsToInstanceKey(CGNode mainMethod,HeapModel heapModel){
}

Fixed version (ground truth):
/** 
 * returns the instance key corresponding to the single allocation site of type FlowsToType
 */
private InstanceKey getFlowsToInstanceKey(CGNode mainMethod,HeapModel heapModel){
}
Program: 99887
Project: 99887
Buggy source:
private Collection<PointerKey> getFlowsToSetToTest(String mainClass) throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  final DemandRefinementPointsTo dmp=makeDemandPointerAnalysis(mainClass);
  CGNode mainMethod=AbstractPtrTest.findMainMethod(dmp.getBaseCallGraph());
  InstanceKey keyToQuery=AbstractPtrTest.getFlowsToInstanceKey(mainMethod,dmp.getHeapModel());
  Collection<PointerKey> flowsTo=dmp.getFlowsTo(keyToQuery).snd;
  return flowsTo;
}

Fixed version (ground truth):
private Collection<PointerKey> getFlowsToSetToTest(String mainClass) throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
  final DemandRefinementPointsTo dmp=makeDemandPointerAnalysis(mainClass);
  CGNode mainMethod=AbstractPtrTest.findMainMethod(dmp.getBaseCallGraph());
  InstanceKey keyToQuery=getFlowsToInstanceKey(mainMethod,dmp.getHeapModel());
  Collection<PointerKey> flowsTo=dmp.getFlowsTo(keyToQuery).snd;
  return flowsTo;
}
Program: 99888
Project: 99888
Buggy source:
@Override protected void compute(){
  InstanceKey ik=queriedIkAndState.getInstanceKey();
  g.addSubgraphForNode(((InstanceKeyWithNode)ik).getNode());
  for (  Object pred : Iterator2Iterable.make(g.getPredNodes(ik,NewLabel.v()))) {
    PointerKey predPk=(PointerKey)pred;
    PointerKeyAndState predPkAndState=new PointerKeyAndState(predPk,queriedIkAndState.getState());
    theFlowsToSet.add(predPkAndState);
    findOrCreate(pkToP2Set,predPkAndState).add(queriedIkAndStateNum);
    addToPToWorklist(predPkAndState);
  }
  worklistLoop();
}

Fixed version (ground truth):
@Override protected void compute(){
  InstanceKey ik=queriedIkAndState.getInstanceKey();
  g.addSubgraphForNode(((InstanceKeyWithNode)ik).getNode());
  for (  Object pred : Iterator2Iterable.make(g.getPredNodes(ik,NewLabel.v()))) {
    PointerKey predPk=(PointerKey)pred;
    PointerKeyAndState predPkAndState=new PointerKeyAndState(predPk,queriedIkAndState.getState());
    theFlowsToSet.add(predPkAndState);
    findOrCreate(pkToTrackedSet,predPkAndState).add(queriedIkAndStateNum);
    addToTrackedPToWorklist(predPkAndState);
  }
  worklistLoop();
}
Program: 99889
Project: 99889
Buggy source:
/** 
 * here, we want to add the graph unconditionally if pkAndState can point to the queried instance key
 */
@Override protected boolean calleeSubGraphMissingAndShouldNotBeAdded(boolean addGraphs,CGNode callee,PointerKeyAndState pkAndState){
  if (find(pkToP2Set,pkAndState).contains(queriedIkAndStateNum)) {
    return false;
  }
 else {
    return super.calleeSubGraphMissingAndShouldNotBeAdded(addGraphs,callee,pkAndState);
  }
}

Fixed version (ground truth):
/** 
 * when doing backward interprocedural propagation, is it true that we should not add a graph representation for a callee _and_ that the subgraph for the callee is missing?
 * @param addGraphs whether graphs should always be added
 * @param callee
 * @param pkAndState
 * @return
 */
protected boolean calleeSubGraphMissingAndShouldNotBeAdded(boolean addGraphs,CGNode callee,PointerKeyAndState pkAndState){
  return !addGraphs && !g.hasSubgraphForNode(callee);
}
Program: 99890
Project: 99890
Buggy source:
@Override protected void handleBackCopy(PointerKeyAndState curPkAndState,PointerKey predPk,IFlowLabel label){
  final MutableIntSet curPkP2Set=find(pkToP2Set,curPkAndState);
  if (curPkP2Set.contains(queriedIkAndStateNum)) {
    PointerKeyAndState predPkAndState=new PointerKeyAndState(predPk,stateMachine.transition(curPkAndState.getState(),label));
    if (addAllToP2Set(pkToP2Set,predPkAndState,curPkP2Set,label)) {
      theFlowsToSet.add(predPkAndState);
      addToPToWorklist(predPkAndState);
    }
  }
 else {
    super.handleBackCopy(curPkAndState,predPk,label);
  }
}

Fixed version (ground truth):
protected void handleBackCopy(PointerKeyAndState curPkAndState,PointerKey predPk,IFlowLabel label){
  for (  PointerKeyAndState predPkAndState : matchingPToQueried(curPkAndState,predPk,label)) {
    if (addAllToP2Set(pkToP2Set,predPkAndState,find(pkToP2Set,curPkAndState),label)) {
      addToPToWorklist(predPkAndState);
    }
  }
}
Program: 99891
Project: 99891
Buggy source:
/** 
 * Does the file name represent a .java file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException  if fileName is null
 */
public static boolean isSourceFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int suffixIndex=fileName.indexOf("String_Node_Str");
  if (suffixIndex > -1 && fileName.indexOf(CLASSPATH) == -1) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Does the file name represent a .java file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException if fileName is null
 */
public static boolean isSourceFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return fileName.endsWith("String_Node_Str");
}
Program: 99892
Project: 99892
Buggy source:
/** 
 * Does the file name represent a .class file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException  if fileName is null
 */
public static boolean isClassFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int suffixIndex=fileName.indexOf(CLASS_SUFFIX);
  if (suffixIndex > -1 && fileName.indexOf(CLASSPATH) == -1) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Does the file name represent a .class file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException if fileName is null
 */
public static boolean isClassFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return fileName.endsWith(CLASS_SUFFIX);
}
Program: 99893
Project: 99893
Buggy source:
/** 
 * Strip the ".class" or ".java" suffix from a file name TODO: generalize for all suffixes
 * @param fileName the file name
 * @throws IllegalArgumentException  if fileName is null
 */
public static String stripSuffix(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int suffixIndex=fileName.indexOf(CLASS_SUFFIX);
  suffixIndex=(suffixIndex > -1) ? suffixIndex : fileName.indexOf("String_Node_Str");
  if (suffixIndex > -1) {
    return fileName.substring(0,suffixIndex);
  }
 else {
    return fileName;
  }
}

Fixed version (ground truth):
/** 
 * Strip the ".class" or ".java" suffix from a file name TODO: generalize for all suffixes
 * @param fileName the file name
 * @throws IllegalArgumentException if fileName is null
 */
public static String stripSuffix(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int suffixIndex=fileName.indexOf(CLASS_SUFFIX);
  suffixIndex=(suffixIndex > -1) ? suffixIndex : fileName.indexOf("String_Node_Str");
  if (suffixIndex > -1) {
    return fileName.substring(0,suffixIndex);
  }
 else {
    return fileName;
  }
}
Program: 99894
Project: 99894
Buggy source:
/** 
 * Does the file name represent a .jar file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException  if fileName is null
 */
public static boolean isJarFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int suffixIndex=fileName.indexOf(JAR_SUFFIX);
  if (suffixIndex > -1) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Does the file name represent a .jar file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException if fileName is null
 */
public static boolean isJarFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return fileName.endsWith(JAR_SUFFIX);
}
Program: 99895
Project: 99895
Buggy source:
/** 
 * Does the file name represent a .war file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException  if fileName is null
 */
public static boolean isWarFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int suffixIndex=fileName.indexOf(WAR_SUFFIX);
  if (suffixIndex > -1) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
/** 
 * Does the file name represent a .war file?
 * @param fileName name of a file
 * @return boolean
 * @throws IllegalArgumentException if fileName is null
 */
public static boolean isWarFile(String fileName){
  if (fileName == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return fileName.endsWith(WAR_SUFFIX);
}
Program: 99896
Project: 99896
Buggy source:
private DeclaredTypeOperator getPointerTypeOperator(TypeReference type){
  if (type.isPrimitiveType()) {
    return new DeclaredTypeOperator(PrimitiveType.getPrimitive(type));
  }
 else {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      return new DeclaredTypeOperator(BOTTOM);
    }
 else {
      return new DeclaredTypeOperator(new ConeType(klass));
    }
  }
}

Fixed version (ground truth):
private DeclaredTypeOperator getPointerTypeOperator(TypeReference type){
  if (type.isPrimitiveType()) {
    return new DeclaredTypeOperator(language.getPrimitive(type));
  }
 else {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      return new DeclaredTypeOperator(BOTTOM);
    }
 else {
      return new DeclaredTypeOperator(new ConeType(klass));
    }
  }
}
Program: 99897
Project: 99897
Buggy source:
@Override public void visitInvoke(SSAInvokeInstruction instruction){
  TypeReference type=instruction.getDeclaredResultType();
  if (type.isReferenceType()) {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      result=new DeclaredTypeOperator(BOTTOM);
    }
 else {
      result=new DeclaredTypeOperator(new ConeType(klass));
    }
  }
 else   if (doPrimitives && type.isPrimitiveType()) {
    result=new DeclaredTypeOperator(PrimitiveType.getPrimitive(type));
  }
 else {
    result=null;
  }
}

Fixed version (ground truth):
@Override public void visitInvoke(SSAInvokeInstruction instruction){
  TypeReference type=instruction.getDeclaredResultType();
  if (type.isReferenceType()) {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      result=new DeclaredTypeOperator(BOTTOM);
    }
 else {
      result=new DeclaredTypeOperator(new ConeType(klass));
    }
  }
 else   if (doPrimitives && type.isPrimitiveType()) {
    result=new DeclaredTypeOperator(language.getPrimitive(type));
  }
 else {
    result=null;
  }
}
Program: 99899
Project: 99899
Buggy source:
@Override public void visitGet(SSAGetInstruction instruction){
  TypeReference type=instruction.getDeclaredFieldType();
  if (doPrimitives && type.isPrimitiveType()) {
    result=new DeclaredTypeOperator(PrimitiveType.getPrimitive(type));
  }
 else {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      result=new DeclaredTypeOperator(BOTTOM);
    }
 else {
      result=new DeclaredTypeOperator(new ConeType(klass));
    }
  }
}

Fixed version (ground truth):
@Override public void visitGet(SSAGetInstruction instruction){
  TypeReference type=instruction.getDeclaredFieldType();
  if (doPrimitives && type.isPrimitiveType()) {
    result=new DeclaredTypeOperator(language.getPrimitive(type));
  }
 else {
    IClass klass=cha.lookupClass(type);
    if (klass == null) {
      result=new DeclaredTypeOperator(BOTTOM);
    }
 else {
      result=new DeclaredTypeOperator(new ConeType(klass));
    }
  }
}
Program: 99900
Project: 99900
Buggy source:
/** 
 * traverse the bundle description for an Eclipse project and populate the analysis scope accordingly
 */
private void resolvePluginClassPath(IProject p,boolean includeSource) throws CoreException, IOException {
  BundleDescription bd=findModel(p).getBundleDescription();
  for (int i=0; i < 3 && bd == null; i++) {
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
    bd=findModel(p).getBundleDescription();
  }
  if (bd == null) {
    throw new IllegalStateException("String_Node_Str" + p);
  }
  resolveBundleDescriptionClassPath(bd,Loader.APPLICATION,includeSource);
}

Fixed version (ground truth):
/** 
 * traverse the bundle description for an Eclipse project and populate the analysis scope accordingly
 */
private void resolvePluginClassPath(IProject p,boolean includeSource) throws CoreException, IOException {
  IPluginModelBase model=findModel(p);
  if (!model.isInSync() || model.isDisposed()) {
    model.load();
  }
  BundleDescription bd=model.getBundleDescription();
  for (int i=0; i < 3 && bd == null; i++) {
    try {
      Thread.sleep(5000);
    }
 catch (    InterruptedException e) {
    }
    bd=findModel(p).getBundleDescription();
  }
  if (bd == null) {
    throw new IllegalStateException("String_Node_Str" + p);
  }
  resolveBundleDescriptionClassPath(bd,Loader.APPLICATION,includeSource);
}
Program: 99902
Project: 99902
Buggy source:
public Collection<IMethod> getAllMethods() throws ClassHierarchyException {
  Collection<IMethod> result=new LinkedList<IMethod>();
  Iterator<IMethod> declaredMethods=getDeclaredMethods().iterator();
  while (declaredMethods.hasNext()) {
    result.add(declaredMethods.next());
  }
  IClass s=getSuperclass();
  while (s != null) {
    Iterator<IMethod> superDeclaredMethods=s.getDeclaredMethods().iterator();
    while (superDeclaredMethods.hasNext()) {
      result.add(superDeclaredMethods.next());
    }
    s=s.getSuperclass();
  }
  return result;
}

Fixed version (ground truth):
public Collection<IMethod> getAllMethods() throws ClassHierarchyException {
  Collection<IMethod> result=new LinkedList<IMethod>();
  Iterator<IMethod> declaredMethods=getDeclaredMethods().iterator();
  while (declaredMethods.hasNext()) {
    result.add(declaredMethods.next());
  }
  if (isInterface()) {
    for (    IClass i : getDirectInterfaces()) {
      result.addAll(i.getAllMethods());
    }
  }
  IClass s=getSuperclass();
  while (s != null) {
    Iterator<IMethod> superDeclaredMethods=s.getDeclaredMethods().iterator();
    while (superDeclaredMethods.hasNext()) {
      result.add(superDeclaredMethods.next());
    }
    s=s.getSuperclass();
  }
  return result;
}
Program: 99903
Project: 99903
Buggy source:
public boolean isPEI(){
  return true;
}

Fixed version (ground truth):
public boolean isPEI(){
  return !isStatic();
}
Program: 99904
Project: 99904
Buggy source:
public boolean isPEI(){
  return true;
}

Fixed version (ground truth):
public boolean isPEI(){
  return !isStatic();
}
Program: 99905
Project: 99905
Buggy source:
@Override protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new PolyglotJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,new String[]{"String_Node_Str"});
    }
  }
;
  engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
  return engine;
}

Fixed version (ground truth):
@Override protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new PolyglotJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,new String[]{"String_Node_Str"});
    }
  }
;
  engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
  return engine;
}