String resourceName = getBaseURL().toString() + "plugin.properties";
try
{
InputStream inputStream = new URL(resourceName).openStream();
bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);
inputStream.close();
}
catch (IOException ioException)
{
throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties");
}
String resourceName = getBaseURL().toString() + "plugin.properties";
try
{
InputStream inputStream = new URL(resourceName).openStream();
bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);
inputStream.close();
}
catch (IOException ioException)
{
throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties");
}
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/common/EMFPlugin.java
|
|
File path: /emf-2.4.1/src/org/eclipse/emf/common/util/DelegatingResourceLocator.java
|
Method name: String getString(String, boolean)
|
|
Method name: String doGetString(String, boolean)
|
Number of AST nodes: 5
|
|
Number of AST nodes: 5
|
|
1 | String resourceName = getBaseURL().toString() + "plugin.properties";↵ | | 1 | String resourceName = getBaseURL().toString() + "plugin.properties";↵
|
2 | try↵ | | 2 | try↵
|
3 | {↵ | | 3 | {↵
|
4 | InputStream inputStream = new URL(resourceName).openStream();↵ | | 4 | InputStream inputStream = new URL(resourceName).openStream();↵
|
5 | bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);↵ | | 5 | bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream);↵
|
6 | inputStream.close();↵ | | 6 | inputStream.close();↵
|
7 | }↵ | | 7 | ↵
|
8 | ↵ | | 8 | }↵
|
9 | catch (IOException ioException)↵ | | 9 | catch (IOException ioException)↵
|
10 | {↵ | | 10 | ↵
|
11 | ↵ | | 11 | {↵
|
12 | throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties");↵ | | 12 | throw new MissingResourceException("Missing properties: " + resourceName, getClass().getName(), "plugin.properties");↵
|
13 | } | | 13 | }
|
See real code fragment |
|
See real code fragment |
Summary
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 in different classes |
Number of node comparisons | 19 |
-
{Non-refactorable}
Mapping Summary
Number of mapped statements | 5 |
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.0 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | String resourceName = getBaseURL().toString() + "plugin.properties"; | | 10 | String resourceName = getBaseURL().toString() + "plugin.properties"; |
6 | try | | 11 | try |
7 | InputStream inputStream = new URL(resourceName).openStream(); | | 12 | InputStream inputStream = new URL(resourceName).openStream(); |
8 | bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream); | | 13 | bundle = untranslatedResourceBundle = new PropertyResourceBundle(inputStream); |
9 | | | 14 | |
Precondition Violations (1)
Row |
Violation |
1 | Type java.lang.Class<> of variable getClass() does not match with type java.lang.Class<> of variable getClass() |