File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/message/viewer/MarkAsReadTimer.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/SubjectController.java | |||
Method name: void getConfigurationValues()
|
Method name: void SubjectController(ComposerController)
|
|||
Number of AST nodes: 1 | Number of AST nodes: 3 | |||
1 | /** | 1 | public SubjectController(ComposerController controller) { | |
2 | * | 2 | this.controller = controller; | |
3 | */ | 3 | ||
4 | private void getConfigurationValues() { | 4 | view = new SubjectView(this); | |
5 | XmlElement markasread = MailConfig.getInstance().get("options").getElement("/options/markasread"); | 5 | ||
6 | 6 | XmlElement composerOptions = MailConfig.getInstance().getComposerOptionsConfig() | ||
7 | // listen for configuration changes | 7 | .getRoot().getElement("/options"); | |
8 | markasread.addObserver(this); | 8 | subject = composerOptions.getElement("subject"); | |
9 | 9 | |||
10 | // get interval value | 10 | if (subject == null) { | |
11 | String delayString = markasread.getAttribute("delay", "2"); | 11 | subject = composerOptions.addSubElement("subject"); | |
12 | delay = Integer.parseInt(delayString); | 12 | } | |
13 | 13 | |||
14 | // enable timer | 14 | subject.addObserver(this); | |
15 | String enabledString = markasread.getAttribute("enabled", "true"); | 15 | ||
16 | enabled = enabledString.equals("true") ? true : false; | 16 | String askSubject = subject.getAttribute("ask_if_empty", "true"); | |
17 | } | 17 | ||
18 | if (askSubject.equals("true")) { | |||
19 | ask = true; | |||
20 | } else { | |||
21 | ask = false; | |||
22 | } | |||
23 | } | |||
See real code fragment | See real code fragment |
Number of mapped statements | 3 |
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.0 |
Similarity Score | 1.000 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | enabled = enabledString.equals("true") ? true : false; |
| 9 | if (askSubject.equals("true")) | ||||||||||||||||||||
|
| 10 | ask = true; | |||||||||||||||||||||
| else | |||||||||||||||||||||||
|
| 11 | ask = false; |
Row | Violation |
---|---|
1 | Expression enabled is a field being modified, and thus it cannot be parameterized |
2 | Expression ask is a field being modified, and thus it cannot be parameterized |
3 | Expression enabled is a field being modified, and thus it cannot be parameterized |
4 | Expression ask is a field being modified, and thus it cannot be parameterized |
5 | Expression enabled is a field being modified, and thus it cannot be parameterized |
6 | Expression ask is a field being modified, and thus it cannot be parameterized |
7 | Expression enabled is a field being modified, and thus it cannot be parameterized |
8 | Expression ask is a field being modified, and thus it cannot be parameterized |