Serializable idOfOld = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, iter.next(), session);
if ( idType.isEqual( idOfCurrent, idOfOld, session.getEntityMode(), session.getFactory() ) ) {
iter.remove();
break;
}
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/AbstractPersistentCollection.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/mapping/Table.java
|
Method name: void identityRemove(Collection, Object, String, SessionImplementor)
|
|
Method name: String sqlCreateString(Dialect, Mapping, String, String)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 5
|
|
1 | Serializable idOfOld = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, ↵ | | 1 | while ( ukiter.hasNext() ) {↵
|
2 | iter.next(), session);↵ | | 2 | UniqueKey uk = (UniqueKey) ukiter.next()↵
|
3 | if ( idType.isEqual( idOfCurrent, idOfOld, session.getEntityMode(), session.getFactory() ) ) {↵ | | |
|
4 | iter.remove();↵ | | |
|
5 | break;↵ | | |
|
6 | ↵ | | 3 | ;↵
|
| | | 4 | String constraint = uk.sqlConstraintString( dialect );↵
|
| | | 5 | if ( constraint != null ) {↵
|
| | | 6 | buf.append( ", " ).append( constraint );↵
|
| | | 7 | }↵
|
7 | } | | 8 | }
|
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.1 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |