nus-yam/ex-repair huggingface dataset:
Program: 147276
Project: 147276
Buggy source:
@Override public void pushLongLocal(FeatureExpr ctx,int index){
  Conditional<Entry> entry=locals[index];
  if (entry == null) {
    entry=new One<>(new Entry(0,false));
  }
  push(ctx,entry.mapf(ctx,new BiFunction<FeatureExpr,Entry,Conditional<Integer>>(){
    @Override public One<Integer> apply(    final FeatureExpr ctx,    final Entry entry){
      return new One<>(entry.value);
    }
  }
),false);
  entry=locals[index + 1];
  if (entry == null) {
    entry=new One<>(new Entry(0,false));
  }
  push(ctx,entry.mapf(ctx,new BiFunction<FeatureExpr,Entry,Conditional<Integer>>(){
    @Override public One<Integer> apply(    final FeatureExpr ctx,    final Entry entry){
      return new One<>(entry.value);
    }
  }
),false);
}

Fixed version (ground truth):
@Override public void pushLongLocal(FeatureExpr ctx,int index){
  Conditional<Entry> entry=locals[index];
  if (entry == null) {
    entry=new One<>(new Entry(0,false));
  }
  push(ctx,entry.mapf(ctx,(BiFunction<FeatureExpr,Entry,Conditional<Integer>>)(ctx1,entry1) -> new One<>(entry1.value)),false);
  entry=locals[index + 1];
  if (entry == null) {
    entry=new One<>(new Entry(0,false));
  }
  push(ctx,entry.mapf(ctx,(BiFunction<FeatureExpr,Entry,Conditional<Integer>>)(ctx1,entry1) -> new One<>(entry1.value)),false);
}
Program: 147277
Project: 147277
Buggy source:
@Override public void pushLocal(FeatureExpr ctx,int index){
  Conditional<Entry> value=locals[index].simplify(ctx);
  if (value == null) {
    value=new One<>(Entry.create(MJIEnv.NULL,false));
  }
  Boolean isRef=null;
  for (  Entry v : value.toList()) {
    if (isRef == null) {
      isRef=v.isRef;
    }
 else     if (isRef != v.isRef) {
      debufferAll();
      value.mapf(ctx,new BiFunction<FeatureExpr,Entry,Conditional<Object>>(){
        @Override public Conditional<Object> apply(        final FeatureExpr ctx,        final Entry entry){
          push(ctx,entry.value,entry.isRef);
          return null;
        }
      }
);
      return;
    }
  }
  Conditional<Integer> pushValue=value.map(new Function<Entry,Integer>(){
    @Override public Integer apply(    Entry x){
      return x.value;
    }
  }
);
  if (buffer.isEmpty()) {
    bufferCTX=ctx;
    addToBuffer((pushValue),isRef);
    return;
  }
  if (Conditional.equivalentTo(bufferCTX,ctx)) {
    addToBuffer((pushValue),isRef);
    return;
  }
 else {
    debufferAll();
    bufferCTX=ctx;
    addToBuffer((pushValue),isRef);
    return;
  }
}

Fixed version (ground truth):
@Override public void pushLocal(FeatureExpr ctx,int index){
  Conditional<Entry> value=locals[index].simplify(ctx);
  if (value == null) {
    value=new One<>(Entry.create(MJIEnv.NULL,false));
  }
  Boolean isRef=null;
  for (  Entry v : value.toList()) {
    if (isRef == null) {
      isRef=v.isRef;
    }
 else     if (isRef != v.isRef) {
      debufferAll();
      value.mapf(ctx,(BiFunction<FeatureExpr,Entry,Conditional<Object>>)(ctx1,entry) -> {
        push(ctx1,entry.value,entry.isRef);
        return null;
      }
);
      return;
    }
  }
  Conditional<Integer> pushValue=value.map(x -> x.value);
  if (buffer.isEmpty()) {
    bufferCTX=ctx;
    addToBuffer((pushValue),isRef);
    return;
  }
  if (Conditional.equivalentTo(bufferCTX,ctx)) {
    addToBuffer((pushValue),isRef);
    return;
  }
 else {
    debufferAll();
    bufferCTX=ctx;
    addToBuffer((pushValue),isRef);
    return;
  }
}
Program: 147278
Project: 147278
Buggy source:
@Override public Conditional<Integer> getTop(){
  if (!buffer.isEmpty()) {
    int size=-1;
    for (    Tuple entry : buffer) {
      Conditional value=entry.value;
      if (value.getValue(true) instanceof Integer) {
        size++;
        continue;
      }
      if (value.getValue(true) instanceof Float) {
        size++;
        continue;
      }
      if (value.getValue(true) instanceof Long) {
        size+=2;
        continue;
      }
      if (value.getValue(true) instanceof Double) {
        size+=2;
        continue;
      }
    }
    Conditional<Integer> stackTop=super.getTop();
    if (stackTop.equals(One.valueOf(-1))) {
      if (Conditional.isTautology(bufferCTX)) {
        return One.valueOf(size);
      }
      return ChoiceFactory.create(bufferCTX,new One<>(size),new One<>(-1));
    }
    final int finalSize=size;
    return stackTop.mapf(FeatureExprFactory.True(),new BiFunction<FeatureExpr,Integer,Conditional<Integer>>(){
      @Override public Conditional<Integer> apply(      FeatureExpr ctx,      Integer y){
        FeatureExpr context=Conditional.and(bufferCTX,ctx);
        if (Conditional.isContradiction(context)) {
          return One.valueOf(y);
        }
        return ChoiceFactory.create(context,new One<>(y + finalSize + 1),new One<>(y));
      }
    }
).simplify();
  }
  return super.getTop();
}

Fixed version (ground truth):
@Override public Conditional<Integer> getTop(){
  if (!buffer.isEmpty()) {
    int size=-1;
    for (    Tuple entry : buffer) {
      Conditional value=entry.value;
      if (value.getValue(true) instanceof Integer) {
        size++;
        continue;
      }
      if (value.getValue(true) instanceof Float) {
        size++;
        continue;
      }
      if (value.getValue(true) instanceof Long) {
        size+=2;
        continue;
      }
      if (value.getValue(true) instanceof Double) {
        size+=2;
        continue;
      }
    }
    Conditional<Integer> stackTop=super.getTop();
    if (stackTop.equals(One.valueOf(-1))) {
      if (Conditional.isTautology(bufferCTX)) {
        return One.valueOf(size);
      }
      return ChoiceFactory.create(bufferCTX,new One<>(size),new One<>(-1));
    }
    final int finalSize=size;
    return stackTop.mapf(FeatureExprFactory.True(),(ctx,y) -> {
      FeatureExpr context=Conditional.and(bufferCTX,ctx);
      if (Conditional.isContradiction(context)) {
        return One.valueOf(y);
      }
      return ChoiceFactory.create(context,new One<>(y + finalSize + 1),new One<>(y));
    }
).simplify();
  }
  return super.getTop();
}
Program: 147279
Project: 147279
Buggy source:
@Override public Conditional<Integer> apply(FeatureExpr ctx,Integer y){
  FeatureExpr context=Conditional.and(bufferCTX,ctx);
  if (Conditional.isContradiction(context)) {
    return One.valueOf(y);
  }
  return ChoiceFactory.create(context,new One<>(y + finalSize + 1),new One<>(y));
}

