nus-yam/ex-repair huggingface dataset:
Program: 81279
Project: 81279
Buggy source:
/** 
 * Convert to url. The path supplied is first tried as a URL external form string, if it fails it is tried as a Class path resource, Then it is tried as a local file path.
 * @param path the path 
 * @return the uRL
 */
public static URL convertToURL(String path){
  URL url=null;
  try {
    url=new URL(path);
  }
 catch (  MalformedURLException e) {
    url=Thread.currentThread().getContextClassLoader().getResource(path);
    if (url == null) {
      File file=new File(path);
      if (file.exists()) {
        try {
          url=file.toURI().toURL();
        }
 catch (        MalformedURLException e1) {
          Logger.getLogger(ConfigurationReader.class.getName()).log(Level.SEVERE,path + "String_Node_Str",e);
          throw new ConfigurationException("String_Node_Str" + path + "String_Node_Str"+ path+ "String_Node_Str",e);
        }
      }
    }
  }
  return url;
}

Fixed version (ground truth):
/** 
 * Convert to url. The path supplied is first tried as a URL external form string, if it fails it is tried as a Class path resource, Then it is tried as a local file path.
 * @param path the path 
 * @return the uRL
 */
public static URL convertToURL(String path){
  URL url=null;
  try {
    url=new URL(path);
  }
 catch (  MalformedURLException e) {
    url=Thread.currentThread().getContextClassLoader().getResource(path);
    if (url == null) {
      File file=new File(path);
      if (file.exists()) {
        try {
          url=file.toURI().toURL();
        }
 catch (        MalformedURLException e1) {
          Logger.getLogger(ConfigurationReader.class.getName()).log(Level.SEVERE,path + "String_Node_Str",e);
          throw new ConfigurationException("String_Node_Str" + path + "String_Node_Str"+ path+ "String_Node_Str",e);
        }
      }
    }
  }
  if (url == null) {
    throw new ConfigurationException("String_Node_Str" + path + "String_Node_Str"+ path+ "String_Node_Str");
  }
  return url;
}
Program: 81281
Project: 81281
Buggy source:
/** 
 * Parses the simple types.
 * @param tagName the tag name
 * @param srcDoc the src doc
 * @param xsdDocument parses SimpleTypes within the document TBD: has to make it generic across namespaces
 * @throws XsdDocException 
 */
private void parseSimpleTypes(Document srcDoc,XSDDocument xsdDocument) throws ParserException {
  logger.log(Level.FINER,"String_Node_Str",new Object[]{srcDoc,xsdDocument});
  NodeList domElements=srcDoc.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  int noOfDomElements=domElements.getLength();
  for (int i=0; i < noOfDomElements; i++) {
    org.w3c.dom.Element obj=(org.w3c.dom.Element)domElements.item(i);
    SimpleType sType=populateSimpleType(xsdDocument,obj,false);
    org.w3c.dom.Element parent=(org.w3c.dom.Element)obj.getParentNode();
    if (!parent.getTagName().endsWith("String_Node_Str")) {
      if (Utils.isEmpty(sType.getName())) {
        sType.setName("String_Node_Str" + i);
      }
      xsdDocument.addSimpleType(sType);
    }
  }
  logger.log(Level.FINER,"String_Node_Str",xsdDocument);
}

Fixed version (ground truth):
/** 
 * Parses the simple types.
 * @param tagName the tag name
 * @param srcDoc the src doc
 * @param xsdDocument parses SimpleTypes within the document TBD: has to make it generic across namespaces
 * @throws XsdDocException 
 */
private void parseSimpleTypes(Document srcDoc,XSDDocument xsdDocument) throws ParserException {
  logger.log(Level.FINER,"String_Node_Str",new Object[]{srcDoc,xsdDocument});
  NodeList domElements=srcDoc.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  int noOfDomElements=domElements.getLength();
  for (int i=0; i < noOfDomElements; i++) {
    org.w3c.dom.Element obj=(org.w3c.dom.Element)domElements.item(i);
    SimpleType sType=populateSimpleType(xsdDocument,obj,false);
    org.w3c.dom.Element parent=(org.w3c.dom.Element)obj.getParentNode();
    if (!parent.getTagName().endsWith("String_Node_Str")) {
      if (Utils.isEmpty(sType.getName())) {
        sType.setName("String_Node_Str" + i);
      }
      if (sType.getEnums() != null) {
        for (        EnumElement enumE : sType.getEnums()) {
          enumE.setType(sType.getName());
          xsdDocument.addEnum(enumE);
        }
      }
      xsdDocument.addSimpleType(sType);
    }
  }
  logger.log(Level.FINER,"String_Node_Str",xsdDocument);
}
Program: 81282
Project: 81282
Buggy source:
/** 
 * Parses the enum elements.
 * @param namespacePrefix the namespace prefix
 * @param element the element
 * @param xsdDocument the xsd document
 * @return collection of enums contained by an element associates enums toits annotations
 * @throws ParserException 
 */
private List<EnumElement> parseEnumElements(org.w3c.dom.Element element,XSDDocument xsdDocument) throws ParserException {
  logger.log(Level.FINER,"String_Node_Str",new Object[]{element,xsdDocument});
  List<EnumElement> elements=new ArrayList<EnumElement>();
  NodeList domElements=element.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  int noOfDomElements=domElements.getLength();
  for (int i=0; i < noOfDomElements; i++) {
    org.w3c.dom.Element obj=(org.w3c.dom.Element)domElements.item(i);
    String value=obj.getAttribute("String_Node_Str");
    EnumElement elem=Context.getContext().getNewEnumeration();
    elem.setValue(value);
    elem.setType(element.getAttribute("String_Node_Str"));
    elem.setAnnotations(parseAnnotation(obj));
    elements.add(elem);
    postProcessEnum(elem,obj);
    xsdDocument.addEnum(elem);
  }
  logger.log(Level.FINER,"String_Node_Str",elements);
  return elements;
}

Fixed version (ground truth):
/** 
 * Parses the enum elements.
 * @param namespacePrefix the namespace prefix
 * @param element the element
 * @param xsdDocument the xsd document
 * @return collection of enums contained by an element associates enums toits annotations
 * @throws ParserException 
 */
