if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); topPanel.setBackground(list.getSelectionBackground()); topPanel.setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); topPanel.setBackground(list.getBackground()); topPanel.setForeground(list.getForeground()); } ISearchResult result = (ISearchResult) value; titleLabel.setText(result.getTitle());
if (isSelected) { setBackground(list.getSelectionBackground()); setForeground(list.getSelectionForeground()); progressPanel.setBackground(list.getSelectionBackground()); progressPanel.setForeground(list.getSelectionForeground()); } else { setBackground(list.getBackground()); setForeground(list.getForeground()); progressPanel.setBackground(list.getBackground()); progressPanel.setForeground(list.getForeground()); } Worker worker = (Worker) value; label.setText(worker.getDisplayText());
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/search/GenericResultPanel.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/statusbar/TaskRenderer.java
Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean) Method name: Component getListCellRendererComponent(JList, Object, int, boolean, boolean)
Number of AST nodes: 11 Number of AST nodes: 11
1
if (isSelected) {
1
if (isSelected) {
2
				setBackground(list.getSelectionBackground());
2
			setBackground(list.getSelectionBackground());
3
				setForeground(list.getSelectionForeground());
3
			setForeground(list.getSelectionForeground());
4
				topPanel.setBackground(list.getSelectionBackground());
4
			progressPanel.setBackground(list.getSelectionBackground());
5
				topPanel.setForeground(list.getSelectionForeground());
5
			progressPanel.setForeground(list.getSelectionForeground());
6
			} else {
6
		} else {
7
				setBackground(list.getBackground());
7
			setBackground(list.getBackground());
8
				setForeground(list.getForeground());
8
			setForeground(list.getForeground());
9
				topPanel.setBackground(list.getBackground());
9
			progressPanel.setBackground(list.getBackground());
10
				topPanel.setForeground(list.getForeground());
10
			progressPanel.setForeground(list.getForeground());
11
			}
11
		}
12
			ISearchResult result = (ISearchResult) value;
12
		Worker worker = (Worker) value;
13
			titleLabel.setText(result.getTitle());
13
		label.setText(worker.getDisplayText());
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.1
Clones locationClones are in different classes having the same super class
Number of node comparisons85
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements9
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)5.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (isSelected)
    1
    if (isSelected)
    2
    setBackground(list.getSelectionBackground());
    2
    setBackground(list.getSelectionBackground());
    3
    setForeground(list.getSelectionForeground());
    3
    setForeground(list.getSelectionForeground());
    4
    topPanel.setBackground(list.getSelectionBackground());
    4
    topPanel.setBackground(list.getSelectionBackground());
    4
    progressPanel.setBackground(list.getSelectionBackground());
    Differences
    Expression1Expression2Difference
    topPanelprogressPanelVARIABLE_NAME_MISMATCH
    4
    progressPanel.setBackground(list.getSelectionBackground());
    5
    topPanel.setForeground(list.getSelectionForeground());
    5
    topPanel.setForeground(list.getSelectionForeground());
    5
    progressPanel.setForeground(list.getSelectionForeground());
    Differences
    Expression1Expression2Difference
    topPanelprogressPanelVARIABLE_NAME_MISMATCH
    5
    progressPanel.setForeground(list.getSelectionForeground());
    else
    else
    6
    setBackground(list.getBackground());
    6
    setBackground(list.getBackground());
    7
    setForeground(list.getForeground());
    7
    setForeground(list.getForeground());
    8
    topPanel.setBackground(list.getBackground());
    8
    topPanel.setBackground(list.getBackground());
    8
    progressPanel.setBackground(list.getBackground());
    Differences
    Expression1Expression2Difference
    topPanelprogressPanelVARIABLE_NAME_MISMATCH
    8
    progressPanel.setBackground(list.getBackground());
    9
    topPanel.setForeground(list.getForeground());
    9
    topPanel.setForeground(list.getForeground());
    9
    progressPanel.setForeground(list.getForeground());
    Differences
    Expression1Expression2Difference
    topPanelprogressPanelVARIABLE_NAME_MISMATCH
    9
    progressPanel.setForeground(list.getForeground());
                                                                    
    10
    Worker worker = (Worker)value;
    10
    ISearchResult result = (ISearchResult)value;
                                                                                                
                                                                                          
    11
    label.setText(worker.getDisplayText());
    11
    titleLabel.setText(result.getTitle());
                                                                                        
    Precondition Violations (0)
    Row Violation