Program: 93509
Project: 93509
Buggy source:
private static RepresentationTransformer getSingleFromJson(DBObject props) throws InvalidMetadataException {
  Object _phase=props.get(RT_PHASE_ELEMENT_NAME);
  Object _scope=props.get(RT_SCOPE_ELEMENT_NAME);
  Object _name=props.get(RT_NAME_ELEMENT_NAME);
  Object _args=props.get(RT_ARGS_ELEMENT_NAME);
  if (_phase == null || !(_phase instanceof String)) {
    throw new InvalidMetadataException((_phase == null ? "String_Node_Str" : "String_Node_Str") + RT_PHASE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(PHASE.values()));
  }
  PHASE phase;
  try {
    phase=PHASE.valueOf((String)_phase);
  }
 catch (  IllegalArgumentException iae) {
    throw new InvalidMetadataException("String_Node_Str" + RT_PHASE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(PHASE.values()));
  }
  if (_scope == null || !(_scope instanceof String)) {
    throw new InvalidMetadataException((_phase == null ? "String_Node_Str" : "String_Node_Str") + RT_SCOPE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(SCOPE.values()));
  }
  SCOPE scope;
  try {
    scope=SCOPE.valueOf((String)_scope);
  }
 catch (  IllegalArgumentException iae) {
    throw new InvalidMetadataException("String_Node_Str" + RT_SCOPE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(SCOPE.values()));
  }
  if (_name == null || !(_name instanceof String)) {
    throw new InvalidMetadataException((_name == null ? "String_Node_Str" : "String_Node_Str") + RT_NAME_ELEMENT_NAME + "String_Node_Str");
  }
  String name=(String)_name;
  DBObject args;
  if (_args == null || !(_args instanceof DBObject)) {
    args=null;
  }
 else {
    args=(DBObject)_args;
  }
  return new RepresentationTransformer(phase,scope,name,args);
}

Fixed version (ground truth):
private static RepresentationTransformer getSingleFromJson(DBObject props) throws InvalidMetadataException {
  Object _phase=props.get(RT_PHASE_ELEMENT_NAME);
  Object _scope=props.get(RT_SCOPE_ELEMENT_NAME);
  Object _name=props.get(RT_NAME_ELEMENT_NAME);
  Object _args=props.get(RT_ARGS_ELEMENT_NAME);
  if (_phase == null || !(_phase instanceof String)) {
    throw new InvalidMetadataException((_phase == null ? "String_Node_Str" : "String_Node_Str") + RT_PHASE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(PHASE.values()));
  }
  PHASE phase;
  try {
    phase=PHASE.valueOf((String)_phase);
  }
 catch (  IllegalArgumentException iae) {
    throw new InvalidMetadataException("String_Node_Str" + RT_PHASE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(PHASE.values()));
  }
  if (_scope == null || !(_scope instanceof String)) {
    throw new InvalidMetadataException((phase == null ? "String_Node_Str" : "String_Node_Str") + RT_SCOPE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(SCOPE.values()));
  }
  SCOPE scope;
  try {
    scope=SCOPE.valueOf((String)_scope);
  }
 catch (  IllegalArgumentException iae) {
    throw new InvalidMetadataException("String_Node_Str" + RT_SCOPE_ELEMENT_NAME + "String_Node_Str"+ Arrays.toString(SCOPE.values()));
  }
  if (_name == null || !(_name instanceof String)) {
    throw new InvalidMetadataException((_name == null ? "String_Node_Str" : "String_Node_Str") + RT_NAME_ELEMENT_NAME + "String_Node_Str");
  }
  String name=(String)_name;
  DBObject args;
  if (_args == null || !(_args instanceof DBObject)) {
    args=null;
  }
 else {
    args=(DBObject)_args;
  }
  return new RepresentationTransformer(phase,scope,name,args);
}