Program: 74344
Project: 74344
Buggy source:
/** 
 * Write a MoML description of this object with the specified indentation depth and with the specified name substituting for the name of this object.
 * @param output The output stream to write to.
 * @param depth The depth in the hierarchy, to determine indenting.
 * @param name The name to use in the exported MoML.
 * @exception IOException If an I/O error occurs.
 */
public void exportMoML(Writer output,int depth,String name) throws IOException {
  createInstanceFromExisting(this);
  StringBuffer results=new StringBuffer("String_Node_Str" + name + "String_Node_Str"+ getClassName()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_description)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_author)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_version)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_userLevelDocumentation)+ "String_Node_Str"+ "String_Node_Str");
  Enumeration portKeys=_portHash.keys();
  while (portKeys.hasMoreElements()) {
    String key=(String)portKeys.nextElement();
    String val=(String)_portHash.get(key);
    results.append("String_Node_Str" + key + "String_Node_Str"+ "String_Node_Str"+ val+ "String_Node_Str"+ "String_Node_Str");
  }
  Enumeration propKeys=_propertyHash.keys();
  while (propKeys.hasMoreElements()) {
    String key=(String)propKeys.nextElement();
    String val=(String)_propertyHash.get(key);
    results.append("String_Node_Str" + key + "String_Node_Str"+ "String_Node_Str"+ val+ "String_Node_Str"+ "String_Node_Str");
  }
  results.append("String_Node_Str");
  output.write(results.toString());
}

Fixed version (ground truth):
/** 
 * Write a MoML description of this object with the specified indentation depth and with the specified name substituting for the name of this object.
 * @param output The output stream to write to.
 * @param depth The depth in the hierarchy, to determine indenting.
 * @param name The name to use in the exported MoML.
 * @exception IOException If an I/O error occurs.
 */
public void exportMoML(Writer output,int depth,String name) throws IOException {
  createInstanceFromExisting(this);
  StringBuffer results=new StringBuffer("String_Node_Str" + name + "String_Node_Str"+ getClassName()+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_description)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_author)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_version)+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(_userLevelDocumentation)+ "String_Node_Str"+ "String_Node_Str");
  Enumeration portKeys=_portHash.keys();
  while (portKeys.hasMoreElements()) {
    String key=(String)portKeys.nextElement();
    String val=(String)_portHash.get(key);
    results.append("String_Node_Str" + key + "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(val)+ "String_Node_Str"+ "String_Node_Str");
  }
  Enumeration propKeys=_propertyHash.keys();
  while (propKeys.hasMoreElements()) {
    String key=(String)propKeys.nextElement();
    String val=(String)_propertyHash.get(key);
    results.append("String_Node_Str" + key + "String_Node_Str"+ "String_Node_Str"+ StringUtilities.escapeForXML(val)+ "String_Node_Str"+ "String_Node_Str");
  }
  results.append("String_Node_Str");
  output.write(results.toString());
}