File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/component/AbstractComponentTuplizer.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java | |||
Method name: void AbstractComponentTuplizer(Component)
|
Method name: void AbstractEntityTuplizer(EntityMetamodel, PersistentClass)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | while ( iter.hasNext() ) {↵ | 1 | while ( iter.hasNext() ) {↵ | |
2 | ↵ | 2 | //TODO: redesign how PropertyAccessors are acquired...↵ | |
3 | Property prop = ( Property ) iter.next();↵ | 3 | Property property = (Property) iter.next();↵ | |
4 | getters[i] = buildGetter( component, prop );↵ | 4 | getters[i] = buildPropertyGetter(property, mappingInfo);↵ | |
5 | setters[i] = buildSetter( component, prop );↵ | 5 | setters[i] = buildPropertySetter(property, mappingInfo);↵ | |
6 | if ( !prop.isBasicPropertyAccessor() ) {↵ | 6 | if ( !property.isBasicPropertyAccessor() ) ↵ | |
7 | foundCustomAccessor = true;↵ | 7 | foundCustomAccessor = true;↵ | |
8 | }↵ | 8 | ↵ | |
9 | i++;↵ | 9 | i++;↵ | |
10 | } | 10 |
| |
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 29 |
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 65.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | while (iter.hasNext()) | 13 | while (iter.hasNext()) | |||||||||||
8 | Property prop = (Property)iter.next(); |
| 14 | Property property = (Property)iter.next(); | ||||||||||
9 | getters[i] = buildGetter(component, prop); |
| | |||||||||||
10 | setters[i] = buildSetter(component, prop); |
| | |||||||||||
|
| 15 | getters[i] = buildPropertyGetter(property, mappingInfo); | |||||||||||
|
| 16 | setters[i] = buildPropertySetter(property, mappingInfo); | |||||||||||
11 | if (!prop.isBasicPropertyAccessor()) |
| 17 | if (!property.isBasicPropertyAccessor()) | ||||||||||
12 | foundCustomAccessor = true; | 18 | foundCustomAccessor = true; | |||||||||||
13 | i++; | 19 | i++; |
Row | Violation |
---|---|
1 | Unmatched statement getters[i]=buildGetter(component,prop); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement getters[i]=buildGetter(component,prop); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
3 | Unmatched statement setters[i]=buildSetter(component,prop); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement setters[i]=buildSetter(component,prop); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
5 | Unmatched statement getters[i]=buildPropertyGetter(property,mappingInfo); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
6 | Unmatched statement getters[i]=buildPropertyGetter(property,mappingInfo); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
7 | Unmatched statement setters[i]=buildPropertySetter(property,mappingInfo); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
8 | Unmatched statement setters[i]=buildPropertySetter(property,mappingInfo); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
9 | Clone fragment #1 returns variables prop, i, foundCustomAccessor , while Clone fragment #2 returns variables property, i, foundCustomAccessor |