nus-yam/ex-repair huggingface dataset:
Program: 81330
Project: 81330
Buggy source:
/** 
 * Creates the index file.
 */
private void createIndexFile(){
  StringBuffer html=new StringBuffer(200);
  html.append("String_Node_Str");
  html.append("String_Node_Str");
  html.append("String_Node_Str" + Constants.PACKAGES.toLowerCase() + Constants.DOT_HTML+ "String_Node_Str");
  html.append("String_Node_Str" + Constants.ALLCLASSES.toLowerCase() + Constants.DOT_HTML+ "String_Node_Str"+ Constants.CLASSESFRAME+ "String_Node_Str");
  html.append("String_Node_Str");
  html.append("String_Node_Str" + Constants.PACKAGES.toLowerCase() + Constants.INDEX+ Constants.DOT_HTML+ "String_Node_Str"+ Constants.CLASSFRAME+ "String_Node_Str");
  html.append("String_Node_Str");
  writeFile(html,getCurrentOutputDir(),Constants.INDEX + Constants.DOT_HTML);
}

Fixed version (ground truth):
/** 
 * Creates the index file.
 * @throws OutputFormatterException 
 */
private void createIndexFile() throws OutputFormatterException {
  StringBuffer html=new StringBuffer(200);
  html.append("String_Node_Str");
  html.append("String_Node_Str");
  html.append("String_Node_Str" + Constants.PACKAGES.toLowerCase() + Constants.DOT_HTML+ "String_Node_Str");
  html.append("String_Node_Str" + Constants.ALLCLASSES.toLowerCase() + Constants.DOT_HTML+ "String_Node_Str"+ Constants.CLASSESFRAME+ "String_Node_Str");
  html.append("String_Node_Str");
  html.append("String_Node_Str" + Constants.PACKAGES.toLowerCase() + Constants.INDEX+ Constants.DOT_HTML+ "String_Node_Str"+ Constants.CLASSFRAME+ "String_Node_Str");
  html.append("String_Node_Str");
  writeFile(html,getCurrentOutputDir(),Constants.INDEX + Constants.DOT_HTML);
}
Program: 81331
Project: 81331
Buggy source:
/** 
 * Creates the all packages file.
 */
private void createAllPackagesFile(){
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.PACKAGES,null));
  Set<String> set=packageServicesMap.keySet();
  html.append(Constants.HTML_BOLD_START + Constants.PACKAGES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
  for (  String packageName : set) {
    html.append(HtmlUtils.getAnchorTag(packageName,"String_Node_Str" + SEPARATOR + packageName+ SEPARATOR+ Constants.ALLCLASSES+ Constants.DOT_HTML,null,packageName,Constants.CLASSESFRAME,null) + Constants.HTML_BR);
  }
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.PACKAGES.toLowerCase() + Constants.DOT_HTML);
}

Fixed version (ground truth):
/** 
 * Creates the all packages file.
 * @throws OutputFormatterException 
 */
private void createAllPackagesFile() throws OutputFormatterException {
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.PACKAGES,null));
  Set<String> set=packageServicesMap.keySet();
  html.append(Constants.HTML_BOLD_START + Constants.PACKAGES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
  for (  String packageName : set) {
    html.append(HtmlUtils.getAnchorTag(packageName,"String_Node_Str" + SEPARATOR + packageName+ SEPARATOR+ Constants.ALLCLASSES+ Constants.DOT_HTML,null,packageName,Constants.CLASSESFRAME,null) + Constants.HTML_BR);
  }
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.PACKAGES.toLowerCase() + Constants.DOT_HTML);
}
Program: 81332
Project: 81332
Buggy source:
/** 
 * Creates the all packages description file.
 */
private void createAllPackagesDescriptionFile(){
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getStartTags(Constants.ALL_CLASSES,null));
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  addFooter(html);
  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));
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  addFooter(html);
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.PACKAGES.toLowerCase() + Constants.INDEX + Constants.DOT_HTML);
}
Program: 81334
Project: 81334
Buggy source:
/** 
 * Write file.
 * @param html the html
 * @param dir the dir
 * @param fileName the file name
 */
