try { checkThread(comp); } catch (Exception ex) { // i18n[ThreadCheckingRepaintManager.workinwrongthread=GUI work done in wrong thread] s_log.debug(s_stringMgr.getString("ThreadCheckingRepaintManager.workinwrongthread"), ex); } super.addInvalidComponent(comp);
try { checkThread(comp); } catch (Exception ex) { // i18n[ThreadCheckingRepaintManager.workinwrongthread=GUI work done in wrong thread] s_log.debug(s_stringMgr.getString("ThreadCheckingRepaintManager.workinwrongthread"), ex); } super.addDirtyRegion(comp, i, i1, i2, i3);
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/util/ThreadCheckingRepaintManager.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/gui/util/ThreadCheckingRepaintManager.java
Method name: void addInvalidComponent(JComponent) Method name: void addDirtyRegion(JComponent, int, int, int, int)
Number of AST nodes: 3 Number of AST nodes: 3
1
try
1
try
2
		{
2
		{
3
			checkThread(comp);
3
			checkThread(comp);
4
		}
4
		}
5
		catch (Exception ex)
5
		catch (Exception ex)
6
		{
6
		{
7
            // i18n[ThreadCheckingRepaintManager.workinwrongthread=GUI work done in wrong thread]
7
            // i18n[ThreadCheckingRepaintManager.workinwrongthread=GUI work done in wrong thread]
8
			s_log.debug(s_stringMgr.getString("ThreadCheckingRepaintManager.workinwrongthread"), ex);
8
			s_log.debug(s_stringMgr.getString("ThreadCheckingRepaintManager.workinwrongthread"), ex);
9
		}
9
		}
10
		super.addInvalidComponent(comp);
10
		super.addDirtyRegion(comp, i, i1, i2, i3);
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.2
Clones locationClones are declared in the same class
Number of node comparisons5
  1. {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.1
    Clone typeType 2
    Mapped Statements
    ID Statement ID Statement
    1
    try
    1
    try
    2
    checkThread(comp);
    2
    checkThread(comp);
    3
    super.addInvalidComponent(comp);
    3
    super.addInvalidComponent(comp);
    3
    super.addDirtyRegion(comp, i, i1, i2, i3);
    Differences
    Expression1Expression2Difference
    addInvalidComponentaddDirtyRegionMETHOD_INVOCATION_NAME_MISMATCH
    super.addInvalidComponent(comp)super.addDirtyRegion(comp,i,i1,i2,i3)ARGUMENT_NUMBER_MISMATCH
    Preondition Violations
    Expression super.addInvalidComponent(comp) is a void method call, and thus it cannot be parameterized
    Expression super.addDirtyRegion(comp,i,i1,i2,i3) is a void method call, and thus it cannot be parameterized
    Expression super.addInvalidComponent(comp) is a void method call, and thus it cannot be parameterized
    Expression super.addDirtyRegion(comp,i,i1,i2,i3) is a void method call, and thus it cannot be parameterized
    Super method call super.addInvalidComponent(comp); cannot be extracted from method
    Super method call super.addDirtyRegion(comp,i,i1,i2,i3); cannot be extracted from method
    3
    super.addDirtyRegion(comp, i, i1, i2, i3);
    Precondition Violations (6)
    Row Violation
    1Expression super.addInvalidComponent(comp) is a void method call, and thus it cannot be parameterized
    2Expression super.addDirtyRegion(comp,i,i1,i2,i3) is a void method call, and thus it cannot be parameterized
    3Expression super.addInvalidComponent(comp) is a void method call, and thus it cannot be parameterized
    4Expression super.addDirtyRegion(comp,i,i1,i2,i3) is a void method call, and thus it cannot be parameterized
    5Super method call super.addInvalidComponent(comp); cannot be extracted from method
    6Super method call super.addDirtyRegion(comp,i,i1,i2,i3); cannot be extracted from method