File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/config/Config.java | File path: /columba-1.4-src/plugins/org.columba.chat.altura/src/org/columba/chat/config/Config.java | |||
Method name: void load()
|
Method name: void load()
|
|||
Number of AST nodes: 3 | Number of AST nodes: 3 | |||
1 | if (properties.getProperty("host") != null)↵ | 1 | if (properties.getProperty("resource") != null)↵ | |
2 | account.setHost(properties.getProperty("host"));↵ | 2 | account.setResource(properties.getProperty("resource"));↵ | |
3 | else↵ | 3 | else↵ | |
4 | account.setHost("jabber.org"); | 4 | account.setResource("Altura"); | |
See real code fragment | See real code fragment |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 9 |
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.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7 | if (properties.getProperty("host") != null) |
| 12 | if (properties.getProperty("resource") != null) | |||||||||||||||||
8 | account.setHost(properties.getProperty("host")); |
| 13 | account.setResource(properties.getProperty("resource")); | |||||||||||||||||
else | else | ||||||||||||||||||||
9 | account.setHost("jabber.org"); |
| 14 | account.setResource("Altura"); |
Row | Violation |
---|---|
1 | Expression account.setHost(properties.getProperty("host")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression account.setResource(properties.getProperty("resource")) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression account.setHost(properties.getProperty("host")) is a void method call, and thus it cannot be parameterized |
4 | Expression account.setResource(properties.getProperty("resource")) is a void method call, and thus it cannot be parameterized |
5 | Expression account.setHost("jabber.org") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
6 | Expression account.setResource("Altura") cannot be parameterized, because it has dependencies to/from statements that will be extracted |
7 | Expression account.setHost("jabber.org") is a void method call, and thus it cannot be parameterized |
8 | Expression account.setResource("Altura") is a void method call, and thus it cannot be parameterized |