Bug 40424 NPE resetting Java > Code Formatter preference page [formatter]
M2 candidate - Window - Preferences - go to the Java -> Code Formatter page - press Restore Defaults button at bottom, will get the attached exception
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/CodeFormatterConfigurationBlock.java
private static final String TAB= JavaCore.TAB;
	private static final String SPACE= JavaCore.SPACE;
	
	private static final String CLEAR_ALL= JavaCore.CLEAR_ALL;
	private static final String PRESERVE_ONE= JavaCore.PRESERVE_ONE;
			
	private String fPreviewText;
	private IDocument fPreviewDocument;
	
	private Text fTabSizeTextBox;
	private SourceViewer fSourceViewer;
	
	private PixelConverter fPixelConverter;
	
	private IStatus fLineLengthStatus;
	private IStatus fTabSizeStatus;	
	
	public CodeFormatterConfigurationBlock(IStatusChangeListener context, IJavaProject project) {
		super(context, project);
			
		fPreviewDocument= new Document();
		fPreviewText= loadPreviewFile("CodeFormatterPreviewCode.txt");		
		fLineLengthStatus= new StatusInfo();
		fTabSizeStatus= new StatusInfo();
	}
	
	protected String[] getAllKeys() {
		return new String[] {
			PREF_NEWLINE_OPENING_BRACES, PREF_NEWLINE_CONTROL_STATEMENT, PREF_NEWLINE_CLEAR_ALL,
			PREF_NEWLINE_ELSE_IF, PREF_NEWLINE_EMPTY_BLOCK, PREF_LINE_SPLIT,