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