File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java | |||
Method name: UniqueKey getOrCreateUniqueKey(String)
|
Method name: Index getOrCreateIndex(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if ( uk == null ) {↵ | 1 | if ( index == null ) {↵ | |
2 | uk = new UniqueKey();↵ | 2 | index = new Index();↵ | |
3 | uk.setName( keyName );↵ | 3 | index.setName( indexName );↵ | |
4 | uk.setTable( this );↵ | 4 | index.setTable( this );↵ | |
5 | uniqueKeys.put( keyName, uk );↵ | 5 | indexes.put( indexName, index );↵ | |
6 | } | 6 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 25 |
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 1.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | if (uk == null) |
| 2 | if (index == null) | ||||||||||||||||||||
|
| 3 | index = new Index(); | |||||||||||||||||||||
3 | uk = new UniqueKey(); |
| | |||||||||||||||||||||
4 | uk.setName(keyName); |
| 4 | index.setName(indexName); | ||||||||||||||||||||
5 | uk.setTable(this); |
| 5 | index.setTable(this); | ||||||||||||||||||||
6 | uniqueKeys.put(keyName, uk); |
| 6 | indexes.put(indexName, index); |
Row | Violation |
---|---|
1 | Type org.hibernate.mapping.UniqueKey of variable uk does not match with type org.hibernate.mapping.Index of variable index |
2 | Unmatched statement index=new Index(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
3 | Unmatched statement uk=new UniqueKey(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Type org.hibernate.mapping.UniqueKey of variable uk does not match with type org.hibernate.mapping.Index of variable index |
5 | Type org.hibernate.mapping.UniqueKey of variable uk does not match with type org.hibernate.mapping.Index of variable index |
6 | Type org.hibernate.mapping.UniqueKey of variable uk does not match with type org.hibernate.mapping.Index of variable index |