if (SwingUtilities.isEventDispatchThread()) { if (s_log.isDebugEnabled()) { s_log.debug("breathing: ignoring request to sleep the event dispatch thread"); } return; } synchronized(this) { try { wait(50); } catch (InterruptedException e) { if (s_log.isInfoEnabled()) { s_log.info("breathing: Interrupted", e); } } }
if (SwingUtilities.isEventDispatchThread()) { if (s_log.isDebugEnabled()) { s_log.debug("breathing: ignoring request to sleep the event dispatch thread"); } return; } synchronized (this) { try { wait(50); } catch (InterruptedException e) { if (s_log.isInfoEnabled()) { s_log.info("breathing: Interrupted", e); } } }
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/session/schemainfo/SchemaInfo.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/update/gui/installer/ArtifactInstallerImpl.java
Method name: void breathing() Method name: void breathing()
Number of AST nodes: 7 Number of AST nodes: 7
1
if (SwingUtilities.isEventDispatchThread()) {
1
if (SwingUtilities.isEventDispatchThread())
2
   
2
		{
3
		if (s_log.isDebugEnabled()) {
3
			if (s_log.isDebugEnabled())
4
   
4
			{
5
			s_log.debug("breathing: ignoring request to sleep the event dispatch thread");
5
				s_log.debug("breathing: ignoring request to sleep the event dispatch thread");
6
   		}
6
			}
7
   		return;
7
			return;
8
   	}
9
   
8
		}
10
	synchronized(this) {
9
		synchronized (this)
11
	      try
12
	      {
13
	         wait(50);
14
	      }
15
	      
10
		{
11
			try
12
			{
13
				wait(50);
14
			}
16
catch (InterruptedException e)
15
			catch (InterruptedException e)
17
	      {
16
	
18
	      
17
		{
19
	if (s_log.isInfoEnabled()) {
18
				if (s_log.isInfoEnabled())
20
	      
19
				{
21
		s_log.info("breathing: Interrupted", e);
20
					s_log.info("breathing: Interrupted", e);
22
	      	}
21
	
23
	      }
24
   
22
			}
23
			}
25
	}
24
		}
Summary
Number of common nesting structure subtrees2
Number of refactorable cases1
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.7
Clones locationClones are in different classes
Number of node comparisons15
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements2
    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.9
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    6
    try
    6
    try
    7
    wait(50);
    7
    wait(50);
    Precondition Violations (0)
    Row Violation
  1. {Non-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)1.4
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (SwingUtilities.isEventDispatchThread())
    1
    if (SwingUtilities.isEventDispatchThread())
    2
    if (s_log.isDebugEnabled())
    2
    if (s_log.isDebugEnabled())
    3
    s_log.debug("breathing: ignoring request to sleep the event dispatch thread");
    3
    s_log.debug("breathing: ignoring request to sleep the event dispatch thread");
    4
    return;
    4
    return;
    4
    return;
    Preondition Violations
    Conditional return;
    Conditional return;
    4
    return;
    Precondition Violations (2)
    Row Violation
    1Conditional return;
    2Conditional return;