if (log.isDebugEnabled()) { log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched " + "catalog=" + catalog + " schema=" + schema + " tableName=" + tableName); }
if (evt.isPopupTrigger()) { displayPopupMenu(evt); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/dbcopy/src/net/sourceforge/squirrel_sql/plugins/dbcopy/util/DBUtil.java File path: /sql12/plugins/favs/src/net/sourceforge/squirrel_sql/plugins/favs/QueryTree.java
Method name: ITableInfo getTableInfo(ISession, String, String) Method name: void mouseReleased(MouseEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (log.isDebugEnabled())
1
if (
2
			{
3
				log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched " + "catalog=" + catalog
4
				      + " schema=" + schema + " tableName=" + tableName
2
evt.isPopupTrigger()) {
5
);
3
					displayPopupMenu(evt);
6
			}
4
				}
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.2
Clones locationClones are in different classes
Number of node comparisons4
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements2
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)66.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    24
    if (log.isDebugEnabled())
    24
    if (log.isDebugEnabled())
    1
    if (evt.isPopupTrigger())
    Differences
    Expression1Expression2Difference
    isDebugEnabledisPopupTriggerMETHOD_INVOCATION_NAME_MISMATCH
    logevtVARIABLE_NAME_MISMATCH
    net.sourceforge.squirrel_sql.fw.util.log.ILoggerjava.awt.event.MouseEventVARIABLE_TYPE_MISMATCH
    Preondition Violations
    Type net.sourceforge.squirrel_sql.fw.util.log.ILogger of variable log does not match with type java.awt.event.MouseEvent of variable evt
    • Make classes net.sourceforge.squirrel_sql.fw.util.log.ILogger and java.awt.event.MouseEvent extend a common superclass
    1
    if (evt.isPopupTrigger())
    25
    log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched " + "catalog=" + catalog + " schema=" + schema + " tableName=" + tableName);
    25
    log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched " + "catalog=" + catalog + " schema=" + schema + " tableName=" + tableName);
    2
    displayPopupMenu(evt);
    Differences
    Expression1Expression2Difference
    "DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableNameevtAST_TYPE_MISMATCH
    debugdisplayPopupMenuMETHOD_INVOCATION_NAME_MISMATCH
    logMISSING_METHOD_INVOCATION_EXPRESSION
    Preondition Violations
    Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method displayPopupMenu
    Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) is a void method call, and thus it cannot be parameterized
    Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method displayPopupMenu
    Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) is a void method call, and thus it cannot be parameterized
    Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    2
    displayPopupMenu(evt);
    Precondition Violations (10)
    Row Violation
    1Type net.sourceforge.squirrel_sql.fw.util.log.ILogger of variable log does not match with type java.awt.event.MouseEvent of variable evt
    2Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) is a void method call, and thus it cannot be parameterized
    5Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    6Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression displayPopupMenu(evt) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression log.debug("DBUtil.getTableInfo: found " + tis.length + " that matched "+ "catalog="+ catalog+ " schema="+ schema+ " tableName="+ tableName) is a void method call, and thus it cannot be parameterized
    9Expression displayPopupMenu(evt) is a void method call, and thus it cannot be parameterized
    10The refactoring of the clones is infeasible, because classes net.sourceforge.squirrel_sql.plugins.dbcopy.util.DBUtil and do not have a common superclass