ITag result = (ITag) value; nameLabel.setText(result.getName()); if (result.getColor() != null) nameLabel.setIcon(createIcon(result.getColor())); else nameLabel.setIcon(createIcon(list.getBackground()));
ITag result = (ITag) value; nameLabel.setText(result.getName()); if (result.getColor() != null) iconLabel.setIcon(createIcon(result.getColor())); else iconLabel.setIcon(createIcon(list.getBackground()));
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/tagging/TagList.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/tagging/TagList.java
Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean) Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean)
Number of AST nodes: 5 Number of AST nodes: 5
1
ITag result = (ITag) value;
1
ITag result = (ITag) value;
2
			nameLabel.setText(result.getName());
2
			nameLabel.setText(result.getName());
3
			if (result.getColor() != null)
3
			if (result.getColor() != null)
4
				nameLabel.setIcon(createIcon(result.getColor()));
4
				iconLabel.setIcon(createIcon(result.getColor()));
5
			else
5
			else
6
				nameLabel.setIcon(createIcon(list.getBackground()));
6
				iconLabel.setIcon(createIcon(list.getBackground()));
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.2
Clones locationClones are in the same java file
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    6
    ITag result = (ITag)value;
    6
    ITag result = (ITag)value;
    7
    nameLabel.setText(result.getName());
    7
    nameLabel.setText(result.getName());
    8
    if (result.getColor() != null)
    8
    if (result.getColor() != null)
    9
    nameLabel.setIcon(createIcon(result.getColor()));
    9
    nameLabel.setIcon(createIcon(result.getColor()));
    9
    iconLabel.setIcon(createIcon(result.getColor()));
    Differences
    Expression1Expression2Difference
    nameLabeliconLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression nameLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9
    iconLabel.setIcon(createIcon(result.getColor()));
    else
    else
    10
    nameLabel.setIcon(createIcon(list.getBackground()));
    10
    nameLabel.setIcon(createIcon(list.getBackground()));
    10
    iconLabel.setIcon(createIcon(list.getBackground()));
    Differences
    Expression1Expression2Difference
    nameLabeliconLabelVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression nameLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression iconLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10
    iconLabel.setIcon(createIcon(list.getBackground()));
    Precondition Violations (3)
    Row Violation
    1Expression nameLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression nameLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression iconLabel cannot be parameterized, because it has dependencies to/from statements that will be extracted