IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); if (dataTypeObject != null) return dataTypeObject.areEqual(newValue, oldValue); // we should never get here because the areEqual function is only // called when we are trying to update the database, so we know // that we have a DataType object for this column (or we would // have been stopped from editing by the isEditableXXX methods), // but we need a return here to keep the compiler happy. return false;
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); if (dataTypeObject != null) return dataTypeObject.needToReRead(originalValue); // default - if we do not know the data type, then we cannot re-read it return false;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/CellComponentFactory.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/CellComponentFactory.java
Method name: boolean areEqual(ColumnDisplayDefinition, Object, Object) Method name: boolean needToReRead(ColumnDisplayDefinition, Object)
Number of AST nodes: 4 Number of AST nodes: 4
1
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
1
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
2
		
2
		
3
if (dataTypeObject != null)
3
		if (dataTypeObject != null)
4
			return dataTypeObject.areEqual(newValue, oldValue);
4
			return dataTypeObject.
5
		
6
		// we should never get here because the areEqual function is only
7
		// called when we are trying to update the database, so we know
8
		// that we have a DataType object for this column (or we would
9
		// have been stopped from editing by the isEditableXXX methods),
10
		// but we need a return here to keep the compiler happy.
5
needToReRead(originalValue);
6
		
7
		// default - if we do not know the data type, then we cannot re-read it
11
		return false;
8
		return false;
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.1
Clones locationClones are declared in the same class
Number of node comparisons8
  1. {Non-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)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
    1
    IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
    2
    if (dataTypeObject != null)
    2
    if (dataTypeObject != null)
    3
    return dataTypeObject.areEqual(newValue, oldValue);
    3
    return dataTypeObject.areEqual(newValue, oldValue);
    3
    return dataTypeObject.needToReRead(originalValue);
    Differences
    Expression1Expression2Difference
    areEqualneedToReReadMETHOD_INVOCATION_NAME_MISMATCH
    dataTypeObject.areEqual(newValue,oldValue)dataTypeObject.needToReRead(originalValue)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression dataTypeObject.areEqual(newValue,oldValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression dataTypeObject.needToReRead(originalValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression dataTypeObject.areEqual(newValue,oldValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression dataTypeObject.needToReRead(originalValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    return dataTypeObject.needToReRead(originalValue);
    4
    return false;
    4
    return false;
    Precondition Violations (4)
    Row Violation
    1Expression dataTypeObject.areEqual(newValue,oldValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression dataTypeObject.needToReRead(originalValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression dataTypeObject.areEqual(newValue,oldValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression dataTypeObject.needToReRead(originalValue) cannot be parameterized, because it has dependencies to/from statements that will be extracted