return new StringBuffer( "select " )
.append( StringHelper.join( ", ", columns ) )
.append( " from " )
.append( join.toFromFragmentString().substring( 2 ) )// remove initial ", "
.append( " where " )
.append( join.toWhereFragmentString().substring( 5 ) )// remove initial " and "
.toString();
list = s.createCriteria(Baz.class)
.createAlias("fooSet", "foo")
.createAlias("foo.foo", "foo2")
.setLockMode("foo2", lockMode)
.add( Restrictions.isNull("foo2.component.glarch") )
.createCriteria("foo2.component.glarch")
.add( Restrictions.eq("name", "xxx") )
.list();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/CollectionSubqueryFactory.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/ParentChildTest.java
|
Method name: String createCollectionSubquery(JoinSequence, Map, String[])
|
|
Method name: void testComplexCriteria()
|
Number of AST nodes: 1
|
|
Number of AST nodes: 1
|
|
1 | return new StringBuffer( "select " )↵ | | |
|
2 | .append( StringHelper.join( ", ", columns ) )↵ | | |
|
3 | .append( " from " ↵ | | 1 | list = s.createCriteria(Baz.class)↵
|
| | | 2 | .createAlias("fooSet", "foo")↵
|
| | | 3 | .createAlias("foo.foo", "foo2")↵
|
4 | )↵ | | 4 | .setLockMode("foo2", lockMode)↵
|
5 | .append( join.toFromFragmentString().substring( 2 ) )// remove initial ", "↵ | | 5 | .a↵
|
6 | .append( " where " ↵ | | 6 | dd( Restrictions.isNull("foo2.component.glarch") )↵
|
7 | )↵ | | 7 | .createCriteria("foo2.component.glarch")↵
|
8 | .append( join.toWhereFragmentString().substring( 5 ) )// remove initial " and "↵ | | 8 | .a↵
|
9 | .toString↵ | | 9 | dd( Restrictions.eq("name", "xxx") )↵
|
10 | (); | | 10 | .list();
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |