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)); } if (categories.contains(REPORT_PAGE)) { reportPage.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)); }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/gui/util/ReportMenuFactory.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: 10 Number of AST nodes: 10
1
if (categories.contains(NON_TEST_ELEMENTS)) {
1
if (categories.contains(
2
					nonTestElement
2
POST_PROCESSORS)) {
3
s.add(new MenuInfo(item.getStaticLabel(), name));
3
					postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
4
				}
4
				}
5
				if (categories.contains(LISTENERS)) {
5
				if (categories.contains(PRE_PROCESSORS)) {
6
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
6
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
7
				}
7
				}
8
				if (categories.contains(CONFIG_ELEMENTS)) {
8
				if (categories.contains(CONTROLLERS)) {
9
					configElements.add(new MenuInfo(item.getStaticLabel(), name));
9
					controllers.add(new MenuInfo(item.getStaticLabel(), name));
10
				}
10
				}
11
				if (categories.contains(TABLES)) {
11
				if (categories.contains(
12
					table
12
NON_TEST_ELEMENTS)) {
13
s.add(new MenuInfo(item.getStaticLabel(), name));
13
					nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
14
				}
14
				}
15
				if (categories.contains(REPORT_PAGE)) {
15
				if (categories.contains(LISTENERS)) {
16
					reportPage.add(new MenuInfo(item.getStaticLabel(), name));
16
					listeners.add(new MenuInfo(item.getStaticLabel(), name));
17
				}
17
				}
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)1.6
Clones locationClones are in the same method
Number of node comparisons71
  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)14.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    45
    if (categories.contains(NON_TEST_ELEMENTS))
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    46
    nonTestElements.add(new MenuInfo(item.getStaticLabel(), name));
    47
    if (categories.contains(LISTENERS))
    47
    if (categories.contains(LISTENERS))
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    48
    listeners.add(new MenuInfo(item.getStaticLabel(), name));
    49
    if (categories.contains(CONFIG_ELEMENTS))
    49
    if (categories.contains(CONFIG_ELEMENTS))
    43
    if (categories.contains(CONTROLLERS))
    Differences
    Expression1Expression2Difference
    CONFIG_ELEMENTSCONTROLLERSVARIABLE_NAME_MISMATCH
    43
    if (categories.contains(CONTROLLERS))
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    50
    configElements.add(new MenuInfo(item.getStaticLabel(), name));
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    configElementscontrollersVARIABLE_NAME_MISMATCH
    44
    controllers.add(new MenuInfo(item.getStaticLabel(), name));
    51
    if (categories.contains(TABLES))
    51
    if (categories.contains(TABLES))
    41
    if (categories.contains(PRE_PROCESSORS))
    Differences
    Expression1Expression2Difference
    TABLESPRE_PROCESSORSVARIABLE_NAME_MISMATCH
    41
    if (categories.contains(PRE_PROCESSORS))
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    tablespreProcessorsVARIABLE_NAME_MISMATCH
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    53
    if (categories.contains(REPORT_PAGE))
    53
    if (categories.contains(REPORT_PAGE))
    39
    if (categories.contains(POST_PROCESSORS))
    Differences
    Expression1Expression2Difference
    REPORT_PAGEPOST_PROCESSORSVARIABLE_NAME_MISMATCH
    39
    if (categories.contains(POST_PROCESSORS))
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    reportPagepostProcessorsVARIABLE_NAME_MISMATCH
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation