if (value == null) { pstmt.setNull(position, _colDef.getSqlType()); } else { pstmt.setInt(position, ((Short)value).intValue()); }
if (value == null) { pstmt.setNull(position, _colDef.getSqlType()); } else { pstmt.setLong(position, ((Long)value).longValue()); }
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeShort.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeLong.java
Method name: void setPreparedStatementValue(PreparedStatement, Object, int) Method name: void setPreparedStatementValue(PreparedStatement, Object, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
if (value == null) {
1
if (value == null) {
2
			pstmt.setNull(position, _colDef.getSqlType());
2
			pstmt.setNull(position, _colDef.getSqlType());
3
		}
3
		}
4
		else {
4
		else {
5
			pstmt.setInt(position, ((Short)value).intValue());
5
			pstmt.setLong(position, ((Long)value).longValue());
6
		}
6
		}
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 in different classes having the same super class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)10.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (value == null)
    1
    if (value == null)
    2
    pstmt.setNull(position, _colDef.getSqlType());
    2
    pstmt.setNull(position, _colDef.getSqlType());
    else
    else
    3
    pstmt.setInt(position, ((Short)value).intValue());
    3
    pstmt.setInt(position, ((Short)value).intValue());
    3
    pstmt.setLong(position, ((Long)value).longValue());
    Differences
    Expression1Expression2Difference
    intValuelongValueMETHOD_INVOCATION_NAME_MISMATCH
    intlongVARIABLE_TYPE_MISMATCH
    java.lang.Shortjava.lang.LongSUBCLASS_TYPE_MISMATCH
    setIntsetLongMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression ((Short)value).intValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((Long)value).longValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type int of variable ((Short)value).intValue() does not match with type long of variable ((Long)value).longValue()
    Expression (Short)value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (Long)value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pstmt.setInt(position,((Short)value).intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pstmt.setLong(position,((Long)value).longValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression pstmt.setInt(position,((Short)value).intValue()) is a void method call, and thus it cannot be parameterized
    Expression pstmt.setLong(position,((Long)value).longValue()) is a void method call, and thus it cannot be parameterized
    3
    pstmt.setLong(position, ((Long)value).longValue());
    Precondition Violations (9)
    Row Violation
    1Expression ((Short)value).intValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ((Long)value).longValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type int of variable ((Short)value).intValue() does not match with type long of variable ((Long)value).longValue()
    4Expression (Short)value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression (Long)value cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression pstmt.setInt(position,((Short)value).intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression pstmt.setLong(position,((Long)value).longValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression pstmt.setInt(position,((Short)value).intValue()) is a void method call, and thus it cannot be parameterized
    9Expression pstmt.setLong(position,((Long)value).longValue()) is a void method call, and thus it cannot be parameterized