Fixed version (ground truth):
@Override public Entry apply(Number x){
  if (x instanceof Float) {
    return Entry.create(Types.floatToInt((Float)x),entry.isRef);
  }
  return Entry.create(x.intValue(),entry.isRef);
}
Program: 147282
Project: 147282
Buggy source:
@Override public Conditional<Integer> getTop(){
  if (!buffer.isEmpty()) {
    int size=-1;
    for (    Tuple entry : buffer) {
      size+=entry.size;
    }
    Conditional<Integer> stackTop=stackHandler.getTop();
    if (stackTop.equals(One.valueOf(-1))) {
      if (Conditional.isTautology(bufferCTX)) {
        return One.valueOf(size);
      }
      return ChoiceFactory.create(bufferCTX,new One<>(size),new One<>(-1)).simplify(stackHandler.stackCTX);
    }
    final int finalSize=size;
    return stackTop.mapf(FeatureExprFactory.True(),(ctx,y) -> {
      FeatureExpr context=Conditional.and(bufferCTX,ctx);
      if (Conditional.isContradiction(context)) {
        return One.valueOf(y);
      }
      return ChoiceFactory.create(context,new One<>(y + finalSize + 1),new One<>(y));
    }
).simplify(stackHandler.stackCTX);
  }
  return stackHandler.getTop();
}

Fixed version (ground truth):
@Override public Conditional<Integer> getTop(){
  if (!buffer.isEmpty()) {
    int size=-1;
    for (    Tuple entry : buffer) {
      size+=entry.size;
    }
    Conditional<Integer> stackTop=stackHandler.getTop();
    if (stackTop.equals(One.valueOf(-1))) {
      if (Conditional.isTautology(bufferCTX)) {
        return One.valueOf(size);
      }
      return ChoiceFactory.create(bufferCTX,new One<>(size),new One<>(-1)).simplify(stackHandler.stackCTX);
    }
    final int finalSize=size;
    return stackTop.mapf(FeatureExprFactory.True(),(ctx,y) -> {
      FeatureExpr context=Conditional.and(bufferCTX,ctx);
      if (Conditional.isContradiction(context)) {
        return One.valueOf(y);
      }
      return ChoiceFactory.create(context,new One<>(y + finalSize),new One<>(y));
    }
).simplify(stackHandler.stackCTX);
  }
  return stackHandler.getTop();
}
Program: 147283
Project: 147283
Buggy source:
@Override public void dup_x2(FeatureExpr ctx){
  if (!buffer.isEmpty()) {
    if (Conditional.equivalentTo(bufferCTX,ctx)) {
      if (buffer.size() >= 2) {
        if (buffer.get(1).getSize() == 2) {
          buffer.add(2,buffer.peek());
          return;
        }
 else         if (buffer.size() >= 3) {
          buffer.add(3,buffer.peek());
          return;
        }
      }
    }
    debufferAll();
  }
  stackHandler.dup_x2(ctx);
}

Fixed version (ground truth):
@Override public void dup_x2(FeatureExpr ctx){
  if (!buffer.isEmpty()) {
    if (Conditional.equivalentTo(bufferCTX,ctx)) {
      if (buffer.size() >= 2) {
        if (buffer.peek().size == 1) {
          if (buffer.get(1).getSize() == 2) {
            buffer.add(2,buffer.peek());
            return;
          }
 else           if (buffer.size() >= 3) {
            buffer.add(3,buffer.peek());
            return;
          }
        }
      }
    }
    debufferAll();
  }
  stackHandler.dup_x2(ctx);
}
Program: 147284
Project: 147284
Buggy source:
private void runDifferentialTest(final int seed){
  differentalTest(() -> {
    calls.clear();
    Random r=new Random(seed);
    IStackHandler sh=StackHandlerFactory.createStack(FeatureExprFactory.True(),10,15);
    List<Object> returnValues=new ArrayList<>(METHOD_CALLS);
    for (int j=0; j < METHOD_CALLS; j++) {
      Object applyStackOp=applyStackOp(sh,r);
      returnValues.add(applyStackOp);
      if (applyStackOp instanceof Exception) {
        break;
      }
    }
    return returnValues;
  }
);
}

Fixed version (ground truth):
private void runDifferentialTest(final int seed){
  differentalTest(() -> {
    calls.clear();
    Random r=new Random(seed);
    IStackHandler sh=StackHandlerFactory.createStack(FeatureExprFactory.True(),10,20);
    List<Object> returnValues=new ArrayList<>(METHOD_CALLS);
    for (int j=0; j < METHOD_CALLS; j++) {
      Object applyStackOp=applyStackOp(sh,r);
      returnValues.add(applyStackOp);
      if (applyStackOp instanceof Exception) {
        break;
      }
    }
    return returnValues;
  }
);
}
Program: 147285
Project: 147285
Buggy source:
public static void main(String[] args){
  try {
    new RandomDifferentialStackTest().runDifferentialTest(95521);
  }
 catch (  Throwable e) {
    for (    String call : calls) {
      System.out.println(call);
    }
    throw e;
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  try {
    new RandomDifferentialStackTest().runDifferentialTest(22796);
  }
 catch (  Throwable e) {
    for (    String call : calls) {
      System.out.println(call);
    }
    throw e;
  }
}
Program: 147286
Project: 147286
Buggy source:
@MJI public Conditional<Character> charAt__I__C(final MJIEnv env,Conditional<Integer> objRef,final Conditional<Integer> index,FeatureExpr ctx){
  Conditional<char[]> data=objRef.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<char[]>>(){
    @Override public Conditional<char[]> apply(    FeatureExpr ctx,    Integer objRef){
      return env.getStringChars(objRef);
    }
  }
).simplify(ctx);
  return data.mapf(ctx,new BiFunction<FeatureExpr,char[],Conditional<Character>>(){
    @SuppressWarnings("String_Node_Str") @Override public Conditional<Character> apply(    FeatureExpr ctx,    final char[] data){
      if (Conditional.isContradiction(ctx)) {
        return (Conditional<Character>)One.NULL;
      }
      return index.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Character>>(){
        @Override public Conditional<Character> apply(        FeatureExpr ctx,        Integer index){
          if ((index < 0) || (index >= data.length)) {
            env.ti.createAndThrowException(ctx,StringIndexOutOfBoundsException.class.getName(),index.toString());
            return (Conditional<Character>)One.NULL;
          }
          return new One<>(data[index]);
        }
      }
);
    }
  }
).simplify();
}

