setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP)); setBorder(makeBorder()); add(makeTitlePanel()); style = new JCheckBox(JMeterUtils.getResString("ignore_subcontrollers")); // $NON-NLS-1$ add(style);
params.add(new CompoundVariable("YMD")); variable.setParameters(params); value = variable.execute(result, null); assertEquals(8,value.length()); assertNull(vars.get("NAME"));
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/control/gui/RandomControlGui.java File path: /jakarta-jmeter-2.3.2/test/src/org/apache/jmeter/functions/TestTimeFunction.java
Method name: void init() Method name: void testYMDnoV()
Number of AST nodes: 5 Number of AST nodes: 5
1
setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
2
		setBorder(makeBorder());
3
		add(makeTitlePanel());
4
		style = new JCheckBox(JMeterUtils.getResString("igno
1
params.add(new CompoundVariable("YMD"));
2
            variable.setParameters(params);
5
re_subcontrollers")); // $NON-NLS-1$
3
            value = variable.execute(resu
6
		add(style
4
lt, null);
5
            assertEquals(8,value.length());
7
);
6
            assertNull(vars.get("NAME"));
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
Number of node comparisons25
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment4
    Number of unmapped statements in the second code fragment4
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                          
    1
    params.add(new CompoundVariable("YMD"));
                                                                        
    2
    variable.setParameters(params);
    1
    setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
    1
    setLayout(new VerticalLayout(5, VerticalLayout.BOTH, VerticalLayout.TOP));
    4
    assertEquals(8, value.length());
    Differences
    Expression1Expression2Difference
    setLayoutassertEqualsMETHOD_INVOCATION_NAME_MISMATCH
    setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP))assertEquals(8,value.length())ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(8,value.length()) is a void method call, and thus it cannot be parameterized
    Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized
    Expression assertEquals(8,value.length()) is a void method call, and thus it cannot be parameterized
    4
    assertEquals(8, value.length());
    2
    setBorder(makeBorder());
                                                          
                                                                                  
    3
    value = variable.execute(result, null);
    3
    add(makeTitlePanel());
                                                      
    4
    style = new JCheckBox(JMeterUtils.getResString("ignore_subcontrollers"));
                                                                                                                                                        
                                                                    
    5
    assertNull(vars.get("NAME"));
    5
    add(style);
                                
    Precondition Violations (4)
    Row Violation
    1Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized
    2Expression assertEquals(8,value.length()) is a void method call, and thus it cannot be parameterized
    3Expression setLayout(new VerticalLayout(5,VerticalLayout.BOTH,VerticalLayout.TOP)) is a void method call, and thus it cannot be parameterized
    4Expression assertEquals(8,value.length()) is a void method call, and thus it cannot be parameterized