private List<EnumElement> parseEnumElements(org.w3c.dom.Element element,XSDDocument xsdDocument) throws ParserException {
  logger.log(Level.FINER,"String_Node_Str",new Object[]{element,xsdDocument});
  List<EnumElement> elements=new ArrayList<EnumElement>();
  NodeList domElements=element.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  int noOfDomElements=domElements.getLength();
  for (int i=0; i < noOfDomElements; i++) {
    org.w3c.dom.Element obj=(org.w3c.dom.Element)domElements.item(i);
    String value=obj.getAttribute("String_Node_Str");
    EnumElement elem=Context.getContext().getNewEnumeration();
    elem.setValue(value);
    elem.setType(element.getAttribute("String_Node_Str"));
    elem.setAnnotations(parseAnnotation(obj));
    elements.add(elem);
    postProcessEnum(elem,obj);
  }
  logger.log(Level.FINER,"String_Node_Str",elements);
  return elements;
}
Program: 81283
Project: 81283
Buggy source:
/** 
 * Gets the annotation info.
 * @return handle to ParsedAnnotationInfo object whichis the parsed annotation data including documentation and appInfo
 */
public ParsedAnnotationInfo getAnnotationInfo(){
  return annotation;
}

Fixed version (ground truth):
/** 
 * Gets the annotation info.
 * @return handle to ParsedAnnotationInfo object which is the parsedannotation data including documentation and appInfo
 */
public ParsedAnnotationInfo getAnnotationInfo(){
  return annotation;
}
Program: 81284
Project: 81284
Buggy source:
public int compareTo(Element object){
  return this.getName().toUpperCase().compareTo(object.getName().toUpperCase());
}

Fixed version (ground truth):
public int compareTo(Element object){
  int retVal=this.getName().toUpperCase().compareTo(object.getName().toUpperCase());
  if (retVal == 0 && (this.getType().equals(object.getType()) && ((this.getContainerComplexType() != null && this.getContainerComplexType().equals(object.getContainerComplexType())) || (object.getContainerComplexType() == null && this.getContainerComplexType() == null)))) {
    return 0;
  }
 else {
    if (retVal == 0) {
      retVal=1;
    }
    return retVal;
  }
}
Program: 81285
Project: 81285
Buggy source:
/** 
 * Sets the system env variables.
 */
private void setSystemEnvVariables(){
  if (configXmlPath == null) {
    configXmlPath=System.getenv().get(Constants.INPUT_SYSENV_CONFIG);
    logger.info("String_Node_Str" + configXmlPath);
  }
  if (outputDir == null) {
    outputDir=System.getenv().get(Constants.INPUT_SYSENV_OUTPUT_DIR);
    logger.info("String_Node_Str" + outputDir);
  }
  if (cssFilePath == null) {
    cssFilePath=System.getenv().get(Constants.INPUT_SYSENV_CSS);
    logger.info("String_Node_Str" + cssFilePath);
  }
}

Fixed version (ground truth):
/** 
 * Sets the system env variables.
 */
private void setSystemEnvVariables(){
  if (configXmlPath == null) {
    configXmlPath=System.getenv().get(Constants.INPUT_SYSENV_CONFIG);
    logger.finest("String_Node_Str" + configXmlPath);
  }
  if (outputDir == null) {
    outputDir=System.getenv().get(Constants.INPUT_SYSENV_OUTPUT_DIR);
    logger.finest("String_Node_Str" + outputDir);
  }
  if (cssFilePath == null) {
    cssFilePath=System.getenv().get(Constants.INPUT_SYSENV_CSS);
    logger.finest("String_Node_Str" + cssFilePath);
  }
}
Program: 81287
Project: 81287
Buggy source:
/** 
 * Gets the text in div.
 * @param text the text
 * @param styleClassName the style class name
 * @return the text in div
 */
private String getTextInDiv(String text,String styleClassName){
  String temp="String_Node_Str";
  if (styleClassName != null) {
    temp+="String_Node_Str" + styleClassName + "String_Node_Str";
  }
  String tag=Constants.HTML_DIV_START.replace("String_Node_Str",temp);
  tag+=text;
  tag+=Constants.HTML_DIV_END;
  logger.info("String_Node_Str" + tag);
  return tag;
}

Fixed version (ground truth):
/** 
 * Gets the text in div.
 * @param text the text
 * @param styleClassName the style class name
 * @return the text in div
 */
private String getTextInDiv(String text,String styleClassName){
  String temp="String_Node_Str";
  if (styleClassName != null) {
    temp+="String_Node_Str" + styleClassName + "String_Node_Str";
  }
  String tag=Constants.HTML_DIV_START.replace("String_Node_Str",temp);
  tag+=text;
  tag+=Constants.HTML_DIV_END;
  logger.finest("String_Node_Str" + tag);
  return tag;
}
Program: 81288
Project: 81288
Buggy source:
/** 
 * Gets the next sibling ignoring empty white-space nodes.
 * @param node the node
 * @return the next sibling
 */
private Node getNextSibling(Node node){
  Node sib=node.getNextSibling();
  if (sib != null && Node.COMMENT_NODE == sib.getNodeType()) {
    sib=getNextSibling(sib);
  }
  if (sib != null && sib.getNodeType() == Node.TEXT_NODE) {
    String value=sib.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        sib=getNextSibling(sib);
      }
    }
  }
  logger.log(Level.INFO,"String_Node_Str",sib);
  return sib;
}

Fixed version (ground truth):
/** 
 * Gets the next sibling ignoring empty white-space nodes.
 * @param node the node
 * @return the next sibling
 */
private Node getNextSibling(Node node){
  Node sib=node.getNextSibling();
  if (sib != null && Node.COMMENT_NODE == sib.getNodeType()) {
    sib=getNextSibling(sib);
  }
  if (sib != null && sib.getNodeType() == Node.TEXT_NODE) {
    String value=sib.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        sib=getNextSibling(sib);
      }
    }
  }
  logger.log(Level.FINEST,"String_Node_Str",sib);
  return sib;
}
Program: 81289
Project: 81289
Buggy source:
/** 
 * Gets the first child ignoring empty white-space nodes.
 * @param node the node
 * @return the first child
 */
