{ final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.INTEGER)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Integer"); } setObject(theName, theNamespace, value); } public Date getDate(final String theName, final String theNamespace) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.DATE)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type Date"); } return (Date) getObject(theName, theNamespace); } public void setDate(final String theName, final String theNamespace, final Date 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); }
{ final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.BINARY)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type binary"); } setObject(theName, theNamespace, value); } public InputStream getInputStream(final String theName, final String theNamespace) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.INPUTSTREAM)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type blob (binary inputstream)"); } return (InputStream) getObject(theName, theNamespace); } public void setInputStream(final String theName, final String theNamespace, final InputStream value) { final IAttributeType t = getType().getAttribute(theName, theNamespace); if (!t.getBaseType().equals(BASETYPE.INPUTSTREAM)) { throw new IllegalArgumentException("attribute <" + theName + "," + theNamespace + "> is not of type blob (binary inputstream)"); } 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.INTEGER)) {
3
		if (!t.getBaseType().equals(BASETYPE.BINARY)) {
4
			throw new IllegalArgumentException("attribute <" + theName + ","
4
			throw new IllegalArgumentException("attribute <" + theName + ","
5
					+ theNamespace + "> is not of type Integer");
5
					+ theNamespace + "> is not of type binary");
6
		}
6
		}
7
		setObject(theName, theNamespace, value);
7
		setObject(theName, theNamespace, value);
8
	}
8
	}
9
	public Date getDate(final String theName, final String theNamespace) {
9
	public InputStream getInputStream(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.DATE)) {
11
		if (!t.getBaseType().equals(BASETYPE.INPUTSTREAM)) {
12
			throw new IllegalArgumentException("attribute <" + theName + ","
12
			throw new IllegalArgumentException("attribute <" + theName + ","
13
					+ theNamespace + "> is not of type Date");
13
					+ theNamespace + "> is not of type blob (binary inputstream)");
14
		}
14
		}
15
		return (Date) getObject(theName, theNamespace);
15
		return (InputStream) getObject(theName, theNamespace);
16
	}
16
	}
17
	public void setDate(final String theName, final String theNamespace,
17
	public void setInputStream(final String theName, final String theNamespace,
18
			final Date value) {
18
			final InputStream value) {
19
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
19
		final IAttributeType t = getType().getAttribute(theName, theNamespace);
20
		if (!t.getBaseType().equals(BASETYPE.DATE)) {
20
		if (!t.getBaseType().equals(BASETYPE.INPUTSTREAM)) {
21
			throw new IllegalArgumentException("attribute <" + theName + ","
21
			throw new IllegalArgumentException("attribute <" + theName + ","
22
					+ theNamespace + "> is not of type Date");
22
					+ theNamespace + "> is not of type blob (binary inputstream)");
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