for (int i = 0; i < _iAliasPropertiesPanelControllers.size(); i++) { IAliasPropertiesPanelController aliasPropertiesController = _iAliasPropertiesPanelControllers.get(i); aliasPropertiesController.applyChanges(); } performClose();
for (int i = 0; i < tokenListeners.size(); i++) { SQLTokenListener tl = tokenListeners.elementAt(i); syntax.addSQLTokenListener(tl); }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/AliasPropertiesController.java File path: /sql12/plugins/syntax/src/net/sourceforge/squirrel_sql/plugins/syntax/netbeans/SyntaxFactory.java
Method name: void onOK() Method name: Syntax getSyntax(Document)
Number of AST nodes: 4 Number of AST nodes: 3
1
for (int i = 0; i < _iAliasPropertiesPanelControllers.size(); i++)
1
for (int i = 0; i < 
2
      {
3
         IAliasPropertiesPanelController aliasPropertiesController = _iAliasPropertiesPanelControllers.get(i);
4
         aliasPropertiesController.applyChanges();
5
      }
6
      performClose();
2
tokenListeners.size(); i++)
3
			{
4
				SQLTokenListener tl = tokenListeners.elementAt(i);
5
				syntax.addSQLTokenListener(tl);
6
			}
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.6
Clones locationClones are in different classes
Number of node comparisons9
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements1
    Number of unmapped statements in the first code fragment3
    Number of unmapped statements in the second code fragment2
    Time elapsed for statement mapping (ms)1.3
    Clone typeType 3
    Mapped Statements
    ID Statement ID Statement
    1
    for (int i = 0; i < _iAliasPropertiesPanelControllers.size(); i++)
    1
    for (int i = 0; i < _iAliasPropertiesPanelControllers.size(); i++)
    15
    for (int i = 0; i < tokenListeners.size(); i++)
    Differences
    Expression1Expression2Difference
    _iAliasPropertiesPanelControllerstokenListenersVARIABLE_NAME_MISMATCH
    java.util.ArrayListjava.util.VectorSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression _iAliasPropertiesPanelControllers cannot be unified with expression tokenListeners , because common superclass java.util.RandomAccess does not declare member(s) public int size()
    15
    for (int i = 0; i < tokenListeners.size(); i++)
    2
    IAliasPropertiesPanelController aliasPropertiesController = _iAliasPropertiesPanelControllers.get(i);
    2
    IAliasPropertiesPanelController aliasPropertiesController = _iAliasPropertiesPanelControllers.get(i);
    Preondition Violations
    Unmatched statement IAliasPropertiesPanelController aliasPropertiesController=_iAliasPropertiesPanelControllers.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                                                                                
    3
    aliasPropertiesController.applyChanges();
                                                                                            
                                                                                                            
    16
    SQLTokenListener tl = tokenListeners.elementAt(i);
    Preondition Violations
    Unmatched statement SQLTokenListener tl=tokenListeners.elementAt(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    16
    SQLTokenListener tl = tokenListeners.elementAt(i);
                                                                          
    17
    syntax.addSQLTokenListener(tl);
    4
    performClose();
                                        
    Precondition Violations (4)
    Row Violation
    1Expression _iAliasPropertiesPanelControllers cannot be unified with expression tokenListeners , because common superclass java.util.RandomAccess does not declare member(s) public int size()
    2Unmatched statement IAliasPropertiesPanelController aliasPropertiesController=_iAliasPropertiesPanelControllers.get(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    3Unmatched statement SQLTokenListener tl=tokenListeners.elementAt(i); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    4The refactoring of the clones is infeasible, because the number of macthed statements is equal to zero