StringBuffer buffer = new StringBuffer();
manyToManyFilterHelper.render( buffer, alias, enabledFilters );
if ( manyToManyWhereString != null ) {
buffer.append( " and " )
.append( StringHelper.replace( manyToManyWhereTemplate, Template.TEMPLATE, alias ) );
}
return buffer.toString();
if ( FieldInterceptionHelper.isInstrumented( entity ) ) {
FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );
if ( interceptor != null ) {
interceptor.setSession( session );
}
else {
FieldInterceptor fieldInterceptor = FieldInterceptionHelper.injectFieldInterceptor(
entity,
getEntityName(),
null,
session
);
fieldInterceptor.dirty();
}
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/collection/AbstractCollectionPersister.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java
|
Method name: String getManyToManyFilterFragment(String, Map)
|
|
Method name: void afterReassociate(Object, SessionImplementor)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 6
|
|
1 | StringBuffer buffer = new StringBuffer();↵ | | |
|
2 | manyToManyFilterHelper.render( buffer, alias, enabledFilters↵ | | 1 | if ( FieldInterceptionHelper.isInstrumented( entity ) ) {↵
|
3 | );↵ | | 2 | FieldInterceptor interceptor = FieldInterceptionHelper.extractFieldInterceptor( entity );↵
|
|
4 | if ( manyToManyWhereString != null ) {↵ | | 3 | if ( ↵
|
5 | buffer.append( " and "↵ | | 4 | interceptor != null ) {↵
|
6 | )↵ | | 5 | interceptor.setSession( session );↵
|
7 | .append( StringHelper.replace( manyToManyWhereTemplate, Template.TEMPLATE, alias ) );↵ | | 6 | ↵
|
8 | }↵ | | |
|
|
9 | return buffer.toString(); | | 7 | }↵
|
| | | 8 | else {↵
|
| | | 9 | FieldInterceptor fieldInterceptor = FieldInterceptionHelper.injectFieldInterceptor(↵
|
| | | 10 | entity,↵
|
| | | 11 | getEntityName(),↵
|
| | | 12 | null,↵
|
| | | 13 | session↵
|
| | | 14 | );↵
|
| | | 15 | fieldInterceptor.dirty();↵
|
| | | 16 | }↵
|
| | | 17 | }
|
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 | 7 |