Program: 41462
Project: 41462
Buggy source:
/** 
 * <p> This method assigns plugins to the already initialized BuildPlan and its TemplateBuildPlans. First there will be checked if any generic plugin can handle a template of the TopologyTemplate </p>
 * @param buildPlan a BuildPlan which is alread initialized
 * @param map a PropertyMap which contains mappings from Template to Property and to variable nameof inside the BuidlPlan
 */
private void runPlugins(final BPELPlan buildPlan,final PropertyMap map){
  for (  final BPELScopeActivity templatePlan : buildPlan.getTemplateBuildPlans()) {
    final BPELPlanContext context=new BPELPlanContext(templatePlan,map,buildPlan.getServiceTemplate());
    if (templatePlan.getNodeTemplate() != null && !isRunning(context,templatePlan.getNodeTemplate())) {
      final AbstractNodeTemplate nodeTemplate=templatePlan.getNodeTemplate();
      BPELBuildProcessBuilder.LOG.debug("String_Node_Str" + nodeTemplate.getId());
      final IPlanBuilderTypePlugin plugin=this.findTypePlugin(nodeTemplate);
      if (plugin == null) {
        BPELBuildProcessBuilder.LOG.debug("String_Node_Str",nodeTemplate.getId());
        final OperationChain chain=BPELScopeBuilder.createOperationChain(nodeTemplate);
        if (chain == null) {
          BPELBuildProcessBuilder.LOG.warn("String_Node_Str",nodeTemplate.getId());
        }
 else {
          BPELBuildProcessBuilder.LOG.debug("String_Node_Str",nodeTemplate.getId());
          chain.executeIAProvisioning(context);
          chain.executeDAProvisioning(context);
          chain.executeOperationProvisioning(context,this.opNames);
        }
      }
 else {
        BPELBuildProcessBuilder.LOG.info("String_Node_Str",nodeTemplate.getId());
        plugin.handle(context);
      }
      for (      final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {
        if (postPhasePlugin.canHandle(nodeTemplate)) {
          postPhasePlugin.handle(context,nodeTemplate);
        }
      }
    }
 else {
      final AbstractRelationshipTemplate relationshipTemplate=templatePlan.getRelationshipTemplate();
      if (!canGenericPluginHandle(relationshipTemplate)) {
        BPELBuildProcessBuilder.LOG.debug("String_Node_Str",relationshipTemplate.getId());
        final OperationChain sourceChain=BPELScopeBuilder.createOperationChain(relationshipTemplate,true);
        final OperationChain targetChain=BPELScopeBuilder.createOperationChain(relationshipTemplate,false);
        if (targetChain != null) {
          BPELBuildProcessBuilder.LOG.warn("String_Node_Str",relationshipTemplate.getId());
          targetChain.executeIAProvisioning(context);
          targetChain.executeOperationProvisioning(context,this.opNames);
        }
        if (sourceChain != null) {
          BPELBuildProcessBuilder.LOG.warn("String_Node_Str",relationshipTemplate.getId());
          sourceChain.executeIAProvisioning(context);
          sourceChain.executeOperationProvisioning(context,this.opNames);
        }
      }
 else {
        BPELBuildProcessBuilder.LOG.info("String_Node_Str",relationshipTemplate.getId());
        handleWithTypePlugin(context,relationshipTemplate);
      }
      for (      final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {
        if (postPhasePlugin.canHandle(relationshipTemplate)) {
          postPhasePlugin.handle(context,relationshipTemplate);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * <p> This method assigns plugins to the already initialized BuildPlan and its TemplateBuildPlans. First there will be checked if any generic plugin can handle a template of the TopologyTemplate </p>
 * @param buildPlan a BuildPlan which is alread initialized
 * @param map a PropertyMap which contains mappings from Template to Property and to variable nameof inside the BuidlPlan
 */
private void runPlugins(final BPELPlan buildPlan,final PropertyMap map){
  for (  final BPELScopeActivity templatePlan : buildPlan.getTemplateBuildPlans()) {
    final BPELPlanContext context=new BPELPlanContext(templatePlan,map,buildPlan.getServiceTemplate());
    if (templatePlan.getNodeTemplate() != null) {
      if (isRunning(context,templatePlan.getNodeTemplate())) {
        BPELBuildProcessBuilder.LOG.debug("String_Node_Str" + templatePlan.getNodeTemplate().getId() + "String_Node_Str");
        for (        final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {
          if (postPhasePlugin.canHandle(templatePlan.getNodeTemplate())) {
            postPhasePlugin.handle(context,templatePlan.getNodeTemplate());
          }
        }
        continue;
      }
      final AbstractNodeTemplate nodeTemplate=templatePlan.getNodeTemplate();
      BPELBuildProcessBuilder.LOG.debug("String_Node_Str" + nodeTemplate.getId());
      final IPlanBuilderTypePlugin plugin=this.findTypePlugin(nodeTemplate);
      if (plugin == null) {
        BPELBuildProcessBuilder.LOG.debug("String_Node_Str",nodeTemplate.getId());
        final OperationChain chain=BPELScopeBuilder.createOperationChain(nodeTemplate);
        if (chain == null) {
          BPELBuildProcessBuilder.LOG.warn("String_Node_Str",nodeTemplate.getId());
        }
 else {
          BPELBuildProcessBuilder.LOG.debug("String_Node_Str",nodeTemplate.getId());
          chain.executeIAProvisioning(context);
          chain.executeDAProvisioning(context);
          chain.executeOperationProvisioning(context,this.opNames);
        }
      }
 else {
        BPELBuildProcessBuilder.LOG.info("String_Node_Str",nodeTemplate.getId());
        plugin.handle(context);
      }
      for (      final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {
        if (postPhasePlugin.canHandle(templatePlan.getNodeTemplate())) {
          postPhasePlugin.handle(context,templatePlan.getNodeTemplate());
        }
      }
    }
 else     if (templatePlan.getRelationshipTemplate() != null) {
      final AbstractRelationshipTemplate relationshipTemplate=templatePlan.getRelationshipTemplate();
      if (!canGenericPluginHandle(relationshipTemplate)) {
        BPELBuildProcessBuilder.LOG.debug("String_Node_Str",relationshipTemplate.getId());
        final OperationChain sourceChain=BPELScopeBuilder.createOperationChain(relationshipTemplate,true);
        final OperationChain targetChain=BPELScopeBuilder.createOperationChain(relationshipTemplate,false);
        if (targetChain != null) {
          BPELBuildProcessBuilder.LOG.warn("String_Node_Str",relationshipTemplate.getId());
          targetChain.executeIAProvisioning(context);
          targetChain.executeOperationProvisioning(context,this.opNames);
        }
        if (sourceChain != null) {
          BPELBuildProcessBuilder.LOG.warn("String_Node_Str",relationshipTemplate.getId());
          sourceChain.executeIAProvisioning(context);
          sourceChain.executeOperationProvisioning(context,this.opNames);
        }
      }
 else {
        BPELBuildProcessBuilder.LOG.info("String_Node_Str",relationshipTemplate.getId());
        handleWithTypePlugin(context,relationshipTemplate);
      }
      for (      final IPlanBuilderPostPhasePlugin postPhasePlugin : this.pluginRegistry.getPostPlugins()) {
        if (postPhasePlugin.canHandle(templatePlan.getRelationshipTemplate())) {
          postPhasePlugin.handle(context,templatePlan.getRelationshipTemplate());
        }
      }
    }
  }
}