private void writeFile(StringBuffer html,String dir,String fileName){
  try {
    File file=new File(dir);
    file.mkdirs();
    FileWriter fw=new FileWriter(dir + File.separator + fileName);
    fw.write(html.toString());
    fw.flush();
    fw.close();
  }
 catch (  IOException e) {
    new OutputFormatterException(e);
  }
}

Fixed version (ground truth):
/** 
 * Write file.
 * @param html the html
 * @param dir the dir
 * @param fileName the file name
 * @throws OutputFormatterException 
 */
private void writeFile(StringBuffer html,String dir,String fileName) throws OutputFormatterException {
  try {
    File file=new File(dir);
    file.mkdirs();
    FileWriter fw=new FileWriter(dir + File.separator + fileName);
    fw.write(html.toString());
    fw.flush();
    fw.close();
  }
 catch (  IOException e) {
    throw new OutputFormatterException(e);
  }
}
Program: 81335
Project: 81335
Buggy source:
/** 
 * Creates the individual package files.
 */
private void createIndividualPackageFiles(){
  Set<String> set=packageServicesMap.keySet();
  for (  String packageName : set) {
    List<String> list=packageServicesMap.get(packageName);
    StringBuffer html=new StringBuffer();
    html.append(HtmlUtils.getStartTags(Constants.CLASSES,packageName));
    html.append(Constants.HTML_BOLD_START + Constants.CLASSES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
    for (    String className : list) {
      html.append(HtmlUtils.getAnchorTag(className,className + Constants.DOT_HTML,null,className,Constants.CLASSFRAME,null) + Constants.HTML_BR);
    }
    html.append(HtmlUtils.getEndTags());
    writeFile(html,getCurrentOutputDir() + packageName,Constants.ALLCLASSES + Constants.DOT_HTML);
  }
}

Fixed version (ground truth):
/** 
 * Creates the individual package files.
 * @throws OutputFormatterException 
 */
private void createIndividualPackageFiles() throws OutputFormatterException {
  Set<String> set=packageServicesMap.keySet();
  for (  String packageName : set) {
    List<String> list=packageServicesMap.get(packageName);
    StringBuffer html=new StringBuffer();
    html.append(HtmlUtils.getStartTags(Constants.CLASSES,packageName));
    html.append(Constants.HTML_BOLD_START + Constants.CLASSES + Constants.HTML_BOLD_END+ Constants.HTML_BR);
    for (    String className : list) {
      html.append(HtmlUtils.getAnchorTag(className,className + Constants.DOT_HTML,null,className,Constants.CLASSFRAME,null) + Constants.HTML_BR);
    }
    html.append(HtmlUtils.getEndTags());
    writeFile(html,getCurrentOutputDir() + packageName,Constants.ALLCLASSES + Constants.DOT_HTML);
  }
}
Program: 81343
Project: 81343
Buggy source:
/** 
 * Gets the start tags.
 * @param title the title
 * @param currLocFromBase the curr loc from base
 * @return the start tags
 */
public static String getStartTags(String title,String currLocFromBase){
  List<String> cssList=new ArrayList<String>();
  cssList.add("String_Node_Str");
  if (Context.getContext().getCssFilePath() != null && !Utils.isEmpty(Context.getContext().getCssFilePath())) {
    cssList.add("String_Node_Str");
  }
  String relPath="String_Node_Str";
  if (currLocFromBase != null) {
    String[] folders=currLocFromBase.split("String_Node_Str");
    for (    String folder : folders) {
      relPath=relPath + "String_Node_Str";
    }
  }
  String tag="String_Node_Str" + title + "String_Node_Str";
  for (  String css : cssList) {
    tag+="String_Node_Str" + relPath + "String_Node_Str"+ css+ "String_Node_Str";
  }
  tag+="String_Node_Str";
  return tag;
}

Fixed version (ground truth):
/** 
 * Gets the start tags.
 * @param title the title
 * @param currLocFromBase the curr loc from base
 * @return the start tags
 */
public static String getStartTags(String title,String currLocFromBase){
  List<String> cssList=new ArrayList<String>();
  cssList.add("String_Node_Str");
  if (Context.getContext().getCssFilePath() != null && !Utils.isEmpty(Context.getContext().getCssFilePath())) {
    cssList.add("String_Node_Str");
  }
  String relPath="String_Node_Str";
  if (currLocFromBase != null && "String_Node_Str".equals(currLocFromBase)) {
    System.out.println(currLocFromBase);
  }
  if (currLocFromBase != null) {
    String[] folders=currLocFromBase.split("String_Node_Str");
    for (    String folder : folders) {
      relPath=relPath + "String_Node_Str";
    }
  }
  String tag="String_Node_Str" + title + "String_Node_Str";
  for (  String css : cssList) {
    tag+="String_Node_Str" + relPath + "String_Node_Str"+ css+ "String_Node_Str";
  }
  tag+="String_Node_Str";
  return tag;
}
Program: 81345
Project: 81345
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 && 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.INFO,"String_Node_Str",sib);
  return sib;
}
Program: 81346
Project: 81346
Buggy source:
/** 
 * Adds the footer.
 * @param html the html
 */
