Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
14 | 2 | 3 | 0.964 | method_declaration |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 13 | 159 | E:/TSE/Projects-CloneDR/apache-ant-1.7.0/src/tests/junit/org/apache/tools/ant/util/DOMElementWriterTest.java |
2 | 14 | 174 | 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()); } |
| |||||
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()); } |
| |||
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 Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#fde4040]] | testNSOnElement |
1 | 2 | [[#fde4040]] | testNSPrefixOnAttribute |
2 | 1 | [[#100b35c0]] | ONLY_QUALIFY_ELEMENTS |
2 | 2 | [[#100b35c0]] | QUALIFY_ALL |
3 | 1 | [[#fde4060]] | "<root bar=\"baz\" xmlns=\"urn:foo\" />" |
3 | 2 | [[#fde4060]] | "<root ns0:bar=\"baz\" xmlns=\"urn:foo\"" + " xmlns:ns0=\"urn:foo2\" />" |