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: 9 | Number of AST nodes: 9 | |||
1 | while (e.hasMoreElements()) {↵ | 1 | while (e.hasMoreElements()) {↵ | |
2 | IExtension extension = (IExtension) e.nextElement();↵ | 2 | IExtension extension = (IExtension) e.nextElement();↵ | |
3 | String stateString = extension.getMetadata().getAttribute("state");↵ | 3 | String stateString = extension.getMetadata().getAttribute("state");↵ | |
4 | try {↵ | 4 | try {↵ | |
5 | AbstractFolderOptionsPlugin plugin = (AbstractFolderOptionsPlugin) extension↵ | 5 | AbstractFolderOptionsPlugin plugin = (AbstractFolderOptionsPlugin) extension↵ | |
6 | .instanciateExtension(new Object[] { mediator });↵ | 6 | .instanciateExtension(new Object[] { mediator });↵ | |
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)↵ | 9 | } else if ((state == STATE_AFTER)↵ | |
10 | && (stateString.equals("after"))) {↵ | 10 | && (stateString.equals("after"))) {↵ | |
11 | plugin.loadOptionsFromXml(folder);↵ | 11 | plugin.loadOptionsFromXml(null);↵ | |
12 | }↵ | 12 | }↵ | |
13 | } catch (PluginException e1) {↵ | 13 | } catch (Exception e1) {↵ | |
14 | ↵ | 14 | // TODO (@author fdietz): add error dialog↵ | |
15 | e1.printStackTrace();↵ | 15 | e1.printStackTrace();↵ | |
16 | }↵ | 16 | }↵ | |
17 | } | 17 |
| |
See real code fragment | See real code fragment |
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.8 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 26 |
Number of mapped statements | 9 |
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) | 1.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | while (e.hasMoreElements()) | 2 | while (e.hasMoreElements()) | |||||||||||||||||
3 | IExtension extension = (IExtension)e.nextElement(); | 3 | IExtension extension = (IExtension)e.nextElement(); | |||||||||||||||||
4 | String stateString = extension.getMetadata().getAttribute("state"); | 4 | String stateString = extension.getMetadata().getAttribute("state"); | |||||||||||||||||
5 | try |
| 5 | try | ||||||||||||||||
6 | AbstractFolderOptionsPlugin plugin = (AbstractFolderOptionsPlugin)extension.instanciateExtension(new Object[] {mediator}); | 6 | AbstractFolderOptionsPlugin plugin = (AbstractFolderOptionsPlugin)extension.instanciateExtension(new Object[] {mediator}); | |||||||||||||||||
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); |
Row | Violation |
---|