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/entity/AbstractEntityPersister.java | |||
Method name: String[] qualify(String, String[], String[])
|
Method name: String[] toColumns(String, int)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | for (int i=0; i<span; i++) {↵ | 1 | for ( int j = 0; j < cols.length; j++ ) {↵ | |
2 | if ( columnNames[i]==null ) {↵ | 2 | if ( cols[j] == null ) {↵ | |
3 | result[i] = StringHelper.replace( formulaTemplates[i], Template.TEMPLATE, alias );↵ | 3 | result[j] = StringHelper.replace( templates[j], Template.TEMPLATE, alias );↵ | |
4 | }↵ | 4 | }↵ | |
5 | else {↵ | 5 | else {↵ | |
6 | result[i] = StringHelper.qualify( alias, columnNames[i] );↵ | 6 | result[j] = StringHelper.qualify( alias, cols[j] );↵ | |
7 | }↵ | 7 | }↵ | |
8 | } | 8 |
| |
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.5 |
Clones location | Clones are in different classes |
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) | 14.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | for (int i = 0; i < span; i++) |
| 5 | for (int j = 0; j < cols.length; j++) | |||||||||||||||||||
4 | if (columnNames[i] == null) |
| 6 | if (cols[j] == null) | |||||||||||||||||||
5 | result[i] = StringHelper.replace(formulaTemplates[i], Template.TEMPLATE, alias); |
| 7 | result[j] = StringHelper.replace(templates[j], Template.TEMPLATE, alias); | |||||||||||||||||||
else | else | ||||||||||||||||||||||
6 | result[i] = StringHelper.qualify(alias, columnNames[i]); |
| 8 | result[j] = StringHelper.qualify(alias, cols[j]); |
Row | Violation |
---|