try {
HTMLParser.getParser(StaticTestClass.class.getName());
fail("Should not have been able to create the parser");
} catch (HTMLParseError e) {
if (e.getCause() instanceof ClassCastException) {
return;
}
if (e.getCause() instanceof IllegalAccessException) {
return;
}
throw e;
}
try {
HTMLParser.getParser("java.lang.String");
fail("Should not have been able to create the parser");
} catch (HTMLParseError e) {
if (e.getCause() instanceof ClassCastException) {
return;
}
throw e;
}
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
|
|
File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
|
Method name: void testNotCreatableStatic()
|
|
Method name: void testNotParser()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try {↵ | | 1 | try {↵
|
2 | HTMLParser.getParser(StaticTestClass.class.getName());↵ | | 2 | HTMLParser.getParser("java.lang.String");↵
|
3 | fail("Should not have been able to create the parser");↵ | | 3 | fail("Should not have been able to create the parser");↵
|
4 | } catch (HTMLParseError e) {↵ | | 4 | } catch (HTMLParseError e) {↵
|
5 | if (e.getCause() instanceof ClassCastException) {↵ | | 5 | if (e.getCause() instanceof ClassCastException) {↵
|
6 | return;↵ | | 6 | return;↵
|
7 | }↵ | | 7 | }↵
|
8 | if (e.getCause() instanceof IllegalAccessException) {↵ | | |
|
9 | return;↵ | | |
|
10 | }↵ | | |
|
11 | throw e;↵ | | 8 | throw e;↵
|
12 | } | | 9 | }
|
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 declared in the same class |
Number of node comparisons | 1 |