Fixed version (ground truth):
@MJI public Conditional<Character> charAt__I__C(final MJIEnv env,Conditional<Integer> objRef,final Conditional<Integer> index,FeatureExpr ctx){
  Conditional<char[]> data=objRef.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<char[]>>(){
    @Override public Conditional<char[]> apply(    FeatureExpr ctx,    Integer objRef){
      return env.getStringChars(objRef);
    }
  }
).simplify(ctx);
  return data.mapf(ctx,new BiFunction<FeatureExpr,char[],Conditional<Character>>(){
    @SuppressWarnings("String_Node_Str") @Override public Conditional<Character> apply(    FeatureExpr ctx,    final char[] data){
      if (Conditional.isContradiction(ctx)) {
        return (Conditional<Character>)One.NULL;
      }
      return index.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Character>>(){
        @Override public Conditional<Character> apply(        FeatureExpr ctx,        Integer index){
          if (Conditional.isContradiction(ctx)) {
            return (Conditional<Character>)One.NULL;
          }
          if ((index < 0) || (index >= data.length)) {
            env.ti.createAndThrowException(ctx,StringIndexOutOfBoundsException.class.getName(),index.toString());
            return (Conditional<Character>)One.NULL;
          }
          return new One<>(data[index]);
        }
      }
);
    }
  }
).simplify();
}
Program: 147287
Project: 147287
Buggy source:
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  String compType=Types.getTypeName(type);
  if (Types.isReferenceSignature(type)) {
    try {
      ti.resolveReferencedClass(compType);
    }
 catch (    LoadOnJPFRequired lre) {
      return ti.getPC();
    }
  }
  String clsName="String_Node_Str" + type;
  ClassInfo ci=ClassLoaderInfo.getCurrentResolvedClassInfo(clsName);
  if (!ci.isRegistered()) {
    ci.registerClass(ctx,ti);
    ci.setInitialized();
  }
  final StackFrame frame=ti.getModifiableTopFrame();
  arrayLength=frame.pop(ctx);
  final Conditional<Instruction> next=arrayLength.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    Integer arrayLength){
      if (arrayLength < 0) {
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str"));
      }
      Heap heap=ti.getHeap();
      if (heap.isOutOfMemory()) {
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str","String_Node_Str" + Types.getTypeName(type) + "String_Node_Str"+ arrayLength+ "String_Node_Str"));
      }
      ElementInfo eiArray=heap.newArray(ctx,type,arrayLength,ti);
      int aRef=eiArray.getObjectRef();
      pushValue=ChoiceFactory.create(ctx,One.valueOf(aRef),pushValue);
      return getNext(ctx,ti);
    }
  }
);
  frame.pushRef(ctx,pushValue);
  return next;
}

Fixed version (ground truth):
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  pushValue=One.valueOf(0);
  String compType=Types.getTypeName(type);
  if (Types.isReferenceSignature(type)) {
    try {
      ti.resolveReferencedClass(compType);
    }
 catch (    LoadOnJPFRequired lre) {
      return ti.getPC();
    }
  }
  String clsName="String_Node_Str" + type;
  ClassInfo ci=ClassLoaderInfo.getCurrentResolvedClassInfo(clsName);
  if (!ci.isRegistered()) {
    ci.registerClass(ctx,ti);
    ci.setInitialized();
  }
  final StackFrame frame=ti.getModifiableTopFrame();
  arrayLength=frame.pop(ctx);
  final Conditional<Instruction> next=arrayLength.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    Integer arrayLength){
      if (arrayLength < 0) {
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str"));
      }
      Heap heap=ti.getHeap();
      if (heap.isOutOfMemory()) {
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str","String_Node_Str" + Types.getTypeName(type) + "String_Node_Str"+ arrayLength+ "String_Node_Str"));
      }
      ElementInfo eiArray=heap.newArray(ctx,type,arrayLength,ti);
      int aRef=eiArray.getObjectRef();
      pushValue=ChoiceFactory.create(ctx,One.valueOf(aRef),pushValue);
      return getNext(ctx,ti);
    }
  }
);
  frame.pushRef(ctx,pushValue);
  return next;
}
Program: 147288
Project: 147288
Buggy source:
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  arrayRef=frame.pop(ctx);
  pushCtx=ctx;
  final Instruction thisInstruction=this;
  final Conditional<Instruction> next=arrayRef.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    Integer arrayRef){
      if (arrayRef == MJIEnv.NULL) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<Instruction>(new EXCEPTION(thisInstruction,"String_Node_Str","String_Node_Str"));
      }
      ElementInfo ei=ti.getElementInfo(arrayRef);
      pushValue=ChoiceFactory.create(ctx,ei.arrayLength(),pushValue);
      return getNext(ctx,ti);
    }
  }
);
  frame.push(pushCtx,pushValue);
  return next;
}

Fixed version (ground truth):
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  pushValue=One.valueOf(0);
  final StackFrame frame=ti.getModifiableTopFrame();
  arrayRef=frame.pop(ctx);
  pushCtx=ctx;
  final Instruction thisInstruction=this;
  final Conditional<Instruction> next=arrayRef.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    Integer arrayRef){
      if (arrayRef == MJIEnv.NULL) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<Instruction>(new EXCEPTION(thisInstruction,"String_Node_Str","String_Node_Str"));
      }
      ElementInfo ei=ti.getElementInfo(arrayRef);
      pushValue=ChoiceFactory.create(ctx,ei.arrayLength(),pushValue);
      return getNext(ctx,ti);
    }
  }
);
  frame.push(pushCtx,pushValue);
  return next;
}
Program: 147291
Project: 147291
Buggy source:
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Integer> v1=frame.pop(ctx);
  final Conditional<Integer> v2=frame.pop(ctx);
  final IDIV thisInstruction=this;
  pushCtx=ctx;
  final Conditional<Instruction> returnInstruction=v1.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Integer v1){
      if (v1 == 0) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<Instruction>(new EXCEPTION(thisInstruction,"String_Node_Str","String_Node_Str"));
      }
      pushValue=ChoiceFactory.create(ctx,v2.mapr(new Function<Integer,Conditional<Integer>>(){
        @Override public Conditional<Integer> apply(        Integer v2){
          return new One<>(v2.intValue() / v1.intValue());
        }
      }
),pushValue);
      return getNext(ctx,ti);
    }
  }
).simplify();
  frame.push(pushCtx,pushValue);
  return returnInstruction;
}

