Buggy code:
public class TestTypesafeCriteria extends CriteriaTest { public void btestExpressions ( ) { } public void testExplictRoot ( ) { } public void testImplicitRoot ( ) { } public void testEqualWithAttributeAndLiteral ( ) { } public void testEqualWithAttributeAndAttribute ( ) { } public void testProjection ( ) { } public void testAbsExpression ( ) { } public void testAvgExpression ( ) { } public void testInPredicate ( ) { } public void testInPredicateWithPath ( ) { } public void testBinaryPredicate ( ) { } public void testEqualWithAttributeAndUnaryExpression ( ) { } public void testBetweenExpression ( ) { } public void testSimplePath ( ) { } public void testSimpleLeftJoin ( ) { } public void testMultipartNavigation ( ) { } public void testMultiLevelJoins ( ) { } public void testJoinsNotPresentInWhereClause ( ) { } @ AllowFailure ( message = "FetchJoin<seq2seq4repair_space>not<seq2seq4repair_space>implemented" ) public void testFetchJoins ( ) { } public void testJoinedPathInProjection ( ) { } public void testKeyExpression ( ) { } public void testIndexExpression ( ) { } public void testIsEmptyExpression ( ) { } public void testExpressionInProjection ( ) { } public void testTypeExpression ( ) { } public void testIndexExpressionAndLietral ( ) { } public void testAggregateInProjection ( ) { } public void testSizeExpression ( ) { } public void testCaseExpression ( ) { } public void testExpression1 ( ) { } public void testExpression3 ( ) { } public void testGeneralCaseExpression ( ) { } public void testSimpleCaseExpression1 ( ) { } public void testSimpleCaseExpression2 ( ) { } public void testLiterals ( ) { } public void testParameters1 ( ) { } public void testParameters2 ( ) { } public void testParameters3 ( ) { } public void testParameters4 ( ) { } @ AllowFailure ( message = "collection<seq2seq4repair_space>valued<seq2seq4repair_space>parameter<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>work<seq2seq4repair_space>in<seq2seq4repair_space>in()" ) public void testParameters5 ( ) { } @ AllowFailure ( message = "Generates<seq2seq4repair_space>invalid<seq2seq4repair_space>SQL" ) public void testSelectList1 ( ) { } public void testNewConstruct ( ) { } public void testConstructorInProjection ( ) { } @ AllowFailure ( message = "Projections<seq2seq4repair_space>of<seq2seq4repair_space>multiple<seq2seq4repair_space>NEW<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>work" ) public void testMultipleConstructorInProjection ( ) { } public void testSubqueries1 ( ) { } public void testSubqueries2 ( ) { } public void testSubqueries3 ( ) { } public void testSubqueries4 ( ) { } public void testSubqueries5 ( ) { } public void testSubqueries6 ( ) { } public void testGroupByAndHaving ( ) { } public void testOrdering1 ( ) { } public void testOrdering2 ( ) { } public void testOrdering3 ( ) { String jpql = "SELECT<seq2seq4repair_space>o.quantity,<seq2seq4repair_space>o.totalCost<seq2seq4repair_space>*<seq2seq4repair_space>1.08<seq2seq4repair_space>AS<seq2seq4repair_space>taxedCost,<seq2seq4repair_space>" + ( ( "a.zipCode<seq2seq4repair_space>FROM<seq2seq4repair_space>Customer<seq2seq4repair_space>c<seq2seq4repair_space>JOIN<seq2seq4repair_space>c.orders<seq2seq4repair_space>o<seq2seq4repair_space>JOIN<seq2seq4repair_space>c.address<seq2seq4repair_space>a<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>a.state<seq2seq4repair_space>=<seq2seq4repair_space>'CA'<seq2seq4repair_space>AND<seq2seq4repair_space>a.county<seq2seq4repair_space>=<seq2seq4repair_space>'Santa<seq2seq4repair_space>Clara'<seq2seq4repair_space>" ) + "ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>o.quantity,<seq2seq4repair_space>taxedCost,<seq2seq4repair_space>a.zipCode" ) ; CriteriaQuery < Tuple > q = cb . createTupleQuery ( ) ; Root < Customer > c = q . from ( Customer . class ) ; Join < Customer , Order > o = c . join ( orders ) ; Join < Customer , Address > a = c . join ( address ) ; Expression < Double > taxedCost = cb . prod ( o . get ( totalCost ) , 1.08 ) ; <START_BUG> taxedCost . setAlias ( "taxedCost" ) ; <END_BUG> q . where ( cb . equal ( a . get ( state ) , "CA" ) , cb . equal ( a . get ( county ) , "Santa<seq2seq4repair_space>Clara" ) ) ; q . orderBy ( cb . asc ( o . get ( quantity ) ) , cb . asc ( taxedCost ) , cb . asc ( a . get ( zipCode ) ) ) ; q . multiselect ( o . get ( quantity ) , taxedCost , a . get ( zipCode ) ) ; assertEquivalence ( q , jpql ) ; } public void testOrdering4 ( ) { } public void testOrdering5 ( ) { } }

Fix:
taxedCost . alias ( "taxedCost" ) ;