File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTPConfigurator.java | File path: /apache-ant-1.7.0/src/org/apache/tools/ant/taskdefs/optional/net/FTPConfigurator.java | |||
Method name: FTPClient configure(FTPClient, FTP)
|
Method name: FTPClient configure(FTPClient, FTP)
|
|||
Number of AST nodes: 16 | Number of AST nodes: 16 | |||
1 | String defaultDateFormatConfig = task.getDefaultDateFormatConfig();↵ | |||
2 | if (defaultDateFormatConfig != null) {↵ | |||
3 | config.setDefaultDateFormatStr(defaultDateFormatConfig);↵ | |||
4 | task.log("custom config: default date format = "↵ | |||
5 | + defaultDateFormatConfig, Project.MSG_VERBOSE);↵ | |||
6 | }↵ | |||
1 | String recentDateFormatConfig = task.getRecentDateFormatConfig();↵ | 7 | String recentDateFormatConfig = task.getRecentDateFormatConfig();↵ | |
2 | if (recentDateFormatConfig != null) {↵ | 8 | if (recentDateFormatConfig != null) {↵ | |
3 | config.setRecentDateFormatStr(recentDateFormatConfig);↵ | 9 | config.setRecentDateFormatStr(recentDateFormatConfig);↵ | |
4 | task.log("custom config: recent date format = "↵ | 10 | task.log("custom config: recent date format = "↵ | |
5 | + recentDateFormatConfig, Project.MSG_VERBOSE);↵ | 11 | + recentDateFormatConfig, Project.MSG_VERBOSE);↵ | |
6 | }↵ | 12 | }↵ | |
7 | String serverLanguageCodeConfig = task.getServerLanguageCodeConfig();↵ | 13 | String serverLanguageCodeConfig = task.getServerLanguageCodeConfig();↵ | |
8 | if (serverLanguageCodeConfig != null) {↵ | 14 | if (serverLanguageCodeConfig != null) {↵ | |
9 | config.setServerLanguageCode(serverLanguageCodeConfig);↵ | 15 | config.setServerLanguageCode(serverLanguageCodeConfig);↵ | |
10 | task.log("custom config: server language code = "↵ | 16 | task.log("custom config: server language code = "↵ | |
11 | + serverLanguageCodeConfig, Project.MSG_VERBOSE);↵ | 17 | + serverLanguageCodeConfig, Project.MSG_VERBOSE);↵ | |
12 | }↵ | 18 | }↵ | |
13 | String serverTimeZoneConfig = task.getServerTimeZoneConfig();↵ | 19 | String serverTimeZoneConfig = task.getServerTimeZoneConfig();↵ | |
14 | if (serverTimeZoneConfig != null) {↵ | 20 | if (serverTimeZoneConfig != null) {↵ | |
15 | config.setServerTimeZoneId(serverTimeZoneConfig);↵ | 21 | config.setServerTimeZoneId(serverTimeZoneConfig);↵ | |
16 | task.log("custom config: server time zone ID = "↵ | 22 | task.log("custom config: server time zone ID = "↵ | |
17 | + serverTimeZoneConfig, Project.MSG_VERBOSE);↵ | 23 | + serverTimeZoneConfig, Project.MSG_VERBOSE);↵ | |
18 | }↵ | 24 |
| |
19 | String shortMonthNamesConfig = task.getShortMonthNamesConfig();↵ | |||
20 | if (shortMonthNamesConfig != null) {↵ | |||
21 | config.setShortMonthNames(shortMonthNamesConfig);↵ | |||
22 | task.log("custom config: short month names = "↵ | |||
23 | + shortMonthNamesConfig, Project.MSG_VERBOSE);↵ | |||
24 | } | |||
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 in the same method |
Number of node comparisons | 112 |
Number of mapped statements | 16 |
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) | 4.3 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13 | String recentDateFormatConfig = task.getRecentDateFormatConfig(); | 13 | String recentDateFormatConfig = task.getRecentDateFormatConfig(); | ||||||||||||||||||
14 | if (recentDateFormatConfig != null) | 14 | if (recentDateFormatConfig != null) | ||||||||||||||||||
15 | config.setRecentDateFormatStr(recentDateFormatConfig); | 15 | config.setRecentDateFormatStr(recentDateFormatConfig); | ||||||||||||||||||
16 | task.log("custom config: recent date format = " + recentDateFormatConfig, Project.MSG_VERBOSE); | 16 | task.log("custom config: recent date format = " + recentDateFormatConfig, Project.MSG_VERBOSE); | ||||||||||||||||||
17 | String serverLanguageCodeConfig = task.getServerLanguageCodeConfig(); | 17 | String serverLanguageCodeConfig = task.getServerLanguageCodeConfig(); | ||||||||||||||||||
18 | if (serverLanguageCodeConfig != null) | 18 | if (serverLanguageCodeConfig != null) | ||||||||||||||||||
19 | config.setServerLanguageCode(serverLanguageCodeConfig); | 19 | config.setServerLanguageCode(serverLanguageCodeConfig); | ||||||||||||||||||
20 | task.log("custom config: server language code = " + serverLanguageCodeConfig, Project.MSG_VERBOSE); | 20 | task.log("custom config: server language code = " + serverLanguageCodeConfig, Project.MSG_VERBOSE); | ||||||||||||||||||
21 | String serverTimeZoneConfig = task.getServerTimeZoneConfig(); | 21 | String serverTimeZoneConfig = task.getServerTimeZoneConfig(); | ||||||||||||||||||
22 | if (serverTimeZoneConfig != null) | 22 | if (serverTimeZoneConfig != null) | ||||||||||||||||||
23 | config.setServerTimeZoneId(serverTimeZoneConfig); | 23 | config.setServerTimeZoneId(serverTimeZoneConfig); | ||||||||||||||||||
24 | task.log("custom config: server time zone ID = " + serverTimeZoneConfig, Project.MSG_VERBOSE); | 24 | task.log("custom config: server time zone ID = " + serverTimeZoneConfig, Project.MSG_VERBOSE); | ||||||||||||||||||
25 | String shortMonthNamesConfig = task.getShortMonthNamesConfig(); |
| 9 | String defaultDateFormatConfig = task.getDefaultDateFormatConfig(); | |||||||||||||||||
26 | if (shortMonthNamesConfig != null) |
| 10 | if (defaultDateFormatConfig != null) | |||||||||||||||||
27 | config.setShortMonthNames(shortMonthNamesConfig); |
| 11 | config.setDefaultDateFormatStr(defaultDateFormatConfig); | |||||||||||||||||
28 | task.log("custom config: short month names = " + shortMonthNamesConfig, Project.MSG_VERBOSE); |
| 12 | task.log("custom config: default date format = " + defaultDateFormatConfig, Project.MSG_VERBOSE); |
Row | Violation |
---|---|
1 | Expression config.setShortMonthNames(shortMonthNamesConfig) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
2 | Expression config.setDefaultDateFormatStr(defaultDateFormatConfig) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
3 | Expression config.setShortMonthNames(shortMonthNamesConfig) is a void method call, and thus it cannot be parameterized |
4 | Expression config.setDefaultDateFormatStr(defaultDateFormatConfig) is a void method call, and thus it cannot be parameterized |