code: @SuppressWarnings("unchecked")
      private void reduce(AnalyzerJob analyzerJob, Collection<AnalyzerResult> slaveResults,
              Map<ComponentJob, AnalyzerResult> resultMap, List<AnalysisResultReductionException> reductionErrors) {
  
          if (slaveResults.size() == 1) {
              // special case where these was only 1 slave job
              final AnalyzerResult firstResult = slaveResults.iterator().next();
              resultMap.put(analyzerJob, firstResult);
              _analysisListener.analyzerSuccess(_masterJob, analyzerJob, firstResult);
              return;
          }
  
          final Class<? extends AnalyzerResultReducer<?>> reducerClass = analyzerJob.getDescriptor()
                  .getResultReducerClass();
  
          final ComponentDescriptor<? extends AnalyzerResultReducer<?>> reducerDescriptor = Descriptors
                  .ofComponent(reducerClass);
  
          AnalyzerResultReducer<AnalyzerResult> reducer = null;
          boolean success = false;
          try {
              reducer = (AnalyzerResultReducer<AnalyzerResult>) reducerDescriptor.newInstance();
  
              _lifeCycleHelper.assignProvidedProperties(reducerDescriptor, reducer);
              _lifeCycleHelper.initialize(reducerDescriptor, reducer);
  
              final AnalyzerResult reducedResult = reducer.reduce(slaveResults);
              resultMap.put(analyzerJob, reducedResult);
              
              success = true;
              _analysisListener.analyzerSuccess(_masterJob, analyzerJob, reducedResult);
  
          } catch (Exception e) {
              AnalysisResultReductionException reductionError = new AnalysisResultReductionException(analyzerJob,
                      slaveResults, e);
              reductionErrors.add(reductionError);
  
              _analysisListener.errorInComponent(_masterJob, analyzerJob, null, e);
          } finally {
              if (reducer != null) {
                  _lifeCycleHelper.close(reducerDescriptor, reducer, success);
              }
          }
      }
docs: Reduces result for a single analyzer
  
  @param analyzerJob
  @param slaveResults
  @param resultMap
  @param reductionErrors