File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java | |||
Method name: void appendElementColumns(SelectFragment, String)
|
Method name: void appendIndexColumns(SelectFragment, String)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 5 | |||
1 | if ( hasIndex ) {↵ | |||
1 | for ( int i=0; i<elementColumnIsSettable.length; i++ ) {↵ | 2 | for ( int i=0; i<indexColumnIsSettable.length; i++ ) {↵ | |
2 | if ( elementColumnIsSettable[i] ) {↵ | 3 | if ( indexColumnIsSettable[i] ) {↵ | |
3 | frag.addColumn( elemAlias, elementColumnNames[i], elementColumnAliases[i] );↵ | 4 | frag.addColumn( alias, indexColumnNames[i], indexColumnAliases[i] );↵ | |
4 | }↵ | 5 | }↵ | |
5 | else {↵ | 6 | else {↵ | |
6 | frag.addFormula( elemAlias, elementFormulaTemplates[i], elementColumnAliases[i] );↵ | 7 | frag.addFormula( alias, indexFormulaTemplates[i], indexColumnAliases[i] );↵ | |
7 | ↵ | 8 | }↵ | |
8 | }↵ | 9 | }↵ | |
9 | } | 10 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | for (int i = 0; i < elementColumnIsSettable.length; i++) |
| 2 | for (int i = 0; i < indexColumnIsSettable.length; i++) | ||||||||||||||||
2 | if (elementColumnIsSettable[i]) |
| 3 | if (indexColumnIsSettable[i]) | ||||||||||||||||
3 | frag.addColumn(elemAlias, elementColumnNames[i], elementColumnAliases[i]); |
| 4 | frag.addColumn(alias, indexColumnNames[i], indexColumnAliases[i]); | ||||||||||||||||
else | else | |||||||||||||||||||
4 | frag.addFormula(elemAlias, elementFormulaTemplates[i], elementColumnAliases[i]); |
| 5 | frag.addFormula(alias, indexFormulaTemplates[i], indexColumnAliases[i]); |
Row | Violation |
---|