Program: 50110
Project: 50110
Buggy source:
public static MappingRepresentation getSourceMetadataRepresentation(JadeNode inNode){
  HashMap<String,Node> sourceNameToMetadataNodeMap=(HashMap<String,Node>)inNode.getObject("String_Node_Str");
  HashMap<String,Object> sourceMetadataMap=new HashMap<String,Object>();
  for (  String sourceName : sourceNameToMetadataNodeMap.keySet()) {
    HashMap<String,Object> studyMetadata=new HashMap<String,Object>();
    Node metadataNode=sourceNameToMetadataNodeMap.get(sourceName);
    if (sourceName == null || sourceName.length() == 0) {
      sourceName="String_Node_Str";
    }
    if (metadataNode == null) {
      HashMap<String,Object> indStudy=GeneralUtils.reformatSourceID(sourceName);
      studyMetadata.putAll(indStudy);
      sourceMetadataMap.put(sourceName,studyMetadata);
    }
 else {
      for (      SourceProperty p : SourceProperty.values()) {
        if (metadataNode.hasProperty(p.propertyName)) {
          if (!p.propertyName.equals("String_Node_Str")) {
            if (p.propertyName.equals("String_Node_Str")) {
              String sStudy=String.valueOf(metadataNode.getProperty(p.propertyName));
              if (sStudy.compareTo("String_Node_Str") == 0) {
                GraphDatabaseAgent gda=new GraphDatabaseAgent(metadataNode.getGraphDatabase());
                String taxVersion=String.valueOf(gda.getGraphProperty("String_Node_Str"));
                gda.shutdownDb();
                studyMetadata.put("String_Node_Str",taxVersion);
              }
 else {
                HashMap<String,Object> indStudy=GeneralUtils.reformatSourceID(sStudy);
                studyMetadata.putAll(indStudy);
              }
            }
 else {
              studyMetadata.put(p.propertyName,p.type.cast(metadataNode.getProperty(p.propertyName)));
            }
          }
        }
      }
      sourceMetadataMap.put(sourceName,studyMetadata);
    }
  }
  return GeneralizedMappingRepresentation.getMapRepresentation(sourceMetadataMap);
}

Fixed version (ground truth):
public static MappingRepresentation getSourceMetadataRepresentation(JadeNode inNode){
  HashMap<String,Node> sourceNameToMetadataNodeMap=(HashMap<String,Node>)inNode.getObject("String_Node_Str");
  HashMap<String,Object> sourceMetadataMap=new HashMap<String,Object>();
  for (  String sourceName : sourceNameToMetadataNodeMap.keySet()) {
    HashMap<String,Object> studyMetadata=new HashMap<String,Object>();
    Node metadataNode=sourceNameToMetadataNodeMap.get(sourceName);
    if (sourceName == null || sourceName.length() == 0) {
      sourceName="String_Node_Str";
    }
    if (metadataNode == null) {
      sourceMetadataMap.put(sourceName,null);
    }
 else {
      for (      SourceProperty p : SourceProperty.values()) {
        if (metadataNode.hasProperty(p.propertyName)) {
          if (!p.propertyName.equals("String_Node_Str")) {
            if (p.propertyName.equals("String_Node_Str")) {
              String sStudy=String.valueOf(metadataNode.getProperty(p.propertyName));
              if (sStudy.compareTo("String_Node_Str") == 0) {
                GraphDatabaseAgent gda=new GraphDatabaseAgent(metadataNode.getGraphDatabase());
                String taxVersion=String.valueOf(gda.getGraphProperty("String_Node_Str"));
                gda.shutdownDb();
                studyMetadata.put("String_Node_Str",taxVersion);
              }
 else {
                HashMap<String,Object> indStudy=GeneralUtils.reformatSourceID(sStudy);
                studyMetadata.putAll(indStudy);
              }
            }
 else {
              studyMetadata.put(p.propertyName,p.type.cast(metadataNode.getProperty(p.propertyName)));
            }
          }
        }
      }
      sourceMetadataMap.put(sourceName,studyMetadata);
    }
  }
  return GeneralizedMappingRepresentation.getMapRepresentation(sourceMetadataMap);
}