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: 10 | Number of AST nodes: 10 | |||
1 | Enumeration e = handler.getExtensionEnumeration();↵ | 1 | Enumeration e = handler.getExtensionEnumeration();↵ | |
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↵ | 6 | AbstractFolderOptionsPlugin plugin = (AbstractFolderOptionsPlugin) extension↵ | |
7 | .instanciateExtension(new Object[] { mediator });↵ | 7 | .instanciateExtension(new Object[] { mediator });↵ | |
8 | if ((state == STATE_BEFORE) && (stateString.equals("before"))) {↵ | 8 | if ((state == STATE_BEFORE) && (stateString.equals("before"))) {↵ | |
9 | plugin.loadOptionsFromXml(null);↵ | 9 | plugin.loadOptionsFromXml(null);↵ | |
10 | } else if ((state == STATE_AFTER)↵ | 10 | } else if ((state == STATE_AFTER)↵ | |
11 | && (stateString.equals("after"))) {↵ | 11 | && (stateString.equals("after"))) {↵ | |
12 | plugin.loadOptionsFromXml(folder);↵ | 12 | plugin.loadOptionsFromXml(null);↵ | |
13 | }↵ | 13 | }↵ | |
14 | } catch (PluginException e1) {↵ | 14 | } catch (Exception e1) {↵ | |
15 | ↵ | 15 | // TODO (@author fdietz): add error dialog↵ | |
16 | e1.printStackTrace();↵ | 16 | e1.printStackTrace();↵ | |
17 | }↵ | 17 | }↵ | |
18 | } | 18 |
| |
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.9 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 27 |
Number of mapped statements | 10 |
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) | 3.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Enumeration e = handler.getExtensionEnumeration(); | 1 | Enumeration e = handler.getExtensionEnumeration(); | |||||||||||||||||
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 |
---|