Program: 140508
Project: 140508
Buggy source:
public static List<ChartWithData> createChart(ColumnIndicator column,boolean isCreate){
  CompositeIndicator compositeIndicator=new CompositeIndicator(column);
  Map<String,List<IndicatorUnit>> separatedMap=compositeIndicator.getIndicatorComposite();
  List<IndicatorUnit> simpleUnitList=separatedMap.get(CompositeIndicator.SIMPLE_STATISTICS);
  List<IndicatorUnit> textUnitList=separatedMap.get(CompositeIndicator.TEXT_STATISTICS);
  List<IndicatorUnit> frequencyUnitList=separatedMap.get(CompositeIndicator.FREQUENCE_STATISTICS);
  List<IndicatorUnit> summaryUnitList=separatedMap.get(CompositeIndicator.SUMMARY_STATISTICS);
  List<IndicatorUnit> patternUnitList=separatedMap.get(CompositeIndicator.PATTERN_MATCHING);
  List<IndicatorUnit> sqlPatternUnitList=separatedMap.get(CompositeIndicator.SQL_PATTERN_MATCHING);
  List<ChartWithData> returnFiles=new ArrayList<ChartWithData>();
  if (!simpleUnitList.isEmpty()) {
    CategoryDataset dataset=createSimpleDataset(simpleUnitList,isCreate);
    ImageDescriptor imageDescriptor=create3DBarChart(CompositeIndicator.SIMPLE_STATISTICS,dataset,true);
    ChartWithData chart=new ChartWithData(CompositeIndicator.SIMPLE_STATISTICS,imageDescriptor,getDataEnityFromUnits(simpleUnitList));
    returnFiles.add(chart);
  }
  if (!textUnitList.isEmpty()) {
    CategoryDataset dataset=createTextedDataset(textUnitList,isCreate);
    ImageDescriptor imageDescriptor=create3DBarChart(CompositeIndicator.TEXT_STATISTICS,dataset,true);
    ChartWithData chart=new ChartWithData(CompositeIndicator.TEXT_STATISTICS,imageDescriptor,getDataEnityFromUnits(textUnitList));
    returnFiles.add(chart);
  }
  if (!frequencyUnitList.isEmpty()) {
    CategoryDataset dataset=createFrequenceDataset(frequencyUnitList,isCreate);
    ImageDescriptor imageDescriptor=createBarChart(CompositeIndicator.FREQUENCE_STATISTICS,dataset);
    ChartWithData chart=new ChartWithData(CompositeIndicator.FREQUENCE_STATISTICS,imageDescriptor,getDataEnityFromUnits(frequencyUnitList));
    returnFiles.add(chart);
  }
  if (!summaryUnitList.isEmpty()) {
    CategoryDataset dataset=createSummaryDataset(summaryUnitList,isCreate);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
      ImageDescriptor imageDescriptor=createBoxAndWhiskerChart(CompositeIndicator.SUMMARY_STATISTICS,(BoxAndWhiskerCategoryDataset)dataset);
      ChartWithData chart=new ChartWithData(CompositeIndicator.SUMMARY_STATISTICS,imageDescriptor,getDataEnityFromUnits(summaryUnitList));
      returnFiles.add(chart);
    }
 else {
      ImageDescriptor imageDescriptor=create3DBarChart(CompositeIndicator.SUMMARY_STATISTICS,dataset,false);
      ChartWithData chart=new ChartWithData(CompositeIndicator.SUMMARY_STATISTICS,imageDescriptor,getDataEnityFromUnits(summaryUnitList));
      returnFiles.add(chart);
    }
  }
  if (!patternUnitList.isEmpty()) {
    CategoryDataset dataset=createPatternMatchDataset(patternUnitList,isCreate);
    ImageDescriptor imageDescriptor=createStacked3DBarChart(CompositeIndicator.PATTERN_MATCHING,dataset);
    ChartWithData chart=new ChartWithData(CompositeIndicator.PATTERN_MATCHING,imageDescriptor,getDataEnityFromUnits(patternUnitList));
    returnFiles.add(chart);
  }
  if (!sqlPatternUnitList.isEmpty()) {
    CategoryDataset dataset=createPatternMatchDataset(sqlPatternUnitList,isCreate);
    ImageDescriptor imageDescriptor=createStacked3DBarChart(CompositeIndicator.SQL_PATTERN_MATCHING,dataset);
    ChartWithData chart=new ChartWithData(CompositeIndicator.SQL_PATTERN_MATCHING,imageDescriptor,getDataEnityFromUnits(sqlPatternUnitList));
    returnFiles.add(chart);
  }
  return returnFiles;
}

