Program: 147281
Project: 147281
Buggy source:
@Override public <T>Conditional<T> peek(FeatureExpr ctx,final int offset,Type t){
  if (!buffer.isEmpty()) {
    if (getBufferSize() > offset && Conditional.equivalentTo(bufferCTX,ctx)) {
      int pointer=offset;
      int n=0;
      while (n <= pointer) {
        Conditional value=buffer.get(n).value;
        Object type=value.getValue(true);
        if (type instanceof Integer) {
          if (n == offset) {
switch (t) {
case LONG:
              if (buffer.size() > n + 1) {
                final Conditional value2=buffer.get(n + 1).value;
                return value.mapr(x1 -> value2.map(x2 -> Types.intsToLong(((Number)x1).intValue(),((Number)x2).intValue())));
              }
 else {
                break;
              }
case DOUBLE:
            if (buffer.size() > n + 1) {
              final Conditional value2=buffer.get(n + 1).value;
              return value.mapr(x1 -> value2.map(x2 -> Types.intsToDouble(((Number)x1).intValue(),((Number)x2).intValue())));
            }
 else {
              break;
            }
case FLOAT:
          return value.map(x1 -> Types.intToFloat((int)x1));
default :
        throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str"+ t);
    }
  }
  n++;
  continue;
}
if (type instanceof Float) {
  if (n == offset) {
switch (t) {
case FLOAT:
      return value;
case INT:
    return value.map(x -> Types.floatToInt(((Float)x).floatValue()));
default :
  break;
}
}
n++;
continue;
}
if (type instanceof Double || type instanceof Long) {
if (n - pointer > 1) {
n++;
pointer--;
continue;
}
 else {
debufferAll();
return super.peek(ctx,offset,t);
}
}
if (type instanceof Byte) {
if (n == offset) {
switch (t) {
case FLOAT:
return value.map(x1 -> Types.intToFloat((byte)x1));
case DOUBLE:
break;
case INT:
return value.map(x -> (int)((Byte)x).byteValue());
case LONG:
break;
default :
break;
}
}
n++;
continue;
}
if (type instanceof Short) {
if (n == offset) {
switch (t) {
case FLOAT:
return value.map(x1 -> Types.intToFloat((short)x1));
case DOUBLE:
break;
case INT:
return value.map(x1 -> (short)x1);
case LONG:
break;
}
}
n++;
continue;
}
if (type == null) {
debufferAll();
break;
}
throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str");
}
}
debufferAll();
}
return super.peek(ctx,offset,t);
}

Fixed version (ground truth):
@Override public <T>Conditional<T> peek(FeatureExpr ctx,final int offset,Type t){
  if (!buffer.isEmpty()) {
    if (getBufferSize() > offset && Conditional.equivalentTo(bufferCTX,ctx)) {
      int pointer=offset;
      int n=0;
      while (n <= pointer) {
        Conditional value=buffer.get(n).value;
        Object type=value.getValue(true);
        if (type instanceof Integer) {
          if (n == offset) {
switch (t) {
case LONG:
              if (buffer.size() > n + 1) {
                final Conditional value2=buffer.get(n + 1).value;
                if (value2.getValue(true) instanceof Double || value2.getValue(true) instanceof Long) {
                  debufferAll();
                  return super.peek(ctx,offset,t);
                }
                return value.mapr(x1 -> value2.map(x2 -> Types.intsToLong(NumberToInt((Number)x1),NumberToInt((Number)x2))));
              }
 else {
                break;
              }
case DOUBLE:
            if (buffer.size() > n + 1) {
              final Conditional value2=buffer.get(n + 1).value;
              if (value2.getValue(true) instanceof Double || value2.getValue(true) instanceof Long) {
                debufferAll();
                return super.peek(ctx,offset,t);
              }
              return value.mapr(x1 -> value2.map(x2 -> Types.intsToDouble(NumberToInt((Number)x1),NumberToInt((Number)x2))));
            }
 else {
              break;
            }
case FLOAT:
          return value.map(x1 -> Types.intToFloat((int)x1));
default :
        throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str"+ t);
    }
  }
  n++;
  continue;
}
if (type instanceof Float) {
  if (n == offset) {
switch (t) {
case FLOAT:
      return value;
case INT:
    return value.map(x -> Types.floatToInt(((Float)x).floatValue()));
default :
  break;
}
}
n++;
continue;
}
if (type instanceof Double || type instanceof Long) {
if (n - pointer > 1) {
n++;
pointer--;
continue;
}
 else {
debufferAll();
return super.peek(ctx,offset,t);
}
}
if (type instanceof Byte) {
if (n == offset) {
switch (t) {
case FLOAT:
return value.map(x1 -> Types.intToFloat((byte)x1));
case DOUBLE:
break;
case INT:
return value.map(x -> (int)((Byte)x).byteValue());
case LONG:
break;
default :
break;
}
}
n++;
continue;
}
if (type instanceof Short) {
if (n == offset) {
switch (t) {
case FLOAT:
return value.map(x1 -> Types.intToFloat((short)x1));
case DOUBLE:
break;
case INT:
return value.map(x1 -> (short)x1);
case LONG:
break;
}
}
n++;
continue;
}
if (type == null) {
debufferAll();
break;
}
throw new RuntimeException("String_Node_Str" + type.getClass() + "String_Node_Str");
}
}
debufferAll();
}
return super.peek(ctx,offset,t);
}