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.3
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)1.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
    writeIntwriteBooleanMETHOD_INVOCATION_NAME_MISMATCH
    intValuebooleanValueMETHOD_INVOCATION_NAME_MISMATCH
    intbooleanVARIABLE_TYPE_MISMATCH
    java.lang.Integerjava.lang.BooleanVARIABLE_TYPE_MISMATCH
    Preondition Violations
    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 ((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 of variable (Integer)o does not match with type java.lang.Boolean of variable (Boolean)o
    • Make classes java.lang.Integer and java.lang.Boolean extend a common superclass
    22
    out.writeBoolean(((Boolean)o).booleanValue());
    Precondition Violations (8)
    Row Violation
    1Expression out.writeInt(((Integer)o).intValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression out.writeBoolean(((Boolean)o).booleanValue()) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression ((Integer)o).intValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression ((Boolean)o).booleanValue() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Type int of variable ((Integer)o).intValue() does not match with type boolean of variable ((Boolean)o).booleanValue()
    6Expression (Integer)o cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression (Boolean)o cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Type java.lang.Integer of variable (Integer)o does not match with type java.lang.Boolean of variable (Boolean)o