IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); if (dataTypeObject != null) return dataTypeObject.needToReRead(originalValue); // default - if we do not know the data type, then we cannot re-read it return false;
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef); if (dataTypeObject != null) return dataTypeObject.getDefaultValue(dbDefaultValue); // there was no data type object, so this data type is unknown // to squirrel and thus cannot be edited. return null;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/CellComponentFactory.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/CellComponentFactory.java
Method name: boolean needToReRead(ColumnDisplayDefinition, Object) Method name: Object getDefaultValue(ColumnDisplayDefinition, String)
Number of AST nodes: 4 Number of AST nodes: 4
1
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
1
IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
2
		
3
		
4
if (dataTypeObject != null)
2
      if (dataTypeObject != null)
5
			return dataTypeObject.needToReRead(originalValue);
3
         return dataTypeObject.
6
		
7
		// default - if we do not know
4
getDefaultValue(dbDefaultValue);
8
 the data type, then we cannot re-read it
5
      // there was no data type object, so this data type
9
		
6
 is unknown
7
      // to squirrel and thus cannot be edited.
10
return false;
8
      return null;
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.1
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.5
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
    1
    IDataTypeComponent dataTypeObject = getDataTypeObject(null, colDef);
    2
    if (dataTypeObject != null)
    2
    if (dataTypeObject != null)
                                                                                                                      
    3
    return dataTypeObject.getDefaultValue(dbDefaultValue);
    Preondition Violations
    Unmatched statement return dataTypeObject.getDefaultValue(dbDefaultValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return dataTypeObject.getDefaultValue(dbDefaultValue);
    3
    return dataTypeObject.getDefaultValue(dbDefaultValue);
    3
    return dataTypeObject.needToReRead(originalValue);
    3
    return dataTypeObject.needToReRead(originalValue);
    Preondition Violations
    Unmatched statement return dataTypeObject.needToReRead(originalValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    Unmatched return dataTypeObject.needToReRead(originalValue);
                                                                                                              
                                  
    4
    return null;
    Preondition Violations
    Unmatched return null;
    4
    return null;
    4
    return false;
    4
    return false;
    Preondition Violations
    Unmatched return false;
                                    
    Precondition Violations (6)
    Row Violation
    1Unmatched statement return dataTypeObject.getDefaultValue(dbDefaultValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched return dataTypeObject.getDefaultValue(dbDefaultValue);
    3Unmatched statement return dataTypeObject.needToReRead(originalValue); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Unmatched return dataTypeObject.needToReRead(originalValue);
    5Unmatched return null;
    6Unmatched return false;