Program: 137246
Project: 137246
Buggy source:
/** 
 * store data which from 'simpleIndicator.getListRows()' except RowCountIndicator.
 * @param indicToRowMap
 */
private void storeDataSet(){
  EMap<Indicator,AnalyzedDataSet> indicToRowMap=analysis.getResults().getIndicToRowMap();
  for (  Indicator indicator : analysis.getResults().getIndicators()) {
    if (indicator instanceof SimpleStatIndicator) {
      SimpleStatIndicator simpleIndicator=(SimpleStatIndicator)indicator;
      if (!analysis.getParameters().isStoreData()) {
        break;
      }
      if (simpleIndicator.isSaveTempDataToFile()) {
      }
 else {
        List<Object[]> listRows=simpleIndicator.getListRows();
        if (listRows == null || listRows.isEmpty()) {
          break;
        }
        for (        Indicator leafIndicator : simpleIndicator.getLeafIndicators()) {
          if (leafIndicator instanceof RowCountIndicator) {
            continue;
          }
          List<Object[]> dataList=new ArrayList<Object[]>();
          AnalyzedDataSet analyzedDataSet=indicToRowMap.get(leafIndicator);
          if (analyzedDataSet == null) {
            analyzedDataSet=AnalysisFactory.eINSTANCE.createAnalyzedDataSet();
            indicToRowMap.put(leafIndicator,analyzedDataSet);
            analyzedDataSet.setDataCount(analysis.getParameters().getMaxNumberRows());
            analyzedDataSet.setRecordSize(0);
          }
          for (int i=0; i < listRows.size(); i++) {
            Object[] object=listRows.get(i);
            Object count=object[object.length > 0 ? object.length - 1 : 0];
            if (leafIndicator instanceof DistinctCountIndicator) {
              dataList.add(object);
            }
 else             if (leafIndicator instanceof UniqueCountIndicator) {
              if (count != null && NumberUtils.isNumber(count + PluginConstant.EMPTY_STRING)) {
                if (Long.valueOf(count + PluginConstant.EMPTY_STRING).longValue() == 1) {
                  dataList.add(object);
                }
              }
            }
 else             if (leafIndicator instanceof DuplicateCountIndicator) {
              if (count != null && NumberUtils.isNumber(count + PluginConstant.EMPTY_STRING)) {
                if (Long.valueOf(count + PluginConstant.EMPTY_STRING).longValue() > 1) {
                  dataList.add(object);
                }
              }
            }
          }
          analyzedDataSet.setData(dataList);
        }
        if (!simpleIndicator.isStoreData()) {
          simpleIndicator.setListRows(new ArrayList<Object[]>());
        }
      }
    }
    if (indicator instanceof AllMatchIndicator) {
      AllMatchIndicator allMatchIndicator=(AllMatchIndicator)indicator;
      if (!allMatchIndicator.isStoreData()) {
        allMatchIndicator.setListRows(new ArrayList<Object[]>());
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * store data which from 'simpleIndicator.getListRows()' except RowCountIndicator.
 * @param indicToRowMap
 */
private void storeDataSet(){
  EMap<Indicator,AnalyzedDataSet> indicToRowMap=analysis.getResults().getIndicToRowMap();
  for (  Indicator indicator : analysis.getResults().getIndicators()) {
    if (indicator instanceof SimpleStatIndicator) {
      SimpleStatIndicator simpleIndicator=(SimpleStatIndicator)indicator;
      if (!analysis.getParameters().isStoreData()) {
        break;
      }
      if (simpleIndicator.isUsedMapDBMode()) {
      }
 else {
        List<Object[]> listRows=simpleIndicator.getListRows();
        if (listRows == null || listRows.isEmpty()) {
          break;
        }
        for (        Indicator leafIndicator : simpleIndicator.getLeafIndicators()) {
          if (leafIndicator instanceof RowCountIndicator) {
            continue;
          }
          List<Object[]> dataList=new ArrayList<Object[]>();
          AnalyzedDataSet analyzedDataSet=indicToRowMap.get(leafIndicator);
          if (analyzedDataSet == null) {
            analyzedDataSet=AnalysisFactory.eINSTANCE.createAnalyzedDataSet();
            indicToRowMap.put(leafIndicator,analyzedDataSet);
            analyzedDataSet.setDataCount(analysis.getParameters().getMaxNumberRows());
            analyzedDataSet.setRecordSize(0);
          }
          for (int i=0; i < listRows.size(); i++) {
            Object[] object=listRows.get(i);
            Object count=object[object.length > 0 ? object.length - 1 : 0];
            if (leafIndicator instanceof DistinctCountIndicator) {
              dataList.add(object);
            }
 else             if (leafIndicator instanceof UniqueCountIndicator) {
              if (count != null && NumberUtils.isNumber(count + PluginConstant.EMPTY_STRING)) {
                if (Long.valueOf(count + PluginConstant.EMPTY_STRING).longValue() == 1) {
                  dataList.add(object);
                }
              }
            }
 else             if (leafIndicator instanceof DuplicateCountIndicator) {
              if (count != null && NumberUtils.isNumber(count + PluginConstant.EMPTY_STRING)) {
                if (Long.valueOf(count + PluginConstant.EMPTY_STRING).longValue() > 1) {
                  dataList.add(object);
                }
              }
            }
          }
          analyzedDataSet.setData(dataList);
        }
        if (!simpleIndicator.isStoreData()) {
          simpleIndicator.setListRows(new ArrayList<Object[]>());
        }
      }
    }
    if (indicator instanceof AllMatchIndicator) {
      AllMatchIndicator allMatchIndicator=(AllMatchIndicator)indicator;
      if (!allMatchIndicator.isStoreData()) {
        allMatchIndicator.setListRows(new ArrayList<Object[]>());
      }
    }
  }
}