nus-yam/ex-repair huggingface dataset:
Program: 88518
Project: 88518
Buggy source:
@Override public void vrun(){
  Ref<UserProfileEntry> refentry=ofy().load().type(UserProfileEntry.class).ancestor(keyu).filter("String_Node_Str",dimension).filter("String_Node_Str",scope).filter("String_Node_Str",provider).first();
  UserProfileEntry entry=refentry.getValue();
  if (entry == null) {
    entry=new UserProfileEntry();
    entry.user=keyu;
    entry.dimension=dimension;
    entry.provider=provider;
    entry.scope=scope;
  }
  entry.value=typedVal;
  ofy().save().entity(entry).now();
}

Fixed version (ground truth):
@Override public void vrun(){
  Query<UserProfileEntry> query=ofy().load().type(UserProfileEntry.class).ancestor(keyu);
  if (dimension != null)   query=query.filter("String_Node_Str",dimension);
  if (scope != null)   query=query.filter("String_Node_Str",scope);
  if (provider != null)   query=query.filter("String_Node_Str",provider);
  Ref<UserProfileEntry> refentry=query.first();
  UserProfileEntry entry=refentry.getValue();
  if (entry == null) {
    entry=new UserProfileEntry();
    entry.user=keyu;
    entry.dimension=dimension;
    entry.provider=provider;
    entry.scope=scope;
  }
  entry.value=typedVal;
  ofy().save().entity(entry).now();
}
Program: 88519
Project: 88519
Buggy source:
public static String findRunner(IType testClass){
  IAnnotation annotation=testClass.getAnnotation(RunWith.class.getSimpleName());
  if (annotation != null && annotation.exists()) {
    try {
      for (      IMemberValuePair pair : annotation.getMemberValuePairs())       if ("String_Node_Str".equals(pair.getMemberName()) && pair.getValue() instanceof String)       return getFQN(testClass.getCompilationUnit(),(String)pair.getValue());
    }
 catch (    JavaModelException e) {
      e.printStackTrace();
      return null;
    }
  }
  return null;
}

Fixed version (ground truth):
public static String findRunner(IType testClass){
  IAnnotation annotation=testClass.getAnnotation(RunWith.class.getSimpleName());
  if (annotation == null || !annotation.exists())   annotation=testClass.getAnnotation(RunWith.class.getName());
  if (annotation != null && annotation.exists()) {
    try {
      for (      IMemberValuePair pair : annotation.getMemberValuePairs())       if ("String_Node_Str".equals(pair.getMemberName()) && pair.getValue() instanceof String)       return getFQN(testClass.getCompilationUnit(),(String)pair.getValue());
    }
 catch (    JavaModelException e) {
      e.printStackTrace();
      return null;
    }
  }
  return null;
}
Program: 88520
Project: 88520
Buggy source:
protected VarNode field(SootField f){
  return PaddleScene.v().nodeManager().findLocalVarNode(f);
}

Fixed version (ground truth):
protected VarNode field(SootField f){
  return PaddleScene.v().nodeManager().findGlobalVarNode(f);
}
Program: 88522
Project: 88522
Buggy source:
final public void caseNewExpr(NewExpr ne){
  if (PaddleScene.v().options().merge_stringbuffer() && ne.getType().equals(RefType.v("String_Node_Str"))) {
    setResult(nm.makeGlobalAllocNode(ne.getType(),ne.getType()));
  }
 else {
    setResult(makeAllocNode(ne,ne.getType(),method));
  }
}

Fixed version (ground truth):
final public void caseNewExpr(NewExpr ne){
  if (PaddleScene.v().options().merge_stringbuffer() && isStringBuffer(ne.getType())) {
    setResult(nm.makeGlobalAllocNode(ne.getType(),ne.getType()));
  }
 else {
    setResult(makeAllocNode(ne,ne.getType(),method));
  }
}
Program: 88524
Project: 88524
Buggy source:
private void addAlloc(Context objc,AllocNode obj,Context varc,VarNode var){
  if (obj instanceof GlobalAllocNode)   objc=null;
  if (var instanceof GlobalVarNode)   varc=null;
  calloc.add(objc,obj,varc,var);
}

Fixed version (ground truth):
private void addAlloc(Context objc,AllocNode obj,Context varc,VarNode var){
  boolean contextHeap=PaddleScene.v().options().context_heap();
  if (obj instanceof GlobalAllocNode || !contextHeap)   objc=null;
  if (var instanceof GlobalVarNode)   varc=null;
  calloc.add(objc,obj,varc,var);
}
Program: 88530
Project: 88530
Buggy source:
boolean hasSootClass(){
  return sootClass != null;
}

