File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/AddAbbrevDialog.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/AddAbbrevDialog.java | |||
Method name: void actionPerformed(ActionEvent)
|
Method name: void actionPerformed(ActionEvent)
|
|||
Number of AST nodes: 6 | Number of AST nodes: 6 | |||
1 | String _abbrev = editor.getAbbrev();↵ | 1 | String _abbrev = editor.getAbbrev();↵ | |
2 | if(_abbrev == null || _abbrev.length() == 0)↵ | 2 | if(_abbrev == null || _abbrev.length() == 0)↵ | |
3 | {↵ | 3 | {↵ | |
4 | getToolkit().beep();↵ | 4 | getToolkit().beep();↵ | |
5 | return;↵ | 5 | return;↵ | |
6 | }↵ | 6 | }↵ | |
7 | Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),↵ | 7 | Abbrevs.addGlobalAbbrev(↵ | |
8 | _abbrev,editor.getExpansion());↵ | 8 | _abbrev,editor.getExpansion());↵ | |
9 | Abbrevs.expandAbbrev(view,false); | 9 |
| |
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.3 |
Clones location | Clones are in the same method |
Number of node comparisons | 19 |
Number of mapped statements | 6 |
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) | 1.4 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10 | String _abbrev = editor.getAbbrev(); | 3 | String _abbrev = editor.getAbbrev(); | ||||||||||||||||||||||
11 | if (_abbrev == null || _abbrev.length() == 0) | 4 | if (_abbrev == null || _abbrev.length() == 0) | ||||||||||||||||||||||
12 | getToolkit().beep(); | 5 | getToolkit().beep(); | ||||||||||||||||||||||
13 | return; |
| 6 | return; | |||||||||||||||||||||
14 | Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(), _abbrev, editor.getExpansion()); |
| 7 | Abbrevs.addGlobalAbbrev(_abbrev, editor.getExpansion()); | |||||||||||||||||||||
15 | Abbrevs.expandAbbrev(view, false); | 8 | Abbrevs.expandAbbrev(view, false); |
Row | Violation |
---|---|
1 | Conditional return; |
2 | Conditional return; |
3 | Expression Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),_abbrev,editor.getExpansion()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression Abbrevs.addGlobalAbbrev(_abbrev,editor.getExpansion()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),_abbrev,editor.getExpansion()) is a void method call, and thus it cannot be parameterized |
6 | Expression Abbrevs.addGlobalAbbrev(_abbrev,editor.getExpansion()) is a void method call, and thus it cannot be parameterized |
7 | Expression Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),_abbrev,editor.getExpansion()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression Abbrevs.addGlobalAbbrev(_abbrev,editor.getExpansion()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | Expression Abbrevs.addModeAbbrev(view.getBuffer().getMode().getName(),_abbrev,editor.getExpansion()) is a void method call, and thus it cannot be parameterized |
10 | Expression Abbrevs.addGlobalAbbrev(_abbrev,editor.getExpansion()) is a void method call, and thus it cannot be parameterized |