Buggy code:
@ Test ( singleThreaded = true ) public class TestAnalyzer { public static final Session SESSION = Session . builder ( ) . setUser ( "user" ) . setSource ( "test" ) . setCatalog ( "default" ) . setSchema ( "default" ) . setTimeZoneKey ( UTC_KEY ) . setLocale ( Locale . ENGLISH ) . build ( ) ; private static final SqlParser SQL_PARSER = new SqlParser ( ) ; private Analyzer analyzer ; private Analyzer approximateDisabledAnalyzer ; @ Test public void testDuplicateRelation ( ) throws Exception { } @ Test public void testNonComparableGroupBy ( ) throws Exception { } @ Test public void testNonComparableWindowPartition ( ) throws Exception { } @ Test public void testNonComparableWindowOrder ( ) throws Exception { <START_BUG> assertFails ( SemanticErrorCode . TYPE_MISMATCH , "SELECT<seq2seq4repair_space>row_number()<seq2seq4repair_space>OVER<seq2seq4repair_space>(ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>t.x)<seq2seq4repair_space>FROM<seq2seq4repair_space>(VALUES(null))<seq2seq4repair_space>AS<seq2seq4repair_space>t(x)" ) ; <END_BUG> } @ Test public void testNonComparableDistinctAggregation ( ) throws Exception { } @ Test public void testNonComparableDistinct ( ) throws Exception { } @ Test public void testInSubqueryTypes ( ) throws Exception { } @ Test public void testScalarSubQueryException ( ) throws Exception { } @ Test public void testHavingReferencesOutputAlias ( ) throws Exception { } @ Test public void testWildcardWithInvalidPrefix ( ) throws Exception { } @ Test public void testGroupByWithWildcard ( ) throws Exception { } @ Test public void testGroupByInvalidOrdinal ( ) throws Exception { } @ Test public void testOrderByInvalidOrdinal ( ) throws Exception { } @ Test public void testOrderByNonComparable ( ) throws Exception { } @ Test public void testNestedAggregation ( ) throws Exception { } @ Test public void testAggregationsNotAllowed ( ) throws Exception { } @ Test public void testWindowsNotAllowed ( ) throws Exception { } @ Test public void testInvalidTable ( ) throws Exception { } @ Test public void testNonAggregate ( ) throws Exception { } @ Test public void testInvalidAttribute ( ) throws Exception { } @ Test public void testOrderByMustAppearInSelectWithDistinct ( ) throws Exception { } @ Test public void testNonBooleanWhereClause ( ) throws Exception { } @ Test public void testApproximateNotEnabled ( ) throws Exception { } @ Test public void testApproximateQuery ( ) throws Exception { } @ Test public void testDistinctAggregations ( ) throws Exception { } @ Test public void testMultipleDistinctAggregations ( ) throws Exception { } @ Test public void testOrderByExpressionOnOutputColumn ( ) throws Exception { } @ Test public void testOrderByExpressionOnOutputColumn2 ( ) throws Exception { } @ Test public void testOrderByWithWildcard ( ) throws Exception { } @ Test public void testMismatchedColumnAliasCount ( ) throws Exception { } @ Test public void testJoinOnConstantExpression ( ) throws Exception { } @ Test public void testJoinOnNonBooleanExpression ( ) throws Exception { } @ Test public void testJoinOnAmbiguousName ( ) throws Exception { } @ Test public void testNonEquiJoin ( ) throws Exception { } @ Test public void testNonBooleanHaving ( ) throws Exception { } @ Test public void testAmbiguousReferenceInOrderBy ( ) throws Exception { } @ Test public void testImplicitCrossJoin ( ) { } @ Test public void testNaturalJoinNotSupported ( ) throws Exception { } @ Test public void testNestedWindowFunctions ( ) throws Exception { } @ Test public void testWindowFunctionWithoutOverClause ( ) { } @ Test public void testInvalidWindowFrame ( ) throws Exception { } @ Test public void testDistinctInWindowFunctionParameter ( ) throws Exception { } @ Test public void testGroupByOrdinalsWithWildcard ( ) throws Exception { } @ Test public void testGroupByWithQualifiedName ( ) throws Exception { } @ Test public void testGroupByWithQualifiedName2 ( ) throws Exception { } @ Test public void testGroupByWithQualifiedName3 ( ) throws Exception { } @ Test public void testHaving ( ) throws Exception { } @ Test public void testWithCaseInsensitiveResolution ( ) throws Exception { } @ Test public void testInsert ( ) throws Exception { } @ Test public void testDuplicateWithQuery ( ) throws Exception { } @ Test public void testCaseInsensitiveDuplicateWithQuery ( ) throws Exception { } @ Test public void testWithForwardReference ( ) throws Exception { } @ Test public void testExpressions ( ) throws Exception { } @ Test ( enabled = false ) public void testInWithNumericTypes ( ) throws Exception { } @ Test public void testWildcardWithoutFrom ( ) throws Exception { } @ Test public void testReferenceWithoutFrom ( ) throws Exception { } @ Test public void testGroupBy ( ) throws Exception { } @ Test public void testAggregateWithWildcard ( ) throws Exception { } @ Test public void testGroupByCase ( ) throws Exception { } @ Test public void testMismatchedUnionQueries ( ) throws Exception { } @ Test public void testUnionUnmatchedOrderByAttribute ( ) throws Exception { } @ Test public void testGroupByComplexExpressions ( ) throws Exception { } @ Test public void testNonNumericTableSamplePercentage ( ) throws Exception { } @ Test public void testTableSampleOutOfRange ( ) throws Exception { } @ Test public void testCreateViewColumns ( ) throws Exception { } @ Test public void testStaleView ( ) throws Exception { } @ Test public void testStoredViewAnalysisScoping ( ) throws Exception { } @ Test public void testStoredViewResolution ( ) throws Exception { } @ Test public void testUse ( ) throws Exception { } @ Test public void testNotNullInJoinClause ( ) throws Exception { } @ Test public void testIfInJoinClause ( ) throws Exception { } @ BeforeMethod ( alwaysRun = true ) public void setup ( ) throws Exception { } private void analyze ( @ Language ( "SQL" ) String query ) { } private void assertFails ( SemanticErrorCode error , @ Language ( "SQL" ) String query ) { } }

Fix:
assertFails ( SemanticErrorCode . TYPE_MISMATCH , "SELECT<seq2seq4repair_space>row_number()<seq2seq4repair_space>OVER<seq2seq4repair_space>(ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>t.x)<seq2seq4repair_space>FROM<seq2seq4repair_space>(VALUES(color('red')))<seq2seq4repair_space>AS<seq2seq4repair_space>t(x)" ) ;