encodingAutodetect = new JCheckBox(jEdit.getProperty( "options.general.encodingAutodetect")); encodingAutodetect.setSelected(jEdit.getBooleanProperty("buffer.encodingAutodetect")); addComponent(encodingAutodetect); /* Check mod status on focus */ String[] modCheckOptions = { jEdit.getProperty("options.general.checkModStatus.nothing"), jEdit.getProperty("options.general.checkModStatus.prompt"), jEdit.getProperty("options.general.checkModStatus.reload") }; checkModStatus = new JComboBox(modCheckOptions);
color = new JCheckBox(jEdit.getProperty("options.print" + ".color")); color.setSelected(jEdit.getBooleanProperty("print.color")); addComponent(color); /* Tab size */ String[] tabSizes = { "2", "4", "8" }; tabSize = new JComboBox(tabSizes);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/GeneralOptionPane.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/options/PrintOptionPane.java
Method name: void _init() Method name: void _init()
Number of AST nodes: 5 Number of AST nodes: 5
1
encodingAutodetect = new JCheckBox(jEdit.getProperty(
1
color = new JCheckBox(jEdit.getProperty(
2
			"options.general.encodingAutodetect"));
2
"options.
3
		encodingAutodetect
3
print"
4
			+ ".color"));
4
.setSelected(jEdit.getBooleanProperty("buffer.encodingAutodetect"));
5
		color.setSelected(jEdit.getBooleanProperty("
5
		addComponent(encodingAutodetect);
6
		/* Check mod status on focus */
7
		String[] modCheckOptions = {
8
			jEdit.getProperty("options.general.checkModStatus.nothing"),
9
			jEdit.getProperty("options.general.checkModStatus.prompt"),
10
			jEdit.getProperty("options.general.checkModStatus.reload")
11
		};
12
		checkModStatus
6
print.color"));
7
		addComponent(color);
8
		/* Tab size */
9
		String[] tabSizes = { "2", "4", "8" };
13
 = new JComboBox(modCheckOptions);
10
		tabSize = new JComboBox(tabSizes);
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.0
Clones locationClones are in different classes having the same super class
Number of node comparisons12
  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)0.0
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    17
    encodingAutodetect = new JCheckBox(jEdit.getProperty("options.general.encodingAutodetect"));
    17
    encodingAutodetect = new JCheckBox(jEdit.getProperty("options.general.encodingAutodetect"));
    12
    color = new JCheckBox(jEdit.getProperty("options.print" + ".color"));
    Differences
    Expression1Expression2Difference
    encodingAutodetectcolorVARIABLE_NAME_MISMATCH
    "options.general.encodingAutodetect""options.print" + ".color"TYPE_COMPATIBLE_REPLACEMENT
    Preondition Violations
    Expression encodingAutodetect is a field being modified, and thus it cannot be parameterized
    Expression color is a field being modified, and thus it cannot be parameterized
    12
    color = new JCheckBox(jEdit.getProperty("options.print" + ".color"));
    18
    encodingAutodetect.setSelected(jEdit.getBooleanProperty("buffer.encodingAutodetect"));
    18
    encodingAutodetect.setSelected(jEdit.getBooleanProperty("buffer.encodingAutodetect"));
    13
    color.setSelected(jEdit.getBooleanProperty("print.color"));
    Differences
    Expression1Expression2Difference
    "buffer.encodingAutodetect""print.color"LITERAL_VALUE_MISMATCH
    encodingAutodetectcolorVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression encodingAutodetect cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression color cannot be parameterized, because it has dependencies to/from statements that will be extracted
    13
    color.setSelected(jEdit.getBooleanProperty("print.color"));
    19
    addComponent(encodingAutodetect);
    19
    addComponent(encodingAutodetect);
    14
    addComponent(color);
    Differences
    Expression1Expression2Difference
    encodingAutodetectcolorVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression encodingAutodetect cannot be parameterized, because it has dependencies to/from statements that will be extracted
    Expression color cannot be parameterized, because it has dependencies to/from statements that will be extracted
    14
    addComponent(color);
    20
    String[] modCheckOptions = {jEdit.getProperty("options.general.checkModStatus.nothing"), jEdit.getProperty("options.general.checkModStatus.prompt"), jEdit.getProperty("options.general.checkModStatus.reload")};
    20
    String[] modCheckOptions = {jEdit.getProperty("options.general.checkModStatus.nothing"), jEdit.getProperty("options.general.checkModStatus.prompt"), jEdit.getProperty("options.general.checkModStatus.reload")};
    15
    String[] tabSizes = {"2", "4", "8"};
    Differences
    Expression1Expression2Difference
    modCheckOptionstabSizesVARIABLE_NAME_MISMATCH
    jEdit.getProperty("options.general.checkModStatus.nothing")"2"TYPE_COMPATIBLE_REPLACEMENT
    jEdit.getProperty("options.general.checkModStatus.prompt")"4"TYPE_COMPATIBLE_REPLACEMENT
    jEdit.getProperty("options.general.checkModStatus.reload")"8"TYPE_COMPATIBLE_REPLACEMENT
    15
    String[] tabSizes = {"2", "4", "8"};
    21
    checkModStatus = new JComboBox(modCheckOptions);
    21
    checkModStatus = new JComboBox(modCheckOptions);
    16
    tabSize = new JComboBox(tabSizes);
    Differences
    Expression1Expression2Difference
    checkModStatustabSizeVARIABLE_NAME_MISMATCH
    modCheckOptionstabSizesVARIABLE_NAME_MISMATCH
    Preondition Violations
    Expression checkModStatus is a field being modified, and thus it cannot be parameterized
    Expression tabSize is a field being modified, and thus it cannot be parameterized
    16
    tabSize = new JComboBox(tabSizes);
    Precondition Violations (8)
    Row Violation
    1Expression encodingAutodetect is a field being modified, and thus it cannot be parameterized
    2Expression color is a field being modified, and thus it cannot be parameterized
    3Expression encodingAutodetect cannot be parameterized, because it has dependencies to/from statements that will be extracted
    4Expression color cannot be parameterized, because it has dependencies to/from statements that will be extracted
    5Expression encodingAutodetect cannot be parameterized, because it has dependencies to/from statements that will be extracted
    6Expression color cannot be parameterized, because it has dependencies to/from statements that will be extracted
    7Expression checkModStatus is a field being modified, and thus it cannot be parameterized
    8Expression tabSize is a field being modified, and thus it cannot be parameterized