final String oldValue = _url; _url = data; getPropertyChangeReporter().firePropertyChange(IPropNames.URL, oldValue, _url);
final IIdentifier oldValue = _driverId; _driverId = data; getPropertyChangeReporter().firePropertyChange(IPropNames.DRIVER, oldValue, _driverId);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/SQLAlias.java
Method name: void setUrl(String) Method name: void setDriverIdentifier(IIdentifier)
Number of AST nodes: 3 Number of AST nodes: 3
1
final String oldValue = _url;
1
final IIdentifier oldValue = _driverId;
2
         _url = data;
2
         _driverId = data;
3
         getPropertyChangeReporter().firePropertyChange(IPropNames.URL,
3
         getPropertyChangeReporter().firePropertyChange(IPropNames.
4
   
4
DRIVER,
5
                                    oldValue, _url);
5
                                    oldValue, _driverId);
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 declared in the same class
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    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.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
                                                                                    
    4
    final IIdentifier oldValue = _driverId;
                                        
    5
    _driverId = data;
    Preondition Violations
    Unmatched statement _driverId=data; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    5
    _driverId = data;
    5
    final String oldValue = _url;
                                                                
    6
    _url = data;
    6
    _url = data;
    Preondition Violations
    Unmatched statement _url=data; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                              
    7
    getPropertyChangeReporter().firePropertyChange(IPropNames.URL, oldValue, _url);
    7
    getPropertyChangeReporter().firePropertyChange(IPropNames.URL, oldValue, _url);
    6
    getPropertyChangeReporter().firePropertyChange(IPropNames.DRIVER, oldValue, _driverId);
    Differences
    Expression1Expression2Difference
    URLDRIVERVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    _url_driverIdVARIABLE_NAME_MISMATCH
    java.lang.Stringnet.sourceforge.squirrel_sql.fw.id.IIdentifierVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type java.lang.String of variable oldValue does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable oldValue
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    Type java.lang.String of variable _url does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable _driverId
    • Make classes java.lang.String and net.sourceforge.squirrel_sql.fw.id.IIdentifier extend a common superclass
    6
    getPropertyChangeReporter().firePropertyChange(IPropNames.DRIVER, oldValue, _driverId);
    Precondition Violations (4)
    Row Violation
    1Unmatched statement _driverId=data; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    2Unmatched statement _url=data; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Type java.lang.String of variable oldValue does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable oldValue
    4Type java.lang.String of variable _url does not match with type net.sourceforge.squirrel_sql.fw.id.IIdentifier of variable _driverId