File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBlob.java | File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeTime.java | |||
Method name: void loadProperties()
|
Method name: void loadProperties()
|
|||
Number of AST nodes: 13 | Number of AST nodes: 12 | |||
1 | _readBlobs = false; // set to the default↵ | 1 | useJavaDefaultFormat =true; // set to use the Java default↵ | |
2 | String readBlobsString = DTProperties.get(↵ | 2 | String useJavaDefaultFormatString = DTProperties.get(↵ | |
3 | thisClassName, "readBlobs");↵ | 3 | thisClassName, "↵ | |
4 | if (readBlobsString != null && readBlobs↵ | 4 | useJavaDefaultFormat");↵ | |
5 | String.equals("true"))↵ | 5 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false"))↵ | |
6 | _readBlobs = true;↵ | |||
7 | _readCompleteBlobs = false↵ | 6 | useJavaDefaultFormat =false;↵ | |
7 | // get which locale-dependent format to use↵ | |||
8 | ; // set to the default↵ | 8 | localeFormat =DateFormat.SHORT; // set to use the Java default↵ | |
9 | String readCompleteBlobsString = DTProperties.get(↵ | 9 | String localeFormatString = DTProperties.get(↵ | |
10 | thisClassName, "readCompleteBlobs");↵ | 10 | thisClassName, "↵ | |
11 | if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true"))↵ | |||
12 | _readCompleteBlobs = true;↵ | |||
13 | _readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; // set to default↵ | |||
14 | String readBlobsSize↵ | 11 | localeFormat");↵ | |
12 | if (localeFormatString != null)↵ | |||
13 | localeFormat = Integer.parseInt(localeFormatString);↵ | |||
14 | // use lenient input or force user to enter exact format↵ | |||
15 | lenient = true; // set to allow less stringent input↵ | |||
15 | String = DTProperties.get(↵ | 16 | String lenientString = DTProperties.get(↵ | |
16 | thisClassName, "readBlobsSize");↵ | 17 | thisClassName, "↵ | |
17 | if (readBlobsSizeString != null)↵ | |||
18 | _readBlobsSize = Integer.parseInt(readBlobsSizeString);↵ | |||
19 | propertiesAlreadyLoaded = tru↵ | 18 | lenient");↵ | |
19 | if (lenientString != null && lenientString.equals("false"))↵ | |||
20 | e; | 20 | lenient =false; | |
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) | 1.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 43 |
Number of mapped statements | 12 |
Number of unmapped statements in the first code fragment | 1 |
Number of unmapped statements in the second code fragment | 0 |
Time elapsed for statement mapping (ms) | 5.8 |
Clone type | Type 3 |
ID | Statement | ID | Statement | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2 | _readBlobs = false; |
| | |||||||||||||||||
3 | String readBlobsString = DTProperties.get(thisClassName, "readBlobs"); |
| 3 | String useJavaDefaultFormatString = DTProperties.get(thisClassName, "useJavaDefaultFormat"); | ||||||||||||||||
4 | if (readBlobsString != null && readBlobsString.equals("true")) |
| 4 | if (useJavaDefaultFormatString != null && useJavaDefaultFormatString.equals("false")) | ||||||||||||||||
5 | _readBlobs = true; |
| 5 | useJavaDefaultFormat = false; | ||||||||||||||||
6 | _readCompleteBlobs = false; |
| 10 | lenient = true; | ||||||||||||||||
7 | String readCompleteBlobsString = DTProperties.get(thisClassName, "readCompleteBlobs"); |
| 11 | String lenientString = DTProperties.get(thisClassName, "lenient"); | ||||||||||||||||
8 | if (readCompleteBlobsString != null && readCompleteBlobsString.equals("true")) |
| 12 | if (lenientString != null && lenientString.equals("false")) | ||||||||||||||||
9 | _readCompleteBlobs = true; |
| 13 | lenient = false; | ||||||||||||||||
10 | _readBlobsSize = LARGE_COLUMN_DEFAULT_READ_LENGTH; |
| 6 | localeFormat = DateFormat.SHORT; | ||||||||||||||||
11 | String readBlobsSizeString = DTProperties.get(thisClassName, "readBlobsSize"); |
| 7 | String localeFormatString = DTProperties.get(thisClassName, "localeFormat"); | ||||||||||||||||
12 | if (readBlobsSizeString != null) |
| 8 | if (localeFormatString != null) | ||||||||||||||||
13 | _readBlobsSize = Integer.parseInt(readBlobsSizeString); |
| 9 | localeFormat = Integer.parseInt(localeFormatString); | ||||||||||||||||
14 | propertiesAlreadyLoaded = true; |
| 2 | useJavaDefaultFormat = true; |
Row | Violation |
---|---|
1 | Unmatched statement _readBlobs=false; cannot be moved before the extracted code, because it has control dependencies from statements that will be extracted |
2 | Expression _readBlobs is a field being modified, and thus it cannot be parameterized |
3 | Expression useJavaDefaultFormat is a field being modified, and thus it cannot be parameterized |
4 | Expression propertiesAlreadyLoaded is a field being modified, and thus it cannot be parameterized |
5 | Expression useJavaDefaultFormat is a field being modified, and thus it cannot be parameterized |