File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/html/action/ParagraphMenu.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/html/HtmlToolbar.java | |||
Method name: void formatChanged(FormatChangedEvent)
|
Method name: void formatChanged(FormatChangedEvent)
|
|||
Number of AST nodes: 12 | Number of AST nodes: 12 | |||
1 | FormatInfo info = event.getInfo();↵ | 1 | FormatInfo info = event.getInfo();↵ | |
2 | if (info.isHeading1()) {↵ | 2 | if (info.isHeading1()) {↵ | |
3 | selectMenuItem(HTML.Tag.H1);↵ | 3 | selectInParagraphComboBox(HTML.Tag.H1);↵ | |
4 | } else if (info.isHeading2()) {↵ | 4 | } else if (info.isHeading2()) {↵ | |
5 | selectMenuItem(HTML.Tag.H2);↵ | 5 | selectInParagraphComboBox(HTML.Tag.H2);↵ | |
6 | } else if (info.isHeading3()) {↵ | 6 | } else if (info.isHeading3()) {↵ | |
7 | selectMenuItem(HTML.Tag.H3);↵ | 7 | selectInParagraphComboBox(HTML.Tag.H3);↵ | |
8 | } else if (info.isPreformattet()) {↵ | 8 | } else if (info.isPreformattet()) {↵ | |
9 | selectMenuItem(HTML.Tag.PRE);↵ | 9 | selectInParagraphComboBox(HTML.Tag.PRE);↵ | |
10 | } else if (info.isAddress()) {↵ | 10 | } else if (info.isAddress()) {↵ | |
11 | selectMenuItem(HTML.Tag.ADDRESS);↵ | 11 | selectInParagraphComboBox(HTML.Tag.ADDRESS);↵ | |
12 | } else {↵ | 12 | } else {↵ | |
13 | // select the "Normal" entry as default↵ | 13 | // select the "Normal" entry as default↵ | |
14 | selectMenuItem(HTML.Tag.P);↵ | 14 | selectInParagraphComboBox(HTML.Tag.P);↵ | |
15 | } | 15 |
| |
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) | 1.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 84 |
Number of mapped statements | 12 |
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) | 5.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | FormatInfo info = event.getInfo(); | 1 | FormatInfo info = event.getInfo(); | |||||||||||||
2 | if (info.isHeading1()) | 2 | if (info.isHeading1()) | |||||||||||||
3 | selectMenuItem(HTML.Tag.H1); |
| 3 | selectInParagraphComboBox(HTML.Tag.H1); | ||||||||||||
4 | else if (info.isHeading2()) | 4 | else if (info.isHeading2()) | |||||||||||||
5 | selectMenuItem(HTML.Tag.H2); |
| 5 | selectInParagraphComboBox(HTML.Tag.H2); | ||||||||||||
6 | else if (info.isHeading3()) | 6 | else if (info.isHeading3()) | |||||||||||||
7 | selectMenuItem(HTML.Tag.H3); |
| 7 | selectInParagraphComboBox(HTML.Tag.H3); | ||||||||||||
8 | else if (info.isPreformattet()) | 8 | else if (info.isPreformattet()) | |||||||||||||
9 | selectMenuItem(HTML.Tag.PRE); |
| 9 | selectInParagraphComboBox(HTML.Tag.PRE); | ||||||||||||
10 | else if (info.isAddress()) | 10 | else if (info.isAddress()) | |||||||||||||
11 | selectMenuItem(HTML.Tag.ADDRESS); |
| 11 | selectInParagraphComboBox(HTML.Tag.ADDRESS); | ||||||||||||
else | else | |||||||||||||||
12 | selectMenuItem(HTML.Tag.P); |
| 12 | selectInParagraphComboBox(HTML.Tag.P); |
Row | Violation |
---|---|
1 | Expression selectMenuItem(HTML.Tag.H1) is a void method call, and thus it cannot be parameterized |
2 | Expression selectInParagraphComboBox(HTML.Tag.H1) is a void method call, and thus it cannot be parameterized |
3 | Expression selectMenuItem(HTML.Tag.H2) is a void method call, and thus it cannot be parameterized |
4 | Expression selectInParagraphComboBox(HTML.Tag.H2) is a void method call, and thus it cannot be parameterized |
5 | Expression selectMenuItem(HTML.Tag.H3) is a void method call, and thus it cannot be parameterized |
6 | Expression selectInParagraphComboBox(HTML.Tag.H3) is a void method call, and thus it cannot be parameterized |
7 | Expression selectMenuItem(HTML.Tag.PRE) is a void method call, and thus it cannot be parameterized |
8 | Expression selectInParagraphComboBox(HTML.Tag.PRE) is a void method call, and thus it cannot be parameterized |
9 | Expression selectMenuItem(HTML.Tag.ADDRESS) is a void method call, and thus it cannot be parameterized |
10 | Expression selectInParagraphComboBox(HTML.Tag.ADDRESS) is a void method call, and thus it cannot be parameterized |
11 | Expression selectMenuItem(HTML.Tag.P) is a void method call, and thus it cannot be parameterized |
12 | Expression selectInParagraphComboBox(HTML.Tag.P) is a void method call, and thus it cannot be parameterized |