Fixed version (ground truth):
public boolean hasSootClass(){
  return sootClass != null;
}
Program: 88531
Project: 88531
Buggy source:
public void checkLevel(int level){
  if (!Scene.v().doneResolving())   return;
  if (resolvingLevel < level) {
    try {
      throw new RuntimeException("String_Node_Str" + levelToString(level) + "String_Node_Str"+ name+ "String_Node_Str"+ levelToString(resolvingLevel));
    }
 catch (    RuntimeException e) {
      System.out.println("String_Node_Str" + e.toString());
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
public void checkLevel(int level){
  if (!Scene.v().doneResolving())   return;
  if (resolvingLevel < level) {
    throw new RuntimeException("String_Node_Str" + levelToString(level) + "String_Node_Str"+ name+ "String_Node_Str"+ levelToString(resolvingLevel));
  }
}
Program: 88532
Project: 88532
Buggy source:
final public void makeTypeMask(){
  RefType.v("String_Node_Str");
  typeMask=new LargeNumberedMap(Scene.v().getTypeNumberer());
  if (fh == null)   return;
  int numTypes=Scene.v().getTypeNumberer().size();
  if (pag.getOpts().verbose())   G.v().out.println("String_Node_Str" + numTypes);
  ArrayNumberer allocNodes=pag.getAllocNodeNumberer();
  for (Iterator tIt=Scene.v().getTypeNumberer().iterator(); tIt.hasNext(); ) {
    final Type t=(Type)tIt.next();
    if (!(t instanceof RefLikeType))     continue;
    if (t instanceof AnySubType)     continue;
    BitVector mask=new BitVector(allocNodes.size());
    for (Iterator nIt=allocNodes.iterator(); nIt.hasNext(); ) {
      final Node n=(Node)nIt.next();
      if (castNeverFails(n.getType(),t)) {
        mask.set(n.getNumber());
      }
    }
    typeMask.put(t,mask);
  }
  allocNodeListener=pag.allocNodeListener();
}

Fixed version (ground truth):
final public void makeTypeMask(){
  RefType.v("String_Node_Str");
  typeMask=new LargeNumberedMap(Scene.v().getTypeNumberer());
  if (fh == null)   return;
  int numTypes=Scene.v().getTypeNumberer().size();
  if (pag.getOpts().verbose())   G.v().out.println("String_Node_Str" + numTypes);
  ArrayNumberer allocNodes=pag.getAllocNodeNumberer();
  for (Iterator tIt=Scene.v().getTypeNumberer().iterator(); tIt.hasNext(); ) {
    final Type t=(Type)tIt.next();
    if (!(t instanceof RefLikeType))     continue;
    if (t instanceof AnySubType)     continue;
    if (isUnresolved(t))     continue;
    BitVector mask=new BitVector(allocNodes.size());
    for (Iterator nIt=allocNodes.iterator(); nIt.hasNext(); ) {
      final Node n=(Node)nIt.next();
      if (castNeverFails(n.getType(),t)) {
        mask.set(n.getNumber());
      }
    }
    typeMask.put(t,mask);
  }
  allocNodeListener=pag.allocNodeListener();
}
Program: 88533
Project: 88533
Buggy source:
final public BitVector get(Type type){
  if (type == null)   return null;
  while (allocNodeListener.hasNext()) {
    AllocNode n=(AllocNode)allocNodeListener.next();
    for (Iterator tIt=Scene.v().getTypeNumberer().iterator(); tIt.hasNext(); ) {
      final Type t=(Type)tIt.next();
      if (!(t instanceof RefLikeType))       continue;
      if (t instanceof AnySubType)       continue;
      if (castNeverFails(n.getType(),t)) {
        BitVector mask=(BitVector)typeMask.get(t);
        if (mask == null) {
          typeMask.put(t,mask=new BitVector());
          for (Iterator anIt=pag.getAllocNodeNumberer().iterator(); anIt.hasNext(); ) {
            final AllocNode an=(AllocNode)anIt.next();
            if (castNeverFails(an.getType(),t)) {
              mask.set(an.getNumber());
            }
          }
          continue;
        }
        mask.set(n.getNumber());
      }
    }
  }
  BitVector ret=(BitVector)typeMask.get(type);
  if (ret == null && fh != null)   throw new RuntimeException("String_Node_Str" + type);
  return ret;
}

Fixed version (ground truth):
final public BitVector get(Type type){
  if (type == null)   return null;
  while (allocNodeListener.hasNext()) {
    AllocNode n=(AllocNode)allocNodeListener.next();
    for (Iterator tIt=Scene.v().getTypeNumberer().iterator(); tIt.hasNext(); ) {
      final Type t=(Type)tIt.next();
      if (!(t instanceof RefLikeType))       continue;
      if (t instanceof AnySubType)       continue;
      if (isUnresolved(t))       continue;
      if (castNeverFails(n.getType(),t)) {
        BitVector mask=(BitVector)typeMask.get(t);
        if (mask == null) {
          typeMask.put(t,mask=new BitVector());
          for (Iterator anIt=pag.getAllocNodeNumberer().iterator(); anIt.hasNext(); ) {
            final AllocNode an=(AllocNode)anIt.next();
            if (castNeverFails(an.getType(),t)) {
              mask.set(an.getNumber());
            }
          }
          continue;
        }
        mask.set(n.getNumber());
      }
    }
  }
  BitVector ret=(BitVector)typeMask.get(type);
  if (ret == null && fh != null)   throw new RuntimeException("String_Node_Str" + type);
  return ret;
}
Program: 88534
Project: 88534
Buggy source:
/** 
 * Creates a new node of pointer assignment graph pag, with type type. 
 */
Node(PAG pag,Type type){
  this.type=type;
  this.pag=pag;
  replacement=this;
}

Fixed version (ground truth):
/** 
 * Creates a new node of pointer assignment graph pag, with type type. 
 */
Node(PAG pag,Type type){
  if (TypeManager.isUnresolved(type))   throw new RuntimeException("String_Node_Str" + type);
  this.type=type;
  this.pag=pag;
  replacement=this;
}
Program: 88535
Project: 88535
Buggy source:
/** 
 * Sets the declared type of this node, null for unknown. 
 */
public void setType(Type type){
  this.type=type;
}

Fixed version (ground truth):
/** 
 * Sets the declared type of this node, null for unknown. 
 */
public void setType(Type type){
  if (TypeManager.isUnresolved(type))   throw new RuntimeException("String_Node_Str" + type);
  this.type=type;
}
Program: 88538
Project: 88538
Buggy source:
private boolean newEdges(){
  boolean ret=false;
  for (Iterator tIt=newSimple.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_dstc_dst.Tuple t=(Rsrcc_src_dstc_dst.Tuple)tIt.next();
    ret=true;
    if (p2setsMake(t.dstc(),t.dst()).addAll(p2setsGet(t.srcc(),t.src()),null))     addToVarNodeWorkList(ContextVarNode.make(t.dstc(),t.dst()));
  }
  for (Iterator tIt=newAlloc.iterator(); tIt.hasNext(); ) {
    final Robjc_obj_varc_var.Tuple t=(Robjc_obj_varc_var.Tuple)tIt.next();
    ret=true;
    ContextVarNode cvn=ContextVarNode.make(t.varc(),t.var());
    if (p2setsMake(cvn).add(t.objc(),t.obj()))     addToVarNodeWorkList(cvn);
  }
  for (Iterator tIt=newLoad.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_fld_dstc_dst.Tuple t=(Rsrcc_src_fld_dstc_dst.Tuple)tIt.next();
    ret=true;
    ContextVarNode srccvn=ContextVarNode.make(t.srcc(),t.src());
    if (fieldToBase.put(t.fld(),srccvn)) {
      addToAliasWorkList(srccvn);
    }
  }
  for (Iterator tIt=newStore.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_fld_dstc_dst.Tuple t=(Rsrcc_src_fld_dstc_dst.Tuple)tIt.next();
    ret=true;
    ContextVarNode dstcvn=ContextVarNode.make(t.dstc(),t.dst());
    if (fieldToBase.put(t.fld(),dstcvn)) {
      addToAliasWorkList(dstcvn);
    }
  }
  return ret;
}

Fixed version (ground truth):
private boolean newEdges(){
  boolean ret=false;
  for (Iterator tIt=newSimple.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_dstc_dst.Tuple t=(Rsrcc_src_dstc_dst.Tuple)tIt.next();
    ret=true;
    if (p2setsMake(t.dstc(),t.dst()).addAll(p2setsGet(t.srcc(),t.src()),null))     addToVarNodeWorkList(ContextVarNode.make(t.dstc(),t.dst()));
  }
  for (Iterator tIt=newAlloc.iterator(); tIt.hasNext(); ) {
    final Robjc_obj_varc_var.Tuple t=(Robjc_obj_varc_var.Tuple)tIt.next();
    ret=true;
    ContextVarNode cvn=ContextVarNode.make(t.varc(),t.var());
    if (p2setsMake(cvn).add(t.objc(),t.obj()))     addToVarNodeWorkList(cvn);
  }
  for (Iterator tIt=newLoad.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_fld_dstc_dst.Tuple t=(Rsrcc_src_fld_dstc_dst.Tuple)tIt.next();
    ret=true;
    ContextVarNode srccvn=ContextVarNode.make(t.srcc(),t.src());
    if (fieldToBase.put(t.fld(),srccvn)) {
      addToAliasWorkList(srccvn);
    }
  }
  for (Iterator tIt=newStore.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_dstc_dst_fld.Tuple t=(Rsrcc_src_dstc_dst_fld.Tuple)tIt.next();
    ret=true;
    ContextVarNode dstcvn=ContextVarNode.make(t.dstc(),t.dst());
    if (fieldToBase.put(t.fld(),dstcvn)) {
      addToAliasWorkList(dstcvn);
    }
  }
  return ret;
}
Program: 88539
Project: 88539
Buggy source:
private boolean newEdges(){
  boolean change=false;
  for (Iterator tIt=newSimple.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_dstc_dst.Tuple t=(Rsrcc_src_dstc_dst.Tuple)tIt.next();
    change=true;
    PointsToSetReadOnly p2set=p2sets.get(t.srcc(),t.src());
    if (p2set instanceof PointsToSetInternal) {
      ((PointsToSetInternal)p2set).unFlushNew();
    }
  }
  for (Iterator tIt=newLoad.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_fld_dstc_dst.Tuple t=(Rsrcc_src_fld_dstc_dst.Tuple)tIt.next();
    change=true;
  }
  for (Iterator tIt=newStore.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_fld_dstc_dst.Tuple t=(Rsrcc_src_fld_dstc_dst.Tuple)tIt.next();
    change=true;
    PointsToSetReadOnly p2set=p2sets.get(t.srcc(),t.src());
    if (p2set instanceof PointsToSetInternal) {
      ((PointsToSetInternal)p2set).unFlushNew();
    }
  }
  for (Iterator tIt=newAlloc.iterator(); tIt.hasNext(); ) {
    final Robjc_obj_varc_var.Tuple t=(Robjc_obj_varc_var.Tuple)tIt.next();
    change=true;
    p2sets.make(t.varc(),t.var()).add(t.objc(),t.obj());
  }
  return change;
}

Fixed version (ground truth):
private boolean newEdges(){
  boolean change=false;
  for (Iterator tIt=newSimple.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_dstc_dst.Tuple t=(Rsrcc_src_dstc_dst.Tuple)tIt.next();
    change=true;
    PointsToSetReadOnly p2set=p2sets.get(t.srcc(),t.src());
    if (p2set instanceof PointsToSetInternal) {
      ((PointsToSetInternal)p2set).unFlushNew();
    }
  }
  for (Iterator tIt=newLoad.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_fld_dstc_dst.Tuple t=(Rsrcc_src_fld_dstc_dst.Tuple)tIt.next();
    change=true;
  }
  for (Iterator tIt=newStore.iterator(); tIt.hasNext(); ) {
    final Rsrcc_src_dstc_dst_fld.Tuple t=(Rsrcc_src_dstc_dst_fld.Tuple)tIt.next();
    change=true;
    PointsToSetReadOnly p2set=p2sets.get(t.srcc(),t.src());
    if (p2set instanceof PointsToSetInternal) {
      ((PointsToSetInternal)p2set).unFlushNew();
    }
  }
  for (Iterator tIt=newAlloc.iterator(); tIt.hasNext(); ) {
    final Robjc_obj_varc_var.Tuple t=(Robjc_obj_varc_var.Tuple)tIt.next();
    change=true;
    p2sets.make(t.varc(),t.var()).add(t.objc(),t.obj());
  }
  return change;
}
Program: 88543
Project: 88543
Buggy source:
protected boolean needsOuterClassRef(polyglot.types.ClassType typeToInvoke){
  AnonLocalClassInfo info=(AnonLocalClassInfo)InitialResolver.v().finalLocalInfo().get(new polyglot.util.IdentityKey(typeToInvoke));
  if ((info != null) && (!info.inStaticMethod())) {
    return true;
  }
 else   if (typeToInvoke.isNested() && !typeToInvoke.flags().isStatic() && !typeToInvoke.isAnonymous()&& !typeToInvoke.isLocal()) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
protected boolean needsOuterClassRef(polyglot.types.ClassType typeToInvoke){
  AnonLocalClassInfo info=(AnonLocalClassInfo)InitialResolver.v().finalLocalInfo().get(new polyglot.util.IdentityKey(typeToInvoke));
  if (InitialResolver.v().isAnonInCCall(typeToInvoke))   return false;
  if ((info != null) && (!info.inStaticMethod())) {
    return true;
  }
 else   if (typeToInvoke.isNested() && !typeToInvoke.flags().isStatic() && !typeToInvoke.isAnonymous()&& !typeToInvoke.isLocal()) {
    return true;
  }
  return false;
}
Program: 88544
Project: 88544
Buggy source:
public MethodFinalsChecker(){
  finalLocals=new ArrayList();
  inners=new ArrayList();
  typeToLocalsUsed=new HashMap();
}

Fixed version (ground truth):
public MethodFinalsChecker(){
  finalLocals=new ArrayList();
  inners=new ArrayList();
  ccallList=new ArrayList();
  typeToLocalsUsed=new HashMap();
}
Program: 88545
Project: 88545
Buggy source:
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.LocalDecl) {
    polyglot.ast.LocalDecl ld=(polyglot.ast.LocalDecl)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  if (n instanceof polyglot.ast.Formal) {
    polyglot.ast.Formal ld=(polyglot.ast.Formal)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  return enter(n);
}

Fixed version (ground truth):
public polyglot.visit.NodeVisitor enter(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.LocalDecl) {
    polyglot.ast.LocalDecl ld=(polyglot.ast.LocalDecl)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  if (n instanceof polyglot.ast.Formal) {
    polyglot.ast.Formal ld=(polyglot.ast.Formal)n;
    if (ld.flags().isFinal()) {
      if (!finalLocals.contains(new polyglot.util.IdentityKey(ld.localInstance()))) {
        finalLocals.add(new polyglot.util.IdentityKey(ld.localInstance()));
      }
    }
  }
  if (n instanceof polyglot.ast.ConstructorCall) {
    ccallList.add(n);
  }
  return enter(n);
}
Program: 88546
Project: 88546
Buggy source:
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right){
  return ext().handlePrivateFieldSet(expr,right);
}

Fixed version (ground truth):
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right,soot.Value base){
  return ext().handlePrivateFieldSet(expr,right,base);
}
Program: 88547
Project: 88547
Buggy source:
protected soot.Local handlePrivateFieldAssignSet(polyglot.ast.Assign assign){
  if (assign.left() instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)assign.left();
    if (assign.operator() == polyglot.ast.Assign.ASSIGN) {
      soot.Value right=base().getSimpleAssignRightLocal(assign);
      return base().handlePrivateFieldSet(accessField,right);
    }
 else {
      soot.Local baseLocal=(soot.Local)base().getBaseLocal(accessField.field().target());
      soot.Local leftLocal=handleCall(accessField.field(),accessField.getMeth(),null,baseLocal);
      soot.Value right=base().getAssignRightLocal(assign,leftLocal);
      return handleFieldSet(accessField,right,baseLocal);
    }
  }
 else {
    return ext().handlePrivateFieldAssignSet(assign);
  }
}

Fixed version (ground truth):
protected soot.Local handlePrivateFieldAssignSet(polyglot.ast.Assign assign){
  if (assign.left() instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)assign.left();
    soot.Local baseLocal=(soot.Local)base().getBaseLocal(accessField.field().target());
    if (assign.operator() == polyglot.ast.Assign.ASSIGN) {
      soot.Value right=base().getSimpleAssignRightLocal(assign);
      return base().handlePrivateFieldSet(accessField,right,baseLocal);
    }
 else {
      soot.Local leftLocal=handleCall(accessField.field(),accessField.getMeth(),null,baseLocal);
      soot.Value right=base().getAssignRightLocal(assign,leftLocal);
      return handleFieldSet(accessField,right,baseLocal);
    }
  }
 else {
    return ext().handlePrivateFieldAssignSet(assign);
  }
}
Program: 88548
Project: 88548
Buggy source:
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    return handleCall(accessField.field(),accessField.setMeth(),right,null);
  }
 else {
    return ext().handlePrivateFieldSet(expr,right);
  }
}

