Program: 140571
Project: 140571
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<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);
  }
  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<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;
}