nus-yam/ex-repair huggingface dataset:
Program: 40328
Project: 40328
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: 40329
Project: 40329
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: 40330
Project: 40330
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: 40331
Project: 40331
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: 40332
Project: 40332
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: 40333
Project: 40333
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: 40334
Project: 40334
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: 40335
Project: 40335
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: 40336
Project: 40336
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: 40337
Project: 40337
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: 40339
Project: 40339
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: 40340
Project: 40340
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: 40342
Project: 40342
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: 40343
Project: 40343
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;
}
Program: 40344
Project: 40344
Buggy source:
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,new String[]{"String_Node_Str"});
}

Fixed version (ground truth):
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,new String[]{"String_Node_Str"});
}
Program: 40345
Project: 40345
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,mainClassDescriptors);
    }
  }
;
  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,mainClassDescriptors);
    }
  }
;
  engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
  return engine;
}
Program: 40346
Project: 40346
Buggy source:
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,mainClassDescriptors);
}

Fixed version (ground truth):
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
}
Program: 40347
Project: 40347
Buggy source:
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,mainClassDescriptors);
    }
    public IRTranslatorExtension getTranslatorExtension(){
      JavaIRTranslatorExtension ext=new JavaIRTranslatorExtension();
      ext.setCAstRewriterFactory(new CAstRewriterFactory(){
        public CAstRewriter createCAstRewriter(        CAst ast){
          return new SynchronizedBlockDuplicator(ast,true,testMethod);
        }
      }
);
      return ext;
    }
  }
;
  engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
  return engine;
}

Fixed version (ground truth):
protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new PolyglotJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
    }
    public IRTranslatorExtension getTranslatorExtension(){
      JavaIRTranslatorExtension ext=new JavaIRTranslatorExtension();
      ext.setCAstRewriterFactory(new CAstRewriterFactory(){
        public CAstRewriter createCAstRewriter(        CAst ast){
          return new SynchronizedBlockDuplicator(ast,true,testMethod);
        }
      }
);
      return ext;
    }
  }
;
  engine.setExclusionsFile(CallGraphTestUtil.REGRESSION_EXCLUSIONS);
  return engine;
}
Program: 40348
Project: 40348
Buggy source:
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,mainClassDescriptors);
}

Fixed version (ground truth):
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
}
Program: 40349
Project: 40349
Buggy source:
@Override protected void buildAnalysisScope(){
  try {
    scope=makeSourceAnalysisScope();
    if (getExclusionsFile() != null) {
      scope.setExclusions(new FileOfClasses(new File(getExclusionsFile())));
    }
    EclipseProjectPath epath=getEclipseProjectPath();
    for (    Module m : epath.getModules(Loader.PRIMORDIAL,true)) {
      scope.addToScope(scope.getPrimordialLoader(),m);
    }
    ClassLoaderReference app=scope.getApplicationLoader();
    for (    Module m : epath.getModules(Loader.APPLICATION,true)) {
      scope.addToScope(app,m);
    }
    for (    Module m : epath.getModules(Loader.EXTENSION,true)) {
      if (!(m instanceof BinaryDirectoryTreeModule))       scope.addToScope(app,m);
    }
    ClassLoaderReference src=((JavaSourceAnalysisScope)scope).getSourceLoader();
    for (    Module m : epath.getModules(Loader.SOURCE,false)) {
      scope.addToScope(src,m);
    }
  }
 catch (  IOException e) {
    Assertions.UNREACHABLE(e.toString());
  }
}

Fixed version (ground truth):
@Override protected void buildAnalysisScope(){
  try {
    scope=makeSourceAnalysisScope();
    if (getExclusionsFile() != null) {
      scope.setExclusions(FileOfClasses.createFileOfClasses(new File(getExclusionsFile())));
    }
    EclipseProjectPath epath=getEclipseProjectPath();
    for (    Module m : epath.getModules(Loader.PRIMORDIAL,true)) {
      scope.addToScope(scope.getPrimordialLoader(),m);
    }
    ClassLoaderReference app=scope.getApplicationLoader();
    for (    Module m : epath.getModules(Loader.APPLICATION,true)) {
      scope.addToScope(app,m);
    }
    for (    Module m : epath.getModules(Loader.EXTENSION,true)) {
      if (!(m instanceof BinaryDirectoryTreeModule))       scope.addToScope(app,m);
    }
    ClassLoaderReference src=((JavaSourceAnalysisScope)scope).getSourceLoader();
    for (    Module m : epath.getModules(Loader.APPLICATION,false)) {
      scope.addToScope(src,m);
    }
  }
 catch (  IOException e) {
    Assertions.UNREACHABLE(e.toString());
  }
}
Program: 40350
Project: 40350
Buggy source:
@Override protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha);
}

