if ( copyCache.containsKey( entity ) ) {
persister.setIdentifier( copyCache.get( entity ), id, source.getEntityMode() );
}
else {
( ( EventCache ) copyCache ).put( entity, persister.instantiate( id, source.getEntityMode() ), true ); //before cascade!
//TODO: should this be Session.instantiate(Persister, ...)?
}
if (
isIdentifier(token, dialect) &&
!isFunctionOrKeyword(lcToken, nextToken, dialect, functionRegistry)
) {
result.append(TEMPLATE)
.append('.')
.append( dialect.quote(token) );
}
else {
result.append(token);
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/DefaultMergeEventListener.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/sql/Template.java
|
Method name: Object mergeTransientEntity(Object, String, Serializable, EventSource, Map)
|
|
Method name: String renderOrderByStringTemplate(String, Dialect, SQLFunctionRegistry)
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | if ( copyCache.containsKey( entity ) ) {↵ | | 1 | if (↵
|
2 | persister.setIdentifier( copyCache.get( entity ), id, source.getEntityMode() );↵ | | |
|
3 | }↵ | | |
|
4 | else {↵ | | |
|
5 | ( ( EventCache ) copyCache ).put( entity, persister.instantiate( id, source.getEntityMode() ), true ); //before cascade!↵ | | |
|
6 | //TODO: should this be Session.instantiate(Persister, ...)?↵ | | |
|
|
| | | 2 | isIdentifier(token, dialect) &&↵
|
| | | 3 | !isFunctionOrKeyword(lcToken, nextToken, dialect, functionRegistry)↵
|
| | | 4 | ) {↵
|
| | | 5 | result.append(TEMPLATE)↵
|
| | | 6 | .append('.')↵
|
| | | 7 | .append( dialect.quote(token) );↵
|
| | | 8 | }↵
|
| | | 9 | else {↵
|
| | | 10 | result.append(token);↵
|
7 | } | | 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.2 |
Clones location | Clones are in different classes |
Number of node comparisons | 1 |