Buggy code:
public class TestMetaModelTypesafeCriteria extends CriteriaTest { protected Entity < Account > account_ = null ; protected Embeddable < Address > address_ = null ; protected Embeddable < Contact > contact_ = null ; protected Entity < Course > course_ = null ; protected Entity < CreditCard > creditCard_ = null ; protected Entity < Customer > customer_ = null ; protected Entity < Department > department_ = null ; protected Entity < Employee > employee_ = null ; protected Entity < Exempt > exempt_ = null ; protected Entity < Item > item_ = null ; protected Entity < LineItem > lineItem_ = null ; protected Entity < Manager > manager_ = null ; protected Entity < Movie > movie_ = null ; protected Entity < Order > order_ = null ; protected Entity < Person > person_ = null ; protected Entity < Phone > phone_ = null ; protected Entity < Photo > photo_ = null ; protected Entity < Product > product_ = null ; protected Entity < Semester > semester_ = null ; protected Entity < Student > student_ = null ; protected Entity < TransactionHistory > transactionHistory_ = null ; protected Entity < VideoStore > videoStore_ = null ; public void setUp ( ) { } public void testStringEqualExpression ( ) { } public void testSetAndListJoins ( ) { } public void testLeftSetJoin ( ) { } @ AllowFailure ( message = "FetchJoin<seq2seq4repair_space>not<seq2seq4repair_space>implemented" ) public void testFetchJoins ( ) { <START_BUG> String jpql = "SELECT<seq2seq4repair_space>d<seq2seq4repair_space>FROM<seq2seq4repair_space>Department<seq2seq4repair_space>LEFT<seq2seq4repair_space>JOIN<seq2seq4repair_space>FETCH<seq2seq4repair_space>d.employees<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>d.deptNo<seq2seq4repair_space>=<seq2seq4repair_space>1" ; <END_BUG> CriteriaQuery q = cb . create ( ) ; Root < Department > d = q . from ( Department . class ) ; d . fetch ( department_ . getSet ( "employees" , Employee . class ) , LEFT ) ; q . where ( cb . equal ( d . get ( department_ . getAttribute ( "deptNo" , Integer . class ) ) , 1 ) ) . select ( d ) ; assertEquivalence ( q , jpql ) ; } public void testPathNavigation ( ) { } public void testKeyPathNavigation ( ) { } public void testIndexExpression ( ) { } @ AllowFailure ( message = "as()<seq2seq4repair_space>not<seq2seq4repair_space>implemented" ) public void testIsEmptyExpressionOnJoin ( ) { } public void testFunctionalExpressionInProjection ( ) { } public void testTypeExpression ( ) { } public void testJoinAndIndexExpression ( ) { } public void testAggregateExpressionInProjection ( ) { } public void testSizeExpressionInProjection ( ) { } public void testCaseExpression ( ) { } public void testMemberOfExpression ( ) { } public void testParameters ( ) { } @ AllowFailure ( message = "Generates<seq2seq4repair_space>invalid<seq2seq4repair_space>SQL" ) public void testKeyExpressionInSelectList ( ) { } public void testConstructorInSelectList ( ) { } public void testUncorrelatedSubqueryWithAggregateProjection ( ) { } public void testSubqueryWithExistsClause ( ) { } public void testSubqueryWithAllClause ( ) { } public void testCorrelatedSubqueryWithCount ( ) { } public void testCorrelatedSubqueryWithJoin ( ) { } @ AllowFailure ( message = "Root<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>subquery._delegate<seq2seq4repair_space>not<seq2seq4repair_space>set" ) public void testCorrelatedSubqueryWithAllClause ( ) { } public void testGroupByAndHaving ( ) { } public void testOrderingByExpressionNotIncludedInSelection ( ) { } public void testOrderingByExpressionIncludedInSelection ( ) { } public void testOrderingWithNumericalExpressionInSelection ( ) { } }

Fix:
String jpql = "SELECT<seq2seq4repair_space>d<seq2seq4repair_space>FROM<seq2seq4repair_space>Department<seq2seq4repair_space>d<seq2seq4repair_space>LEFT<seq2seq4repair_space>JOIN<seq2seq4repair_space>FETCH<seq2seq4repair_space>d.employees<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>d.deptNo<seq2seq4repair_space>=<seq2seq4repair_space>1" ;