File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/plugins/DefaultActionRow.java | File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/filter/plugins/DefaultCriteriaRow.java | |||
Method name: void updateComponents(boolean)
|
Method name: void updateComponents(boolean)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | if (b) {↵ | 1 | if (b) {↵ | |
2 | String name = (String) filterAction.getAction();↵ | 2 | String conditionString = criteria.getTypeString();↵ | |
3 | comboMenu.setText(name);↵ | 3 | comboMenu.setText(conditionString);↵ | |
4 | } else {↵ | 4 | } else {↵ | |
5 | String name = (String) comboMenu.getText();↵ | 5 | String conditionString = comboMenu.getText();↵ | |
6 | filterAction.setAction(name);↵ | 6 | criteria.setTypeString(conditionString);↵ | |
7 | } | 7 |
| |
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 in different classes |
Number of node comparisons | 25 |
Number of mapped statements | 5 |
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) | 8.2 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | if (b) | 1 | if (b) | |||||||||||||||||||||||||
2 | String name = (String)filterAction.getAction(); |
| 2 | String conditionString = criteria.getTypeString(); | ||||||||||||||||||||||||
3 | comboMenu.setText(name); |
| 3 | comboMenu.setText(conditionString); | ||||||||||||||||||||||||
else | else | |||||||||||||||||||||||||||
4 | String name = (String)comboMenu.getText(); |
| 4 | String conditionString = comboMenu.getText(); | ||||||||||||||||||||||||
5 | filterAction.setAction(name); |
| 5 | criteria.setTypeString(conditionString); |
Row | Violation |
---|---|
1 | Expression (String)comboMenu.getText() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression comboMenu.getText() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression filterAction.setAction(name) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression criteria.setTypeString(conditionString) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression filterAction.setAction(name) is a void method call, and thus it cannot be parameterized |
6 | Expression criteria.setTypeString(conditionString) is a void method call, and thus it cannot be parameterized |
7 | Expression filterAction cannot be unified with expression criteria , because common superclass org.columa.core.config.IDefaultItem does not declare member(s) public abstract void setAction(java.lang.String) , public void setTypeString(java.lang.String) |