File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java | File path: /jEdit-4.2/src/org/gjt/sp/jedit/jEdit.java | |||
Method name: void initPLAF()
|
Method name: void initPLAF()
|
|||
Number of AST nodes: 5 | Number of AST nodes: 5 | |||
1 | Font secondaryFont = jEdit.getFontProperty(↵ | 1 | Font primaryFont = jEdit.getFontProperty(↵ | |
2 | "metal.secondary.font");↵ | 2 | "metal.primary.font");↵ | |
3 | if(secondaryFont != null)↵ | 3 | if(primaryFont != null)↵ | |
4 | {↵ | 4 | {↵ | |
5 | String secondaryFontString =↵ | 5 | String primaryFontString =↵ | |
6 | fontToString(secondaryFont);↵ | 6 | fontToString(primaryFont);↵ | |
7 | System.getProperties().put(↵ | 7 | System.getProperties().put(↵ | |
8 | "swing.plaf.metal.systemFont",↵ | 8 | "swing.plaf.metal.controlFont",↵ | |
9 | secondaryFontString);↵ | 9 | primaryFontString);↵ | |
10 | System.getProperties().put(↵ | 10 | System.getProperties().put(↵ | |
11 | "swing.plaf.metal.userFont",↵ | 11 | "swing.plaf.metal.menuFont",↵ | |
12 | secondaryFontString);↵ | 12 | primaryFontString);↵ | |
13 | } | 13 |
| |
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.2 |
Clones location | Clones are in the same method |
Number of node comparisons | 17 |
Number of mapped statements | 5 |
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) | 6.7 |
Clone type | Type 2 |
ID | Statement | ID | Statement | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6 | Font secondaryFont = jEdit.getFontProperty("metal.secondary.font"); |
| 1 | Font primaryFont = jEdit.getFontProperty("metal.primary.font"); | |||||||||||||
7 | if (secondaryFont != null) |
| 2 | if (primaryFont != null) | |||||||||||||
8 | String secondaryFontString = fontToString(secondaryFont); |
| 3 | String primaryFontString = fontToString(primaryFont); | |||||||||||||
9 | System.getProperties().put("swing.plaf.metal.systemFont", secondaryFontString); |
| 4 | System.getProperties().put("swing.plaf.metal.controlFont", primaryFontString); | |||||||||||||
10 | System.getProperties().put("swing.plaf.metal.userFont", secondaryFontString); |
| 5 | System.getProperties().put("swing.plaf.metal.menuFont", primaryFontString); |
Row | Violation |
---|