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;
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.3 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 8 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 2.3 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
1 | super(); | | 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) |
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; |
Precondition Violations (4)
Row |
Violation |
1 | Super constructor call super(); cannot be extracted from constructor |
2 | Super constructor call super(); cannot be extracted from constructor |
3 | Expression this.plugin is a field being modified, and thus it cannot be parameterized |
4 | Expression this.plugin is a field being modified, and thus it cannot be parameterized |