File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/Example.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/Example.java | |||
Method name: void addComponentTypedValues(String, Object, AbstractComponentType, List, Criteria, CriteriaQuery)
|
Method name: void appendComponentCondition(String, Object, AbstractComponentType, Criteria, CriteriaQuery, StringBuffer)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if ( isPropertyIncluded(value, subpath, subtype) ) {↵ | 1 | Type subtype = subtypes[i];↵ | |
2 | if ( subtype.isComponentType() ) {↵ | 2 | if ( subtype.isComponentType() ) {↵ | |
3 | addComponentTypedValues(subpath, value, ↵ | 3 | appendComponentCondition(↵ | |
4 | subpath,↵ | |||
5 | value,↵ | |||
4 | (AbstractComponentType) subtype, list, ↵ | 6 | (AbstractComponentType) subtype,↵ | |
5 | criteria, ↵ | 7 | criteria,↵ | |
6 | criteriaQuery↵ | 8 | criteriaQuery,↵ | |
9 | buf↵ | |||
7 | );↵ | 10 | );↵ | |
8 | }↵ | 11 | }↵ | |
9 | else {↵ | 12 | else {↵ | |
10 | addPropertyTypedValue(value, subtype, list);↵ | 13 | appendPropertyCondition(↵ | |
14 | subpath,↵ | |||
15 | value,↵ | |||
16 | criteria,↵ | |||
17 | criteriaQuery,↵ | |||
18 | buf↵ | |||
11 | }↵ | 19 | ↵ | |
20 | );↵ | |||
12 | } | 21 | } | |
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 | 11 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 424.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| 9 | Type subtype = subtypes[i]; | ||||||||||||||||||
10 | if (subtype.isComponentType()) | 10 | if (subtype.isComponentType()) | ||||||||||||||||||
| 11 | appendComponentCondition(subpath, value, (AbstractComponentType)subtype, criteria, criteriaQuery, buf); | |||||||||||||||||||
11 | addComponentTypedValues(subpath, value, (AbstractComponentType)subtype, list, criteria, criteriaQuery); | | |||||||||||||||||||
else | else | ||||||||||||||||||||
12 | addPropertyTypedValue(value, subtype, list); |
| 12 | appendPropertyCondition(subpath, value, criteria, criteriaQuery, buf); |
Row | Violation |
---|---|
1 | Unmatched statement Type subtype=subtypes[i]; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted |
2 | Expression addPropertyTypedValue(value,subtype,list) is a void method call, and thus it cannot be parameterized |
3 | Expression appendPropertyCondition(subpath,value,criteria,criteriaQuery,buf) is a void method call, and thus it cannot be parameterized |
4 | Expression addPropertyTypedValue(value,subtype,list) is a void method call, and thus it cannot be parameterized |
5 | Expression appendPropertyCondition(subpath,value,criteria,criteriaQuery,buf) is a void method call, and thus it cannot be parameterized |