Fixed version (ground truth):
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  pushValue=One.valueOf(0);
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Integer> v1=frame.pop(ctx);
  final Conditional<Integer> v2=frame.pop(ctx);
  final IDIV thisInstruction=this;
  pushCtx=ctx;
  final Conditional<Instruction> returnInstruction=v1.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Integer v1){
      if (v1 == 0) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<Instruction>(new EXCEPTION(thisInstruction,"String_Node_Str","String_Node_Str"));
      }
      pushValue=ChoiceFactory.create(ctx,v2.mapr(new Function<Integer,Conditional<Integer>>(){
        @Override public Conditional<Integer> apply(        Integer v2){
          return new One<>(v2.intValue() / v1.intValue());
        }
      }
),pushValue);
      return getNext(ctx,ti);
    }
  }
).simplify();
  frame.push(pushCtx,pushValue);
  return returnInstruction;
}
Program: 147292
Project: 147292
Buggy source:
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Integer> v1=frame.pop(ctx);
  final Conditional<Integer> v2=frame.pop(ctx);
  final Instruction thisInstruction=this;
  pushCtx=ctx;
  final Conditional<Instruction> returnInstruction=v1.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Integer v1){
      if (v1 == 0) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<Instruction>(new EXCEPTION(thisInstruction,java.lang.ArithmeticException.class.getName(),"String_Node_Str"));
      }
      pushValue=ChoiceFactory.create(ctx,v2.mapr(new Function<Integer,Conditional<Integer>>(){
        @Override public Conditional<Integer> apply(        Integer v2){
          return new One<>(v2.intValue() % v1.intValue());
        }
      }
),pushValue);
      return getNext(ctx,ti);
    }
  }
);
  frame.push(pushCtx,pushValue);
  return returnInstruction;
}

Fixed version (ground truth):
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  pushValue=One.valueOf(0);
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Integer> v1=frame.pop(ctx);
  final Conditional<Integer> v2=frame.pop(ctx);
  final Instruction thisInstruction=this;
  pushCtx=ctx;
  final Conditional<Instruction> returnInstruction=v1.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Integer v1){
      if (v1 == 0) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<Instruction>(new EXCEPTION(thisInstruction,java.lang.ArithmeticException.class.getName(),"String_Node_Str"));
      }
      pushValue=ChoiceFactory.create(ctx,v2.mapr(new Function<Integer,Conditional<Integer>>(){
        @Override public Conditional<Integer> apply(        Integer v2){
          return new One<>(v2.intValue() % v1.intValue());
        }
      }
),pushValue);
      return getNext(ctx,ti);
    }
  }
);
  frame.push(pushCtx,pushValue);
  return returnInstruction;
}
Program: 147293
Project: 147293
Buggy source:
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  arrayLength=frame.pop(ctx);
  final Heap heap=ti.getHeap();
  pushCtx=ctx;
  final Conditional<Instruction> returnInstruction=arrayLength.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    Integer arrayLength){
      if (arrayLength < 0) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str"));
      }
      String clsName="String_Node_Str" + type;
      ClassInfo ci=ClassLoaderInfo.getCurrentResolvedClassInfo(clsName);
      if (!ci.isRegistered()) {
        ci.registerClass(ctx,ti);
        ci.setInitialized();
      }
      if (heap.isOutOfMemory()) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str","String_Node_Str" + getTypeName() + "String_Node_Str"+ arrayLength+ "String_Node_Str"));
      }
      ElementInfo eiArray=heap.newArray(ctx,type,arrayLength,ti);
      int arrayRef=eiArray.getObjectRef();
      pushRef=ChoiceFactory.create(ctx,One.valueOf(arrayRef),pushRef);
      return getNext(ctx,ti);
    }
  }
);
  frame.pushRef(pushCtx,pushRef);
  return returnInstruction;
}

Fixed version (ground truth):
public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  pushRef=One.valueOf(0);
  final StackFrame frame=ti.getModifiableTopFrame();
  arrayLength=frame.pop(ctx);
  final Heap heap=ti.getHeap();
  pushCtx=ctx;
  final Conditional<Instruction> returnInstruction=arrayLength.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    Integer arrayLength){
      if (arrayLength < 0) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str"));
      }
      String clsName="String_Node_Str" + type;
      ClassInfo ci=ClassLoaderInfo.getCurrentResolvedClassInfo(clsName);
      if (!ci.isRegistered()) {
        ci.registerClass(ctx,ti);
        ci.setInitialized();
      }
      if (heap.isOutOfMemory()) {
        pushCtx=pushCtx.andNot(ctx);
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str","String_Node_Str" + getTypeName() + "String_Node_Str"+ arrayLength+ "String_Node_Str"));
      }
      ElementInfo eiArray=heap.newArray(ctx,type,arrayLength,ti);
      int arrayRef=eiArray.getObjectRef();
      pushRef=ChoiceFactory.create(ctx,One.valueOf(arrayRef),pushRef);
      return getNext(ctx,ti);
    }
  }
);
  frame.pushRef(pushCtx,pushRef);
  return returnInstruction;
}
Program: 147296
Project: 147296
Buggy source:
public String getCauseDetails(){
  int causeRef=ei.getReferenceField("String_Node_Str").getValue();
  if (causeRef != MJIEnv.NULL) {
    ElementInfo eiCause=ti.getElementInfo(causeRef);
    int msgRef=eiCause.getReferenceField("String_Node_Str").getValue();
    if (msgRef != MJIEnv.NULL) {
      ElementInfo eiMsg=ti.getElementInfo(msgRef);
      return eiMsg.asString().getValue();
    }
  }
  return null;
}

