if ((state == STATE_BEFORE) && (stateString.equals("before"))) {
plugin.loadOptionsFromXml(null);
} else if ((state == STATE_AFTER)
&& (stateString.equals("after"))) {
plugin.loadOptionsFromXml(folder);
}
if ((state == STATE_BEFORE) && (stateString.equals("before"))) {
plugin.loadOptionsFromXml(null);
} else if ((state == STATE_AFTER)
&& (stateString.equals("after"))) {
plugin.loadOptionsFromXml(null);
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folderoptions/FolderOptionsController.java
|
|
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/folderoptions/FolderOptionsController.java
|
Method name: void load(IMailbox, int)
|
|
Method name: void load(int)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | if ((state == STATE_BEFORE) && (stateString.equals("before"))) {↵ | | 1 | if ((state == STATE_BEFORE) && (stateString.equals("before"))) {↵
|
2 | plugin.loadOptionsFromXml(null);↵ | | 2 | plugin.loadOptionsFromXml(null);↵
|
3 | } else if ((state == STATE_AFTER)↵ | | 3 | } else if ((state == STATE_AFTER)↵
|
4 | && (stateString.equals("after"))) {↵ | | 4 | && (stateString.equals("after"))) {↵
|
5 | plugin.loadOptionsFromXml(folder);↵ | | 5 | plugin.loadOptionsFromXml(null);↵
|
6 | } | | 6 | }
|
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 15 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 4 |
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) | 0.7 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
7 | if ((state == STATE_BEFORE) && (stateString.equals("before"))) | | 7 | if ((state == STATE_BEFORE) && (stateString.equals("before"))) |
8 | plugin.loadOptionsFromXml(null); | | 8 | plugin.loadOptionsFromXml(null); |
9 | else if ((state == STATE_AFTER) && (stateString.equals("after"))) | | 9 | else if ((state == STATE_AFTER) && (stateString.equals("after"))) |
10 | plugin.loadOptionsFromXml(folder); | | 10 | plugin.loadOptionsFromXml(null); |
Precondition Violations (0)
Row |
Violation |