while ( it.hasNext() ) {
One one = (One)it.next();
switch (count) {
case 0:
assertTrue("ordering failed", "a".equals(one.getValue()));
break;
case 1:
assertTrue("ordering failed", "b".equals(one.getValue()));
break;
default:
assertTrue("more than two elements", false);
break;
}
count ++;
}
while ( it.hasNext() ) {
One one = (One)it.next();
switch (count) {
case 0:
assertTrue("'a' isn't first element", "a".equals(one.getValue()));
break;
case 1:
assertTrue("'b' isn't second element", "b".equals(one.getValue()));
break;
default:
assertTrue("more than two elements", false);
break;
}
count ++;
}
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/legacy/FooBarTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | while ( it.hasNext() ) {↵ | | 1 | while ( it.hasNext() ) {↵
|
2 | One one = (One)it.next();↵ | | 2 | One one = (One)it.next();↵
|
3 | switch (count) {↵ | | 3 | switch (count) {↵
|
4 | case 0:↵ | | 4 | case 0:↵
|
5 | assertTrue("ordering failed", "a".equals(one.getValue()));↵ | | 5 | assertTrue("'a' isn't first element", "a".equals(one.getValue()));↵
|
6 | break;↵ | | 6 | break;↵
|
7 | case 1:↵ | | 7 | case 1:↵
|
8 | assertTrue("ordering failed", "b".equals(one.getValue()));↵ | | 8 | assertTrue("'b' isn't second element", "b".equals(one.getValue()));↵
|
9 | break;↵ | | 9 | break;↵
|
10 | default:↵ | | 10 | default:↵
|
11 | assertTrue("more than two elements", false);↵ | | 11 | assertTrue("more than two elements", false);↵
|
12 | break;↵ | | 12 | break;↵
|
13 | }↵ | | 13 | }↵
|
14 | count ++;↵ | | 14 | count ++;↵
|
15 | } | | 15 | }
|
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.0 |
Clones location | |
Number of node comparisons | 0 |