Buggy code:
public class TestCompletionService extends AbstractTestCase { @ Inject private QueryService qs ; @ Inject private ValidationHelper vh ; @ Inject private CompletionService cs ; @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Position_Validation_EmptyQuery ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Position_Validation_NullType ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Position_Validation_NullQuery ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Position_Validation_NullAll ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Validation_EmptyQuery ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Validation_NullType ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Validation_NullQuery ( ) { } @ Test ( expected = BeanValidationException . class ) public void testFindCompletion_Validation_NullAll ( ) { } @ Test public void testFindCompletion_CreateTable_Start ( ) { } @ Test public void testFindCompletion_CreateTable_NotSupported ( ) { } @ Test public void testFindCompletion_CreateIndex_Start ( ) { } @ Test public void testFindCompletion_CreateIndex_NotSupported ( ) { } @ Test public void testFindCompletion_Batch_Start ( ) { } @ Test public void testFindCompletion_Batch_NotSupported ( ) { } @ Test public void testFindCompletion_AlterTable_Start ( ) { } @ Test public void testFindCompletion_AlterTable_NotSupported ( ) { } @ Test public void testFindCompletion_AlterKeyspace_Start ( ) { } @ Test public void testFindCompletion_AlterKeyspace_NotSupported ( ) { } @ Test public void testFindCompletion_Use_Start ( ) { } @ Test public void testFindCompletion_Use_AfterUse ( ) { } @ Test public void testFindCompletion_Update_Start ( ) { } @ Test public void testFindCompletion_Update_AfterUpdate ( ) { } @ Test public void testFindCompletion_Update_AfterTableName ( ) { } @ Test public void testFindCompletion_Update_AfterSet ( ) { } @ Test public void testFindCompletion_Update_AfterWhere ( ) { } @ Test public void testFindCompletion_Truncate_Start ( ) { } @ Test public void testFindCompletion_Truncate_AfterTruncate ( ) { } @ Test public void testFindCompletion_Truncate_AfterTruncateWithSpaceName ( ) { } @ Test public void testFindCompletion_Insert_Start ( ) { } @ Test public void testFindCompletion_Insert_AfterInsert_SpaceSystem ( ) { } @ Test public void testFindCompletion_Insert_AfterTableName ( ) { } @ Test public void testFindCompletion_Insert_AfterColumns ( ) { } @ Test public void testFindCompletion_Insert_OnValues ( ) { } @ Test public void testFindCompletion_Insert_AfterVaues ( ) { } @ Test public void testFindCompletion_Insert_AfterInsert_SpaceCqlDemo ( ) { } @ Test public void testFindCompletion_CreateKeyspace_AfterCreate ( ) { } @ Test public void testFindCompletion_CreateKeyspace_AfterWith ( ) { } @ Test public void testFindCompletion_CreateKeyspace_ExistsWith ( ) { } @ Test public void testFindCompletion_CreateKeyspace_Start ( ) { } @ Test public void testFindCompletion_CreateKeyspace_StartAfterCreate ( ) { } @ Test public void testFindCompletion_Delete_AfterDelete ( ) { } @ Test public void testFindCompletion_Delete_AfterFrom_NoSpqceInQuery ( ) { } @ Test public void testFindCompletion_Delete_AfterFrom_SpaceInQuery ( ) { } @ Test public void testFindCompletion_Delete_AfterTableName_KeyspaceInQuery ( ) { } @ Test public void testFindCompletion_Delete_AfterTableName_KeyspaceInSession ( ) { } @ Test public void testFindCompletion_Delete_AfterTableName_WrongKeyspaceInSession ( ) { } @ Test public void testFindCompletion_Delete_AfterWhere ( ) { } @ Test public void testFindCompletion_Delete_Start ( ) { } @ Test public void testFindCompletion_DropIndex_AfterDrop ( ) { } @ Test public void testFindCompletion_DropIndex_AfterDropWithExists ( ) { } @ Test public void testFindCompletion_DropIndex_Start ( ) { } @ Test public void testFindCompletion_DropIndex_StartDrop ( ) { } @ Test public void testFindCompletion_DropKeyspace_AfterDrop ( ) { } @ Test public void testFindCompletion_DropKeyspace_AfterDrop_KeyspacePartialyInQuery ( ) { } @ Test public void testFindCompletion_DropKeyspace_Start ( ) { } @ Test public void testFindCompletion_DropKeyspace_StartDrop ( ) { } @ Test public void testFindCompletion_DropTable_AfterDrop_ProvideSpace ( ) { } @ Test public void testFindCompletion_DropTable_AfterDrop_ProvideSpaceWithExists ( ) { } @ Test public void testFindCompletion_DropTable_AfterDrop_SpaceCqlDemo ( ) { } @ Test public void testFindCompletion_DropTable_AfterDrop_SpaceCqlDemo_IfExists ( ) { } @ Test public void testFindCompletion_DropTable_AfterDrop_SpaceSystem ( ) { } @ Test public void testFindCompletion_DropTable_AfterDrop_SpaceSystem_IfExists ( ) { } private void verifyDropTableAfterDrop ( ContextCqlCompletion completion , boolean spaceCqlDemoOrSystem , boolean containsKeyspaces ) { <START_BUG> int ks = ( containsKeyspaces ) ? 6 : 4 ; <END_BUG> vh . verifyFullAndMinCompletionNotTheSame ( completion , ks , ks ) ; vh . verifyContainsAllColumns ( completion , false ) ; { Collection < ? extends CqlPart > mcmp = vh . asHahsCol ( completion . cqlCompletion . minCompletion ) ; vh . verifyContainsAllKeyspaces ( mcmp , containsKeyspaces ) ; if ( cassandraSession . getCassandraVersion ( ) . min ( VER_2_0 ) ) { vh . verifyContainsOnlyKeywords ( mcmp , value ) ; } else { vh . verifyContainsNoKeywords ( mcmp ) ; } vh . verifyContainsTableNamesCqlDemo ( mcmp , spaceCqlDemoOrSystem ) ; vh . verifyContainsTableNamesSystem ( mcmp , ( ! spaceCqlDemoOrSystem ) ) ; vh . verifyContainsIndexFromCqlDemo ( mcmp , false ) ; } { Collection < ? extends CqlPart > fcmp = vh . asHahsCol ( completion . cqlCompletion . fullCompletion ) ; vh . verifyContainsAllKeyspaces ( fcmp , containsKeyspaces , "." ) ; if ( cassandraSession . getCassandraVersion ( ) . min ( VER_2_0 ) ) { vh . verifyContainsOnlyKeywords ( fcmp , value ) ; } else { vh . verifyContainsNoKeywords ( fcmp ) ; } vh . verifyContainsTableNamesCqlDemo ( fcmp , spaceCqlDemoOrSystem ) ; vh . verifyContainsTableNamesSystem ( fcmp , ( ! spaceCqlDemoOrSystem ) ) ; vh . verifyContainsIndexFromCqlDemo ( fcmp , false ) ; } } @ Test public void testFindCompletion_DropTable_Start ( ) { } @ Test public void testFindCompletion_Select_AfterFrom_ContainsColumnsFromKeyspaceInSessionScope ( ) { } @ Test public void testFindCompletion_Select_AfterFrom_ContainsColumnsFromKeyspaceWithTable_CursorOnEnd ( ) { } @ Test public void testFindCompletion_Select_AfterFrom_ContainsColumnsFromKeyspaceWithTable_CursorOnFrom ( ) { } @ Test public void testFindCompletion_Select_AfterFrom_NoSpqceInQuery ( ) { } @ Test public void testFindCompletion_Select_AfterFrom_SelectTableFromDifferentSpace ( ) { } @ Test public void testFindCompletion_Select_AfterFrom_SpaceInQuery ( ) { } @ Test public void testFindCompletion_Select_AfterOrderBy ( ) { } @ Test public void testFindCompletion_Select_AfterOrderBy_NoWhere ( ) { } @ Test public void testFindCompletion_Select_AfterSelect_ContainsAllColumns ( ) { } @ Test public void testFindCompletion_Select_AfterTableName ( ) { } @ Test public void testFindCompletion_Select_AfterWhere ( ) { } @ Test public void testFindInitialCompletion ( ) { }

Fix:
int ks = ( containsKeyspaces ) ? 6 : cassandraSession . getCassandraVersion ( ) . min ( VER_2_0 ) ? 4 : 3 ;