Entry temp = (Entry)entries.get(j);
if (temp.plugin == dep.plugin)
{
if (value)
{
temp.parents.add(entry);
setValueAt(Boolean.TRUE,j,0);
}
else
temp.parents.remove(entry);
}
Entry entry = (Entry)pluginModel.entries.get(i);
if (entry.install)
{
entry.plugin.install(roster,installDirectory,downloadSource);
if (updates)
entry.plugin.getCompatibleBranch().satisfyDependencies(
roster,installDirectory,downloadSource);
instcount++;
}
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/InstallPanel.java
|
|
File path: /jEdit-4.2/src/org/gjt/sp/jedit/pluginmgr/InstallPanel.java
|
Method name: void setValueAt(Object, int, int)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 6
|
|
Number of AST nodes: 6
|
|
1 | Entry temp = (Entry)entries.get(j);↵ | | 1 | Entry entry = (Entry)pluginModel.entries.get(i);↵
|
2 | if (temp.plugin == dep.plugin)↵ | | 2 | if (↵
|
3 | {↵ | | |
|
4 | if (valu↵ | | 3 | entry.install)↵
|
| | | 4 | {↵
|
5 | e)↵ | | 5 | entry.plugin.install(roster,installDirectory,downloadSource);↵
|
6 | {↵ | | 6 | ↵
|
7 | temp.parents.add(entry);↵ | | |
|
8 | setValueAt(Boolean.TRUE,j,0↵ | | 7 | if (updates)↵
|
| | | 8 | entry.plugin.getCompatibleBranch().satisfyDependencies(↵
|
9 | );↵ | | 9 | roster,installDirectory,downloadSource);↵
|
10 | }↵ | | 10 | ↵
|
11 | else↵ | | |
|
12 | temp.parents.remove(entry);↵ | | |
|
13 | ↵ | | 11 | instcount++;↵
|
14 | } | | 12 | }
|
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.1 |
Clones location | Clones are in the same java file |
Number of node comparisons | 9 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 1.0 |
Clone type | Type 3 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 15 | entry.plugin.install(roster, installDirectory, downloadSource); |
25 | if (value) | | 16 | if (updates) |
| | | 17 | entry.plugin.getCompatibleBranch().satisfyDependencies(roster, installDirectory, downloadSource); |
26 | | | | |
27 | setValueAt(Boolean.TRUE, j, 0); | | | |
| | | | |
28 | temp.parents.remove(entry); | | | |
Precondition Violations (0)
Row |
Violation |