Fixed version (ground truth):
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right,soot.Value baseLocal){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    return handleCall(accessField.field(),accessField.setMeth(),right,null);
  }
 else {
    return ext().handlePrivateFieldSet(expr,right,baseLocal);
  }
}
Program: 88551
Project: 88551
Buggy source:
/** 
 * sets up the info needed to invoke polyglot
 */
public polyglot.frontend.ExtensionInfo initExtInfo(String fileName,List sourceLocations){
  Set source=new HashSet();
  ExtensionInfo extInfo=new soot.javaToJimple.jj.ExtensionInfo(){
    public List passes(    Job job){
      List passes=super.passes(job);
      beforePass(passes,Pass.TYPE_CHECK,new VisitorPass(polyglot.frontend.Pass.FOLD,job,new polyglot.visit.ConstantFolder(ts,nf)));
      beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(CAST_INSERTION,job,new CastInsertionVisitor(job,ts,nf)));
      beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(STRICTFP_PROP,job,new StrictFPPropagator(false)));
      afterPass(passes,Pass.PRE_OUTPUT_ALL,new SaveASTVisitor(SAVE_AST,job,this));
      removePass(passes,Pass.OUTPUT);
      return passes;
    }
  }
;
  polyglot.main.Options options=extInfo.getOptions();
  options.assertions=true;
  options.source_path=new LinkedList();
  Iterator it=sourceLocations.iterator();
  while (it.hasNext()) {
    Object next=it.next();
    options.source_path.add(new File(next.toString()));
  }
  options.source_ext=new String[]{"String_Node_Str"};
  options.serialize_type_info=false;
  source.add(fileName);
  options.source_path.add(new File(fileName).getParentFile());
  polyglot.main.Options.global=options;
  return extInfo;
}

