Program: 113059
Project: 113059
Buggy source:
@SuppressWarnings("String_Node_Str") public CloseableIterator<Object> query(final BasicHBaseOperations operations,final AdapterStore adapterStore,final Integer limit){
  try {
    if (!operations.tableExists(StringUtils.stringFromBinary(index.getId().getBytes()))) {
      LOGGER.warn("String_Node_Str" + StringUtils.stringFromBinary(index.getId().getBytes()));
      return new CloseableIterator.Empty();
    }
  }
 catch (  final IOException ex) {
    LOGGER.warn("String_Node_Str" + StringUtils.stringFromBinary(index.getId().getBytes()) + "String_Node_Str");
    return new CloseableIterator.Empty();
  }
  final String tableName=StringUtils.stringFromBinary(index.getId().getBytes());
  final List<Filter> distributableFilters=getDistributableFilter();
  CloseableIterator<DataAdapter<?>> adapters=null;
  if ((fieldIds != null) && !fieldIds.isEmpty()) {
    adapters=adapterStore.getAdapters();
  }
  final List<Scan> scanners=getScanners(limit,distributableFilters,adapters);
  final List<Iterator<Result>> resultsIterators=new ArrayList<Iterator<Result>>();
  final List<ResultScanner> results=new ArrayList<ResultScanner>();
  try {
    for (    final Scan scanner : scanners) {
      final ResultScanner rs=operations.getScannedResults(scanner,tableName);
      final Iterator<Result> it=rs.iterator();
      if ((rs != null) && it.hasNext()) {
        resultsIterators.add(it);
        results.add(rs);
      }
    }
    if (results.iterator().hasNext()) {
      Iterator it=initIterator(adapterStore,Iterators.concat(resultsIterators.iterator()));
      if ((limit != null) && (limit > 0)) {
        it=Iterators.limit(it,limit);
      }
      return new HBaseCloseableIteratorWrapper(new MultiScannerClosableWrapper(results),it);
    }
 else {
      LOGGER.error("String_Node_Str");
      return null;
    }
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str");
    return null;
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public CloseableIterator<Object> query(final BasicHBaseOperations operations,final AdapterStore adapterStore,final Integer limit){
  try {
    if (!operations.tableExists(StringUtils.stringFromBinary(index.getId().getBytes()))) {
      LOGGER.warn("String_Node_Str" + StringUtils.stringFromBinary(index.getId().getBytes()));
      return new CloseableIterator.Empty();
    }
  }
 catch (  final IOException ex) {
    LOGGER.warn("String_Node_Str" + StringUtils.stringFromBinary(index.getId().getBytes()) + "String_Node_Str");
    return new CloseableIterator.Empty();
  }
  final String tableName=StringUtils.stringFromBinary(index.getId().getBytes());
  final List<Filter> distributableFilters=getDistributableFilter();
  CloseableIterator<DataAdapter<?>> adapters=null;
  if ((fieldIds != null) && !fieldIds.isEmpty()) {
    adapters=adapterStore.getAdapters();
  }
  final List<Scan> scanners=getScanners(limit,distributableFilters,adapters);
  final List<Iterator<Result>> resultsIterators=new ArrayList<Iterator<Result>>();
  final List<ResultScanner> results=new ArrayList<ResultScanner>();
  try {
    for (    final Scan scanner : scanners) {
      final ResultScanner rs=operations.getScannedResults(scanner,tableName);
      if (rs != null) {
        final Iterator<Result> it=rs.iterator();
        if (it.hasNext()) {
          resultsIterators.add(it);
          results.add(rs);
        }
      }
    }
    if (results.iterator().hasNext()) {
      Iterator it=initIterator(adapterStore,Iterators.concat(resultsIterators.iterator()));
      if ((limit != null) && (limit > 0)) {
        it=Iterators.limit(it,limit);
      }
      return new HBaseCloseableIteratorWrapper(new MultiScannerClosableWrapper(results),it);
    }
 else {
      LOGGER.error("String_Node_Str");
      return null;
    }
  }
 catch (  final IOException e) {
    LOGGER.error("String_Node_Str");
    return null;
  }
}