Fixed version (ground truth):
@Override protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha);
}
Program: 40351
Project: 40351
Buggy source:
protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference,IClassHierarchy cha,IClassLoader parent,AnalysisScope scope) throws IOException {
  if (classLoaderReference.equals(EclipseProjectPath.SOURCE_REF)) {
    ClassLoaderImpl cl=new PolyglotSourceLoaderImpl(classLoaderReference,parent,getExclusions(),cha,getExtensionFor(classLoaderReference));
    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=new PolyglotSourceLoaderImpl(classLoaderReference,parent,getExclusions(),cha,getExtensionFor(classLoaderReference));
    cl.init(scope.getModules(classLoaderReference));
    return cl;
  }
 else {
    return super.makeNewClassLoader(classLoaderReference,cha,parent,scope);
  }
}
Program: 40352
Project: 40352
Buggy source:
public PolyglotClassLoaderFactory(SetOfClasses exclusions,IRTranslatorExtension javaExtInfo){
  super(exclusions);
  fExtensionMap.put(EclipseProjectPath.SOURCE_REF,javaExtInfo);
}

Fixed version (ground truth):
public PolyglotClassLoaderFactory(SetOfClasses exclusions,IRTranslatorExtension javaExtInfo){
  super(exclusions);
  fExtensionMap.put(JavaSourceAnalysisScope.SOURCE,javaExtInfo);
}
Program: 40353
Project: 40353
Buggy source:
public void performVerboseAction(){
  System.err.println("String_Node_Str" + nEvaluated);
  System.err.println("String_Node_Str" + nCreated);
  System.err.println("String_Node_Str" + workList.size());
  if (MORE_VERBOSE) {
    AbstractStatement s=workList.takeStatement();
    System.err.println("String_Node_Str" + lineBreak(s.toString(),132));
    if (s instanceof VerboseAction) {
      ((VerboseAction)s).performVerboseAction();
    }
    workList.insertStatement(s);
  }
}

Fixed version (ground truth):
public void performVerboseAction(){
  System.err.println("String_Node_Str" + nEvaluated);
  System.err.println("String_Node_Str" + nCreated);
  System.err.println("String_Node_Str" + workList.size());
  if (MORE_VERBOSE) {
    if (!workList.isEmpty()) {
      AbstractStatement s=workList.takeStatement();
      System.err.println("String_Node_Str" + lineBreak(s.toString(),132));
      if (s instanceof VerboseAction) {
        ((VerboseAction)s).performVerboseAction();
      }
      workList.insertStatement(s);
    }
  }
}
Program: 40354
Project: 40354
Buggy source:
/** 
 * Solve the set of dataflow graph. <p> PRECONDITION: graph is set up
 * @return true iff the evaluation of some equation caused a change in thevalue of some variable.
 */
@SuppressWarnings("String_Node_Str") public boolean solve(IProgressMonitor monitor) throws CancelException {
  boolean globalChange=false;
  if (firstSolve) {
    initForFirstSolve();
  }
  while (!workList.isEmpty()) {
    MonitorUtil.throwExceptionIfCanceled(monitor);
    orderStatements();
    AbstractStatement s=workList.takeStatement();
    if (DEBUG) {
      Trace.println("String_Node_Str" + s);
    }
    byte code=s.evaluate();
    if (verbose) {
      nEvaluated++;
      if (nEvaluated % getVerboseInterval() == 0) {
        performVerboseAction();
      }
      if (nEvaluated % getPeriodicMaintainInterval() == 0) {
        periodicMaintenance();
      }
    }
    if (DEBUG) {
      Trace.println("String_Node_Str" + s + "String_Node_Str"+ isChanged(code));
    }
    if (isChanged(code)) {
      globalChange=true;
      updateWorkList(s);
    }
    if (isFixed(code)) {
      removeStatement(s);
    }
  }
  return globalChange;
}