Fixed version (ground truth):
public Conditional<String> getCauseDetails(FeatureExpr ctx){
  Conditional<Integer> causeRef=ei.getReferenceField("String_Node_Str").simplify(ctx).simplify(getCtx());
  return causeRef.mapf(ctx,new BiFunction<FeatureExpr,Integer,Conditional<String>>(){
    @SuppressWarnings("String_Node_Str") @Override public Conditional<String> apply(    FeatureExpr ctx,    Integer causeRef){
      if (causeRef != MJIEnv.NULL) {
        ElementInfo eiCause=ti.getElementInfo(causeRef);
        Conditional<Integer> msgRef=eiCause.getReferenceField("String_Node_Str").simplify(ctx).simplify(getCtx());
        return msgRef.mapf(ctx,(        FeatureExpr ctx1,        Integer msgRef1) -> {
          if (msgRef1 != MJIEnv.NULL) {
            ElementInfo eiMsg=ti.getElementInfo(msgRef1);
            return eiMsg.asString().simplify(ctx1).simplify(getCtx());
          }
          return (Conditional<String>)One.NULL;
        }
);
      }
      return (Conditional<String>)One.NULL;
    }
  }
);
}
Program: 147298
Project: 147298
Buggy source:
@MJI public long doubleToRawLongBits__D__J(MJIEnv env,int rcls,Conditional<Double> v0,FeatureExpr ctx){
  return Double.doubleToRawLongBits(v0.getValue());
}

Fixed version (ground truth):
@MJI public Conditional<Long> doubleToRawLongBits__D__J(MJIEnv env,int rcls,Conditional<Double> v0,FeatureExpr ctx){
  return v0.map(v -> Double.doubleToRawLongBits(v));
}
Program: 147301
Project: 147301
Buggy source:
public static void setFM(final String fmfile){
  cache.clear();
  features.clear();
  fm=(BDDFeatureModel)(fmfile.isEmpty() ? null : FeatureExprFactory.bdd().featureModelFactory().createFromDimacsFile(fmfile));
  if (fm != null) {
    createBDDFeatureModel();
  }
 else {
    bddFM=(BDDFeatureExpr)FeatureExprFactory.True();
  }
}

Fixed version (ground truth):
public static void setFM(final String fmfile){
  cache.clear();
  features.clear();
  fm=(BDDFeatureModel)(fmfile.isEmpty() ? null : FeatureExprFactory.bdd().featureModelFactory().createFromDimacsFile(fmfile));
  if (fm != null) {
    createBDDFeatureModel();
  }
 else {
    bddFM=(BDDFeatureExpr)FeatureExprFactory.bdd().True();
  }
}
Program: 147302
Project: 147302
Buggy source:
@Override public int getStackWidth(){
  debufferAll();
  return super.getStackWidth();
}

Fixed version (ground truth):
@Override public int getStackWidth(){
  return super.getStackWidth();
}
Program: 147303
Project: 147303
Buggy source:
@MJI public int newInstance___3Ljava_lang_Object_2__Ljava_lang_Object_2(MJIEnv env,int mthRef,int argsRef,FeatureExpr ctx){
  ThreadInfo ti=env.getThreadInfo();
  DirectCallStackFrame frame=ti.getReturnedDirectCall();
  MethodInfo miCallee=getMethodInfo(ctx,env,mthRef);
  if (miCallee.isPrivate()) {
    if (ti.getTopFrame().getPrevious().mi.ci != miCallee.ci) {
      env.throwException(ctx,IllegalAccessException.class.getName());
      return MJIEnv.NULL;
    }
  }
  if (frame == null) {
    ClassInfo ci=miCallee.getClassInfo();
    if (ci.isAbstract()) {
      env.throwException(ctx,"String_Node_Str");
      return MJIEnv.NULL;
    }
    int objRef=env.newObjectOfUncheckedClass(ctx,ci);
    frame=miCallee.createDirectCallStackFrame(ctx,ti,1);
    frame.setReflection();
    frame.setLocalReferenceVariable(ctx,0,objRef);
    int argOffset=frame.setReferenceArgument(ctx,0,objRef,null);
    if (!JPF_java_lang_reflect_Method.pushUnboxedArguments(env,miCallee,frame,argOffset,argsRef,ctx)) {
      return MJIEnv.NULL;
    }
    ti.pushFrame(frame);
    ci.pushRequiredClinits(ctx,ti);
    env.repeatInvocation();
    return MJIEnv.NULL;
  }
 else {
    int objRef=frame.getLocalVariable(ctx,0).getValue();
    return objRef;
  }
}

Fixed version (ground truth):
@MJI public int newInstance___3Ljava_lang_Object_2__Ljava_lang_Object_2(MJIEnv env,int mthRef,int argsRef,FeatureExpr ctx){
  ThreadInfo ti=env.getThreadInfo();
  DirectCallStackFrame frame=ti.getReturnedDirectCall();
  MethodInfo miCallee=getMethodInfo(ctx,env,mthRef);
  if (miCallee.isPrivate() && !env.getBooleanField(mthRef,"String_Node_Str").getValue()) {
    if (ti.getTopFrame().getPrevious().mi.ci != miCallee.ci) {
      env.throwException(ctx,IllegalAccessException.class.getName());
      return MJIEnv.NULL;
    }
  }
  if (frame == null) {
    ClassInfo ci=miCallee.getClassInfo();
    if (ci.isAbstract()) {
      env.throwException(ctx,"String_Node_Str");
      return MJIEnv.NULL;
    }
    int objRef=env.newObjectOfUncheckedClass(ctx,ci);
    frame=miCallee.createDirectCallStackFrame(ctx,ti,1);
    frame.setReflection();
    frame.setLocalReferenceVariable(ctx,0,objRef);
    int argOffset=frame.setReferenceArgument(ctx,0,objRef,null);
    if (!JPF_java_lang_reflect_Method.pushUnboxedArguments(env,miCallee,frame,argOffset,argsRef,ctx)) {
      return MJIEnv.NULL;
    }
    ti.pushFrame(frame);
    ci.pushRequiredClinits(ctx,ti);
    env.repeatInvocation();
    return MJIEnv.NULL;
  }
 else {
    int objRef=frame.getLocalVariable(ctx,0).getValue();
    return objRef;
  }
}
Program: 147304
Project: 147304
Buggy source:
@Override public Double apply(Double v2){
  return v2.doubleValue() / v1.doubleValue();
}

Fixed version (ground truth):
@Override public Double apply(Double v2){
  return v2.doubleValue() % v1.doubleValue();
}
Program: 147305
Project: 147305
Buggy source:
@Override public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Double> v1=frame.popDouble(ctx);
  final Conditional<Double> v2=frame.popDouble(ctx);
  return v1.mapf(ctx,new BiFunction<FeatureExpr,Double,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Double v1){
      if (v1 == 0) {
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str","String_Node_Str"));
      }
      frame.push(ctx,v2.map(new Function<Double,Double>(){
        @Override public Double apply(        Double v2){
          return v2.doubleValue() / v1.doubleValue();
        }
      }
));
      return getNext(ctx,ti);
    }
  }
);
}

