{ final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.FLOAT)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Float"); } setObject(theName, theNamespace, value); } public double getDouble(final String theName, final String theNamespace) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.DOUBLE)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Double"); } return (Double) getObject(theName, theNamespace); } public void setDouble(final String theName, final String theNamespace, final double value) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.DOUBLE)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Double"); } setObject(theName, theNamespace, value); }
{ final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.DATE)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Date"); } setObject(theName, theNamespace, value); } public float getFloat(final String theName, final String theNamespace) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.FLOAT)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Float"); } return (Float) getObject(theName, theNamespace); } public void setFloat(final String theName, final String theNamespace, final float value) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.FLOAT)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Float"); } setObject(theName, theNamespace, value); }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java File path: /columba-1.4-src/core/src/main/java/org/columba/core/context/base/StructureValue.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
{
1
{
2
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
2
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
3
		if (!t.getBaseType().equals(BASETYPE.FLOAT)) {
3
		if (!t.getBaseType().equals(BASETYPE.DATE)) {
4
			throw new IllegalArgumentException("attribute <" + theName + ","
4
			throw new IllegalArgumentException("attribute <" + theName + ","
5
					+ theNamespace + "> is not of type Float");
5
					+ theNamespace + "> is not of type Date");
6
		}
6
		}
7
		setObject(theName, theNamespace, value);
7
		setObject(theName, theNamespace, value);
8
	}
8
	}
9
	public double getDouble(final String theName, final String theNamespace) {
9
	public float getFloat(final String theName, final String theNamespace) {
10
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
10
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
11
		if (!t.getBaseType().equals(BASETYPE.DOUBLE)) {
11
		if (!t.getBaseType().equals(BASETYPE.FLOAT)) {
12
			throw new IllegalArgumentException("attribute <" + theName + ","
12
			throw new IllegalArgumentException("attribute <" + theName + ","
13
					+ theNamespace + "> is not of type Double");
13
					+ theNamespace + "> is not of type Float");
14
		}
14
		}
15
		return (Double) getObject(theName, theNamespace);
15
		return (Float) getObject(theName, theNamespace);
16
	}
16
	}
17
	public void setDouble(final String theName, final String theNamespace,
17
	public void setFloat(final String theName, final String theNamespace,
18
			final double value) {
18
			final float value) {
19
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
19
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
20
		if (!t.getBaseType().equals(BASETYPE.DOUBLE)) {
20
		if (!t.getBaseType().equals(BASETYPE.FLOAT)) {
21
			throw new IllegalArgumentException("attribute <" + theName + ","
21
			throw new IllegalArgumentException("attribute <" + theName + ","
22
					+ theNamespace + "> is not of type Double");
22
					+ theNamespace + "> is not of type Float");
23
		}
23
		}
24
		setObject(theName, theNamespace, value);
24
		setObject(theName, theNamespace, value);
25
	}
25
	}
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