private Node getFirstChild(Node node){
  Node firstChild=node.getFirstChild();
  if (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE) {
    String value=firstChild.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        firstChild=getNextSibling(firstChild);
      }
    }
  }
  logger.log(Level.INFO,"String_Node_Str",firstChild);
  return firstChild;
}

Fixed version (ground truth):
/** 
 * Gets the first child ignoring empty white-space nodes.
 * @param node the node
 * @return the first child
 */
private Node getFirstChild(Node node){
  Node firstChild=node.getFirstChild();
  if (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE) {
    String value=firstChild.getTextContent();
    if (value != null) {
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      value=value.replaceAll("String_Node_Str","String_Node_Str");
      if (Utils.isEmpty(value)) {
        firstChild=getNextSibling(firstChild);
      }
    }
  }
  logger.log(Level.FINEST,"String_Node_Str",firstChild);
  return firstChild;
}
Program: 81291
Project: 81291
Buggy source:
/** 
 * Gets the local name.
 * @param ctype the ctype
 * @return local name after stripping namespace prefix
 */
private String getLocalName(String ctype){
  logger.info("String_Node_Str" + ctype);
  String[] strs=ctype.split("String_Node_Str");
  if (strs.length > 1)   return strs[1];
 else   return strs[0];
}

Fixed version (ground truth):
/** 
 * Gets the local name.
 * @param ctype the ctype
 * @return local name after stripping namespace prefix
 */
private String getLocalName(String ctype){
  logger.finest("String_Node_Str" + ctype);
  String[] strs=ctype.split("String_Node_Str");
  if (strs.length > 1)   return strs[1];
 else   return strs[0];
}
Program: 81292
Project: 81292
Buggy source:
/** 
 * Visit.
 * @param node traverse and collect node names
 */
public void visit(Node node){
  logger.log(Level.INFO,"String_Node_Str",node);
  this.nameNodeSet.add(node.getNodeName());
  NodeList children=node.getChildNodes();
  if (children != null) {
    int noOfNodes=children.getLength();
    for (int i=0; i < noOfNodes; i++) {
      Node tmpNode=children.item(i);
      this.nameNodeSet.add(tmpNode.getNodeName());
      visit(tmpNode);
    }
  }
}

Fixed version (ground truth):
/** 
 * Visit.
 * @param node traverse and collect node names
 */
public void visit(Node node){
  logger.log(Level.FINEST,"String_Node_Str",node);
  this.nameNodeSet.add(node.getNodeName());
  NodeList children=node.getChildNodes();
  if (children != null) {
    int noOfNodes=children.getLength();
    for (int i=0; i < noOfNodes; i++) {
      Node tmpNode=children.item(i);
      this.nameNodeSet.add(tmpNode.getNodeName());
      visit(tmpNode);
    }
  }
}
Program: 81293
Project: 81293
Buggy source:
/** 
 * Gets the usage hierarchy for field.
 * @param allPossiblePaths the all possible paths
 * @param fieldName the field name
 * @return the possible usage paths to a field.
 */
public static List<String> getUsageHierarchyForField(List<String> allPossiblePaths,String fieldName){
  logger.info("String_Node_Str" + fieldName);
  logger.entering("String_Node_Str","String_Node_Str",fieldName);
  ArrayList<String> paths=new ArrayList<String>();
  for (  String path : allPossiblePaths) {
    if (path.endsWith(fieldName)) {
      paths.add(path.substring(0,path.lastIndexOf("String_Node_Str")));
    }
 else     if (path.contains("String_Node_Str" + fieldName + "String_Node_Str")) {
      paths.add(path.substring(0,path.indexOf("String_Node_Str" + fieldName + "String_Node_Str")));
    }
  }
  logger.exiting("String_Node_Str","String_Node_Str",paths);
  return paths;
}

Fixed version (ground truth):
/** 
 * Gets the usage hierarchy for field.
 * @param allPossiblePaths the all possible paths
 * @param fieldName the field name
 * @return the possible usage paths to a field.
 */
public static List<String> getUsageHierarchyForField(List<String> allPossiblePaths,String fieldName){
  logger.finest("String_Node_Str" + fieldName);
  logger.entering("String_Node_Str","String_Node_Str",fieldName);
  ArrayList<String> paths=new ArrayList<String>();
  for (  String path : allPossiblePaths) {
    if (path.endsWith(fieldName)) {
      paths.add(path.substring(0,path.lastIndexOf("String_Node_Str")));
    }
 else     if (path.contains("String_Node_Str" + fieldName + "String_Node_Str")) {
      paths.add(path.substring(0,path.indexOf("String_Node_Str" + fieldName + "String_Node_Str")));
    }
  }
  logger.exiting("String_Node_Str","String_Node_Str",paths);
  return paths;
}
Program: 81294
Project: 81294
Buggy source:
/** 
 * Sets the up.
 * @throws Exception the exception
 */
@Before public void setUp() throws Exception {
  wsdlPath=this.getClass().getClassLoader().getResource("String_Node_Str").toExternalForm();
  Context.getContext().addParser("String_Node_Str",new TestAnnoParserClass());
}

Fixed version (ground truth):
/** 
 * Sets the up.
 * @throws Exception the exception
 */
@Before public void setUp() throws Exception {
  wsdlPath=this.getClass().getClassLoader().getResource("String_Node_Str").toExternalForm();
  ConfigurationReader.loadDefaultConfiguration();
  Context.getContext().addParser("String_Node_Str",new TestAnnoParserClass());
}
Program: 81296
Project: 81296
Buggy source:
/** 
 * Creates the all classes file.
 * @throws OutputFormatterException
 */
private void createAllClassesFile() throws OutputFormatterException {
  Set<String> set=packageServicesMap.keySet();
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  html.append(Constants.HTML_BOLD_START + Constants.ALL_CLASSES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
  for (  String packageName : set) {
    List<String> list=packageServicesMap.get(packageName);
    for (    String className : list) {
      html.append(HtmlUtils.getAnchorTag(className,"String_Node_Str" + SEPARATOR + packageName+ SEPARATOR+ className+ Constants.DOT_HTML,null,className,Constants.CLASSFRAME,null) + Constants.HTML_BR);
    }
  }
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.ALLCLASSES + Constants.DOT_HTML);
}

