this.technicalName = technicalName; this.name = name; this.title = title; this.description = description;
this.number = number; this.type = type; if (type >= NAMES.length) throw new IllegalArgumentException("unsupported type");
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/search/SearchCriteria.java File path: /columba-1.4-src/contact/src/main/java/org/columba/addressbook/model/PhoneModel.java
Method name: void SearchCriteria(String, String, String, String) Method name: void PhoneModel(String, int)
Number of AST nodes: 4 Number of AST nodes: 4
1
this.technicalName = technicalName;
1
this.number = number;
2
		this.name = name;
2
		this.type = type;
3
		this.title = title;
3
		
4
		this.description = description
4
if (type >= NAMES.length)
5
;
5
			throw new IllegalArgumentException("unsupported type");
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.0
Clones locationClones are in different classes
Number of node comparisons7
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment1
    Time elapsed for statement mapping (ms)0.0
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    this.technicalName = technicalName;
    1
    this.technicalName = technicalName;
    1
    this.number = number;
    Differences
    Expression1Expression2Difference
    technicalNamenumberVARIABLE_NAME_MISMATCH
    technicalNamenumberVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression this.technicalName is a field being modified, and thus it cannot be parameterized
    Expression this.number is a field being modified, and thus it cannot be parameterized
    1
    this.number = number;
                                        
    2
    this.type = type;
    Preondition Violations
    Unmatched statement this.type=type; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2
    this.type = type;
    2
    this.name = name;
    2
    this.name = name;
    Preondition Violations
    Unmatched statement this.name=name; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                        
    3
    this.title = title;
    3
    this.title = title;
    Preondition Violations
    Unmatched statement this.title=title; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                            
    4
    this.description = description;
    4
    this.description = description;
    Preondition Violations
    Unmatched statement this.description=description; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                    
    Precondition Violations (6)
    Row Violation
    1Expression this.technicalName is a field being modified, and thus it cannot be parameterized
    2Expression this.number is a field being modified, and thus it cannot be parameterized
    3Unmatched statement this.type=type; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched statement this.name=name; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5Unmatched statement this.title=title; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    6Unmatched statement this.description=description; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted