script.add(
table.sqlCreateString(
dialect,
mapping,
defaultCatalog,
defaultSchema
)
);
Iterator comments = table.sqlCommentStrings( dialect, defaultCatalog, defaultSchema );
while ( comments.hasNext() ) {
script.add( comments.next() );
}
Object old = it.next();
Serializable oldId = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, old, session);
if ( !currentIds.contains( new TypedValue( idType, oldId, session.getEntityMode() ) ) ) {
res.add(old);
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/cfg/Configuration.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/collection/AbstractPersistentCollection.java
|
Method name: String[] generateSchemaCreationScript(Dialect)
|
|
Method name: Collection getOrphans(Collection, Collection, String, SessionImplementor)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | script.add(↵ | | |
|
2 | table.sqlCreateString(↵ | | |
|
3 | dialect,↵ | | |
|
4 | mapping,↵ | | |
|
5 | defaultCatalog,↵ | | |
|
6 | defaultSchema↵ | | |
|
7 | )↵ | | |
|
8 | );↵ | | |
|
9 | Iterator comments = table.sqlCommentStr↵ | | 1 | Object old = it.next();↵
|
| | | 2 | Serializable oldId = ForeignKeys.getEntityIdentifierIfNotUnsaved(entityName, old, session);↵
|
10 | ings( dialect, defaultCatalog, defaultSchema );↵ | | 3 | if ( !currentIds.contains( ↵
|
11 | while ( comments.hasNext() ) {↵ | | 4 | new TypedValue( idType, oldId, session.getEntityMode() ) ) ) {↵
|
12 | script.add( comments.next() );↵ | | 5 | res.add(old);↵
|
13 | } | | 6 | }
|
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.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |