Program: 28181
Project: 28181
Buggy source:
/** 
 * This method basically is a fall back mechanism to fetch required parameters from wsdl url stored in ServiceReferenceDescriptor. The flow reaches here only in case where required parameters could not be fetched from WebBundleDescriptor.
 * @param desc ServiceReferenceDescriptor
 * @return ServletAdapter instance having wsdl contents.
 */
private ServletAdapter getServletAdapterBasedOnWsdlUrl(ServiceReferenceDescriptor desc){
  if (logger.isLoggable(Level.INFO)) {
    logger.log(Level.INFO,LogUtils.SERVLET_ADAPTER_BASED_ON_WSDL_URL,new Object[]{desc.getServiceLocalPart(),desc.getWsdlFileUrl()});
  }
  URL wsdl=desc.getWsdlFileUrl();
  String wsdlPath=wsdl.getPath().trim();
  if (!wsdlPath.contains(WebServiceEndpoint.PUBLISHING_SUBCONTEXT))   return null;
  String contextRootAndPath=wsdlPath.substring(1,wsdlPath.indexOf(WebServiceEndpoint.PUBLISHING_SUBCONTEXT) - 1);
  if (!(contextRootAndPath.length() > 0))   return null;
  String[] contextRootAndPathArray=contextRootAndPath.split("String_Node_Str");
  if (contextRootAndPathArray == null || contextRootAndPathArray.length != 2)   return null;
  if (contextRootAndPathArray[0] == null)   return null;
  String contextRoot="String_Node_Str" + contextRootAndPathArray[0];
  if (contextRootAndPathArray[1] == null)   return null;
  String webSevicePath="String_Node_Str" + contextRootAndPathArray[1];
  String urlPattern=wsdlPath.substring(contextRoot.length());
  Adapter adapter=JAXWSAdapterRegistry.getInstance().getAdapter(contextRoot,webSevicePath,urlPattern);
  return adapter instanceof ServletAdapter ? (ServletAdapter)adapter : null;
}

Fixed version (ground truth):
/** 
 * This method basically is a fall back mechanism to fetch required parameters from wsdl url stored in ServiceReferenceDescriptor. The flow reaches here only in case where required parameters could not be fetched from WebBundleDescriptor.
 * @param desc ServiceReferenceDescriptor
 * @return ServletAdapter instance having wsdl contents.
 */
private ServletAdapter getServletAdapterBasedOnWsdlUrl(ServiceReferenceDescriptor desc){
  if (logger.isLoggable(Level.INFO)) {
    logger.log(Level.INFO,LogUtils.SERVLET_ADAPTER_BASED_ON_WSDL_URL,new Object[]{desc.getServiceLocalPart(),desc.getWsdlFileUrl()});
  }
  URL wsdl=desc.getWsdlFileUrl();
  String wsdlPath=wsdl.getPath().trim();
  if (!wsdlPath.contains(WebServiceEndpoint.PUBLISHING_SUBCONTEXT))   return null;
  String contextRootAndPath=wsdlPath.substring(1,wsdlPath.indexOf(WebServiceEndpoint.PUBLISHING_SUBCONTEXT) - 1);
  if (!(contextRootAndPath.length() > 0))   return null;
  String[] contextRootAndPathArray=contextRootAndPath.split("String_Node_Str");
  if (contextRootAndPathArray.length != 2)   return null;
  if (contextRootAndPathArray[0] == null)   return null;
  String contextRoot="String_Node_Str" + contextRootAndPathArray[0];
  if (contextRootAndPathArray[1] == null)   return null;
  String webSevicePath="String_Node_Str" + contextRootAndPathArray[1];
  String urlPattern=wsdlPath.substring(contextRoot.length());
  Adapter adapter=JAXWSAdapterRegistry.getInstance().getAdapter(contextRoot,webSevicePath,urlPattern);
  return adapter instanceof ServletAdapter ? (ServletAdapter)adapter : null;
}