Program: 167958
Project: 167958
Buggy source:
/** 
 * Process the deployment root for module dependency information.
 * @param phaseContext the deployment unit context
 * @throws DeploymentUnitProcessingException
 */
public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit=phaseContext.getDeploymentUnit();
  final ModuleSpecification moduleSpecification=deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
  final ServiceModuleLoader deploymentModuleLoader=deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER);
  List<ResourceRoot> allResourceRoots=DeploymentUtils.allResourceRoots(deploymentUnit);
  for (  ResourceRoot resourceRoot : allResourceRoots) {
    final Manifest manifest=resourceRoot.getAttachment(Attachments.MANIFEST);
    if (manifest == null)     continue;
    final String dependencyString=manifest.getMainAttributes().getValue("String_Node_Str");
    if (dependencyString == null)     continue;
    final String[] dependencyDefs=dependencyString.split("String_Node_Str");
    for (    String dependencyDef : dependencyDefs) {
      final String[] dependencyParts=dependencyDef.split("String_Node_Str");
      final int dependencyPartsLength=dependencyParts.length;
      if (dependencyPartsLength == 0)       throw new RuntimeException("String_Node_Str" + dependencyString);
      final ModuleIdentifier dependencyId=ModuleIdentifier.fromString(dependencyParts[0]);
      boolean export=parseOptionalExportParams(dependencyParts,"String_Node_Str");
      boolean optional=parseOptionalExportParams(dependencyParts,"String_Node_Str");
      boolean services=parseOptionalExportParams(dependencyParts,"String_Node_Str");
      final ModuleLoader dependencyLoader;
      if (dependencyId.getName().startsWith("String_Node_Str")) {
        dependencyLoader=deploymentModuleLoader;
      }
 else {
        dependencyLoader=Module.getBootModuleLoader();
      }
      ModuleDependency dependency=new ModuleDependency(dependencyLoader,dependencyId,optional,export,services);
      moduleSpecification.addDependency(dependency);
      deploymentUnit.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES,dependency);
    }
  }
  if (deploymentUnit.getParent() != null) {
    List<ModuleDependency> dependencies=deploymentUnit.getParent().getAttachmentList(Attachments.MANIFEST_DEPENDENCIES);
    moduleSpecification.addDependencies(dependencies);
  }
}

Fixed version (ground truth):
/** 
 * Process the deployment root for module dependency information.
 * @param phaseContext the deployment unit context
 * @throws DeploymentUnitProcessingException
 */
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
  final DeploymentUnit deploymentUnit=phaseContext.getDeploymentUnit();
  final ModuleSpecification moduleSpecification=deploymentUnit.getAttachment(Attachments.MODULE_SPECIFICATION);
  final ServiceModuleLoader deploymentModuleLoader=deploymentUnit.getAttachment(Attachments.SERVICE_MODULE_LOADER);
  final List<ResourceRoot> allResourceRoots=DeploymentUtils.allResourceRoots(deploymentUnit);
  for (  final ResourceRoot resourceRoot : allResourceRoots) {
    final Manifest manifest=resourceRoot.getAttachment(Attachments.MANIFEST);
    if (manifest == null)     continue;
    final String dependencyString=manifest.getMainAttributes().getValue(DEPENDENCIES_ATTR);
    if (dependencyString == null)     continue;
    final String[] dependencyDefs=dependencyString.split("String_Node_Str");
    for (    final String dependencyDef : dependencyDefs) {
      final String[] dependencyParts=dependencyDef.split("String_Node_Str");
      if (dependencyParts.length == 0) {
        throw new RuntimeException("String_Node_Str" + dependencyString);
      }
      final ModuleIdentifier dependencyId=ModuleIdentifier.fromString(dependencyParts[0]);
      final boolean export=containsParam(dependencyParts,EXPORT_PARAM);
      final boolean optional=containsParam(dependencyParts,OPTIONAL_PARAM);
      final boolean services=containsParam(dependencyParts,SERVICES_PARAM);
      final ModuleLoader dependencyLoader;
      if (dependencyId.getName().startsWith("String_Node_Str")) {
        dependencyLoader=deploymentModuleLoader;
      }
 else {
        dependencyLoader=Module.getBootModuleLoader();
      }
      final ModuleDependency dependency=new ModuleDependency(dependencyLoader,dependencyId,optional,export,services);
      moduleSpecification.addDependency(dependency);
      deploymentUnit.addToAttachmentList(Attachments.MANIFEST_DEPENDENCIES,dependency);
    }
  }
  if (deploymentUnit.getParent() != null) {
    final List<ModuleDependency> parentDependencies=deploymentUnit.getParent().getAttachmentList(Attachments.MANIFEST_DEPENDENCIES);
    moduleSpecification.addDependencies(parentDependencies);
  }
}