Program: 112974
Project: 112974
Buggy source:
@Override protected void addScanIteratorSettings(final ScannerBase scanner){
  addFieldSubsettingToIterator(scanner);
  if ((distributableFilters != null) && !distributableFilters.isEmpty() && queryFiltersEnabled) {
    final IteratorSetting iteratorSettings;
    if (isAggregation()) {
      iteratorSettings=new IteratorSetting(QueryFilterIterator.QUERY_ITERATOR_PRIORITY,QueryFilterIterator.QUERY_ITERATOR_NAME,AggregationIterator.class);
      iteratorSettings.addOption(AggregationIterator.ADAPTER_OPTION_NAME,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(aggregation.getLeft())));
      final Aggregation aggr=aggregation.getRight();
      iteratorSettings.addOption(AggregationIterator.AGGREGATION_OPTION_NAME,aggr.getClass().getName());
      if (aggr.getParameters() != null) {
        iteratorSettings.addOption(AggregationIterator.CONSTRAINTS_OPTION_NAME,ByteArrayUtils.byteArrayToString((PersistenceUtils.toBinary(aggr.getParameters()))));
      }
      iteratorSettings.addOption(AggregationIterator.INDEX_STRATEGY_OPTION_NAME,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index.getIndexStrategy())));
    }
 else {
      iteratorSettings=new IteratorSetting(QueryFilterIterator.QUERY_ITERATOR_PRIORITY,QueryFilterIterator.QUERY_ITERATOR_NAME,QueryFilterIterator.class);
    }
    final DistributableQueryFilter filterList=new DistributableFilterList(distributableFilters);
    iteratorSettings.addOption(QueryFilterIterator.FILTER,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(filterList)));
    iteratorSettings.addOption(QueryFilterIterator.MODEL,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index.getIndexModel())));
    scanner.addScanIterator(iteratorSettings);
  }
 else {
    final IteratorSetting iteratorSettings=new IteratorSetting(QueryFilterIterator.WHOLE_ROW_ITERATOR_PRIORITY,QueryFilterIterator.WHOLE_ROW_ITERATOR_NAME,WholeRowIterator.class);
    scanner.addScanIterator(iteratorSettings);
  }
}

Fixed version (ground truth):
@Override protected void addScanIteratorSettings(final ScannerBase scanner){
  addFieldSubsettingToIterator(scanner);
  if ((distributableFilters != null) && !distributableFilters.isEmpty() && queryFiltersEnabled) {
    final IteratorSetting iteratorSettings;
    if (isAggregation()) {
      iteratorSettings=new IteratorSetting(QueryFilterIterator.QUERY_ITERATOR_PRIORITY,QueryFilterIterator.QUERY_ITERATOR_NAME,AggregationIterator.class);
      iteratorSettings.addOption(AggregationIterator.ADAPTER_OPTION_NAME,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(aggregation.getLeft())));
      final Aggregation aggr=aggregation.getRight();
      iteratorSettings.addOption(AggregationIterator.AGGREGATION_OPTION_NAME,aggr.getClass().getName());
      iteratorSettings.addOption(AggregationIterator.CONSTRAINTS_OPTION_NAME,ByteArrayUtils.byteArrayToString((PersistenceUtils.toBinary((List)constraints))));
      if (aggr.getParameters() != null) {
        iteratorSettings.addOption(AggregationIterator.PARAMETER_OPTION_NAME,ByteArrayUtils.byteArrayToString((PersistenceUtils.toBinary(aggr.getParameters()))));
      }
      iteratorSettings.addOption(AggregationIterator.INDEX_STRATEGY_OPTION_NAME,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index.getIndexStrategy())));
    }
 else {
      iteratorSettings=new IteratorSetting(QueryFilterIterator.QUERY_ITERATOR_PRIORITY,QueryFilterIterator.QUERY_ITERATOR_NAME,QueryFilterIterator.class);
    }
    final DistributableQueryFilter filterList=new DistributableFilterList(distributableFilters);
    iteratorSettings.addOption(QueryFilterIterator.FILTER,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(filterList)));
    iteratorSettings.addOption(QueryFilterIterator.MODEL,ByteArrayUtils.byteArrayToString(PersistenceUtils.toBinary(index.getIndexModel())));
    scanner.addScanIterator(iteratorSettings);
  }
 else {
    final IteratorSetting iteratorSettings=new IteratorSetting(QueryFilterIterator.WHOLE_ROW_ITERATOR_PRIORITY,QueryFilterIterator.WHOLE_ROW_ITERATOR_NAME,WholeRowIterator.class);
    scanner.addScanIterator(iteratorSettings);
  }
}