Fixed version (ground truth):
/** 
 * Creates the all classes file.
 * @throws OutputFormatterException
 */
private void createAllClassesFile() throws OutputFormatterException {
  Set<String> set=packageServicesMap.keySet();
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  html.append(Constants.HTML_BOLD_START + Constants.ALL_CLASSES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
  for (  String packageName : set) {
    List<String> list=packageServicesMap.get(packageName);
    for (    String className : list) {
      html.append(HtmlUtils.getAnchorTag(className,packageName + SEPARATOR + className+ Constants.DOT_HTML,null,className,Constants.CLASSFRAME,null) + Constants.HTML_BR);
    }
  }
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.ALLCLASSES + Constants.DOT_HTML);
}
Program: 81301
Project: 81301
Buggy source:
/** 
 * Adds the footer.
 * @param html the html
 * @throws OutputFormatterException
 */
private void addFooter(StringBuffer html,boolean isType,boolean isComplexType,String typeName,String relPath,boolean isIndex,String keyLinks) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",html);
  String content=getFooterInformation(isType,isComplexType,typeName,relPath,isIndex,keyLinks);
  html.append(getTextInDiv(content,"String_Node_Str"));
  html.append(HtmlUtils.getEndTags());
  logger.exiting("String_Node_Str","String_Node_Str",html);
}

Fixed version (ground truth):
/** 
 * Adds the footer.
 * @param html the html
 * @throws OutputFormatterException
 */
private void addFooter(StringBuffer html,Map<String,String> replacementMap,String hdrFileParameterName) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",html);
  String content=getFooterInformation(replacementMap,hdrFileParameterName);
  html.append(getTextInDiv(content,"String_Node_Str"));
  html.append(HtmlUtils.getEndTags());
  logger.exiting("String_Node_Str","String_Node_Str",html);
}
Program: 81302
Project: 81302
Buggy source:
/** 
 * Gets the footer information. This method can be over ridden to supply Footer.
 * @return the footer information
 * @throws OutputFormatterException
 */
protected String getFooterInformation(boolean isType,boolean isComplex,String typeName,String relPath,boolean isIndex,String keyLinks) throws OutputFormatterException {
  String parameterName=getHeaderFileName(isType,isComplex,isIndex);
  String headerFile=outputGenaratorParam.getParameters().get(parameterName);
  if (headerFile != null) {
    try {
      String header=Utils.getFileAsString(Utils.convertToURL(headerFile).openStream()).toString();
      String version=outputGenaratorParam.getParameters().get("String_Node_Str");
      header=header.replaceAll("String_Node_Str",version);
      header=header.replaceAll("String_Node_Str",typeName);
      header=header.replaceAll("String_Node_Str",relPath);
      if (isIndex) {
        if (keyLinks == null) {
          keyLinks="String_Node_Str";
        }
        header=header.replaceAll("String_Node_Str",keyLinks);
      }
      header="String_Node_Str" + header;
      return header;
    }
 catch (    IOException e) {
      throw new OutputFormatterException(e);
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Gets the footer information. This method can be over ridden to supply Footer.
 * @return the footer information
 * @throws OutputFormatterException
 */
protected String getFooterInformation(Map<String,String> replacementMap,String hdrFileParameterName) throws OutputFormatterException {
  String headerFile=outputGenaratorParam.getParameters().get(hdrFileParameterName);
  if (headerFile != null) {
    try {
      String header=Utils.getFileAsString(Utils.convertToURL(headerFile).openStream()).toString();
      for (      Map.Entry<String,String> entry : replacementMap.entrySet()) {
        header=header.replaceAll("String_Node_Str" + entry.getKey() + "String_Node_Str",entry.getValue());
      }
      String version=outputGenaratorParam.getParameters().get("String_Node_Str");
      header=header.replaceAll("String_Node_Str",version);
      header="String_Node_Str" + header;
      return header;
    }
 catch (    IOException e) {
      throw new OutputFormatterException(e);
    }
  }
  return "String_Node_Str";
}
Program: 81305
Project: 81305
Buggy source:
/** 
 * Creates the all packages description file.
 * @throws OutputFormatterException
 */
private void createAllPackagesDescriptionFile() throws OutputFormatterException {
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  buildHeader(html,false,false,null,"String_Node_Str",true,null);
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  addFooter(html,false,false,null,"String_Node_Str",true,null);
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.PACKAGES.toLowerCase() + Constants.INDEX + Constants.DOT_HTML);
}

Fixed version (ground truth):
/** 
 * Creates the all packages description file.
 * @throws OutputFormatterException
 */
private void createAllPackagesDescriptionFile() throws OutputFormatterException {
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  Map<String,String> replacementMap=new HashMap<String,String>();
  replacementMap.put("String_Node_Str","String_Node_Str");
  replacementMap.put("String_Node_Str","String_Node_Str");
  replacementMap.put("String_Node_Str","String_Node_Str");
  buildHeader(html,replacementMap,"String_Node_Str");
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  addFooter(html,replacementMap,"String_Node_Str");
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.PACKAGES.toLowerCase() + Constants.INDEX + Constants.DOT_HTML);
}
Program: 81306
Project: 81306
Buggy source:
private void writePackageTree(List<XSDDocInterface> wsdlDoc,String outputdir,boolean isAllPackages,String packageName) throws OutputFormatterException {
  Node root=getTypesInTree(wsdlDoc);
  StringBuffer html=new StringBuffer();
  html.append(Constants.HTML_H3_START + "String_Node_Str" + currentPackageName+ Constants.HTML_H3_END);
  if (!isAllPackages) {
    html.append("String_Node_Str" + Constants.HTML_BR);
    String str="String_Node_Str";
    while (packageName.indexOf('/') != -1) {
      str="String_Node_Str";
      packageName=packageName.substring(packageName.indexOf('/') + 1);
    }
    html.append(Constants.NBSP_THRICE + Constants.NBSP_THRICE + HtmlUtils.getAnchorTag(null,str + "String_Node_Str" + Constants.DOT_HTML,null,"String_Node_Str"));
  }
  html.append(Constants.HTML_HR);
  html.append(Constants.HTML_H3_START + "String_Node_Str" + Constants.HTML_H3_END);
  html.append("String_Node_Str");
  writeTree(root,html,isAllPackages);
  html.append("String_Node_Str");
  writeFile(html,outputdir,"String_Node_Str" + Constants.DOT_HTML);
}

Fixed version (ground truth):
private void writePackageTree(List<XSDDocInterface> wsdlDoc,String outputdir,boolean isAllPackages) throws OutputFormatterException {
  Node root=getTypesInTree(wsdlDoc);
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags("String_Node_Str" + currentPackageName,outputdir));
  Map<String,String> replacementMap=new HashMap<String,String>();
  replacementMap.put("String_Node_Str",(outputdir == null ? "String_Node_Str" : getRelativePath(outputdir)));
  replacementMap.put("String_Node_Str","String_Node_Str");
  buildHeader(html,replacementMap,"String_Node_Str");
  html.append(Constants.HTML_H3_START + "String_Node_Str" + currentPackageName+ Constants.HTML_H3_END);
  if (!isAllPackages) {
    html.append("String_Node_Str" + Constants.HTML_BR);
    String str=getRelativePath(outputdir);
    html.append(Constants.NBSP_THRICE + Constants.NBSP_THRICE + HtmlUtils.getAnchorTag(null,str + "String_Node_Str" + Constants.DOT_HTML,null,"String_Node_Str"));
  }
  html.append(Constants.HTML_HR);
  html.append(Constants.HTML_H3_START + "String_Node_Str" + Constants.HTML_H3_END);
  html.append("String_Node_Str");
  writeTree(root,html,isAllPackages);
  html.append("String_Node_Str");
  addFooter(html,replacementMap,"String_Node_Str");
  html.append(HtmlUtils.getEndTags());
  if (outputdir == null) {
    outputdir="String_Node_Str";
  }
  writeFile(html,getCurrentOutputDir() + outputdir,"String_Node_Str" + Constants.DOT_HTML);
}
Program: 81307
Project: 81307
Buggy source:
/** 
 * Sets the input types.
 * @param html the html
 * @param opH the op h
 * @param serviceName the service name
 */
