setLayout(new BorderLayout()); getContentPane().add( new DialogHeaderPanel("New Appointment", "Edit Appointment Properties", ImageLoader .getIcon(IconKeys.USER)), BorderLayout.NORTH); getContentPane().add(createPanel(), BorderLayout.CENTER); getContentPane().add(createButtonPanel(), BorderLayout.SOUTH); getRootPane().registerKeyboardAction(this, "CANCEL", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); updateComponents(true); pack(); setLocationRelativeTo(null); setVisible(true);
setLayout(new BorderLayout()); getContentPane().add( new DialogHeaderPanel("Recurrence", "Edit Recurrence Properties", ImageLoader .getIcon(IconKeys.USER)), BorderLayout.NORTH); getContentPane().add(createPanel(), BorderLayout.CENTER); getContentPane().add(createButtonPanel(), BorderLayout.SOUTH); getRootPane().registerKeyboardAction(this, "CANCEL", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW); updateComponents(true); pack(); setLocationRelativeTo(null); setVisible(true);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/dialog/EditEventDialog.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/dialog/RecurrenceDialog.java
Method name: void EditEventDialog(JFrame, IEventInfo) Method name: void RecurrenceDialog(Frame, IEventInfo)
Number of AST nodes: 9 Number of AST nodes: 9
1
setLayout(new BorderLayout());
1
setLayout(new BorderLayout());
2
		getContentPane().add(
2
		getContentPane().add(
3
				new DialogHeaderPanel("New Appointment",
3
				new DialogHeaderPanel("Recurrence",
4
						"Edit Appointment Properties", ImageLoader
4
						"Edit Recurrence Properties", ImageLoader
5
								.getIcon(IconKeys.USER)),
5
								.getIcon(IconKeys.USER)),
6
				BorderLayout.NORTH);
6
				BorderLayout.NORTH);
7
		getContentPane().add(createPanel(), BorderLayout.CENTER);
7
		getContentPane().add(createPanel(), BorderLayout.CENTER);
8
		getContentPane().add(createButtonPanel(), BorderLayout.SOUTH);
8
		getContentPane().add(createButtonPanel(), BorderLayout.SOUTH);
9

9
		getRootPane().registerKeyboardAction(this, "CANCEL",
10
		getRootPane().registerKeyboardAction(this, "CANCEL",
10
				KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
11
				KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0),
11
				JComponent.WHEN_IN_FOCUSED_WINDOW);
12
				JComponent.WHEN_IN_FOCUSED_WINDOW);
13

12
		updateComponents(true);
14
		updateComponents(true);
15

13
		pack();
16
		pack();
14
		setLocationRelativeTo(null);
17
		setLocationRelativeTo(null);
15
		setVisible(true);
18
		setVisible(true);
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 comparisons81
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    21
    setLayout(new BorderLayout());
    4
    setLayout(new BorderLayout());
    22
    getContentPane().add(new DialogHeaderPanel("New Appointment", "Edit Appointment Properties", ImageLoader.getIcon(IconKeys.USER)), BorderLayout.NORTH);
    22
    getContentPane().add(new DialogHeaderPanel("New Appointment", "Edit Appointment Properties", ImageLoader.getIcon(IconKeys.USER)), BorderLayout.NORTH);
    5
    getContentPane().add(new DialogHeaderPanel("Recurrence", "Edit Recurrence Properties", ImageLoader.getIcon(IconKeys.USER)), BorderLayout.NORTH);
    Differences
    Expression1Expression2Difference
    "New Appointment""Recurrence"LITERAL_VALUE_MISMATCH
    "Edit Appointment Properties""Edit Recurrence Properties"LITERAL_VALUE_MISMATCH
    5
    getContentPane().add(new DialogHeaderPanel("Recurrence", "Edit Recurrence Properties", ImageLoader.getIcon(IconKeys.USER)), BorderLayout.NORTH);
    23
    getContentPane().add(createPanel(), BorderLayout.CENTER);
    6
    getContentPane().add(createPanel(), BorderLayout.CENTER);
    24
    getContentPane().add(createButtonPanel(), BorderLayout.SOUTH);
    7
    getContentPane().add(createButtonPanel(), BorderLayout.SOUTH);
    25
    getRootPane().registerKeyboardAction(this, "CANCEL", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
    8
    getRootPane().registerKeyboardAction(this, "CANCEL", KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
    26
    updateComponents(true);
    9
    updateComponents(true);
    27
    pack();
    10
    pack();
    28
    setLocationRelativeTo(null);
    11
    setLocationRelativeTo(null);
    29
    setVisible(true);
    12
    setVisible(true);
    Precondition Violations (0)
    Row Violation