boolean result = true; DatabaseObjectType type = info.getDatabaseObjectType(); if (type.getName().equalsIgnoreCase("catalog") || type.getName().equalsIgnoreCase("database")) { result = false; } return result;
boolean result = true; final DatabaseObjectType type = info.getDatabaseObjectType(); if (type.getName().equalsIgnoreCase("database")) { result = false; } return result;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/FrontBaseDialectExt.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/dialects/DaffodilDialectExt.java
Method name: boolean canPasteTo(IDatabaseObjectInfo) Method name: boolean canPasteTo(IDatabaseObjectInfo)
Number of AST nodes: 5 Number of AST nodes: 5
1
boolean result = true;
1
boolean result = true;
2
		DatabaseObjectType type = info.getDatabaseObjectType();
2
		final DatabaseObjectType type = info.getDatabaseObjectType();
3
		if (type.getName().equalsIgnoreCase("catalog") || type.getName().equalsIgnoreCase("database"))
3
		if (type.getName().equalsIgnoreCase("database"))
4
		{
4
		{
5
			result = false;
5
			result = false;
6
		}
6
		}
7
		return result;
7
		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 in different classes having the same super class
Number of node comparisons10
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment3
    Time elapsed for statement mapping (ms)0.9
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    boolean result = true;
    1
    boolean result = true;
                                                                                                                                
    2
    final DatabaseObjectType type = info.getDatabaseObjectType();
    2
    DatabaseObjectType type = info.getDatabaseObjectType();
                                                                                                                    
                                                                                                        
    3
    if (type.getName().equalsIgnoreCase("database"))
                                    
    4
    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
    4
    result = false;
    3
    if (type.getName().equalsIgnoreCase("catalog") || type.getName().equalsIgnoreCase("database"))
                                                                                                                                                                                                    
    4
    result = false;
    4
    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
                                    
    5
    return result;
    5
    return result;
    Precondition Violations (2)
    Row Violation
    1Unmatched statement result=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement result=false; cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted