File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/DataValue.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/xml/type/internal/DataValue.java | |||
Method name: void setQueryString(String)
|
Method name: void setFragment(String)
|
|||
Number of AST nodes: 7 | Number of AST nodes: 7 | |||
1 | if (!isGenericURI()) {↵ | 1 | if (!isGenericURI()) {↵ | |
2 | throw new MalformedURIException(↵ | 2 | throw new MalformedURIException(↵ | |
3 | "Query string can only be set for a generic URI!");↵ | 3 | "Fragment can only be set for a generic URI!");↵ | |
4 | }↵ | 4 | }↵ | |
5 | else if (getPath() == null) {↵ | 5 | else if (getPath() == null) {↵ | |
6 | throw new MalformedURIException(↵ | 6 | throw new MalformedURIException(↵ | |
7 | "Query string cannot be set when path is null!");↵ | 7 | "Fragment cannot be set when path is null!");↵ | |
8 | }↵ | 8 | }↵ | |
9 | else if (!isURIString(p_queryString)) {↵ | 9 | else if (!isURIString(p_fragment)) {↵ | |
10 | throw new MalformedURIException(↵ | 10 | throw new MalformedURIException(↵ | |
11 | "Query string contains invalid character!");↵ | 11 | "Fragment contains invalid character!");↵ | |
12 | }↵ | 12 | }↵ | |
13 | else {↵ | 13 | else {↵ | |
14 | m_queryString = p_queryString;↵ | 14 | m_fragment = p_fragment;↵ | |
15 | } | 15 |
| |
See real code fragment | See real code fragment |
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 0 |
Number of non-refactorable cases | 1 |
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.4 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 36 |
Number of mapped statements | 7 |
Number of unmapped statements in the first code fragment | 0 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3 | else if (!isGenericURI()) | 3 | else if (!isGenericURI()) | ||||||||||||||||
4 | throw new MalformedURIException("Query string can only be set for a generic URI!"); |
| 4 | throw new MalformedURIException("Fragment can only be set for a generic URI!"); | |||||||||||||||
5 | else if (getPath() == null) | 5 | else if (getPath() == null) | ||||||||||||||||
6 | throw new MalformedURIException("Query string cannot be set when path is null!"); |
| 6 | throw new MalformedURIException("Fragment cannot be set when path is null!"); | |||||||||||||||
7 | else if (!isURIString(p_queryString)) |
| 7 | else if (!isURIString(p_fragment)) | |||||||||||||||
8 | throw new MalformedURIException("Query string contains invalid character!"); |
| 8 | throw new MalformedURIException("Fragment contains invalid character!"); | |||||||||||||||
else | else | ||||||||||||||||||
9 | m_queryString = p_queryString; |
| 9 | m_fragment = p_fragment; |
Row | Violation |
---|---|
1 | Expression m_queryString is a field being modified, and thus it cannot be parameterized |
2 | Expression m_fragment is a field being modified, and thus it cannot be parameterized |