setRectangularSelectionEnabled(!rectangularSelectionMode); if(view.getStatus() != null) { view.getStatus().setMessageAndClear( jEdit.getProperty("view.status.rect-select-changed", new Integer[] { new Integer(rectangularSelectionMode ? 1 : 0) })); }
setMultipleSelectionEnabled(!multi); if(view.getStatus() != null) { view.getStatus().setMessageAndClear( jEdit.getProperty("view.status.multi-changed", new Integer[] { new Integer(multi ? 1 : 0) })); }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/textarea/JEditTextArea.java
Method name: void toggleRectangularSelectionEnabled() Method name: void toggleMultipleSelectionEnabled()
Number of AST nodes: 3 Number of AST nodes: 3
1
setRectangularSelectionEnabled(!rectangularSelectionMode);
1
setMultipleSelectionEnabled(!multi);
2
		if(view.getStatus() != null)
2
		if(view.getStatus() != null)
3
		{
3
		{
4
			view.getStatus().setMessageAndClear(
4
			view.getStatus().setMessageAndClear(
5
				jEdit.getProperty("view.status.rect-select-changed",
5
				jEdit.getProperty("view.status.multi-changed",
6
				new Integer[] { new Integer(rectangularSelectionMode ? 1 : 0) }));
6
				new Integer[] { new Integer(multi ? 1 : 0) }));
7
		}
7
		}
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 declared in the same class
Number of node comparisons5
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements3
    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.9
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    setRectangularSelectionEnabled(!rectangularSelectionMode);
    1
    setRectangularSelectionEnabled(!rectangularSelectionMode);
    1
    setMultipleSelectionEnabled(!multi);
    Differences
    Expression1Expression2Difference
    setRectangularSelectionEnabledsetMultipleSelectionEnabledMETHOD_INVOCATION_NAME_MISMATCH
    rectangularSelectionModemultiVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression setRectangularSelectionEnabled(!rectangularSelectionMode) is a void method call, and thus it cannot be parameterized
    Expression setMultipleSelectionEnabled(!multi) is a void method call, and thus it cannot be parameterized
    1
    setMultipleSelectionEnabled(!multi);
    2
    if (view.getStatus() != null)
    2
    if (view.getStatus() != null)
    3
    view.getStatus().setMessageAndClear(jEdit.getProperty("view.status.rect-select-changed", new Integer[] {new Integer(rectangularSelectionMode ? 1 : 0)}));
    3
    view.getStatus().setMessageAndClear(jEdit.getProperty("view.status.rect-select-changed", new Integer[] {new Integer(rectangularSelectionMode ? 1 : 0)}));
    3
    view.getStatus().setMessageAndClear(jEdit.getProperty("view.status.multi-changed", new Integer[] {new Integer(multi ? 1 : 0)}));
    Differences
    Expression1Expression2Difference
    "view.status.rect-select-changed""view.status.multi-changed"LITERAL_VALUE_MISMATCH
    rectangularSelectionModemultiVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression rectangularSelectionMode cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression multi cannot be parameterized, because it has dependencies to/from statements that will be extracted
    3
    view.getStatus().setMessageAndClear(jEdit.getProperty("view.status.multi-changed", new Integer[] {new Integer(multi ? 1 : 0)}));
    Precondition Violations (4)
    Row Violation
    1Expression setRectangularSelectionEnabled(!rectangularSelectionMode) is a void method call, and thus it cannot be parameterized
    2Expression setMultipleSelectionEnabled(!multi) is a void method call, and thus it cannot be parameterized
    3Expression rectangularSelectionMode cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression multi cannot be parameterized, because it has dependencies to/from statements that will be extracted