Program: 102100
Project: 102100
Buggy source:
public boolean generateWsdl(Properties properties,File webinfWsdlFolder) throws IOException, CoreException {
  BasicWsdlGenerator wsdlGenerator=new BasicWsdlGenerator();
  Resource wsModel=null;
  final String contextName=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_CONTEXT_NAME);
  final String host=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_WAR_HOST);
  final String port=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_WAR_PORT);
  final String tns=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_WSDL_TNS);
  String webServiceName=contextName;
  String vdbFileName=properties.getProperty(WebArchiveBuilderConstants.PROPERTY_VDB_FILE_NAME);
  IPath vdbPath=new Path(vdbFileName);
  IFile vdbFile=ModelerCore.getWorkspace().getRoot().getFile(vdbPath);
  boolean hasGlobalDataType=false;
  VdbResourceFinder vdbResourceFinder=new VdbResourceFinder(vdbFile);
  for (  Resource webServiceModel : vdbResourceFinder.getWebServiceResources()) {
    try {
      wsModel=webServiceModel;
      wsdlGenerator.addWebServiceModel(wsModel);
      ArrayList<Resource> dependentSchemas=new ArrayList<Resource>();
      Resource[] resources=vdbResourceFinder.getDependentResources(wsModel);
      vdbResourceFinder.getAllDependentSchemas(resources,dependentSchemas);
      for (      Resource resource : dependentSchemas) {
        if (ModelUtil.isXsdFile(resource)) {
          String fullFilePath=resource.getURI().path();
          String fileNameWithExtension=new Path(fullFilePath).lastSegment();
          IPath fileLocationPath=new Path(fullFilePath).removeLastSegments(1);
          XSDSchema xsdSchema=importSchema(fullFilePath);
          if (containsGlobalDataTypeImport(xsdSchema)) {
            hasGlobalDataType=true;
            File xsd=new File(fullFilePath);
            FileUtils.copy(xsd,webinfWsdlFolder,true);
            File xsdCopy=new File(webinfWsdlFolder.getPath() + FORWARD_SLASH + fileNameWithExtension);
            AntTasks.replace(xsdCopy,"String_Node_Str","String_Node_Str");
          }
 else {
            File schemaFile=new File(fullFilePath);
            FileUtils.copy(schemaFile,webinfWsdlFolder,true);
          }
          wsdlGenerator.addXsdModel(xsdSchema,fileLocationPath);
        }
      }
    }
 catch (    Exception e) {
      vdbResourceFinder.dispose();
      throw new RuntimeException(e.getMessage());
    }
  }
  vdbResourceFinder.dispose();
  wsdlGenerator.setName(webServiceName);
  wsdlGenerator.setTargetNamespace(tns);
  wsdlGenerator.setUrlRootForReferences(CoreStringUtil.Constants.EMPTY_STRING);
  wsdlGenerator.setUrlSuffixForReferences(CoreStringUtil.Constants.EMPTY_STRING);
  wsdlGenerator.setUrlForWsdlService("String_Node_Str" + host + "String_Node_Str"+ port+ FORWARD_SLASH+ contextName+ FORWARD_SLASH);
  final IStatus status=wsdlGenerator.generate(new NullProgressMonitor());
  if (status.getSeverity() == IStatus.ERROR) {
    throw new RuntimeException("String_Node_Str");
  }
  String fileName=webServiceName + "String_Node_Str";
  wsdlFilename=fileName;
  try {
    OutputStream stream=new FileOutputStream(new File(webinfWsdlFolder,fileName));
    wsdlGenerator.write(stream);
    IFile iFile=vdbFile;
    iFile.refreshLocal(IResource.DEPTH_INFINITE,new NullProgressMonitor());
    setPorts(wsdlGenerator.getPorts());
    setOperationToProcedureMap(wsdlGenerator.getOperationToProcedureMap());
  }
 catch (  IOException e) {
    throw new RuntimeException(e.getMessage());
  }
catch (  CoreException e) {
    throw new RuntimeException(e.getMessage());
  }
  return hasGlobalDataType;
}