private String setInputTypes(StringBuffer html,OperationHolder opH,String serviceName,String locBase){
  logger.entering("String_Node_Str","String_Node_Str",new Object[]{html,opH});
  String params="String_Node_Str";
  List<Element> inputs=opH.getInputTypes();
  if (inputs != null) {
    Iterator<Element> iter=inputs.iterator();
    while (iter.hasNext()) {
      Element elem=iter.next();
      params=HtmlUtils.getAnchorTag(null,locBase + "String_Node_Str" + SEPARATOR+ elem.getType()+ Constants.DOT_HTML,elem.getType(),elem.getType());
      params+="String_Node_Str" + elem.getName();
      if (iter.hasNext()) {
        params+="String_Node_Str";
      }
    }
  }
  html.append(params);
  logger.exiting("String_Node_Str","String_Node_Str",html);
  return params;
}

Fixed version (ground truth):
/** 
 * Sets the input types.
 * @param html the html
 * @param opH the op h
 * @param wsdlDoc the wsdl doc
 * @throws OutputFormatterException
 */
private void setInputTypes(StringBuffer html,OperationHolder opH,WSDLDocInterface wsdlDoc) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",new Object[]{html,opH});
  List<Element> inputs=opH.getInputTypes();
  if (inputs != null) {
    Iterator<Element> iter=inputs.iterator();
    while (iter.hasNext()) {
      Element elem=iter.next();
      html.append(getTextInSpan(HtmlUtils.getAnchorTag(null,"String_Node_Str" + SEPARATOR + elem.getType()+ Constants.DOT_HTML,elem.getType(),elem.getType()),"String_Node_Str"));
      html.append("String_Node_Str");
      html.append(getTextInSpan(elem.getName(),"String_Node_Str"));
      if (iter.hasNext()) {
        html.append("String_Node_Str");
      }
      ComplexType cType=wsdlDoc.searchCType(elem.getType());
      if (cType != null) {
        writeComplexTypeFile(wsdlDoc,cType,cType.getName());
      }
    }
  }
  logger.exiting("String_Node_Str","String_Node_Str",html);
}
Program: 81308
Project: 81308
Buggy source:
/** 
 * Builds the header.
 * @param html the html
 * @throws OutputFormatterException
 */
private void buildHeader(StringBuffer html,boolean isType,boolean isComplex,String typeName,String relPath,boolean isIndex,String keyLinks) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",html);
  String header=getFooterInformation(isType,isComplex,typeName,relPath,isIndex,keyLinks);
  html.append(header);
  logger.exiting("String_Node_Str","String_Node_Str",html);
}

Fixed version (ground truth):
/** 
 * Builds the header.
 * @param html the html
 * @throws OutputFormatterException
 */
private void buildHeader(StringBuffer html,Map<String,String> replacementMap,String hdrFileParameterName) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",html);
  String header=getFooterInformation(replacementMap,hdrFileParameterName);
  html.append(header);
  logger.exiting("String_Node_Str","String_Node_Str",html);
}
Program: 81313
Project: 81313
Buggy source:
public void createTreeFiles() throws OutputFormatterException {
  List<XSDDocInterface> allPackages=new ArrayList<XSDDocInterface>();
  for (  Map.Entry<String,List<XSDDocInterface>> entry : packageDocMap.entrySet()) {
    currentPackageName=entry.getKey();
    List<XSDDocInterface> list=entry.getValue();
    for (    XSDDocInterface xsd : list) {
      List<ComplexType> cTypes=xsd.getAllComplexTypes();
      for (      ComplexType cType : cTypes) {
        cType.setPackageName(((WSDLDocInterface)xsd).getPackageName());
      }
    }
    writePackageTree(list,getCurrentOutputDir() + File.separator + currentPackageName,false,currentPackageName);
    allPackages.addAll(entry.getValue());
  }
  writePackageTree(allPackages,getCurrentOutputDir(),true,null);
}

