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(TABLES)) { tables.add(new MenuInfo(item.getStaticLabel(), name)); } if (categories.contains(REPORT_PAGE)) { reportPage.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: 4 Number of AST nodes: 4
1
if (categories.contains(POST_PROCESSORS)) {
1
if (categories.contains(
2
					postProcessor
2
TABLES)) {
3
s.add(new MenuInfo(item.getStaticLabel(), name));
3
					tables.add(new MenuInfo(item.getStaticLabel(), name));
4
				}
4
				}
5
				if (categories.contains(PRE_PROCESSORS)) {
5
				if (categories.contains(REPORT_PAGE)) {
6
					preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
6
					reportPage.add(new MenuInfo(item.getStaticLabel(), name));
7
				}
7
				}
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.4
Clones locationClones are in the same method
Number of node comparisons14
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.6
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    39
    if (categories.contains(POST_PROCESSORS))
    39
    if (categories.contains(POST_PROCESSORS))
    51
    if (categories.contains(TABLES))
    Differences
    Expression1Expression2Difference
    POST_PROCESSORSTABLESVARIABLE_NAME_MISMATCH
    51
    if (categories.contains(TABLES))
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    40
    postProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    postProcessorstablesVARIABLE_NAME_MISMATCH
    52
    tables.add(new MenuInfo(item.getStaticLabel(), name));
    41
    if (categories.contains(PRE_PROCESSORS))
    41
    if (categories.contains(PRE_PROCESSORS))
    53
    if (categories.contains(REPORT_PAGE))
    Differences
    Expression1Expression2Difference
    PRE_PROCESSORSREPORT_PAGEVARIABLE_NAME_MISMATCH
    53
    if (categories.contains(REPORT_PAGE))
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    42
    preProcessors.add(new MenuInfo(item.getStaticLabel(), name));
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    Differences
    Expression1Expression2Difference
    preProcessorsreportPageVARIABLE_NAME_MISMATCH
    54
    reportPage.add(new MenuInfo(item.getStaticLabel(), name));
    Precondition Violations (0)
    Row Violation