boolean result = false; switch (jdbcType) { case Types.LONGVARBINARY: case Types.LONGVARCHAR: case Types.BLOB: case Types.CLOB: result = true; break; default: result = false; } return result;
boolean result = false; switch (jdbcType) { case Types.DATE: case Types.TIME: case Types.TIMESTAMP: result = true; break; default: result = false; } return result;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/JDBCTypeMapper.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/sql/JDBCTypeMapper.java
Method name: boolean isLongType(int) Method name: boolean isDateType(int)
Number of AST nodes: 11 Number of AST nodes: 10
1
boolean result = false;
1
boolean result = false;
2
		switch (jdbcType)
2
		switch (jdbcType)
3
		{
3
		{
4
		case Types.LONGVARBINARY:
4
		case Types.
5
		case Types.LONGVARCHAR:
5
DATE:
6
		case Types.BLOB:
6
		case Types.TIME:
7
		case Types.CLOB:
7
		case Types.TIMESTAMP:
8
			result = true;
8
			result = true;
9
			break;
9
			break;
10
		default:
10
		default:
11
			result = false;
11
			result = false;
12
		}
12
		}
13
		return result;
13
		return result;
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.1
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment9
    Number of unmapped statements in the second code fragment8
    Time elapsed for statement mapping (ms)1.1
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    boolean result = false;
    1
    boolean result = false;
                                          
    2
    switch (jdbcType)
                                          
    3
    case Types.DATE:
                                          
    4
    case Types.TIME:
                                                    
    5
    case Types.TIMESTAMP:
                                  
    6
    result = true;
    Preondition Violations
    Unmatched statement result=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    6
    result = true;
                      
    7
    break;
    Preondition Violations
    Unmatched break;
    7
    break;
                            
    8
    default:
                                    
    9
    result = false;
    Preondition Violations
    Unmatched statement result=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    9
    result = false;
    2
    switch (jdbcType)
                                          
    3
    case Types.LONGVARBINARY:
                                                            
    4
    case Types.LONGVARCHAR:
                                                        
    5
    case Types.BLOB:
                                          
    6
    case Types.CLOB:
                                          
    7
    result = true;
    7
    result = true;
    Preondition Violations
    Unmatched statement result=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                  
    8
    break;
    8
    break;
    Preondition Violations
    Unmatched break;
                      
    9
    default:
                            
    10
    result = false;
    10
    result = false;
    Preondition Violations
    Unmatched statement result=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                      
    11
    return result;
    10
    return result;
    Precondition Violations (6)
    Row Violation
    1Unmatched statement result=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched break;
    3Unmatched statement result=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4Unmatched statement result=true; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    5Unmatched break;
    6Unmatched statement result=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted