Program: 160484
Project: 160484
Buggy source:
private Object readPrimitiveValue(EClassifier classifier,ByteBuffer buffer,QueryInterface query){
  if (classifier == ECORE_PACKAGE.getEString()) {
    int length=buffer.getInt();
    if (length != -1) {
      return BinUtils.readString(buffer,length);
    }
 else {
      return null;
    }
  }
 else   if (classifier == ECORE_PACKAGE.getEInt() || classifier == ECORE_PACKAGE.getEIntegerObject()) {
    return buffer.getInt();
  }
 else   if (classifier == ECORE_PACKAGE.getELong() || classifier == ECORE_PACKAGE.getELongObject()) {
    return buffer.getLong();
  }
 else   if (classifier == ECORE_PACKAGE.getEFloat() || classifier == ECORE_PACKAGE.getEFloatObject()) {
    return buffer.getFloat();
  }
 else   if (classifier == ECORE_PACKAGE.getEDouble() || classifier == ECORE_PACKAGE.getEDoubleObject()) {
    return buffer.getDouble();
  }
 else   if (classifier == ECORE_PACKAGE.getEBoolean() || classifier == ECORE_PACKAGE.getEBooleanObject()) {
    return buffer.get() == 1;
  }
 else   if (classifier == ECORE_PACKAGE.getEDate()) {
    long val=buffer.getLong();
    if (val == -1L) {
      return null;
    }
    return new Date(val);
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEByteArray()) {
    int size=buffer.getInt();
    byte[] result=new byte[size];
    buffer.get(result);
    return result;
  }
 else   if (classifier.getName().equals("String_Node_Str")) {
    int ordinal=buffer.getInt();
    EEnum tristateEnum=query.getPackageMetaData().getEEnum("String_Node_Str");
    return tristateEnum.getEEnumLiteral(ordinal).getInstance();
  }
 else   if (classifier instanceof EEnum) {
    int ordinal=buffer.getInt();
    EEnum eEnum=(EEnum)classifier;
    return eEnum.getEEnumLiteral(ordinal).getInstance();
  }
 else {
    throw new RuntimeException("String_Node_Str" + classifier.getName());
  }
}

Fixed version (ground truth):
private Object readPrimitiveValue(EClassifier classifier,ByteBuffer buffer,QueryInterface query){
  if (classifier == EcorePackage.eINSTANCE.getEString()) {
    int length=buffer.getInt();
    if (length != -1) {
      return BinUtils.readString(buffer,length);
    }
 else {
      return null;
    }
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEInt() || classifier == EcorePackage.eINSTANCE.getEIntegerObject()) {
    return buffer.getInt();
  }
 else   if (classifier == EcorePackage.eINSTANCE.getELong() || classifier == EcorePackage.eINSTANCE.getELongObject()) {
    return buffer.getLong();
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEFloat() || classifier == EcorePackage.eINSTANCE.getEFloatObject()) {
    return buffer.getFloat();
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEDouble() || classifier == EcorePackage.eINSTANCE.getEDoubleObject()) {
    return buffer.getDouble();
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEBoolean() || classifier == EcorePackage.eINSTANCE.getEBooleanObject()) {
    return buffer.get() == 1;
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEDate()) {
    long val=buffer.getLong();
    if (val == -1L) {
      return null;
    }
    return new Date(val);
  }
 else   if (classifier == EcorePackage.eINSTANCE.getEByteArray()) {
    int size=buffer.getInt();
    byte[] result=new byte[size];
    buffer.get(result);
    return result;
  }
 else   if (classifier.getName().equals("String_Node_Str")) {
    int ordinal=buffer.getInt();
    EEnum tristateEnum=query.getPackageMetaData().getEEnum("String_Node_Str");
    return tristateEnum.getEEnumLiteral(ordinal).getInstance();
  }
 else   if (classifier instanceof EEnum) {
    int ordinal=buffer.getInt();
    EEnum eEnum=(EEnum)classifier;
    return eEnum.getEEnumLiteral(ordinal).getInstance();
  }
 else {
    throw new RuntimeException("String_Node_Str" + classifier.getName());
  }
}