String rawAliases[] = (String[]) collectionPropertyColumnAliases.get(propertyName);
if ( rawAliases == null ) {
return null;
}
String result[] = new String[rawAliases.length];
for ( int i=0; i<rawAliases.length; i++ ) {
result[i] = new Alias(suffix).toUnquotedAliasString( rawAliases[i] );
}
return result;
String rawAliases[] = ( String[] ) subclassPropertyAliases.get( propertyName );
if ( rawAliases == null ) {
return null;
}
String result[] = new String[rawAliases.length];
for ( int i = 0; i < rawAliases.length; i++ ) {
result[i] = new Alias( suffix ).toUnquotedAliasString( rawAliases[i] );
}
return result;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
|
Method name: String[] getCollectionPropertyColumnAliases(String, String)
|
|
Method name: String[] getSubclassPropertyColumnAliases(String, String)
|
Number of AST nodes: 7
|
|
Number of AST nodes: 7
|
|
1 | String rawAliases[] = (String[]) collectionPropertyColumnAliases.get(propertyName);↵ | | 1 | String rawAliases[] = ( String[] ) subclassPropertyAliases.get( propertyName );↵
|
|
2 | if ( rawAliases == null ) {↵ | | 2 | if ( rawAliases == null ) {↵
|
3 | return null;↵ | | 3 | return null;↵
|
4 | }↵ | | 4 | }↵
|
5 | ↵ | | |
|
6 | String result[] = new String[rawAliases.length];↵ | | 5 | String result[] = new String[rawAliases.length];↵
|
7 | for ( int i=0; i<rawAliases.length; i++ ) {↵ | | 6 | for ( int i = 0; i < rawAliases.length; i++ ) {↵
|
8 | result[i] = new Alias(suffix).toUnquotedAliasString( rawAliases[i] );↵ | | 7 | result[i] = new Alias( suffix ).toUnquotedAliasString( rawAliases[i] );↵
|
9 | }↵ | | 8 | }↵
|
10 | return result; | | 9 | return result;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 22 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.9 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | String rawAliases[] = (String[])collectionPropertyColumnAliases.get(propertyName); | | 1 | String rawAliases[] = (String[])subclassPropertyAliases.get(propertyName); |
2 | if (rawAliases == null) | | 2 | if (rawAliases == null) |
3 | | | 3 | |
4 | String result[] = new String[rawAliases.length]; | | 4 | String result[] = new String[rawAliases.length]; |
5 | for (int i = 0; i < rawAliases.length; i++) | | 5 | for (int i = 0; i < rawAliases.length; i++) |
6 | result[i] = new Alias(suffix).toUnquotedAliasString(rawAliases[i]); | | 6 | result[i] = new Alias(suffix).toUnquotedAliasString(rawAliases[i]); |
7 | return result; | | 7 | return result; |
Precondition Violations (0)
Row |
Violation |