Buggy code:
private static List < Composite > buildMultiColumnEQBound ( Bound bound , List < ColumnDefinition > defs , MultiColumnRestriction . EQ restriction , boolean isReversed , CBuilder builder , QueryOptions options ) throws InvalidRequestException { } private static boolean isNullRestriction ( Restriction r , Bound b ) { } private static ByteBuffer getSliceValue ( Restriction r , Bound b , QueryOptions options ) throws InvalidRequestException { } private List < Composite > getRequestedBound ( Bound b , QueryOptions options ) throws InvalidRequestException { } public List < IndexExpression > getValidatedIndexExpressions ( QueryOptions options ) throws InvalidRequestException { } private static ByteBuffer validateIndexedValue ( ColumnDefinition def , ByteBuffer value ) throws InvalidRequestException { } private CellName makeExclusiveSliceBound ( Bound bound , CellNameType type , QueryOptions options ) throws InvalidRequestException { } private Iterator < Cell > applySliceRestriction ( final Iterator < Cell > cells , final QueryOptions options ) throws InvalidRequestException { } private static Operator reverse ( Operator op ) { } private ResultSet process ( List < Row > rows , QueryOptions options , int limit , long now ) throws InvalidRequestException { } void processColumnFamily ( ByteBuffer key , ColumnFamily cf , QueryOptions options , long now , Selection . ResultSetBuilder result ) throws InvalidRequestException { } private static void addValue ( Selection . ResultSetBuilder result , ColumnDefinition def , CQL3Row row , QueryOptions options ) { } private boolean hasNoClusteringColumnsRestriction ( ) { } private boolean needsPostQueryOrdering ( ) { } private void orderResults ( ResultSet cqlRows ) throws InvalidRequestException { } private static boolean isReversedType ( ColumnDefinition def ) { } private boolean columnFilterIsIdentity ( ) { } private boolean hasClusteringColumnsRestriction ( ) { } private void validateDistinctSelection ( ) throws InvalidRequestException { } private boolean isRestrictedByMultipleContains ( ColumnDefinition columnDef ) { } public static class RawStatement extends CFStatement { private final SelectStatement . Parameters parameters ; private final List < RawSelector > selectClause ; private final List < Relation > whereClause ; private final Raw limit ; public RawStatement ( CFName cfName , SelectStatement . Parameters parameters , List < RawSelector > selectClause , List < Relation > whereClause , Term . Raw limit ) { } public Prepared prepare ( ) throws InvalidRequestException { } private boolean [ ] processRelationEntity ( SelectStatement stmt , SecondaryIndexManager indexManager , Relation relation , ColumnIdentifier entity , ColumnDefinition def ) throws InvalidRequestException { } private void handleUnrecognizedEntity ( ColumnIdentifier entity , Relation relation ) throws InvalidRequestException { } private Term prepareLimit ( VariableSpecifications boundNames ) throws InvalidRequestException { } private void updateRestrictionsForRelation ( SelectStatement stmt , List < ColumnDefinition > defs , MultiColumnRelation relation , VariableSpecifications boundNames ) throws InvalidRequestException { } private Restriction getExistingRestriction ( SelectStatement stmt , ColumnDefinition def ) { } private void updateRestrictionsForRelation ( SelectStatement stmt , ColumnDefinition def , SingleColumnRelation relation , VariableSpecifications names ) throws InvalidRequestException { } Restriction updateSingleColumnRestriction ( ColumnDefinition def , Restriction existingRestriction , SingleColumnRelation newRel , VariableSpecifications boundNames ) throws InvalidRequestException { } private void processPartitionKeyRestrictions ( SelectStatement stmt , boolean hasQueriableIndex , CFMetaData cfm ) throws InvalidRequestException { } private void checkTokenFunctionArgumentsOrder ( CFMetaData cfm ) throws InvalidRequestException { } private void processColumnRestrictions ( SelectStatement stmt , boolean hasQueriableIndex , CFMetaData cfm ) throws InvalidRequestException { boolean canRestrictFurtherComponents = true ; ColumnDefinition previous = null ; boolean previousIsSlice = false ; Iterator < ColumnDefinition > iter = cfm . clusteringColumns ( ) . iterator ( ) ; for ( int i = 0 ; i < ( stmt . columnRestrictions . length ) ; i ++ ) { ColumnDefinition cdef = iter . next ( ) ; Restriction restriction = stmt . columnRestrictions [ i ] ; if ( restriction == null ) { canRestrictFurtherComponents = false ; previousIsSlice = false ; } else if ( ! canRestrictFurtherComponents ) { if ( ! ( ( previousIsSlice && ( restriction . isSlice ( ) ) ) && ( restriction . isMultiColumn ( ) ) ) ) { if ( hasQueriableIndex ) { stmt . usesSecondaryIndexing = true ; break ; } <START_BUG> throw new InvalidRequestException ( String . format ( "PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>restricted<seq2seq4repair_space>(preceding<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>is<seq2seq4repair_space>either<seq2seq4repair_space>not<seq2seq4repair_space>restricted<seq2seq4repair_space>or<seq2seq4repair_space>by<seq2seq4repair_space>a<seq2seq4repair_space>non-EQ<seq2seq4repair_space>relation)" , cdef . name , previous ) ) ; <END_BUG> } } else if ( restriction . isSlice ( ) ) { canRestrictFurtherComponents = false ; previousIsSlice = true ; Restriction . Slice slice = ( ( Restriction . Slice ) ( restriction ) ) ; if ( ( ! ( cfm . comparator . isCompound ( ) ) ) && ( ( ! ( slice . isInclusive ( START ) ) ) || ( ! ( slice . isInclusive ( END ) ) ) ) ) stmt . sliceRestriction = slice ; } else if ( restriction . isIN ( ) ) { if ( ( ! ( restriction . isMultiColumn ( ) ) ) && ( i != ( ( stmt . columnRestrictions . length ) - 1 ) ) ) throw new InvalidRequestException ( String . format ( "Clustering<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>restricted<seq2seq4repair_space>by<seq2seq4repair_space>an<seq2seq4repair_space>IN<seq2seq4repair_space>relation" , cdef . name ) ) ; else if ( stmt . selectACollection ( ) ) throw new InvalidRequestException ( String . format ( "Cannot<seq2seq4repair_space>restrict<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>by<seq2seq4repair_space>IN<seq2seq4repair_space>relation<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>collection<seq2seq4repair_space>is<seq2seq4repair_space>selected<seq2seq4repair_space>by<seq2seq4repair_space>the<seq2seq4repair_space>query" , cdef . name ) ) ; } else if ( restriction . isContains ( ) ) { if ( ! hasQueriableIndex ) throw new InvalidRequestException ( String . format ( "Cannot<seq2seq4repair_space>restrict<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>by<seq2seq4repair_space>a<seq2seq4repair_space>CONTAINS<seq2seq4repair_space>relation<seq2seq4repair_space>without<seq2seq4repair_space>a<seq2seq4repair_space>secondary<seq2seq4repair_space>index" , cdef . name ) ) ; stmt . usesSecondaryIndexing = true ; } previous = cdef ; } } private void validateSecondaryIndexSelections ( SelectStatement stmt ) throws InvalidRequestException { } private void verifyOrderingIsAllowed ( SelectStatement stmt ) throws InvalidRequestException { } private void handleUnrecognizedOrderingColumn ( ColumnIdentifier column ) throws InvalidRequestException { } private void processOrderingClause ( SelectStatement stmt , CFMetaData cfm ) throws InvalidRequestException { } private boolean isReversed ( SelectStatement stmt , CFMetaData cfm ) throws InvalidRequestException { } private void checkNeedsFiltering ( SelectStatement stmt ) throws InvalidRequestException { } private static boolean needFiltering ( SelectStatement stmt ) { } private int indexOf ( ColumnDefinition def , Selection selection ) { }

Fix:
throw new InvalidRequestException ( String . format ( "PRIMARY<seq2seq4repair_space>KEY<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>restricted<seq2seq4repair_space>(preceding<seq2seq4repair_space>column<seq2seq4repair_space>\"%s\"<seq2seq4repair_space>is<seq2seq4repair_space>either<seq2seq4repair_space>not<seq2seq4repair_space>restricted<seq2seq4repair_space>or<seq2seq4repair_space>by<seq2seq4repair_space>a<seq2seq4repair_space>non-EQ<seq2seq4repair_space>relation)" , cdef . name , previous . name ) ) ;