Program: 47979
Project: 47979
Buggy source:
/** 
 * Extracts top-level coverage information from the JaCoCo report document.
 * @param layout
 * @param ratios
 * @return
 * @throws IOException
 */
private static Map<Type,Coverage> loadRatios(JacocoReportDir layout,Map<Type,Coverage> ratios,String[] includes,String[] excludes) throws IOException {
  if (ratios == null) {
    ratios=new LinkedHashMap<CoverageElement.Type,Coverage>();
  }
  ExecutionFileLoader efl=layout.parse(includes,excludes);
  IBundleCoverage bundleCoverage=efl.getBundleCoverage();
  Coverage ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getClassCounter().getMissedCount(),bundleCoverage.getClassCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.CLASS,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getBranchCounter().getMissedCount(),bundleCoverage.getBranchCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.BRANCH,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getInstructionCounter().getMissedCount(),bundleCoverage.getInstructionCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.INSTRUCTION,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getMethodCounter().getMissedCount(),bundleCoverage.getMethodCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.METHOD,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getComplexityCounter().getMissedCount(),bundleCoverage.getComplexityCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.COMPLEXITY,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getLineCounter().getMissedCount(),bundleCoverage.getLineCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.LINE,ratio);
  return ratios;
}

Fixed version (ground truth):
/** 
 * Extracts top-level coverage information from the JaCoCo report document.
 * @param layout
 * @param ratios
 * @return
 * @throws IOException
 */
private static Map<Type,Coverage> loadRatios(JacocoReportDir layout,Map<Type,Coverage> ratios,String[] includes,String... excludes) throws IOException {
  if (ratios == null) {
    ratios=new LinkedHashMap<CoverageElement.Type,Coverage>();
  }
  ExecutionFileLoader efl=layout.parse(includes,excludes);
  IBundleCoverage bundleCoverage=efl.getBundleCoverage();
  Coverage ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getClassCounter().getMissedCount(),bundleCoverage.getClassCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.CLASS,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getBranchCounter().getMissedCount(),bundleCoverage.getBranchCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.BRANCH,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getInstructionCounter().getMissedCount(),bundleCoverage.getInstructionCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.INSTRUCTION,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getMethodCounter().getMissedCount(),bundleCoverage.getMethodCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.METHOD,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getComplexityCounter().getMissedCount(),bundleCoverage.getComplexityCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.COMPLEXITY,ratio);
  ratio=new Coverage();
  ratio.accumulatePP(bundleCoverage.getLineCounter().getMissedCount(),bundleCoverage.getLineCounter().getCoveredCount());
  ratios.put(CoverageElement.Type.LINE,ratio);
  return ratios;
}