if (info.isPreformattet()) { selectInParagraphComboBox(HTML.Tag.PRE); } else if (info.isAddress()) { selectInParagraphComboBox(HTML.Tag.ADDRESS); } else { // select the "Normal" entry as default selectInParagraphComboBox(HTML.Tag.P); }
if (info.isPreformattet()) { selectMenuItem(HTML.Tag.PRE); } else if (info.isAddress()) { selectMenuItem(HTML.Tag.ADDRESS); } else { // select the "Normal" entry as default selectMenuItem(HTML.Tag.P); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/html/HtmlToolbar.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/composer/html/action/ParagraphMenu.java
Method name: void formatChanged(FormatChangedEvent) Method name: void formatChanged(FormatChangedEvent)
Number of AST nodes: 5 Number of AST nodes: 5
1
if (info.isPreformattet()) {
1
if (info.isPreformattet()) {
2
			selectInParagraphComboBox(HTML.Tag.PRE);
2
			selectMenuItem(HTML.Tag.PRE);
3
		} else if (info.isAddress()) {
3
		} else if (info.isAddress()) {
4
			selectInParagraphComboBox(HTML.Tag.ADDRESS);
4
			selectMenuItem(HTML.Tag.ADDRESS);
5
		} else {
5
		} else {
6
			// select the "Normal" entry as default
6
			// select the "Normal" entry as default
7
			selectInParagraphComboBox(HTML.Tag.P);
7
			selectMenuItem(HTML.Tag.P);
8
		}
8
		}
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 in different classes having the same super class
Number of node comparisons20
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements5
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)3.4
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    8
    else if (info.isPreformattet())
    8
    else if (info.isPreformattet())
    9
    selectInParagraphComboBox(HTML.Tag.PRE);
    9
    selectInParagraphComboBox(HTML.Tag.PRE);
    9
    selectMenuItem(HTML.Tag.PRE);
    Differences
    Expression1Expression2Difference
    selectInParagraphComboBoxselectMenuItemMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression selectInParagraphComboBox(HTML.Tag.PRE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method selectInParagraphComboBox
    Expression selectInParagraphComboBox(HTML.Tag.PRE) is a void method call, and thus it cannot be parameterized
    Expression selectMenuItem(HTML.Tag.PRE) is a void method call, and thus it cannot be parameterized
    9
    selectMenuItem(HTML.Tag.PRE);
    10
    else if (info.isAddress())
    10
    else if (info.isAddress())
    11
    selectInParagraphComboBox(HTML.Tag.ADDRESS);
    11
    selectInParagraphComboBox(HTML.Tag.ADDRESS);
    11
    selectMenuItem(HTML.Tag.ADDRESS);
    Differences
    Expression1Expression2Difference
    selectInParagraphComboBoxselectMenuItemMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression selectInParagraphComboBox(HTML.Tag.ADDRESS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method selectInParagraphComboBox
    Expression selectInParagraphComboBox(HTML.Tag.ADDRESS) is a void method call, and thus it cannot be parameterized
    Expression selectMenuItem(HTML.Tag.ADDRESS) is a void method call, and thus it cannot be parameterized
    11
    selectMenuItem(HTML.Tag.ADDRESS);
    else
    else
    12
    selectInParagraphComboBox(HTML.Tag.P);
    12
    selectInParagraphComboBox(HTML.Tag.P);
    12
    selectMenuItem(HTML.Tag.P);
    Differences
    Expression1Expression2Difference
    selectInParagraphComboBoxselectMenuItemMETHOD_INVOCATION_NAME_MISMATCH
    Preondition Violations
    Expression selectInParagraphComboBox(HTML.Tag.P) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    • Inline private method selectInParagraphComboBox
    Expression selectInParagraphComboBox(HTML.Tag.P) is a void method call, and thus it cannot be parameterized
    Expression selectMenuItem(HTML.Tag.P) is a void method call, and thus it cannot be parameterized
    12
    selectMenuItem(HTML.Tag.P);
    Precondition Violations (10)
    Row Violation
    1Expression selectInParagraphComboBox(HTML.Tag.PRE) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    2Expression selectInParagraphComboBox(HTML.Tag.PRE) is a void method call, and thus it cannot be parameterized
    3Expression selectMenuItem(HTML.Tag.PRE) is a void method call, and thus it cannot be parameterized
    4Expression selectInParagraphComboBox(HTML.Tag.ADDRESS) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression selectInParagraphComboBox(HTML.Tag.ADDRESS) is a void method call, and thus it cannot be parameterized
    6Expression selectMenuItem(HTML.Tag.ADDRESS) is a void method call, and thus it cannot be parameterized
    7Expression selectInParagraphComboBox(HTML.Tag.P) cannot be parameterized, because it has dependencies to/from statements that will be extracted
    8Expression selectInParagraphComboBox(HTML.Tag.P) is a void method call, and thus it cannot be parameterized
    9Expression selectMenuItem(HTML.Tag.P) is a void method call, and thus it cannot be parameterized
    10The refactoring of the clones is infeasible, because classes org.columba.mail.gui.composer.html.HtmlToolbar and org.columba.mail.gui.composer.html.action.ParagraphMenu do not have a common superclass