File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/config/MailConfig.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/config/MailConfig.java | |||
Method name: OptionsItem getOptionsItem()
|
Method name: ComposerItem getComposerItem()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | if (optionsItem == null) {↵ | 1 | if (composerItem == null) {↵ | |
2 | XmlElement xmlElement = getPlugin(mainFrameOptionsFile.getName())↵ | 2 | XmlElement xmlElement = getPlugin(composerOptionsFile.getName())↵ | |
3 | .getRoot().getElement("options");↵ | 3 | .getRoot().getElement("options");↵ | |
4 | optionsItem = new OptionsItem(xmlElement);↵ | 4 | composerItem = new ComposerItem(xmlElement);↵ | |
5 | }↵ | 5 | }↵ | |
6 | return optionsItem; | 6 | return composerItem; | |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.1 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 10 |
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.9 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (optionsItem == null) |
| 1 | if (composerItem == null) | ||||||||||||||||||||
2 | XmlElement xmlElement = getPlugin(mainFrameOptionsFile.getName()).getRoot().getElement("options"); |
| 2 | XmlElement xmlElement = getPlugin(composerOptionsFile.getName()).getRoot().getElement("options"); | ||||||||||||||||||||
3 | optionsItem = new OptionsItem(xmlElement); |
| 3 | composerItem = new ComposerItem(xmlElement); | ||||||||||||||||||||
4 | return optionsItem; |
| 4 | return composerItem; |
Row | Violation |
---|---|
1 | Expression optionsItem is a field being modified, and thus it cannot be parameterized |
2 | Expression composerItem is a field being modified, and thus it cannot be parameterized |
3 | Expression new OptionsItem(xmlElement) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression new ComposerItem(xmlElement) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression optionsItem cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression composerItem cannot be parameterized, because it has dependencies to/from statements that will be extracted |