nus-yam/ex-repair huggingface dataset:
Program: 100206
Project: 100206
Buggy source:
/** 
 * Compute an analysis scope for the current selection
 */
protected AnalysisScope computeScope(){
  IStructuredSelection selection=(IStructuredSelection)currentSelection;
  Collection<EclipseProjectPath> projectPaths=HashSetFactory.make();
  for (Iterator it=selection.iterator(); it.hasNext(); ) {
    Object object=it.next();
    if (object instanceof IJavaElement) {
      IJavaElement e=(IJavaElement)object;
      IJavaProject jp=e.getJavaProject();
      projectPaths.add(EclipseProjectPath.make(ResourcesPlugin.getWorkspace().getRoot().getLocation(),jp));
    }
 else {
      Assertions.UNREACHABLE(object.getClass());
    }
  }
  AnalysisScope scope=mergeProjectPaths(projectPaths);
  return scope;
}

Fixed version (ground truth):
/** 
 * Compute an analysis scope for the current selection
 * @throws IOException 
 * @throws JavaModelException 
 */
protected AnalysisScope computeScope() throws JavaModelException, IOException {
  IStructuredSelection selection=(IStructuredSelection)currentSelection;
  Collection<EclipseProjectPath> projectPaths=HashSetFactory.make();
  for (Iterator it=selection.iterator(); it.hasNext(); ) {
    Object object=it.next();
    if (object instanceof IJavaElement) {
      IJavaElement e=(IJavaElement)object;
      IJavaProject jp=e.getJavaProject();
      projectPaths.add(EclipseProjectPath.make(ResourcesPlugin.getWorkspace().getRoot().getLocation(),jp));
    }
 else {
      Assertions.UNREACHABLE(object.getClass());
    }
  }
  AnalysisScope scope=mergeProjectPaths(projectPaths);
  return scope;
}
Program: 100207
Project: 100207
Buggy source:
private EclipseProjectPath(IPath workspaceRootPath,IJavaProject project){
}

