Program: 10814
Project: 10814
Buggy source:
/** 
 * @param descriptor that contains the application information, and thatalso will be updated with an archive containing the application resources to be deployed to the Cloud Foundry Server
 * @param cloudModule the Cloud Foundry wrapper around the applicationmodule to be pushed to the server
 * @param modules list of WTP modules.
 * @param cloudServer cloud server where app should be pushed to
 * @param monitor
 * @throws CoreException if failure occurred while generated an archive filecontaining the application's payload
 */
protected void generateApplicationArchiveFile(DeploymentDescriptor descriptor,CloudFoundryApplicationModule cloudModule,IModule[] modules,Server server,IProgressMonitor monitor) throws CoreException {
  final String applicationId=descriptor.applicationInfo.getAppName();
  if (descriptor.applicationInfo == null) {
    throw new CoreException(new Status(IStatus.ERROR,CloudFoundryPlugin.PLUGIN_ID,"String_Node_Str" + applicationId + "String_Node_Str"));
  }
  IApplicationDelegate delegate=ApplicationRegistry.getApplicationDelegate(cloudModule.getLocalModule());
  if (delegate != null && delegate.providesApplicationArchive(cloudModule.getLocalModule())) {
    IModuleResource[] resources=getResources(modules);
    try {
      ApplicationArchive archive=delegate.getApplicationArchive(cloudModule.getLocalModule(),resources);
      descriptor.applicationArchive=archive;
    }
 catch (    CoreException e) {
      CloudFoundryPlugin.logError(e);
    }
  }
  if (descriptor.applicationArchive == null) {
    if (descriptor.isIncrementalPublish && !hasChildModules(modules)) {
      handleIncrementalPublish(descriptor,modules);
    }
 else {
      File warFile=CloudUtil.createWarFile(modules,server,monitor);
      if (warFile == null || !warFile.exists()) {
        throw new CoreException(new Status(IStatus.ERROR,CloudFoundryPlugin.PLUGIN_ID,"String_Node_Str" + applicationId));
      }
      CloudFoundryPlugin.trace("String_Node_Str" + warFile.getName() + "String_Node_Str");
      descriptor.applicationInfo.setWarFile(warFile);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param descriptor that contains the application information, and thatalso will be updated with an archive containing the application resources to be deployed to the Cloud Foundry Server
 * @param cloudModule the Cloud Foundry wrapper around the applicationmodule to be pushed to the server
 * @param modules list of WTP modules.
 * @param cloudServer cloud server where app should be pushed to
 * @param monitor
 * @throws CoreException if failure occurred while generated an archive filecontaining the application's payload
 */
protected void generateApplicationArchiveFile(DeploymentDescriptor descriptor,CloudFoundryApplicationModule cloudModule,IModule[] modules,Server server,IProgressMonitor monitor) throws CoreException {
  final String applicationId=descriptor.applicationInfo.getAppName();
  if (descriptor.applicationInfo == null) {
    throw new CoreException(new Status(IStatus.ERROR,CloudFoundryPlugin.PLUGIN_ID,"String_Node_Str" + applicationId + "String_Node_Str"));
  }
  IApplicationDelegate delegate=ApplicationRegistry.getApplicationDelegate(cloudModule.getLocalModule());
  if (delegate != null && delegate.providesApplicationArchive(cloudModule.getLocalModule())) {
    IModuleResource[] resources=getResources(modules);
    try {
      ApplicationArchive archive=delegate.getApplicationArchive(cloudModule.getLocalModule(),resources);
      descriptor.applicationArchive=archive;
    }
 catch (    CoreException e) {
      CloudFoundryPlugin.log(e);
    }
  }
  if (descriptor.applicationArchive == null) {
    if (descriptor.isIncrementalPublish && !hasChildModules(modules)) {
      handleIncrementalPublish(descriptor,modules);
    }
 else {
      File warFile=CloudUtil.createWarFile(modules,server,monitor);
      if (warFile == null || !warFile.exists()) {
        throw new CoreException(new Status(IStatus.ERROR,CloudFoundryPlugin.PLUGIN_ID,"String_Node_Str" + applicationId));
      }
      CloudFoundryPlugin.trace("String_Node_Str" + warFile.getName() + "String_Node_Str");
      descriptor.applicationInfo.setWarFile(warFile);
    }
  }
}