File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeClob.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTimestamp.java | |||
Method name: void loadProperties()
|
Method name: void loadProperties()
|
|||
Number of AST nodes: 17 | Number of AST nodes: 17 | |||
1 | _readClobs = false; // set to the default↵ | |||
2 | String readClobs↵ | 1 | if (propertiesAlreadyLoaded == false) {↵ | |
2 | // get parameters previously set by user, or set default values↵ | |||
3 | useJavaDefaultFormat =true; // set to use the Java default↵ | |||
3 | String = DTProperties.get(↵ | 4 | String useJavaDefaultFormatString = DTProperties.get(↵ | |
4 | thisClassName, "readClobs");↵ | 5 | thisClassName, "↵ | |
5 | if (readClobsString != null && readClobs↵ | 6 | useJavaDefaultFormat");↵ | |
6 | String.equals("true"))↵ | 7 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))↵ | |
7 | _readClobs = true;↵ | |||
8 | _readCompleteClobs = false; // set to the default↵ | |||
9 | String readCompleteClobs↵ | 8 | useJavaDefaultFormat =false;↵ | |
9 | // get which locale-dependent format to use↵ | |||
10 | localeFormat =DateFormat.SHORT; // set to use the Java default↵ | |||
10 | String = DTProperties.get(↵ | 11 | String localeFormatString = DTProperties.get(↵ | |
11 | thisClassName, "readCompleteClobs");↵ | 12 | thisClassName, "↵ | |
12 | if (readCompleteClobsString != null && readCompleteClobsString.equals("true"))↵ | |||
13 | _readCompleteClobs = true;↵ | |||
14 | ↵ | |||
15 | _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; // set to default↵ | |||
16 | String readClobsSize↵ | 13 | localeFormat");↵ | |
14 | if (localeFormatString != null)↵ | |||
15 | localeFormat = Integer.parseInt(localeFormatString);↵ | |||
16 | // use lenient input or force user to enter exact format↵ | |||
17 | lenient = true; // set to allow less stringent input↵ | |||
17 | String = DTProperties.get(↵ | 18 | String lenientString = DTProperties.get(↵ | |
18 | thisClassName, "readClobsSize");↵ | 19 | thisClassName, "↵ | |
19 | if (readClobsSizeString != null)↵ | |||
20 | _readClobsSize = Integer.parseInt(readClobsSizeString);↵ | |||
21 | _makeNewlinesVisibleInCell = true; // set to the default↵ | |||
22 | String makeNewlinesVisibl↵ | 20 | lenient");↵ | |
21 | if (lenientString != null && lenientString.equals("false"))↵ | |||
22 | lenient =false;↵ | |||
23 | // how to use Timestamp in WHERE clauses↵ | |||
24 | whereClauseUsage = USE_JDBC_ESCAPE_FORMAT; // default to SQL standard↵ | |||
23 | eString = DTProperties.get(↵ | 25 | String whereClauseUsageString = DTProperties.get(↵ | |
24 | thisClassName, "makeNewlinesVisibleInCell");↵ | 26 | thisClassName, "↵ | |
25 | if (makeNewlinesVisibleString != null && makeNewlinesVisibleString.equals("false"))↵ | |||
26 | _makeNewlinesVisibleInCell = false;↵ | |||
27 | propertiesAlreadyLoaded = true; | 27 | whereClauseUsage");↵ | |
28 | if (whereClauseUsageString != null)↵ | |||
29 | whereClauseUsage = Integer.parseInt(whereClauseUsageString);↵ | |||
30 |
| |||
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) | 1.5 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 44 |
Number of mapped statements | 12 |
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) | 5.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | _readClobs = false; |
| 2 | useJavaDefaultFormat = true; | ||||||||||||||||
3 | String readClobsString = DTProperties.get(thisClassName, "readClobs"); |
| 3 | String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat"); | ||||||||||||||||
4 | if (readClobsString != null && readClobsString.equals("true")) |
| 4 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false")) | ||||||||||||||||
5 | _readClobs = true; |
| 5 | useJavaDefaultFormat = false; | ||||||||||||||||
6 | _readCompleteClobs = false; |
| 10 | lenient = true; | ||||||||||||||||
7 | String readCompleteClobsString = DTProperties.get(thisClassName, "readCompleteClobs"); |
| 11 | String lenientString = DTProperties.get(thisClassName, "lenient"); | ||||||||||||||||
8 | if (readCompleteClobsString != null && readCompleteClobsString.equals("true")) |
| 12 | if (lenientString != null && lenientString.equals("false")) | ||||||||||||||||
9 | _readCompleteClobs = true; |
| 13 | lenient = false; | ||||||||||||||||
10 | _readClobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; |
| 6 | localeFormat = DateFormat.SHORT; | ||||||||||||||||
11 | String readClobsSizeString = DTProperties.get(thisClassName, "readClobsSize"); |
| 7 | String localeFormatString = DTProperties.get(thisClassName, "localeFormat"); | ||||||||||||||||
12 | if (readClobsSizeString != null) |
| 8 | if (localeFormatString != null) | ||||||||||||||||
13 | _readClobsSize = Integer.parseInt(readClobsSizeString); |
| 9 | localeFormat = Integer.parseInt(localeFormatString); |
Row | Violation |
---|