if (!e.getValueIsAdjusting() && e.getSource() == jtableUsers.getSelectionModel()) { selectUser(); }
if (!e.getValueIsAdjusting() && e.getSource() == jtableRoles.getSelectionModel()) { selectRole(); }
Clone fragments detected by clone detection tool
File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerUserManagerFrame.java File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerRoleFrame.java
Method name: void valueChanged(ListSelectionEvent) Method name: void valueChanged(ListSelectionEvent)
Number of AST nodes: 2 Number of AST nodes: 2
1
if (!e.getValueIsAdjusting()
1
if (!e.getValueIsAdjusting()
2
				&& e.getSource() == jtableUsers.getSelectionModel()) {
2
				&& e.getSource() == jtableRoles.getSelectionModel()) {
3
			selectUser();
3
			selectRole();
4
		}
4
		}
Summary
Number of common nesting structure subtrees1
Number of refactorable cases1
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.3
Clones locationClones are in different classes having the same super class
Number of node comparisons4
  1. {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)1.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    if (!e.getValueIsAdjusting() && e.getSource() == jtableUsers.getSelectionModel())
    1
    if (!e.getValueIsAdjusting() && e.getSource() == jtableUsers.getSelectionModel())
    1
    if (!e.getValueIsAdjusting() && e.getSource() == jtableRoles.getSelectionModel())
    Differences
    Expression1Expression2Difference
    jtableUsersjtableRolesVARIABLE_NAME_MISMATCH
    1
    if (!e.getValueIsAdjusting() && e.getSource() == jtableRoles.getSelectionModel())
    2
    selectUser();
    2
    selectUser();
    2
    selectRole();
    Differences
    Expression1Expression2Difference
    selectUserselectRoleMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression selectUser() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method selectUser
    Expression selectRole() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method selectRole
    Expression selectUser() is a void method call, and thus it cannot be parameterized
    Expression selectRole() is a void method call, and thus it cannot be parameterized
    2
    selectRole();
    Precondition Violations (4)
    Row Violation
    1Expression selectUser() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression selectRole() cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3Expression selectUser() is a void method call, and thus it cannot be parameterized
    4Expression selectRole() is a void method call, and thus it cannot be parameterized