private void addFooter(StringBuffer html){
  logger.entering("String_Node_Str","String_Node_Str",html);
  String content=getFooterInformation();
  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,boolean isType,boolean isComplexType,String typeName) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",html);
  String content=getFooterInformation(isType,isComplexType,typeName);
  html.append(getTextInDiv(content,"String_Node_Str"));
  html.append(HtmlUtils.getEndTags());
  logger.exiting("String_Node_Str","String_Node_Str",html);
}
Program: 81347
Project: 81347
Buggy source:
/** 
 * Gets the footer information. This method can be over ridden to supply Footer.
 * @return the footer information
 */
protected String getFooterInformation(){
  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(boolean isType,boolean isComplex,String typeName) throws OutputFormatterException {
  String parameterName=isType ? (isComplex ? "String_Node_Str" : "String_Node_Str") : "String_Node_Str";
  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="String_Node_Str" + header;
      return header;
    }
 catch (    IOException e) {
      throw new OutputFormatterException(e);
    }
  }
  return "String_Node_Str";
}
Program: 81349
Project: 81349
Buggy source:
public void completeProcessing() throws OutputFormatterException {
  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();
    createTreeFiles();
  }
}
Program: 81350
Project: 81350
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));
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  addFooter(html);
  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));
  html.append(getTextInDiv("String_Node_Str","String_Node_Str"));
  html.append(Constants.HTML_BR);
  html.append(HtmlUtils.getEndTags());
  writeFile(html,getCurrentOutputDir(),Constants.PACKAGES.toLowerCase() + Constants.INDEX + Constants.DOT_HTML);
}
Program: 81353
Project: 81353
Buggy source:
private void writePackageTree(WSDLDocInterface wsdlDoc) throws OutputFormatterException {
  Node root=getTypesInTree(wsdlDoc);
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str"));
  html.append(Constants.HTML_HR);
  html.append(Constants.HTML_H3_START + "String_Node_Str" + wsdlDoc.getPackageName()+ Constants.HTML_H3_END);
  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);
  html.append("String_Node_Str");
  writeFile(html,getCurrentOutputDir(),"String_Node_Str" + Constants.DOT_HTML);
  System.out.println(root);
}

Fixed version (ground truth):
private void writePackageTree(List<XSDDocInterface> wsdlDoc) throws OutputFormatterException {
  Node root=getTypesInTree(wsdlDoc);
  StringBuffer html=new StringBuffer();
  html.append(Constants.HTML_H3_START + "String_Node_Str" + currentPackageName+ Constants.HTML_H3_END);
  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);
  html.append("String_Node_Str");
  writeFile(html,getCurrentOutputDir() + File.separator + currentPackageName,"String_Node_Str" + Constants.DOT_HTML);
}
Program: 81354
Project: 81354
Buggy source:
/** 
 * Builds the header.
 * @param html the html
 */