Fixed version (ground truth):
/** 
 * sets up the info needed to invoke polyglot
 */
public polyglot.frontend.ExtensionInfo initExtInfo(String fileName,List sourceLocations){
  Set source=new HashSet();
  ExtensionInfo extInfo=new soot.javaToJimple.jj.ExtensionInfo(){
    public List passes(    Job job){
      List passes=super.passes(job);
      beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(CAST_INSERTION,job,new CastInsertionVisitor(job,ts,nf)));
      beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(STRICTFP_PROP,job,new StrictFPPropagator(false)));
      afterPass(passes,Pass.PRE_OUTPUT_ALL,new SaveASTVisitor(SAVE_AST,job,this));
      removePass(passes,Pass.OUTPUT);
      return passes;
    }
  }
;
  polyglot.main.Options options=extInfo.getOptions();
  options.assertions=true;
  options.source_path=new LinkedList();
  Iterator it=sourceLocations.iterator();
  while (it.hasNext()) {
    Object next=it.next();
    System.out.println("String_Node_Str" + next.toString());
    options.source_path.add(new File(next.toString()));
  }
  options.source_ext=new String[]{"String_Node_Str"};
  options.serialize_type_info=false;
  source.add(fileName);
  options.source_path.add(new File(fileName).getParentFile());
  polyglot.main.Options.global=options;
  return extInfo;
}
Program: 88552
Project: 88552
Buggy source:
public List passes(Job job){
  List passes=super.passes(job);
  beforePass(passes,Pass.TYPE_CHECK,new VisitorPass(polyglot.frontend.Pass.FOLD,job,new polyglot.visit.ConstantFolder(ts,nf)));
  beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(CAST_INSERTION,job,new CastInsertionVisitor(job,ts,nf)));
  beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(STRICTFP_PROP,job,new StrictFPPropagator(false)));
  afterPass(passes,Pass.PRE_OUTPUT_ALL,new SaveASTVisitor(SAVE_AST,job,this));
  removePass(passes,Pass.OUTPUT);
  return passes;
}

