public String getEntityName(Criteria subcriteria, String propertyName) {
if ( propertyName.indexOf( '.' ) > 0 ) {
String root = StringHelper.root( propertyName );
Criteria crit = getAliasedCriteria( root );
if ( crit != null ) {
return getEntityName( crit );
}
}
return getEntityName( subcriteria );
public String getPropertyName(String propertyName) {
if ( propertyName.indexOf( '.' ) > 0 ) {
String root = StringHelper.root( propertyName );
Criteria crit = getAliasedCriteria( root );
if ( crit != null ) {
return propertyName.substring( root.length() + 1 );
}
}
return propertyName;
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:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public String getEntityName(Criteria subcriteria, String propertyName) {↵ | | 1 | public String getPropertyName(String propertyName) {↵
|
2 | if ( propertyName.indexOf( '.' ) > 0 ) {↵ | | 2 | if ( propertyName.indexOf( '.' ) > 0 ) {↵
|
3 | String root = StringHelper.root( propertyName );↵ | | 3 | String root = StringHelper.root( propertyName );↵
|
4 | Criteria crit = getAliasedCriteria( root );↵ | | 4 | Criteria crit = getAliasedCriteria( root );↵
|
5 | if ( crit != null ) {↵ | | 5 | if ( crit != null ) {↵
|
6 | return getEntityName( crit );↵ | | 6 | return ↵
|
7 | }↵ | | |
|
8 | }↵ | | |
|
9 | return getEntityName( subcriteria )↵ | | 7 | propertyName.substring( root.length() + 1 );↵
|
| | | 8 | }↵
|
| | | 9 | }↵
|
10 | ;↵ | | 10 | return propertyName;↵
|
11 | | | 11 |
|
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.0 |
Clones location | |
Number of node comparisons | 0 |