File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerBackupRestoreFrame.java | File path: /sql12/plugins/firebirdmanager/src/net/sourceforge/squirrel_sql/plugins/firebirdmanager/gui/FirebirdManagerBackupRestoreFrame.java | |||
Method name: void loadRestoreProperties()
|
Method name: void saveRestoreProperties()
|
|||
Number of AST nodes: 2 | Number of AST nodes: 2 | |||
1 | try {↵ | 1 | try {↵ | |
2 | prop.load(new FileInputStream(file)↵ | 2 | prop.store(new FileOutputStream(file),↵ | |
3 | );↵ | 3 | "FirebirdManager - Restore properties");↵ | |
4 | } catch (FileNotFoundException e) {↵ | 4 | } catch (FileNotFoundException e) {↵ | |
5 | JOptionPane.showMessageDialog(_application.getMainFrame(), i18n.LOAD_PROP_FAILED);↵ | 5 | JOptionPane.showMessageDialog(_application.getMainFrame(), i18n.SAVE_PROP_FAILED);↵ | |
6 | log.error(e.getLocalizedMessage());↵ | 6 | log.error(e.getLocalizedMessage());↵ | |
7 | } catch (IOException e) {↵ | 7 | } catch (IOException e) {↵ | |
8 | JOptionPane.showMessageDialog(_application.getMainFrame(), i18n.LOAD_PROP_FAILED);↵ | 8 | JOptionPane.showMessageDialog(_application.getMainFrame(), i18n.SAVE_PROP_FAILED);↵ | |
9 | log.error(e.getLocalizedMessage());↵ | 9 | log.error(e.getLocalizedMessage());↵ | |
10 | } | 10 | } | |
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.6 |
Clones location | Clones are declared in the same class |
Number of node comparisons | 5 |
Number of mapped statements | 2 |
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 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4 | try |
| 21 | try | |||||||||||||||||||||
5 | prop.load(new FileInputStream(file)); |
| 22 | prop.store(new FileOutputStream(file), "FirebirdManager - Restore properties"); |
Row | Violation |
---|---|
1 | Expression prop.load(new FileInputStream(file)) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
2 | Expression prop.store(new FileOutputStream(file),"FirebirdManager - Restore properties") is a method call throwing exception(s) that should be caught by a try block that will be extracted |
3 | Expression prop.load(new FileInputStream(file)) is a void method call, and thus it cannot be parameterized |
4 | Expression prop.store(new FileOutputStream(file),"FirebirdManager - Restore properties") is a void method call, and thus it cannot be parameterized |
5 | Expression prop.load(new FileInputStream(file)) is a method call throwing exception(s) that should be caught by a try block that will be extracted |
6 | Expression prop.store(new FileOutputStream(file),"FirebirdManager - Restore properties") is a method call throwing exception(s) that should be caught by a try block that will be extracted |
7 | Expression prop.load(new FileInputStream(file)) is a void method call, and thus it cannot be parameterized |
8 | Expression prop.store(new FileOutputStream(file),"FirebirdManager - Restore properties") is a void method call, and thus it cannot be parameterized |