Program: 59626
Project: 59626
Buggy source:
protected void writeValue(JsonWriter jw,EdmBaseType type,Object pvalue){
  if (pvalue == null) {
    jw.writeNull();
  }
 else   if (type.equals(EdmType.BINARY)) {
    jw.writeString(Base64.encodeBase64String((byte[])pvalue));
  }
 else   if (type.equals(EdmType.BOOLEAN)) {
    jw.writeBoolean((Boolean)pvalue);
  }
 else   if (type.equals(EdmType.BYTE)) {
    jw.writeString(Hex.encodeHexString(new byte[]{(Byte)pvalue}));
  }
 else   if (type.equals(EdmType.DATETIME)) {
    LocalDateTime ldt=(LocalDateTime)pvalue;
    long millis=ldt.toDateTime(DateTimeZone.UTC).getMillis();
    String date="String_Node_Str" + millis + "String_Node_Str";
    jw.writeRaw(date);
  }
 else   if (type.equals(EdmType.DECIMAL)) {
    jw.writeString(String.format(Locale.ENGLISH,"String_Node_Str",pvalue));
  }
 else   if (type.equals(EdmType.DOUBLE)) {
    jw.writeString(String.format(Locale.ENGLISH,"String_Node_Str",pvalue));
  }
 else   if (type.equals(EdmType.GUID)) {
    jw.writeString("String_Node_Str" + (Guid)pvalue + "String_Node_Str");
  }
 else   if (type.equals(EdmType.INT16)) {
    jw.writeNumber((Short)pvalue);
  }
 else   if (type.equals(EdmType.INT32)) {
    jw.writeNumber((Integer)pvalue);
  }
 else   if (type.equals(EdmType.INT64)) {
    jw.writeString(pvalue.toString());
  }
 else   if (type.equals(EdmType.SINGLE)) {
    jw.writeNumber((Float)pvalue);
  }
 else   if (type.equals(EdmType.TIME)) {
    LocalTime ldt=(LocalTime)pvalue;
    jw.writeString("String_Node_Str" + ldt + "String_Node_Str");
  }
 else   if (type.equals(EdmType.DATETIMEOFFSET)) {
    jw.writeString("String_Node_Str" + InternalUtil.toString((DateTime)pvalue) + "String_Node_Str");
  }
 else   if (type instanceof EdmComplexType || (type instanceof EdmType && (!((EdmType)type).isSimple()))) {
    if (pvalue instanceof OComplexObject) {
      pvalue=((OComplexObject)pvalue).getProperties();
    }
    writeComplexObject(jw,type.toTypeString(),(List<OProperty<?>>)pvalue);
  }
 else {
    String value=pvalue.toString();
    jw.writeString(value);
  }
}

Fixed version (ground truth):
protected void writeValue(JsonWriter jw,EdmBaseType type,Object pvalue){
  if (pvalue == null) {
    jw.writeNull();
  }
 else   if (type.equals(EdmType.BINARY)) {
    jw.writeString(Base64.encodeBase64String((byte[])pvalue));
  }
 else   if (type.equals(EdmType.BOOLEAN)) {
    jw.writeBoolean((Boolean)pvalue);
  }
 else   if (type.equals(EdmType.BYTE)) {
    jw.writeString(Hex.encodeHexString(new byte[]{(Byte)pvalue}));
  }
 else   if (type.equals(EdmType.DATETIME)) {
    LocalDateTime ldt=(LocalDateTime)pvalue;
    long millis=ldt.toDateTime().getMillis();
    String date="String_Node_Str" + millis + "String_Node_Str";
    jw.writeRaw(date);
  }
 else   if (type.equals(EdmType.DECIMAL)) {
    jw.writeString(String.format(Locale.ENGLISH,"String_Node_Str",pvalue));
  }
 else   if (type.equals(EdmType.DOUBLE)) {
    jw.writeString(String.format(Locale.ENGLISH,"String_Node_Str",pvalue));
  }
 else   if (type.equals(EdmType.GUID)) {
    jw.writeString("String_Node_Str" + (Guid)pvalue + "String_Node_Str");
  }
 else   if (type.equals(EdmType.INT16)) {
    jw.writeNumber((Short)pvalue);
  }
 else   if (type.equals(EdmType.INT32)) {
    jw.writeNumber((Integer)pvalue);
  }
 else   if (type.equals(EdmType.INT64)) {
    jw.writeString(pvalue.toString());
  }
 else   if (type.equals(EdmType.SINGLE)) {
    jw.writeNumber((Float)pvalue);
  }
 else   if (type.equals(EdmType.TIME)) {
    LocalTime ldt=(LocalTime)pvalue;
    jw.writeString("String_Node_Str" + ldt + "String_Node_Str");
  }
 else   if (type.equals(EdmType.DATETIMEOFFSET)) {
    jw.writeString("String_Node_Str" + InternalUtil.toString((DateTime)pvalue) + "String_Node_Str");
  }
 else   if (type instanceof EdmComplexType || (type instanceof EdmType && (!((EdmType)type).isSimple()))) {
    if (pvalue instanceof OComplexObject) {
      pvalue=((OComplexObject)pvalue).getProperties();
    }
    writeComplexObject(jw,type.toTypeString(),(List<OProperty<?>>)pvalue);
  }
 else {
    String value=pvalue.toString();
    jw.writeString(value);
  }
}