if (o == null) { out.writeInt(0); } else { out.writeInt(((Integer) o).intValue()); }
if (columnTypes[j] == Boolean.class) { if( o == null) { out.writeBoolean(false); } else { out.writeBoolean(((Boolean) o).booleanValue()); } }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/POP3HeaderBinding.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/pop3/POP3HeaderBinding.java
Method name: void objectToEntry(Object, TupleOutput) Method name: void objectToEntry(Object, TupleOutput)
Number of AST nodes: 3 Number of AST nodes: 4
1
if (
1
if (columnTypes[j] == Boolean.class) {
2
o == null) {
2
				if( o == null) {
3
					out.writeInt(0);
3
					out.writeBoolean(false);
4
				} else {
4
				} else {
5
					out.writeInt(((Integer) o).intValue());
5
					out.writeBoolean(((Boolean) o).booleanValue());
6
				}
6
				}
7
			}
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.5
Clones locationClones are in the same method
Number of node comparisons11
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment1
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)2.2
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    if (o == null)
    20
    if (o == null)
    9
    out.writeInt(0);
                                          
                                                            
    21
    out.writeBoolean(false);
    else
    else
    10
    out.writeInt(((Integer)o).intValue());
    10
    out.writeInt(((Integer)o).intValue());
    22
    out.writeBoolean(((Boolean)o).booleanValue());
    Differences
    Expression1Expression2Difference
    intValuebooleanValueMETHOD_INVOCATION_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    java.lang.Integerjava.lang.BooleanVARIABLE_TYPE_MISMATCH
    writeIntwriteBooleanMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression ((Integer)o).intValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression ((Boolean)o).booleanValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type int of variable ((Integer)o).intValue() does not match with type boolean of variable ((Boolean)o).booleanValue()
    Expression (Integer)o cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression (Boolean)o cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Type java.lang.Integer does not match with type java.lang.Boolean
    • Make classes java.lang.Integer and java.lang.Boolean extend a common superclass
    Expression out.writeInt(((Integer)o).intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression out.writeBoolean(((Boolean)o).booleanValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression out.writeInt(((Integer)o).intValue()) is a void method call, and thus it cannot be parameterized
    Expression out.writeBoolean(((Boolean)o).booleanValue()) is a void method call, and thus it cannot be parameterized
    22
    out.writeBoolean(((Boolean)o).booleanValue());
    Precondition Violations (10)
    Row Violation
    1Expression ((Integer)o).intValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression ((Boolean)o).booleanValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Type int of variable ((Integer)o).intValue() does not match with type boolean of variable ((Boolean)o).booleanValue()
    4Expression (Integer)o cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression (Boolean)o cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Type java.lang.Integer does not match with type java.lang.Boolean
    7Expression out.writeInt(((Integer)o).intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression out.writeBoolean(((Boolean)o).booleanValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    9Expression out.writeInt(((Integer)o).intValue()) is a void method call, and thus it cannot be parameterized
    10Expression out.writeBoolean(((Boolean)o).booleanValue()) is a void method call, and thus it cannot be parameterized