Fixed version (ground truth):
public void createTreeFiles() throws OutputFormatterException {
  List<XSDDocInterface> allPackages=new ArrayList<XSDDocInterface>();
  for (  Map.Entry<String,List<XSDDocInterface>> entry : packageDocMap.entrySet()) {
    currentPackageName=entry.getKey();
    List<XSDDocInterface> list=entry.getValue();
    for (    XSDDocInterface xsd : list) {
      List<ComplexType> cTypes=xsd.getAllComplexTypes();
      for (      ComplexType cType : cTypes) {
        cType.setPackageName(((WSDLDocInterface)xsd).getPackageName());
      }
    }
    writePackageTree(list,currentPackageName,false);
    allPackages.addAll(entry.getValue());
  }
  writePackageTree(allPackages,null,true);
}
Program: 81315
Project: 81315
Buggy source:
public ComplexType searchCType(String name){
  if (xsdDocument != null) {
    return this.xsdDocument.searchCType(name);
  }
  return xsdDocument.searchCType(name);
}

Fixed version (ground truth):
public ComplexType searchCType(String name){
  if (xsdDocument != null) {
    return this.xsdDocument.searchCType(name);
  }
  return null;
}
Program: 81316
Project: 81316
Buggy source:
public static StringBuffer processDeprication(ParsedAnnotationInfo annInfo){
  String deprVersion=getFirstAnnotationValue(annInfo,"String_Node_Str");
  String deprDetails=getFirstAnnotationValue(annInfo,"String_Node_Str");
  String useInstead=getFirstAnnotationValue(annInfo,"String_Node_Str");
  StringBuffer result=null;
  if (!Utils.isEmpty(deprVersion)) {
    result=new StringBuffer();
    result.append("String_Node_Str" + deprVersion + Constants.HTML_BR);
    result.append("String_Node_Str" + deprDetails + Constants.HTML_BR);
    result.append("String_Node_Str" + useInstead + Constants.HTML_BR);
  }
  return result;
}

Fixed version (ground truth):
public static StringBuffer processDeprication(ParsedAnnotationInfo annInfo){
  String deprVersion=getFirstAnnotationValue(annInfo,"String_Node_Str");
  String deprDetails=getFirstAnnotationValue(annInfo,"String_Node_Str");
  String useInstead=getFirstAnnotationValue(annInfo,"String_Node_Str");
  StringBuffer result=null;
  if (!Utils.isEmpty(deprVersion)) {
    result=new StringBuffer();
    result.append("String_Node_Str" + deprVersion + Constants.HTML_BR);
    if (!Utils.isEmpty(deprDetails)) {
      result.append("String_Node_Str" + deprDetails + Constants.HTML_BR);
    }
    if (!Utils.isEmpty(useInstead)) {
      result.append("String_Node_Str" + useInstead + Constants.HTML_BR);
    }
  }
  return result;
}
Program: 81317
Project: 81317
Buggy source:
/** 
 * Gets the help text.
 * @return the help text
 */
private static String getHelpText(){
  String help=null;
  InputStream is=Main.class.getClassLoader().getResourceAsStream("String_Node_Str");
  try {
    BufferedReader br=new BufferedReader(new InputStreamReader(is));
    StringBuffer sb=new StringBuffer();
    String line="String_Node_Str";
    while ((line=br.readLine()) != null) {
      sb.append(line + System.getProperty("String_Node_Str"));
    }
    help=sb.toString();
  }
 catch (  IOException e) {
    Logger.getLogger(Main.class.getName()).throwing(Main.class.getName(),"String_Node_Str",e);
  }
  return help;
}

Fixed version (ground truth):
/** 
 * Gets the help text.
 * @return text displayed when help option is supplied.
 */
private static String getHelpText(){
  String help=null;
  InputStream is=Main.class.getClassLoader().getResourceAsStream("String_Node_Str");
  try {
    BufferedReader br=new BufferedReader(new InputStreamReader(is));
    StringBuffer sb=new StringBuffer();
    String line="String_Node_Str";
    while ((line=br.readLine()) != null) {
      sb.append(line + System.getProperty("String_Node_Str"));
    }
    help=sb.toString();
  }
 catch (  IOException e) {
    Logger.getLogger(Main.class.getName()).throwing(Main.class.getName(),"String_Node_Str",e);
  }
  return help;
}
Program: 81318
Project: 81318
Buggy source:
/** 
 * Removes the empty values.
 * @param documentval the documentval
 * @return the list
 */
private static List<String> removeEmptyValues(String[] documentval){
  List<String> retList=new ArrayList<String>();
  for (  String value : documentval) {
    if (value != null && !Utils.isEmpty(value)) {
      retList.add(value);
    }
  }
  return retList;
}

Fixed version (ground truth):
/** 
 * Removes any empty values supplied as documents.
 * @param documentval the documentval
 * @return the list
 */
private static List<String> removeEmptyValues(String[] documentval){
  List<String> retList=new ArrayList<String>();
  for (  String value : documentval) {
    if (value != null && !Utils.isEmpty(value)) {
      retList.add(value);
    }
  }
  return retList;
}
Program: 81319
Project: 81319
Buggy source:
/** 
 * Gets the all operations.
 * @return the all operations
 */
public List<OperationHolder> getAllOperations();

Fixed version (ground truth):
/** 
 * Gets the all wsdl operations.
 * @return the all operations
 */
public List<OperationHolder> getAllOperations();
Program: 81320
Project: 81320
Buggy source:
/** 
 * Gets the port types.
 * @return the port types
 */
public List<PortType> getPortTypes();

Fixed version (ground truth):
/** 
 * Gets all the port types defined in WSDL.
 * @return the port types
 */
public List<PortType> getPortTypes();
Program: 81321
Project: 81321
Buggy source:
/** 
 * Gets the package name.
 * @return the package name
 */
public String getPackageName();

