Program: 176262
Project: 176262
Buggy source:
public <E>Set<E> executeQuery(OracleNoSQLQueryInterpreter interpreter,Class<?> entityClass){
  EntityMetadata entityMetadata=KunderaMetadataManager.getEntityMetadata(entityClass);
  String idColumnName=((AbstractAttribute)entityMetadata.getIdAttribute()).getJPAColumnName();
  String secIndexName=getIndexTableName(entityMetadata);
  Set<Object> results=new HashSet<Object>();
  Set<Object> foundKeys=new HashSet<Object>();
  String interClauseOperator=null;
  Queue filterClauseQueue=interpreter.getClauseQueue();
  for (  Object clause : filterClauseQueue) {
    if (clause instanceof FilterClause) {
      foundKeys=new HashSet<Object>();
      String columnName=((FilterClause)clause).getProperty();
      String condition=((FilterClause)clause).getCondition();
      Object value=((FilterClause)clause).getValue();
      if (columnName.equals(((AbstractAttribute)entityMetadata.getIdAttribute()).getJPAColumnName()) && condition.equals("String_Node_Str")) {
        Object idValue=PropertyAccessorHelper.fromSourceToTargetClass(entityMetadata.getIdAttribute().getJavaType(),String.class,value);
        foundKeys.add(idValue);
      }
 else {
        List<String> majorComponents=new ArrayList<String>();
        majorComponents.add(secIndexName);
        majorComponents.add(columnName);
        KeyRange range=null;
        Iterator<KeyValueVersion> iterator=null;
        if (condition.equals("String_Node_Str")) {
          majorComponents.add(PropertyAccessorHelper.getString(value));
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.multiGetIterator(Direction.FORWARD,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(value.toString(),false,null,true);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(null,true,value.toString(),false);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(value.toString(),true,null,true);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(null,true,value.toString(),true);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
        while (iterator.hasNext()) {
          KeyValueVersion keyValueVersion=iterator.next();
          String minorKey=keyValueVersion.getKey().getMinorPath().get(0);
          PropertyAccessor accessor=PropertyAccessorFactory.getPropertyAccessor(entityMetadata.getIdAttribute().getBindableJavaType());
          byte[] idByteArr=keyValueVersion.getValue().getValue();
          Object keyObj=accessor.fromBytes(entityMetadata.getIdAttribute().getBindableJavaType(),idByteArr);
          foundKeys.add(keyObj);
        }
      }
    }
 else     if (clause instanceof String) {
      interClauseOperator=clause.toString();
    }
    addToResults(results,foundKeys,interClauseOperator);
  }
  return (Set<E>)results;
}

Fixed version (ground truth):
public <E>Set<E> executeQuery(OracleNoSQLQueryInterpreter interpreter,Class<?> entityClass){
  EntityMetadata entityMetadata=KunderaMetadataManager.getEntityMetadata(entityClass);
  String idColumnName=((AbstractAttribute)entityMetadata.getIdAttribute()).getJPAColumnName();
  String secIndexName=getIndexTableName(entityMetadata);
  Set<Object> results=new HashSet<Object>();
  Set<Object> foundKeys=new HashSet<Object>();
  String interClauseOperator=null;
  Queue filterClauseQueue=interpreter.getClauseQueue();
  for (  Object clause : filterClauseQueue) {
    if (clause instanceof FilterClause) {
      foundKeys=new HashSet<Object>();
      String columnName=((FilterClause)clause).getProperty();
      String condition=((FilterClause)clause).getCondition();
      Object value=((FilterClause)clause).getValue();
      if (columnName.equals(((AbstractAttribute)entityMetadata.getIdAttribute()).getJPAColumnName()) && condition.equals("String_Node_Str")) {
        Object idValue=PropertyAccessorHelper.fromSourceToTargetClass(entityMetadata.getIdAttribute().getJavaType(),String.class,value);
        foundKeys.add(idValue);
      }
 else {
        List<String> majorComponents=new ArrayList<String>();
        majorComponents.add(secIndexName);
        majorComponents.add(columnName);
        KeyRange range=null;
        Iterator<KeyValueVersion> iterator=null;
        if (condition.equals("String_Node_Str")) {
          majorComponents.add(PropertyAccessorHelper.getString(value));
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.multiGetIterator(Direction.FORWARD,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(value.toString(),false,null,true);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(null,true,value.toString(),false);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(value.toString(),true,null,true);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
 else         if (condition.equals("String_Node_Str")) {
          range=new KeyRange(null,true,value.toString(),true);
          Key majorKeyToFind=Key.createKey(majorComponents);
          iterator=kvStore.storeIterator(Direction.UNORDERED,0,majorKeyToFind,range,null);
        }
        while (iterator.hasNext()) {
          KeyValueVersion keyValueVersion=iterator.next();
          String minorKey=keyValueVersion.getKey().getMinorPath().get(0);
          PropertyAccessor accessor=PropertyAccessorFactory.getPropertyAccessor(entityMetadata.getIdAttribute().getBindableJavaType());
          byte[] idByteArr=keyValueVersion.getValue().getValue();
          Object keyObj=accessor.fromBytes(entityMetadata.getIdAttribute().getBindableJavaType(),idByteArr);
          foundKeys.add(keyObj);
        }
      }
    }
 else     if (clause instanceof String) {
      interClauseOperator=clause.toString().trim();
    }
    addToResults(results,foundKeys,interClauseOperator);
  }
  return (Set<E>)results;
}