super(); if (session == null) { throw new IllegalArgumentException("Null ISession passed"); } if (plugin == null) { throw new IllegalArgumentException("Null IPlugin passed"); } this.frame = frame; this.session = session; this.plugin = plugin;
super(); if (session == null) { throw new IllegalArgumentException("Null ISession passed"); } if (plugin == null) { throw new IllegalArgumentException("Null IPlugin passed"); } this.frame = frame; this.session = session; this.plugin = plugin;
Clone fragments detected by clone detection tool
File path: /sql12/plugins/sqlbookmark/src/net/sourceforge/squirrel_sql/plugins/sqlbookmark/AddBookmarkCommand.java File path: /sql12/plugins/isqlj/src/org/rege/isqlj/squirrel/ExecuteISqlJCommand.java
Method name: void AddBookmarkCommand(Frame, ISession, SQLBookmarkPlugin) Method name: void ExecuteISqlJCommand(Frame, ISession, ISqlJPlugin)
Number of AST nodes: 8 Number of AST nodes: 8
1
super();
1
super();
2
        if (session == null) 
2
        if (session == null) 
3
{
3
		{
4
            throw new IllegalArgumentException("Null ISession passed");
4
            throw new IllegalArgumentException("Null ISession passed");
5
        }
5
        }
6
        if (plugin == null) 
6
        if (plugin == null) 
7
{
7
		{
8
            throw new IllegalArgumentException("Null IPlugin passed");
8
            throw new IllegalArgumentException("Null IPlugin passed");
9
        }
9
        }
10
        this.frame = frame;
10
        this.frame = frame;
11
        this.session = session;
11
        this.session = session;
12
        this.plugin = plugin;
12
        this.plugin = plugin;
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.3
Clones locationClones are in different classes
Number of node comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements8
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    super();
    1
    super();
    1
    super();
    Preondition Violations
    Super constructor call super(); cannot be extracted from constructor
    Super constructor call super(); cannot be extracted from constructor
    1
    super();
    2
    if (session == null)
    2
    if (session == null)
    3
    throw new IllegalArgumentException("Null ISession passed");
    3
    throw new IllegalArgumentException("Null ISession passed");
    4
    if (plugin == null)
    4
    if (plugin == null)
    4
    if (plugin == null)
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.sqlbookmark.SQLBookmarkPluginorg.rege.isqlj.squirrel.ISqlJPluginSUBCLASS_TYPE_MISMATCH
    4
    if (plugin == null)
    5
    throw new IllegalArgumentException("Null IPlugin passed");
    5
    throw new IllegalArgumentException("Null IPlugin passed");
    6
    this.frame = frame;
    6
    this.frame = frame;
    7
    this.session = session;
    7
    this.session = session;
    8
    this.plugin = plugin;
    8
    this.plugin = plugin;
    8
    this.plugin = plugin;
    Differences
    Expression1Expression2Difference
    net.sourceforge.squirrel_sql.plugins.sqlbookmark.SQLBookmarkPluginorg.rege.isqlj.squirrel.ISqlJPluginSUBCLASS_TYPE_MISMATCH
    net.sourceforge.squirrel_sql.plugins.sqlbookmark.SQLBookmarkPluginorg.rege.isqlj.squirrel.ISqlJPluginSUBCLASS_TYPE_MISMATCH
    Preondition Violations
    Expression this.plugin is a field being modified, and thus it cannot be parameterized
    Expression this.plugin is a field being modified, and thus it cannot be parameterized
    8
    this.plugin = plugin;
    Precondition Violations (4)
    Row Violation
    1Super constructor call super(); cannot be extracted from constructor
    2Super constructor call super(); cannot be extracted from constructor
    3Expression this.plugin is a field being modified, and thus it cannot be parameterized
    4Expression this.plugin is a field being modified, and thus it cannot be parameterized