int idx = arg0 - 1; if (_infos == null || _infos.length <= 0 || idx >= _infos.length) { return null; } return _infos[idx].getTypeName();
int idx = arg0 - 1; if (_infos == null || _infos.length <= 0 || idx >= _infos.length) { return 0; } return _infos[arg0].getColumnSize();
Clone fragments detected by clone detection tool
File path: /sql12/test/mockobjects/net/sourceforge/squirrel_sql/mo/sql/MockResultSetMetaData.java File path: /sql12/test/mockobjects/net/sourceforge/squirrel_sql/mo/sql/MockResultSetMetaData.java
Method name: String getColumnTypeName(int) Method name: int getPrecision(int)
Number of AST nodes: 4 Number of AST nodes: 4
1
int idx = arg0 - 1;        
1
int idx = arg0 - 1;                
2
		if (_infos == null || _infos.length <= 0 || idx >= _infos.length) {
2
		if (_infos == null || _infos.length <= 0 || idx >= _infos.length) {
3
			return null;
3
			return 0;
4
		}
4
		}
5
		return _infos[idx].getTypeName();
5
		return _infos[arg0].getColumnSize();
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 declared in the same class
Number of node comparisons8
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment2
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)0.7
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    int idx = arg0 - 1;
    1
    int idx = arg0 - 1;
    2
    if (_infos == null || _infos.length <= 0 || idx >= _infos.length)
    2
    if (_infos == null || _infos.length <= 0 || idx >= _infos.length)
                            
    3
    return 0;
    Preondition Violations
    Unmatched return 0;
    3
    return 0;
    3
    return null;
    3
    return null;
    Preondition Violations
    Unmatched return null;
                                  
                                                                                  
    4
    return _infos[arg0].getColumnSize();
    Preondition Violations
    Unmatched return _infos[arg0].getColumnSize();
    4
    return _infos[arg0].getColumnSize();
    4
    return _infos[idx].getTypeName();
    4
    return _infos[idx].getTypeName();
    Preondition Violations
    Unmatched statement return _infos[idx].getTypeName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    Unmatched return _infos[idx].getTypeName();
                                                                            
    Precondition Violations (6)
    Row Violation
    1Unmatched return 0;
    2Unmatched return null;
    3Unmatched return _infos[arg0].getColumnSize();
    4Unmatched statement return _infos[idx].getTypeName(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched return _infos[idx].getTypeName();
    6Clone fragment #1 returns variables idx , while Clone fragment #2 returns variables