Fixed version (ground truth):
public List passes(Job job){
  List passes=super.passes(job);
  beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(CAST_INSERTION,job,new CastInsertionVisitor(job,ts,nf)));
  beforePass(passes,Pass.EXIT_CHECK,new VisitorPass(STRICTFP_PROP,job,new StrictFPPropagator(false)));
  afterPass(passes,Pass.PRE_OUTPUT_ALL,new SaveASTVisitor(SAVE_AST,job,this));
  removePass(passes,Pass.OUTPUT);
  return passes;
}
Program: 88553
Project: 88553
Buggy source:
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String fileName=className.replace('.','/') + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(fileName);
  if (file == null)   return null;
  return new JimpleClassSource(className,file.inputStream());
}

Fixed version (ground truth):
/** 
 * Look for the specified class. Return a ClassSource for it if found, or null if it was not found. 
 */
public ClassSource find(String className){
  String fileName=className + "String_Node_Str";
  SourceLocator.FoundFile file=SourceLocator.v().lookupInClassPath(fileName);
  if (file == null)   return null;
  return new JimpleClassSource(className,file.inputStream());
}
Program: 88555
Project: 88555
Buggy source:
private int getLocalClassNum(String realName,String simpleName){
  int dIndex=realName.indexOf("String_Node_Str");
  int nIndex=realName.indexOf(simpleName,dIndex);
  if (nIndex == -1)   return NO_MATCH;
  if (dIndex == -1) {
    throw new RuntimeException("String_Node_Str" + realName);
  }
  return (new Integer(realName.substring(dIndex + 1,nIndex))).intValue();
}

Fixed version (ground truth):
private int getLocalClassNum(String realName,String simpleName){
  int dIndex=realName.indexOf("String_Node_Str");
  int nIndex=realName.indexOf(simpleName,dIndex);
  if (nIndex == -1)   return NO_MATCH;
  if (dIndex == -1) {
    throw new RuntimeException("String_Node_Str" + realName);
  }
  String numString=realName.substring(dIndex + 1,nIndex);
  for (int i=0; i < numString.length(); i++) {
    if (!Character.isDigit(numString.charAt(i)))     return NO_MATCH;
  }
  return (new Integer(numString)).intValue();
}
Program: 88557
Project: 88557
Buggy source:
/** 
 * adds any needed static field inits
 */
private void handleStaticFieldInits(soot.SootMethod sootMethod){
  ArrayList staticFieldInits=((soot.javaToJimple.PolyglotMethodSource)sootMethod.getSource()).getStaticFieldInits();
  if (staticFieldInits != null) {
    Iterator staticFieldInitsIt=staticFieldInits.iterator();
    while (staticFieldInitsIt.hasNext()) {
      polyglot.ast.FieldDecl field=(polyglot.ast.FieldDecl)staticFieldInitsIt.next();
      String fieldName=field.name();
      polyglot.ast.Expr initExpr=field.init();
      soot.SootClass currentClass=body.getMethod().getDeclaringClass();
      soot.SootFieldRef sootField=soot.Scene.v().makeFieldRef(currentClass,fieldName,Util.getSootType(field.type().type()),field.flags().isStatic());
      soot.jimple.FieldRef fieldRef=soot.jimple.Jimple.v().newStaticFieldRef(sootField);
      soot.Value sootExpr;
      if (initExpr instanceof polyglot.ast.ArrayInit) {
        sootExpr=getArrayInitLocal((polyglot.ast.ArrayInit)initExpr,field.type().type());
      }
 else {
        sootExpr=base().createExpr(initExpr);
      }
      soot.jimple.Stmt assign=soot.jimple.Jimple.v().newAssignStmt(fieldRef,sootExpr);
      body.getUnits().add(assign);
      Util.addLnPosTags(assign,initExpr.position());
    }
  }
}

Fixed version (ground truth):
/** 
 * adds any needed static field inits
 */
private void handleStaticFieldInits(soot.SootMethod sootMethod){
  ArrayList staticFieldInits=((soot.javaToJimple.PolyglotMethodSource)sootMethod.getSource()).getStaticFieldInits();
  if (staticFieldInits != null) {
    Iterator staticFieldInitsIt=staticFieldInits.iterator();
    while (staticFieldInitsIt.hasNext()) {
      polyglot.ast.FieldDecl field=(polyglot.ast.FieldDecl)staticFieldInitsIt.next();
      String fieldName=field.name();
      polyglot.ast.Expr initExpr=field.init();
      soot.SootClass currentClass=body.getMethod().getDeclaringClass();
      soot.SootFieldRef sootField=soot.Scene.v().makeFieldRef(currentClass,fieldName,Util.getSootType(field.type().type()),field.flags().isStatic());
      soot.jimple.FieldRef fieldRef=soot.jimple.Jimple.v().newStaticFieldRef(sootField);
      soot.Value sootExpr;
      if (initExpr instanceof polyglot.ast.ArrayInit) {
        sootExpr=getArrayInitLocal((polyglot.ast.ArrayInit)initExpr,field.type().type());
      }
 else {
        sootExpr=base().createExpr(initExpr);
        if (sootExpr instanceof soot.jimple.ConditionExpr) {
          sootExpr=handleCondBinExpr((soot.jimple.ConditionExpr)sootExpr);
        }
      }
      soot.jimple.Stmt assign=soot.jimple.Jimple.v().newAssignStmt(fieldRef,sootExpr);
      body.getUnits().add(assign);
      Util.addLnPosTags(assign,initExpr.position());
    }
  }
}
Program: 88559
Project: 88559
Buggy source:
public polyglot.ast.Node override(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.LocalClassDecl) {
    inners.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalClassDecl)n).decl().type()));
    return n;
  }
 else   if (n instanceof polyglot.ast.New) {
    if (((polyglot.ast.New)n).anonType() != null) {
      inners.add(new polyglot.util.IdentityKey(((polyglot.ast.New)n).anonType()));
      return n;
    }
  }
  return null;
}

