File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/PriorityController.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/AttachmentView.java | |||
Method name: void itemStateChanged(ItemEvent)
|
Method name: void keyPressed(KeyEvent)
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | if (e.getStateChange() == ItemEvent.SELECTED) {↵ | 1 | if( e.getKeyCode() == KeyEvent.VK_DELETE) {↵ | |
2 | controller.getModel().setPriority((String) view.getSelectedItem());↵ | 2 | removeSelected();↵ | |
3 | } | 3 | } | |
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 | 4 |
Number of mapped statements | 2 |
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) | 27.1 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (e.getStateChange() == ItemEvent.SELECTED) |
| 1 | if (e.getKeyCode() == KeyEvent.VK_DELETE) | ||||||||||||||||||||||
2 | controller.getModel().setPriority((String)view.getSelectedItem()); |
| 2 | removeSelected(); |
Row | Violation |
---|---|
1 | Expression e cannot be unified with expression e , because common superclass java.awt.AWTEvent does not declare member(s) public int getStateChange() , public int getKeyCode() |
2 | Expression ItemEvent cannot be unified with expression KeyEvent , because common superclass java.awt.AWTEvent does not declare member(s) public int getStateChange() , public int getKeyCode() |
3 | Expression removeSelected() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression controller.getModel().setPriority((String)view.getSelectedItem()) is a void method call, and thus it cannot be parameterized |
5 | Expression removeSelected() is a void method call, and thus it cannot be parameterized |
6 | Expression removeSelected() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression controller.getModel().setPriority((String)view.getSelectedItem()) is a void method call, and thus it cannot be parameterized |
8 | Expression removeSelected() is a void method call, and thus it cannot be parameterized |
9 | The refactoring of the clones is infeasible, because classes org.columba.mail.gui.composer.PriorityController and do not have a common superclass |