Program: 152135
Project: 152135
Buggy source:
/** 
 * create DOM of version file 
 */
private static Document createDocument() throws Exception {
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document doc=db.newDocument();
  Node root=doc.createElement(TAG_ROOT);
  doc.appendChild(root);
  Node lastVersion=doc.createElement(TAG_LAST_VERSION);
  lastVersion.setTextContent(stableProgramVersion);
  root.appendChild(lastVersion);
  Node lastUnstableVersion=doc.createElement(TAG_LAST_UNSTABLE_VERSION);
  lastUnstableVersion.setTextContent(unstableProgramVersion);
  root.appendChild(lastUnstableVersion);
  for (  Operator op : Operators.getInstance().getAll()) {
    Node operator=doc.createElement(TAG_OPERATOR);
    Node name=doc.createElement(TAG_NAME);
    name.setTextContent(op.getName());
    Node version=doc.createElement(TAG_VERSION);
    version.setTextContent(op.getVersion());
    Node download=doc.createElement(TAG_DOWNLOAD);
    URI dlUri=new URI(downloadProtocol,downloadHost,downloadPath + op.getName() + "String_Node_Str",null);
    download.setTextContent(dlUri.toURL().toString());
    Node minVersion=doc.createElement(TAG_MIN_VERSION);
    minVersion.setTextContent(op.getMinProgramVersion());
    Node icon=doc.createElement(TAG_ICON);
    if (op.getIcon() != Icons.OPERATOR_DEFAULT) {
      URI iconUri=new URI(downloadProtocol,downloadHost,downloadPath + op.getName() + "String_Node_Str",null);
      icon.setTextContent(iconUri.toURL().toString());
    }
    operator.appendChild(name);
    operator.appendChild(version);
    operator.appendChild(download);
    operator.appendChild(minVersion);
    operator.appendChild(icon);
    root.appendChild(operator);
  }
  return doc;
}

Fixed version (ground truth):
/** 
 * create DOM of version file 
 */
private static Document createDocument() throws Exception {
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  DocumentBuilder db=dbf.newDocumentBuilder();
  Document doc=db.newDocument();
  Node root=doc.createElement(TAG_ROOT);
  doc.appendChild(root);
  Node lastVersion=doc.createElement(TAG_LAST_VERSION);
  lastVersion.setTextContent(stableProgramVersion);
  root.appendChild(lastVersion);
  Node lastUnstableVersion=doc.createElement(TAG_LAST_UNSTABLE_VERSION);
  lastUnstableVersion.setTextContent(unstableProgramVersion);
  root.appendChild(lastUnstableVersion);
  for (  Operator op : Operators.getInstance().getAll()) {
    Node operator=doc.createElement(TAG_OPERATOR);
    Node name=doc.createElement(TAG_NAME);
    name.setTextContent(op.getName());
    Node version=doc.createElement(TAG_VERSION);
    version.setTextContent(op.getVersion());
    Node download=doc.createElement(TAG_DOWNLOAD);
    URI dlUri=new URI(downloadProtocol,downloadHost,downloadPath + op.getName() + "String_Node_Str",null);
    download.setTextContent(dlUri.toASCIIString());
    Node minVersion=doc.createElement(TAG_MIN_VERSION);
    minVersion.setTextContent(op.getMinProgramVersion());
    Node icon=doc.createElement(TAG_ICON);
    if (op.getIcon() != Icons.OPERATOR_DEFAULT) {
      URI iconUri=new URI(downloadProtocol,downloadHost,downloadPath + op.getName() + "String_Node_Str",null);
      icon.setTextContent(iconUri.toASCIIString());
    }
    operator.appendChild(name);
    operator.appendChild(version);
    operator.appendChild(download);
    operator.appendChild(minVersion);
    operator.appendChild(icon);
    root.appendChild(operator);
  }
  return doc;
}