try {
//it does not refer to an alias of a projection,
//look for a property
return getType( subcriteria, propertyName );
}
catch ( HibernateException he ) {
//not found in inner query , try the outer query
if ( outerQueryTranslator != null ) {
return outerQueryTranslator.getType( subcriteria, propertyName );
}
else {
throw he;
}
}
try {
return getColumns( propertyName, subcriteria );
}
catch ( HibernateException he ) {
//not found in inner query , try the outer query
if ( outerQueryTranslator != null ) {
return outerQueryTranslator.getColumnsUsingProjection( subcriteria, propertyName );
}
else {
throw he;
}
}
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/criteria/CriteriaQueryTranslator.java
|
Method name: Type getTypeUsingProjection(Criteria, String)
|
|
Method name: String[] getColumnsUsingProjection(Criteria, String)
|
Number of AST nodes: 2
|
|
Number of AST nodes: 2
|
|
1 | try {↵ | | 1 | try {↵
|
2 | //it does not refer to an alias of a projection,↵ | | 2 | ↵
|
3 | //look for a property↵ | | |
|
4 | return getType( subcriteria, propertyName );↵ | | 3 | return getColumns( propertyName, subcriteria );↵
|
5 | }↵ | | 4 | }↵
|
6 | catch ( HibernateException he ) {↵ | | 5 | catch ( HibernateException he ) {↵
|
7 | //not found in inner query , try the outer query↵ | | 6 | //not found in inner query , try the outer query↵
|
8 | if ( outerQueryTranslator != null ) {↵ | | 7 | if ( outerQueryTranslator != null ) {↵
|
9 | return outerQueryTranslator.getType( subcriteria, propertyName );↵ | | 8 | return outerQueryTranslator.getColumnsUsingProjection( subcriteria, propertyName );↵
|
10 | }↵ | | 9 | }↵
|
11 | else {↵ | | 10 | else {↵
|
12 | throw he;↵ | | 11 | throw he;↵
|
13 | }↵ | | 12 | }↵
|
14 | } | | 13 | }
|
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 1 |