Program: 129310
Project: 129310
Buggy source:
/** 
 * qzhang Comment method "saveColumnsToFile".
 * @param file
 * @param table
 * @return
 * @throws IOException
 * @throws ParserConfigurationException
 */
public boolean saveColumnsToFile(File file,IMetadataTable table) throws IOException, ParserConfigurationException {
  if (file != null) {
    final DocumentBuilderFactory fabrique=DocumentBuilderFactory.newInstance();
    final Bundle b=Platform.getBundle(CORE_RUNTIME_PLUGIN_ID);
    final URL url=FileLocator.toFileURL(FileLocator.find(b,new Path(SCHEMA_XSD),null));
    final File schema=new File(url.getPath());
    fabrique.setAttribute(SCHEMA_LANGUAGE,"String_Node_Str");
    fabrique.setAttribute(SCHEMA_VALIDATOR,schema);
    fabrique.setValidating(true);
    final DocumentBuilder analyseur=fabrique.newDocumentBuilder();
    analyseur.setErrorHandler(new ErrorHandler(){
      public void error(      final SAXParseException exception) throws SAXException {
        throw exception;
      }
      public void fatalError(      final SAXParseException exception) throws SAXException {
        throw exception;
      }
      public void warning(      final SAXParseException exception) throws SAXException {
        throw exception;
      }
    }
);
    Document document=analyseur.newDocument();
    Element racine=document.createElement("String_Node_Str");
    document.appendChild(racine);
    if (table.getDbms() != null && table.getDbms().trim() != "String_Node_Str") {
      Attr dbmsId=document.createAttribute("String_Node_Str");
      dbmsId.setNodeValue(table.getDbms());
      racine.setAttributeNode(dbmsId);
    }
    for (    IMetadataColumn metadataColumn : table.getListColumns()) {
      Element column=document.createElement("String_Node_Str");
      racine.appendChild(column);
      saveOneColumn(document,metadataColumn,column);
    }
    saveDocumentByEncoding(document,file);
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * qzhang Comment method "saveColumnsToFile".
 * @param file
 * @param table
 * @return
 * @throws IOException
 * @throws ParserConfigurationException
 */
public boolean saveColumnsToFile(File file,IMetadataTable table) throws IOException, ParserConfigurationException {
  if (file != null) {
    final DocumentBuilderFactory fabrique=DocumentBuilderFactory.newInstance();
    final Bundle b=Platform.getBundle(CORE_RUNTIME_PLUGIN_ID);
    final URL url=FileLocator.toFileURL(FileLocator.find(b,new Path(SCHEMA_XSD),null));
    final File schema=new File(url.getPath());
    fabrique.setAttribute(SCHEMA_LANGUAGE,"String_Node_Str");
    fabrique.setAttribute(SCHEMA_VALIDATOR,schema);
    fabrique.setValidating(true);
    final DocumentBuilder analyseur=fabrique.newDocumentBuilder();
    analyseur.setErrorHandler(new ErrorHandler(){
      @Override public void error(      final SAXParseException exception) throws SAXException {
        throw exception;
      }
      @Override public void fatalError(      final SAXParseException exception) throws SAXException {
        throw exception;
      }
      @Override public void warning(      final SAXParseException exception) throws SAXException {
        throw exception;
      }
    }
);
    Document document=analyseur.newDocument();
    Element racine=document.createElement("String_Node_Str");
    document.appendChild(racine);
    if (table.getDbms() != null && table.getDbms().trim() != "String_Node_Str") {
      Attr dbmsId=document.createAttribute("String_Node_Str");
      dbmsId.setNodeValue(table.getDbms());
      racine.setAttributeNode(dbmsId);
    }
    for (    IMetadataColumn metadataColumn : table.getListColumns()) {
      Element column=document.createElement("String_Node_Str");
      racine.appendChild(column);
      saveOneColumn(document,metadataColumn,column);
    }
    saveDocumentByEncoding(document,file);
    return true;
  }
  return false;
}