Fixed version (ground truth):
public polyglot.ast.Node override(polyglot.ast.Node parent,polyglot.ast.Node n){
  if (n instanceof polyglot.ast.LocalClassDecl) {
    inners.add(new polyglot.util.IdentityKey(((polyglot.ast.LocalClassDecl)n).decl().type()));
    return null;
  }
 else   if (n instanceof polyglot.ast.New) {
    if (((polyglot.ast.New)n).anonType() != null) {
      inners.add(new polyglot.util.IdentityKey(((polyglot.ast.New)n).anonType()));
      return null;
    }
  }
  return null;
}
Program: 88560
Project: 88560
Buggy source:
public polyglot.ast.Node leave(polyglot.ast.Node old,polyglot.ast.Node n,polyglot.visit.NodeVisitor nodeVisitor){
  if (n instanceof polyglot.ast.MethodDecl) {
    polyglot.ast.MethodDecl decl=(polyglot.ast.MethodDecl)n;
    if (strict && !decl.flags().isAbstract() && !decl.flags().isStrictFP()) {
      System.out.println("String_Node_Str" + decl);
      decl=decl.flags(decl.flags().StrictFP());
      System.out.println("String_Node_Str" + decl);
      return decl;
    }
  }
  if (n instanceof polyglot.ast.ConstructorDecl) {
    polyglot.ast.ConstructorDecl decl=(polyglot.ast.ConstructorDecl)n;
    if (strict && !decl.flags().isAbstract() && !decl.flags().isStrictFP()) {
      return decl.flags(decl.flags().StrictFP());
    }
  }
  if (n instanceof polyglot.ast.LocalClassDecl) {
    polyglot.ast.LocalClassDecl decl=(polyglot.ast.LocalClassDecl)n;
    if (decl.decl().flags().isStrictFP()) {
      return decl.decl().flags(decl.decl().flags().clearStrictFP());
    }
  }
  if (n instanceof polyglot.ast.ClassDecl) {
    polyglot.ast.ClassDecl decl=(polyglot.ast.ClassDecl)n;
    if (decl.flags().isStrictFP()) {
      return decl.flags(decl.flags().clearStrictFP());
    }
  }
  return n;
}

Fixed version (ground truth):
public polyglot.ast.Node leave(polyglot.ast.Node old,polyglot.ast.Node n,polyglot.visit.NodeVisitor nodeVisitor){
  if (n instanceof polyglot.ast.MethodDecl) {
    polyglot.ast.MethodDecl decl=(polyglot.ast.MethodDecl)n;
    if (strict && !decl.flags().isAbstract() && !decl.flags().isStrictFP()) {
      decl=decl.flags(decl.flags().StrictFP());
      return decl;
    }
  }
  if (n instanceof polyglot.ast.ConstructorDecl) {
    polyglot.ast.ConstructorDecl decl=(polyglot.ast.ConstructorDecl)n;
    if (strict && !decl.flags().isAbstract() && !decl.flags().isStrictFP()) {
      return decl.flags(decl.flags().StrictFP());
    }
  }
  if (n instanceof polyglot.ast.LocalClassDecl) {
    polyglot.ast.LocalClassDecl decl=(polyglot.ast.LocalClassDecl)n;
    if (decl.decl().flags().isStrictFP()) {
      return decl.decl().flags(decl.decl().flags().clearStrictFP());
    }
  }
  if (n instanceof polyglot.ast.ClassDecl) {
    polyglot.ast.ClassDecl decl=(polyglot.ast.ClassDecl)n;
    if (decl.flags().isStrictFP()) {
      return decl.flags(decl.flags().clearStrictFP());
    }
  }
  return n;
}
Program: 88561
Project: 88561
Buggy source:
private static soot.Local getLocalOfType(soot.Body body,soot.Type type){
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  Iterator it=body.getLocals().iterator();
  soot.Local correctLocal=null;
  while (it.hasNext()) {
    soot.Local l=(soot.Local)it.next();
    if (l.getType().equals(type)) {
      correctLocal=l;
    }
  }
  return correctLocal;
}

