public void componentMoved(ComponentEvent evt) { 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);
public void componentResized(ComponentEvent evt) { 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: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public void componentMoved(ComponentEvent evt)
1
public void componentResized(ComponentEvent evt)
2
			{
2
			{
3
				if(System.currentTimeMillis() - start < 1000)
3
				if(System.currentTimeMillis() - start < 1000)
4
				{
4
				{
5
					Rectangle r = win.getBounds();
5
					Rectangle r = win.getBounds();
6
					if(!windowOpened && r.equals(required))
6
					if(!windowOpened && r.equals(required))
7
						return;
7
						return;
8
					if(!r.equals(desired))
8
					if(!r.equals(desired))
9
					{
9
					{
10
						Log.log(Log.DEBUG,GUIUtilities.class,
10
 						Log.log(Log.DEBUG,GUIUtilities.class,
11
							"Window resize blocked: " + win.getBounds());
11
 							"Window resize blocked: " + win.getBounds());
12
						win.setBounds(desired);
12
						win.setBounds(desired);
13
					}
13
					}
14
				}
14
				}
15
				win.removeComponentListener(this);
15
				win.removeComponentListener(this);
16
			
16
			
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0