File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/property/ChainedPropertyAccessor.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/property/ChainedPropertyAccessor.java | |||
Method name: Getter getGetter(Class, String)
|
Method name: Setter getSetter(Class, String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | for (int i = 0; i < chain.length; i++) {↵ | 1 | for (int i = 0; i < chain.length; i++) {↵ | |
2 | PropertyAccessor candidate = chain[i];↵ | 2 | PropertyAccessor candidate = chain[i];↵ | |
3 | try {↵ | 3 | try {↵ | |
4 | result = candidate.getGetter(theClass, propertyName);↵ | 4 | result = candidate.getSetter(theClass, propertyName);↵ | |
5 | return result;↵ | 5 | return result;↵ | |
6 | } catch (PropertyNotFoundException pnfe) {↵ | 6 | } catch (PropertyNotFoundException pnfe) {↵ | |
7 | // ignore↵ | 7 | //↵ | |
8 | }↵ | 8 | }↵ | |
9 | } | 9 |
| |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 3 |
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) | 0.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||
---|---|---|---|---|---|---|---|---|
2 | for (int i = 0; i < chain.length; i++) | 2 | for (int i = 0; i < chain.length; i++) | |||||
3 | PropertyAccessor candidate = chain[i]; | 3 | PropertyAccessor candidate = chain[i]; | |||||
4 | try | 4 | try | |||||
|
| 5 | result = candidate.getSetter(theClass, propertyName); | |||||
5 | result = candidate.getGetter(theClass, propertyName); |
| | |||||
|
| 6 | return result; | |||||
6 | return result; |
| |
Row | Violation |
---|---|
1 | Unmatched statement result=candidate.getSetter(theClass,propertyName); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Unmatched statement result=candidate.getSetter(theClass,propertyName); 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 result=candidate.getGetter(theClass,propertyName); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
4 | Unmatched statement result=candidate.getGetter(theClass,propertyName); 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 return result; |
6 | Unmatched return result; |