File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java | File path: /emf-2.4.1/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java | |||
Method name: void save(OutputStream, Map,?>)
|
Method name: void load(InputStream, Map,?>)
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | URIConverter.Cipher cipher = options != null ?↵ | 1 | URIConverter.Cipher cipher = options != null ?↵ | |
2 | (URIConverter.Cipher)options.get(Resource.OPTION_CIPHER) :↵ | 2 | (URIConverter.Cipher)options.get(Resource.OPTION_CIPHER) :↵ | |
3 | null;↵ | 3 | null;↵ | |
4 | if (cipher != null)↵ | 4 | if (cipher != null)↵ | |
5 | {↵ | 5 | {↵ | |
6 | try↵ | 6 | ↵ | |
7 | try↵ | |||
7 | {↵ | 8 | {↵ | |
8 | outputStream = cipher.encrypt(outputStream);↵ | 9 | inputStream = cipher.decrypt(inputStream);↵ | |
9 | }↵ | 10 | ↵ | |
11 | }↵ | |||
10 | catch (Exception e)↵ | 12 | catch (Exception e)↵ | |
11 | {↵ | 13 | ↵ | |
14 | {↵ | |||
12 | throw new IOWrappedException(e);↵ | 15 | throw new IOWrappedException(e);↵ | |
13 | }↵ | 16 | ↵ | |
17 | }↵ | |||
14 | } | 18 | } | |
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.3 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 6 |
Number of mapped statements | 3 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 1 |
Time elapsed for statement mapping (ms) | 2.8 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | URIConverter.Cipher cipher = options != null ? (URIConverter.Cipher)options.get(Resource.OPTION_CIPHER) : null; |
| 17 | URIConverter.Cipher cipher = options != null ? (URIConverter.Cipher)options.get(Resource.OPTION_CIPHER) : null; | |||||||||||||||||||
7 | if (cipher != null) | 18 | if (cipher != null) | ||||||||||||||||||||
8 | try | 19 | try | ||||||||||||||||||||
9 | outputStream = cipher.encrypt(outputStream); |
| | ||||||||||||||||||||
|
| 20 | inputStream = cipher.decrypt(inputStream); |
Row | Violation |
---|---|
1 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
2 | Type of variable options.get(Resource.OPTION_CIPHER) does not match with type of variable options.get(Resource.OPTION_CIPHER) |
3 | Type java.util.Map<,> of variable options does not match with type java.util.Map<,> of variable options |
4 | Unmatched statement outputStream=cipher.encrypt(outputStream); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
5 | Unmatched statement outputStream=cipher.encrypt(outputStream); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |
6 | Unmatched statement inputStream=cipher.decrypt(inputStream); cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
7 | Unmatched statement inputStream=cipher.decrypt(inputStream); cannot be moved before or after the extracted code, because it throws exception(s) that should be caught by a try block that will be extracted |