private void buildHeader(StringBuffer html){
  logger.entering("String_Node_Str","String_Node_Str",html);
  String relPath="String_Node_Str";
  if (currentPackageName != null) {
    String[] folders=currentPackageName.split("String_Node_Str");
    for (    String folder : folders) {
      relPath=relPath + "String_Node_Str";
    }
  }
  html.append(HtmlUtils.getAnchorTag(null,relPath + "String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str"));
  html.append(Constants.HTML_HR);
  html.append(HtmlUtils.getAnchorTag("String_Node_Str",null,null,null));
  html.append(getTableTagWithStyle("String_Node_Str"));
  html.append(getTableRowTagWithStyle("String_Node_Str"));
  html.append(getTableDataTagWithStyle("String_Node_Str"));
  html.append("String_Node_Str");
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str" + Constants.OPERATION_SUMMARY_HREF,Constants.OPERATIONS_LABEL,Constants.OPERATIONS_LABEL));
  html.append(Constants.HTML_TABLE_TD_END);
  html.append(getTableDataTagWithStyle("String_Node_Str"));
  html.append("String_Node_Str");
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str" + Constants.OPERATIONS_DETAIL_HREF,Constants.OPERATIONS_LABEL,Constants.OPERATIONS_LABEL));
  html.append(Constants.HTML_TABLE_TD_END);
  html.append(Constants.HTML_TABLE_TR_END);
  html.append(Constants.HTML_TABLE_END);
  html.append(Constants.HTML_HR);
  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,boolean isType,boolean isComplex,String typeName) throws OutputFormatterException {
  logger.entering("String_Node_Str","String_Node_Str",html);
  String parameterName=isType ? (isComplex ? "String_Node_Str" : "String_Node_Str") : "String_Node_Str";
  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);
      if (typeName != null) {
        header=header.replaceAll("String_Node_Str",typeName);
      }
      html.append(header);
    }
 catch (    IOException e) {
      throw new OutputFormatterException(e);
    }
  }
  logger.exiting("String_Node_Str","String_Node_Str",html);
}
Program: 81355
Project: 81355
Buggy source:
private Node getTypesInTree(WSDLDocInterface wsdlDoc){
  XSDDocInterface xsdDocument=((WSDLDocument)wsdlDoc).getXsdDocument();
  List<ComplexType> complexTypes=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.getName());
    node.setOriginalParent(type.getParentType());
    getParent(root,node,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();
    node.setName(type.getName());
    node.setOriginalParent(type.getParentType());
    getParent(root,node,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: 81356
Project: 81356
Buggy source:
private void writeTree(Node root,StringBuffer html){
  Set<Node> children=root.getChildren();
  if (children != null) {
    html.append("String_Node_Str");
    for (    Node node : children) {
      if (node.isFlag()) {
        html.append("String_Node_Str");
        html.append(HtmlUtils.getAnchorTag("String_Node_Str","String_Node_Str" + currentPackageName + "String_Node_Str"+ node.getName()+ Constants.DOT_HTML,"String_Node_Str",node.getName()) + Constants.HTML_BR);
        writeTree(node,html);
      }
    }
    if (children.size() != 0) {
      html.append("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void writeTree(Node root,StringBuffer html){
  Set<Node> children=root.getChildren();
  if (children != null) {
    html.append("String_Node_Str");
    for (    Node node : children) {
      if (node.isFlag()) {
        html.append("String_Node_Str");
        html.append(HtmlUtils.getAnchorTag("String_Node_Str","String_Node_Str" + node.getName() + Constants.DOT_HTML,"String_Node_Str",node.getName()) + Constants.HTML_BR);
        writeTree(node,html);
      }
    }
    if (children.size() != 0) {
      html.append("String_Node_Str");
    }
  }
}
Program: 81358
Project: 81358
Buggy source:
/** 
 * Parses the annotation.
 * @param namespacePrefix the namespace prefix
 * @param elem the elem
 * @return parses annotation dom element and populates its POJOrepresentation ParsedAnnotationInfo
 */
private ParsedAnnotationInfo parseAnnotation(org.w3c.dom.Element node){
  logger.log(Level.FINER,"String_Node_Str",node);
  ParsedAnnotationInfo info=null;
  if (node != null) {
    info=new ParsedAnnotationInfo();
    String documentation="String_Node_Str";
    for (Node childNode=node.getFirstChild(); childNode != null; ) {
      Node nextChild=childNode.getNextSibling();
      if (childNode.getNodeType() == Node.ELEMENT_NODE) {
        String tagName=childNode.getNodeName();
        AnnotationParser parser=getAnnotationParser(tagName);
        if (parser != null) {
          ParsedAnnotationTag parsedData=parser.parseAnnotation((org.w3c.dom.Element)childNode);
          info.addParsedAnnotationTag(tagName,parsedData);
        }
      }
 else       if (childNode.getNodeType() == Node.TEXT_NODE) {
        documentation=documentation + childNode.getNodeValue();
      }
      childNode=nextChild;
    }
    if (!Utils.isEmpty(documentation)) {
      info.setDocumentation(documentation);
    }
  }
  logger.log(Level.FINER,"String_Node_Str",info);
  return info;
}

Fixed version (ground truth):
/** 
 * Parses the annotation.
 * @param namespacePrefix the namespace prefix
 * @param elem the elem
 * @return parses annotation dom element and populates its POJOrepresentation ParsedAnnotationInfo
 */
private ParsedAnnotationInfo parseAnnotation(org.w3c.dom.Element node){
  logger.log(Level.FINER,"String_Node_Str",node);
  ParsedAnnotationInfo info=null;
  if (node != null) {
    info=new ParsedAnnotationInfo();
    processDocumentation(node,info);
  }
  logger.log(Level.FINER,"String_Node_Str",info);
  return info;
}
Program: 81359
Project: 81359
Buggy source:
/** 
 * Parses the annotation.
 * @param namespacePrefix the namespace prefix
 * @param elem the elem
 * @return parses annotation dom element and populates its POJOrepresentation ParsedAnnotationInfo
 */
private ParsedAnnotationInfo parseAnnotation(org.w3c.dom.Element elem){
  logger.log(Level.FINER,"String_Node_Str",elem);
  NodeList docElementList=(NodeList)elem.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  org.w3c.dom.Element docElement=(org.w3c.dom.Element)docElementList.item(0);
  ParsedAnnotationInfo info=new ParsedAnnotationInfo();
  if (docElement != null) {
    String documentation=docElement.getTextContent();
    info.setDocumentation(documentation);
  }
  NodeList annoElementList=(NodeList)elem.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  org.w3c.dom.Element node=(org.w3c.dom.Element)annoElementList.item(0);
  if (node != null) {
    for (Node childNode=node.getFirstChild(); childNode != null; ) {
      Node nextChild=childNode.getNextSibling();
      if (childNode.getNodeType() == Node.ELEMENT_NODE) {
        String tagName=childNode.getNodeName();
        AnnotationParser parser=getAnnotationParser(tagName);
        if (parser != null) {
          ParsedAnnotationTag parsedData=parser.parseAnnotation((org.w3c.dom.Element)childNode);
          info.addParsedAnnotationTag(tagName,parsedData);
        }
      }
      childNode=nextChild;
    }
  }
  logger.log(Level.FINER,"String_Node_Str",info);
  return info;
}

Fixed version (ground truth):
/** 
 * Parses the annotation.
 * @param namespacePrefix the namespace prefix
 * @param elem the elem
 * @return parses annotation dom element and populates its POJOrepresentation ParsedAnnotationInfo
 */
private ParsedAnnotationInfo parseAnnotation(org.w3c.dom.Element elem){
  logger.log(Level.FINER,"String_Node_Str",elem);
  NodeList docElementList=(NodeList)elem.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  org.w3c.dom.Element docElement=(org.w3c.dom.Element)docElementList.item(0);
  ParsedAnnotationInfo info=new ParsedAnnotationInfo();
  if (docElement != null) {
    processDocumentation(docElement,info);
  }
  NodeList annoElementList=(NodeList)elem.getElementsByTagNameNS("String_Node_Str","String_Node_Str");
  org.w3c.dom.Element node=(org.w3c.dom.Element)annoElementList.item(0);
  if (node != null) {
    for (Node childNode=node.getFirstChild(); childNode != null; ) {
      Node nextChild=childNode.getNextSibling();
      if (childNode.getNodeType() == Node.ELEMENT_NODE) {
        String tagName=childNode.getNodeName();
        AnnotationParser parser=getAnnotationParser(tagName);
        if (parser != null) {
          ParsedAnnotationTag parsedData=parser.parseAnnotation((org.w3c.dom.Element)childNode);
          info.addParsedAnnotationTag(tagName,parsedData);
        }
      }
      childNode=nextChild;
    }
  }
  logger.log(Level.FINER,"String_Node_Str",info);
  return info;
}
Program: 81360
Project: 81360
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,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);
    if (packageName.startsWith("String_Node_Str")) {
      packageName=packageName.substring(1);
    }
    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: 81362
Project: 81362
Buggy source:
private void writePackageTree(WSDLDocInterface wsdlDoc) throws OutputFormatterException {
  Node root=getTypesInTree(wsdlDoc);
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str"));
  html.append(Constants.HTML_HR);
  html.append(Constants.HTML_H3_START + "String_Node_Str" + wsdlDoc.getPackageName()+ Constants.HTML_H3_END);
  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,wsdlDoc.getPackageName());
  html.append("String_Node_Str");
  writeFile(html,getCurrentOutputDir(),"String_Node_Str" + Constants.DOT_HTML);
  System.out.println(root);
}

Fixed version (ground truth):
private void writePackageTree(WSDLDocInterface wsdlDoc) throws OutputFormatterException {
  Node root=getTypesInTree(wsdlDoc);
  StringBuffer html=new StringBuffer();
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str") + Constants.NBSP_TWICE);
  html.append(HtmlUtils.getAnchorTag(null,"String_Node_Str",null,"String_Node_Str"));
  html.append(Constants.HTML_HR);
  html.append(Constants.HTML_H3_START + "String_Node_Str" + wsdlDoc.getPackageName()+ Constants.HTML_H3_END);
  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);
  html.append("String_Node_Str");
  writeFile(html,getCurrentOutputDir(),"String_Node_Str" + Constants.DOT_HTML);
  System.out.println(root);
}
Program: 81363
Project: 81363
Buggy source:
private void writeTree(Node root,StringBuffer html,String packageName){
  Set<Node> children=root.getChildren();
  if (children != null) {
    html.append("String_Node_Str");
    for (    Node node : children) {
      if (node.isFlag()) {
        html.append("String_Node_Str");
        html.append(HtmlUtils.getAnchorTag("String_Node_Str","String_Node_Str" + packageName + "String_Node_Str"+ node.getName()+ Constants.DOT_HTML,"String_Node_Str",node.getName()) + Constants.HTML_BR);
        writeTree(node,html,packageName);
      }
    }
    if (children.size() != 0) {
      html.append("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
private void writeTree(Node root,StringBuffer html){
  Set<Node> children=root.getChildren();
  if (children != null) {
    html.append("String_Node_Str");
    for (    Node node : children) {
      if (node.isFlag()) {
        html.append("String_Node_Str");
        html.append(HtmlUtils.getAnchorTag("String_Node_Str","String_Node_Str" + currentPackageName + "String_Node_Str"+ node.getName()+ Constants.DOT_HTML,"String_Node_Str",node.getName()) + Constants.HTML_BR);
        writeTree(node,html);
      }
    }
    if (children.size() != 0) {
      html.append("String_Node_Str");
    }
  }
}
Program: 81365
Project: 81365
Buggy source:
/** 
 * Gets the start tags.
 * @param title the title
 * @param currLocFromBase the curr loc from base
 * @return the start tags
 */
public static String getStartTags(String title,String currLocFromBase){
  List<String> cssList=new ArrayList<String>();
  cssList.add("String_Node_Str");
  if (Context.getContext().getCssFilePath() != null && !Utils.isEmpty(Context.getContext().getCssFilePath())) {
    cssList.add("String_Node_Str");
  }
  String relPath="String_Node_Str";
  if (currLocFromBase != null && "String_Node_Str".equals(currLocFromBase)) {
    System.out.println(currLocFromBase);
  }
  if (currLocFromBase != null) {
    String[] folders=currLocFromBase.split("String_Node_Str");
    for (    String folder : folders) {
      relPath=relPath + "String_Node_Str";
    }
  }
  String tag="String_Node_Str" + title + "String_Node_Str";
  for (  String css : cssList) {
    tag+="String_Node_Str" + relPath + "String_Node_Str"+ css+ "String_Node_Str";
  }
  tag+="String_Node_Str";
  return tag;
}

Fixed version (ground truth):
/** 
 * Gets the start tags.
 * @param title the title
 * @param currLocFromBase the curr loc from base
 * @return the start tags
 */
public static String getStartTags(String title,String currLocFromBase){
  List<String> cssList=new ArrayList<String>();
  cssList.add("String_Node_Str");
  if (Context.getContext().getCssFilePath() != null && !Utils.isEmpty(Context.getContext().getCssFilePath())) {
    cssList.add("String_Node_Str");
  }
  String relPath="String_Node_Str";
  if (currLocFromBase != null) {
    if (currLocFromBase.startsWith("String_Node_Str")) {
      currLocFromBase=currLocFromBase.substring(1);
    }
    String[] folders=currLocFromBase.split("String_Node_Str");
    for (    String folder : folders) {
      relPath=relPath + "String_Node_Str";
    }
  }
  String tag="String_Node_Str" + title + "String_Node_Str";
  for (  String css : cssList) {
    tag+="String_Node_Str" + relPath + "String_Node_Str"+ css+ "String_Node_Str";
  }
  tag+="String_Node_Str";
  return tag;
}
Program: 81366
Project: 81366
Buggy source:
/** 
 * Sets the up.
 * @throws Exception the exception
 */
@Before public void setUp() throws Exception {
  String xsdPath=this.getClass().getClassLoader().getResource("String_Node_Str").toExternalForm();
  Context.getContext().addParser("String_Node_Str",new TestAnnoParserClass());
  XSDParser parser=new XSDParserImpl();
  xsdIntf=parser.parse(xsdPath);
}

Fixed version (ground truth):
/** 
 * Sets the up.
 * @throws Exception the exception
 */
@Before public void setUp() throws Exception {
  String xsdPath=this.getClass().getClassLoader().getResource("String_Node_Str").toExternalForm();
  ConfigurationReader.loadDefaultConfiguration();
  Context.getContext().addParser("String_Node_Str",new TestAnnoParserClass());
  XSDParser parser=new XSDParserImpl();
  xsdIntf=parser.parse(xsdPath);
}
Program: 81369
Project: 81369
Buggy source:
/** 
 * Sets the up.
 * @throws Exception the exception
 */
@Before public void setUp() throws Exception {
  this.xsdPath=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 {
  this.xsdPath=this.getClass().getClassLoader().getResource("String_Node_Str").toExternalForm();
  ConfigurationReader.loadDefaultConfiguration();
  Context.getContext().addParser("String_Node_Str",new TestAnnoParserClass());
}
Program: 81370
Project: 81370
Buggy source:
public static List<Injector> getDefaultInjectors(Object managed){
  List<Injector> result=new ArrayList<Injector>();
  if (managed instanceof Activity) {
    result.add(new ViewInjector());
    result.add(new ServiceInjector());
    result.add(new IntentExtraInjector());
    result.add(new LayoutInjector());
    result.add(new ObjectInjector());
    result.add(new ResourceInjector());
  }
  if (managed instanceof Fragment) {
    result.add(new ViewInjector());
    result.add(new ServiceInjector());
    result.add(new ResourceInjector());
    result.add(new IntentExtraInjector());
    result.add(new ObjectInjector());
  }
  if (managed instanceof android.app.Fragment) {
    result.add(new ViewInjector());
    result.add(new ServiceInjector());
    result.add(new ResourceInjector());
    result.add(new IntentExtraInjector());
    result.add(new ObjectInjector());
  }
  return result;
}

Fixed version (ground truth):
public static List<Injector> getDefaultInjectors(Object managed){
  List<Injector> result=new ArrayList<Injector>();
  if (managed instanceof Activity) {
    result.add(new ViewInjector());
    result.add(new ServiceInjector());
    result.add(new IntentExtraInjector());
    result.add(new LayoutInjector());
    result.add(new ObjectInjector());
    result.add(new ResourceInjector());
  }
  if (managed instanceof Fragment) {
    result.add(new ViewInjector());
    result.add(new ServiceInjector());
    result.add(new ResourceInjector());
    result.add(new IntentExtraInjector());
    result.add(new ObjectInjector());
  }
  try {
    if (managed instanceof android.app.Fragment) {
      result.add(new ViewInjector());
      result.add(new ServiceInjector());
      result.add(new ResourceInjector());
      result.add(new IntentExtraInjector());
      result.add(new ObjectInjector());
    }
  }
 catch (  NoClassDefFoundError e) {
  }
  return result;
}
Program: 81371
Project: 81371
Buggy source:
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  if (managed instanceof android.app.Fragment) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  try {
    if (managed instanceof android.app.Fragment) {
      return true;
    }
  }
 catch (  NoClassDefFoundError e) {
  }
  return false;
}
Program: 81372
Project: 81372
Buggy source:
@Override public void onCreate(){
  InjectLayout layoutAnnotation=ReflectionUtil.getAnnotation(managed.getClass(),InjectLayout.class);
  if (layoutAnnotation != null) {
    int id=AndroidUtil.getIdentifierFromR(activity,"String_Node_Str",layoutAnnotation.value());
    if (managed instanceof Activity) {
      ((Activity)managed).setContentView(id);
    }
    if (managed instanceof Fragment || managed instanceof android.app.Fragment)     throw new RuntimeException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onCreate(){
  InjectLayout layoutAnnotation=ReflectionUtil.getAnnotation(managed.getClass(),InjectLayout.class);
  if (layoutAnnotation != null) {
    int id=AndroidUtil.getIdentifierFromR(activity,"String_Node_Str",layoutAnnotation.value());
    if (managed instanceof Activity) {
      ((Activity)managed).setContentView(id);
    }
    try {
      if (managed instanceof Fragment || managed instanceof android.app.Fragment)       throw new RuntimeException("String_Node_Str");
    }
 catch (    NoClassDefFoundError e) {
    }
  }
}
Program: 81373
Project: 81373
Buggy source:
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws de.akquinet.android.roboject.RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  if (managed instanceof android.app.Fragment) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws de.akquinet.android.roboject.RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  try {
    if (managed instanceof android.app.Fragment) {
      return true;
    }
  }
 catch (  NoClassDefFoundError e) {
  }
  return false;
}
Program: 81374
Project: 81374
Buggy source:
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws de.akquinet.android.roboject.RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  if (managed instanceof android.app.Fragment) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws de.akquinet.android.roboject.RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  try {
    if (managed instanceof android.app.Fragment) {
      return true;
    }
  }
 catch (  NoClassDefFoundError e) {
  }
  return false;
}
Program: 81375
Project: 81375
Buggy source:
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws de.akquinet.android.roboject.RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  if (managed instanceof android.app.Fragment) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Method called by the container to initialize the container.
 * @param context   the android context
 * @param container the roboject container
 * @param managed   the managed instance
 * @param clazz     the managed class (the class of <tt>managed</tt>)
 * @return <code>true</code> if the injector wants to contribute to themanagement of the instance, <code>false</code> otherwise. In this latter case, the injector will be ignored for this instance.
 * @throws de.akquinet.android.roboject.RobojectException if the configuration failed.
 */
@Override public boolean configure(Context context,Container container,Object managed,Class<?> clazz) throws RobojectException {
  if (context instanceof Activity) {
    this.activity=(Activity)context;
  }
 else {
    return false;
  }
  this.managed=managed;
  if (managed instanceof Activity) {
    return true;
  }
  if (managed instanceof Fragment) {
    return true;
  }
  try {
    if (managed instanceof android.app.Fragment) {
      return true;
    }
  }
 catch (  NoClassDefFoundError e) {
  }
  return false;
}