Program: 176870
Project: 176870
Buggy source:
/** 
 * @param columnFamilyName
 * @param m
 * @param filterClauseQueue
 * @return
 */
@Override public List<SearchResult> getSearchResults(EntityMetadata m,Queue<FilterClause> filterClauseQueue,String persistenceUnit,ConsistencyLevel consistencyLevel){
  String columnFamilyName=m.getTableName();
  Selector selector=Pelops.createSelector(PelopsUtils.generatePoolName(persistenceUnit));
  List<SearchResult> searchResults=new ArrayList<SearchResult>();
  for (  FilterClause o : filterClauseQueue) {
    SearchResult searchResult=new SearchResult();
    FilterClause clause=((FilterClause)o);
    String rowKey=clause.getProperty();
    String columnName=clause.getValue().toString();
    String condition=clause.getCondition();
    log.debug("String_Node_Str" + rowKey + "String_Node_Str"+ columnName+ "String_Node_Str"+ condition);
    if (rowKey.equals(m.getIdColumn().getField().getName()) || rowKey.equals(m.getIdColumn().getName())) {
      searchResult.setPrimaryKey(columnName);
    }
 else {
      List<Column> thriftColumns=new ArrayList<Column>();
      if (condition.equals("String_Node_Str")) {
        Column thriftColumn=selector.getColumnFromRow(columnFamilyName,rowKey,columnName,consistencyLevel);
        thriftColumns.add(thriftColumn);
      }
 else       if (condition.equalsIgnoreCase("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,columnName.getBytes(),new byte[0]);
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,columnName.getBytes(),new byte[0]);
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,new byte[0],columnName.getBytes());
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,columnName.getBytes(),new byte[0]);
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,new byte[0],columnName.getBytes());
      }
 else {
        throw new QueryHandlerException(condition + "String_Node_Str");
      }
      for (      Column thriftColumn : thriftColumns) {
        byte[] columnValue=thriftColumn.getValue();
        String columnValueStr=Bytes.toUTF8(columnValue);
        PropertyAccessor<?> accessor=PropertyAccessorFactory.getPropertyAccessor(m.getIdColumn().getField());
        Object value=null;
        if (columnValueStr.indexOf(Constants.INDEX_TABLE_EC_DELIMITER) > 0) {
          String pk=columnValueStr.substring(0,columnValueStr.indexOf(Constants.INDEX_TABLE_EC_DELIMITER));
          String ecName=columnValueStr.substring(columnValueStr.indexOf(Constants.INDEX_TABLE_EC_DELIMITER) + Constants.INDEX_TABLE_EC_DELIMITER.length(),columnValueStr.length());
          searchResult.setPrimaryKey(pk);
          searchResult.setEmbeddedColumnName(rowKey.substring(0,rowKey.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER)));
          searchResult.addEmbeddedColumnValue(ecName);
        }
 else {
          value=accessor.fromBytes(m.getIdColumn().getField().getClass(),columnValue);
          searchResult.setPrimaryKey(value);
        }
        searchResults.add(searchResult);
      }
    }
  }
  return searchResults;
}

Fixed version (ground truth):
/** 
 * @param columnFamilyName
 * @param m
 * @param filterClauseQueue
 * @return
 */
@Override public List<SearchResult> getSearchResults(EntityMetadata m,Queue<FilterClause> filterClauseQueue,String persistenceUnit,ConsistencyLevel consistencyLevel){
  String columnFamilyName=m.getTableName() + Constants.INDEX_TABLE_SUFFIX;
  Selector selector=Pelops.createSelector(PelopsUtils.generatePoolName(persistenceUnit));
  List<SearchResult> searchResults=new ArrayList<SearchResult>();
  for (  FilterClause o : filterClauseQueue) {
    SearchResult searchResult=new SearchResult();
    FilterClause clause=((FilterClause)o);
    String rowKey=clause.getProperty();
    String columnName=clause.getValue().toString();
    String condition=clause.getCondition();
    log.debug("String_Node_Str" + rowKey + "String_Node_Str"+ columnName+ "String_Node_Str"+ condition);
    if (rowKey.equals(m.getIdColumn().getField().getName()) || rowKey.equals(m.getIdColumn().getName())) {
      searchResult.setPrimaryKey(columnName);
    }
 else {
      List<Column> thriftColumns=new ArrayList<Column>();
      if (condition.equals("String_Node_Str")) {
        Column thriftColumn=selector.getColumnFromRow(columnFamilyName,rowKey,columnName,consistencyLevel);
        thriftColumns.add(thriftColumn);
      }
 else       if (condition.equalsIgnoreCase("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,columnName.getBytes(),new byte[0]);
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,columnName.getBytes(),new byte[0]);
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,new byte[0],columnName.getBytes());
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,columnName.getBytes(),new byte[0]);
      }
 else       if (condition.equals("String_Node_Str")) {
        searchColumnsInRange(columnFamilyName,consistencyLevel,selector,rowKey,columnName,thriftColumns,new byte[0],columnName.getBytes());
      }
 else {
        throw new QueryHandlerException(condition + "String_Node_Str");
      }
      for (      Column thriftColumn : thriftColumns) {
        byte[] columnValue=thriftColumn.getValue();
        String columnValueStr=Bytes.toUTF8(columnValue);
        PropertyAccessor<?> accessor=PropertyAccessorFactory.getPropertyAccessor(m.getIdColumn().getField());
        Object value=null;
        if (columnValueStr.indexOf(Constants.INDEX_TABLE_EC_DELIMITER) > 0) {
          String pk=columnValueStr.substring(0,columnValueStr.indexOf(Constants.INDEX_TABLE_EC_DELIMITER));
          String ecName=columnValueStr.substring(columnValueStr.indexOf(Constants.INDEX_TABLE_EC_DELIMITER) + Constants.INDEX_TABLE_EC_DELIMITER.length(),columnValueStr.length());
          searchResult.setPrimaryKey(pk);
          searchResult.setEmbeddedColumnName(rowKey.substring(0,rowKey.indexOf(Constants.INDEX_TABLE_ROW_KEY_DELIMITER)));
          searchResult.addEmbeddedColumnValue(ecName);
        }
 else {
          value=accessor.fromBytes(m.getIdColumn().getField().getClass(),columnValue);
          searchResult.setPrimaryKey(value);
        }
        searchResults.add(searchResult);
      }
    }
  }
  return searchResults;
}