nus-yam/ex-repair huggingface dataset:
Program: 100257
Project: 100257
Buggy source:
/** 
 */
private Map<PointerKey,Object> computePointerKeys(IClass klass){
  Map<PointerKey,Object> result=HashMapFactory.make();
  if (klass.isArrayClass()) {
    ArrayClass a=(ArrayClass)klass;
    if (a.getElementClass() != null && a.getElementClass().isReferenceType()) {
      PointerKey p=pointerKeys.getPointerKeyForArrayContents(new ConcreteTypeKey(a));
      result.put(p,p);
    }
  }
 else {
    try {
      for (Iterator<IField> it=klass.getAllFields().iterator(); it.hasNext(); ) {
        IField f=it.next();
        if (!f.getFieldTypeReference().isPrimitiveType()) {
          if (f.isStatic()) {
            PointerKey p=pointerKeys.getPointerKeyForStaticField(f);
            result.put(p,p);
          }
 else {
            PointerKey p=pointerKeys.getPointerKeyForInstanceField(new ConcreteTypeKey(klass),f);
            result.put(p,p);
          }
        }
      }
    }
 catch (    ClassHierarchyException e) {
      e.printStackTrace();
      Assertions.UNREACHABLE();
    }
  }
  return result;
}

Fixed version (ground truth):
private Map<PointerKey,Object> computePointerKeys(IClass klass){
  Map<PointerKey,Object> result=HashMapFactory.make();
  if (klass.isArrayClass()) {
    ArrayClass a=(ArrayClass)klass;
    if (a.getElementClass() != null && a.getElementClass().isReferenceType()) {
      PointerKey p=pointerKeys.getPointerKeyForArrayContents(new ConcreteTypeKey(a));
      result.put(p,p);
    }
  }
 else {
    try {
      for (Iterator<IField> it=klass.getAllFields().iterator(); it.hasNext(); ) {
        IField f=it.next();
        if (!f.getFieldTypeReference().isPrimitiveType()) {
          if (f.isStatic()) {
            PointerKey p=pointerKeys.getPointerKeyForStaticField(f);
            result.put(p,p);
          }
 else {
            PointerKey p=pointerKeys.getPointerKeyForInstanceField(new ConcreteTypeKey(klass),f);
            result.put(p,p);
          }
        }
      }
    }
 catch (    ClassHierarchyException e) {
      e.printStackTrace();
      Assertions.UNREACHABLE();
    }
  }
  return result;
}
Program: 100258
Project: 100258
Buggy source:
public PointerKey getPointerKeyForLocal(CGNode node,int valueNumber){
  initPKeysForNode(node);
  PointerKey p=pointerKeys.getPointerKeyForLocal(node,valueNumber);
  Object result=pKeys.get(p);
  if (result == null) {
    return null;
  }
  if (result instanceof FilteredPointerKey) {
    return (PointerKey)result;
  }
 else {
    if (result instanceof ConcreteTypeKey) {
      ConcreteTypeKey c=(ConcreteTypeKey)result;
      if (c.getConcreteType().getReference().equals(TypeReference.JavaLangString)) {
        return pointerKeys.getFilteredPointerKeyForLocal(node,valueNumber,new FilteredPointerKey.SingleClassFilter(c.getConcreteType()));
      }
 else {
        Assertions.UNREACHABLE("String_Node_Str" + result.getClass());
        return null;
      }
    }
 else {
      Assertions.UNREACHABLE("String_Node_Str" + result.getClass());
      return null;
    }
  }
}

Fixed version (ground truth):
/** 
 * Note that this always returns a    {@link FilteredPointerKey}, since the   {@link TypeBasedPointerAnalysis} relies on thetype filter to compute points to sets.
 * @see com.ibm.wala.ipa.callgraph.propagation.PointerKeyFactory#getPointerKeyForLocal(com.ibm.wala.ipa.callgraph.CGNode,int)
 */
public FilteredPointerKey getPointerKeyForLocal(CGNode node,int valueNumber){
  initPKeysForNode(node);
  PointerKey p=pointerKeys.getPointerKeyForLocal(node,valueNumber);
  Object result=pKeys.get(p);
  if (result == null) {
    return null;
  }
  if (result instanceof FilteredPointerKey) {
    return (FilteredPointerKey)result;
  }
 else {
    if (result instanceof ConcreteTypeKey) {
      ConcreteTypeKey c=(ConcreteTypeKey)result;
      if (c.getConcreteType().getReference().equals(TypeReference.JavaLangString)) {
        return pointerKeys.getFilteredPointerKeyForLocal(node,valueNumber,new FilteredPointerKey.SingleClassFilter(c.getConcreteType()));
      }
 else {
        Assertions.UNREACHABLE("String_Node_Str" + result.getClass());
        return null;
      }
    }
 else {
      Assertions.UNREACHABLE("String_Node_Str" + result.getClass());
      return null;
    }
  }
}
Program: 100259
Project: 100259
Buggy source:
public boolean isCatchBlock(){
  return original.isCatchBlock();
}

