try {
InputSource result = catalog.resolveEntity(publicId,
"nap:chemical+brothers");
assertNotNull(result);
String resultStr = new URL(result.getSystemId()).getFile();
assertTrue(toURLString(dtdFile).endsWith(resultStr));
} catch (Exception e) {
fail("resolveEntity() failed!" + e.toString());
try {
Source result = catalog.resolve(uri, null);
assertNotNull(result);
String resultStr = new URL(result.getSystemId()).getFile();
assertTrue(toURLString(xmlFile).endsWith(resultStr));
} catch (Exception e) {
fail("resolve() failed!" + e.toString());
Clone fragments detected by clone detection tool
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
|
|
File path: /apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
|
Method name:
|
|
Method name:
|
Number of AST nodes: 0
|
|
Number of AST nodes: 0
|
|
1 | try {↵ | | 1 | try {↵
|
2 | InputSource result = catalog.resolveEntity(publicId,↵ | | 2 | Source result = catalog.resolve↵
|
3 | "nap:chemical+brothers");↵ | | 3 | (uri, null);↵
|
4 | assertNotNull(result);↵ | | 4 | assertNotNull(result);↵
|
5 | String resultStr = new URL(result.getSystemId()).getFile();↵ | | 5 | String resultStr = new URL(result.getSystemId()).getFile();↵
|
6 | assertTrue(toURLString(dtdFile).endsWith(resultStr));↵ | | 6 | assertTrue(toURLString(xmlFile).endsWith(resultStr));↵
|
7 | } catch (Exception e) {↵ | | 7 | } catch (Exception e) {↵
|
8 | fail("resolveEntity() failed!" + e.toString());↵ | | 8 | fail("resolve() failed!" + e.toString());↵
|
9 | | | 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.0 |
Clones location | |
Number of node comparisons | 0 |