File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/main/java/org/hibernate/cache/OptimisticTreeCache.java | File path: /hibernate-distribution-3.3.2.GA/project/cache-jbosscache/src/main/java/org/hibernate/cache/TreeCache.java | |||
Method name: Map toMap()
|
Method name: Map toMap()
|
|||
Number of AST nodes: 9 | Number of AST nodes: 9 | |||
1 | try {↵ | 1 | try {↵ | |
2 | Map result = new HashMap();↵ | 2 | Map result = new HashMap();↵ | |
3 | Set childrenNames = cache.getChildrenNames( regionFqn );↵ | 3 | Set childrenNames = cache.getChildrenNames( regionFqn );↵ | |
4 | if (childrenNames != null) {↵ | 4 | if (childrenNames != null) {↵ | |
5 | Iterator iter = childrenNames.iterator();↵ | 5 | Iterator iter = childrenNames.iterator();↵ | |
6 | while ( iter.hasNext() ) {↵ | 6 | while ( iter.hasNext() ) {↵ | |
7 | Object key = iter.next();↵ | 7 | Object key = iter.next();↵ | |
8 | result.put(↵ | 8 | result.put( ↵ | |
9 | key,↵ | 9 | key, ↵ | |
10 | cache.get( new Fqn( regionFqn, key ), ITEM )↵ | 10 | cache.get( new Fqn( regionFqn, key ), ITEM )↵ | |
11 | );↵ | 11 | );↵ | |
12 | }↵ | 12 | }↵ | |
13 | }↵ | 13 | }↵ | |
14 | return result;↵ | 14 | return result;↵ | |
15 | }↵ | 15 | }↵ | |
16 | catch (Exception e) {↵ | 16 | catch (Exception e) {↵ | |
17 | throw new CacheException(e);↵ | 17 | throw new CacheException(e);↵ | |
18 | } | 18 |
| |
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 different classes |
Number of node comparisons | 29 |
Number of mapped statements | 9 |
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) | 2.4 |
Clone type | Type 1 |
ID | Statement | ID | Statement | |
---|---|---|---|---|
1 | try | 1 | try | |
2 | Map result = new HashMap(); | 2 | Map result = new HashMap(); | |
3 | Set childrenNames = cache.getChildrenNames(regionFqn); | 3 | Set childrenNames = cache.getChildrenNames(regionFqn); | |
4 | if (childrenNames != null) | 4 | if (childrenNames != null) | |
5 | Iterator iter = childrenNames.iterator(); | 5 | Iterator iter = childrenNames.iterator(); | |
6 | while (iter.hasNext()) | 6 | while (iter.hasNext()) | |
7 | Object key = iter.next(); | 7 | Object key = iter.next(); | |
8 | result.put(key, cache.get(new Fqn(regionFqn, key), ITEM)); | 8 | result.put(key, cache.get(new Fqn(regionFqn, key), ITEM)); | |
9 | return result; | 9 | return result; |
Row | Violation |
---|