CloneSet143


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
11230.955executable_statement
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11688
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
211119
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/types/XMLCatalogTest.java
Next
Last
Clone Instance
1
Line Count
16
Source Line
88
Source File
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());
}


First
Previous
Clone Instance
2
Line Count
11
Source Line
119
Source File
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().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());
}


Clone AbstractionParameter Count: 3Parameter Bindings

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 Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#fdc2060]]
project 
12[[#fdc2060]]
project.getBaseDir() 
21[[#fe13fe0]]
getBaseDir 
22[[#fe13fe0]]
toURL 
31[[#fdc2080]]
"Empty catalog should return input" 
32[[#fdc2080]]
"Nonexistent Catalog entry return input"