Program: 64362
Project: 64362
Buggy source:
public void initialize(){
  SOAPResponseClassLoader loader=new SOAPResponseClassLoader(Thread.currentThread().getContextClassLoader());
  NamespaceResolver nr=new NamespaceResolver();
  nr.put(SERVICE_NAMESPACE_PREFIX,dbwsAdapter.getExtendedSchema().getTargetNamespace());
  for (  Operation op : dbwsAdapter.getOperationsList()) {
    String className=op.getName() + "String_Node_Str";
    Class<?> opClass=loader.buildClass(className);
    XMLDescriptor descriptor=new XMLDescriptor();
    descriptor.setDefaultRootElement(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + op.getName()+ "String_Node_Str");
    descriptor.setNamespaceResolver(nr);
    descriptor.setJavaClass(opClass);
    if (op instanceof QueryOperation) {
      QueryOperation queryOperation=(QueryOperation)op;
      if (queryOperation.isSimpleXMLFormat()) {
        XMLAnyObjectMapping mapping=new XMLAnyObjectMapping();
        mapping.setUseXMLRoot(true);
        mapping.setAttributeName("String_Node_Str");
        mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
        descriptor.addMapping(mapping);
        mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
      }
 else       if (queryOperation.isAttachment()) {
        Attachment attachment=queryOperation.getResult().getAttachment();
        XMLBinaryDataMapping mapping=new XMLBinaryDataMapping();
        mapping.setAttributeName("String_Node_Str");
        mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
        mapping.setSwaRef(true);
        mapping.setShouldInlineBinaryData(false);
        mapping.setMimeType(attachment.getMimeType());
        descriptor.addMapping(mapping);
      }
 else {
        QName type=queryOperation.getResult().getType();
        String localElement=type.getLocalPart();
        Set<Map.Entry<String,ComplexType>> entrySet=dbwsAdapter.getSchema().getTopLevelComplexTypes().entrySet();
        for (        Map.Entry<String,ComplexType> me : entrySet) {
          if (me.getValue().getName().equals(type.getLocalPart())) {
            localElement=me.getKey();
            break;
          }
        }
        XMLDescriptor typeDescriptor=dbwsAdapter.getDescriptorsByQName().get(type);
        if (typeDescriptor != null) {
          if (queryOperation.isCollection()) {
            XMLCompositeCollectionMapping mapping=new XMLCompositeCollectionMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setReferenceClass(typeDescriptor.getJavaClass());
            mapping.useCollectionClass(ArrayList.class);
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str"+ localElement);
            descriptor.getNamespaceResolver().setDefaultNamespaceURI(typeDescriptor.getNamespaceResolver().getDefaultNamespaceURI());
            descriptor.addMapping(mapping);
            mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
          }
 else {
            XMLCompositeObjectMapping mapping=new XMLCompositeObjectMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setReferenceClass(typeDescriptor.getJavaClass());
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str"+ localElement);
            descriptor.getNamespaceResolver().setDefaultNamespaceURI(typeDescriptor.getNamespaceResolver().getDefaultNamespaceURI());
            descriptor.addMapping(mapping);
            mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
          }
        }
 else {
          if (type.equals(new QName(W3C_XML_SCHEMA_NS_URI,"String_Node_Str"))) {
            XMLAnyObjectMapping mapping=new XMLAnyObjectMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
            descriptor.addMapping(mapping);
          }
 else           if (type.equals(new QName(W3C_XML_SCHEMA_NS_URI,BASE_64_BINARY))) {
            XMLBinaryDataMapping mapping=new XMLBinaryDataMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
            mapping.setShouldInlineBinaryData(true);
            ((XMLField)mapping.getField()).setSchemaType(type);
            descriptor.addMapping(mapping);
          }
 else {
            XMLDirectMapping mapping=new XMLDirectMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
            descriptor.addMapping(mapping);
          }
        }
      }
    }
    dbwsAdapter.getOXSession().getProject().addDescriptor(descriptor);
    ((DatabaseSessionImpl)dbwsAdapter.getOXSession()).initializeDescriptorIfSessionAlive(descriptor);
    dbwsAdapter.getXMLContext().storeXMLDescriptorByQName(descriptor);
    resultDescriptors.put(op.getName(),descriptor);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void initialize(){
  SOAPResponseClassLoader loader=new SOAPResponseClassLoader(Thread.currentThread().getContextClassLoader());
  NamespaceResolver nr=new NamespaceResolver();
  nr.put(SERVICE_NAMESPACE_PREFIX,dbwsAdapter.getExtendedSchema().getTargetNamespace());
  for (  Operation op : dbwsAdapter.getOperationsList()) {
    String className=op.getName() + "String_Node_Str";
    Class<?> opClass=loader.buildClass(className);
    XMLDescriptor descriptor=new XMLDescriptor();
    descriptor.setDefaultRootElement(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + op.getName()+ "String_Node_Str");
    descriptor.setNamespaceResolver(nr);
    descriptor.setJavaClass(opClass);
    if (op instanceof QueryOperation) {
      QueryOperation queryOperation=(QueryOperation)op;
      if (queryOperation.isSimpleXMLFormat()) {
        XMLAnyObjectMapping mapping=new XMLAnyObjectMapping();
        mapping.setUseXMLRoot(true);
        mapping.setAttributeName("String_Node_Str");
        mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
        descriptor.addMapping(mapping);
        mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
      }
 else       if (queryOperation.isAttachment()) {
        Attachment attachment=queryOperation.getResult().getAttachment();
        XMLBinaryDataMapping mapping=new XMLBinaryDataMapping();
        mapping.setAttributeName("String_Node_Str");
        mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
        mapping.setSwaRef(true);
        mapping.setShouldInlineBinaryData(false);
        mapping.setMimeType(attachment.getMimeType());
        descriptor.addMapping(mapping);
      }
 else {
        QName type=queryOperation.getResult().getType();
        String localElement=type.getLocalPart();
        Set<Map.Entry<String,ComplexType>> entrySet=dbwsAdapter.getSchema().getTopLevelComplexTypes().entrySet();
        for (        Map.Entry<String,ComplexType> me : entrySet) {
          if (me.getValue().getName().equals(type.getLocalPart())) {
            localElement=me.getKey();
            break;
          }
        }
        XMLDescriptor typeDescriptor=dbwsAdapter.getDescriptorsByQName().get(type);
        if (typeDescriptor != null) {
          if (queryOperation.isCollection()) {
            XMLCompositeCollectionMapping mapping=new XMLCompositeCollectionMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setReferenceClass(typeDescriptor.getJavaClass());
            mapping.useCollectionClass(ArrayList.class);
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str"+ localElement);
            descriptor.getNamespaceResolver().setDefaultNamespaceURI(typeDescriptor.getNamespaceResolver().getDefaultNamespaceURI());
            descriptor.addMapping(mapping);
            mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
          }
 else {
            XMLCompositeObjectMapping mapping=new XMLCompositeObjectMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setReferenceClass(typeDescriptor.getJavaClass());
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str"+ localElement);
            descriptor.getNamespaceResolver().setDefaultNamespaceURI(typeDescriptor.getNamespaceResolver().getDefaultNamespaceURI());
            descriptor.addMapping(mapping);
            mapping.initialize((AbstractSession)dbwsAdapter.getOXSession());
          }
        }
 else {
          if (type.equals(new QName(W3C_XML_SCHEMA_NS_URI,"String_Node_Str"))) {
            XMLAnyObjectMapping mapping=new XMLAnyObjectMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
            descriptor.addMapping(mapping);
          }
 else           if (type.equals(new QName(W3C_XML_SCHEMA_NS_URI,BASE_64_BINARY))) {
            XMLBinaryDataMapping mapping=new XMLBinaryDataMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
            mapping.setShouldInlineBinaryData(true);
            ((XMLField)mapping.getField()).setSchemaType(type);
            descriptor.addMapping(mapping);
          }
 else {
            XMLDirectMapping mapping=new XMLDirectMapping();
            mapping.setAttributeName("String_Node_Str");
            mapping.setXPath(SERVICE_NAMESPACE_PREFIX + "String_Node_Str" + "String_Node_Str");
            descriptor.addMapping(mapping);
          }
        }
      }
    }
    dbwsAdapter.getOXSession().getProject().addDescriptor(descriptor);
    ((DatabaseSessionImpl)dbwsAdapter.getOXSession()).initializeDescriptorIfSessionAlive(descriptor);
    dbwsAdapter.getXMLContext().storeXMLDescriptorByQName(descriptor);
    resultDescriptors.put(op.getName(),descriptor);
  }
}