AST and = create( AND, "{and}" );
AST currentFirstChild = statement.getWhereClause().getFirstChild();
and.setFirstChild( discrimNode );
and.addChild( currentFirstChild );
statement.getWhereClause().setFirstChild( and );
while ( iter.hasNext() ) {
cols.clear();
Join join = (Join) iter.next();
checkColumnDuplication( cols, join.getKey().getColumnIterator() );
checkPropertyColumnDuplication( cols, join.getPropertyIterator() );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/util/SyntheticAndFactory.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/PersistentClass.java
|
Method name: void addDiscriminatorWhereFragment(RestrictableStatement, Queryable, Map, String)
|
|
Method name: void checkColumnDuplication()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | AST and = create( AND, "{and}" );↵ | | |
|
2 | AST currentFirstChild = statement.getWhereClause().getFirstChild();↵ | | |
|
3 | and.setFirstChild( discrimNode );↵ | | |
|
4 | and.addChild( currentFirstChild );↵ | | |
|
5 | statement.getWhereClause().setFirstChild( and ); | | 1 | while ( iter.hasNext() ) {↵
|
| | | 2 | cols.clear();↵
|
| | | 3 | Join join = (Join) iter.next();↵
|
| | | 4 | checkColumnDuplication( cols, join.getKey().getColumnIterator() );↵
|
| | | 5 | checkPropertyColumnDuplication( cols, join.getPropertyIterator() );↵
|
| | | 6 | }
|
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 | 20 |