Program: 81275
Project: 81275
Buggy source:
public synchronized WSDLDocument parse(String url) throws ParserException {
  logger.entering("String_Node_Str","String_Node_Str",url);
  wsdlDoc=Context.getContext().getNewWsdlDocument();
  try {
    XSDParser xsdParser=null;
    xsdParser=Context.getContext().getNewXsdParser();
    xsdDocument=xsdParser.parse(url);
    wsdlDoc.setXsdDocument(xsdDocument);
    wsdlDoc.setDocumentURL(xsdDocument.getDocumentURL());
    WSDLReader wsdlReader=WSDLFactory.newInstance().newWSDLReader();
    Definition wsdlDefinition=wsdlReader.readWSDL(null,url);
    Map<QName,Service> allServices=wsdlDefinition.getAllServices();
    for (    Map.Entry<QName,Service> entry : allServices.entrySet()) {
      QName qname=entry.getKey();
      URI uri=new URI(qname.getNamespaceURI());
      wsdlDoc.setPackageName(uri.getPath());
      wsdlDoc.setServiceName(qname.getLocalPart());
      wsdlDoc.setCompleteRemotePath(qname.getNamespaceURI());
      org.w3c.dom.Element documentationElem=(org.w3c.dom.Element)entry.getValue().getDocumentationElement();
      wsdlDoc.setAnnotations(parseAnnotation(documentationElem));
    }
    Map<QName,PortType> allPortTypes=wsdlDefinition.getAllPortTypes();
    for (    Map.Entry<QName,PortType> entry : allPortTypes.entrySet()) {
      QName name=entry.getKey();
      PortType p=entry.getValue();
      org.ebayopensource.turmeric.tools.annoparser.dataobjects.PortType portType=Context.getContext().getNewPortType();
      portType.setName(name.getLocalPart());
      portType.setAnnotations(parseAnnotation(p.getDocumentationElement()));
      List<Operation> operations=p.getOperations();
      for (      Operation op : operations) {
        OperationHolder opHolder=Context.getContext().getNewOperation();
        opHolder.setName(op.getName());
        opHolder.setAnnotations(parseAnnotation(op.getDocumentationElement()));
        wsdlDoc.addOperation(opHolder);
        portType.addOperation(opHolder);
        Output output=op.getOutput();
        Input input=op.getInput();
        Map inputParts=(input == null || input.getMessage() == null) ? null : input.getMessage().getParts();
        Map outputParts=(output == null || output.getMessage() == null) ? null : output.getMessage().getParts();
        if (inputParts != null) {
          for (          Object obj1 : inputParts.values()) {
            Part ipPart=(Part)obj1;
            QName type=ipPart.getElementName();
            if (type == null) {
              type=ipPart.getTypeName();
            }
            String ipElemName=type.getLocalPart();
            Element elem=xsdDocument.searchIndependentElement(ipElemName);
            if (elem != null)             this.addEntry(elem.getType(),opHolder);
            ComplexType ctype=(elem != null) ? xsdDocument.searchCType(getLocalName(elem.getType())) : null;
            if (ctype != null) {
              List<Element> elements=ctype.getInstanceElements();
              if (elements != null) {
                opHolder.setInput(elements);
              }
            }
            logger.info("String_Node_Str" + ipElemName);
          }
        }
        if (outputParts != null) {
          for (          Object obj2 : outputParts.values()) {
            Part opPart=(Part)obj2;
            QName type=opPart.getElementName();
            if (type == null) {
              type=opPart.getTypeName();
            }
            String opElemName=type.getLocalPart();
            Element elem=(opElemName != null) ? xsdDocument.searchIndependentElement(opElemName) : null;
            ComplexType ctype=(elem != null) ? xsdDocument.searchCType(getLocalName(elem.getType())) : null;
            if (ctype != null) {
              List<Element> elements=ctype.getInstanceElements();
              if (elements != null)               opHolder.setOutput(elements);
            }
            if (elem != null)             this.addEntry(elem.getType(),opHolder);
          }
        }
        postProcessOperation(opHolder,op);
      }
      postProcessPortType(portType,p);
      wsdlDoc.addPortType(portType);
    }
    postProcessWsdlDocument(wsdlDoc,wsdlDefinition);
  }
 catch (  WSDLException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
    throw new ParserException("String_Node_Str" + url + "String_Node_Str"+ e.getMessage(),e);
  }
catch (  URISyntaxException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
    throw new ParserException(e);
  }
  addExtentionElements();
  logger.exiting("String_Node_Str","String_Node_Str",wsdlDoc);
  return wsdlDoc;
}

Fixed version (ground truth):
public synchronized WSDLDocument parse(String url) throws ParserException {
  logger.entering("String_Node_Str","String_Node_Str",url);
  wsdlDoc=Context.getContext().getNewWsdlDocument();
  try {
    XSDParser xsdParser=null;
    xsdParser=Context.getContext().getNewXsdParser();
    xsdDocument=xsdParser.parse(url);
    wsdlDoc.setXsdDocument(xsdDocument);
    wsdlDoc.setDocumentURL(xsdDocument.getDocumentURL());
    WSDLReader wsdlReader=WSDLFactory.newInstance().newWSDLReader();
    Definition wsdlDefinition=wsdlReader.readWSDL(null,url);
    Map<QName,Service> allServices=wsdlDefinition.getAllServices();
    for (    Map.Entry<QName,Service> entry : allServices.entrySet()) {
      QName qname=entry.getKey();
      URI uri=new URI(qname.getNamespaceURI());
      wsdlDoc.setPackageName(uri.getPath());
      wsdlDoc.setServiceName(qname.getLocalPart());
      wsdlDoc.setCompleteRemotePath(qname.getNamespaceURI());
      org.w3c.dom.Element documentationElem=(org.w3c.dom.Element)entry.getValue().getDocumentationElement();
      wsdlDoc.setAnnotations(parseAnnotation(documentationElem));
    }
    Map<QName,PortType> allPortTypes=wsdlDefinition.getAllPortTypes();
    for (    Map.Entry<QName,PortType> entry : allPortTypes.entrySet()) {
      QName name=entry.getKey();
      PortType p=entry.getValue();
      org.ebayopensource.turmeric.tools.annoparser.dataobjects.PortType portType=Context.getContext().getNewPortType();
      portType.setName(name.getLocalPart());
      portType.setAnnotations(parseAnnotation(p.getDocumentationElement()));
      List<Operation> operations=p.getOperations();
      for (      Operation op : operations) {
        OperationHolder opHolder=Context.getContext().getNewOperation();
        opHolder.setName(op.getName());
        opHolder.setAnnotations(parseAnnotation(op.getDocumentationElement()));
        wsdlDoc.addOperation(opHolder);
        portType.addOperation(opHolder);
        Output output=op.getOutput();
        Input input=op.getInput();
        Map inputParts=(input == null || input.getMessage() == null) ? null : input.getMessage().getParts();
        Map outputParts=(output == null || output.getMessage() == null) ? null : output.getMessage().getParts();
        if (inputParts != null) {
          for (          Object obj1 : inputParts.values()) {
            Part ipPart=(Part)obj1;
            QName type=ipPart.getElementName();
            if (type == null) {
              type=ipPart.getTypeName();
            }
            String ipElemName=type.getLocalPart();
            Element elem=xsdDocument.searchIndependentElement(ipElemName);
            if (elem != null)             this.addEntry(elem.getType(),opHolder);
            ComplexType ctype=(elem != null) ? xsdDocument.searchCType(getLocalName(elem.getType())) : null;
            if (ctype != null) {
              List<Element> elements=ctype.getInstanceElements();
              if (elements != null) {
                List<Element> inputs=new ArrayList<Element>();
                for (                Element insElem : elements) {
                  if (insElem.getName().equals(elem.getName())) {
                    inputs.add(insElem);
                  }
                }
                opHolder.setInput(inputs);
              }
            }
            logger.info("String_Node_Str" + ipElemName);
          }
        }
        if (outputParts != null) {
          for (          Object obj2 : outputParts.values()) {
            Part opPart=(Part)obj2;
            QName type=opPart.getElementName();
            if (type == null) {
              type=opPart.getTypeName();
            }
            String opElemName=type.getLocalPart();
            Element elem=(opElemName != null) ? xsdDocument.searchIndependentElement(opElemName) : null;
            ComplexType ctype=(elem != null) ? xsdDocument.searchCType(getLocalName(elem.getType())) : null;
            if (ctype != null) {
              List<Element> elements=ctype.getInstanceElements();
              if (elements != null) {
                List<Element> inputs=new ArrayList<Element>();
                for (                Element insElem : elements) {
                  if (insElem.getName().equals(elem.getName())) {
                    inputs.add(insElem);
                  }
                }
                opHolder.setOutput(inputs);
              }
            }
            if (elem != null)             this.addEntry(elem.getType(),opHolder);
          }
        }
        postProcessOperation(opHolder,op);
      }
      postProcessPortType(portType,p);
      wsdlDoc.addPortType(portType);
    }
    postProcessWsdlDocument(wsdlDoc,wsdlDefinition);
  }
 catch (  WSDLException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
    throw new ParserException("String_Node_Str" + url + "String_Node_Str"+ e.getMessage(),e);
  }
catch (  URISyntaxException e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
    throw new ParserException(e);
  }
  addExtentionElements();
  logger.exiting("String_Node_Str","String_Node_Str",wsdlDoc);
  return wsdlDoc;
}