package org.apache.jmeter.testbeans; import java.awt.Image; import java.beans.BeanDescriptor; import java.beans.BeanInfo; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; /** * This is the BeanInfo object for the TestBean class. It acts as a "stopper" * for the introspector: we don't want it to look at properties defined at this * or higher classes. * <p> * Note this is really needed since using Introspector.getBeanInfo with a stop * class is not an option because: * <ol> * <li>The API does not define a 3-parameter getBeanInfo in which you can use a * stop class AND flags. [Why? I guess this is a bug in the spec.] * <li>java.beans.Introspector is buggy and, opposite to what's stated in the * Javadocs, only results of getBeanInfo(Class) are actually cached. * </ol> * * @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a> * @version $Revision: 493779 $ updated on $Date: 2007-01-07 17:46:38 +0000 (Sun, 07 Jan 2007) $ */ public class TestBeanBeanInfo implements BeanInfo { public BeanInfo[] getAdditionalBeanInfo() { return new BeanInfo[0]; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getBeanDescriptor() */ public BeanDescriptor getBeanDescriptor() { return null; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getDefaultEventIndex() */ public int getDefaultEventIndex() { return 0; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getDefaultPropertyIndex() */ public int getDefaultPropertyIndex() { return 0; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getEventSetDescriptors() */ public EventSetDescriptor[] getEventSetDescriptors() { return new EventSetDescriptor[0]; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getIcon(int) */ public Image getIcon(int iconKind) { return null; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getMethodDescriptors() */ public MethodDescriptor[] getMethodDescriptors() { return new MethodDescriptor[0]; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getPropertyDescriptors() */ public PropertyDescriptor[] getPropertyDescriptors() { return new PropertyDescriptor[0]; }
package org.apache.jmeter.testelement; import java.awt.Image; import java.beans.BeanDescriptor; import java.beans.BeanInfo; import java.beans.EventSetDescriptor; import java.beans.MethodDescriptor; import java.beans.PropertyDescriptor; /** * This is the BeanInfo object for the TestBean class. It acts as a "stopper" * for the introspector: we don't want it to look at properties defined at this * or higher classes. * <p> * Note this is really needed since using Introspector.getBeanInfo with a stop * class is not an option because: * <ol> * <li>The API does not define a 3-parameter getBeanInfo in which you can use a * stop class AND flags. [Why? I guess this is a bug in the spec.] * <li>java.beans.Introspector is buggy and, opposite to what's stated in the * Javadocs, only results of getBeanInfo(Class) are actually cached. * </ol> * * @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a> * @version $Revision: 493779 $ updated on $Date: 2007-01-07 17:46:38 +0000 (Sun, 07 Jan 2007) $ */ public class AbstractTestElementBeanInfo implements BeanInfo { public BeanInfo[] getAdditionalBeanInfo() { return new BeanInfo[0]; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getBeanDescriptor() */ public BeanDescriptor getBeanDescriptor() { return null; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getDefaultEventIndex() */ public int getDefaultEventIndex() { return 0; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getDefaultPropertyIndex() */ public int getDefaultPropertyIndex() { return 0; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getEventSetDescriptors() */ public EventSetDescriptor[] getEventSetDescriptors() { return new EventSetDescriptor[0]; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getIcon(int) */ public Image getIcon(int iconKind) { return null; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getMethodDescriptors() */ public MethodDescriptor[] getMethodDescriptors() { return new MethodDescriptor[0]; } /* * (non-Javadoc) * * @see java.beans.BeanInfo#getPropertyDescriptors() */ public PropertyDescriptor[] getPropertyDescriptors() { return new PropertyDescriptor[0]; }
Clone fragments detected by clone detection tool
File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testbeans/TestBeanBeanInfo.java File path: /jakarta-jmeter-2.3.2/src/org/apache/jmeter/testelement/AbstractTestElementBeanInfo.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
package org.apache.jmeter.testbeans;
1
package org.apache.jmeter.testelement;
2
import java.awt.Image;
2
import java.awt.Image;
3
import java.beans.BeanDescriptor;
3
import java.beans.BeanDescriptor;
4
import java.beans.BeanInfo;
4
import java.beans.BeanInfo;
5
import java.beans.EventSetDescriptor;
5
import java.beans.EventSetDescriptor;
6
import java.beans.MethodDescriptor;
6
import java.beans.MethodDescriptor;
7
import java.beans.PropertyDescriptor;
7
import java.beans.PropertyDescriptor;
8
/**
8
/**
9
 * This is the BeanInfo object for the TestBean class. It acts as a "stopper"
9
 * This is the BeanInfo object for the TestBean class. It acts as a "stopper"
10
 * for the introspector: we don't want it to look at properties defined at this
10
 * for the introspector: we don't want it to look at properties defined at this
11
 * or higher classes.
11
 * or higher classes.
12
 * <p>
12
 * <p>
13
 * Note this is really needed since using Introspector.getBeanInfo with a stop
13
 * Note this is really needed since using Introspector.getBeanInfo with a stop
14
 * class is not an option because:
14
 * class is not an option because:
15
 * <ol>
15
 * <ol>
16
 * <li>The API does not define a 3-parameter getBeanInfo in which you can use a
16
 * <li>The API does not define a 3-parameter getBeanInfo in which you can use a
17
 * stop class AND flags. [Why? I guess this is a bug in the spec.]
17
 * stop class AND flags. [Why? I guess this is a bug in the spec.]
18
 * <li>java.beans.Introspector is buggy and, opposite to what's stated in the
18
 * <li>java.beans.Introspector is buggy and, opposite to what's stated in the
19
 * Javadocs, only results of getBeanInfo(Class) are actually cached.
19
 * Javadocs, only results of getBeanInfo(Class) are actually cached.
20
 * </ol>
20
 * </ol>
21
 * 
21
 * 
22
 * @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a>
22
 * @author <a href="mailto:jsalvata@apache.org">Jordi Salvat i Alabart</a>
23
 * @version $Revision: 493779 $ updated on $Date: 2007-01-07 17:46:38 +0000 (Sun, 07 Jan 2007) $
23
 * @version $Revision: 493779 $ updated on $Date: 2007-01-07 17:46:38 +0000 (Sun, 07 Jan 2007) $
24
 */
24
 */
25
public class TestBeanBeanInfo implements BeanInfo {
25
public class AbstractTestElementBeanInfo implements BeanInfo {
26
	public BeanInfo[] getAdditionalBeanInfo() {
26
	public BeanInfo[] getAdditionalBeanInfo() {
27
		return new BeanInfo[0];
27
		return new BeanInfo[0];
28
	}
28
	}
29
	/*
29
	/*
30
	 * (non-Javadoc)
30
	 * (non-Javadoc)
31
	 * 
31
	 * 
32
	 * @see java.beans.BeanInfo#getBeanDescriptor()
32
	 * @see java.beans.BeanInfo#getBeanDescriptor()
33
	 */
33
	 */
34
	public BeanDescriptor getBeanDescriptor() {
34
	public BeanDescriptor getBeanDescriptor() {
35
		return null;
35
		return null;
36
	}
36
	}
37
	/*
37
	/*
38
	 * (non-Javadoc)
38
	 * (non-Javadoc)
39
	 * 
39
	 * 
40
	 * @see java.beans.BeanInfo#getDefaultEventIndex()
40
	 * @see java.beans.BeanInfo#getDefaultEventIndex()
41
	 */
41
	 */
42
	public int getDefaultEventIndex() {
42
	public int getDefaultEventIndex() {
43
		return 0;
43
		return 0;
44
	}
44
	}
45
	/*
45
	/*
46
	 * (non-Javadoc)
46
	 * (non-Javadoc)
47
	 * 
47
	 * 
48
	 * @see java.beans.BeanInfo#getDefaultPropertyIndex()
48
	 * @see java.beans.BeanInfo#getDefaultPropertyIndex()
49
	 */
49
	 */
50
	public int getDefaultPropertyIndex() {
50
	public int getDefaultPropertyIndex() {
51
		return 0;
51
		return 0;
52
	}
52
	}
53
	/*
53
	/*
54
	 * (non-Javadoc)
54
	 * (non-Javadoc)
55
	 * 
55
	 * 
56
	 * @see java.beans.BeanInfo#getEventSetDescriptors()
56
	 * @see java.beans.BeanInfo#getEventSetDescriptors()
57
	 */
57
	 */
58
	public EventSetDescriptor[] getEventSetDescriptors() {
58
	public EventSetDescriptor[] getEventSetDescriptors() {
59
		return new EventSetDescriptor[0];
59
		return new EventSetDescriptor[0];
60
	}
60
	}
61
	/*
61
	/*
62
	 * (non-Javadoc)
62
	 * (non-Javadoc)
63
	 * 
63
	 * 
64
	 * @see java.beans.BeanInfo#getIcon(int)
64
	 * @see java.beans.BeanInfo#getIcon(int)
65
	 */
65
	 */
66
	public Image getIcon(int iconKind) {
66
	public Image getIcon(int iconKind) {
67
		return null;
67
		return null;
68
	}
68
	}
69
	/*
69
	/*
70
	 * (non-Javadoc)
70
	 * (non-Javadoc)
71
	 * 
71
	 * 
72
	 * @see java.beans.BeanInfo#getMethodDescriptors()
72
	 * @see java.beans.BeanInfo#getMethodDescriptors()
73
	 */
73
	 */
74
	public MethodDescriptor[] getMethodDescriptors() {
74
	public MethodDescriptor[] getMethodDescriptors() {
75
		return new MethodDescriptor[0];
75
		return new MethodDescriptor[0];
76
	}
76
	}
77
	/*
77
	/*
78
	 * (non-Javadoc)
78
	 * (non-Javadoc)
79
	 * 
79
	 * 
80
	 * @see java.beans.BeanInfo#getPropertyDescriptors()
80
	 * @see java.beans.BeanInfo#getPropertyDescriptors()
81
	 */
81
	 */
82
	public PropertyDescriptor[] getPropertyDescriptors() {
82
	public PropertyDescriptor[] getPropertyDescriptors() {
83
		return new PropertyDescriptor[0];
83
		return new PropertyDescriptor[0];
84
	}
84
	}
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