SQLAliasSchemaDetailProperties buf = new SQLAliasSchemaDetailProperties(); buf.setSchemaName(schemaNames[i]); newDetails.add(buf);
PluginInfo pi = new PluginInfo(); pi.setPlugin(new MyPlaceHolderPlugin(internalName)); _plugins.add(pi);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/db/aliasproperties/SchemaTableModel.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/plugin/PluginManager.java
Method name: void updateSchemas(String[]) Method name: void checkPlugin(File, Map, List, boolean)
Number of AST nodes: 3 Number of AST nodes: 3
1
SQLAliasSchemaDetailProperties buf = new SQLAliasSchemaDetailProperties();
2
            buf.setSchemaName(schemaNames[i]);
3
            newDetail
1
PluginInfo pi = new PluginInfo();
2
					pi.setPlugin(new MyPlaceHolderPlugin(internalName));
4
s.add(buf);
3
					_plugins.add(pi);
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 in different classes
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
    10
    SQLAliasSchemaDetailProperties buf = new SQLAliasSchemaDetailProperties();
    10
    SQLAliasSchemaDetailProperties buf = new SQLAliasSchemaDetailProperties();
    Preondition Violations
    Unmatched statement SQLAliasSchemaDetailProperties buf=new SQLAliasSchemaDetailProperties(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
                                                                                                                                                            
    11
    buf.setSchemaName(schemaNames[i]);
    11
    buf.setSchemaName(schemaNames[i]);
    Preondition Violations
    Unmatched statement buf.setSchemaName(schemaNames[i]); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
                                                                                
                                                                          
    15
    PluginInfo pi = new PluginInfo();
                                                                                                                    
    16
    pi.setPlugin(new MyPlaceHolderPlugin(internalName));
    Preondition Violations
    Unmatched statement pi.setPlugin(new MyPlaceHolderPlugin(internalName)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    16
    pi.setPlugin(new MyPlaceHolderPlugin(internalName));
    12
    newDetails.add(buf);
    12
    newDetails.add(buf);
    17
    _plugins.add(pi);
    Differences
    Expression1Expression2Difference
    bufpiVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailPropertiesnet.sourceforge.squirrel_sql.client.plugin.PluginInfoVARIABLE_TYPE_MISMATCH
    newDetails_pluginsVARIABLE_NAME_MISMATCH
    java.util.ArrayListjava.util.ListVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties of variable buf does not match with type net.sourceforge.squirrel_sql.client.plugin.PluginInfo of variable pi
    • Make classes net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties and net.sourceforge.squirrel_sql.client.plugin.PluginInfo extend a common superclass
    Type java.util.ArrayList<net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties> of variable newDetails does not match with type java.util.List<net.sourceforge.squirrel_sql.client.plugin.PluginInfo> of variable _plugins
    • Make classes java.util.ArrayList and java.util.List extend a common superclass
    17
    _plugins.add(pi);
    Precondition Violations (6)
    Row Violation
    1Unmatched statement SQLAliasSchemaDetailProperties buf=new SQLAliasSchemaDetailProperties(); cannot be moved before or after the extracted code, because it has dependencies to/from statements that will be extracted
    2Unmatched statement buf.setSchemaName(schemaNames[i]); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    3Unmatched statement pi.setPlugin(new MyPlaceHolderPlugin(internalName)); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted
    4Type net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties of variable buf does not match with type net.sourceforge.squirrel_sql.client.plugin.PluginInfo of variable pi
    5Type java.util.ArrayList<net.sourceforge.squirrel_sql.client.gui.db.SQLAliasSchemaDetailProperties> of variable newDetails does not match with type java.util.List<net.sourceforge.squirrel_sql.client.plugin.PluginInfo> of variable _plugins
    6The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.client.gui.db.aliasproperties.SchemaTableModel and net.sourceforge.squirrel_sql.client.plugin.PluginManager do not have a common superclass