File path: /jEdit-4.2/src/org/gjt/sp/jedit/gui/OptionsDialog.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/browser/BrowserView.java | |||
Method name: void PaneNameRenderer()
|
Method name: void ParentDirectoryRenderer()
|
|||
Number of AST nodes: 4 | Number of AST nodes: 4 | |||
1 | paneFont = UIManager.getFont("Tree.font");↵ | 1 | plainFont = UIManager.getFont("Tree.font");↵ | |
2 | if(paneFont == null)↵ | 2 | if(plainFont == null)↵ | |
3 | paneFont = jEdit.getFontProperty("metal.secondary.font");↵ | 3 | plainFont = jEdit.getFontProperty("metal.secondary.font");↵ | |
4 | groupFont = paneFont.deriveFont(Font.BOLD); | 4 | boldFont = new Font(plainFont.getName(),Font.BOLD,plainFont.getSize()); | |
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.1 |
Clones location | Clones are in different classes having the same super class |
Number of node comparisons | 7 |
Number of mapped statements | 4 |
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.5 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | paneFont = UIManager.getFont("Tree.font"); |
| 1 | plainFont = UIManager.getFont("Tree.font"); | |||||||||||||||
2 | if (paneFont == null) |
| 2 | if (plainFont == null) | |||||||||||||||
3 | paneFont = jEdit.getFontProperty("metal.secondary.font"); |
| 3 | plainFont = jEdit.getFontProperty("metal.secondary.font"); | |||||||||||||||
4 | groupFont = paneFont.deriveFont(Font.BOLD); |
| 4 | boldFont = new Font(plainFont.getName(), Font.BOLD, plainFont.getSize()); |
Row | Violation |
---|---|
1 | Expression paneFont is a field being modified, and thus it cannot be parameterized |
2 | Expression plainFont is a field being modified, and thus it cannot be parameterized |
3 | Expression paneFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
4 | Expression plainFont cannot be parameterized, because it has dependencies to/from statements that will be extracted |
5 | Expression paneFont is a field being modified, and thus it cannot be parameterized |
6 | Expression plainFont is a field being modified, and thus it cannot be parameterized |
7 | Expression paneFont.deriveFont(Font.BOLD) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
8 | Expression new Font(plainFont.getName(),Font.BOLD,plainFont.getSize()) cannot be parameterized, because it has dependencies to/from statements that will be extracted |
9 | The refactoring of the clones is infeasible, because classes org.gjt.sp.jedit.gui.OptionsDialog.PaneNameRenderer and org.gjt.sp.jedit.browser.BrowserView.ParentDirectoryRenderer do not have a common superclass |