while ( iter.hasNext() ) {
FromElement child = ( FromElement ) iter.next();
if ( child.isCollectionOfValuesOrComponents() && child.isFetch() ) {
// Need a better way to define the suffixes here...
text = child.renderValueCollectionSelectFragment( nonscalarSize, nonscalarSize + k );
appender.append( SqlTokenTypes.SQL_TOKEN, text, false );
}
}
while ( iter.hasNext() ) {
OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next();
if ( last != null && last.isManyToManyWith( oj ) ) {
oj.addManyToManyJoin( outerjoin, ( QueryableCollection ) last.getJoinable() );
}
else {
oj.addJoins(outerjoin);
}
last = oj;
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/hql/ast/tree/SelectClause.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/JoinWalker.java
|
Method name: void renderNonScalarProperties(ASTAppender, FromElement, int, int)
|
|
Method name: JoinFragment mergeOuterJoins(List)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
1 | while ( iter.hasNext() ) {↵ | | 1 | while ( iter.hasNext() ) {↵
|
2 | FromElement child = ( FromElement ) iter.next();↵ | | 2 | ↵
|
3 | if ( child.isCollectionOfValuesOrComponents() && child.isFetch() ) {↵ | | |
|
4 | // Need a better way to define the suffixes here...↵ | | |
|
5 | text = child.renderValueCollectionSelectFragment( nonscalarSize, nonscalarSize + k );↵ | | |
|
6 | appender.append( SqlTokenTypes.SQL_TOKEN, text, false );↵ | | |
|
7 | }↵ | | 3 | OuterJoinableAssociation oj = (OuterJoinableAssociation) iter.next();↵
|
| | | 4 | if ( last != null && last.isManyToManyWith( oj ) ) {↵
|
| | | 5 | oj.addManyToManyJoin( outerjoin, ( QueryableCollection ) last.getJoinable() );↵
|
| | | 6 | }↵
|
| | | 7 | else {↵
|
| | | 8 | oj.addJoins(outerjoin);↵
|
| | | 9 | }↵
|
| | | 10 | last = oj;↵
|
8 | } | | 11 | }
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |