Program: 21647
Project: 21647
Buggy source:
public Object handleGet(String resourceName,Class returnType,Class proxyClass) throws Exception {
  if (resourceName.equals("String_Node_Str")) {
    return dataObject.getGlobalId();
  }
  if (resourceName.equals("String_Node_Str")) {
    return objectService;
  }
  Object resourceValue=dataObject.getResource(resourceName);
  if (resourceValue instanceof OTID) {
    OTObject object;
    try {
      if (resourceValue == null) {
        return null;
      }
      OTID objId=(OTID)resourceValue;
      object=(OTObject)objectService.getOTObject(objId);
      if (object != null) {
        if (!returnType.isAssignableFrom(object.getClass())) {
          System.err.println("String_Node_Str");
          System.err.println("String_Node_Str" + object);
          System.err.println("String_Node_Str" + dataObject.getResource(OTrunkImpl.RES_CLASS_NAME));
          System.err.println("String_Node_Str" + resourceName);
          System.err.println("String_Node_Str" + returnType);
          return null;
        }
      }
      return object;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTResourceMap.class.isAssignableFrom(returnType)) {
    try {
      OTDataMap map=(OTDataMap)dataObject.getResourceCollection(resourceName,OTDataMap.class);
      return new OTResourceMapImpl(resourceName,map,this);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTObjectMap.class.isAssignableFrom(returnType)) {
    try {
      OTDataMap map=(OTDataMap)dataObject.getResourceCollection(resourceName,OTDataMap.class);
      return new OTObjectMapImpl(resourceName,map,this,objectService);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTResourceList.class.isAssignableFrom(returnType)) {
    try {
      OTDataList list=(OTDataList)dataObject.getResourceCollection(resourceName,OTDataList.class);
      return new OTResourceListImpl(resourceName,list,this);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTObjectList.class.isAssignableFrom(returnType)) {
    try {
      OTDataList list=(OTDataList)dataObject.getResourceCollection(resourceName,OTDataList.class);
      return new OTObjectListImpl(resourceName,list,this,objectService);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (resourceValue instanceof BlobResource) {
    BlobResource blob=(BlobResource)resourceValue;
    if (returnType == byte[].class) {
      return blob.getBytes();
    }
 else     if (returnType == URL.class) {
      return blob.getBlobURL();
    }
  }
 else   if (resourceValue == null && returnType.isPrimitive()) {
    try {
      Field defaultField=proxyClass.getField("String_Node_Str" + resourceName);
      if (defaultField != null) {
        return defaultField.get(null);
      }
    }
 catch (    NoSuchFieldException e) {
      throw new RuntimeException("String_Node_Str" + resourceName + "String_Node_Str"+ "String_Node_Str"+ schemaInterface);
    }
  }
  if (resourceValue == null)   return null;
  if (!returnType.isInstance(resourceValue) && !returnType.isPrimitive()) {
    System.err.println("String_Node_Str" + resourceName);
    System.err.println("String_Node_Str" + OTrunkImpl.getClassName(dataObject));
    System.err.println("String_Node_Str" + resourceValue.getClass());
    System.err.println("String_Node_Str" + returnType);
    return null;
  }
  return resourceValue;
}

Fixed version (ground truth):
public Object handleGet(String resourceName,Class returnType,Class proxyClass) throws Exception {
  if (resourceName.equals("String_Node_Str")) {
    return dataObject.getGlobalId();
  }
  if (resourceName.equals("String_Node_Str")) {
    return objectService;
  }
  Object resourceValue=dataObject.getResource(resourceName);
  if (resourceValue instanceof OTID) {
    OTObject object;
    try {
      if (resourceValue == null) {
        return null;
      }
      OTID objId=(OTID)resourceValue;
      object=(OTObject)objectService.getOTObject(objId);
      if (object != null) {
        if (!returnType.isAssignableFrom(object.getClass())) {
          System.err.println("String_Node_Str");
          System.err.println("String_Node_Str" + object);
          System.err.println("String_Node_Str" + dataObject.getResource(OTrunkImpl.RES_CLASS_NAME));
          System.err.println("String_Node_Str" + resourceName);
          System.err.println("String_Node_Str" + returnType);
          return null;
        }
      }
      return object;
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTResourceMap.class.isAssignableFrom(returnType)) {
    try {
      OTDataMap map=(OTDataMap)dataObject.getResourceCollection(resourceName,OTDataMap.class);
      return new OTResourceMapImpl(resourceName,map,this);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTObjectMap.class.isAssignableFrom(returnType)) {
    try {
      OTDataMap map=(OTDataMap)dataObject.getResourceCollection(resourceName,OTDataMap.class);
      return new OTObjectMapImpl(resourceName,map,this,objectService);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTResourceList.class.isAssignableFrom(returnType)) {
    try {
      OTDataList list=(OTDataList)dataObject.getResourceCollection(resourceName,OTDataList.class);
      return new OTResourceListImpl(resourceName,list,this);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (OTObjectList.class.isAssignableFrom(returnType)) {
    try {
      OTDataList list=(OTDataList)dataObject.getResourceCollection(resourceName,OTDataList.class);
      return new OTObjectListImpl(resourceName,list,this,objectService);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
    return null;
  }
 else   if (resourceValue instanceof BlobResource) {
    BlobResource blob=(BlobResource)resourceValue;
    if (returnType == byte[].class) {
      return blob.getBytes();
    }
 else     if (returnType == URL.class) {
      return blob.getBlobURL();
    }
  }
 else   if (resourceValue == null && (returnType == String.class || returnType.isPrimitive())) {
    try {
      Field defaultField=proxyClass.getField("String_Node_Str" + resourceName);
      if (defaultField != null) {
        return defaultField.get(null);
      }
    }
 catch (    NoSuchFieldException e) {
      if (returnType != String.class) {
        throw new RuntimeException("String_Node_Str" + resourceName + "String_Node_Str"+ "String_Node_Str"+ schemaInterface);
      }
    }
  }
  if (resourceValue == null)   return null;
  if (!returnType.isInstance(resourceValue) && !returnType.isPrimitive()) {
    System.err.println("String_Node_Str" + resourceName);
    System.err.println("String_Node_Str" + OTrunkImpl.getClassName(dataObject));
    System.err.println("String_Node_Str" + resourceValue.getClass());
    System.err.println("String_Node_Str" + returnType);
    return null;
  }
  return resourceValue;
}