if ( type.isComponentType() ) {
Type[] subtypes = ( ( AbstractComponentType ) type ).getSubtypes();
for ( int i = 0; i < subtypes.length; i++ ) {
if ( indicatesCollection( subtypes[i] ) ) {
return true;
}
}
}
if ( !Character.isLetter( chars[0] ) ) {
for ( int i = 1; i < chars.length; i++ ) {
// as soon as we encounter our first letter, return the substring
// from that position
if ( Character.isLetter( chars[i] ) ) {
return alias.substring( i );
}
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/tuple/entity/EntityMetamodel.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/StringHelper.java
|
Method name: boolean indicatesCollection(Type)
|
|
Method name: String cleanAlias(String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | if ( type.isComponentType() ) {↵ | | 1 | if ( ↵
|
2 | Type[] subtypes = ( ( AbstractComponentType ) type ).getSubtypes();
↵ | | 2 | !Character.isLetter( chars[0] ) ) {↵
|
3 | for ( int i = 0; i < subtypes.length; i++ ) {
↵ | | 3 | for ( int i = 1; i < chars.length; i++ ) {↵
|
4 | if ( indicatesCollection( subtype↵ | | 4 | // as soon as we encounter our first letter, return the substring↵
|
| | | 5 | // from that position↵
|
5 | s[i] ) ) {
↵ | | 6 | if ( Character.isLetter( chars[i] ) ) {↵
|
6 | return true;
↵ | | 7 | return alias.substring( i );↵
|
7 | }
↵ | | 8 | }↵
|
8 | }
↵ | | 9 | }↵
|
9 | } | | 10 | }
|
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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |