File destFile = fc.getSelectedFile();
ICalendarStore store = CalendarStoreFactory.getInstance()
.getLocaleStore();
Command command = new SaveEventToFileCommand(
new CalendarCommandReference(store, activity), destFile);
CommandProcessor.getInstance().addOp(command);
File file = DefaultConfigDirectory.getInstance().getCurrentPath();
File logDirectory = new File(file, "log");
File logFile = new File(logDirectory, "columba.log");
ColumbaDesktop.getInstance().open(logFile);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/action/SaveAsAction.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/globalactions/ViewLogAction.java
|
Method name: void actionPerformed(ActionEvent)
|
|
Method name: void actionPerformed(ActionEvent)
|
Number of AST nodes: 4
|
|
Number of AST nodes: 4
|
|
1 | File destFile = fc.getSelectedFile();↵ | | 1 | File file = ↵
|
|
2 | ICalendarStore store = CalendarStoreFactory.getInstance()↵ | | |
|
3 | .getLocaleStore();↵ | | 2 | DefaultConfigDirectory.getInstance().getCurrentPath();↵
|
|
4 | Command command = new SaveEventToFileCommand(↵ | | 3 | ↵
|
5 | new CalendarCommandReference(s↵ | | 4 | File logDirectory = new File(file, "log");↵
|
6 | tore, activity), destFile);↵ | | 5 | File logFile = new File(logDirectory, "columba.log");↵
|
|
7 | CommandProcessor.getInstance().addOp(command); | | 6 | ColumbaDesktop.getInstance().open(logFile);
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 16 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 1 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 3 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
| | | 1 | File file = DefaultConfigDirectory.getInstance().getCurrentPath(); |
| | | 2 | File logDirectory = new File(file, "log"); |
13 | File destFile = fc.getSelectedFile(); | | 3 | File logFile = new File(logDirectory, "columba.log"); |
| | | 4 | ColumbaDesktop.getInstance().open(logFile); |
14 | ICalendarStore store = CalendarStoreFactory.getInstance().getLocaleStore(); | | | |
15 | Command command = new SaveEventToFileCommand(new CalendarCommandReference(store, activity), destFile); | | | |
16 | CommandProcessor.getInstance().addOp(command); | | | |
Precondition Violations (0)
Row |
Violation |