String key = ( String ) ii.next();
if ( key.startsWith( "hibernate.c3p0." ) ) {
String newKey = key.substring( 10 );
if ( props.containsKey( newKey ) ) {
warnPropertyConflict( key, newKey );
}
c3props.put( newKey, props.get( key ) );
}
EntityEntry e = persistenceContext.removeEntry( object );
if ( e != null ) {
EntityKey key = new EntityKey( e.getId(), e.getPersister(), source.getEntityMode() );
persistenceContext.removeEntity( key );
doEvict( object, key, e.getPersister(), source );
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/connection-c3p0/src/main/java/org/hibernate/connection/C3P0ConnectionProvider.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/event/def/DefaultEvictEventListener.java
|
Method name: void configure(Properties)
|
|
Method name: void onEvict(EvictEvent)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 5
|
|
1 | String key = ( String ) ii.next();↵ | | 1 | EntityEntry e = persistenceContext.removeEntry( object );↵
|
2 | if ( key.startsWith( "hibernate.c3p0." ) ) {↵ | | 2 | if ( e != null ) {↵
|
3 | String newKey = key.substring( 10 );↵ | | 3 | ↵
|
4 | if ( props.containsKey( newKey ) ) {↵ | | |
|
5 | warnPropertyConflict( key, newKey );↵ | | |
|
6 | }↵ | | |
|
7 | c3props.put( newKey, props.get( key )↵ | | 4 | EntityKey key = new EntityKey( e.getId(), e.getPersister(), source.getEntityMode() );↵
|
| | | 5 | persistenceContext.removeEntity( key );↵
|
8 | );↵ | | 6 | doEvict( object, key, e.getPersister(), source );↵
|
9 | } | | 7 | }
|
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 |