Fixed version (ground truth):
@Override public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Double> v1=frame.popDouble(ctx);
  final Conditional<Double> v2=frame.popDouble(ctx);
  return v1.mapf(ctx,new BiFunction<FeatureExpr,Double,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Double v1){
      frame.push(ctx,v2.map(new Function<Double,Double>(){
        @Override public Double apply(        Double v2){
          return v2.doubleValue() % v1.doubleValue();
        }
      }
));
      return getNext(ctx,ti);
    }
  }
);
}
Program: 147306
Project: 147306
Buggy source:
@Override public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Float> v1=frame.popFloat(ctx);
  final Conditional<Float> v2=frame.popFloat(ctx);
  return v1.mapf(ctx,new BiFunction<FeatureExpr,Float,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Float v1){
      if (v1 == 0) {
        return new One<>(ti.createAndThrowException(ctx,"String_Node_Str","String_Node_Str"));
      }
      frame.push(ctx,v2.map(new Function<Float,Float>(){
        @Override public Float apply(        Float v2){
          return v2.floatValue() % v1.floatValue();
        }
      }
));
      return getNext(ctx,ti);
    }
  }
);
}

Fixed version (ground truth):
@Override public Conditional<Instruction> execute(FeatureExpr ctx,final ThreadInfo ti){
  final StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Float> v1=frame.popFloat(ctx);
  final Conditional<Float> v2=frame.popFloat(ctx);
  return v1.mapf(ctx,new BiFunction<FeatureExpr,Float,Conditional<Instruction>>(){
    @Override public Conditional<Instruction> apply(    FeatureExpr ctx,    final Float v1){
      frame.push(ctx,v2.map(new Function<Float,Float>(){
        @Override public Float apply(        Float v2){
          return v2.floatValue() % v1.floatValue();
        }
      }
));
      return getNext(ctx,ti);
    }
  }
);
}
Program: 147307
Project: 147307
Buggy source:
@MJI public int findSystemClass__Ljava_lang_String_2__Ljava_lang_Class_2(MJIEnv env,int objRef,int nameRef,FeatureExpr ctx){
  String cname=env.getStringObject(ctx,nameRef);
  checkForIllegalName(env,cname,ctx);
  if (env.hasException()) {
    return MJIEnv.NULL;
  }
  ClassLoaderInfo cl=ClassLoaderInfo.getCurrentSystemClassLoader();
  ClassInfo ci=cl.getResolvedClassInfo(ctx,cname);
{
    ClassInfo component=ci;
    while (ci.isArray()) {
      component=component.getComponentClassInfo();
    }
  }
  if (!ci.isRegistered()) {
    ci.registerClass(ctx,env.getThreadInfo());
  }
  return ci.getClassObjectRef();
}

Fixed version (ground truth):
@MJI public int findSystemClass__Ljava_lang_String_2__Ljava_lang_Class_2(MJIEnv env,int objRef,int nameRef,FeatureExpr ctx){
  String cname=env.getStringObject(ctx,nameRef);
  checkForIllegalName(env,cname,ctx);
  if (env.hasException()) {
    return MJIEnv.NULL;
  }
  ClassLoaderInfo cl=ClassLoaderInfo.getCurrentSystemClassLoader();
  ClassInfo ci=cl.getResolvedClassInfo(ctx,cname);
  while (ci.isArray()) {
    ci=ci.getComponentClassInfo();
  }
  if (!ci.isRegistered()) {
    ci.registerClass(ctx,env.getThreadInfo());
  }
  return ci.getClassObjectRef();
}
Program: 147309
Project: 147309
Buggy source:
public static void printStatistics(PrintWriter pw,Reporter reporter){
  Statistics stat=reporter.getStatistics();
  pw.println("String_Node_Str" + formatHMS(reporter.getElapsedTime()));
  pw.println("String_Node_Str" + reporter.getElapsedTime());
  pw.println("String_Node_Str" + stat.newStates + "String_Node_Str"+ stat.visitedStates+ "String_Node_Str"+ stat.backtracked+ "String_Node_Str"+ stat.endStates);
  pw.println("String_Node_Str" + stat.maxDepth + "String_Node_Str"+ stat.constraints);
  pw.println("String_Node_Str" + stat.threadCGs + "String_Node_Str"+ stat.signalCGs+ "String_Node_Str"+ stat.monitorCGs+ "String_Node_Str"+ stat.sharedAccessCGs+ "String_Node_Str"+ stat.threadApiCGs+ "String_Node_Str"+ stat.breakTransitionCGs+ "String_Node_Str"+ stat.dataCGs);
  pw.println("String_Node_Str" + "String_Node_Str" + stat.nNewObjects + "String_Node_Str"+ stat.nReleasedObjects+ "String_Node_Str"+ stat.maxLiveObjects+ "String_Node_Str"+ stat.gcCycles);
  pw.println("String_Node_Str" + stat.insns);
  pw.println("String_Node_Str" + (stat.insns / (reporter.getElapsedTime() / 1000l)));
  pw.println("String_Node_Str" + (stat.maxUsed >> 20) + "String_Node_Str");
  pw.println("String_Node_Str" + ClassLoaderInfo.getNumberOfLoadedClasses() + "String_Node_Str"+ MethodInfo.getNumberOfLoadedMethods());
}

