File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/SubjectController.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/TextViewer.java | |||
Method name: void SubjectController(ComposerController)
|
Method name: void initConfiguration()
|
|||
Number of AST nodes: 8 | Number of AST nodes: 8 | |||
1 | subject = composerOptions.getElement("subject");↵ | 1 | s↵ | |
2 | if (subject == null) {↵ | |||
3 | subject = composerOptions.addSubElement("subject");↵ | |||
4 | }↵ | |||
5 | subject↵ | 2 | milies = messageviewer.getElement("smilies");↵ | |
3 | if (smilies == null) {↵ | |||
4 | smilies = messageviewer.addSubElement("smilies");↵ | |||
5 | }↵ | |||
6 | // register as configuration change listener↵ | |||
6 | .addObserver(this);↵ | 7 | smilies.addObserver(this);↵ | |
7 | String askSubject = subject.getAttribute("ask_if_empty", "true");↵ | 8 | String enable = smilies.getAttribute("enabled", "true");↵ | |
8 | if (askSubject.equals("true")) {↵ | 9 | if (enable.equals("true")) {↵ | |
9 | ask = true;↵ | 10 | enableSmilies = true;↵ | |
10 | } else {↵ | 11 | } else {↵ | |
11 | ask = false;↵ | 12 | enableSmilies = false;↵ | |
12 | } | 13 | } | |
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.4 |
Clones location | Clones are in different classes |
Number of node comparisons | 25 |
Number of mapped statements | 8 |
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 | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | subject = composerOptions.getElement("subject"); |
| 6 | smilies = messageviewer.getElement("smilies"); | ||||||||||||||||||
5 | if (subject == null) |
| 7 | if (smilies == null) | ||||||||||||||||||
6 | subject = composerOptions.addSubElement("subject"); |
| 8 | smilies = messageviewer.addSubElement("smilies"); | ||||||||||||||||||
7 | subject.addObserver(this); |
| 9 | smilies.addObserver(this); | ||||||||||||||||||
8 | String askSubject = subject.getAttribute("ask_if_empty", "true"); |
| 10 | String enable = smilies.getAttribute("enabled", "true"); | ||||||||||||||||||
9 | if (askSubject.equals("true")) |
| 11 | if (enable.equals("true")) | ||||||||||||||||||
10 | ask = true; |
| 12 | enableSmilies = true; | ||||||||||||||||||
else | else | |||||||||||||||||||||
11 | ask = false; |
| 13 | enableSmilies = false; |
Row | Violation |
---|---|
1 | Expression subject is a field being modified, and thus it cannot be parameterized |
2 | Expression smilies is a field being modified, and thus it cannot be parameterized |
3 | Expression subject cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression smilies cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression subject is a field being modified, and thus it cannot be parameterized |
6 | Expression smilies is a field being modified, and thus it cannot be parameterized |
7 | Expression subject cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression smilies cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression subject cannot be parameterized, because it has dependencies to/from statements that will be extracted |
10 | Expression smilies cannot be parameterized, because it has dependencies to/from statements that will be extracted |
11 | Expression ask is a field being modified, and thus it cannot be parameterized |
12 | Expression enableSmilies is a field being modified, and thus it cannot be parameterized |
13 | Expression ask is a field being modified, and thus it cannot be parameterized |
14 | Expression enableSmilies is a field being modified, and thus it cannot be parameterized |