public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );
int index = ( (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ) ).intValue();
for ( int i = tempList.size(); i<=index; i++) {
tempList.add(i, null);
}
tempList.set(index, element);
return element;
public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)
throws HibernateException, SQLException {
Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ) ;
int index = ( (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ) ).intValue();
//pad with nulls from the current last element up to the new index
for ( int i = list.size(); i<=index; i++) {
list.add(i, null);
}
list.set(index, element);
return element;
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentArrayHolder.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentList.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)↵ | | 1 | public Object readFrom(ResultSet rs, CollectionPersister persister, CollectionAliases descriptor, Object owner)↵
|
2 | throws HibernateException, SQLException {↵ | | 2 | throws HibernateException, SQLException {↵
|
|
3 | Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() );↵ | | 3 | Object element = persister.readElement( rs, owner, descriptor.getSuffixedElementAliases(), getSession() ) ;↵
|
4 | int index = ( (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ) ).intValue();↵ | | 4 | int index = ( (Integer) persister.readIndex( rs, descriptor.getSuffixedIndexAliases(), getSession() ) ).intValue();↵
|
|
| | | 5 | //pad with nulls from the current last element up to the new index↵
|
5 | for ( int i = tempList.size(); i<=index; i++) {↵ | | 6 | for ( int i = list.size(); i<=index; i++) {↵
|
6 | tempList.add(i, null);↵ | | 7 | list.add(i, null);↵
|
7 | }↵ | | 8 | }↵
|
|
8 | tempList.set(index, element);↵ | | 9 | list.set(index, element);↵
|
9 | return element;↵ | | 10 | return element;↵
|
10 | | | 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 |