Fixed version (ground truth):
/** 
 * Solve the set of dataflow graph. <p> PRECONDITION: graph is set up
 * @return true iff the evaluation of some equation caused a change in the value of some variable.
 */
@SuppressWarnings("String_Node_Str") public boolean solve(IProgressMonitor monitor) throws CancelException {
  boolean globalChange=false;
  if (firstSolve) {
    initForFirstSolve();
  }
  while (!workList.isEmpty()) {
    MonitorUtil.throwExceptionIfCanceled(monitor);
    orderStatements();
    AbstractStatement s=workList.takeStatement();
    if (DEBUG) {
      Trace.println("String_Node_Str" + s);
    }
    byte code=s.evaluate();
    if (verbose) {
      nEvaluated++;
      if (nEvaluated % getVerboseInterval() == 0) {
        performVerboseAction();
      }
      if (nEvaluated % getPeriodicMaintainInterval() == 0) {
        periodicMaintenance();
      }
    }
    if (DEBUG) {
      Trace.println("String_Node_Str" + s + "String_Node_Str"+ isChanged(code));
    }
    if (isChanged(code)) {
      globalChange=true;
      updateWorkList(s);
    }
    if (isFixed(code)) {
      removeStatement(s);
    }
  }
  return globalChange;
}
Program: 40355
Project: 40355
Buggy source:
public boolean isPEI(){
  return true;
}

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