Fixed version (ground truth):
private static soot.Local getLocalOfType(soot.Body body,soot.Type type){
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  Iterator it=body.getLocals().iterator();
  soot.Local correctLocal=null;
  while (it.hasNext()) {
    soot.Local l=(soot.Local)it.next();
    if (fh.canStoreType(type,l.getType())) {
      correctLocal=l;
    }
  }
  return correctLocal;
}
Program: 88562
Project: 88562
Buggy source:
private static boolean bodyHasLocal(soot.Body body,soot.Type type){
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  Iterator it=body.getDefBoxes().iterator();
  while (it.hasNext()) {
    soot.ValueBox vb=(soot.ValueBox)it.next();
    if ((vb.getValue() instanceof soot.Local) && (vb.getValue().getType().equals(type))) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private static boolean bodyHasLocal(soot.Body body,soot.Type type){
  soot.FastHierarchy fh=InitialResolver.v().hierarchy();
  Iterator it=body.getDefBoxes().iterator();
  while (it.hasNext()) {
    soot.ValueBox vb=(soot.ValueBox)it.next();
    if ((vb.getValue() instanceof soot.Local) && (fh.canStoreType(type,vb.getValue().getType()))) {
      return true;
    }
  }
  return false;
}
Program: 88563
Project: 88563
Buggy source:
public OnFlyCallGraph(PAG pag){
  this.pag=pag;
  callGraph=new CallGraph();
  Scene.v().setCallGraph(callGraph);
  ContextManager cm=CallGraphBuilder.makeContextManager(callGraph);
  reachableMethods=Scene.v().getReachableMethods();
  ofcgb=new OnFlyCallGraphBuilder(cm,reachableMethods);
  reachablesReader=reachableMethods.listener();
  callEdges=cm.callGraph().listener();
}

Fixed version (ground truth):
public OnFlyCallGraph(PAG pag){
  this.pag=pag;
  CGOptions options=new CGOptions(PhaseOptions.v().getPhaseOptions("String_Node_Str"));
  if (options.all_reachable()) {
    List entryPoints=new ArrayList();
    entryPoints.addAll(EntryPoints.v().all());
    entryPoints.addAll(EntryPoints.v().methodsOfApplicationClasses());
    Scene.v().setEntryPoints(entryPoints);
  }
  callGraph=new CallGraph();
  Scene.v().setCallGraph(callGraph);
  ContextManager cm=CallGraphBuilder.makeContextManager(callGraph);
  reachableMethods=Scene.v().getReachableMethods();
  ofcgb=new OnFlyCallGraphBuilder(cm,reachableMethods);
  reachablesReader=reachableMethods.listener();
  callEdges=cm.callGraph().listener();
}
Program: 88565
Project: 88565
Buggy source:
protected soot.Local generateLocal(soot.Type sootType){
  return ext().generateLocal(sootType);
}

Fixed version (ground truth):
protected soot.Local generateLocal(polyglot.types.Type polyglotType){
  return ext().generateLocal(polyglotType);
}
Program: 88566
Project: 88566
Buggy source:
protected soot.Value createExpr(polyglot.ast.Expr expr){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    return ext().createExpr(accessField.field());
  }
 else {
    return ext().createExpr(expr);
  }
}

Fixed version (ground truth):
protected soot.Value createExpr(polyglot.ast.Expr expr){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    return handleCall(accessField.field(),accessField.getMeth(),null,null);
  }
 else {
    return ext().createExpr(expr);
  }
}
Program: 88567
Project: 88567
Buggy source:
protected soot.Local handlePrivateFieldAssignSet(polyglot.ast.Assign assign){
  if ((assign.left() instanceof soot.javaToJimple.jj.ast.JjAccessField_c) && (assign.operator() != polyglot.ast.Assign.ASSIGN)) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)assign.left();
    soot.Local leftLocal=(soot.Local)base().createExpr(accessField.getMeth());
    soot.Value right=base().getAssignRightLocal(assign,leftLocal);
    return base().handlePrivateFieldSet(accessField,right);
  }
 else {
    return ext().handlePrivateFieldAssignSet(assign);
  }
}

Fixed version (ground truth):
protected soot.Local handlePrivateFieldAssignSet(polyglot.ast.Assign assign){
  if (assign.left() instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)assign.left();
    if (assign.operator() == polyglot.ast.Assign.ASSIGN) {
      soot.Value right=base().getSimpleAssignRightLocal(assign);
      return base().handlePrivateFieldSet(accessField,right);
    }
 else {
      soot.Local baseLocal=(soot.Local)base().getBaseLocal(accessField.field().target());
      soot.Local leftLocal=handleCall(accessField.field(),accessField.getMeth(),null,baseLocal);
      soot.Value right=base().getAssignRightLocal(assign,leftLocal);
      return handleFieldSet(accessField,right,baseLocal);
    }
  }
 else {
    return ext().handlePrivateFieldAssignSet(assign);
  }
}
Program: 88568
Project: 88568
Buggy source:
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    soot.SootMethodRef methToCall=base().getSootMethodRef(accessField.setMeth());
    ArrayList params=new ArrayList();
    if (!accessField.field().flags().isStatic()) {
      params.add(base().getThis(Util.getSootType(accessField.field().target().type())));
    }
    if (right != null) {
      params.add(right);
    }
    soot.jimple.InvokeExpr invoke;
    if (methToCall.isStatic()) {
      invoke=soot.jimple.Jimple.v().newStaticInvokeExpr(methToCall,params);
    }
 else {
      soot.Local baseLocal=(soot.Local)ext().getBaseLocal((polyglot.ast.Receiver)accessField.setMeth().target());
      invoke=soot.jimple.Jimple.v().newVirtualInvokeExpr(baseLocal,methToCall,params);
    }
    soot.Local retLocal=base().generateLocal(right.getType());
    soot.jimple.AssignStmt assignStmt=soot.jimple.Jimple.v().newAssignStmt(retLocal,invoke);
    body.getUnits().add(assignStmt);
    return retLocal;
  }
 else {
    return ext().handlePrivateFieldSet(expr,right);
  }
}

Fixed version (ground truth):
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    return handleCall(accessField.field(),accessField.setMeth(),right,null);
  }
 else {
    return ext().handlePrivateFieldSet(expr,right);
  }
}
Program: 88572
Project: 88572
Buggy source:
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    soot.SootMethodRef methToCall=base().getSootMethodRef(accessField.setMeth());
    ArrayList params=new ArrayList();
    if (!accessField.field().flags().isStatic()) {
      params.add(base().getThis(Util.getSootType(accessField.field().target().type())));
    }
    params.add(right);
    soot.jimple.InvokeExpr invoke;
    if (methToCall.isStatic()) {
      invoke=soot.jimple.Jimple.v().newStaticInvokeExpr(methToCall,params);
    }
 else {
      soot.Local baseLocal=(soot.Local)ext().getBaseLocal((polyglot.ast.Receiver)accessField.setMeth().target());
      invoke=soot.jimple.Jimple.v().newVirtualInvokeExpr(baseLocal,methToCall,params);
    }
    soot.Local retLocal=base().generateLocal(right.getType());
    soot.jimple.AssignStmt assignStmt=soot.jimple.Jimple.v().newAssignStmt(retLocal,invoke);
    body.getUnits().add(assignStmt);
    return retLocal;
  }
 else {
    return ext().handlePrivateFieldSet(expr,right);
  }
}

