Object testObject = getEqualsTestObject(); mockHelper.replayAll(); if (isEditableInPopup) { assertTrue(classUnderTest.isEditableInPopup(testObject)); assertTrue(classUnderTest.isEditableInPopup(null)); } else { assertFalse(classUnderTest.isEditableInPopup(testObject)); assertFalse(classUnderTest.isEditableInPopup(null)); } mockHelper.verifyAll();
Object testObject = getEqualsTestObject(); mockHelper.replayAll(); if (isEditableInCell) { assertTrue(classUnderTest.isEditableInCell(testObject)); assertTrue(classUnderTest.isEditableInCell(null)); } else { assertFalse(classUnderTest.isEditableInCell(testObject)); assertFalse(classUnderTest.isEditableInCell(null)); } mockHelper.verifyAll();
Clone fragments detected by clone detection tool
File path: /sql12/test/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/AbstractDataTypeComponentTest.java File path: /sql12/test/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/AbstractDataTypeComponentTest.java
Method name: void testIsEditableInPopup() Method name: void testIsEditableInCell()
Number of AST nodes: 8 Number of AST nodes: 8
1
Object testObject = getEqualsTestObject();
1
Object testObject = getEqualsTestObject();
2
		
2
		
3
mockHelper.replayAll();
3
		mockHelper.replayAll();
4
		if (isEditableInPopup)
4
		if (isEditableInCell)
5
		{
5
		{
6
			assertTrue(classUnderTest.isEditableInPopup(testObject));
6
			assertTrue(classUnderTest.isEditableInCell(testObject));
7
			assertTrue(classUnderTest.isEditableInPopup(null));
7
			assertTrue(classUnderTest.isEditableInCell(null));
8
		}
8
		}
9
		else
9
		else
10
		{
10
		{
11
			assertFalse(classUnderTest.isEditableInPopup(testObject));
11
			assertFalse(classUnderTest.isEditableInCell(testObject));
12
			assertFalse(classUnderTest.isEditableInPopup(null));
12
			assertFalse(classUnderTest.isEditableInCell(null));
13
		}
13
		}
14
		mockHelper.verifyAll();
14
		mockHelper.verifyAll();
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.1
Clones locationClones are declared in the same class
Number of node comparisons34
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)12.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    Object testObject = getEqualsTestObject();
    1
    Object testObject = getEqualsTestObject();
    2
    mockHelper.replayAll();
    2
    mockHelper.replayAll();
    3
    if (isEditableInPopup)
    3
    if (isEditableInPopup)
    3
    if (isEditableInCell)
    Differences
    Expression1Expression2Difference
    isEditableInPopupisEditableInCellVARIABLE_NAME_MISMATCH
    3
    if (isEditableInCell)
    4
    assertTrue(classUnderTest.isEditableInPopup(testObject));
    4
    assertTrue(classUnderTest.isEditableInPopup(testObject));
    4
    assertTrue(classUnderTest.isEditableInCell(testObject));
    Differences
    Expression1Expression2Difference
    isEditableInPopupisEditableInCellMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression classUnderTest.isEditableInPopup(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression classUnderTest.isEditableInCell(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4
    assertTrue(classUnderTest.isEditableInCell(testObject));
    5
    assertTrue(classUnderTest.isEditableInPopup(null));
    5
    assertTrue(classUnderTest.isEditableInPopup(null));
    5
    assertTrue(classUnderTest.isEditableInCell(null));
    Differences
    Expression1Expression2Difference
    isEditableInPopupisEditableInCellMETHOD_INVOCATION_NAME_MISMATCH
    5
    assertTrue(classUnderTest.isEditableInCell(null));
    else
    else
    6
    assertFalse(classUnderTest.isEditableInPopup(testObject));
    6
    assertFalse(classUnderTest.isEditableInPopup(testObject));
    6
    assertFalse(classUnderTest.isEditableInCell(testObject));
    Differences
    Expression1Expression2Difference
    isEditableInPopupisEditableInCellMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression classUnderTest.isEditableInPopup(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression classUnderTest.isEditableInCell(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6
    assertFalse(classUnderTest.isEditableInCell(testObject));
    7
    assertFalse(classUnderTest.isEditableInPopup(null));
    7
    assertFalse(classUnderTest.isEditableInPopup(null));
    7
    assertFalse(classUnderTest.isEditableInCell(null));
    Differences
    Expression1Expression2Difference
    isEditableInPopupisEditableInCellMETHOD_INVOCATION_NAME_MISMATCH
    7
    assertFalse(classUnderTest.isEditableInCell(null));
    8
    mockHelper.verifyAll();
    8
    mockHelper.verifyAll();
    Precondition Violations (4)
    Row Violation
    1Expression classUnderTest.isEditableInPopup(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression classUnderTest.isEditableInCell(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression classUnderTest.isEditableInPopup(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression classUnderTest.isEditableInCell(testObject) cannot be parameterized, because it has dependencies to/from statements that will be extracted