Fixed version (ground truth):
public boolean isPEI(){
  return !isStatic();
}
Program: 40357
Project: 40357
Buggy source:
public static void main(String[] args) throws Exception, IllegalArgumentException {
  if (args.length < 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String in=args[0];
  String out=args[1];
  String[] match=new String[args.length - 2];
  System.arraycopy(args,2,match,0,match.length);
  JarFile inJar=new JarFile(in);
  JarOutputStream outJar=new JarOutputStream(new FileOutputStream(out));
  JarFile[] matches=new JarFile[match.length];
  for (int i=0; i < match.length; i++) {
    matches[i]=new JarFile(match[i]);
  }
  for (Enumeration<JarEntry> e=inJar.entries(); e.hasMoreElements(); ) {
    JarEntry entry=e.nextElement();
    if (matchEntry(matches,entry)) {
      outJar.putNextEntry(entry);
      byte[] data=new byte[(int)entry.getSize()];
      InputStream stream=inJar.getInputStream(entry);
      readFully(stream,data);
      outJar.write(data);
      outJar.flush();
    }
  }
  outJar.close();
}

Fixed version (ground truth):
public static void main(String[] args) throws Exception, IllegalArgumentException {
  if (args.length < 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String in=args[0];
  String out=args[1];
  if (in == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (out == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  String[] match=new String[args.length - 2];
  System.arraycopy(args,2,match,0,match.length);
  JarFile inJar=new JarFile(in);
  JarOutputStream outJar=new JarOutputStream(new FileOutputStream(out));
  JarFile[] matches=new JarFile[match.length];
  for (int i=0; i < match.length; i++) {
    matches[i]=new JarFile(match[i]);
  }
  for (Enumeration<JarEntry> e=inJar.entries(); e.hasMoreElements(); ) {
    JarEntry entry=e.nextElement();
    if (matchEntry(matches,entry)) {
      outJar.putNextEntry(entry);
      byte[] data=new byte[(int)entry.getSize()];
      InputStream stream=inJar.getInputStream(entry);
      readFully(stream,data);
      outJar.write(data);
      outJar.flush();
    }
  }
  outJar.close();
}
Program: 40358
Project: 40358
Buggy source:
@Override final public int hashCode(){
  return getType().hashCode() + 14411 * getValue().hashCode();
}

Fixed version (ground truth):
@Override final public int hashCode(){
  int v=getValue() == null ? 0 : getValue().hashCode();
  return getType().hashCode() + 14411 * v;
}
Program: 40359
Project: 40359
Buggy source:
/** 
 * @return the constant value pushed: an Integer, a Long, a Float, a Double, aString, or null
 */
public abstract Object getValue();

Fixed version (ground truth):
/** 
 * @return the constant value pushed: an Integer, a Long, a Float, a Double, a String, or null
 */
public abstract Object getValue();
Program: 40360
Project: 40360
Buggy source:
@Override final public boolean equals(Object o){
  if (o instanceof ConstantInstruction) {
    ConstantInstruction i=(ConstantInstruction)o;
    return i.getType().equals(getType()) && i.getValue().equals(getValue());
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override final public boolean equals(Object o){
  if (o instanceof ConstantInstruction) {
    ConstantInstruction i=(ConstantInstruction)o;
    if (!i.getType().equals(getType())) {
      return false;
    }
    if (i.getValue() == null) {
      if (getValue() == null) {
        return true;
      }
 else {
        return false;
      }
    }
 else {
      if (getValue() == null) {
        return false;
      }
 else {
        return i.getValue().equals(getValue());
      }
    }
  }
 else {
    return false;
  }
}
Program: 40361
Project: 40361
Buggy source:
protected InstanceofInstruction(String type){
  super(OP_instanceof);
  this.type=type;
}

Fixed version (ground truth):
protected InstanceofInstruction(String type){
  super(OP_instanceof);
  this.type=type;
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 40362
Project: 40362
Buggy source:
/** 
 * Build an editor for specific method data. After patching the code you can retrieve the new code, handlers and instructions-to-bytecode-offsets map.
 */
public MethodEditor(Instruction[] instructions,ExceptionHandler[][] handlers,int[] instructionsToBytecodes){
  methodInfo=null;
  this.instructionsToBytecodes=instructionsToBytecodes;
  this.instructions=instructions;
  this.handlers=handlers;
}

Fixed version (ground truth):
/** 
 * Build an editor for specific method data. After patching the code you can retrieve the new code, handlers and instructions-to-bytecode-offsets map.
 */
public MethodEditor(Instruction[] instructions,ExceptionHandler[][] handlers,int[] instructionsToBytecodes){
  if (instructions == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  methodInfo=null;
  this.instructionsToBytecodes=instructionsToBytecodes;
  this.instructions=instructions;
  this.handlers=handlers;
}
Program: 40363
Project: 40363
Buggy source:
/** 
 * Compute the promoted type that the JVM uses to manipulate values of type "t" on its working stack.
 * @throws IllegalArgumentException  if t is null
 */
public static String getStackType(String t){
  if (t == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
switch (t.charAt(0)) {
case 'Z':
case 'C':
case 'B':
case 'S':
    return "String_Node_Str";
default :
  return t;
}
}

Fixed version (ground truth):
/** 
 * Compute the promoted type that the JVM uses to manipulate values of type "t" on its working stack.
 * @throws IllegalArgumentException  if t is null
 */
public static String getStackType(String t){
  if (t == null || t.length() < 1) {
    throw new IllegalArgumentException("String_Node_Str" + t);
  }
switch (t.charAt(0)) {
case 'Z':
case 'C':
case 'B':
case 'S':
    return "String_Node_Str";
default :
  return t;
}
}
Program: 40364
Project: 40364
Buggy source:
/** 
 * Compute the number of parameters given by method signature "type". Any "this" parameter is not included.
 * @throws IllegalArgumentException  if type == null
 */
static int getParamsCount(String type) throws IllegalArgumentException {
  if (type == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  int index=1;
  int count=0;
  while (type.charAt(index) != ')') {
    count++;
    index+=getTypeLength(type,index);
  }
  return count;
}

Fixed version (ground truth):
/** 
 * Compute the number of parameters given by method signature "type". Any "this" parameter is not included.
 * @throws IllegalArgumentException  if type == null
 */
static int getParamsCount(String type) throws IllegalArgumentException {
  if (type == null || type.length() < 2) {
    throw new IllegalArgumentException("String_Node_Str" + type);
  }
  int index=1;
  int count=0;
  while (type.charAt(index) != ')') {
    count++;
    index+=getTypeLength(type,index);
  }
  return count;
}
Program: 40365
Project: 40365
Buggy source:
/** 
 * @return true iff t is a primitive type
 */
public static boolean isPrimitiveType(String t){
  if (t == null) {
    return false;
  }
 else {
switch (t.charAt(0)) {
case 'L':
case '[':
      return false;
default :
    return true;
}
}
}

Fixed version (ground truth):
/** 
 * @return true iff t is a primitive type
 */
public static boolean isPrimitiveType(String t){
  if (t == null || t.length() == 0) {
    return false;
  }
 else {
switch (t.charAt(0)) {
case 'L':
case '[':
      return false;
default :
    return true;
}
}
}
Program: 40366
Project: 40366
Buggy source:
/** 
 * Initialize a verifier.
 * @throws NullPointerException  if info is null
 */
public Verifier(MethodData info) throws NullPointerException {
  super(info);
}

Fixed version (ground truth):
/** 
 * Initialize a verifier.
 * @throws NullPointerException if info is null
 */
public Verifier(MethodData info) throws NullPointerException {
  super(info);
}
Program: 40367
Project: 40367
Buggy source:
public static void main(String[] args){
  for (int i=0; i < args.length; i++) {
    try {
      byte[] data=Util.readFully(new FileInputStream(args[i]));
      ClassReader r=new ClassReader(data);
      System.out.println(Util.makeClass(r.getName()) + "String_Node_Str" + computeSerialVersionUID(r));
    }
 catch (    FileNotFoundException e) {
      System.err.println("String_Node_Str" + args[i]);
    }
catch (    IOException e) {
      System.err.println("String_Node_Str" + args[i]);
    }
catch (    InvalidClassFileException e) {
      System.err.println("String_Node_Str" + args[i]);
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  for (int i=0; i < args.length; i++) {
    if (args[i] == null) {
      throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
    }
    try {
      byte[] data=Util.readFully(new FileInputStream(args[i]));
      ClassReader r=new ClassReader(data);
      System.out.println(Util.makeClass(r.getName()) + "String_Node_Str" + computeSerialVersionUID(r));
    }
 catch (    FileNotFoundException e) {
      System.err.println("String_Node_Str" + args[i]);
    }
catch (    IOException e) {
      System.err.println("String_Node_Str" + args[i]);
    }
catch (    InvalidClassFileException e) {
      System.err.println("String_Node_Str" + args[i]);
    }
  }
}
Program: 40368
Project: 40368
Buggy source:
/** 
 * Call this when you're done modifying classes.
 */
final public void close() throws IOException {
  if (passUnmodifiedClasses) {
    writeUnmodifiedClasses();
  }
  if (outputJar != null) {
    outputJar.close();
  }
  if (cachedJar != null) {
    cachedJar.close();
  }
}

Fixed version (ground truth):
/** 
 * Call this when you're done modifying classes.
 */
final public void close() throws IOException, IllegalStateException {
  if (passUnmodifiedClasses) {
    writeUnmodifiedClasses();
  }
  if (outputJar != null) {
    outputJar.close();
  }
  if (cachedJar != null) {
    cachedJar.close();
  }
}
Program: 40369
Project: 40369
Buggy source:
/** 
 * Parse an argument list to find elements to instrument and the name of the output file. The "-o filename" option selects the output JAR file name. Any other argument not starting with "-" is added to the list of elements to instrument, if it appears to be the name of a class file, JAR file, or directory. If any argument starting with "--" is encountered, the rest of the command-line is considered leftover
 * @return the arguments that were not understood
 * @throws IllegalArgumentException  if args == null
 */
final public String[] parseStandardArgs(String[] args) throws IllegalArgumentException, IOException {
  if (args == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ArrayList<String> leftover=new ArrayList<String>();
  for (int i=0; i < args.length; i++) {
    String a=args[i];
    if (a.equals("String_Node_Str") && i + 1 < args.length) {
      setOutputJar(new File(args[i + 1]));
      i++;
      continue;
    }
 else     if (!a.startsWith("String_Node_Str")) {
      if (addInputElement(a)) {
        continue;
      }
    }
 else     if (a.startsWith("String_Node_Str")) {
      for (int j=i; j < args.length; j++) {
        leftover.add(args[j]);
      }
      break;
    }
    leftover.add(a);
  }
  String[] r=new String[leftover.size()];
  leftover.toArray(r);
  return r;
}

Fixed version (ground truth):
/** 
 * Parse an argument list to find elements to instrument and the name of the output file. The "-o filename" option selects the output JAR file name. Any other argument not starting with "-" is added to the list of elements to instrument, if it appears to be the name of a class file, JAR file, or directory. If any argument starting with "--" is encountered, the rest of the command-line is considered leftover
 * @return the arguments that were not understood
 * @throws IllegalArgumentException  if args == null
 */
final public String[] parseStandardArgs(String[] args) throws IllegalArgumentException, IOException {
  if (args == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ArrayList<String> leftover=new ArrayList<String>();
  for (int i=0; i < args.length; i++) {
    String a=args[i];
    if (a == null) {
      throw new IllegalArgumentException("String_Node_Str" + i + "String_Node_Str");
    }
    if (a.equals("String_Node_Str") && i + 1 < args.length) {
      setOutputJar(new File(args[i + 1]));
      i++;
      continue;
    }
 else     if (!a.startsWith("String_Node_Str")) {
      if (addInputElement(a)) {
        continue;
      }
    }
 else     if (a.startsWith("String_Node_Str")) {
      for (int j=i; j < args.length; j++) {
        leftover.add(args[j]);
      }
      break;
    }
    leftover.add(a);
  }
  String[] r=new String[leftover.size()];
  leftover.toArray(r);
  return r;
}
Program: 40370
Project: 40370
Buggy source:
/** 
 * Set the 4 bytes at offset 'offset' in 'buf' to the signed 32-bit value in v.
 * @throws IllegalArgumentException if buf is null
 */
public static void setInt(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (buf == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (offset >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
  buf[offset]=(byte)(v >> 24);
  buf[offset + 1]=(byte)(v >> 16);
  buf[offset + 2]=(byte)(v >> 8);
  buf[offset + 3]=(byte)v;
}

Fixed version (ground truth):
/** 
 * Set the 4 bytes at offset 'offset' in 'buf' to the signed 32-bit value in v.
 * @throws IllegalArgumentException if buf is null
 */
public static void setInt(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (buf == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    buf[offset]=(byte)(v >> 24);
    buf[offset + 1]=(byte)(v >> 16);
    buf[offset + 2]=(byte)(v >> 8);
    buf[offset + 3]=(byte)v;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
}
Program: 40371
Project: 40371
Buggy source:
/** 
 * Set the 2 bytes at offset 'offset' in 'buf' to the unsigned 16-bit value in v.
 * @throws IllegalArgumentException if buf is null
 */
public static void setUShort(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (buf == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (offset + 1 >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + buf.length + "String_Node_Str"+ offset);
  }
  buf[offset]=(byte)(v >> 8);
  buf[offset + 1]=(byte)v;
}

Fixed version (ground truth):
/** 
 * Set the 2 bytes at offset 'offset' in 'buf' to the unsigned 16-bit value in v.
 * @throws IllegalArgumentException if buf is null
 */
public static void setUShort(byte[] buf,int offset,int v) throws IllegalArgumentException {
  if (buf == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (offset < 0 || offset + 1 >= buf.length) {
    throw new IllegalArgumentException("String_Node_Str" + buf.length + "String_Node_Str"+ offset);
  }
  try {
    buf[offset]=(byte)(v >> 8);
    buf[offset + 1]=(byte)v;
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
}
Program: 40372
Project: 40372
Buggy source:
/** 
 * @param bytes the raw class file data
 * @param offset the start of the constant pool data
 * @param itemCount the number of items in the pool
 */
public ConstantPoolParser(byte[] bytes,int offset,int itemCount) throws InvalidClassFileException {
  this.bytes=bytes;
  if (offset < 0) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
  if (itemCount < 0) {
    throw new IllegalArgumentException("String_Node_Str" + itemCount);
  }
  parseConstantPool(offset,itemCount);
}

Fixed version (ground truth):
/** 
 * @param bytes the raw class file data
 * @param offset the start of the constant pool data
 * @param itemCount the number of items in the pool
 */
public ConstantPoolParser(byte[] bytes,int offset,int itemCount) throws InvalidClassFileException {
  this.bytes=bytes;
  if (offset < 0) {
    throw new IllegalArgumentException("String_Node_Str" + offset);
  }
  if (itemCount < 0 || itemCount > MAX_CP_ITEMS) {
    throw new IllegalArgumentException("String_Node_Str" + itemCount);
  }
  parseConstantPool(offset,itemCount);
}
Program: 40373
Project: 40373
Buggy source:
public boolean containsValue(Object value){
  if (keysAndValues == null) {
    return false;
  }
  for (int i=size(); i < keysAndValues.length; i++) {
    if (keysAndValues[i].equals(value)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean containsValue(Object value){
  if (keysAndValues == null) {
    return false;
  }
  for (int i=size(); i < keysAndValues.length; i++) {
    Object v=keysAndValues[i];
    if (v == null) {
      if (value == null) {
        return true;
      }
    }
 else {
      if (v.equals(value)) {
        return true;
      }
    }
  }
  return false;
}
Program: 40374
Project: 40374
Buggy source:
@Override protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new JDTJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,mainClassDescriptors);
    }
  }
;
  try {
    engine.setExclusionsFile(FileProvider.getFileFromPlugin(CoreTestsPlugin.getDefault(),CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
  }
 catch (  IOException e) {
    Assert.assertFalse("String_Node_Str",true);
  }
  return engine;
}

Fixed version (ground truth):
@Override protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new JDTJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
    }
  }
;
  try {
    engine.setExclusionsFile(FileProvider.getFileFromPlugin(CoreTestsPlugin.getDefault(),CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
  }
 catch (  IOException e) {
    Assert.assertFalse("String_Node_Str",true);
  }
  return engine;
}
Program: 40375
Project: 40375
Buggy source:
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,mainClassDescriptors);
}

Fixed version (ground truth):
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
}
Program: 40376
Project: 40376
Buggy source:
@Override protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new JDTJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,mainClassDescriptors);
    }
  }
;
  try {
    engine.setExclusionsFile(FileProvider.getFileFromPlugin(CoreTestsPlugin.getDefault(),CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
  }
 catch (  IOException e) {
    Assert.assertFalse("String_Node_Str",true);
  }
  return engine;
}

Fixed version (ground truth):
@Override protected JavaSourceAnalysisEngine getAnalysisEngine(final String[] mainClassDescriptors){
  JavaSourceAnalysisEngine engine=new JDTJavaSourceAnalysisEngine(){
    protected Iterable<Entrypoint> makeDefaultEntrypoints(    AnalysisScope scope,    IClassHierarchy cha){
      return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
    }
  }
;
  try {
    engine.setExclusionsFile(FileProvider.getFileFromPlugin(CoreTestsPlugin.getDefault(),CallGraphTestUtil.REGRESSION_EXCLUSIONS).getAbsolutePath());
  }
 catch (  IOException e) {
    Assert.assertFalse("String_Node_Str",true);
  }
  return engine;
}
Program: 40377
Project: 40377
Buggy source:
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(EclipseProjectPath.SOURCE_REF,cha,mainClassDescriptors);
}

Fixed version (ground truth):
protected Iterable<Entrypoint> makeDefaultEntrypoints(AnalysisScope scope,IClassHierarchy cha){
  return Util.makeMainEntrypoints(JavaSourceAnalysisScope.SOURCE,cha,mainClassDescriptors);
}
Program: 40378
Project: 40378
Buggy source:
protected IClassLoader makeNewClassLoader(ClassLoaderReference classLoaderReference,IClassHierarchy cha,IClassLoader parent,AnalysisScope scope) throws IOException {
  if (classLoaderReference.equals(EclipseProjectPath.SOURCE_REF)) {
    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=new JDTSourceLoaderImpl(classLoaderReference,parent,getExclusions(),cha);
    cl.init(scope.getModules(classLoaderReference));
    return cl;
  }
 else {
    return super.makeNewClassLoader(classLoaderReference,cha,parent,scope);
  }
}