Program: 64128
Project: 64128
Buggy source:
private void processNamedObjectGraphs(JavaClass javaClass,TypeInfo info){
  ArrayList<XmlNamedObjectGraph> objectGraphs=new ArrayList<XmlNamedObjectGraph>();
  if (helper.isAnnotationPresent(javaClass,XmlNamedObjectGraphs.class)) {
    XmlNamedObjectGraphs graphs=(XmlNamedObjectGraphs)helper.getAnnotation(javaClass,XmlNamedObjectGraphs.class);
    for (    XmlNamedObjectGraph next : graphs.value()) {
      objectGraphs.add(next);
    }
  }
  if (helper.isAnnotationPresent(javaClass,XmlNamedObjectGraph.class)) {
    objectGraphs.add((XmlNamedObjectGraph)helper.getAnnotation(javaClass,XmlNamedObjectGraph.class));
  }
  for (  XmlNamedObjectGraph next : objectGraphs) {
    org.eclipse.persistence.jaxb.xmlmodel.XmlNamedObjectGraph namedGraph=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedObjectGraph();
    namedGraph.setName(next.name());
    for (    XmlNamedAttributeNode nextNode : next.attributeNodes()) {
      org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode namedNode=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode();
      namedNode.setName(nextNode.value());
      namedNode.setSubgraph(nextNode.subgraph());
      namedGraph.getXmlNamedAttributeNode().add(namedNode);
    }
    for (    XmlNamedSubgraph nextSubgraph : next.subGraphs()) {
      org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph namedSubGraph=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph();
      namedSubGraph.setName(nextSubgraph.name());
      namedSubGraph.setType(nextSubgraph.type().getName());
      for (      XmlNamedAttributeNode nextNode : nextSubgraph.attributeNodes()) {
        org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode namedNode=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode();
        namedNode.setName(nextNode.value());
        namedNode.setSubgraph(nextNode.subgraph());
        namedSubGraph.getXmlNamedAttributeNode().add(namedNode);
      }
      namedGraph.getXmlNamedSubgraph().add(namedSubGraph);
    }
    for (    XmlNamedSubgraph nextSubgraph : next.subclassGraphs()) {
      org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph namedSubGraph=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph();
      namedSubGraph.setName(nextSubgraph.name());
      namedSubGraph.setType(nextSubgraph.type().getName());
      for (      XmlNamedAttributeNode nextNode : nextSubgraph.attributeNodes()) {
        org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode namedNode=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode();
        namedNode.setName(nextNode.value());
        namedNode.setSubgraph(nextNode.subgraph());
        namedSubGraph.getXmlNamedAttributeNode().add(namedNode);
      }
      namedGraph.getXmlNamedSubclassGraph().add(namedSubGraph);
    }
    info.getObjectGraphs().add(namedGraph);
  }
}

Fixed version (ground truth):
private void processNamedObjectGraphs(JavaClass javaClass,TypeInfo info){
  ArrayList<XmlNamedObjectGraph> objectGraphs=new ArrayList<XmlNamedObjectGraph>();
  if (helper.isAnnotationPresent(javaClass,XmlNamedObjectGraphs.class)) {
    XmlNamedObjectGraphs graphs=(XmlNamedObjectGraphs)helper.getAnnotation(javaClass,XmlNamedObjectGraphs.class);
    for (    XmlNamedObjectGraph next : graphs.value()) {
      objectGraphs.add(next);
    }
  }
  if (helper.isAnnotationPresent(javaClass,XmlNamedObjectGraph.class)) {
    objectGraphs.add((XmlNamedObjectGraph)helper.getAnnotation(javaClass,XmlNamedObjectGraph.class));
  }
  for (  XmlNamedObjectGraph next : objectGraphs) {
    org.eclipse.persistence.jaxb.xmlmodel.XmlNamedObjectGraph namedGraph=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedObjectGraph();
    namedGraph.setName(next.name());
    for (    XmlNamedAttributeNode nextNode : next.attributeNodes()) {
      org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode namedNode=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode();
      namedNode.setName(nextNode.value());
      namedNode.setSubgraph(nextNode.subgraph());
      namedGraph.getXmlNamedAttributeNode().add(namedNode);
    }
    for (    XmlNamedSubgraph nextSubgraph : next.subgraphs()) {
      org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph namedSubGraph=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph();
      namedSubGraph.setName(nextSubgraph.name());
      namedSubGraph.setType(nextSubgraph.type().getName());
      for (      XmlNamedAttributeNode nextNode : nextSubgraph.attributeNodes()) {
        org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode namedNode=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode();
        namedNode.setName(nextNode.value());
        namedNode.setSubgraph(nextNode.subgraph());
        namedSubGraph.getXmlNamedAttributeNode().add(namedNode);
      }
      namedGraph.getXmlNamedSubgraph().add(namedSubGraph);
    }
    for (    XmlNamedSubgraph nextSubgraph : next.subclassSubgraphs()) {
      org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph namedSubGraph=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedSubgraph();
      namedSubGraph.setName(nextSubgraph.name());
      namedSubGraph.setType(nextSubgraph.type().getName());
      for (      XmlNamedAttributeNode nextNode : nextSubgraph.attributeNodes()) {
        org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode namedNode=new org.eclipse.persistence.jaxb.xmlmodel.XmlNamedAttributeNode();
        namedNode.setName(nextNode.value());
        namedNode.setSubgraph(nextNode.subgraph());
        namedSubGraph.getXmlNamedAttributeNode().add(namedNode);
      }
      namedGraph.getXmlNamedSubclassGraph().add(namedSubGraph);
    }
    info.getObjectGraphs().add(namedGraph);
  }
}