public class DimensionWrapper { /** Property names for this bean. */ public interface IPropertyNames { /** Width of <TT>Dimension</TT>. */ String WIDTH = "width"; /** Height of <TT>Dimension</TT>. */ String HEIGHT = "height"; } /** Width of <TT>Dimension</TT>. */ private int _width; /** Height of <TT>Dimension</TT>. */ private int _height; /** * Default ctor. */ public DimensionWrapper() { this(null); } /** * Ctor specifying the <TT>Dimension</TT> that this object will be * wrapped around. * * @param dm The <TT>Dimension</TT> that this object will be * wrapped around. */ public DimensionWrapper(Dimension dm) { super(); setFrom(dm); } public int getWidth() { return _width; } public void setWidth(int value) { _width = value; } public int getHeight() { return _height; } public void setHeight(int value) { _height = value; } public Dimension createDimension() { return new Dimension(_width, _height); } public void setFrom(Dimension dm) { if (dm != null) { _width = (int)dm.getWidth(); _height = (int)dm.getHeight()
public class PointWrapper { public interface IPropertyNames { String X = "x"; String Y = "y"; } private int _x; private int _y; public PointWrapper() { this(null); } public PointWrapper(Point pt) { super(); setFrom(pt); } public int getX() { return _x; } public void setX(int value) { _x = value; } public int getY() { return _y; } public void setY(int value) { _y = value; } public Point createPoint() { return new Point(_x, _y); } public void setFrom(Point pt) { if (pt != null) { _x = pt.x; _y = pt.y
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/beanwrapper/DimensionWrapper.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/util/beanwrapper/PointWrapper.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public class DimensionWrapper
1
public class PointWrapper
2
{
2
{
3
	/** Property names for this bean. */
3
	
4
	public interface IPropertyNames
5
	{
6
		/** Width of <TT>Dimension</TT>. */
7
		String WIDTH = "width";
8
		/** Height of <TT>Dimension</TT>. */
9
		String HEIGHT = "height";
10
	}
11
	/** Width of <TT>Dimension</TT>. */
12
	private int _width;
13
	/** Height of <TT>Dimension</TT>. */
14
	private int _height;
15
	/**
16
	 * Default ctor.
17
	 */
18
	public DimensionWrapper()
19
	{
20
		this(null);
21
	}
22
	/**
23
	 * Ctor specifying the <TT>Dimension</TT> that this object will be
24
	 * wrapped around.
25
	 *
26
	 * @param	dm	The <TT>Dimension</TT> that this object will be
27
	 *				wrapped around.
28
	 */
29
	public DimensionWrapper(Dimension dm
4
public interface IPropertyNames
5
	{
6
		String X = "x";
7
		String Y = "y";
8
	}
9
	private int _x;
10
	private int _y;
11
	public PointWrapper()
12
	{
13
		this(null);
14
	}
30
)
15
	public PointWrapper(Point pt)
31
	{
16
	{
32
		super();
17
		super();
33
		setFrom(dm);
18
		setFrom(pt);
34
	}
19
	}
35
	public int getWidth()
20
	public int getX()
36
	{
21
	{
37
		return _width;
22
		return _x;
38
	}
23
	}
39
	public void setWidth(int value)
24
	public void setX(int value)
40
	{
25
	{
41
		_width = value;
26
		_x = value;
42
	}
27
	}
43
	public int getHeight()
28
	public int getY()
44
	{
29
	{
45
		return _height;
30
		return _y;
46
	}
31
	}
47
	public void setHeight(int value)
32
	public void setY(int value)
48
	{
33
	{
49
		_height = value;
34
		_y = value;
50
	}
35
	}
51
	public Dimension createDimension()
36
	public 
52
	{
53
		return new Dimension(_width, _height
37
Point createPoint()
38
	{
54
);
39
		return new Point(_x, _y);
55
	}
40
	}
56
	public void setFrom(Dimension dm)
41
	public void setFrom(Point pt)
57
	{
42
	{
58
		if (dm != null)
43
		if (pt != null)
59
		{
44
		{
60
			_width = (int)dm.getWidth();
45
			_
61
			_height = (int)dm.getHeight()
46
x = pt.x;
47
			_y = pt.y
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