Fixed version (ground truth):
/** 
 * Gets the package name of the WSDL. Package name is the local part of the WSDL Service URL.
 * @return the package name
 */
public String getPackageName();
Program: 81322
Project: 81322
Buggy source:
/** 
 * Gets the annotations.
 * @return the annotations
 */
public ParsedAnnotationInfo getAnnotations();

Fixed version (ground truth):
/** 
 * Gets the annotations on the WSDL. Typically returns the annotation defined on the service element.
 * @return the annotations
 */
public ParsedAnnotationInfo getAnnotations();
Program: 81323
Project: 81323
Buggy source:
/** 
 * Gets the complete remote path.
 * @return the complete remote path
 */
public String getCompleteRemotePath();

Fixed version (ground truth):
/** 
 * Gets the complete remote address of the service endpoint.
 * @return the complete remote path
 */
public String getCompleteRemotePath();
Program: 81324
Project: 81324
Buggy source:
private Node getTypesInTree(List<XSDDocInterface> wsdlDoc){
  List<ComplexType> complexTypes=new ArrayList<ComplexType>();
  for (  XSDDocInterface xsdDocument : wsdlDoc) {
    if (xsdDocument.getAllComplexTypes() != null) {
      complexTypes.addAll(xsdDocument.getAllComplexTypes());
    }
  }
  Node root=new Node();
  root.setName("String_Node_Str");
  root.setLevel(0);
  for (  ComplexType type : complexTypes) {
    Node node=new Node();
    node.setName(type.getPackageName() + "String_Node_Str" + type.getName());
    node.setOriginalParent(type.getPackageName() + "String_Node_Str" + type.getParentType());
    getParent(root,node,type.getPackageName() + "String_Node_Str" + type.getParentType());
    if (!node.isNodeAdded()) {
      if (root.getChildren() == null) {
        root.setChildren(new TreeSet<Node>());
      }
      node.setParent(root);
      node.setLevel(root.getLevel() + 1);
      root.getChildren().add(node);
    }
    normalizeTree(type,root,node);
  }
  return root;
}