Fixed version (ground truth):
public static void printStatistics(PrintWriter pw,Reporter reporter){
  Statistics stat=reporter.getStatistics();
  pw.println("String_Node_Str" + formatHMS(reporter.getElapsedTime()));
  pw.println("String_Node_Str" + reporter.getElapsedTime());
  pw.println("String_Node_Str" + stat.newStates + "String_Node_Str"+ stat.visitedStates+ "String_Node_Str"+ stat.backtracked+ "String_Node_Str"+ stat.endStates);
  pw.println("String_Node_Str" + stat.maxDepth + "String_Node_Str"+ stat.constraints);
  pw.println("String_Node_Str" + stat.threadCGs + "String_Node_Str"+ stat.signalCGs+ "String_Node_Str"+ stat.monitorCGs+ "String_Node_Str"+ stat.sharedAccessCGs+ "String_Node_Str"+ stat.threadApiCGs+ "String_Node_Str"+ stat.breakTransitionCGs+ "String_Node_Str"+ stat.dataCGs);
  pw.println("String_Node_Str" + "String_Node_Str" + stat.nNewObjects + "String_Node_Str"+ stat.nReleasedObjects+ "String_Node_Str"+ stat.maxLiveObjects+ "String_Node_Str"+ stat.gcCycles);
  pw.println("String_Node_Str" + stat.insns);
  long elepsedTime=reporter.getElapsedTime() / 1000l;
  if (elepsedTime == 0) {
    pw.println("String_Node_Str" + (stat.insns));
  }
 else {
    pw.println("String_Node_Str" + (stat.insns / elepsedTime));
  }
  pw.println("String_Node_Str" + (stat.maxUsed >> 20) + "String_Node_Str");
  pw.println("String_Node_Str" + ClassLoaderInfo.getNumberOfLoadedClasses() + "String_Node_Str"+ MethodInfo.getNumberOfLoadedMethods());
}
Program: 147310
Project: 147310
Buggy source:
@MJI public int lastIndexOf__II__I(MJIEnv env,int objref,int c,int fromIndex,FeatureExpr ctx){
  int vref=env.getReferenceField(ctx,objref,"String_Node_Str").getValue();
  ElementInfo ei=env.getElementInfo(vref);
  char[] values=((CharArrayFields)ei.getFields()).asCharArray().getValue();
  int len=values.length;
  if (fromIndex < 0) {
    return -1;
  }
  if (fromIndex > len - 1) {
    fromIndex=len - 1;
  }
  for (int i=fromIndex; i > 0; i--) {
    if (values[i] == c) {
      return i;
    }
  }
  return -1;
}

Fixed version (ground truth):
@MJI public int lastIndexOf__II__I(MJIEnv env,int objref,int c,int fromIndex,FeatureExpr ctx){
  int vref=env.getReferenceField(ctx,objref,"String_Node_Str").getValue();
  ElementInfo ei=env.getElementInfo(vref);
  char[] values=((CharArrayFields)ei.getFields()).asCharArray().getValue();
  int len=values.length;
  if (fromIndex < 0) {
    return -1;
  }
  if (fromIndex > len - 1) {
    fromIndex=len - 1;
  }
  for (int i=fromIndex; i >= 0; i--) {
    if (values[i] == c) {
      return i;
    }
  }
  return -1;
}
Program: 147311
Project: 147311
Buggy source:
@Test(timeout=120000) public void testFactory_double() throws Exception {
  if (verifyNoPropertyViolation(config)) {
    org.apache.commons.lang3.math.FractionTest object=new org.apache.commons.lang3.math.FractionTest();
    object.testFactory_double();
  }
}

Fixed version (ground truth):
@Ignore @Test public void testFactory_double() throws Exception {
  if (verifyNoPropertyViolation(config)) {
    org.apache.commons.lang3.math.FractionTest object=new org.apache.commons.lang3.math.FractionTest();
    object.testFactory_double();
  }
}
Program: 147312
Project: 147312
Buggy source:
@Override public Conditional<Instruction> execute(FeatureExpr ctx,ThreadInfo ti){
  StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Float> v=frame.popFloat(ctx);
  frame.push(ctx,mapr(v,null));
  return getNext(ctx,ti);
}

Fixed version (ground truth):
@Override public Conditional<Instruction> execute(FeatureExpr ctx,ThreadInfo ti){
  StackFrame frame=ti.getModifiableTopFrame();
  Conditional<Float> v=frame.popFloat(ctx);
  frame.push(ctx,mapr2(v,null));
  return getNext(ctx,ti);
}
Program: 147315
Project: 147315
Buggy source:
private Conditional<Entry> popEntry(FeatureExpr ctx){
  Conditional<Entry> result=stack.simplify(ctx).mapf(ctx,new BiFunction<FeatureExpr,Stack,Conditional<Entry>>(){
    @Override public Conditional<Entry> apply(    final FeatureExpr f,    final Stack s){
      Stack clone=s.copy();
      boolean ref=clone.isRef(0);
      int res=clone.pop();
      if (stackCTX.equivalentTo(f)) {
        stack=new One<>(clone);
      }
 else {
        stack=ChoiceFactory.create(f,new One<>(clone),stack);
      }
      return new One<>(new Entry(res,ref));
    }
  }
).simplify();
  stack=stack.simplify();
  return result;
}

Fixed version (ground truth):
private Conditional<Entry> popEntry(FeatureExpr ctx,final boolean copyRef){
  Conditional<Entry> result=stack.simplify(ctx).mapf(ctx,new BiFunction<FeatureExpr,Stack,Conditional<Entry>>(){
    @Override public Conditional<Entry> apply(    final FeatureExpr f,    final Stack s){
      Stack clone=s.copy();
      boolean ref=copyRef ? clone.isRef(0) : false;
      int res=clone.pop();
      if (stackCTX.equivalentTo(f)) {
        stack=new One<>(clone);
      }
 else {
        stack=ChoiceFactory.create(f,new One<>(clone),stack);
      }
      return new One<>(new Entry(res,ref));
    }
  }
).simplify();
  stack=stack.simplify();
  return result;
}
Program: 147316
Project: 147316
Buggy source:
@Override public void storeOperand(final FeatureExpr ctx,final int index){
  if (Conditional.isTautology(ctx)) {
    locals[index]=popEntry(ctx);
  }
 else {
    if (locals[index] == null) {
      locals[index]=new One<>(new Entry(MJIEnv.NULL,false));
    }
    locals[index]=ChoiceFactory.create(ctx,popEntry(ctx),locals[index]).simplify();
  }
}

Fixed version (ground truth):
@Override public void storeOperand(final FeatureExpr ctx,final int index){
  if (Conditional.isTautology(ctx)) {
    locals[index]=popEntry(ctx,true);
  }
 else {
    if (locals[index] == null) {
      locals[index]=new One<>(new Entry(MJIEnv.NULL,false));
    }
    locals[index]=ChoiceFactory.create(ctx,popEntry(ctx,true),locals[index]).simplify();
  }
}
Program: 147317
Project: 147317
Buggy source:
@Override public void storeLongOperand(final FeatureExpr ctx,final int index){
  stack.mapf(ctx,new BiFunction<FeatureExpr,Stack,Conditional<Entry>>(){
    @Override public Conditional<Entry> apply(    final FeatureExpr f,    final Stack stack){
      if (Conditional.isContradiction(f)) {
        return null;
      }
      locals[index + 1]=ChoiceFactory.create(f,new One<>(new Entry(stack.pop(),false)),locals[index + 1]);
      locals[index]=ChoiceFactory.create(f,new One<>(new Entry(stack.pop(),false)),locals[index]);
      return null;
    }
  }
);
  locals[index]=locals[index].simplify();
  locals[index + 1]=locals[index + 1].simplify();
  stack=stack.simplify();
}