Fixed version (ground truth):
private EclipseProjectPath(IPath workspaceRootPath,IJavaProject project) throws JavaModelException, IOException {
}
Program: 100208
Project: 100208
Buggy source:
public static EclipseProjectPath make(IPath workspaceRootPath,IJavaProject project){
  if (workspaceRootPath == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return new EclipseProjectPath(workspaceRootPath,project);
}

Fixed version (ground truth):
public static EclipseProjectPath make(IPath workspaceRootPath,IJavaProject project) throws JavaModelException, IOException {
  if (workspaceRootPath == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return new EclipseProjectPath(workspaceRootPath,project);
}
Program: 100209
Project: 100209
Buggy source:
/** 
 * compute the analysis scope for a project in the current workspace
 */
public static AnalysisScope computeScope(String projectName){
  IJavaProject jp=getProjectFromWorkspace(projectName);
  IWorkspaceRoot workspaceRoot=ResourcesPlugin.getWorkspace().getRoot();
  EclipseProjectPath path=EclipseProjectPath.make(workspaceRoot.getLocation(),jp);
  return path.toAnalysisScope(null);
}

Fixed version (ground truth):
/** 
 * compute the analysis scope for a project in the current workspace
 * @throws IOException 
 * @throws JavaModelException 
 */
public static AnalysisScope computeScope(String projectName) throws JavaModelException, IOException {
  IJavaProject jp=getProjectFromWorkspace(projectName);
  IWorkspaceRoot workspaceRoot=ResourcesPlugin.getWorkspace().getRoot();
  EclipseProjectPath path=EclipseProjectPath.make(workspaceRoot.getLocation(),jp);
  return path.toAnalysisScope(null);
}
Program: 100211
Project: 100211
Buggy source:
private void processBytecodesWithShrikeBT(BytecodeInfo info) throws InvalidClassFileException {
  info.decoder=makeDecoder();
  if (Assertions.verifyAssertions) {
    if (!isAbstract() && info.decoder == null) {
      Assertions.UNREACHABLE("String_Node_Str" + getReference());
    }
  }
  if (info.decoder == null) {
    return;
  }
  info.pcMap=info.decoder.getInstructionsToBytecodes();
  processDebugInfo(info);
  SimpleVisitor simpleVisitor=new SimpleVisitor(info);
  Instruction[] instructions=info.decoder.getInstructions();
  for (int i=0; i < instructions.length; i++) {
    simpleVisitor.setInstructionIndex(i);
    instructions[i].visit(simpleVisitor);
    if (Exceptions.isPEI(instructions[i])) {
      Collection<TypeReference> t=Exceptions.getIndependentExceptionTypes(instructions[i]);
      simpleVisitor.implicitExceptions.addAll(t);
    }
  }
  copyVisitorSetsToArrays(simpleVisitor,info);
}

Fixed version (ground truth):
private void processBytecodesWithShrikeBT(BytecodeInfo info) throws InvalidClassFileException {
  info.decoder=makeDecoder();
  if (Assertions.verifyAssertions) {
    if (!isAbstract() && info.decoder == null) {
      Assertions.UNREACHABLE("String_Node_Str" + getReference());
    }
  }
  if (info.decoder == null) {
    return;
  }
  info.pcMap=info.decoder.getInstructionsToBytecodes();
  processDebugInfo(info);
  SimpleVisitor simpleVisitor=new SimpleVisitor(info);
  Instruction[] instructions=info.decoder.getInstructions();
  for (int i=0; i < instructions.length; i++) {
    simpleVisitor.setInstructionIndex(i);
    instructions[i].visit(simpleVisitor);
    if (Exceptions.isPEI(instructions[i])) {
      Collection<TypeReference> t=Exceptions.getIndependentExceptionTypes(instructions[i]);
      if (t != null) {
        simpleVisitor.implicitExceptions.addAll(t);
      }
    }
  }
  copyVisitorSetsToArrays(simpleVisitor,info);
}
Program: 100212
Project: 100212
Buggy source:
@Override public Collection<TypeReference> getExceptionTypes(){
  return Exceptions.getNullPointerException();
}

Fixed version (ground truth):
@Override public Collection<TypeReference> getExceptionTypes(){
  Collection<TypeReference> empty=Collections.emptySet();
  return isStatic() ? empty : Exceptions.getNullPointerException();
}
Program: 100214
Project: 100214
Buggy source:
private Set getTypesForContext(Context context){
  XMLReflectionReader spec=(XMLReflectionReader)userSpec;
  if (spec != null && context instanceof CallerSiteContext) {
    CallerSiteContext site=(CallerSiteContext)context;
    MemberReference m=site.getCaller().getMethod().getReference();
    ReflectionSummary summary=spec.getSummary(m);
    if (summary != null) {
      Set types=summary.getTypesForProgramLocation(site.getSite().getProgramCounter());
      if (types != null) {
        return types;
      }
    }
  }
  Set types=map.get(context);
  return types;
}

Fixed version (ground truth):
private Set getTypesForContext(Context context){
  XMLReflectionReader spec=(XMLReflectionReader)userSpec;
  if (spec != null && context instanceof CallerSiteContext) {
    CallerSiteContext site=(CallerSiteContext)context;
    MemberReference m=site.getCaller().getMethod().getReference();
    ReflectionSummary summary=spec.getSummary(m);
    if (summary != null) {
      Set types=summary.getTypesForProgramLocation(site.getCallSite().getProgramCounter());
      if (types != null) {
        return types;
      }
    }
  }
  Set types=map.get(context);
  return types;
}
Program: 100215
Project: 100215
Buggy source:
@Override public int hashCode(){
  return programCounter;
}

Fixed version (ground truth):
@Override public int hashCode(){
  return programCounter + 77;
}
Program: 100216
Project: 100216
Buggy source:
@Override public int hashCode(){
  return callSite.hashCode() * super.hashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return callSite.hashCode() * 19 + super.hashCode();
}
Program: 100217
Project: 100217
Buggy source:
protected IClassHierarchy buildClassHierarchy(){
  IClassHierarchy cha=null;
  ClassLoaderFactory factory=getClassLoaderFactory(scope.getExclusions(),getTranslatorExtension());
  try {
    cha=ClassHierarchy.make(getScope(),factory);
  }
 catch (  ClassHierarchyException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.toString());
    e.printStackTrace();
  }
  return cha;
}

Fixed version (ground truth):
public IClassHierarchy buildClassHierarchy(){
  IClassHierarchy cha=null;
  ClassLoaderFactory factory=getClassLoaderFactory(scope.getExclusions(),getTranslatorExtension());
  try {
    cha=ClassHierarchy.make(getScope(),factory);
  }
 catch (  ClassHierarchyException e) {
    System.err.println("String_Node_Str");
    System.err.println(e.toString());
    e.printStackTrace();
  }
  return cha;
}
Program: 100218
Project: 100218
Buggy source:
protected IClassHierarchy buildClassHierarchy(){
  try {
    return ClassHierarchy.make(getScope(),loaderFactory,JavaScriptLoader.JS);
  }
 catch (  ClassHierarchyException e) {
    Assertions.UNREACHABLE(e.toString());
    return null;
  }
}

Fixed version (ground truth):
public IClassHierarchy buildClassHierarchy(){
  try {
    return ClassHierarchy.make(getScope(),loaderFactory,JavaScriptLoader.JS);
  }
 catch (  ClassHierarchyException e) {
    Assertions.UNREACHABLE(e.toString());
    return null;
  }
}
Program: 100219
Project: 100219
Buggy source:
/** 
 * @param lifecycleEntrypoints Should EJB lifecycle entrypoints be considered as call graph entrypoints?
 */
public J2EEAnalysisScope(String baseScope,ClassLoader loader,String exclusionsFile,boolean lifecycleEntrypoints){
  super(baseScope,exclusionsFile,loader);
  this.lifecycleEntrypoints=lifecycleEntrypoints;
}

Fixed version (ground truth):
/** 
 * @param lifecycleEntrypoints Should EJB lifecycle entrypoints be considered as call graph entrypoints?
 */
public J2EEAnalysisScope(String baseScope,ClassLoader loader,String exclusionsFile,boolean lifecycleEntrypoints){
  super(Collections.singleton(Language.JAVA));
  AnalysisScope base=AnalysisScopeReader.read(baseScope,exclusionsFile,loader);
  for (  ClassLoaderReference cl : base.getLoaders()) {
    for (    Module m : base.getModules(cl)) {
      addToScope(cl,m);
    }
  }
  if (exclusionsFile != null) {
    FileOfClasses file=new FileOfClasses(exclusionsFile,loader);
    setExclusions(file);
  }
  this.lifecycleEntrypoints=lifecycleEntrypoints;
}
Program: 100220
Project: 100220
Buggy source:
/** 
 * @throws IllegalArgumentException  if method == null
 */
protected TypeReference[][] makeParameterTypes(IMethod method) throws IllegalArgumentException {
  if (method == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  TypeReference[][] result=new TypeReference[method.getNumberOfParameters()][];
  for (int i=0; i < result.length; i++) {
    TypeReference t=method.getParameterType(i);
    if (!t.isPrimitiveType()) {
      IClass klass=cha.lookupClass(t);
      if (klass == null) {
        t=null;
      }
 else       if (klass.isAbstract()) {
        t=chooseAConcreteSubClass(klass);
      }
 else       if (klass.isInterface()) {
        t=chooseAnImplementor(klass);
      }
 else       if (klass.isArrayClass()) {
        ArrayClass arrayKlass=(ArrayClass)klass;
        IClass innermost=arrayKlass.getInnermostElementClass();
        if (innermost != null && innermost.isInterface()) {
          TypeReference impl=chooseAnImplementor(innermost);
          if (impl == null) {
            t=null;
          }
 else {
            t=TypeReference.findOrCreateArrayOf(impl);
            for (int dim=1; dim < arrayKlass.getDimensionality(); dim++) {
              t=TypeReference.findOrCreateArrayOf(t);
            }
          }
        }
      }
    }
    result[i]=(t == null) ? new TypeReference[0] : new TypeReference[]{t};
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @throws IllegalArgumentException  if method == null
 */
protected TypeReference[][] makeParameterTypes(IMethod method) throws IllegalArgumentException {
  if (method == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  TypeReference[][] result=new TypeReference[method.getNumberOfParameters()][];
  for (int i=0; i < result.length; i++) {
    TypeReference t=method.getParameterType(i);
    if (!t.isPrimitiveType()) {
      IClass klass=cha.lookupClass(t);
      if (klass == null) {
        t=null;
      }
 else       if (!klass.isInterface() && klass.isAbstract()) {
        t=chooseAConcreteSubClass(klass);
      }
 else       if (klass.isInterface()) {
        t=chooseAnImplementor(klass);
      }
 else       if (klass.isArrayClass()) {
        ArrayClass arrayKlass=(ArrayClass)klass;
        IClass innermost=arrayKlass.getInnermostElementClass();
        if (innermost != null && innermost.isInterface()) {
          TypeReference impl=chooseAnImplementor(innermost);
          if (impl == null) {
            t=null;
          }
 else {
            t=TypeReference.findOrCreateArrayOf(impl);
            for (int dim=1; dim < arrayKlass.getDimensionality(); dim++) {
              t=TypeReference.findOrCreateArrayOf(t);
            }
          }
        }
      }
    }
    result[i]=(t == null) ? new TypeReference[0] : new TypeReference[]{t};
  }
  return result;
}
Program: 100221
Project: 100221
Buggy source:
/** 
 * If s is a call statement, return the statement representing the normal return from s
 */
public static Statement getReturnStatementForCall(Statement s){
  if (s.getKind() == Kind.NORMAL) {
    SSAInstruction st=((NormalStatement)s).getInstruction();
    if (st instanceof SSAInvokeInstruction) {
      return new ParamStatement.NormalReturnCaller(s.getNode(),(SSAInvokeInstruction)st);
    }
 else {
      return s;
    }
  }
 else {
    return s;
  }
}

Fixed version (ground truth):
/** 
 * If s is a call statement, return the statement representing the normal return from s
 */
public static Statement getReturnStatementForCall(Statement s){
  if (s.getKind() == Kind.NORMAL) {
    SSAInstruction st=((NormalStatement)s).getInstruction();
    if (st instanceof SSAInvokeInstruction) {
      SSAAbstractInvokeInstruction call=(SSAAbstractInvokeInstruction)st;
      if (call.getCallSite().getDeclaredTarget().getReturnType().equals(TypeReference.Void)) {
        throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + "String_Node_Str" + call.getCallSite().getDeclaredTarget().getSignature() + "String_Node_Str");
      }
      return new ParamStatement.NormalReturnCaller(s.getNode(),(SSAInvokeInstruction)st);
    }
 else {
      return s;
    }
  }
 else {
    return s;
  }
}
Program: 100222
Project: 100222
Buggy source:
public IVocabulary getVocabulary(){
  return BasicVocabulary.make(Collections.emptySet());
}

Fixed version (ground truth):
public IVocabulary getVocabulary(){
  return BasicVocabulary.make(Collections.<IFunction>emptySet());
}
Program: 100223
Project: 100223
Buggy source:
public IMethod getCalleeTarget(CGNode N,CallSiteReference site,IClass receiver){
  MethodReference m=site.getDeclaredTarget();
  if (isEJBSuperInterface(m.getDeclaringClass())) {
    IClass inferred=getReceiverClassFromTypeInference(N,site);
    if (inferred != null) {
      receiver=inferred;
    }
  }
  if (FakeRootMethod.isFakeRootMethod(N.getMethod().getReference())) {
    if (deployment.isMessageDriven(m.getDeclaringClass())) {
      if (m.getName().equals(onMessageAtom) && m.getDescriptor().equals(onMessageDesc)) {
        return hijackOnMessageEntrypoint(m);
      }
    }
 else     if (receiver != null && cha.implementsInterface(receiver,ServletEntrypoints.Servlet)) {
      IMethod resolved=cha.resolveMethod(receiver,m.getSelector());
      if (!resolved.isInit() && !resolved.isClinit()) {
        return hijackServletEntrypoint(m);
      }
    }
  }
  m=specializeForReceiverType(receiver,m);
  SyntheticMethod X=methodReferenceIntercept(m);
  if (X != null) {
    return X;
  }
  IMethod target=parent.getCalleeTarget(N,site,receiver);
  if (target == null) {
    return null;
  }
  X=methodReferenceIntercept(target.getReference());
  if (X != null) {
    return X;
  }
 else {
    return target;
  }
}

Fixed version (ground truth):
public IMethod getCalleeTarget(CGNode N,CallSiteReference site,IClass receiver){
  MethodReference m=site.getDeclaredTarget();
  if (isEJBSuperInterface(m.getDeclaringClass())) {
    IClass inferred=getReceiverClassFromTypeInference(N,site);
    if (inferred != null) {
      receiver=inferred;
    }
  }
  IClass servlet=cha.lookupClass(ServletEntrypoints.Servlet);
  if (FakeRootMethod.isFakeRootMethod(N.getMethod().getReference())) {
    if (deployment.isMessageDriven(m.getDeclaringClass())) {
      if (m.getName().equals(onMessageAtom) && m.getDescriptor().equals(onMessageDesc)) {
        return hijackOnMessageEntrypoint(m);
      }
    }
 else     if (receiver != null && cha.implementsInterface(receiver,servlet)) {
      IMethod resolved=cha.resolveMethod(receiver,m.getSelector());
      if (!resolved.isInit() && !resolved.isClinit()) {
        return hijackServletEntrypoint(m);
      }
    }
  }
  m=specializeForReceiverType(receiver,m);
  SyntheticMethod X=methodReferenceIntercept(m);
  if (X != null) {
    return X;
  }
  IMethod target=parent.getCalleeTarget(N,site,receiver);
  if (target == null) {
    return null;
  }
  X=methodReferenceIntercept(target.getReference());
  if (X != null) {
    return X;
  }
 else {
    return target;
  }
}
Program: 100225
Project: 100225
Buggy source:
@Override public TypeAbstraction meet(TypeAbstraction rhs){
  if (rhs == TOP) {
    return this;
  }
 else {
    if (rhs instanceof PointType) {
      PointType other=(PointType)rhs;
      if (type.equals(other.type)) {
        return this;
      }
 else       if (type.isArrayClass() || other.type.isArrayClass()) {
        return new ConeType(type.getClassHierarchy().getRootClass());
      }
 else {
        return new ConeType(type.getClassHierarchy().getLeastCommonSuperclass(this.type,other.type));
      }
    }
 else     if (rhs instanceof ConeType) {
      ConeType other=(ConeType)rhs;
      TypeReference T=other.getType().getReference();
      if (type.isArrayClass() || T.isArrayType()) {
        return new ConeType(type.getClassHierarchy().getRootClass());
      }
      IClass typeKlass=type;
      if (type.getClassHierarchy().isSubclassOf(typeKlass,other.getType())) {
        return other;
      }
 else       if (other.isInterface()) {
        if (type.getClassHierarchy().implementsInterface(typeKlass,T)) {
          return other;
        }
      }
      return other.meet(new ConeType(other.getType()));
    }
 else {
      Assertions.UNREACHABLE("String_Node_Str" + rhs.getClass());
      return null;
    }
  }
}

Fixed version (ground truth):
@Override public TypeAbstraction meet(TypeAbstraction rhs){
  if (rhs == TOP) {
    return this;
  }
 else {
    if (rhs instanceof PointType) {
      PointType other=(PointType)rhs;
      if (type.equals(other.type)) {
        return this;
      }
 else       if (type.isArrayClass() || other.type.isArrayClass()) {
        return new ConeType(type.getClassHierarchy().getRootClass());
      }
 else {
        return new ConeType(type.getClassHierarchy().getLeastCommonSuperclass(this.type,other.type));
      }
    }
 else     if (rhs instanceof ConeType) {
      ConeType other=(ConeType)rhs;
      TypeReference T=other.getType().getReference();
      if (type.isArrayClass() || T.isArrayType()) {
        return new ConeType(type.getClassHierarchy().getRootClass());
      }
      IClass typeKlass=type;
      if (type.getClassHierarchy().isSubclassOf(typeKlass,other.getType())) {
        return other;
      }
 else       if (other.isInterface()) {
        if (type.getClassHierarchy().implementsInterface(typeKlass,other.getType())) {
          return other;
        }
      }
      return other.meet(new ConeType(other.getType()));
    }
 else {
      Assertions.UNREACHABLE("String_Node_Str" + rhs.getClass());
      return null;
    }
  }
}
Program: 100226
Project: 100226
Buggy source:
/** 
 * @return Collection of (IClass) interfaces this class implements, includingall ancestors of interfaces immediately implemented
 */
Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException ;

Fixed version (ground truth):
/** 
 * @return Collection of (IClass) interfaces this class implements, includingall ancestors of interfaces immediately implemented.
 */
Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException ;
Program: 100227
Project: 100227
Buggy source:
/** 
 * @return Collection of (IClass) interfaces this class directly implements
 */
Collection<IClass> getDirectInterfaces() throws ClassHierarchyException ;

Fixed version (ground truth):
/** 
 * @return Collection of (IClass) interfaces this class directly implementsIf this class is an interface, returns the interfaces it immediately extends.
 */
Collection<IClass> getDirectInterfaces() throws ClassHierarchyException ;
Program: 100229
Project: 100229
Buggy source:
public IField getField(Atom name){
  if (fieldMap.containsKey(name)) {
    return fieldMap.get(name);
  }
 else {
    IField f=findDeclaredField(name);
    if (f != null) {
      fieldMap.put(name,f);
      return f;
    }
 else     if (superClass != null) {
      f=superClass.getField(name);
      if (f != null) {
        fieldMap.put(name,f);
        return f;
      }
    }
    try {
      Collection<IClass> ifaces=isInterface() ? getAllAncestorInterfaces() : getAllImplementedInterfaces();
      for (      IClass i : ifaces) {
        f=i.getField(name);
        if (f != null) {
          fieldMap.put(name,f);
          return f;
        }
      }
    }
 catch (    ClassHierarchyException e) {
    }
  }
  return null;
}

Fixed version (ground truth):
public IField getField(Atom name){
  if (fieldMap.containsKey(name)) {
    return fieldMap.get(name);
  }
 else {
    IField f=findDeclaredField(name);
    if (f != null) {
      fieldMap.put(name,f);
      return f;
    }
 else     if (superClass != null) {
      f=superClass.getField(name);
      if (f != null) {
        fieldMap.put(name,f);
        return f;
      }
    }
    try {
      for (      IClass i : getAllImplementedInterfaces()) {
        f=i.getField(name);
        if (f != null) {
          fieldMap.put(name,f);
          return f;
        }
      }
    }
 catch (    ClassHierarchyException e) {
    }
  }
  return null;
}
Program: 100230
Project: 100230
Buggy source:
public Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException {
  if (Assertions.verifyAssertions) {
    if (isInterface()) {
      Assertions.UNREACHABLE("String_Node_Str" + this);
    }
  }
  if (allInterfaces != null) {
    return allInterfaces;
  }
 else {
    Collection<IClass> C=computeAllInterfacesAsCollection();
    allInterfaces=Collections.unmodifiableCollection(C);
    return allInterfaces;
  }
}

Fixed version (ground truth):
public Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException {
  if (allInterfaces != null) {
    return allInterfaces;
  }
 else {
    Collection<IClass> C=computeAllInterfacesAsCollection();
    allInterfaces=Collections.unmodifiableCollection(C);
    return allInterfaces;
  }
}
Program: 100231
Project: 100231
Buggy source:
/** 
 * @return true if it may be possible to resolve a call to a site on the concrete type dispatchType
 */
public static boolean feasibleChaResolution(IClassHierarchy cha,CallSiteReference site,IClass dispatchType){
  if (dispatchType == null) {
    return false;
  }
  if (dispatchType.isInterface()) {
    if (site.getDeclaredTarget().getSelector().equals(MethodReference.clinitSelector)) {
      return true;
    }
 else {
      return false;
    }
  }
  TypeReference targetType=site.getDeclaredTarget().getDeclaringClass();
  IClass resolvedType=cha.lookupClass(targetType);
  if (resolvedType == null) {
    return false;
  }
 else {
    if (resolvedType.isInterface()) {
      return cha.implementsInterface(dispatchType,resolvedType.getReference());
    }
 else {
      return cha.isSubclassOf(dispatchType,resolvedType);
    }
  }
}

Fixed version (ground truth):
/** 
 * @return true if it may be possible to resolve a call to a site on the concrete type dispatchType
 */
public static boolean feasibleChaResolution(IClassHierarchy cha,CallSiteReference site,IClass dispatchType){
  if (dispatchType == null) {
    return false;
  }
  if (dispatchType.isInterface()) {
    if (site.getDeclaredTarget().getSelector().equals(MethodReference.clinitSelector)) {
      return true;
    }
 else {
      return false;
    }
  }
  TypeReference targetType=site.getDeclaredTarget().getDeclaringClass();
  IClass resolvedType=cha.lookupClass(targetType);
  if (resolvedType == null) {
    return false;
  }
 else {
    if (resolvedType.isInterface()) {
      return cha.implementsInterface(dispatchType,resolvedType);
    }
 else {
      return cha.isSubclassOf(dispatchType,resolvedType);
    }
  }
}
Program: 100232
Project: 100232
Buggy source:
/** 
 * @param C
 * @return true iff C is a container class from java.util
 * @throws IllegalArgumentException  if C is null
 */
public static boolean isContainer(IClass C,IClassHierarchy cha){
  if (C == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (ClassLoaderReference.Primordial.equals(C.getClassLoader().getReference()) && TypeReference.JavaUtilCollection.getName().getPackage().equals(C.getReference().getName().getPackage())) {
    if (C.isInterface()) {
      IClass collection=cha.lookupClass(TypeReference.JavaUtilCollection);
      IClass map=cha.lookupClass(TypeReference.JavaUtilMap);
      if (Assertions.verifyAssertions) {
        Assertions._assert(collection != null);
        Assertions._assert(map != null);
      }
      Collection s;
      try {
        s=C.getAllAncestorInterfaces();
      }
 catch (      ClassHierarchyException e) {
        return false;
      }
      if (s.contains(collection) || s.contains(map)) {
        return true;
      }
    }
 else {
      if (cha.implementsInterface(C,TypeReference.JavaUtilCollection) || cha.implementsInterface(C,TypeReference.JavaUtilMap)) {
        return true;
      }
    }
  }
  if (miscContainers.contains(C.getReference())) {
    return true;
  }
  if (C.isArrayClass() && ((ArrayClass)C).getElementClass() != null && ((ArrayClass)C).getElementClass().getReference().isReferenceType()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @param C
 * @return true iff C is a container class from java.util
 * @throws IllegalArgumentException  if C is null
 */
public static boolean isContainer(IClass C,IClassHierarchy cha){
  if (C == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (ClassLoaderReference.Primordial.equals(C.getClassLoader().getReference()) && TypeReference.JavaUtilCollection.getName().getPackage().equals(C.getReference().getName().getPackage())) {
    IClass collection=cha.lookupClass(TypeReference.JavaUtilCollection);
    IClass map=cha.lookupClass(TypeReference.JavaUtilMap);
    if (C.isInterface()) {
      if (Assertions.verifyAssertions) {
        Assertions._assert(collection != null);
        Assertions._assert(map != null);
      }
      Collection s;
      try {
        s=C.getAllImplementedInterfaces();
      }
 catch (      ClassHierarchyException e) {
        return false;
      }
      if (s.contains(collection) || s.contains(map)) {
        return true;
      }
    }
 else {
      if (cha.implementsInterface(C,collection) || cha.implementsInterface(C,map)) {
        return true;
      }
    }
  }
  if (miscContainers.contains(C.getReference())) {
    return true;
  }
  if (C.isArrayClass() && ((ArrayClass)C).getElementClass() != null && ((ArrayClass)C).getElementClass().getReference().isReferenceType()) {
    return true;
  }
  return false;
}
Program: 100233
Project: 100233
Buggy source:
private OrdinalSet<InstanceKey> computeImplicitPointsToSetAtCheckCast(CGNode node,SSACheckCastInstruction instruction){
  PointerKey rhs=pointerKeys.getPointerKeyForLocal(node,instruction.getVal());
  OrdinalSet<InstanceKey> rhsSet=getPointsToSet(rhs);
  MutableSparseIntSet S=MutableSparseIntSet.makeEmpty();
  IClass klass=getCallGraph().getClassHierarchy().lookupClass(instruction.getDeclaredResultType());
  if (klass == null) {
    return rhsSet;
  }
 else {
    if (klass.isInterface()) {
      for (Iterator it=rhsSet.iterator(); it.hasNext(); ) {
        InstanceKey ik=(InstanceKey)it.next();
        if (getCallGraph().getClassHierarchy().implementsInterface(ik.getConcreteType(),klass.getReference())) {
          S.add(getInstanceKeyMapping().getMappedIndex(ik));
        }
      }
    }
 else {
      for (Iterator it=rhsSet.iterator(); it.hasNext(); ) {
        InstanceKey ik=(InstanceKey)it.next();
        if (getCallGraph().getClassHierarchy().isSubclassOf(ik.getConcreteType(),klass)) {
          S.add(getInstanceKeyMapping().getMappedIndex(ik));
        }
      }
    }
  }
  return new OrdinalSet<InstanceKey>(S,instanceKeys);
}

Fixed version (ground truth):
private OrdinalSet<InstanceKey> computeImplicitPointsToSetAtCheckCast(CGNode node,SSACheckCastInstruction instruction){
  PointerKey rhs=pointerKeys.getPointerKeyForLocal(node,instruction.getVal());
  OrdinalSet<InstanceKey> rhsSet=getPointsToSet(rhs);
  MutableSparseIntSet S=MutableSparseIntSet.makeEmpty();
  IClass klass=getCallGraph().getClassHierarchy().lookupClass(instruction.getDeclaredResultType());
  if (klass == null) {
    return rhsSet;
  }
 else {
    if (klass.isInterface()) {
      for (Iterator it=rhsSet.iterator(); it.hasNext(); ) {
        InstanceKey ik=(InstanceKey)it.next();
        if (getCallGraph().getClassHierarchy().implementsInterface(ik.getConcreteType(),klass)) {
          S.add(getInstanceKeyMapping().getMappedIndex(ik));
        }
      }
    }
 else {
      for (Iterator it=rhsSet.iterator(); it.hasNext(); ) {
        InstanceKey ik=(InstanceKey)it.next();
        if (getCallGraph().getClassHierarchy().isSubclassOf(ik.getConcreteType(),klass)) {
          S.add(getInstanceKeyMapping().getMappedIndex(ik));
        }
      }
    }
  }
  return new OrdinalSet<InstanceKey>(S,instanceKeys);
}
Program: 100234
Project: 100234
Buggy source:
public void act(int i){
  InstanceKey I=system.getInstanceKey(i);
  if (!I.getConcreteType().isArrayClass()) {
    return;
  }
  TypeReference C=I.getConcreteType().getReference().getArrayElementType();
  if (C.isPrimitiveType()) {
    return;
  }
  IClass contents=getClassHierarchy().lookupClass(C);
  if (Assertions.verifyAssertions) {
    if (contents == null) {
      Assertions._assert(false,"String_Node_Str" + C + "String_Node_Str"+ I.getConcreteType());
    }
  }
  PointerKey p=getPointerKeyForArrayContents(I);
  if (contents.isInterface()) {
    if (getClassHierarchy().implementsInterface(instance.getConcreteType(),contents.getReference())) {
      sideEffect.b|=system.newConstraint(p,instance);
    }
  }
 else {
    if (getClassHierarchy().isSubclassOf(instance.getConcreteType(),contents)) {
      sideEffect.b|=system.newConstraint(p,instance);
    }
  }
}

Fixed version (ground truth):
public void act(int i){
  InstanceKey I=system.getInstanceKey(i);
  if (!I.getConcreteType().isArrayClass()) {
    return;
  }
  TypeReference C=I.getConcreteType().getReference().getArrayElementType();
  if (C.isPrimitiveType()) {
    return;
  }
  IClass contents=getClassHierarchy().lookupClass(C);
  if (Assertions.verifyAssertions) {
    if (contents == null) {
      Assertions._assert(false,"String_Node_Str" + C + "String_Node_Str"+ I.getConcreteType());
    }
  }
  PointerKey p=getPointerKeyForArrayContents(I);
  if (contents.isInterface()) {
    if (getClassHierarchy().implementsInterface(instance.getConcreteType(),contents)) {
      sideEffect.b|=system.newConstraint(p,instance);
    }
  }
 else {
    if (getClassHierarchy().isSubclassOf(instance.getConcreteType(),contents)) {
      sideEffect.b|=system.newConstraint(p,instance);
    }
  }
}
Program: 100235
Project: 100235
Buggy source:
private void registerArrayInstanceWithAllInterfacesOfElement(int index,IClass elementClass,int dim){
  Collection ifaces=null;
  try {
    ifaces=(elementClass.isInterface()) ? elementClass.getAllAncestorInterfaces() : elementClass.getAllImplementedInterfaces();
  }
 catch (  ClassHierarchyException e) {
    Warnings.add(ClassHierarchyWarning.create(e.getMessage()));
    return;
  }
  for (Iterator it=ifaces.iterator(); it.hasNext(); ) {
    IClass I=(IClass)it.next();
    TypeReference iArrayRef=makeArray(I.getReference(),dim);
    IClass iArrayClass=null;
    iArrayClass=I.getClassLoader().lookupClass(iArrayRef.getName());
    MutableIntSet set=findOrCreateSparseSetForClass(iArrayClass);
    set.add(index);
    if (DEBUG) {
      Trace.println("String_Node_Str" + iArrayClass + "String_Node_Str"+ set);
    }
  }
}

Fixed version (ground truth):
private void registerArrayInstanceWithAllInterfacesOfElement(int index,IClass elementClass,int dim){
  Collection ifaces=null;
  try {
    ifaces=elementClass.getAllImplementedInterfaces();
  }
 catch (  ClassHierarchyException e) {
    Warnings.add(ClassHierarchyWarning.create(e.getMessage()));
    return;
  }
  for (Iterator it=ifaces.iterator(); it.hasNext(); ) {
    IClass I=(IClass)it.next();
    TypeReference iArrayRef=makeArray(I.getReference(),dim);
    IClass iArrayClass=null;
    iArrayClass=I.getClassLoader().lookupClass(iArrayRef.getName());
    MutableIntSet set=findOrCreateSparseSetForClass(iArrayClass);
    set.add(index);
    if (DEBUG) {
      Trace.println("String_Node_Str" + iArrayClass + "String_Node_Str"+ set);
    }
  }
}
Program: 100236
Project: 100236
Buggy source:
/** 
 * Does c implement T?
 * @param c
 * @param T
 * @return true iff T is an interface and c is a class that implements T,
 */
public boolean implementsInterface(IClass c,TypeReference T){
  IClass tClass=lookupClass(T);
  if (Assertions.verifyAssertions) {
    if (tClass == null) {
      Assertions._assert(false,"String_Node_Str" + T);
    }
  }
  if (!tClass.isInterface()) {
    return false;
  }
  Set impls=implementors.get(tClass);
  if (impls != null && impls.contains(c)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Does c implement i?
 * @return true iff i is an interface and c is a class that implements i, rc is an interface that extends i.
 */
public boolean implementsInterface(IClass c,IClass i){
  if (!i.isInterface()) {
    return false;
  }
  Set impls=implementors.get(i);
  if (impls != null && impls.contains(c)) {
    return true;
  }
  return false;
}
Program: 100238
Project: 100238
Buggy source:
/** 
 * Find the possible receivers of a call to a method reference
 * @param ref method reference
 * @return the set of IMethods that this call can resolve to.
 */
private Set<IMethod> computePossibleTargets(IClass declaredClass,MethodReference ref){
  if (declaredClass.isInterface()) {
    HashSet<IMethod> result=HashSetFactory.make(3);
    Set impls=implementors.get(declaredClass);
    if (impls == null) {
      return Collections.emptySet();
    }
    for (Iterator it=impls.iterator(); it.hasNext(); ) {
      IClass klass=(IClass)it.next();
      if (Assertions.verifyAssertions) {
        Assertions._assert(!klass.isInterface());
      }
      result.addAll(computeTargetsNotInterface(ref,klass));
    }
    return result;
  }
 else {
    return computeTargetsNotInterface(ref,declaredClass);
  }
}

Fixed version (ground truth):
/** 
 * Find the possible receivers of a call to a method reference
 * @param ref method reference
 * @return the set of IMethods that this call can resolve to.
 */
private Set<IMethod> computePossibleTargets(IClass declaredClass,MethodReference ref){
  if (declaredClass.isInterface()) {
    HashSet<IMethod> result=HashSetFactory.make(3);
    Set impls=implementors.get(declaredClass);
    if (impls == null) {
      return Collections.emptySet();
    }
    for (Iterator it=impls.iterator(); it.hasNext(); ) {
      IClass klass=(IClass)it.next();
      if (!klass.isInterface()) {
        result.addAll(computeTargetsNotInterface(ref,klass));
      }
    }
    return result;
  }
 else {
    return computeTargetsNotInterface(ref,declaredClass);
  }
}
Program: 100239
Project: 100239
Buggy source:
/** 
 * Does an expression c1 x := c2 y typecheck? i.e. is c2 a subtype of c1?
 * @throws IllegalArgumentException if c1 is null
 * @throws IllegalArgumentException if c2 is null
 */
public boolean isAssignableFrom(IClass c1,IClass c2){
  if (c2 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (c1 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (c1.isInterface()) {
    if (c2.isInterface()) {
      return isSubclassOf(c2,c1);
    }
 else {
      return implementsInterface(c2,c1.getReference());
    }
  }
 else {
    if (c2.isInterface()) {
      return c1.equals(getRootClass());
    }
 else {
      return isSubclassOf(c2,c1);
    }
  }
}

Fixed version (ground truth):
/** 
 * Does an expression c1 x := c2 y typecheck? i.e. is c2 a subtype of c1?
 * @throws IllegalArgumentException if c1 is null
 * @throws IllegalArgumentException if c2 is null
 */
public boolean isAssignableFrom(IClass c1,IClass c2){
  if (c2 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (c1 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (c1.isInterface()) {
    return implementsInterface(c2,c1);
  }
 else {
    if (c2.isInterface()) {
      return c1.equals(getRootClass());
    }
 else {
      return isSubclassOf(c2,c1);
    }
  }
}
Program: 100240
Project: 100240
Buggy source:
/** 
 * Does c implement T?
 * @return true iff T is an interface and c is a class that implements T,
 */
public boolean implementsInterface(IClass c,TypeReference T);

Fixed version (ground truth):
/** 
 * Does c implement i?
 * @return true iff i is an interface and c is a class that implements i,
 */
public boolean implementsInterface(IClass c,IClass i);
Program: 100241
Project: 100241
Buggy source:
public Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException {
  Collection<IClass> realIfaces=realType.isInterface() ? realType.getAllAncestorInterfaces() : realType.getAllImplementedInterfaces();
  if (realType.isInterface()) {
    HashSet<IClass> result=HashSetFactory.make(realIfaces);
    result.add(realType);
    return result;
  }
 else {
    return realIfaces;
  }
}

Fixed version (ground truth):
public Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException {
  Collection<IClass> realIfaces=realType.getAllImplementedInterfaces();
  if (realType.isInterface()) {
    HashSet<IClass> result=HashSetFactory.make(realIfaces);
    result.add(realType);
    return result;
  }
 else {
    return realIfaces;
  }
}
Program: 100242
Project: 100242
Buggy source:
public boolean implementsInterface(IClass c,TypeReference T){
  return getHierarchy(c).implementsInterface(c,T);
}

Fixed version (ground truth):
public boolean implementsInterface(IClass c,IClass i){
  return getHierarchy(c).implementsInterface(c,i);
}
Program: 100243
Project: 100243
Buggy source:
public Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException {
  Assertions._assert(!isInterface());
  return gatherInterfaces();
}

Fixed version (ground truth):
public Collection<IClass> getAllImplementedInterfaces() throws ClassHierarchyException {
  return gatherInterfaces();
}
Program: 100244
Project: 100244
Buggy source:
public static AnalysisScope makeScope(URL[] files,JavaScriptLoaderFactory loaders) throws IOException {
  return new CAstAnalysisScope(files,loaders);
}

Fixed version (ground truth):
public static AnalysisScope makeScope(URL[] files,JavaScriptLoaderFactory loaders) throws IOException {
  AnalysisScope result=new CAstAnalysisScope(files,loaders);
  result.addLanguageToScope(JavaScriptLoader.JS);
  return result;
}
Program: 100245
Project: 100245
Buggy source:
/** 
 * delete all files (recursively) in a directory. This is dangerous. Use with care.
 * @throws IOException if there's a problem deleting some file
 */
public static void deleteContents(String directory) throws IOException {
  Collection fl=listFiles(directory,null,true);
  for (Iterator it=fl.iterator(); it.hasNext(); ) {
    File f=(File)it.next();
    if (!f.isDirectory()) {
      boolean result=f.delete();
      if (!result) {
        throw new IOException("String_Node_Str" + f);
      }
    }
  }
  int lastCount=Integer.MAX_VALUE;
  do {
    Collection f2=listFiles(directory,null,true);
    if (f2.size() == lastCount) {
      throw new IOException("String_Node_Str");
    }
    for (Iterator it=f2.iterator(); it.hasNext(); ) {
      File f=(File)it.next();
      f.delete();
    }
  }
 while (listFiles(directory,null,true).size() > 0);
}

Fixed version (ground truth):
/** 
 * delete all files (recursively) in a directory. This is dangerous. Use with care.
 * @throws IOException if there's a problem deleting some file
 */
public static void deleteContents(String directory) throws IOException {
  Collection fl=listFiles(directory,null,true);
  for (Iterator it=fl.iterator(); it.hasNext(); ) {
    File f=(File)it.next();
    if (!f.isDirectory()) {
      boolean result=f.delete();
      if (!result) {
        throw new IOException("String_Node_Str" + f);
      }
    }
  }
  int lastCount=Integer.MAX_VALUE;
  do {
    Collection f2=listFiles(directory,null,true);
    if (f2.size() == lastCount) {
      throw new IOException("String_Node_Str");
    }
    lastCount=f2.size();
    for (Iterator it=f2.iterator(); it.hasNext(); ) {
      File f=(File)it.next();
      f.delete();
    }
  }
 while (listFiles(directory,null,true).size() > 0);
}
Program: 100246
Project: 100246
Buggy source:
public static <T>Dominators make(Graph<T> G,T root){
  if (G instanceof NumberedGraph) {
    return new NumberedDominators((NumberedGraph)G,(INodeWithNumber)root);
  }
 else {
    return new GenericDominators(G,root);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public static <T>Dominators<T> make(Graph<T> G,T root){
  if (G instanceof NumberedGraph && root instanceof INodeWithNumber) {
    return new NumberedDominators((NumberedGraph)G,(INodeWithNumber)root);
  }
 else {
    return new GenericDominators<T>(G,root);
  }
}
Program: 100247
Project: 100247
Buggy source:
public String toString(){
  StringBuffer sb=new StringBuffer();
  for (Iterator<? extends T> i=G.iterator(); i.hasNext(); ) {
    T node=i.next();
    sb.append("String_Node_Str" + node + "String_Node_Str");
    for (Iterator j=dominators(node); j.hasNext(); )     sb.append("String_Node_Str" + j.next() + "String_Node_Str");
    sb.append("String_Node_Str");
  }
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuffer sb=new StringBuffer();
  for (Iterator<? extends T> i=G.iterator(); i.hasNext(); ) {
    T node=i.next();
    sb.append("String_Node_Str" + node + "String_Node_Str");
    for (Iterator j=dominators(node); j.hasNext(); )     sb.append("String_Node_Str" + j.next() + "String_Node_Str");
    sb.append("String_Node_Str");
  }
  return sb.toString();
}
Program: 100248
Project: 100248
Buggy source:
protected DominatorInfo getInfo(T node){
  if (!infoMap.containsKey(node))   infoMap.put(node,new DominatorInfo(node));
  return infoMap.get(node);
}

Fixed version (ground truth):
@Override protected DominatorInfo getInfo(T node){
  if (!infoMap.containsKey(node))   infoMap.put(node,new DominatorInfo(node));
  return infoMap.get(node);
}
Program: 100249
Project: 100249
Buggy source:
protected final DominatorInfo getInfo(T node){
  return (DominatorInfo)infoMap[node.getGraphNodeId()];
}

Fixed version (ground truth):
@Override protected final DominatorInfo getInfo(T node){
  return (DominatorInfo)infoMap[node.getGraphNodeId()];
}
Program: 100250
Project: 100250
Buggy source:
public NumberedGraph<T> getGraph(){
  return (NumberedGraph)G;
}

Fixed version (ground truth):
@Override public NumberedGraph<T> getGraph(){
  return (NumberedGraph<T>)G;
}
Program: 100251
Project: 100251
Buggy source:
/** 
 * Compute the set of   {@link InstanceKey}s which may represent a particular type.
 */
private OrdinalSet<InstanceKey> computeOrdinalInstanceSet(IClass type){
  Collection<IClass> klasses=null;
  if (type.isInterface()) {
    klasses=getCallGraph().getClassHierarchy().getImplementors(type.getReference());
  }
 else {
    Collection<IClass> sc=getCallGraph().getClassHierarchy().computeSubClasses(type.getReference());
    klasses=HashSetFactory.make();
    for (    IClass c : sc) {
      if (!c.isInterface()) {
        klasses.add(c);
      }
    }
  }
  klasses=HashSetFactory.make(klasses);
  klasses.retainAll(this.klasses);
  OrdinalSet<InstanceKey> result=toOrdinalInstanceKeySet(klasses);
  return result;
}

Fixed version (ground truth):
/** 
 * Compute the set of   {@link InstanceKey}s which may represent a particular type.
 */
private OrdinalSet<InstanceKey> computeOrdinalInstanceSet(IClass type){
  Collection<IClass> klasses=null;
  if (type.isInterface()) {
    klasses=getCallGraph().getClassHierarchy().getImplementors(type.getReference());
  }
 else {
    Collection<IClass> sc=getCallGraph().getClassHierarchy().computeSubClasses(type.getReference());
    klasses=HashSetFactory.make();
    for (    IClass c : sc) {
      if (!c.isInterface()) {
        klasses.add(c);
      }
    }
  }
  Collection<IClass> c=HashSetFactory.make();
  for (  IClass klass : klasses) {
    if (klass.isArrayClass()) {
      c.add(klass);
    }
 else     if (this.klasses.contains(klass)) {
      c.add(klass);
    }
  }
  OrdinalSet<InstanceKey> result=toOrdinalInstanceKeySet(c);
  return result;
}
Program: 100252
Project: 100252
Buggy source:
/** 
 * @param klasses Collection<IClass>
 * @throws AssertionError  if klasses is null
 */
private TypeBasedPointerAnalysis(AnalysisOptions options,Collection<IClass> klasses,CallGraph cg) throws AssertionError {
  super(cg,makeInstanceKeys(klasses));
  this.klasses=klasses;
  heapModel=new TypeBasedHeapModel(options,klasses,cg);
}

Fixed version (ground truth):
/** 
 * @param klasses Collection<IClass>
 * @throws AssertionError if klasses is null
 */
private TypeBasedPointerAnalysis(AnalysisOptions options,Collection<IClass> klasses,CallGraph cg) throws AssertionError {
  super(cg,makeInstanceKeys(klasses));
  this.klasses=klasses;
  heapModel=new TypeBasedHeapModel(options,klasses,cg);
}
Program: 100253
Project: 100253
Buggy source:
@Override public void putAll(Map<? extends K,? extends V> arg0){
  if (arg0 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  Map.Entry<K,V> E : entrySet()) {
    put(E.getKey(),E.getValue());
  }
}

Fixed version (ground truth):
@Override public void putAll(Map<? extends K,? extends V> arg0){
  if (arg0 == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  for (  Map.Entry<? extends K,? extends V> E : arg0.entrySet()) {
    put(E.getKey(),E.getValue());
  }
}
Program: 100254
Project: 100254
Buggy source:
private OrdinalSet<InstanceKey> toOrdinalInstanceKeySet(Collection c){
  BimodalMutableIntSet s=new BimodalMutableIntSet();
  for (Iterator it=c.iterator(); it.hasNext(); ) {
    IClass klass=(IClass)it.next();
    int index=getInstanceKeyMapping().getMappedIndex(new ConcreteTypeKey(klass));
    if (index >= 0) {
      s.add(index);
    }
  }
  return new OrdinalSet<InstanceKey>(s,getInstanceKeyMapping());
}

Fixed version (ground truth):
private OrdinalSet<InstanceKey> toOrdinalInstanceKeySet(Collection c){
  BimodalMutableIntSet s=new BimodalMutableIntSet();
  for (Iterator it=c.iterator(); it.hasNext(); ) {
    IClass klass=(IClass)it.next();
    int index=getInstanceKeyMapping().add(new ConcreteTypeKey(klass));
    s.add(index);
  }
  return new OrdinalSet<InstanceKey>(s,getInstanceKeyMapping());
}
Program: 100256
Project: 100256
Buggy source:
/** 
 * @return Returns the iKeyFactory.
 */
protected ClassBasedInstanceKeys getIKeyFactory(){
  return iKeyFactory;
}

Fixed version (ground truth):
protected ClassBasedInstanceKeys getIKeyFactory(){
  return iKeyFactory;
}