Fixed version (ground truth):
public static List<ChartWithData> createChart(ColumnIndicator column,boolean isCreate){
  CompositeIndicator compositeIndicator=new CompositeIndicator(column);
  Map<String,List<IndicatorUnit>> separatedMap=compositeIndicator.getIndicatorComposite();
  List<IndicatorUnit> simpleUnitList=separatedMap.get(CompositeIndicator.SIMPLE_STATISTICS);
  List<IndicatorUnit> textUnitList=separatedMap.get(CompositeIndicator.TEXT_STATISTICS);
  List<IndicatorUnit> frequencyUnitList=separatedMap.get(CompositeIndicator.FREQUENCE_STATISTICS);
  List<IndicatorUnit> summaryUnitList=separatedMap.get(CompositeIndicator.SUMMARY_STATISTICS);
  List<IndicatorUnit> patternUnitList=separatedMap.get(CompositeIndicator.PATTERN_MATCHING);
  List<IndicatorUnit> sqlPatternUnitList=separatedMap.get(CompositeIndicator.SQL_PATTERN_MATCHING);
  List<IndicatorUnit> modeIndicatorUnitList=separatedMap.get(CompositeIndicator.MODE_INDICATOR);
  List<ChartWithData> returnFiles=new ArrayList<ChartWithData>();
  if (!simpleUnitList.isEmpty()) {
    CategoryDataset dataset=createSimpleDataset(simpleUnitList,isCreate);
    ImageDescriptor imageDescriptor=create3DBarChart(CompositeIndicator.SIMPLE_STATISTICS,dataset,true);
    ChartWithData chart=new ChartWithData(CompositeIndicator.SIMPLE_STATISTICS,imageDescriptor,getDataEnityFromUnits(simpleUnitList));
    returnFiles.add(chart);
  }
  if (!textUnitList.isEmpty()) {
    CategoryDataset dataset=createTextedDataset(textUnitList,isCreate);
    ImageDescriptor imageDescriptor=create3DBarChart(CompositeIndicator.TEXT_STATISTICS,dataset,true);
    ChartWithData chart=new ChartWithData(CompositeIndicator.TEXT_STATISTICS,imageDescriptor,getDataEnityFromUnits(textUnitList));
    returnFiles.add(chart);
  }
  if (!frequencyUnitList.isEmpty()) {
    CategoryDataset dataset=createFrequenceDataset(frequencyUnitList,isCreate);
    ImageDescriptor imageDescriptor=createBarChart(CompositeIndicator.FREQUENCE_STATISTICS,dataset);
    ChartWithData chart=new ChartWithData(CompositeIndicator.FREQUENCE_STATISTICS,imageDescriptor,getDataEnityFromUnits(frequencyUnitList));
    returnFiles.add(chart);
  }
  if (!summaryUnitList.isEmpty()) {
    CategoryDataset dataset=createSummaryDataset(summaryUnitList,isCreate);
    if (dataset instanceof BoxAndWhiskerCategoryDataset) {
      ImageDescriptor imageDescriptor=createBoxAndWhiskerChart(CompositeIndicator.SUMMARY_STATISTICS,(BoxAndWhiskerCategoryDataset)dataset);
      ChartWithData chart=new ChartWithData(CompositeIndicator.SUMMARY_STATISTICS,imageDescriptor,getDataEnityFromUnits(summaryUnitList));
      returnFiles.add(chart);
    }
 else {
      ImageDescriptor imageDescriptor=create3DBarChart(CompositeIndicator.SUMMARY_STATISTICS,dataset,false);
      ChartWithData chart=new ChartWithData(CompositeIndicator.SUMMARY_STATISTICS,imageDescriptor,getDataEnityFromUnits(summaryUnitList));
      returnFiles.add(chart);
    }
  }
  if (!patternUnitList.isEmpty()) {
    CategoryDataset dataset=createPatternMatchDataset(patternUnitList,isCreate);
    ImageDescriptor imageDescriptor=createStacked3DBarChart(CompositeIndicator.PATTERN_MATCHING,dataset);
    ChartWithData chart=new ChartWithData(CompositeIndicator.PATTERN_MATCHING,imageDescriptor,getDataEnityFromUnits(patternUnitList));
    returnFiles.add(chart);
  }
  if (!sqlPatternUnitList.isEmpty()) {
    CategoryDataset dataset=createPatternMatchDataset(sqlPatternUnitList,isCreate);
    ImageDescriptor imageDescriptor=createStacked3DBarChart(CompositeIndicator.SQL_PATTERN_MATCHING,dataset);
    ChartWithData chart=new ChartWithData(CompositeIndicator.SQL_PATTERN_MATCHING,imageDescriptor,getDataEnityFromUnits(sqlPatternUnitList));
    returnFiles.add(chart);
  }
  if (!modeIndicatorUnitList.isEmpty()) {
    for (    IndicatorUnit unit : modeIndicatorUnitList) {
      IndicatorCommonUtil.compositeIndicatorMap(unit);
    }
    ChartWithData chart=new ChartWithData(CompositeIndicator.MODE_INDICATOR,null,getDataEnityFromUnits(modeIndicatorUnitList));
    returnFiles.add(chart);
  }
  return returnFiles;
}