Program: 29098
Project: 29098
Buggy source:
/** 
 * Processes all the web services in the module and prepares for deployment. The tasks include composing the endpoint publish url and generating WSDL in to the application repository directory. In JAX-WS, WSDL files are generated dynamically, hence skips the wsdl generation step unless explicitly requested for WSDL file publishing via DD.
 * @param app
 * @param dc
 * @throws Exception
 */
private void doWebServicesDeployment(Application app,DeploymentContext dc) throws Exception {
  Collection<WebService> webServices=new HashSet<WebService>();
  WebServicesDescriptor wsDesc=dc.getModuleMetaData(WebServicesDescriptor.class);
  if (wsDesc != null && wsDesc.getWebServices().size() > 0) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + "String_Node_Str" + wsDesc.getWebServices().size() + "String_Node_Str"+ getWebServiceDescriptors(app).size());
    }
    webServices.addAll(wsDesc.getWebServices());
  }
  WebBundleDescriptor webBundleDesc=dc.getModuleMetaData(WebBundleDescriptor.class);
  if (webBundleDesc != null) {
    Collection<EjbBundleDescriptor> ejbBundleDescriptors=webBundleDesc.getExtensionsDescriptors(EjbBundleDescriptor.class);
    for (    EjbBundleDescriptor ejbBundleDescriptor : ejbBundleDescriptors) {
      Collection wsInExtnDesc=ejbBundleDescriptor.getWebServices().getWebServices();
      webServices.addAll(wsInExtnDesc);
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("String_Node_Str" + wsInExtnDesc);
      }
    }
  }
  if (webBundleDesc != null && webBundleDesc.getExtensionsDescriptors(EjbBundleDescriptor.class).size() == 0) {
    if (dc.getAppProps().get("String_Node_Str") != null && app.isVirtual()) {
      String contextRoot=((String)dc.getAppProps().get("String_Node_Str"));
      webBundleDesc.setContextRoot(contextRoot);
    }
  }
  for (  WebService next : webServices) {
    WsUtil wsUtil=new WsUtil();
    if (wsUtil.isJAXWSbasedService(next) && (!next.hasFilePublishing())) {
      for (      WebServiceEndpoint wsep : next.getEndpoints()) {
        wsep.composeFinalWsdlUrl(wsUtil.getWebServerInfoForDAS().getWebServerRootURL(wsep.isSecure()));
      }
    }
 else {
      URL url=next.getWsdlFileUrl();
      if (url == null) {
        File f=new File(dc.getSourceDir(),next.getWsdlFileUri());
        url=f.toURL();
      }
      File genXmlDir=dc.getScratchDir("String_Node_Str");
      String wsdlFileDir=next.getWsdlFileUri().substring(0,next.getWsdlFileUri().lastIndexOf('/'));
      (new File(genXmlDir,wsdlFileDir)).mkdirs();
      File genWsdlFile=new File(genXmlDir,next.getWsdlFileUri());
      wsUtil.generateFinalWsdl(url,next,wsUtil.getWebServerInfoForDAS(),genWsdlFile);
    }
  }
  if (webBundleDesc != null) {
    doWebServiceDeployment(webBundleDesc);
  }
}

Fixed version (ground truth):
/** 
 * Processes all the web services in the module and prepares for deployment. The tasks include composing the endpoint publish url and generating WSDL in to the application repository directory. In JAX-WS, WSDL files are generated dynamically, hence skips the wsdl generation step unless explicitly requested for WSDL file publishing via DD.
 * @param app
 * @param dc
 * @throws Exception
 */
private void doWebServicesDeployment(Application app,DeploymentContext dc) throws Exception {
  Collection<WebService> webServices=new HashSet<WebService>();
  WebServicesDescriptor wsDesc=dc.getModuleMetaData(WebServicesDescriptor.class);
  if (wsDesc != null && wsDesc.getWebServices().size() > 0) {
    if (logger.isLoggable(Level.FINE)) {
      logger.fine("String_Node_Str" + "String_Node_Str" + wsDesc.getWebServices().size() + "String_Node_Str"+ getWebServiceDescriptors(app).size());
    }
    webServices.addAll(wsDesc.getWebServices());
  }
  WebBundleDescriptor webBundleDesc=dc.getModuleMetaData(WebBundleDescriptor.class);
  if (webBundleDesc != null) {
    Collection<EjbBundleDescriptor> ejbBundleDescriptors=webBundleDesc.getExtensionsDescriptors(EjbBundleDescriptor.class);
    for (    EjbBundleDescriptor ejbBundleDescriptor : ejbBundleDescriptors) {
      Collection wsInExtnDesc=ejbBundleDescriptor.getWebServices().getWebServices();
      webServices.addAll(wsInExtnDesc);
      if (logger.isLoggable(Level.FINE)) {
        logger.fine("String_Node_Str" + wsInExtnDesc);
      }
    }
  }
  if (webBundleDesc != null && webBundleDesc.getExtensionsDescriptors(EjbBundleDescriptor.class).size() == 0) {
    if (dc.getAppProps().get("String_Node_Str") != null && app.isVirtual()) {
      String contextRoot=((String)dc.getAppProps().get("String_Node_Str"));
      webBundleDesc.setContextRoot(contextRoot);
    }
  }
  for (  WebService next : webServices) {
    WsUtil wsUtil=new WsUtil();
    if (wsUtil.isJAXWSbasedService(next) && (!next.hasFilePublishing())) {
      for (      WebServiceEndpoint wsep : next.getEndpoints()) {
        wsep.composeFinalWsdlUrl(wsUtil.getWebServerInfoForDAS().getWebServerRootURL(wsep.isSecure()));
      }
    }
 else {
      URL url=next.getWsdlFileUrl();
      if (url == null) {
        File f=new File(dc.getSourceDir(),next.getWsdlFileUri());
        url=f.toURL();
      }
      File genXmlDir=dc.getScratchDir("String_Node_Str");
      String wsdlFileDir=next.getWsdlFileUri().substring(0,next.getWsdlFileUri().lastIndexOf('/'));
      mkDirs(new File(genXmlDir,wsdlFileDir));
      File genWsdlFile=new File(genXmlDir,next.getWsdlFileUri());
      wsUtil.generateFinalWsdl(url,next,wsUtil.getWebServerInfoForDAS(),genWsdlFile);
    }
  }
  if (webBundleDesc != null) {
    doWebServiceDeployment(webBundleDesc);
  }
}