while ( iter.hasNext() ) {
Object test = iter.next();
Object oldValue = sn.get(test);
if ( oldValue!=null && elementType.isDirty( test, oldValue, getSession() ) ) {
// the element has changed
deletes.add(oldValue);
}
}
Iterator ukiter = getUniqueKeyIterator();
while ( ukiter.hasNext() ) {
UniqueKey uk = (UniqueKey) ukiter.next();
String constraint = uk.sqlConstraintString( dialect );
if ( constraint != null ) {
buf.append( ", " ).append( constraint );
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/PersistentSet.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java
|
Method name: Iterator getDeletes(CollectionPersister, boolean)
|
|
Method name: String sqlCreateString(Dialect, Mapping, String, String)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
| | | 1 | Iterator ukiter = getUniqueKeyIterator();↵
|
1 | while ( iter.hasNext() ) {↵ | | 2 | while ( ukiter.hasNext() ) {↵
|
2 | Object test = iter.next();↵ | | 3 | ↵
|
3 | Object oldValue = sn.get(test↵ | | 4 | UniqueKey uk = (UniqueKey) ukiter.next();↵
|
4 | );↵ | | 5 | String constraint = uk.sqlConstraintString( dialect );↵
|
5 | if ( oldValue!=null && elementType.isDirty( test, oldValue, getSession() ) ) {↵ | | 6 | if ( ↵
|
6 | // the element has changed↵ | | |
|
7 | deletes.add(oldValue↵ | | 7 | constraint != null ) {↵
|
8 | );↵ | | 8 | buf.append( ", " ).append( constraint );↵
|
9 | }↵ | | 9 | }↵
|
10 | } | | 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 |