File path: /sql12/plugins/userscript/src/net/sourceforge/squirrel_sql/plugins/userscript/kernel/ScriptListTableModel.java | File path: /sql12/plugins/graph/src/net/sourceforge/squirrel_sql/plugins/graph/ConstraintData.java | |||
Method name: void addScript(Script)
|
Method name: void addColumnInfo(ColumnInfo)
|
|||
Number of AST nodes: 5 | Number of AST nodes: 4 | |||
1 | Vector<Script> buf = new Vector<Script>();↵ | 1 | Vector<ColumnInfo> buf = new Vector<ColumnInfo>();↵ | |
2 | buf.addAll(Arrays.asList(m_scripts));↵ | 2 | buf.addAll(Arrays.asList(↵ | |
3 | buf.add(newScript);↵ | |||
4 | m_script↵ | 3 | _columnInfos));↵ | |
4 | buf.add(colInfo);↵ | |||
5 | s = buf.toArray(new Script[buf.size()]);↵ | 5 | _columnInfos = buf.toArray(new ColumnInfo[buf.size()]); | |
6 | refresh(); | |||
See real code fragment | See real code fragment |
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.0 |
Clones location | Clones are in different classes |
Number of node comparisons | 20 |
Number of mapped statements | 2 |
Number of unmapped statements in the first code fragment | 3 |
Number of unmapped statements in the second code fragment | 2 |
Time elapsed for statement mapping (ms) | 0.0 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Vector<ColumnInfo> buf = new Vector<ColumnInfo>(); | ||||||||||||||||||||
1 | Vector<Script> buf = new Vector<Script>(); | | ||||||||||||||||||||
2 | buf.addAll(Arrays.asList(m_scripts)); |
| 2 | buf.addAll(Arrays.asList(_columnInfos)); | ||||||||||||||||||
3 | buf.add(newScript); |
| 3 | buf.add(colInfo); | ||||||||||||||||||
|
| 4 | _columnInfos = buf.toArray(new ColumnInfo[buf.size()]); | |||||||||||||||||||
4 | m_scripts = buf.toArray(new Script[buf.size()]); |
| | |||||||||||||||||||
5 | refresh(); | |
Row | Violation |
---|---|
1 | Type net.sourceforge.squirrel_sql.plugins.userscript.kernel.Script[] of variable m_scripts does not match with type net.sourceforge.squirrel_sql.plugins.graph.ColumnInfo[] of variable _columnInfos |
2 | Type java.util.List<net.sourceforge.squirrel_sql.plugins.userscript.kernel.Script> of variable Arrays.asList(m_scripts) does not match with type java.util.List<net.sourceforge.squirrel_sql.plugins.graph.ColumnInfo> of variable Arrays.asList(_columnInfos) |
3 | Type net.sourceforge.squirrel_sql.plugins.userscript.kernel.Script of variable newScript does not match with type net.sourceforge.squirrel_sql.plugins.graph.ColumnInfo of variable colInfo |
4 | Unmatched statement _columnInfos=buf.toArray(new ColumnInfo[buf.size()]); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement m_scripts=buf.toArray(new Script[buf.size()]); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |