this.displayName = displayName; init(); setState(1);
if (noLegendYet) { noLegendYet = false; lPanel.repaint(); lPanel.revalidate(); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/LoopControlPanel.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/visualizers/GraphAccum.java
Method name: void LoopControlPanel(boolean) Method name: void drawSample(int, SampleResult, Graphics)
Number of AST nodes: 3 Number of AST nodes: 4
1
this.displayName = displayName;
2
		
1
if (noLegendYet) {
2
			noLegendYet = false;
3
init();
3
			lPanel.repaint();
4
		setState(1);
4
			lPanel.revalidate();
5
		}
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    this.displayName = displayName;
    1
    this.displayName = displayName;
    82
    noLegendYet = false;
    Differences
    Expression1Expression2Difference
    this.displayNamenoLegendYetTYPE_COMPATIBLE_REPLACEMENT
    displayNamefalseTYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression this.displayName is a field being modified, and thus it cannot be parameterized
    Expression noLegendYet is a field being modified, and thus it cannot be parameterized
    82
    noLegendYet = false;
    2
    init();
    2
    init();
    83
    lPanel.repaint();
    Differences
    Expression1Expression2Difference
    initrepaintMETHOD_INVOCATION_NAME_MISMATCH
    lPanelMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression init() is a void method call, and thus it cannot be parameterized
    Expression lPanel.repaint() is a void method call, and thus it cannot be parameterized
    Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method init
    Expression init() is a void method call, and thus it cannot be parameterized
    Expression lPanel.repaint() is a void method call, and thus it cannot be parameterized
    83
    lPanel.repaint();
    3
    setState(1);
    3
    setState(1);
    84
    lPanel.revalidate();
    Differences
    Expression1Expression2Difference
    setStaterevalidateMETHOD_INVOCATION_NAME_MISMATCH
    setState(1)lPanel.revalidate()ARGUMENT_NUMBER_MISMATCH
    lPanelMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression setState(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method setState
    Expression setState(1) is a void method call, and thus it cannot be parameterized
    Expression lPanel.revalidate() is a void method call, and thus it cannot be parameterized
    Expression setState(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method setState
    Expression setState(1) is a void method call, and thus it cannot be parameterized
    Expression lPanel.revalidate() is a void method call, and thus it cannot be parameterized
    84
    lPanel.revalidate();
    Precondition Violations (14)
    Row Violation
    1Expression this.displayName is a field being modified, and thus it cannot be parameterized
    2Expression noLegendYet is a field being modified, and thus it cannot be parameterized
    3Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression init() is a void method call, and thus it cannot be parameterized
    5Expression lPanel.repaint() is a void method call, and thus it cannot be parameterized
    6Expression init() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression init() is a void method call, and thus it cannot be parameterized
    8Expression lPanel.repaint() is a void method call, and thus it cannot be parameterized
    9Expression setState(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    10Expression setState(1) is a void method call, and thus it cannot be parameterized
    11Expression lPanel.revalidate() is a void method call, and thus it cannot be parameterized
    12Expression setState(1) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13Expression setState(1) is a void method call, and thus it cannot be parameterized
    14Expression lPanel.revalidate() is a void method call, and thus it cannot be parameterized