try {
p = (IComponentPlugin) ext.instanciateExtension(null);
p.init();
} catch (final PluginException e) {
LOG.severe(e.getMessage());
if (Logging.DEBUG) {
e.printStackTrace();
}
}
try {
p = (IComponentPlugin) ext.instanciateExtension(null);
p.postStartup();
} catch (final PluginException e) {
LOG.severe(e.getMessage());
if (Logging.DEBUG) {
e.printStackTrace();
}
}
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/component/ComponentManager.java
|
|
File path: /columba-1.4-src/core/src/main/java/org/columba/core/component/ComponentManager.java
|
Method name: void init()
|
|
Method name: void postStartup()
|
Number of AST nodes: 3
|
|
Number of AST nodes: 3
|
|
1 | try {↵ | | 1 | try {↵
|
2 | p = (IComponentPlugin) ext.instanciateExtension(null);↵ | | 2 | p = (IComponentPlugin) ext.instanciateExtension(null);↵
|
3 | p.init();↵ | | 3 | p.postStartup();↵
|
4 | } catch (final PluginException e) {↵ | | 4 | } catch (final PluginException e) {↵
|
5 | LOG.severe(e.getMessage());↵ | | 5 | LOG.severe(e.getMessage());↵
|
|
6 | if (Logging.DEBUG) {↵ | | 6 | if (Logging.DEBUG) {↵
|
7 | e.printStackTrace();↵ | | 7 | e.printStackTrace();↵
|
8 | }↵ | | 8 | }↵
|
9 | ↵ | | 9 | ↵
|
10 | } | | 10 | }
|
See real code fragment |
|
See real code fragment |
Summary
Number of common nesting structure subtrees | 1 |
Number of refactorable cases | 1 |
Number of non-refactorable cases | 0 |
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 | 10 |
-
{Refactorable}
Mapping Summary
Number of mapped statements | 3 |
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) | 2.2 |
Clone type | Type 2 |
Mapped Statements
ID |
Statement |
|
ID |
Statement |
5 | try | | 5 | try |
6 | p = (IComponentPlugin)ext.instanciateExtension(null); | | 6 | p = (IComponentPlugin)ext.instanciateExtension(null); |
7 | | | 7 | |
Precondition Violations (4)
Row |
Violation |
1 | Expression p.init() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression p.postStartup() cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression p.init() is a void method call, and thus it cannot be parameterized |
4 | Expression p.postStartup() is a void method call, and thus it cannot be parameterized |