Fixed version (ground truth):
public boolean isCatchBlock(){
  return (original.isCatchBlock() && instructionIndex == original.getFirstInstructionIndex());
}
Program: 100260
Project: 100260
Buggy source:
@SuppressWarnings("String_Node_Str") public String getLabel(Object o) throws WalaException {
  T t=(T)o;
  if (t instanceof BasicBlockInContext) {
    BasicBlockInContext bb=(BasicBlockInContext)t;
    if (bb.getDelegate() instanceof ExplodedBasicBlock) {
      ExplodedBasicBlock delegate=(ExplodedBasicBlock)bb.getDelegate();
      String s=delegate.getNumber() + "String_Node_Str" + result.getResult(t)+ "String_Node_Str"+ delegate.getInstruction();
      for (Iterator<SSAPhiInstruction> phis=delegate.iteratePhis(); phis.hasNext(); ) {
        SSAPhiInstruction phi=phis.next();
        s+="String_Node_Str" + phi;
      }
      return s;
    }
  }
  return t + "String_Node_Str" + result.getResult(t);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public String getLabel(Object o) throws WalaException {
  T t=(T)o;
  if (t instanceof BasicBlockInContext) {
    BasicBlockInContext bb=(BasicBlockInContext)t;
    if (bb.getDelegate() instanceof ExplodedBasicBlock) {
      ExplodedBasicBlock delegate=(ExplodedBasicBlock)bb.getDelegate();
      String s=delegate.getNumber() + "String_Node_Str" + result.getResult(t)+ "String_Node_Str"+ delegate.getInstruction();
      for (Iterator<SSAPhiInstruction> phis=delegate.iteratePhis(); phis.hasNext(); ) {
        SSAPhiInstruction phi=phis.next();
        s+="String_Node_Str" + phi;
      }
      if (delegate.isCatchBlock()) {
        s+="String_Node_Str" + delegate.getCatchInstruction();
      }
      return s;
    }
  }
  return t + "String_Node_Str" + result.getResult(t);
}
Program: 100262
Project: 100262
Buggy source:
/** 
 * TODO: move this elsewhere. Move it into shrike and develop new way to track peis.
 * @throws IllegalArgumentException  if s is null
 */
public static boolean isPEI(Instruction s){
  if (s == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
switch (s.getOpcode()) {
case OP_iaload:
case OP_laload:
case OP_faload:
case OP_daload:
case OP_aaload:
case OP_baload:
case OP_caload:
case OP_saload:
case OP_iastore:
case OP_lastore:
case OP_fastore:
case OP_dastore:
case OP_aastore:
case OP_bastore:
case OP_castore:
case OP_sastore:
case OP_getfield:
case OP_putfield:
case OP_idiv:
case OP_invokevirtual:
case OP_invokespecial:
case OP_invokestatic:
case OP_invokeinterface:
case OP_irem:
case OP_new:
case OP_newarray:
case OP_anewarray:
case OP_arraylength:
case OP_athrow:
case OP_checkcast:
case OP_monitorenter:
case OP_monitorexit:
case OP_multianewarray:
    return true;
case OP_ldc_w:
  return (((ConstantInstruction)s).getType().equals(TYPE_Class));
default :
return false;
}
}

Fixed version (ground truth):
/** 
 * TODO: move this elsewhere. Move it into shrike and develop new way to track peis.
 * @throws IllegalArgumentException  if s is null
 */
public static boolean isPEI(Instruction s){
  if (s == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
switch (s.getOpcode()) {
case OP_iaload:
case OP_laload:
case OP_faload:
case OP_daload:
case OP_aaload:
case OP_baload:
case OP_caload:
case OP_saload:
case OP_iastore:
case OP_lastore:
case OP_fastore:
case OP_dastore:
case OP_aastore:
case OP_bastore:
case OP_castore:
case OP_sastore:
case OP_getfield:
case OP_putfield:
case OP_idiv:
case OP_invokevirtual:
case OP_invokespecial:
case OP_invokestatic:
case OP_invokeinterface:
case OP_irem:
case OP_ldiv:
case OP_lrem:
case OP_new:
case OP_newarray:
case OP_anewarray:
case OP_arraylength:
case OP_athrow:
case OP_checkcast:
case OP_monitorenter:
case OP_monitorexit:
case OP_multianewarray:
    return true;
case OP_ldc_w:
  return (((ConstantInstruction)s).getType().equals(TYPE_Class));
default :
return false;
}
}
Program: 100264
Project: 100264
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public Collection<? extends Object> getRootsInput(){
  return rootsInput;
}

Fixed version (ground truth):
public Collection<? extends Object> getRootsInput(){
  return rootsInput;
}
Program: 100265
Project: 100265
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public void setRootsInput(Collection<? extends Object> newRootsInput){
  rootsInput=newRootsInput;
}

Fixed version (ground truth):
public void setRootsInput(Collection<? extends Object> newRootsInput){
  rootsInput=newRootsInput;
}
Program: 100266
Project: 100266
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public List<IAction> getPopUpActions(){
  return popUpActions;
}

Fixed version (ground truth):
public List<IAction> getPopUpActions(){
  return popUpActions;
}
Program: 100267
Project: 100267
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public Graph getGraphInput(){
  return graphInput;
}

Fixed version (ground truth):
public Graph getGraphInput(){
  return graphInput;
}
Program: 100268
Project: 100268
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public NodeDecorator getNodeDecoratorInput(){
  return nodeDecoratorInput;
}

Fixed version (ground truth):
public NodeDecorator getNodeDecoratorInput(){
  return nodeDecoratorInput;
}
Program: 100269
Project: 100269
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public void setNodeDecoratorInput(NodeDecorator newNodeDecoratorInput){
  nodeDecoratorInput=newNodeDecoratorInput;
}

Fixed version (ground truth):
public void setNodeDecoratorInput(NodeDecorator newNodeDecoratorInput){
  nodeDecoratorInput=newNodeDecoratorInput;
}
Program: 100270
Project: 100270
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public void setGraphInput(Graph newGraphInput){
  graphInput=newGraphInput;
}

Fixed version (ground truth):
public void setGraphInput(Graph newGraphInput){
  graphInput=newGraphInput;
}
Program: 100271
Project: 100271
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
@Override public String toString(){
  StringBuffer result=new StringBuffer(super.toString());
  result.append("String_Node_Str");
  result.append(graphInput);
  result.append("String_Node_Str");
  result.append(rootsInput);
  result.append("String_Node_Str");
  result.append(nodeDecoratorInput);
  result.append("String_Node_Str");
  result.append(popUpActions);
  result.append(')');
  return result.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  StringBuffer result=new StringBuffer(super.toString());
  result.append("String_Node_Str");
  result.append(graphInput);
  result.append("String_Node_Str");
  result.append(rootsInput);
  result.append("String_Node_Str");
  result.append(nodeDecoratorInput);
  result.append("String_Node_Str");
  result.append(popUpActions);
  result.append(')');
  return result.toString();
}
Program: 100272
Project: 100272
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated
 */
public SWTTreeViewer(){
  super();
}

Fixed version (ground truth):
public SWTTreeViewer(){
  super();
}
Program: 100273
Project: 100273
Buggy source:
/** 
 * get the "normal" successors (sic) for a return site; i.e., the "normal" CFG predecessors that are not call nodes.
 * @see com.ibm.wala.dataflow.IFDS.ISupergraph#getCalledNodes(java.lang.Object)
 */
public Iterator<T> getNormalSuccessors(final T ret){
  Iterator<? extends Object> allPreds=delegate.getPredNodes(ret);
  Filter sameProc=new Filter(){
    @SuppressWarnings("String_Node_Str") public boolean accepts(    Object o){
      return getProcOf(ret).equals(getProcOf((T)o));
    }
  }
;
  Iterator<Object> sameProcPreds=new FilterIterator<Object>(allPreds,sameProc);
  Filter notCall=new Filter(){
    @SuppressWarnings("String_Node_Str") public boolean accepts(    Object o){
      return !delegate.isCall((T)o);
    }
  }
;
  return new FilterIterator<T>(sameProcPreds,notCall);
}

Fixed version (ground truth):
/** 
 * get the "normal" successors (sic) for a return site; i.e., the "normal" CFG predecessors that are not call nodes.
 * @see com.ibm.wala.dataflow.IFDS.ISupergraph#getCalledNodes(java.lang.Object)
 */
public Iterator<T> getNormalSuccessors(final T ret){
  Iterator<? extends Object> allPreds=delegate.getPredNodes(ret);
  Filter sameProc=new Filter<T>(){
    public boolean accepts(    T o){
      return getProcOf(ret).equals(getProcOf(o)) && !delegate.isExit(o);
    }
  }
;
  Iterator<Object> sameProcPreds=new FilterIterator<Object>(allPreds,sameProc);
  Filter notCall=new Filter<T>(){
    public boolean accepts(    T o){
      return !delegate.isCall(o);
    }
  }
;
  return new FilterIterator<T>(sameProcPreds,notCall);
}
Program: 100274
Project: 100274
Buggy source:
@SuppressWarnings("String_Node_Str") public boolean accepts(Object o){
  return !delegate.isCall((T)o);
}

Fixed version (ground truth):
public boolean accepts(T o){
  return !delegate.isCall(o);
}
Program: 100275
Project: 100275
Buggy source:
/** 
 * @throws IllegalArgumentException if dst is null
 */
public void addExceptionalEdge(T src,T dst){
  if (dst == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (dst.equals(exit())) {
    exceptionalToExit.set(getNumber(src));
  }
 else {
    exceptionalEdgeManager.addEdge(src,dst);
    SimpleIntVector v=exceptionalSuccessors.get(getNumber(src));
    if (v == null) {
      v=new SimpleIntVector(-1);
      exceptionalSuccessors.set(getNumber(src),v);
    }
    v.set(v.getMaxIndex() + 1,getNumber(dst));
  }
}

Fixed version (ground truth):
/** 
 * @throws IllegalArgumentException if dst is null
 */
public void addExceptionalEdge(T src,T dst){
  if (dst == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (dst.equals(exit())) {
    exceptionalToExit.set(getNumber(src));
  }
 else {
    exceptionalEdgeManager.addEdge(src,dst);
    SimpleIntVector v=exceptionalSuccessors.get(getNumber(src));
    if (v == null) {
      v=new SimpleIntVector(-1);
      exceptionalSuccessors.set(getNumber(src),v);
      v.set(0,getNumber(dst));
      return;
    }
    if (v.get(v.getMaxIndex()) != getNumber(dst)) {
      v.set(v.getMaxIndex() + 1,getNumber(dst));
    }
  }
}
Program: 100276
Project: 100276
Buggy source:
@Override public PointerAnalysis getPointerAnalysis(){
  return new TypeBasedPointerAnalysis(getOptions(),allocatedClasses,getCallGraph());
}

Fixed version (ground truth):
@Override public PointerAnalysis getPointerAnalysis(){
  return TypeBasedPointerAnalysis.make(getOptions(),allocatedClasses,getCallGraph());
}
Program: 100277
Project: 100277
Buggy source:
public InstanceKey getInstanceKeyForAllocation(CGNode node,NewSiteReference allocation) throws UnimplementedError {
  Assertions.UNREACHABLE();
  return null;
}

Fixed version (ground truth):
public InstanceKey getInstanceKeyForAllocation(CGNode node,NewSiteReference allocation) throws UnimplementedError {
  return iKeyFactory.getInstanceKeyForAllocation(node,allocation);
}
Program: 100278
Project: 100278
Buggy source:
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node,NewSiteReference allocation,int dim) throws UnimplementedError {
  Assertions.UNREACHABLE();
  return null;
}

Fixed version (ground truth):
public InstanceKey getInstanceKeyForMultiNewArray(CGNode node,NewSiteReference allocation,int dim) throws UnimplementedError {
  return iKeyFactory.getInstanceKeyForMultiNewArray(node,allocation,dim);
}
Program: 100279
Project: 100279
Buggy source:
/** 
 * @param klasses Collection<IClass>
 * @throws AssertionError  if klasses is null
 */
public 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: 100280
Project: 100280
Buggy source:
private OrdinalSet<InstanceKey> computeOrdinalInstanceSet(IClass type){
  Collection<IClass> klasses=null;
  if (type.isInterface()) {
    klasses=getCallGraph().getClassHierarchy().getImplementors(type.getReference());
  }
 else {
    klasses=getCallGraph().getClassHierarchy().computeSubClasses(type.getReference());
  }
  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);
      }
    }
  }
  klasses=HashSetFactory.make(klasses);
  klasses.retainAll(this.klasses);
  OrdinalSet<InstanceKey> result=toOrdinalInstanceKeySet(klasses);
  return result;
}
Program: 100281
Project: 100281
Buggy source:
/** 
 * @param c Collection<IClass>
 */
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().getMappedIndex(new ConcreteTypeKey(klass));
    if (index >= 0) {
      s.add(index);
    }
  }
  return new OrdinalSet<InstanceKey>(s,getInstanceKeyMapping());
}
Program: 100282
Project: 100282
Buggy source:
public IUnaryFlowFunction getCallNoneToReturnFlowFunction(Statement src,Statement dest){
  if (src == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Statement s=src;
switch (s.getKind()) {
case NORMAL_RET_CALLER:
case PARAM_CALLER:
    return ReachabilityFunctions.killReachability;
case HEAP_PARAM_CALLEE:
case HEAP_PARAM_CALLER:
case HEAP_RET_CALLEE:
case HEAP_RET_CALLER:
  if (dest instanceof HeapStatement) {
    HeapStatement hd=(HeapStatement)dest;
    HeapStatement hs=(HeapStatement)src;
    if (hs.getLocation().equals(hd.getLocation())) {
      return IdentityFlowFunction.identity();
    }
 else {
      return ReachabilityFunctions.killReachability;
    }
  }
 else {
    return ReachabilityFunctions.killReachability;
  }
case NORMAL:
return ReachabilityFunctions.killReachability;
default :
Assertions.UNREACHABLE(s.getKind().toString());
return null;
}
}

Fixed version (ground truth):
public IUnaryFlowFunction getCallNoneToReturnFlowFunction(Statement src,Statement dest){
  if (src == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  Statement s=src;
switch (s.getKind()) {
case NORMAL_RET_CALLER:
case PARAM_CALLER:
case EXC_RET_CALLER:
    return ReachabilityFunctions.killReachability;
case HEAP_PARAM_CALLEE:
case HEAP_PARAM_CALLER:
case HEAP_RET_CALLEE:
case HEAP_RET_CALLER:
  if (dest instanceof HeapStatement) {
    HeapStatement hd=(HeapStatement)dest;
    HeapStatement hs=(HeapStatement)src;
    if (hs.getLocation().equals(hd.getLocation())) {
      return IdentityFlowFunction.identity();
    }
 else {
      return ReachabilityFunctions.killReachability;
    }
  }
 else {
    return ReachabilityFunctions.killReachability;
  }
case NORMAL:
return ReachabilityFunctions.killReachability;
default :
Assertions.UNREACHABLE(s.getKind().toString());
return null;
}
}
Program: 100283
Project: 100283
Buggy source:
/** 
 * @param x set of factoid numbers that previously have been established to hold at a program point
 * @param j a new factoid number which has been discovered to hold at a program point
 * @return the factoid number z which should actually be propagated, based ona merge of the new fact j into the old state represented by x
 */
int merge(IntSet x,int j);

Fixed version (ground truth):
/** 
 * @param x set of factoid numbers that previously have been established to hold at a program point
 * @param j a new factoid number which has been discovered to hold at a program point
 * @return the factoid number z which should actually be propagated, based ona merge of the new fact j into the old state represented by x. return -1 if no fact should be propagated.
 */
int merge(IntSet x,int j);
Program: 100284
Project: 100284
Buggy source:
@Override public SSAInstruction copyForSSA(int[] defs,int[] uses){
  if (uses != null && uses.length < 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return new SSABinaryOpInstruction(operator,defs == null || defs.length == 0 ? result : defs[0],uses == null ? val1 : uses[0],uses == null ? val2 : uses[1]);
}

Fixed version (ground truth):
@Override public SSAInstruction copyForSSA(int[] defs,int[] uses){
  if (uses != null && uses.length < 2) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return new SSABinaryOpInstruction(operator,defs == null || defs.length == 0 ? result : defs[0],uses == null ? val1 : uses[0],uses == null ? val2 : uses[1],mayBeInteger);
}
Program: 100285
Project: 100285
Buggy source:
SSABinaryOpInstruction(BinaryOpInstruction.IOperator operator,int result,int val1,int val2){
  super();
  this.result=result;
  this.val1=val1;
  this.val2=val2;
  this.operator=operator;
  Assertions._assert(val1 != -1 && val2 != -1);
}

Fixed version (ground truth):
SSABinaryOpInstruction(BinaryOpInstruction.IOperator operator,int result,int val1,int val2,boolean mayBeInteger){
  super();
  this.result=result;
  this.val1=val1;
  this.val2=val2;
  this.operator=operator;
  this.mayBeInteger=mayBeInteger;
  Assertions._assert(val1 != -1 && val2 != -1);
}
Program: 100286
Project: 100286
Buggy source:
/** 
 * @see com.ibm.wala.ssa.SSAInstruction#getDef()
 */
@Override public boolean hasDef(){
  return true;
}

Fixed version (ground truth):
@Override public boolean hasDef(){
  return true;
}
Program: 100287
Project: 100287
Buggy source:
@Override public boolean isPEI(){
  return operator == BinaryOpInstruction.Operator.DIV || operator == BinaryOpInstruction.Operator.REM;
}

Fixed version (ground truth):
@Override public boolean isPEI(){
  return mayBeInteger && operator == BinaryOpInstruction.Operator.DIV || operator == BinaryOpInstruction.Operator.REM;
}
Program: 100288
Project: 100288
Buggy source:
/** 
 * UGH! This must be the Shrike OPCODE, not the Shrike OPERATOR code!!!!!
 * @artifact 38486
 * @return instruction opcode
 */
public BinaryOpInstruction.IOperator getOperator(){
  return operator;
}

Fixed version (ground truth):
/** 
 * Ugh.  clean up shrike operator stuff.
 */
public BinaryOpInstruction.IOperator getOperator(){
  return operator;
}
Program: 100289
Project: 100289
Buggy source:
/** 
 * @see com.ibm.wala.shrikeBT.Instruction.Visitor#visitShift(ShiftInstruction)
 */
@Override public void visitShift(com.ibm.wala.shrikeBT.ShiftInstruction instruction){
  int val2=workingState.pop();
  int val1=workingState.pop();
  int result=reuseOrCreateDef();
  workingState.push(result);
  emitInstruction(new SSABinaryOpInstruction(instruction.getOperator(),result,val1,val2));
}

Fixed version (ground truth):
/** 
 * @see com.ibm.wala.shrikeBT.Instruction.Visitor#visitShift(ShiftInstruction)
 */
@Override public void visitShift(com.ibm.wala.shrikeBT.ShiftInstruction instruction){
  int val2=workingState.pop();
  int val1=workingState.pop();
  int result=reuseOrCreateDef();
  workingState.push(result);
  emitInstruction(new SSABinaryOpInstruction(instruction.getOperator(),result,val1,val2,true));
}
Program: 100290
Project: 100290
Buggy source:
/** 
 * @see com.ibm.wala.shrikeBT.Instruction.Visitor#visitBinaryOp(BinaryOpInstruction)
 */
@Override public void visitBinaryOp(com.ibm.wala.shrikeBT.BinaryOpInstruction instruction){
  int val2=workingState.pop();
  int val1=workingState.pop();
  int result=reuseOrCreateDef();
  workingState.push(result);
  emitInstruction(new SSABinaryOpInstruction(instruction.getOperator(),result,val1,val2));
}

Fixed version (ground truth):
/** 
 * @see com.ibm.wala.shrikeBT.Instruction.Visitor#visitBinaryOp(BinaryOpInstruction)
 */
@Override public void visitBinaryOp(com.ibm.wala.shrikeBT.BinaryOpInstruction instruction){
  int val2=workingState.pop();
  int val1=workingState.pop();
  int result=reuseOrCreateDef();
  workingState.push(result);
  boolean isFloat=instruction.getType().equals(TYPE_double) || instruction.getType().equals(TYPE_float);
  emitInstruction(new SSABinaryOpInstruction(instruction.getOperator(),result,val1,val2,!isFloat));
}
Program: 100291
Project: 100291
Buggy source:
public static SSABinaryOpInstruction BinaryOpInstruction(BinaryOpInstruction.IOperator operator,int result,int val1,int val2){
  return new SSABinaryOpInstruction(operator,result,val1,val2);
}

Fixed version (ground truth):
public static SSABinaryOpInstruction BinaryOpInstruction(BinaryOpInstruction.IOperator operator,int result,int val1,int val2,boolean mayBeInteger){
  return new SSABinaryOpInstruction(operator,result,val1,val2,mayBeInteger);
}
Program: 100292
Project: 100292
Buggy source:
/** 
 * @return the cfg for n, or null if none found
 * @throws IllegalArgumentException if n == null
 */
@Override public ControlFlowGraph<ExplodedBasicBlock> getCFG(CGNode n) throws IllegalArgumentException {
  if (n == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  IR ir=n.getIR();
  return ExplodedControlFlowGraph.make(ir);
}

Fixed version (ground truth):
/** 
 * @return the cfg for n, or null if none found
 * @throws IllegalArgumentException if n == null
 */
@Override public ControlFlowGraph<ExplodedBasicBlock> getCFG(CGNode n) throws IllegalArgumentException {
  if (n == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  IR ir=n.getIR();
  if (ir == null) {
    return null;
  }
  return ExplodedControlFlowGraph.make(ir);
}
Program: 100293
Project: 100293
Buggy source:
/** 
 * Assuming a set of facts holds, simplify a CNF formula
 */
private static Collection<? extends IMaxTerm> simplifyCNF(ICNFFormula f,Collection<IMaxTerm> facts,ISemiDecisionProcedure dec){
  Collection<IMaxTerm> result=HashSetFactory.make();
  Collection<IMaxTerm> removedClauses=HashSetFactory.make();
  for (  IMaxTerm d : collectClauses(Collections.singleton(f))) {
    Collection<IMaxTerm> otherFacts=HashSetFactory.make(facts);
    otherFacts.addAll(collectClauses(Collections.singleton(f)));
    otherFacts.remove(d);
    otherFacts.removeAll(removedClauses);
    if (d instanceof Disjunction) {
      d=simplifyDisjunction((Disjunction)d,otherFacts,dec);
    }
    if (dec.isContradiction(d,otherFacts)) {
      return Collections.singleton(BooleanConstantFormula.FALSE);
    }
 else     if (facts.contains(d) || dec.isTautology(d,otherFacts)) {
      removedClauses.add(d);
    }
 else {
      result.add(d);
    }
  }
  if (result.isEmpty()) {
    return Collections.singleton(BooleanConstantFormula.TRUE);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * Assuming a set of facts holds, simplify a CNF formula
 */
private static Collection<? extends IMaxTerm> simplifyCNF(ICNFFormula f,Collection<IMaxTerm> facts,ISemiDecisionProcedure dec){
  Collection<IMaxTerm> result=HashSetFactory.make();
  Collection<IMaxTerm> removedClauses=HashSetFactory.make();
  for (  IMaxTerm d : collectClauses(Collections.singleton(f))) {
    Collection<IMaxTerm> otherFacts=HashSetFactory.make(facts);
    otherFacts.addAll(collectClauses(Collections.singleton(f)));
    otherFacts.remove(d);
    otherFacts.removeAll(removedClauses);
    IMaxTerm checkD=d;
    if (d instanceof Disjunction) {
      checkD=simplifyDisjunction((Disjunction)d,otherFacts,dec);
    }
    if (dec.isContradiction(checkD,otherFacts)) {
      return Collections.singleton(BooleanConstantFormula.FALSE);
    }
 else     if (facts.contains(checkD) || dec.isTautology(checkD,otherFacts)) {
      removedClauses.add(d);
    }
 else {
      result.add(checkD);
    }
  }
  if (result.isEmpty()) {
    return Collections.singleton(BooleanConstantFormula.TRUE);
  }
  return result;
}
Program: 100295
Project: 100295
Buggy source:
/** 
 * Wrap an SSAInstruction in a Statement
 */
public Statement ssaInstruction2Statement(SSAInstruction s){
}

Fixed version (ground truth):
public Statement ssaInstruction2Statement(SSAInstruction s,Map<SSAInstruction,Integer> instructionIndices){
}
Program: 100296
Project: 100296
Buggy source:
/** 
 * @return for each SSAInstruction, its instruction index in the irinstruction array
 */
private Map<SSAInstruction,Integer> computeInstructionIndices(IR ir){
  Map<SSAInstruction,Integer> result=HashMapFactory.make();
  if (ir != null) {
    SSAInstruction[] instructions=ir.getInstructions();
    for (int i=0; i < instructions.length; i++) {
      SSAInstruction s=instructions[i];
      if (s != null) {
        result.put(s,new Integer(i));
      }
    }
  }
  return result;
}

Fixed version (ground truth):
/** 
 * @return for each SSAInstruction, its instruction index in the irinstruction array
 */
public static Map<SSAInstruction,Integer> computeInstructionIndices(IR ir){
  Map<SSAInstruction,Integer> result=HashMapFactory.make();
  if (ir != null) {
    SSAInstruction[] instructions=ir.getInstructions();
    for (int i=0; i < instructions.length; i++) {
      SSAInstruction s=instructions[i];
      if (s != null) {
        result.put(s,new Integer(i));
      }
    }
  }
  return result;
}
Program: 100297
Project: 100297
Buggy source:
protected TypeReference[] makeParameterTypes(MethodReference method,int i){
  TypeReference nominal=method.getParameterType(i);
  if (nominal.isPrimitiveType() || nominal.isArrayType())   return new TypeReference[]{nominal};
 else {
    IClass nc=getCha().lookupClass(nominal);
    Collection subcs=nc.isInterface() ? getCha().getImplementors(nominal) : getCha().computeSubClasses(nominal);
    Set<TypeReference> subs=HashSetFactory.make();
    for (Iterator I=subcs.iterator(); I.hasNext(); ) {
      IClass cs=(IClass)I.next();
      if (!cs.isAbstract() && !cs.isInterface())       subs.add(cs.getReference());
    }
    return subs.toArray(new TypeReference[subs.size()]);
  }
}

Fixed version (ground truth):
protected TypeReference[] makeParameterTypes(IMethod method,int i){
  TypeReference nominal=method.getParameterType(i);
  if (nominal.isPrimitiveType() || nominal.isArrayType())   return new TypeReference[]{nominal};
 else {
    IClass nc=getCha().lookupClass(nominal);
    Collection subcs=nc.isInterface() ? getCha().getImplementors(nominal) : getCha().computeSubClasses(nominal);
    Set<TypeReference> subs=HashSetFactory.make();
    for (Iterator I=subcs.iterator(); I.hasNext(); ) {
      IClass cs=(IClass)I.next();
      if (!cs.isAbstract() && !cs.isInterface())       subs.add(cs.getReference());
    }
    return subs.toArray(new TypeReference[subs.size()]);
  }
}
Program: 100299
Project: 100299
Buggy source:
/** 
 * TODO: move this elsewhere. Move it into shrike and develop new way to track peis.
 * @throws IllegalArgumentException  if s is null
 */
public static boolean isPEI(Instruction s){
  if (s == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
switch (s.getOpcode()) {
case OP_iaload:
case OP_laload:
case OP_faload:
case OP_daload:
case OP_aaload:
case OP_baload:
case OP_caload:
case OP_saload:
case OP_iastore:
case OP_lastore:
case OP_fastore:
case OP_dastore:
case OP_aastore:
case OP_bastore:
case OP_castore:
case OP_sastore:
case OP_getfield:
case OP_putfield:
case OP_idiv:
case OP_invokevirtual:
case OP_invokespecial:
case OP_invokestatic:
case OP_invokeinterface:
case OP_new:
case OP_newarray:
case OP_anewarray:
case OP_arraylength:
case OP_athrow:
case OP_checkcast:
case OP_monitorenter:
case OP_monitorexit:
case OP_multianewarray:
    return true;
case OP_ldc_w:
  return (((ConstantInstruction)s).getType().equals(TYPE_Class));
default :
return false;
}
}

Fixed version (ground truth):
/** 
 * TODO: move this elsewhere. Move it into shrike and develop new way to track peis.
 * @throws IllegalArgumentException  if s is null
 */
public static boolean isPEI(Instruction s){
  if (s == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
switch (s.getOpcode()) {
case OP_iaload:
case OP_laload:
case OP_faload:
case OP_daload:
case OP_aaload:
case OP_baload:
case OP_caload:
case OP_saload:
case OP_iastore:
case OP_lastore:
case OP_fastore:
case OP_dastore:
case OP_aastore:
case OP_bastore:
case OP_castore:
case OP_sastore:
case OP_getfield:
case OP_putfield:
case OP_idiv:
case OP_invokevirtual:
case OP_invokespecial:
case OP_invokestatic:
case OP_invokeinterface:
case OP_irem:
case OP_new:
case OP_newarray:
case OP_anewarray:
case OP_arraylength:
case OP_athrow:
case OP_checkcast:
case OP_monitorenter:
case OP_monitorexit:
case OP_multianewarray:
    return true;
case OP_ldc_w:
  return (((ConstantInstruction)s).getType().equals(TYPE_Class));
default :
return false;
}
}
Program: 100300
Project: 100300
Buggy source:
boolean hasNormalEdge(T src,T dst);

Fixed version (ground truth):
/** 
 * This method must return true if and only if a normal edge from src to dst exists in the original CFG and should be kept for the pruned version of that CFG.  Note that this must _must_ return false for any normal edge that is not in the original CFG.
 */
boolean hasNormalEdge(T src,T dst);
Program: 100301
Project: 100301
Buggy source:
boolean hasExceptionalEdge(T src,T dst);

Fixed version (ground truth):
/** 
 * This method must return true if and only if an exceptional edge from src to dst exists in the original CFG and should be kept for the pruned version of that CFG.  Note that this must _must_ return false for any exceptional edge that is not in the original CFG.
 */
boolean hasExceptionalEdge(T src,T dst);
Program: 100302
Project: 100302
Buggy source:
public boolean hasNormalEdge(T src,T dst){
  return true;
}

Fixed version (ground truth):
public boolean hasNormalEdge(T src,T dst){
  return cfg.getNormalSuccessors(src).contains(dst);
}
Program: 100303
Project: 100303
Buggy source:
public static <T extends IBasicBlock>PrunedCFG<T> make(ControlFlowGraph<T> cfg){
  return PrunedCFG.make(cfg,new ExceptionEdgePruner<T>());
}

Fixed version (ground truth):
public static <T extends IBasicBlock>PrunedCFG<T> make(ControlFlowGraph<T> cfg){
  return PrunedCFG.make(cfg,new ExceptionEdgePruner<T>(cfg));
}
Program: 100304
Project: 100304
Buggy source:
public Iterator<T> getPredNodes(T N){
  return new CompoundIterator<T>(getNormalPredecessors(N),getExceptionalPredecessors(N));
}

Fixed version (ground truth):
public Iterator<T> getPredNodes(final T N){
  return new FilterIterator<T>(cfg.getPredNodes(N),new Filter<T>(){
    public boolean accepts(    T o){
      return currentCFGNodes.containsNode(o) && (filter.hasNormalEdge(o,N) || filter.hasExceptionalEdge(o,N));
    }
  }
);
}
Program: 100305
Project: 100305
Buggy source:
public Iterator<T> getSuccNodes(T N){
  return new CompoundIterator<T>(getNormalSuccessors(N),getExceptionalSuccessors(N));
}

Fixed version (ground truth):
public Iterator<T> getSuccNodes(final T N){
  return new FilterIterator<T>(cfg.getSuccNodes(N),new Filter<T>(){
    public boolean accepts(    T o){
      return currentCFGNodes.containsNode(o) && (filter.hasNormalEdge(N,o) || filter.hasExceptionalEdge(N,o));
    }
  }
);
}
Program: 100306
Project: 100306
Buggy source:
/** 
 * @return int set representing the heap def statements that are gen'ed bythe basic block. null if none.
 */
IntSet gen(ExplodedBasicBlock b){
  if (b.isEntryBlock()) {
    return heapEntryStatements();
  }
 else {
    SSAInstruction s=b.getInstruction();
    if (s == null) {
      return null;
    }
 else {
      if (s instanceof SSAInvokeInstruction) {
        Statement st=ssaInstructionIndex2Statement.get(b.getLastInstructionIndex());
        if (st == null) {
          System.err.println(ssaInstructionIndex2Statement);
          Assertions.UNREACHABLE("String_Node_Str" + b + "String_Node_Str"+ b.getLastInstructionIndex()+ "String_Node_Str"+ s);
        }
        int domainIndex=domain.getMappedIndex(st);
        assert(domainIndex != -1);
        return heapReturnCaller.getRelated(domainIndex);
      }
 else {
        Collection<PointerKey> gen=modRef.getMod(node,h,pa,s,exclusions);
        if (gen.isEmpty()) {
          return null;
        }
 else {
          NormalStatement n=ssaInstructionIndex2Statement.get(b.getLastInstructionIndex());
          return SparseIntSet.singleton(domain.getMappedIndex(n));
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * @return int set representing the heap def statements that are gen'ed bythe basic block. null if none.
 */
IntSet gen(ExplodedBasicBlock b){
  if (b.isEntryBlock()) {
    return heapEntryStatements();
  }
 else {
    SSAInstruction s=b.getInstruction();
    if (s == null) {
      return null;
    }
 else {
      if (s instanceof SSAAbstractInvokeInstruction) {
        Statement st=ssaInstructionIndex2Statement.get(b.getLastInstructionIndex());
        if (st == null) {
          System.err.println(ssaInstructionIndex2Statement);
          Assertions.UNREACHABLE("String_Node_Str" + b + "String_Node_Str"+ b.getLastInstructionIndex()+ "String_Node_Str"+ s);
        }
        int domainIndex=domain.getMappedIndex(st);
        assert(domainIndex != -1);
        return heapReturnCaller.getRelated(domainIndex);
      }
 else {
        Collection<PointerKey> gen=modRef.getMod(node,h,pa,s,exclusions);
        if (gen.isEmpty()) {
          return null;
        }
 else {
          NormalStatement n=ssaInstructionIndex2Statement.get(b.getLastInstructionIndex());
          return SparseIntSet.singleton(domain.getMappedIndex(n));
        }
      }
    }
  }
}
Program: 100307
Project: 100307
Buggy source:
public UnaryOperator getEdgeTransferFunction(IBasicBlock src,IBasicBlock dst){
  ExplodedBasicBlock s=(ExplodedBasicBlock)src;
  if (s.getInstruction() != null && !(s.getInstruction() instanceof SSAInvokeInstruction) && !cfg.getNormalSuccessors(src).contains(dst)) {
    return BitVectorIdentity.instance();
  }
 else {
    BitVector kill=kill(s);
    IntSet gen=gen(s);
    if (kill == null) {
      if (gen == null) {
        return BitVectorIdentity.instance();
      }
 else {
        return new BitVectorUnionVector(new BitVectorIntSet(gen).getBitVector());
      }
    }
 else {
      if (gen == null) {
        return new BitVectorMinusVector(kill);
      }
 else {
        return new BitVectorKillGen(kill,new BitVectorIntSet(gen).getBitVector());
      }
    }
  }
}

Fixed version (ground truth):
public UnaryOperator getEdgeTransferFunction(IBasicBlock src,IBasicBlock dst){
  ExplodedBasicBlock s=(ExplodedBasicBlock)src;
  if (s.getInstruction() != null && !(s.getInstruction() instanceof SSAAbstractInvokeInstruction) && !cfg.getNormalSuccessors(src).contains(dst)) {
    return BitVectorIdentity.instance();
  }
 else {
    BitVector kill=kill(s);
    IntSet gen=gen(s);
    if (kill == null) {
      if (gen == null) {
        return BitVectorIdentity.instance();
      }
 else {
        return new BitVectorUnionVector(new BitVectorIntSet(gen).getBitVector());
      }
    }
 else {
      if (gen == null) {
        return new BitVectorMinusVector(kill);
      }
 else {
        return new BitVectorKillGen(kill,new BitVectorIntSet(gen).getBitVector());
      }
    }
  }
}
Program: 100308
Project: 100308
Buggy source:
public String prettyPrint(ILogicDecorator d){
  if (clauses.size() == 1) {
    return getF1().prettyPrint(d);
  }
 else {
    StringBuffer result=new StringBuffer();
    result.append("String_Node_Str");
    result.append(getF1().prettyPrint(d));
    result.append("String_Node_Str");
    result.append(d.prettyPrint(getConnective()));
    result.append("String_Node_Str");
    result.append(getF2().prettyPrint(d));
    result.append("String_Node_Str");
    return result.toString();
  }
}

Fixed version (ground truth):
public String prettyPrint(ILogicDecorator d){
  if (d == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  return d.prettyPrint(this);
}
Program: 100309
Project: 100309
Buggy source:
private static IMaxTerm simplifyDisjunction(Disjunction d,Collection<IMaxTerm> otherFacts,ISemiDecisionProcedure dec){
  Collection<IFormula> result=HashSetFactory.make();
  for (  IFormula f : d.getClauses()) {
    if (dec.isContradiction(f,otherFacts)) {
      result.add(BooleanConstantFormula.FALSE);
    }
 else     if (dec.isTautology(f,otherFacts)) {
      result.add(BooleanConstantFormula.TRUE);
    }
 else {
      result.add(f);
    }
  }
  return Disjunction.make(result);
}

Fixed version (ground truth):
private static IMaxTerm simplifyDisjunction(Disjunction d,Collection<IMaxTerm> otherFacts,ISemiDecisionProcedure dec){
}
Program: 100311
Project: 100311
Buggy source:
private JavaLauncher(String programArgs,String mainClass,List<String> xtraClasspath){
  super();
  this.programArgs=programArgs;
  this.mainClass=mainClass;
  this.xtraClasspath=xtraClasspath;
}

Fixed version (ground truth):
private JavaLauncher(String programArgs,String mainClass,List<String> xtraClasspath){
  super();
  this.programArgs=programArgs;
  this.mainClass=mainClass;
  if (xtraClasspath != null) {
    this.xtraClasspath.addAll(xtraClasspath);
  }
}
Program: 100312
Project: 100312
Buggy source:
/** 
 * Launch the java process.
 * @throws WalaException
 */
public Process start() throws WalaException {
  String cp=makeClasspath();
  String heap="String_Node_Str";
  String cmd=getJavaExe() + heap + cp+ "String_Node_Str"+ makeLibPath()+ "String_Node_Str"+ getMainClass()+ "String_Node_Str"+ getProgramArgs();
  Process p=spawnProcess(cmd);
  stdOutDrain=isCaptureOutput() ? captureStdOut(p) : drainStdOut(p);
  stdInDrain=drainStdErr(p);
  return p;
}

Fixed version (ground truth):
/** 
 * Launch the java process.
 */
public Process start() throws WalaException {
  System.err.println(System.getProperty("String_Node_Str"));
  String cp=makeClasspath();
  String heap="String_Node_Str";
  String cmd=getJavaExe() + heap + cp+ "String_Node_Str"+ makeLibPath()+ "String_Node_Str"+ getMainClass()+ "String_Node_Str"+ getProgramArgs();
  Process p=spawnProcess(cmd);
  stdOutDrain=isCaptureOutput() ? captureStdOut(p) : drainStdOut(p);
  stdInDrain=drainStdErr(p);
  return p;
}
Program: 100313
Project: 100313
Buggy source:
private String makeClasspath(){
  String cp="String_Node_Str" + System.getProperty("String_Node_Str");
  if (getXtraClassPath() == null || getXtraClassPath().isEmpty()) {
    return cp;
  }
 else {
    for (Iterator it=getXtraClassPath().iterator(); it.hasNext(); ) {
      cp+=(String)it.next();
      if (it.hasNext()) {
        cp+="String_Node_Str";
      }
    }
    cp+="String_Node_Str";
    return cp;
  }
}

Fixed version (ground truth):
private String makeClasspath(){
  String cp="String_Node_Str" + System.getProperty("String_Node_Str");
  if (getXtraClassPath() == null || getXtraClassPath().isEmpty()) {
    return cp;
  }
 else {
    cp+="String_Node_Str";
    for (Iterator it=getXtraClassPath().iterator(); it.hasNext(); ) {
      cp+=(String)it.next();
      if (it.hasNext()) {
        cp+="String_Node_Str";
      }
    }
    cp+="String_Node_Str";
    return cp;
  }
}
Program: 100314
Project: 100314
Buggy source:
public boolean isImplicit(PointerKey p){
  int i=findOrCreateIndex(p);
  return pointsToSets.get(i) == IMPLICIT;
}

Fixed version (ground truth):
public boolean isImplicit(PointerKey p){
  int i=getIndex(p);
  return i != -1 && pointsToSets.get(i) == IMPLICIT;
}
Program: 100315
Project: 100315
Buggy source:
public void testPrimordial() throws ClassHierarchyException {
  if (useShortProfile()) {
    return;
  }
  AnalysisScope scope=CallGraphTestUtil.makeJ2SEAnalysisScope("String_Node_Str","String_Node_Str");
  ClassHierarchy cha=ClassHierarchy.make(scope);
  Iterable<Entrypoint> entrypoints=makePrimordialMainEntrypoints(scope,cha);
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  CallGraphTestUtil.buildZeroCFA(options,new AnalysisCache(),cha,scope);
}

Fixed version (ground truth):
public void testPrimordial() throws ClassHierarchyException {
  if (useShortProfile()) {
    return;
  }
  AnalysisScope scope=CallGraphTestUtil.makeJ2SEAnalysisScope("String_Node_Str","String_Node_Str");
  ClassHierarchy cha=ClassHierarchy.make(scope);
  Iterable<Entrypoint> entrypoints=makePrimordialMainEntrypoints(scope,cha);
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  CallGraphTestUtil.buildZeroCFA(options,new AnalysisCache(),cha,scope,false);
}
Program: 100316
Project: 100316
Buggy source:
/** 
 * Constructor for SpecJTest.
 * @param arg0
 */
public CallGraphTest(String arg0){
  super(arg0);
}

Fixed version (ground truth):
public CallGraphTest(String arg0){
  super(arg0);
}
Program: 100317
Project: 100317
Buggy source:
public void testIO() throws ClassHierarchyException {
  AnalysisScope scope=CallGraphTestUtil.makeJ2SEAnalysisScope("String_Node_Str","String_Node_Str");
  ClassHierarchy cha=ClassHierarchy.make(scope);
  Iterable<Entrypoint> entrypoints=makePrimordialPublicEntrypoints(scope,cha,"String_Node_Str");
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  CallGraphTestUtil.buildZeroCFA(options,new AnalysisCache(),cha,scope);
}

Fixed version (ground truth):
public void testIO() throws ClassHierarchyException {
  AnalysisScope scope=CallGraphTestUtil.makeJ2SEAnalysisScope("String_Node_Str","String_Node_Str");
  ClassHierarchy cha=ClassHierarchy.make(scope);
  Iterable<Entrypoint> entrypoints=makePrimordialPublicEntrypoints(scope,cha,"String_Node_Str");
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  CallGraphTestUtil.buildZeroCFA(options,new AnalysisCache(),cha,scope,false);
}
Program: 100318
Project: 100318
Buggy source:
public void testJava_cup() throws ClassHierarchyException {
  AnalysisScope scope=CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.JAVA_CUP);
  ClassHierarchy cha=ClassHierarchy.make(scope);
  Iterable<Entrypoint> entrypoints=com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope,cha,TestConstants.JAVA_CUP_MAIN);
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  doCallGraphs(options,new AnalysisCache(),cha,scope,null,useShortProfile(),false);
}

Fixed version (ground truth):
public void testJava_cup() throws ClassHierarchyException {
  AnalysisScope scope=CallGraphTestUtil.makeJ2SEAnalysisScope(TestConstants.JAVA_CUP);
  ClassHierarchy cha=ClassHierarchy.make(scope);
  Iterable<Entrypoint> entrypoints=com.ibm.wala.ipa.callgraph.impl.Util.makeMainEntrypoints(scope,cha,TestConstants.JAVA_CUP_MAIN);
  AnalysisOptions options=CallGraphTestUtil.makeAnalysisOptions(scope,entrypoints);
  doCallGraphs(options,new AnalysisCache(),cha,scope,null,useShortProfile(),false,true);
}