Fixed version (ground truth):
private Node getTypesInTree(List<XSDDocInterface> wsdlDoc){
  List<ComplexType> complexTypes=new ArrayList<ComplexType>();
  for (  XSDDocInterface xsdDocument : wsdlDoc) {
    if (xsdDocument.getAllComplexTypes() != null) {
      complexTypes.addAll(xsdDocument.getAllComplexTypes());
    }
  }
  Node root=new Node();
  root.setName("String_Node_Str");
  root.setLevel(0);
  for (  ComplexType type : complexTypes) {
    Node node=new Node();
    String packageName=type.getPackageName();
    if (packageName == null) {
      packageName="String_Node_Str";
    }
    node.setName(packageName + "String_Node_Str" + type.getName());
    node.setOriginalParent(packageName + "String_Node_Str" + type.getParentType());
    getParent(root,node,packageName + "String_Node_Str" + type.getParentType());
    if (!node.isNodeAdded()) {
      if (root.getChildren() == null) {
        root.setChildren(new TreeSet<Node>());
      }
      node.setParent(root);
      node.setLevel(root.getLevel() + 1);
      root.getChildren().add(node);
    }
    normalizeTree(type,root,node);
  }
  return root;
}
Program: 81325
Project: 81325
Buggy source:
private void printToFileIfApplicable(Object doc,OutputGenaratorParam outputGenaratorParam,String fileName) throws WsdlDocException {
  if (outputGenaratorParam.getParameters() != null) {
    if (outputGenaratorParam.getParameters().get("String_Node_Str") != null && "String_Node_Str".equals(outputGenaratorParam.getParameters().get("String_Node_Str"))) {
      String outFile=outputGenaratorParam.getParameters().get("String_Node_Str");
      if (outFile != null) {
        try {
          writeFile(doc.toString(),outFile,fileName);
        }
 catch (        IOException e) {
          throw new WsdlDocException(e);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void printToFileIfApplicable(Object doc,OutputGenaratorParam outputGenaratorParam,String fileName) throws WsdlDocException {
  if (outputGenaratorParam.getParameters() != null) {
    if (outputGenaratorParam.getParameters().get("String_Node_Str") != null && "String_Node_Str".equals(outputGenaratorParam.getParameters().get("String_Node_Str"))) {
      String outFile=outputGenaratorParam.getOutputDir();
      if (outFile != null) {
        try {
          writeFile(doc.toString(),outFile,fileName);
        }
 catch (        IOException e) {
          throw new WsdlDocException(e);
        }
      }
    }
  }
}
Program: 81326
Project: 81326
Buggy source:
/** 
 * Creates the all classes file.
 */
private void createAllClassesFile(){
  Set<String> set=packageServicesMap.keySet();
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  html.append(Constants.HTML_BOLD_START + Constants.ALL_CLASSES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
  for (  String packageName : set) {
    List<String> list=packageServicesMap.get(packageName);
    for (    String className : list) {
      html.append(HtmlUtils.getAnchorTag(className,"String_Node_Str" + SEPARATOR + packageName+ SEPARATOR+ className+ Constants.DOT_HTML,null,className,Constants.CLASSFRAME,null) + Constants.HTML_BR);
    }
  }
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.ALLCLASSES + Constants.DOT_HTML);
}

Fixed version (ground truth):
/** 
 * Creates the all classes file.
 * @throws OutputFormatterException 
 */
private void createAllClassesFile() throws OutputFormatterException {
  Set<String> set=packageServicesMap.keySet();
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  html.append(Constants.HTML_BOLD_START + Constants.ALL_CLASSES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
  for (  String packageName : set) {
    List<String> list=packageServicesMap.get(packageName);
    for (    String className : list) {
      html.append(HtmlUtils.getAnchorTag(className,"String_Node_Str" + SEPARATOR + packageName+ SEPARATOR+ className+ Constants.DOT_HTML,null,className,Constants.CLASSFRAME,null) + Constants.HTML_BR);
    }
  }
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.ALLCLASSES + Constants.DOT_HTML);
}
Program: 81327
Project: 81327
Buggy source:
public void generateWsdlOutput(WSDLDocInterface wsdlDoc,OutputGenaratorParam outputGenaratorParam){
  logger.entering("String_Node_Str","String_Node_Str",new Object[]{wsdlDoc,outputGenaratorParam});
  String packageName=wsdlDoc.getPackageName();
  this.outputGenaratorParam=outputGenaratorParam;
  if (packageName == null) {
    packageName="String_Node_Str";
  }
  currentTypesFolderPath=getCurrentOutputDir() + File.separator + packageName+ File.separator+ "String_Node_Str"+ File.separator;
  writeCssFiles();
  logger.logp(Level.INFO,"String_Node_Str","String_Node_Str","String_Node_Str");
  List<PortType> portTypes=wsdlDoc.getPortTypes();
  for (  PortType portType : portTypes) {
    StringBuffer html=new StringBuffer();
    html.append(HtmlUtils.getStartTags(wsdlDoc.getServiceName(),packageName));
    buildHeader(html);
    html.append(Constants.HTML_BR);
    buildPortType(html,portType,wsdlDoc);
    html.append(Constants.HTML_BR);
    buildOperationTable(html,portType,wsdlDoc);
    html.append(Constants.HTML_BR);
    buildOperationDetails(html,portType,wsdlDoc);
    addFooter(html);
    html.append(HtmlUtils.getEndTags());
    String outputDir=getCurrentOutputDir() + File.separator;
    writeFile(html,outputDir + File.separator + packageName,wsdlDoc.getServiceName() + Constants.DOT_HTML);
  }
  addPackageToServiceMap(packageName,wsdlDoc.getServiceName());
  processedTypes=new ArrayList<AbstractType>();
  logger.exiting("String_Node_Str","String_Node_Str",new Object[]{wsdlDoc,outputGenaratorParam});
}

Fixed version (ground truth):
public void generateWsdlOutput(WSDLDocInterface wsdlDoc,OutputGenaratorParam outputGenaratorParam) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",new Object[]{wsdlDoc,outputGenaratorParam});
  String packageName=wsdlDoc.getPackageName();
  this.outputGenaratorParam=outputGenaratorParam;
  if (packageName == null) {
    packageName="String_Node_Str";
  }
  currentTypesFolderPath=getCurrentOutputDir() + File.separator + packageName+ File.separator+ "String_Node_Str"+ File.separator;
  writeCssFiles();
  logger.logp(Level.INFO,"String_Node_Str","String_Node_Str","String_Node_Str");
  List<PortType> portTypes=wsdlDoc.getPortTypes();
  for (  PortType portType : portTypes) {
    StringBuffer html=new StringBuffer();
    html.append(HtmlUtils.getStartTags(wsdlDoc.getServiceName(),packageName));
    buildHeader(html);
    html.append(Constants.HTML_BR);
    buildPortType(html,portType,wsdlDoc);
    html.append(Constants.HTML_BR);
    buildOperationTable(html,portType,wsdlDoc);
    html.append(Constants.HTML_BR);
    buildOperationDetails(html,portType,wsdlDoc);
    addFooter(html);
    html.append(HtmlUtils.getEndTags());
    String outputDir=getCurrentOutputDir() + File.separator;
    writeFile(html,outputDir + File.separator + packageName,wsdlDoc.getServiceName() + Constants.DOT_HTML);
  }
  addPackageToServiceMap(packageName,wsdlDoc.getServiceName());
  processedTypes=new ArrayList<AbstractType>();
  logger.exiting("String_Node_Str","String_Node_Str",new Object[]{wsdlDoc,outputGenaratorParam});
}
Program: 81328
Project: 81328
Buggy source:
/** 
 * Write css files.
 */
private void writeCssFiles(){
  InputStream is=this.getClass().getClassLoader().getResourceAsStream("String_Node_Str");
  try {
    BufferedReader br=new BufferedReader(new InputStreamReader(is));
    StringBuffer sb=new StringBuffer();
    String line="String_Node_Str";
    while ((line=br.readLine()) != null) {
      sb.append(line);
    }
    String outputDir=getCurrentOutputDir();
    writeFile(sb,outputDir + File.separator + "String_Node_Str","String_Node_Str");
    if (Context.getContext().getCssFilePath() != null) {
      sb=new StringBuffer();
      while ((line=br.readLine()) != null) {
        sb.append(line);
      }
      writeFile(sb,outputDir + File.separator + "String_Node_Str","String_Node_Str");
    }
  }
 catch (  IOException e) {
    logger.severe(e.getMessage());
  }
}

Fixed version (ground truth):
/** 
 * Write css files.
 * @throws OutputFormatterException 
 */
private void writeCssFiles() throws OutputFormatterException {
  InputStream is=this.getClass().getClassLoader().getResourceAsStream("String_Node_Str");
  try {
    BufferedReader br=new BufferedReader(new InputStreamReader(is));
    StringBuffer sb=new StringBuffer();
    String line="String_Node_Str";
    while ((line=br.readLine()) != null) {
      sb.append(line);
    }
    String outputDir=getCurrentOutputDir();
    writeFile(sb,outputDir + File.separator + "String_Node_Str","String_Node_Str");
    if (Context.getContext().getCssFilePath() != null) {
      sb=new StringBuffer();
      while ((line=br.readLine()) != null) {
        sb.append(line);
      }
      writeFile(sb,outputDir + File.separator + "String_Node_Str","String_Node_Str");
    }
  }
 catch (  IOException e) {
    logger.severe(e.getMessage());
  }
}
Program: 81329
Project: 81329
Buggy source:
public void completeProcessing(){
  if (packageServicesMap != null && !packageServicesMap.isEmpty()) {
    createAllPackagesFile();
    createAllPackagesDescriptionFile();
    createIndividualPackageFiles();
    createAllClassesFile();
    createIndexFile();
  }
}

Fixed version (ground truth):
public void completeProcessing() throws OutputFormatterException {
  if (packageServicesMap != null && !packageServicesMap.isEmpty()) {
    createAllPackagesFile();
    createAllPackagesDescriptionFile();
    createIndividualPackageFiles();
    createAllClassesFile();
    createIndexFile();
  }
}