Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
11 | 2 | 3 | 0.955 | executable_statement |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 16 | 88 | E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java |
2 | 11 | 119 | E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java |
| |||||
try { Source result = catalog.resolve("i/dont/exist.dtd", null); String expected = toURLString(new File(project.getBaseDir() + "/i/dont/exist.dtd")); // // These shenanigans are necessary b/c Norm Walsh's resolver // has a different idea of how file URLs are created on windoze // ie file://c:/foo instead of file:///c:/foo // String resultStr = new URL(((SAXSource) result).getInputSource().getSystemId()).getFile(); assertTrue("Empty catalog should return input", expected.endsWith(resultStr)); } catch (Exception e) { fail("resolve() failed!" + e.toString()); } |
| |||||
try { Source result = catalog.resolve("i/dont/exist.dtd", null); String expected = toURLString(new File(project.getBaseDir().toURL() + "/i/dont/exist.dtd")); String resultStr = new URL(((SAXSource) result).getInputSource().getSystemId()).getFile(); assertTrue("Nonexistent Catalog entry return input", expected.endsWith(resultStr)); } catch (Exception e) { fail("resolve() failed!" + e.toString()); } |
| |||
try { Source result = catalog.resolve("i/dont/exist.dtd", null); String expected = toURLString(new File( [[#variablefdc2060]]. [[#variablefe13fe0]]() + "/i/dont/exist.dtd")); // // These shenanigans are necessary b/c Norm Walsh's resolver // has a different idea of how file URLs are created on windoze // ie file://c:/foo instead of file:///c:/foo // String resultStr = new URL(((SAXSource) result).getInputSource().getSystemId()).getFile(); assertTrue( [[#variablefdc2080]], expected.endsWith(resultStr)); } catch (Exception e) { fail("resolve() failed!" + e.toString()); } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#fdc2060]] | project |
1 | 2 | [[#fdc2060]] | project.getBaseDir() |
2 | 1 | [[#fe13fe0]] | getBaseDir |
2 | 2 | [[#fe13fe0]] | toURL |
3 | 1 | [[#fdc2080]] | "Empty catalog should return input" |
3 | 2 | [[#fdc2080]] | "Nonexistent Catalog entry return input" |