if (!t.getBaseType().equals(BASETYPE.INTEGER)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Integer"); }
if (!t.getBaseType().equals(BASETYPE.STRING)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type String"); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java
Method name: void setInteger(String, String, int) Method name: void setString(String, String, String)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (!t.getBaseType().equals(BASETYPE.INTEGER)) {
1
if (!t.getBaseType().equals(BASETYPE.STRING)) {
2
			throw new IllegalArgumentException("attribute <" + theName + ","
2
			throw new IllegalArgumentException("attribute <" + theName + ","
3
					+ theNamespace + "> is not of type Integer");
3
					+ theNamespace + "> is not of type String");
4
		}
4
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are declared in the same class
Number of node comparisons4
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    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.8
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    2
    if (!t.getBaseType().equals(BASETYPE.INTEGER))
    2
    if (!t.getBaseType().equals(BASETYPE.INTEGER))
    2
    if (!t.getBaseType().equals(BASETYPE.STRING))
    Differences
    Expression1Expression2Difference
    INTEGERSTRINGVARIABLE_NAME_MISMATCH
    2
    if (!t.getBaseType().equals(BASETYPE.STRING))
    3
    throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Integer");
    3
    throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Integer");
    3
    throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type String");
    Differences
    Expression1Expression2Difference
    "> is not of type Integer""> is not of type String"LITERAL_VALUE_MISMATCH
    3
    throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type String");
    Precondition Violations (0)
    Row Violation