Program: 91668
Project: 91668
Buggy source:
public Object[] getElements(Object inputElement){
  if (inputElement instanceof LifecycleMappingDiscoveryRequest) {
    Map<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> packagings=new HashMap<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>>();
    Map<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> mojos=new HashMap<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>>();
    Map<IMavenProjectFacade,List<ILifecycleMappingRequirement>> projects=((LifecycleMappingDiscoveryRequest)inputElement).getProjects();
    for (    final Entry<IMavenProjectFacade,List<ILifecycleMappingRequirement>> entry : projects.entrySet()) {
      final String relPath=entry.getKey().getProject().getFile(IMavenConstants.POM_FILE_NAME).getFullPath().toPortableString();
      for (      final ILifecycleMappingRequirement requirement : entry.getValue()) {
        if (requirement != null) {
          List<ILifecycleMappingLabelProvider> val=mojos.get(requirement);
          if (val == null) {
            val=new ArrayList<ILifecycleMappingLabelProvider>();
            mojos.put(requirement,val);
          }
          val.add(new ILifecycleMappingLabelProvider(){
            public String getMavenText(){
              if (requirement instanceof MojoExecutionMappingRequirement) {
                String executionId=((MojoExecutionMappingRequirement)requirement).getExecutionId();
                if ("String_Node_Str".equals(executionId)) {
                  return NLS.bind("String_Node_Str",relPath);
                }
                return NLS.bind("String_Node_Str",executionId,relPath);
              }
              return null;
            }
            public boolean isError(            LifecycleMappingDiscoveryRequest mappingConfiguration){
              return !mappingConfiguration.isRequirementSatisfied(getKey());
            }
            public ILifecycleMappingRequirement getKey(){
              return requirement;
            }
            @SuppressWarnings("String_Node_Str") public Collection<MavenProject> getProjects(){
              MavenProject mavenProject;
              try {
                mavenProject=entry.getKey().getMavenProject(new NullProgressMonitor());
                return Collections.singleton(mavenProject);
              }
 catch (              CoreException e) {
                LOG.error(e.getMessage(),e);
                throw new RuntimeException(e.getMessage(),e);
              }
            }
          }
);
        }
      }
    }
    List<ILifecycleMappingLabelProvider> toRet=new ArrayList<ILifecycleMappingLabelProvider>();
    for (    Map.Entry<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> ent : packagings.entrySet()) {
      toRet.add(new AggregateMappingLabelProvider(ent.getKey(),ent.getValue()));
    }
    for (    Map.Entry<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> ent : mojos.entrySet()) {
      toRet.add(new AggregateMappingLabelProvider(ent.getKey(),ent.getValue()));
    }
    return toRet.toArray();
  }
  return null;
}

Fixed version (ground truth):
public Object[] getElements(Object inputElement){
  if (inputElement instanceof LifecycleMappingDiscoveryRequest) {
    Map<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> packagings=new HashMap<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>>();
    Map<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> mojos=new HashMap<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>>();
    Map<IMavenProjectFacade,List<ILifecycleMappingRequirement>> projects=((LifecycleMappingDiscoveryRequest)inputElement).getProjects();
    for (    final Entry<IMavenProjectFacade,List<ILifecycleMappingRequirement>> entry : projects.entrySet()) {
      final String relPath=entry.getKey().getProject().getFile(IMavenConstants.POM_FILE_NAME).getFullPath().toPortableString();
      for (      final ILifecycleMappingRequirement requirement : entry.getValue()) {
        if (requirement != null) {
          List<ILifecycleMappingLabelProvider> val=mojos.get(requirement);
          if (val == null) {
            val=new ArrayList<ILifecycleMappingLabelProvider>();
            mojos.put(requirement,val);
          }
          val.add(new ILifecycleMappingLabelProvider(){
            public String getMavenText(){
              String executionId=null;
              if (requirement instanceof MojoExecutionMappingRequirement) {
                executionId=((MojoExecutionMappingRequirement)requirement).getExecutionId();
              }
 else               if (requirement instanceof ProjectConfiguratorMappingRequirement) {
                executionId=((ProjectConfiguratorMappingRequirement)requirement).getExecution().getExecutionId();
              }
              if (executionId != null) {
                if ("String_Node_Str".equals(executionId)) {
                  return NLS.bind("String_Node_Str",relPath);
                }
                return NLS.bind("String_Node_Str",executionId,relPath);
              }
              return null;
            }
            public boolean isError(            LifecycleMappingDiscoveryRequest mappingConfiguration){
              return !mappingConfiguration.isRequirementSatisfied(getKey());
            }
            public ILifecycleMappingRequirement getKey(){
              return requirement;
            }
            @SuppressWarnings("String_Node_Str") public Collection<MavenProject> getProjects(){
              MavenProject mavenProject;
              try {
                mavenProject=entry.getKey().getMavenProject(new NullProgressMonitor());
                return Collections.singleton(mavenProject);
              }
 catch (              CoreException e) {
                LOG.error(e.getMessage(),e);
                throw new RuntimeException(e.getMessage(),e);
              }
            }
          }
);
        }
      }
    }
    List<ILifecycleMappingLabelProvider> toRet=new ArrayList<ILifecycleMappingLabelProvider>();
    for (    Map.Entry<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> ent : packagings.entrySet()) {
      toRet.add(new AggregateMappingLabelProvider(ent.getKey(),ent.getValue()));
    }
    for (    Map.Entry<ILifecycleMappingRequirement,List<ILifecycleMappingLabelProvider>> ent : mojos.entrySet()) {
      toRet.add(new AggregateMappingLabelProvider(ent.getKey(),ent.getValue()));
    }
    return toRet.toArray();
  }
  return null;
}