c.gridx = 2; c.gridwidth = GridBagConstraints.REMAINDER; authorPanel.add(buildDate, c); JLabel authorLabel = new JLabel(GlobalResourceLoader.getString( RESOURCE_BUNDLE_PATH, "about", "authors")); if (font != null) { font = font.deriveFont(Font.BOLD); authorLabel.setFont(font); } c.gridx = 0; c.gridy = 3; c.gridwidth = 1; box = Box.createRigidArea(new Dimension(10, 10)); authorPanel.add(box, c);
c.gridx = 2; c.gridwidth = GridBagConstraints.REMAINDER; authorPanel.add(version, c); JLabel buildDateLabel = new JLabel(GlobalResourceLoader.getString( RESOURCE_BUNDLE_PATH, "about", "build_date")); if (font != null) { font = font.deriveFont(Font.BOLD); buildDateLabel.setFont(font); } c.gridx = 0; c.gridy = 2; c.gridwidth = 1; box = Box.createRigidArea(new Dimension(10, 10)); authorPanel.add(box, c);
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/util/AboutDialog.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/util/AboutDialog.java
Method name: void init() Method name: void init()
Number of AST nodes: 12 Number of AST nodes: 12
1
c.gridx = 2;
1
c.gridx = 2;
2
		c.gridwidth = GridBagConstraints.REMAINDER;
2
		c.gridwidth = GridBagConstraints.REMAINDER;
3
		authorPanel.add(buildDate, c);
3
		authorPanel.add(version, c);
4
		JLabel authorLabel = new JLabel(GlobalResourceLoader.getString(
4
		JLabel buildDateLabel = new JLabel(GlobalResourceLoader.getString(
5
				RESOURCE_BUNDLE_PATH, "about", "authors"));
5
				RESOURCE_BUNDLE_PATH, "about", "build_date"));
6
		if (font != null) {
6
		if (font != null) {
7
			font = font.deriveFont(Font.BOLD);
7
			font = font.deriveFont(Font.BOLD);
8
			authorLabel.setFont(font);
8
			buildDateLabel.setFont(font);
9
		}
9
		}
10
		c.gridx = 0;
10
		c.gridx = 0;
11
		c.gridy = 3;
11
		c.gridy = 2;
12
		c.gridwidth = 1;
12
		c.gridwidth = 1;
13
		box = Box.createRigidArea(new Dimension(10, 10));
13
		box = Box.createRigidArea(new Dimension(10, 10));
14
		authorPanel.add(box, c);
14
		authorPanel.add(box, c);
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.3
Clones locationClones are in the same method
Number of node comparisons74
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements12
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)17.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    48
    c.gridx = 2;
    29
    c.gridx = 2;
    49
    c.gridwidth = GridBagConstraints.REMAINDER;
    30
    c.gridwidth = GridBagConstraints.REMAINDER;
    50
    authorPanel.add(buildDate, c);
    50
    authorPanel.add(buildDate, c);
    31
    authorPanel.add(version, c);
    Differences
    Expression1Expression2Difference
    buildDateversionVARIABLE_NAME_MISMATCH
    31
    authorPanel.add(version, c);
    51
    JLabel authorLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_BUNDLE_PATH, "about", "authors"));
    51
    JLabel authorLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_BUNDLE_PATH, "about", "authors"));
    32
    JLabel buildDateLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_BUNDLE_PATH, "about", "build_date"));
    Differences
    Expression1Expression2Difference
    authorLabelbuildDateLabelVARIABLE_NAME_MISMATCH
    "authors""build_date"LITERAL_VALUE_MISMATCH
    32
    JLabel buildDateLabel = new JLabel(GlobalResourceLoader.getString(RESOURCE_BUNDLE_PATH, "about", "build_date"));
    52
    if (font != null)
    33
    if (font != null)
    53
    font = font.deriveFont(Font.BOLD);
    34
    font = font.deriveFont(Font.BOLD);
    54
    authorLabel.setFont(font);
    54
    authorLabel.setFont(font);
    35
    buildDateLabel.setFont(font);
    Differences
    Expression1Expression2Difference
    authorLabelbuildDateLabelVARIABLE_NAME_MISMATCH
    35
    buildDateLabel.setFont(font);
    55
    c.gridx = 0;
    36
    c.gridx = 0;
    56
    c.gridy = 3;
    56
    c.gridy = 3;
    37
    c.gridy = 2;
    Differences
    Expression1Expression2Difference
    32LITERAL_VALUE_MISMATCH
    37
    c.gridy = 2;
    57
    c.gridwidth = 1;
    38
    c.gridwidth = 1;
    58
    box = Box.createRigidArea(new Dimension(10, 10));
    39
    box = Box.createRigidArea(new Dimension(10, 10));
    59
    authorPanel.add(box, c);
    40
    authorPanel.add(box, c);
    Precondition Violations (1)
    Row Violation
    1Clone fragment #1 returns variables authorLabel, font , while Clone fragment #2 returns variables buildDateLabel, font