if (categories.contains(TIMERS)) { timers.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(POST_PROCESSORS)) { postProcessors.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(PRE_PROCESSORS)) { preProcessors.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(CONTROLLERS)) { controllers.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(SAMPLERS)) { samplers.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(NON_TEST_ELEMENTS)) { nonTestElements.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(LISTENERS)) { listeners.add(new MenuInfo(item.getStaticLabel(), name)); }
if (categories.contains(POST_PROCESSORS)) { postProcessors.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(PRE_PROCESSORS)) { preProcessors.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(CONTROLLERS)) { controllers.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(NON_TEST_ELEMENTS)) { nonTestElements.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(LISTENERS)) { listeners.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(CONFIG_ELEMENTS)) { configElements.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(TABLES)) { tables.add(new MenuInfo(item.getStaticLabel(), name)); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/MenuFactory.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuFactory.java
Method name: void initializeMenus() Method name: void initializeMenus()
Number of AST nodes: 14 Number of AST nodes: 14
1
if (categories.contains(TIMERS)) {
2
					timers.add(new MenuInfo(item.getStaticLabel(), name));
3
				}
4
				if (categories.contains(POST_PROCESSORS)) {
1
if (categories.contains(POST_PROCESSORS)) {
5
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
2
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
6
				}
3
				}
7
				if (categories.contains(PRE_PROCESSORS)) {
4
				if (categories.contains(PRE_PROCESSORS)) {
8
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
5
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
9
				}
6
				}
10
				if (categories.contains(CONTROLLERS)) {
7
				if (categories.contains(CONTROLLERS)) {
11
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
8
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
12
				}
9
				}
13
				if (categories.contains(SAMPL
10
				if (categories.contains(NON_TEST_ELEMENTS)) {
11
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
12
				}
14
ERS)) {
13
				if (categories.contains(LISTENERS)) {
15
					samplers.add(new MenuInfo(item.getStaticLabel(), name));
14
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
16
				}
15
				}
17
				if (categories.contains(NON_TEST_ELEMENTS)) {
16
				if (categories.contains(CONFIG_ELEMENTS)) {
18
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
17
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
19
				}
18
				}
20
				if (categories.contains(LISTENERS)) {
19
				if (categories.contains(TABLES)) {
21
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
20
					tables.add(new MenuInfo(item.getStaticLabel(), name));
22
				}
21
				}
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)4.6
Clones locationClones are in different classes
Number of node comparisons134
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements14
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)170.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    41
    if (categories.contains(TIMERS))
    41
    if (categories.contains(TIMERS))
    39
    if (categories.contains(POST_PROCESSORS))
    Differences
    Expression1Expression2Difference
    TIMERSPOST_PROCESSORSVARIABLE_NAME_MISMATCH
    39
    if (categories.contains(POST_PROCESSORS))
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    42
    timers.add(new MenuInfo(item.getStaticLabel(), name));
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    timerspostProcessorsVARIABLE_NAME_MISMATCH
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    43
    if (categories.contains(POST_PROCESSORS))
    43
    if (categories.contains(POST_PROCESSORS))
    41
    if (categories.contains(PRE_PROCESSORS))
    Differences
    Expression1Expression2Difference
    POST_PROCESSORSPRE_PROCESSORSVARIABLE_NAME_MISMATCH
    41
    if (categories.contains(PRE_PROCESSORS))
    44
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    44
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    postProcessorspreProcessorsVARIABLE_NAME_MISMATCH
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    45
    if (categories.contains(PRE_PROCESSORS))
    45
    if (categories.contains(PRE_PROCESSORS))
    43
    if (categories.contains(CONTROLLERS))
    Differences
    Expression1Expression2Difference
    PRE_PROCESSORSCONTROLLERSVARIABLE_NAME_MISMATCH
    43
    if (categories.contains(CONTROLLERS))
    46
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    46
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    preProcessorscontrollersVARIABLE_NAME_MISMATCH
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    47
    if (categories.contains(CONTROLLERS))
    47
    if (categories.contains(CONTROLLERS))
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    Differences
    Expression1Expression2Difference
    CONTROLLERSNON_TEST_ELEMENTSVARIABLE_NAME_MISMATCH
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    48
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    48
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    controllersnonTestElementsVARIABLE_NAME_MISMATCH
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    49
    if (categories.contains(SAMPLERS))
    49
    if (categories.contains(SAMPLERS))
    47
    if (categories.contains(LISTENERS))
    Differences
    Expression1Expression2Difference
    SAMPLERSLISTENERSVARIABLE_NAME_MISMATCH
    47
    if (categories.contains(LISTENERS))
    50
    samplers.add(new MenuInfo(item.getStaticLabel(), name));
    50
    samplers.add(new MenuInfo(item.getStaticLabel(), name));
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    samplerslistenersVARIABLE_NAME_MISMATCH
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    51
    if (categories.contains(NON_TEST_ELEMENTS))
    51
    if (categories.contains(NON_TEST_ELEMENTS))
    49
    if (categories.contains(CONFIG_ELEMENTS))
    Differences
    Expression1Expression2Difference
    NON_TEST_ELEMENTSCONFIG_ELEMENTSVARIABLE_NAME_MISMATCH
    49
    if (categories.contains(CONFIG_ELEMENTS))
    52
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    52
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    nonTestElementsconfigElementsVARIABLE_NAME_MISMATCH
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    53
    if (categories.contains(LISTENERS))
    53
    if (categories.contains(LISTENERS))
    51
    if (categories.contains(TABLES))
    Differences
    Expression1Expression2Difference
    LISTENERSTABLESVARIABLE_NAME_MISMATCH
    51
    if (categories.contains(TABLES))
    54
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    54
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    listenerstablesVARIABLE_NAME_MISMATCH
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation