if (noLegendYet) { gbc.gridx = 0; gbc.gridy = compCount++; gbc.anchor = GridBagConstraints.WEST; gbc.weightx = 1.0; gbc.insets = new Insets(0, 10, 0, 0); JLabel mainTimeLabel = new JLabel(oneSample.toString()); mainTimeLabel.setForeground(currColor); gridBag.setConstraints(mainTimeLabel, gbc); legendPanel.add(mainTimeLabel); }
if (noLegendYet) { gbc.gridx = 0; gbc.gridy = compCount++; gbc.anchor = GridBagConstraints.WEST; gbc.weightx = 1.0; gbc.insets = new Insets(0, 10, 0, 0); JLabel compTimeLabel = new JLabel(componentRes.getSampleLabel()); compTimeLabel.setForeground(currColor); gridBag.setConstraints(compTimeLabel, gbc); legendPanel.add(compTimeLabel); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphAccum.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphAccum.java
Method name: void drawSample(int, SampleResult, Graphics) Method name: void drawSample(int, SampleResult, Graphics)
Number of AST nodes: 10 Number of AST nodes: 10
1
if (noLegendYet) {
1
if (noLegendYet) {
2
			gbc.gridx = 0;
2
					gbc.gridx = 0;
3
			gbc.gridy = compCount++;
3
					gbc.gridy = compCount++;
4
			gbc.anchor = GridBagConstraints.WEST;
4
					gbc.anchor = GridBagConstraints.WEST;
5
			gbc.weightx = 1.0;
5
					gbc.weightx = 1.0;
6
			gbc.insets = new Insets(0, 10, 0, 0);
6
					gbc.insets = new Insets(0, 10, 0, 0);
7
			JLabel mainTimeLabel = new JLabel(oneSample.toString());
7
					JLabel compTimeLabel = new JLabel(componentRes.getSampleLabel());
8
			mainTimeLabel.setForeground(currColor);
8
					compTimeLabel.setForeground(currColor);
9
			gridBag.setConstraints(mainTimeLabel, gbc);
9
					gridBag.setConstraints(compTimeLabel, gbc);
10
			legendPanel.add(mainTimeLabel);
10
					legendPanel.add(compTimeLabel);
11
		}
11
				}
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 the same method
Number of node comparisons100
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements10
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)6.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    45
    if (noLegendYet)
    70
    if (noLegendYet)
    46
    gbc.gridx = 0;
    71
    gbc.gridx = 0;
    47
    gbc.gridy = compCount++;
    72
    gbc.gridy = compCount++;
    48
    gbc.anchor = GridBagConstraints.WEST;
    73
    gbc.anchor = GridBagConstraints.WEST;
    49
    gbc.weightx = 1.0;
    74
    gbc.weightx = 1.0;
    50
    gbc.insets = new Insets(0, 10, 0, 0);
    75
    gbc.insets = new Insets(0, 10, 0, 0);
    51
    JLabel mainTimeLabel = new JLabel(oneSample.toString());
    51
    JLabel mainTimeLabel = new JLabel(oneSample.toString());
    76
    JLabel compTimeLabel = new JLabel(componentRes.getSampleLabel());
    Differences
    Expression1Expression2Difference
    mainTimeLabelcompTimeLabelVARIABLE_NAME_MISMATCH
    toStringgetSampleLabelMETHOD_INVOCATION_NAME_MISMATCH
    oneSamplecomponentResVARIABLE_NAME_MISMATCH
    76
    JLabel compTimeLabel = new JLabel(componentRes.getSampleLabel());
    52
    mainTimeLabel.setForeground(currColor);
    52
    mainTimeLabel.setForeground(currColor);
    77
    compTimeLabel.setForeground(currColor);
    Differences
    Expression1Expression2Difference
    mainTimeLabelcompTimeLabelVARIABLE_NAME_MISMATCH
    77
    compTimeLabel.setForeground(currColor);
    53
    gridBag.setConstraints(mainTimeLabel, gbc);
    53
    gridBag.setConstraints(mainTimeLabel, gbc);
    78
    gridBag.setConstraints(compTimeLabel, gbc);
    Differences
    Expression1Expression2Difference
    mainTimeLabelcompTimeLabelVARIABLE_NAME_MISMATCH
    78
    gridBag.setConstraints(compTimeLabel, gbc);
    54
    legendPanel.add(mainTimeLabel);
    54
    legendPanel.add(mainTimeLabel);
    79
    legendPanel.add(compTimeLabel);
    Differences
    Expression1Expression2Difference
    mainTimeLabelcompTimeLabelVARIABLE_NAME_MISMATCH
    79
    legendPanel.add(compTimeLabel);
    Precondition Violations (0)
    Row Violation