JPanel panel = new JPanel(); FormLayout formlayout1 = new FormLayout( "FILL:DEFAULT:NONE,FILL:DEFAULT:NONE", "CENTER:DEFAULT:NONE"); CellConstraints cc = new CellConstraints(); panel.setLayout(formlayout1); rMaxOccurrences.setText("Maximum recurrences"); rMaxOccurrences.setActionCommand("maximum"); rMaxOccurrences.addActionListener(this); panel.add(rMaxOccurrences, cc.xy(1, 1)); maxOccurrences.setColumns(2); panel.add(maxOccurrences, cc.xy(2, 1)); return panel;
JPanel panel = new JPanel(); FormLayout formlayout1 = new FormLayout( "FILL:DEFAULT:NONE,FILL:DEFAULT:NONE", "CENTER:DEFAULT:NONE"); CellConstraints cc = new CellConstraints(); panel.setLayout(formlayout1); rUntilDate.setText("Until "); rUntilDate.setActionCommand("until"); rUntilDate.addActionListener(this); panel.add(rUntilDate, cc.xy(1, 1)); panel.add(endDatePicker, cc.xy(2, 1)); return panel;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/dialog/RecurrenceDialog.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/dialog/RecurrenceDialog.java
Method name: JPanel createMaxOccurrencesPanel() Method name: JPanel createUntilDatePanel()
Number of AST nodes: 11 Number of AST nodes: 10
1
JPanel panel = new JPanel();
1
JPanel panel = new JPanel();
2
		FormLayout formlayout1 = new FormLayout(
2
		FormLayout formlayout1 = new FormLayout(
3
				"FILL:DEFAULT:NONE,FILL:DEFAULT:NONE",
3
				"FILL:DEFAULT:NONE,FILL:DEFAULT:NONE",
4
				"CENTER:DEFAULT:NONE");
4
				"CENTER:DEFAULT:NONE");
5
		CellConstraints cc = new CellConstraints();
5
		CellConstraints cc = new CellConstraints();
6
		panel.setLayout(formlayout1);
6
		panel.setLayout(formlayout1);
7
		rMaxOccurrences.setText("Maximum recurrences");
7
		r
8
		rMaxOccurrences
8
UntilDate.setText("Until ");
9
.setActionCommand("maximum");
9
		rUntilDate.setActionCommand("until");
10
		rMaxOccurrences.addActionListener(this);
10
		rUntilDate.addActionListener(this);
11
		panel.add(rMaxOccurrences, cc.xy(1, 1));
11
		panel.add(rUntilDate, cc.xy(1, 1));
12
		
12
		
13
		maxOccurrences.setColumns(2);
14
		panel.add(maxOccurrences, cc.xy(2, 1));
13
panel.add(endDatePicker, cc.xy(2, 1));
15
		
14
		
16
		return panel;
15
		return panel;
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 declared in the same class
Number of node comparisons47
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    JPanel panel = new JPanel();
    1
    JPanel panel = new JPanel();
    2
    FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE", "CENTER:DEFAULT:NONE");
    2
    FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:DEFAULT:NONE", "CENTER:DEFAULT:NONE");
    3
    CellConstraints cc = new CellConstraints();
    3
    CellConstraints cc = new CellConstraints();
    4
    panel.setLayout(formlayout1);
    4
    panel.setLayout(formlayout1);
    5
    rMaxOccurrences.setText("Maximum recurrences");
    5
    rMaxOccurrences.setText("Maximum recurrences");
    5
    rUntilDate.setText("Until ");
    Differences
    Expression1Expression2Difference
    "Maximum recurrences""Until "LITERAL_VALUE_MISMATCH
    rMaxOccurrencesrUntilDateVARIABLE_NAME_MISMATCH
    5
    rUntilDate.setText("Until ");
    6
    rMaxOccurrences.setActionCommand("maximum");
    6
    rMaxOccurrences.setActionCommand("maximum");
    6
    rUntilDate.setActionCommand("until");
    Differences
    Expression1Expression2Difference
    "maximum""until"LITERAL_VALUE_MISMATCH
    rMaxOccurrencesrUntilDateVARIABLE_NAME_MISMATCH
    6
    rUntilDate.setActionCommand("until");
    7
    rMaxOccurrences.addActionListener(this);
    7
    rMaxOccurrences.addActionListener(this);
    7
    rUntilDate.addActionListener(this);
    Differences
    Expression1Expression2Difference
    rMaxOccurrencesrUntilDateVARIABLE_NAME_MISMATCH
    7
    rUntilDate.addActionListener(this);
    8
    panel.add(rMaxOccurrences, cc.xy(1, 1));
    8
    panel.add(rMaxOccurrences, cc.xy(1, 1));
    8
    panel.add(rUntilDate, cc.xy(1, 1));
    Differences
    Expression1Expression2Difference
    rMaxOccurrencesrUntilDateVARIABLE_NAME_MISMATCH
    8
    panel.add(rUntilDate, cc.xy(1, 1));
    9
    maxOccurrences.setColumns(2);
                                                                    
    10
    panel.add(maxOccurrences, cc.xy(2, 1));
    10
    panel.add(maxOccurrences, cc.xy(2, 1));
    9
    panel.add(endDatePicker, cc.xy(2, 1));
    Differences
    Expression1Expression2Difference
    maxOccurrencesendDatePickerVARIABLE_NAME_MISMATCH
    javax.swing.JTextFieldorg.columba.calendar.ui.comp.DatePickerSUBCLASS_TYPE_MISMATCH
    9
    panel.add(endDatePicker, cc.xy(2, 1));
    11
    return panel;
    10
    return panel;
    Precondition Violations (0)
    Row Violation