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: String toSqlString(Criteria, CriteriaQuery)
|
Method name: void addComponentTypedValues(String, Object, AbstractComponentType, List, Criteria, CriteriaQuery)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | if ( propertyTypes[i]↵ | 1 | if ( isPropertyIncluded(value, subpath, subtype) ) {↵ | |
2 | .isComponentType() ) {↵ | 2 | if ( subtype.isComponentType() ) {↵ | |
3 | appendComponentCondition(↵ | 3 | addComponent↵ | |
4 | propertyName,↵ | |||
5 | propertyValue,↵ | |||
6 | (AbstractComponentType) propertyTypes[i],↵ | |||
7 | criteria,↵ | 4 | TypedValues(subpath, value, (AbstractComponentType) subtype, list, criteria,↵ | |
8 | criteriaQuery,↵ | 5 | criteriaQuery↵ | |
9 | buf↵ | |||
10 | );↵ | 6 | );↵ | |
11 | }↵ | 7 | }↵ | |
12 | else {↵ | 8 | else {↵ | |
13 | appendPropertyCondition(↵ | 9 | addProperty↵ | |
14 | propertyName,↵ | |||
15 | propertyValue,↵ | |||
16 | criteria,↵ | |||
17 | criteriaQuery,↵ | |||
18 | buf↵ | 10 | TypedValue(value, subtype, list);↵ | |
19 | );↵ | 11 | }↵ | |
20 | } | 12 |
| |
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 | 10 |
Number of mapped statements | 2 |
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.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
11 | if (propertyTypes[i].isComponentType()) |
| 10 | if (subtype.isComponentType()) | |||||||||||||||||
| 11 | addComponentTypedValues(subpath, value, (AbstractComponentType)subtype, list, criteria, criteriaQuery); | |||||||||||||||||||
12 | appendComponentCondition(propertyName, propertyValue, (AbstractComponentType)propertyTypes[i], criteria, criteriaQuery, buf); | | |||||||||||||||||||
else | else | ||||||||||||||||||||
13 | appendPropertyCondition(propertyName, propertyValue, criteria, criteriaQuery, buf); |
| 12 | addPropertyTypedValue(value, subtype, list); |
Row | Violation |
---|---|
1 | Expression appendPropertyCondition(propertyName,propertyValue,criteria,criteriaQuery,buf) is a void method call, and thus it cannot be parameterized |
2 | Expression addPropertyTypedValue(value,subtype,list) is a void method call, and thus it cannot be parameterized |
3 | Expression appendPropertyCondition(propertyName,propertyValue,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 |