while ( criterionIterator.hasNext() ) {
CriteriaImpl.CriterionEntry entry = ( CriteriaImpl.CriterionEntry ) criterionIterator.next();
String sqlString = entry.getCriterion().toSqlString( entry.getCriteria(), this );
condition.append( sqlString );
if ( criterionIterator.hasNext() ) {
condition.append( " and " );
}
}
while ( iter.hasNext() ) {
Map.Entry element = ( Map.Entry ) iter.next();
String path = ( String ) element.getKey();
if ( path.startsWith( keyPrefix ) ) {
result.put( path.substring( keyPrefix.length() ), element.getValue() );
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/criteria/CriteriaQueryTranslator.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/custom/sql/SQLQueryReturnProcessor.java
|
Method name: String getWhereCondition()
|
|
Method name: Map filter(Map)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | while ( criterionIterator.hasNext() ) {↵ | | 1 | while ( iter.hasNext() ) {
↵
|
2 | CriteriaImpl.CriterionEntry entry = ( CriteriaImpl.CriterionEntry ) criterionIterator.next();↵ | | 2 | Map.Entry element = ( Map.Entry ) iter.next();
↵
|
3 | String sqlString = entry.getCriterion().toSqlString( entry.getCriteria(), this );↵ | | 3 | String path = ( String ) e↵
|
4 | condition.append( sqlString );↵ | | |
|
5 | if ( criterionIterator.hasNext() ) {↵ | | |
|
6 | condition.append( " and "↵ | | 4 | lement.getKey();↵
|
| | | 5 | if ( path.startsWith( keyPrefix ) ) {↵
|
7 | );↵ | | 6 | result.put( path.substring( keyPrefix.length() ), element.getValue() );
↵
|
8 | }↵ | | 7 | }
↵
|
9 | } | | 8 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 0 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |