CloneSet123


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
14230.964method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
113159
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/DOMElementWriterTest.java
214174
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/DOMElementWriterTest.java
Next
Last
Clone Instance
1
Line Count
13
Source Line
159
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/DOMElementWriterTest.java

public void testNSOnElement() throws IOException {
  Document d = DOMUtils.newDocument();
  Element root = d.createElementNS("urn:foo", "root");
  root.setAttributeNS("urn:foo2", "bar", "baz");
  StringWriter sw = new StringWriter();
  DOMElementWriter w = new DOMElementWriter(false, DOMElementWriter.XmlNamespacePolicy.ONLY_QUALIFY_ELEMENTS);
  w.write(root, sw, 0, "  ");
  assertEquals("<root bar=\"baz\" xmlns=\"urn:foo\" />" + StringUtils.LINE_SEP, sw.toString());
}


First
Previous
Clone Instance
2
Line Count
14
Source Line
174
Source File
E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/DOMElementWriterTest.java

public void testNSPrefixOnAttribute() throws IOException {
  Document d = DOMUtils.newDocument();
  Element root = d.createElementNS("urn:foo", "root");
  root.setAttributeNS("urn:foo2", "bar", "baz");
  StringWriter sw = new StringWriter();
  DOMElementWriter w = new DOMElementWriter(false, DOMElementWriter.XmlNamespacePolicy.QUALIFY_ALL);
  w.write(root, sw, 0, "  ");
  assertEquals("<root ns0:bar=\"baz\" xmlns=\"urn:foo\"" + " xmlns:ns0=\"urn:foo2\" />" + StringUtils.LINE_SEP, sw.toString());
}


Clone AbstractionParameter Count: 3Parameter Bindings

public void [[#variablefde4040]]() throws IOException {
  Document d = DOMUtils.newDocument();
  Element root = d.createElementNS("urn:foo", "root");
  root.setAttributeNS("urn:foo2", "bar", "baz");
  StringWriter sw = new StringWriter();
  DOMElementWriter w = new DOMElementWriter(false, DOMElementWriter.XmlNamespacePolicy. [[#variable100b35c0]]);
  w.write(root, sw, 0, "  ");
  assertEquals( [[#variablefde4060]] + StringUtils.LINE_SEP, sw.toString());
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#fde4040]]
testNSOnElement 
12[[#fde4040]]
testNSPrefixOnAttribute 
21[[#100b35c0]]
ONLY_QUALIFY_ELEMENTS 
22[[#100b35c0]]
QUALIFY_ALL 
31[[#fde4060]]
"<root bar=\"baz\" xmlns=\"urn:foo\" />" 
32[[#fde4060]]
"<root ns0:bar=\"baz\" xmlns=\"urn:foo\"" + " xmlns:ns0=\"urn:foo2\" />"