File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/impl/SessionFactoryImpl.java | |||
Method name: void SessionFactoryImpl(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver)
|
Method name: void SessionFactoryImpl(Configuration, Mapping, Settings, EventListeners, SessionFactoryObserver)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if ( elementType.isAssociationType() && !elementType.isAnyType() ) {↵ | 1 | if ( indexType != null && indexType.isAssociationType() && !indexType.isAnyType() ) {↵ | |
2 | String entityName = ( ( AssociationType ) elementType ).getAssociatedEntityName( this );↵ | 2 | String entityName = ( ( AssociationType ) indexType ).getAssociatedEntityName( this );↵ | |
3 | Set roles = ( Set ) tmpEntityToCollectionRoleMap.get( entityName );↵ | 3 | Set roles = ( Set ) tmpEntityToCollectionRoleMap.get( entityName );↵ | |
4 | if ( roles == null ) {↵ | 4 | if ( roles == null ) {↵ | |
5 | roles = new HashSet();↵ | 5 | roles = new HashSet();↵ | |
6 | tmpEntityToCollectionRoleMap.put( entityName, roles );↵ | 6 | tmpEntityToCollectionRoleMap.put( entityName, roles );↵ | |
7 | }↵ | 7 | }↵ | |
8 | roles.add( persister.getRole() );↵ | 8 | roles.add( persister.getRole() );↵ | |
9 | } | 9 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 26 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 6.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
70 | if (elementType.isAssociationType() && !elementType.isAnyType()) |
| 62 | if (indexType != null && indexType.isAssociationType() && !indexType.isAnyType()) | |||||||||||||
71 | String entityName = ((AssociationType)elementType).getAssociatedEntityName(this); |
| 63 | String entityName = ((AssociationType)indexType).getAssociatedEntityName(this); | |||||||||||||
72 | Set roles = (Set)tmpEntityToCollectionRoleMap.get(entityName); | 64 | Set roles = (Set)tmpEntityToCollectionRoleMap.get(entityName); | ||||||||||||||
73 | if (roles == null) | 65 | if (roles == null) | ||||||||||||||
74 | roles = new HashSet(); | 66 | roles = new HashSet(); | ||||||||||||||
75 | tmpEntityToCollectionRoleMap.put(entityName, roles); | 67 | tmpEntityToCollectionRoleMap.put(entityName, roles); | ||||||||||||||
76 | roles.add(persister.getRole()); | 68 | roles.add(persister.getRole()); |
Row | Violation |
---|