if ( !hasScalars ) {
resultRow = data;
}
else {
// build an array with indices equal to the total number
// of actual returns in the result Hibernate will return
// for this query (scalars + non-scalars)
resultRow = new Object[ columnProcessors.length ];
for ( int i = 0; i < columnProcessors.length; i++ ) {
resultRow[i] = columnProcessors[i].extract( data, resultSet, session );
}
}
setters = new Setter[aliases.length];
for ( int i = 0; i < aliases.length; i++ ) {
String alias = aliases[i];
if ( alias != null ) {
setters[i] = propertyAccessor.getSetter( resultClass, alias );
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/loader/custom/CustomLoader.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/transform/AliasToBeanResultTransformer.java
|
Method name: Object buildResultRow(Object[], ResultSet, boolean, SessionImplementor)
|
|
Method name: Object transformTuple(Object[], String[])
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | if ( !hasScalars ) {↵ | | |
|
2 | resultRow = data;↵ | | |
|
3 | }↵ | | |
|
4 | else {↵ | | |
|
5 | // build an array with indices equal to the total number↵ | | |
|
6 | // of actual returns in the result Hibernate will return↵ | | |
|
7 | // for this query (scalars + non-scalars)↵ | | |
|
8 | resultRow = new Object[ columnProcessors.length ];↵ | | 1 | setters = new Setter[aliases.length];↵
|
9 | for ( int i = 0; i < columnProcessors.length; i++ ) {↵ | | 2 | for ( int i = 0; i < aliases.length; i++ ) {↵
|
10 | resultRow[i] = columnProcessors[i].extract( data, resultSet, session↵ | | 3 | String alias = aliases[i];↵
|
| | | 4 | if ( alias != null ) {↵
|
11 | );↵ | | 5 | setters[i] = propertyAccessor.getSetter( resultClass, alias );↵
|
12 | }↵ | | 6 | }↵
|
13 | } | | 7 | }
|
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 | Clones are in different classes |
Number of node comparisons | 1 |