Fixed version (ground truth):
protected soot.Local handlePrivateFieldSet(polyglot.ast.Expr expr,soot.Value right){
  if (expr instanceof soot.javaToJimple.jj.ast.JjAccessField_c) {
    soot.javaToJimple.jj.ast.JjAccessField_c accessField=(soot.javaToJimple.jj.ast.JjAccessField_c)expr;
    soot.SootMethodRef methToCall=base().getSootMethodRef(accessField.setMeth());
    ArrayList params=new ArrayList();
    if (!accessField.field().flags().isStatic()) {
      params.add(base().getThis(Util.getSootType(accessField.field().target().type())));
    }
    if (right != null) {
      params.add(right);
    }
    soot.jimple.InvokeExpr invoke;
    if (methToCall.isStatic()) {
      invoke=soot.jimple.Jimple.v().newStaticInvokeExpr(methToCall,params);
    }
 else {
      soot.Local baseLocal=(soot.Local)ext().getBaseLocal((polyglot.ast.Receiver)accessField.setMeth().target());
      invoke=soot.jimple.Jimple.v().newVirtualInvokeExpr(baseLocal,methToCall,params);
    }
    soot.Local retLocal=base().generateLocal(right.getType());
    soot.jimple.AssignStmt assignStmt=soot.jimple.Jimple.v().newAssignStmt(retLocal,invoke);
    body.getUnits().add(assignStmt);
    return retLocal;
  }
 else {
    return ext().handlePrivateFieldSet(expr,right);
  }
}
Program: 88575
Project: 88575
Buggy source:
public void caseFieldPutInst(FieldPutInst i){
  emit("String_Node_Str" + slashify(i.getField().getDeclaringClass().getName()) + "String_Node_Str"+ i.getField().getName()+ "String_Node_Str"+ jasminDescriptorOf(i.getField().getType()));
}

Fixed version (ground truth):
public void caseFieldPutInst(FieldPutInst i){
  emit("String_Node_Str" + slashify(i.getFieldRef().declaringClass().getName()) + "String_Node_Str"+ i.getFieldRef().name()+ "String_Node_Str"+ jasminDescriptorOf(i.getFieldRef().type()));
}
Program: 88576
Project: 88576
Buggy source:
public void caseStaticGetInst(StaticGetInst i){
  SootField field=i.getField();
  emit("String_Node_Str" + slashify(field.getDeclaringClass().getName()) + "String_Node_Str"+ field.getName()+ "String_Node_Str"+ jasminDescriptorOf(field.getType()));
}

Fixed version (ground truth):
public void caseStaticGetInst(StaticGetInst i){
  SootFieldRef field=i.getFieldRef();
  emit("String_Node_Str" + slashify(field.declaringClass().getName()) + "String_Node_Str"+ field.name()+ "String_Node_Str"+ jasminDescriptorOf(field.type()));
}
Program: 88577
Project: 88577
Buggy source:
public void caseStaticPutInst(StaticPutInst i){
  emit("String_Node_Str" + slashify(i.getField().getDeclaringClass().getName()) + "String_Node_Str"+ i.getField().getName()+ "String_Node_Str"+ jasminDescriptorOf(i.getField().getType()));
}

Fixed version (ground truth):
public void caseStaticPutInst(StaticPutInst i){
  emit("String_Node_Str" + slashify(i.getFieldRef().declaringClass().getName()) + "String_Node_Str"+ i.getFieldRef().name()+ "String_Node_Str"+ jasminDescriptorOf(i.getFieldRef().type()));
}
Program: 88578
Project: 88578
Buggy source:
public void caseFieldGetInst(FieldGetInst i){
  emit("String_Node_Str" + slashify(i.getField().getDeclaringClass().getName()) + "String_Node_Str"+ i.getField().getName()+ "String_Node_Str"+ jasminDescriptorOf(i.getField().getType()));
}

Fixed version (ground truth):
public void caseFieldGetInst(FieldGetInst i){
  emit("String_Node_Str" + slashify(i.getFieldRef().declaringClass().getName()) + "String_Node_Str"+ i.getFieldRef().name()+ "String_Node_Str"+ jasminDescriptorOf(i.getFieldRef().type()));
}
Program: 88579
Project: 88579
Buggy source:
/** 
 * creates a field ref
 */
private soot.jimple.FieldRef getFieldRef(polyglot.ast.Field field){
  soot.SootClass receiverClass=((soot.RefType)Util.getSootType(field.fieldInstance().container())).getSootClass();
  soot.SootFieldRef receiverField=soot.Scene.v().makeFieldRef(receiverClass,field.name(),Util.getSootType(field.type()),field.flags().isStatic());
  soot.jimple.FieldRef fieldRef;
  if (field.fieldInstance().flags().isStatic()) {
    fieldRef=soot.jimple.Jimple.v().newStaticFieldRef(receiverField);
  }
 else {
    soot.Local base;
    base=(soot.Local)getBaseLocal(field.target());
    fieldRef=soot.jimple.Jimple.v().newInstanceFieldRef(base,receiverField);
  }
  if (field.target() instanceof polyglot.ast.Local && fieldRef instanceof soot.jimple.InstanceFieldRef) {
    Util.addLnPosTags(((soot.jimple.InstanceFieldRef)fieldRef).getBaseBox(),field.target().position());
  }
  return fieldRef;
}

Fixed version (ground truth):
/** 
 * creates a field ref
 */
private soot.jimple.FieldRef getFieldRef(polyglot.ast.Field field){
  soot.SootClass receiverClass=((soot.RefType)Util.getSootType(field.target().type())).getSootClass();
  soot.SootFieldRef receiverField=soot.Scene.v().makeFieldRef(receiverClass,field.name(),Util.getSootType(field.type()),field.flags().isStatic());
  soot.jimple.FieldRef fieldRef;
  if (field.fieldInstance().flags().isStatic()) {
    fieldRef=soot.jimple.Jimple.v().newStaticFieldRef(receiverField);
  }
 else {
    soot.Local base;
    base=(soot.Local)getBaseLocal(field.target());
    fieldRef=soot.jimple.Jimple.v().newInstanceFieldRef(base,receiverField);
  }
  if (field.target() instanceof polyglot.ast.Local && fieldRef instanceof soot.jimple.InstanceFieldRef) {
    Util.addLnPosTags(((soot.jimple.InstanceFieldRef)fieldRef).getBaseBox(),field.target().position());
  }
  return fieldRef;
}