File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/stat/StatisticsImpl.java | File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/stat/StatisticsImpl.java | |||
Method name: CollectionStatistics getCollectionStatistics(String)
|
Method name: QueryStatistics getQueryStatistics(String)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | CollectionStatistics cs = (CollectionStatistics) collectionStatistics.get(role);↵ | 1 | QueryStatistics qs = (QueryStatistics) queryStatistics.get(queryString);↵ | |
2 | if (cs==null) {↵ | 2 | if (qs==null) {↵ | |
3 | cs = new CollectionStatistics(role);↵ | 3 | qs = new QueryStatistics(↵ | |
4 | collection↵ | 4 | queryString);↵ | |
5 | Statistics.put(role, cs);↵ | 5 | queryStatistics.put(queryString, qs);↵ | |
6 | }↵ | 6 | }↵ | |
7 | return cs; | 7 | return qs; | |
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.2 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 13 |
Number of mapped statements | 5 |
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) | 7.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | CollectionStatistics cs = (CollectionStatistics)collectionStatistics.get(role); |
| 1 | QueryStatistics qs = (QueryStatistics)queryStatistics.get(queryString); | |||||||||||||||||||||||||
2 | if (cs == null) |
| 2 | if (qs == null) | |||||||||||||||||||||||||
3 | cs = new CollectionStatistics(role); |
| 3 | qs = new QueryStatistics(queryString); | |||||||||||||||||||||||||
4 | collectionStatistics.put(role, cs); |
| 4 | queryStatistics.put(queryString, qs); | |||||||||||||||||||||||||
5 | return cs; |
| 5 | return qs; |
Row | Violation |
---|