Bug 74614 Code formatter preference page: bogus preview code
3.1 M2: Code Formatter > White Space > Parameterized type > Parameterized type Preview: "Map<String, Element> map = new<String, Element> HashMap();" is wrong. BTW, in tree double "Parameterized type" is ugly, why not use something like "Type" on the second level.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/formatter/WhiteSpaceOptions.java
public List getSnippets() {
            return fSnippets;
        }
        
        public void getCheckedLeafs(List list) {
            if (getChecked()) 
                list.add(this);
        }
	}
	
	
	
	/**
	 * Preview snippets.
	 */
	
    private final static PreviewSnippet FOR_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "for (int i= 0, j= array.length; i < array.length; i++, j--) {}\nfor (String s : names) {}" 
    );
    private final static PreviewSnippet WHILE_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "while (condition) {}; do {} while (condition);" 
    );
    private final static PreviewSnippet CATCH_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "try { number= Integer.parseInt(value); } catch (NumberFormatException e) {}"); 
    private final static PreviewSnippet IF_PREVIEW= new PreviewSnippet(
    CodeFormatter.K_STATEMENTS, 
    "if (condition) { return foo; } else {return bar;}");