if (!grouped) {
return super.toGroupSqlString(criteria, criteriaQuery);
}
else {
return StringHelper.join( ", ", criteriaQuery.getIdentifierColumns(criteria) );
}
if (!grouped) {
return super.toGroupSqlString(criteria, criteriaQuery);
}
else {
return criteriaQuery.getColumn(criteria, propertyName);
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/IdentifierProjection.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/criterion/PropertyProjection.java
|
Method name: String toGroupSqlString(Criteria, CriteriaQuery)
|
|
Method name: String toGroupSqlString(Criteria, CriteriaQuery)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if (!grouped) {↵ | | 1 | if (!grouped) {↵
|
2 | return super.toGroupSqlString(criteria, criteriaQuery);↵ | | 2 | return super.toGroupSqlString(criteria, criteriaQuery);↵
|
3 | }↵ | | 3 | }↵
|
4 | else {↵ | | 4 | else {↵
|
5 | return StringHelper.join( ", ", criteriaQuery.getIdentifierColumns(criteria) );↵ | | 5 | return criteriaQuery.getColumn(criteria, propertyName);↵
|
6 | } | | 6 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 having the same super class |
Number of node comparisons | 9 |
-
{Non-refactorable}
Mapping Summary
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) | 0.5 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | if (!grouped) | | 1 | if (!grouped) |
2 | return super.toGroupSqlString(criteria, criteriaQuery); | | 2 | return super.toGroupSqlString(criteria, criteriaQuery); |
| | | | |
| | | 3 | return criteriaQuery.getColumn(criteria, propertyName); |
3 | return StringHelper.join(", ", criteriaQuery.getIdentifierColumns(criteria)); | | | |
Precondition Violations (2)
Row |
Violation |
1 | Unmatched return criteriaQuery.getColumn(criteria,propertyName); |
2 | Unmatched return StringHelper.join(", ",criteriaQuery.getIdentifierColumns(criteria)); |