Fixed version (ground truth):
@Override public void storeLongOperand(final FeatureExpr ctx,final int index){
  stack.mapf(ctx,new BiFunction<FeatureExpr,Stack,Conditional<Entry>>(){
    @Override public Conditional<Entry> apply(    final FeatureExpr f,    final Stack stack){
      if (Conditional.isContradiction(f)) {
        return null;
      }
      locals[index + 1]=ChoiceFactory.create(f,popEntry(f,false),locals[index + 1]);
      locals[index]=ChoiceFactory.create(f,popEntry(f,false),locals[index]);
      return null;
    }
  }
);
  locals[index]=locals[index].simplify();
  locals[index + 1]=locals[index + 1].simplify();
  stack=stack.simplify();
}
Program: 147318
Project: 147318
Buggy source:
@Test(timeout=20000) public void runZipMe(){
  if (verifyNoPropertyViolation(config)) {
    try {
      ZipTest.main(new String[]{"String_Node_Str"});
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Test public void runZipMe(){
  if (verifyNoPropertyViolation(config)) {
    try {
      ZipTest.main(new String[]{"String_Node_Str"});
    }
 catch (    IOException e) {
      e.printStackTrace();
    }
  }
}
Program: 147319
Project: 147319
Buggy source:
@Override protected void pushReturnValue(FeatureExpr ctx,StackFrame fr){
  int ival;
  long lval;
  int retSize=1;
  if (ret != null) {
switch (retType) {
case Types.T_BOOLEAN:
      ival=Types.booleanToInt(((Boolean)ret).booleanValue());
    fr.push(ctx,new One<>(ival));
  break;
case Types.T_BYTE:
fr.push(ctx,new One<>((int)(((Byte)ret).byteValue())));
break;
case Types.T_CHAR:
fr.push(ctx,new One<>((int)((Character)ret).charValue()));
break;
case Types.T_SHORT:
fr.push(ctx,new One<>((int)((Short)ret).shortValue()));
break;
case Types.T_INT:
fr.push(ctx,new One<>((Integer)ret));
break;
case Types.T_LONG:
fr.pushLong(((Long)ret).longValue());
retSize=2;
break;
case Types.T_FLOAT:
ival=Types.floatToInt(((Float)ret).floatValue());
fr.push(ctx,new One<>(ival));
break;
case Types.T_DOUBLE:
lval=Types.doubleToLong(((Double)ret).doubleValue());
fr.pushLong(lval);
retSize=2;
break;
default :
fr.push(ctx,((Integer)ret).intValue(),true);
}
if (retAttr != null) {
if (retSize == 1) {
fr.setOperandAttr(retAttr);
}
 else {
fr.setLongOperandAttr(retAttr);
}
}
}
}

Fixed version (ground truth):
@Override protected void pushReturnValue(FeatureExpr ctx,StackFrame fr){
  int ival;
  long lval;
  int retSize=1;
  if (ret != null) {
switch (retType) {
case Types.T_BOOLEAN:
      ival=Types.booleanToInt(((Boolean)ret).booleanValue());
    fr.push(ctx,new One<>(ival));
  break;
case Types.T_BYTE:
fr.push(ctx,new One<>((int)(((Byte)ret).byteValue())));
break;
case Types.T_CHAR:
fr.push(ctx,new One<>((int)((Character)ret).charValue()));
break;
case Types.T_SHORT:
fr.push(ctx,new One<>((int)((Short)ret).shortValue()));
break;
case Types.T_INT:
fr.push(ctx,new One<>((Integer)ret));
break;
case Types.T_LONG:
fr.push(ctx,new One<>(((Long)ret).longValue()));
retSize=2;
break;
case Types.T_FLOAT:
ival=Types.floatToInt(((Float)ret).floatValue());
fr.push(ctx,new One<>(ival));
break;
case Types.T_DOUBLE:
lval=Types.doubleToLong(((Double)ret).doubleValue());
fr.push(ctx,new One<>(lval));
retSize=2;
break;
default :
fr.push(ctx,((Integer)ret).intValue(),true);
}
if (retAttr != null) {
if (retSize == 1) {
fr.setOperandAttr(retAttr);
}
 else {
fr.setLongOperandAttr(retAttr);
}
}
}
}
Program: 147320
Project: 147320
Buggy source:
public void dup2_x1(FeatureExpr ctx){
  Object bAnn=null, cAnn=null;
  int ts, td;
  int t=top();
  stack.dup2_x1(ctx);
  ts=t;
  td=t + 2;
  if (attrs != null) {
    attrs[td]=cAnn=attrs[ts];
  }
  ts--;
  td--;
  if (attrs != null) {
    attrs[td]=bAnn=attrs[ts];
  }
  ts=t - 2;
  td=t;
  if (attrs != null) {
    attrs[td]=attrs[ts];
  }
  td=ts;
  if (attrs != null) {
    attrs[td]=bAnn;
  }
  td++;
  if (attrs != null) {
    attrs[td]=cAnn;
  }
}

Fixed version (ground truth):
public void dup2_x1(FeatureExpr ctx){
  Object bAnn=null, cAnn=null;
  int ts, td;
  int t=attrs == null ? -1 : top();
  stack.dup2_x1(ctx);
  ts=t;
  td=t + 2;
  if (attrs != null) {
    attrs[td]=cAnn=attrs[ts];
  }
  ts--;
  td--;
  if (attrs != null) {
    attrs[td]=bAnn=attrs[ts];
  }
  ts=t - 2;
  td=t;
  if (attrs != null) {
    attrs[td]=attrs[ts];
  }
  td=ts;
  if (attrs != null) {
    attrs[td]=bAnn;
  }
  td++;
  if (attrs != null) {
    attrs[td]=cAnn;
  }
}
Program: 147321
Project: 147321
Buggy source:
@MJI public int append__Ljava_lang_String_2__Ljava_lang_StringBuilder_2(MJIEnv env,int objref,int sref){
  String s=env.getStringObject(sref);
  if (s == null)   s="String_Node_Str";
  return appendString(NativeMethodInfo.CTX,env,objref,s);
}

Fixed version (ground truth):
@MJI public int append__Ljava_lang_String_2__Ljava_lang_StringBuilder_2(MJIEnv env,int objref,int sref){
  Conditional<String> s=env.getConditionalStringObject(sref);
  s=s.simplify(NativeMethodInfo.CTX).map(new Function<String,String>(){
    @Override public String apply(    String s){
      if (s == null) {
        return "String_Node_Str";
      }
      return s;
    }
  }
).simplify();
  return appendString(NativeMethodInfo.CTX,env,objref,s.getValue());
}