OutputFormat outformat = OutputFormat.createPrettyPrint();
XMLWriter writer = new XMLWriter( System.out, outformat );
writer.write( element );
writer.flush();
System.out.println( "" );
OutputFormat outformat = OutputFormat.createPrettyPrint();
// outformat.setEncoding(aEncodingScheme);
XMLWriter writer = new XMLWriter( System.out, outformat );
writer.write( elt );
writer.flush();
Clone fragments detected by clone detection tool
File path: /hibernate-distribution-3.3.2.GA/project/core/src/main/java/org/hibernate/util/XMLHelper.java
|
|
File path: /hibernate-distribution-3.3.2.GA/project/testsuite/src/test/java/org/hibernate/test/entitymode/dom4j/many2one/Dom4jManyToOneTest.java
|
Method name: void dump(Element)
|
|
Method name: void print(Element)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 4
|
|
1 | OutputFormat outformat = OutputFormat.createPrettyPrint();↵ | | 1 | OutputFormat outformat = OutputFormat.createPrettyPrint();↵
|
2 | ↵ | | 2 | // outformat.setEncoding(aEncodingScheme);↵
|
3 | XMLWriter writer = new XMLWriter( System.out, outformat );↵ | | 3 | XMLWriter writer = new XMLWriter( System.out, outformat );↵
|
4 | writer.write( element );↵ | | 4 | writer.write( elt );↵
|
5 | writer.flush();↵ | | 5 | writer.flush();
|
6 | System.out.println( "" ); | | | |
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 13 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
2 | OutputFormat outformat = OutputFormat.createPrettyPrint(); | | 1 | OutputFormat outformat = OutputFormat.createPrettyPrint(); |
3 | XMLWriter writer = new XMLWriter(System.out, outformat); | | 2 | XMLWriter writer = new XMLWriter(System.out, outformat); |
4 | writer.write(element); | | 3 | writer.write(elt); |
5 | writer.flush(); | | 4 | writer.flush(); |
Precondition Violations (0)
Row |
Violation |