if(System.currentTimeMillis() - start < 1000) { Rectangle r = win.getBounds(); if(!windowOpened && r.equals(required)) return; if(!r.equals(desired)) { Log.log(Log.DEBUG,GUIUtilities.class, "Window resize blocked: " + win.getBounds()); win.setBounds(desired); } } win.removeComponentListener(this);
if(System.currentTimeMillis() - start < 1000) { Rectangle r = win.getBounds(); if(!windowOpened && r.equals(required)) return; if(!r.equals(desired)) { Log.log(Log.DEBUG,GUIUtilities.class, "Window resize blocked: " + win.getBounds()); win.setBounds(desired); } } win.removeComponentListener(this);
Clone fragments detected by clone detection tool
File path: /jEdit-4.2/src/org/gjt/sp/jedit/GUIUtilities.java File path: /jEdit-4.2/src/org/gjt/sp/jedit/GUIUtilities.java
Method name: void componentMoved(ComponentEvent) Method name: void componentResized(ComponentEvent)
Number of AST nodes: 8 Number of AST nodes: 8
1
if(System.currentTimeMillis() - start < 1000)
1
if(System.currentTimeMillis() - start < 1000)
2
				{
2
				{
3
					Rectangle r = win.getBounds();
3
					Rectangle r = win.getBounds();
4
					if(!windowOpened && r.equals(required))
4
					if(!windowOpened && r.equals(required))
5
						return;
5
						return;
6
					if(!r.equals(desired))
6
					if(!r.equals(desired))
7
					{
7
					{
8
						Log.log(Log.DEBUG,GUIUtilities.class,
8
 						Log.log(Log.DEBUG,GUIUtilities.class,
9
							"Window resize blocked: " + win.getBounds());
9
 							"Window resize blocked: " + win.getBounds());
10
						win.setBounds(desired);
10
						win.setBounds(desired);
11
					}
11
					}
12
				}
12
				}
13
				win.removeComponentListener(this);
13
				win.removeComponentListener(this);
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.5
Clones locationClones are declared in the same class
Number of node comparisons25
  1. {Refactorable}
    Mapping Summary
    Number of mapped statements8
    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.6
    Clone typeType 1
    Mapped Statements
    ID Statement ID Statement
    1
    if (System.currentTimeMillis() - start < 1000)
    1
    if (System.currentTimeMillis() - start < 1000)
    2
    Rectangle r = win.getBounds();
    2
    Rectangle r = win.getBounds();
    3
    if (!windowOpened && r.equals(required))
    3
    if (!windowOpened && r.equals(required))
    4
    return;
    4
    return;
    5
    if (!r.equals(desired))
    5
    if (!r.equals(desired))
    6
    Log.log(Log.DEBUG, GUIUtilities.class, "Window resize blocked: " + win.getBounds());
    6
    Log.log(Log.DEBUG, GUIUtilities.class, "Window resize blocked: " + win.getBounds());
    7
    win.setBounds(desired);
    7
    win.setBounds(desired);
    8
    win.removeComponentListener(this);
    8
    win.removeComponentListener(this);
    Precondition Violations (0)
    Row Violation