public void actionPerformed(ActionEvent e) { ICalendarMediator m = (ICalendarMediator) getFrameMediator(); ICalendarView c = m.getCalendarView(); IActivity activity = c.getSelectedActivity(); ICalendarStore store = CalendarStoreFactory.getInstance() .getLocaleStore(); Command command = new ActivityMovedCommand( new CalendarCommandReference(store, activity)); CommandProcessor.getInstance().addOp(command);
public void actionPerformed(ActionEvent e) { ICalendarMediator m = (ICalendarMediator) getFrameMediator(); ICalendarView c = m.getCalendarView(); IActivity activity = c.getSelectedActivity(); ICalendarStore store = CalendarStoreFactory.getInstance() .getLocaleStore(); Command command = new DeleteEventCommand(new CalendarCommandReference( store, activity)); CommandProcessor.getInstance().addOp(command);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/action/ActivityMovedAction.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/action/DeleteActivityAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void actionPerformed(ActionEvent e) {
1
public void actionPerformed(ActionEvent e) {
2
		ICalendarMediator m = (ICalendarMediator) getFrameMediator();
2
		ICalendarMediator m = (ICalendarMediator) getFrameMediator();
3
		ICalendarView c = m.getCalendarView();
3
		ICalendarView c = m.getCalendarView();
4
		IActivity activity = c.getSelectedActivity();
4
		IActivity activity = c.getSelectedActivity();
5
		ICalendarStore store = CalendarStoreFactory.getInstance()
5
		ICalendarStore store = CalendarStoreFactory.getInstance()
6
				.getLocaleStore();
6
				.getLocaleStore();
7
		Command command = new ActivityMovedCommand(
7
		Command command = new DeleteEventCommand(
8
				new CalendarCommandReference(
8
new CalendarCommandReference(
9
store, activity));
9
				store, activity));
10
		CommandProcessor.getInstance().addOp(command);
10
		CommandProcessor.getInstance().addOp(command);
11
	
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0