File destFile = fc.getSelectedFile(); ICalendarStore store = CalendarStoreFactory.getInstance() .getLocaleStore(); Command command = new ExportCalendarCommand( new CalendarCommandReference(store, calendar), 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/ExportCalendarAction.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 ExportCalendarCommand(
3
		
5
					new CalendarCommandReference(s
4
File logDirectory = new File(file, "log");
6
tore, calendar), destFile);
5
		File logFile = new File(logDirectory, "columba.log");
7
			CommandProcessor.getInstance().addOp(command);
6
		ColumbaDesktop.getInstance().open(logFile);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons16
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                                                                          
    1
    File file = DefaultConfigDirectory.getInstance().getCurrentPath();
                                                                                        
    2
    File logDirectory = new File(file, "log");
    12
    File destFile = fc.getSelectedFile();
    12
    File destFile = fc.getSelectedFile();
    3
    File logFile = new File(logDirectory, "columba.log");
    Differences
    Expression1Expression2Difference
    destFilelogFileVARIABLE_NAME_MISMATCH
    fc.getSelectedFile()new File(logDirectory,"columba.log")TYPE_COMPATIBLE_REPLACEMENT
    3
    File logFile = new File(logDirectory, "columba.log");
                                                                                                
    4
    ColumbaDesktop.getInstance().open(logFile);
    13
    ICalendarStore store = CalendarStoreFactory.getInstance().getLocaleStore();
                                                                                                                                                              
    14
    Command command = new ExportCalendarCommand(new CalendarCommandReference(store, calendar), destFile);
                                                                                                                                                                                                              
    15
    CommandProcessor.getInstance().addOp(command);
                                                                                                        
    Precondition Violations (0)
    Row Violation