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/WhiteSpaceTabPage.java
refreshState();
	    }
	    
	    private void restoreSelections() {
	        Node node;
	        final int innerIndex= getValidatedIndex(PREF_INNER_INDEX);
			node= (Node)fIndexedNodeList.get(innerIndex);
			if (node instanceof InnerNode) {
			    fInnerViewer.expandToLevel(node, 0);
			    fInnerViewer.setSelection(new StructuredSelection(new Object[] {node}));
			    fLastSelected= (InnerNode)node;
			}
			
	        final int optionIndex= getValidatedIndex(PREF_OPTION_INDEX);
			node= (Node)fIndexedNodeList.get(optionIndex);
			if (node instanceof OptionNode) {
			    fOptionsViewer.setSelection(new StructuredSelection(new Object[] {node}));
			}
	    }
	    
	    private int getValidatedIndex(String key) {
			int index;
			try {
				index= fDialogSettings.getInt(key);
			} catch (NumberFormatException ex) {
				index= 0;
			}
			if (index < 0 || index > fIndexedNodeList.size() - 1) {
				index= 0; 
			}