final String fn = pi[i].getChangeLogFileName();
if (fn != null && fn.length() > 0)
{
DocumentNode dn = new DocumentNode(title, new File(dir, fn));
changeLogRoot.add(dn);
_nodes.put(dn.getURL().toString(), dn);
}
final String fn = pi[i].getLicenceFileName();
if (fn != null && fn.length() > 0)
{
DocumentNode dn = new DocumentNode(title, new File(dir, fn));
licenceRoot.add(dn);
_nodes.put(dn.getURL().toString(), dn);
}
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/HelpViewerWindow.java
|
|
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/HelpViewerWindow.java
|
Method name: JScrollPane createContentsTree()
|
|
Method name: JScrollPane createContentsTree()
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | final String fn = pi[i].getChangeLogFileName();↵ | | 1 | final String fn = pi[i].getLicenceFileName();↵
|
2 | if (fn != null && fn.length() > 0)↵ | | 2 | if (fn != null && fn.length() > 0)↵
|
3 | {↵ | | 3 | {↵
|
4 | DocumentNode dn = new DocumentNode(title, new File(dir, fn));↵ | | 4 | DocumentNode dn = new DocumentNode(title, new File(dir, fn));↵
|
5 | changeLogRoot.add(dn);↵ | | 5 | licenceRoot.add(dn);↵
|
6 | _nodes.put(dn.getURL().toString(), dn);↵ | | 6 | _nodes.put(dn.getURL().toString(), dn);↵
|
7 | } | | 7 | }
|
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.5 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 5 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 4.8 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
60 | final String fn = pi[i].getChangeLogFileName(); | | 54 | final String fn = pi[i].getLicenceFileName(); |
61 | if (fn != null && fn.length() > 0) | | 55 | if (fn != null && fn.length() > 0) |
62 | DocumentNode dn = new DocumentNode(title, new File(dir, fn)); | | 56 | DocumentNode dn = new DocumentNode(title, new File(dir, fn)); |
63 | | | 57 | |
64 | _nodes.put(dn.getURL().toString(), dn); | | 58 | _nodes.put(dn.getURL().toString(), dn); |
Precondition Violations (0)
Row |
Violation |