Fixed version (ground truth):
/** 
 * @param properties
 * @param webinfWsdlFolder
 * @return status of wsdl generation
 * @throws IOException
 * @throws CoreException
 */
public boolean generateWsdl(Properties properties,File webinfWsdlFolder) throws IOException, CoreException {
  BasicWsdlGenerator wsdlGenerator=new BasicWsdlGenerator();
  Resource wsModel=null;
  final String contextName=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_CONTEXT_NAME);
  final String host=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_WAR_HOST);
  final String port=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_WAR_PORT);
  final String tns=(String)properties.get(WebArchiveBuilderConstants.PROPERTY_WSDL_TNS);
  String webServiceName=contextName;
  String vdbFileName=properties.getProperty(WebArchiveBuilderConstants.PROPERTY_VDB_FILE_NAME);
  IPath vdbPath=new Path(vdbFileName);
  IFile vdbFile=ModelerCore.getWorkspace().getRoot().getFile(vdbPath);
  boolean hasGlobalDataType=false;
  VdbResourceFinder vdbResourceFinder=new VdbResourceFinder(vdbFile);
  for (  Resource webServiceModel : vdbResourceFinder.getWebServiceResources()) {
    try {
      wsModel=webServiceModel;
      wsdlGenerator.addWebServiceModel(wsModel);
      ArrayList<Resource> dependentSchemas=new ArrayList<Resource>();
      Resource[] resources=vdbResourceFinder.getDependentResources(wsModel);
      vdbResourceFinder.getAllDependentSchemas(resources,dependentSchemas);
      for (      Resource resource : dependentSchemas) {
        if (!ModelUtil.isXsdFile(resource))         continue;
        String fullFilePath=resource.getURI().path();
        String fileNameWithExtension=new Path(fullFilePath).lastSegment();
        IPath fileLocationPath=new Path(fullFilePath).removeLastSegments(1);
        XSDSchema xsdSchema=importSchema(fullFilePath);
        if (containsGlobalDataTypeImport(xsdSchema)) {
          hasGlobalDataType=true;
          File xsd=new File(fullFilePath);
          FileUtils.copy(xsd,webinfWsdlFolder,true);
          File xsdCopy=new File(webinfWsdlFolder.getPath() + FORWARD_SLASH + fileNameWithExtension);
          AntTasks.replace(xsdCopy,"String_Node_Str","String_Node_Str");
        }
 else {
          File schemaFile=new File(fullFilePath);
          FileUtils.copy(schemaFile,webinfWsdlFolder,true);
        }
        wsdlGenerator.addXsdModel(xsdSchema,fileLocationPath);
      }
    }
 catch (    Exception e) {
      vdbResourceFinder.dispose();
      throw ErrorHandler.toCoreException(e);
    }
  }
  vdbResourceFinder.dispose();
  wsdlGenerator.setName(webServiceName);
  wsdlGenerator.setTargetNamespace(tns);
  wsdlGenerator.setUrlRootForReferences(CoreStringUtil.Constants.EMPTY_STRING);
  wsdlGenerator.setUrlSuffixForReferences(CoreStringUtil.Constants.EMPTY_STRING);
  wsdlGenerator.setUrlForWsdlService("String_Node_Str" + host + "String_Node_Str"+ port+ FORWARD_SLASH+ contextName+ FORWARD_SLASH);
  final IStatus status=wsdlGenerator.generate(new NullProgressMonitor());
  if (status.getSeverity() == IStatus.ERROR) {
    throw new RuntimeException("String_Node_Str");
  }
  String fileName=webServiceName + "String_Node_Str";
  wsdlFilename=fileName;
  try {
    OutputStream stream=new FileOutputStream(new File(webinfWsdlFolder,fileName));
    wsdlGenerator.write(stream);
    IFile iFile=vdbFile;
    iFile.refreshLocal(IResource.DEPTH_INFINITE,new NullProgressMonitor());
    setPorts(wsdlGenerator.getPorts());
    setOperationToProcedureMap(wsdlGenerator.getOperationToProcedureMap());
  }
 catch (  Exception e) {
    throw ErrorHandler.toCoreException(e);
  }
  return hasGlobalDataType;
}