try { buffer.setProperty("tabSize",new Integer( tabSize.getSelectedItem().toString())); } catch(NumberFormatException nf) { } try { buffer.setProperty("indentSize",new Integer( indentSize.getSelectedItem().toString())); } catch(NumberFormatException nf) { }
try { buffer.setProperty("maxLineLen",new Integer( maxLineLen.getSelectedItem().toString())); } catch(NumberFormatException nf) { } try { buffer.setProperty("tabSize",new Integer( tabSize.getSelectedItem().toString())); } catch(NumberFormatException nf) { }
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/BufferOptions.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/BufferOptions.java
Method name: void ok() Method name: void ok()
Number of AST nodes: 4 Number of AST nodes: 4
1
try
1
try
2
		{
2
		{
3
			buffer.setProperty("tabSize",new Integer(
3
			buffer.setProperty("maxLineLen",new Integer(
4
				tabSize.getSelectedItem().toString()));
4
				maxLineLen.getSelectedItem().toString()));
5
		}
5
		}
6
		catch(NumberFormatException nf)
6
		catch(NumberFormatException nf)
7
		{
7
		{
8
		}
8
		}
9
		try
9
		try
10
		{
10
		{
11
			buffer.setProperty("indentSize",new Integer(
11
			buffer.setProperty("tabSize",new Integer(
12
				indentSize.getSelectedItem().toString()));
12
				tabSize.getSelectedItem().toString()));
13
		}
13
		}
14
		catch(NumberFormatException nf)
14
		catch(NumberFormatException nf)
15
		{
15
		{
16
		}
16
		}
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 the same method
Number of node comparisons13
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements4
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)2.3
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    30
    try
    30
    try
    31
    buffer.setProperty("tabSize", new Integer(tabSize.getSelectedItem().toString()));
    31
    buffer.setProperty("tabSize", new Integer(tabSize.getSelectedItem().toString()));
    32
    try
    28
    try
    33
    buffer.setProperty("indentSize", new Integer(indentSize.getSelectedItem().toString()));
    33
    buffer.setProperty("indentSize", new Integer(indentSize.getSelectedItem().toString()));
    29
    buffer.setProperty("maxLineLen", new Integer(maxLineLen.getSelectedItem().toString()));
    Differences
    Expression1Expression2Difference
    "indentSize""maxLineLen"LITERAL_VALUE_MISMATCH
    indentSizemaxLineLenVARIABLE_NAME_MISMATCH
    29
    buffer.setProperty("maxLineLen", new Integer(maxLineLen.getSelectedItem().toString()));
    Precondition Violations (0)
    Row Violation