File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/dialect/Dialect.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Subclass.java | |||
Method name: String getHibernateTypeName(int)
|
Method name: String getTuplizerImplClassName(EntityMode)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | String result = hibernateTypeNames.get( code );↵ | 1 | String impl = super.getTuplizerImplClassName( mode );↵ | |
2 | if ( result == null ) {↵ | 2 | if ( impl == null ) {↵ | |
3 | throw new HibernateException( "No Hibernate type mapping for java.sql.Types code: " + code );↵ | 3 | impl = getSuperclass().getTuplizerImplClassName( mode );↵ | |
4 | }↵ | 4 | }↵ | |
5 | return result; | 5 | return impl; | |
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 in different classes |
Number of node comparisons | 8 |
Number of mapped statements | 3 |
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) | 3.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | String result = hibernateTypeNames.get(code); |
| 1 | String impl = super.getTuplizerImplClassName(mode); | |||||||||||||
2 | if (result == null) |
| 2 | if (impl == null) | |||||||||||||
|
| 3 | impl = getSuperclass().getTuplizerImplClassName(mode); | ||||||||||||||
3 | throw new HibernateException("No Hibernate type mapping for java.sql.Types code: " + code); |
| | ||||||||||||||
4 | return result; |
| 4 | return impl; |
Row | Violation |
---|---|
1 | Unmatched statement impl=getSuperclass().getTuplizerImplClassName(mode); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched throw new HibernateException("No Hibernate type mapping for java.sql.Types code: " + code); |
3 | Clone fragment #1 returns variables , while Clone fragment #2 returns variables impl |