Program: 147308
Project: 147308
Buggy source:
protected Conditional<Instruction> put1(FeatureExpr ctx,ThreadInfo ti,StackFrame frame,ElementInfo eiFieldOwner,boolean initStatic){
  Object attr=frame.getOperandAttr(ctx);
  Conditional<Integer> val;
  Conditional<Integer> field=eiFieldOwner.get1SlotField(fi);
  if (initStatic) {
    val=frame.peek(ctx);
  }
 else {
    if (Conditional.isTautology(ctx)) {
      val=frame.peek(ctx);
    }
 else {
      val=ChoiceFactory.create(ctx,frame.peek(ctx),field).simplify();
    }
  }
  lastValue=val;
  if ((!field.simplify(ctx).equals(val.simplify(ctx))) || (eiFieldOwner.getFieldAttr(fi) != attr)) {
    coverField(ctx,eiFieldOwner,val,field,frame,ti);
    eiFieldOwner=eiFieldOwner.getModifiableInstance();
    if (fi.isReference()) {
      if (initStatic) {
        eiFieldOwner.setReferenceField(FeatureExprFactory.True(),fi,val);
      }
 else {
        eiFieldOwner.setReferenceField(ctx,fi,val);
      }
      eiFieldOwner.setFieldAttr(fi,attr);
      if (ti.useBreakOnExposure()) {
        if (ti.isFirstStepInsn()) {
          ElementInfo eiFieldValue=ti.getElementInfo(val.getValue());
          if ((eiFieldValue != null) && !eiFieldValue.isExposed() && !eiFieldValue.isReferencedBySameThreads(eiFieldOwner)) {
            eiFieldValue.setExposed(ti,eiFieldOwner);
            if (createAndSetSharedObjectExposureCG(eiFieldValue,ti)) {
              return new One<Instruction>(this);
            }
          }
        }
      }
    }
 else {
      eiFieldOwner.set1SlotField(ctx,fi,val);
      eiFieldOwner.setFieldAttr(fi,attr);
    }
  }
  frame=ti.getModifiableTopFrame();
  popOperands1(ctx,frame);
  return getNext(ctx,ti);
}

Fixed version (ground truth):
protected Conditional<Instruction> put1(FeatureExpr ctx,ThreadInfo ti,StackFrame frame,ElementInfo eiFieldOwner,boolean initStatic){
  Object attr=frame.getOperandAttr(ctx);
  Conditional<Integer> val;
  Conditional<Integer> field=eiFieldOwner.get1SlotField(fi);
  if (initStatic) {
    val=frame.peek(ctx);
  }
 else {
    if (Conditional.isTautology(ctx)) {
      val=frame.peek(ctx);
    }
 else {
      val=ChoiceFactory.create(ctx,frame.peek(ctx),field).simplify();
    }
  }
  lastValue=val;
  if ((!field.simplify(ctx).equals(val.simplify(ctx))) || (eiFieldOwner.getFieldAttr(fi) != attr)) {
    coverField(ctx,eiFieldOwner,val,field,frame,ti);
    eiFieldOwner=eiFieldOwner.getModifiableInstance();
    if (fi.isReference()) {
      if (initStatic) {
        eiFieldOwner.setReferenceField(FeatureExprFactory.True(),fi,val);
      }
 else {
        eiFieldOwner.setReferenceField(ctx,fi,val);
      }
      eiFieldOwner.setFieldAttr(fi,attr);
      if (ti.useBreakOnExposure()) {
        if (ti.isFirstStepInsn()) {
          ElementInfo eiFieldValue=ti.getElementInfo(val.simplify(ctx).getValue());
          if ((eiFieldValue != null) && !eiFieldValue.isExposed() && !eiFieldValue.isReferencedBySameThreads(eiFieldOwner)) {
            eiFieldValue.setExposed(ti,eiFieldOwner);
            if (createAndSetSharedObjectExposureCG(eiFieldValue,ti)) {
              return new One<Instruction>(this);
            }
          }
        }
      }
    }
 else {
      eiFieldOwner.set1SlotField(ctx,fi,val);
      eiFieldOwner.setFieldAttr(fi,attr);
    }
  }
  frame=ti.getModifiableTopFrame();
  popOperands1(ctx,frame);
  return getNext(ctx,ti);
}