File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/command/ExportCalendarCommand.java | File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/base/ComboMenu.java | |||
Method name: void execute(IWorkerStatusController)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 3 | Number of AST nodes: 4 | |||
1 | ICalendarStore store = ((CalendarCommandReference) getReference())↵ | 1 | String action = arg0.getActionCommand();↵ | |
2 | .getStore();↵ | 2 | ↵ | |
3 | ICalendarItem calendar = ((CalendarCommandReference) getReference())↵ | 3 | JRadioButtonMenuItem m = (JRadioButtonMenuItem) arg0.getSource();↵ | |
4 | .getSrcCalendar();↵ | 4 | ↵ | |
5 | new CalendarExporter()↵ | |||
6 | .exportCalendar(destFile, calendar.getId(), store↵ | 5 | setText(m.getText());↵ | |
7 | ); | 6 | fireItemStateChanged(new ItemEvent(this, 0, action, ItemEvent.SELECTED)); | |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 12 |
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 2 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | String action = arg0.getActionCommand(); | ||||||||||||||||||||||
1 | ICalendarStore store = ((CalendarCommandReference)getReference()).getStore(); | | ||||||||||||||||||||||
| 2 | JRadioButtonMenuItem m = (JRadioButtonMenuItem)arg0.getSource(); | ||||||||||||||||||||||
2 | ICalendarItem calendar = ((CalendarCommandReference)getReference()).getSrcCalendar(); | | ||||||||||||||||||||||
3 | new CalendarExporter().exportCalendar(destFile, calendar.getId(), store); |
| 3 | setText(m.getText()); | ||||||||||||||||||||
| 4 | fireItemStateChanged(new ItemEvent(this, 0, action, ItemEvent.SELECTED)); |
Row | Violation |
---|---|
1 | Expression new CalendarExporter().exportCalendar(destFile,calendar.getId(),store) is a void method call, and thus it cannot be parameterized |
2 | Expression setText(m.getText()) is a void method call, and thus it cannot be parameterized |
3 | Expression new CalendarExporter().exportCalendar(destFile,calendar.getId(),store) is a void method call, and thus it cannot be parameterized |
4 | Expression setText(m.getText()) is a void method call, and thus it cannot be parameterized |