mockHelper.replayAll(); assertFalse(classUnderTest.isEditableInCell("")); assertFalse(classUnderTest.isEditableInCell(null)); mockHelper.verifyAll();
mockHelper.replayAll(); assertNotNull(classUnderTest.getString(null)); mockHelper.verifyAll();
Clone fragments detected by clone detection tool
File path: /sql12/test/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeOtherTest.java File path: /sql12/test/src/net/sourceforge/squirrel_sql/fw/util/AbstractResourcesTest.java
Method name: void testIsEditableInCell() Method name: void testGetString_nullArg()
Number of AST nodes: 4 Number of AST nodes: 3
1
mockHelper.replayAll();
1
mockHelper.replayAll();
2
		assertFalse(classUnderTest.isEditableInCell(""));
2
		assertNotNull(classUnderTest.
3
		assertFalse(classUnderTest.isEditableInCell(null));
3
getString(null));
4
		mockHelper.verifyAll();
4
		mockHelper.verifyAll();
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 having the same super class
Number of node comparisons12
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    mockHelper.replayAll();
    1
    mockHelper.replayAll();
    2
    assertFalse(classUnderTest.isEditableInCell(""));
                                                                                                            
    3
    assertFalse(classUnderTest.isEditableInCell(null));
    3
    assertFalse(classUnderTest.isEditableInCell(null));
    2
    assertNotNull(classUnderTest.getString(null));
    Differences
    Expression1Expression2Difference
    isEditableInCellgetStringMETHOD_INVOCATION_NAME_MISMATCH
    booleanjava.lang.StringVARIABLE_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IDataTypeComponentnet.sourceforge.squirrel_sql.fw.util.ResourcesVARIABLE_TYPE_MISMATCH
    assertFalseassertNotNullMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Type boolean of variable classUnderTest.isEditableInCell(null) does not match with type java.lang.String of variable classUnderTest.getString(null)
    Type net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IDataTypeComponent of variable classUnderTest does not match with type net.sourceforge.squirrel_sql.fw.util.Resources of variable classUnderTest
    • Make classes net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IDataTypeComponent and net.sourceforge.squirrel_sql.fw.util.Resources extend a common superclass
    Expression assertFalse(classUnderTest.isEditableInCell(null)) is a void method call, and thus it cannot be parameterized
    Expression assertNotNull(classUnderTest.getString(null)) is a void method call, and thus it cannot be parameterized
    2
    assertNotNull(classUnderTest.getString(null));
    4
    mockHelper.verifyAll();
    3
    mockHelper.verifyAll();
    Precondition Violations (4)
    Row Violation
    1Type boolean of variable classUnderTest.isEditableInCell(null) does not match with type java.lang.String of variable classUnderTest.getString(null)
    2Type net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.IDataTypeComponent of variable classUnderTest does not match with type net.sourceforge.squirrel_sql.fw.util.Resources of variable classUnderTest
    3Expression assertFalse(classUnderTest.isEditableInCell(null)) is a void method call, and thus it cannot be parameterized
    4Expression assertNotNull(classUnderTest.getString(null)) is a void method call, and thus it cannot be parameterized