ICalendarStore store = ((CalendarCommandReference) getReference()) .getStore(); ICalendarItem calendar = ((CalendarCommandReference) getReference()) .getSrcCalendar(); new CalendarExporter() .exportCalendar(destFile, calendar.getId(), store);
String action = arg0.getActionCommand(); JRadioButtonMenuItem m = (JRadioButtonMenuItem) arg0.getSource(); setText(m.getText()); fireItemStateChanged(new ItemEvent(this, 0, action, ItemEvent.SELECTED));
Clone fragments detected by clone detection tool
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));
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    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
    new CalendarExporter().exportCalendar(destFile, calendar.getId(), store);
    3
    setText(m.getText());
    Differences
    Expression1Expression2Difference
    exportCalendarsetTextMETHOD_INVOCATION_NAME_MISMATCH
    new CalendarExporter().exportCalendar(destFile,calendar.getId(),store)setText(m.getText())ARGUMENT_NUMBER_MISMATCH
    new CalendarExporter()MISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression new CalendarExporter().exportCalendar(destFile,calendar.getId(),store) is a void method call, and thus it cannot be parameterized
    Expression setText(m.getText()) is a void method call, and thus it cannot be parameterized
    Expression new CalendarExporter().exportCalendar(destFile,calendar.getId(),store) is a void method call, and thus it cannot be parameterized
    Expression setText(m.getText()) is a void method call, and thus it cannot be parameterized
    3
    setText(m.getText());
                                                                                                                                                      
    4
    fireItemStateChanged(new ItemEvent(this, 0, action, ItemEvent.SELECTED));
    Precondition Violations (4)
    Row Violation
    1Expression new CalendarExporter().exportCalendar(destFile,calendar.getId(),store) is a void method call, and thus it cannot be parameterized
    2Expression setText(m.getText()) is a void method call, and thus it cannot be parameterized
    3Expression new CalendarExporter().exportCalendar(destFile,calendar.getId(),store) is a void method call, and thus it cannot be parameterized
    4Expression setText(m.getText()) is a void method call, and thus it cannot be parameterized