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
addCheckBox(newlineComposite, label, PREF_NEWLINE_OPENING_BRACES, insertNotInsert, 0);	
		
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.newline_control_statement.label"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_CONTROL_STATEMENT, insertNotInsert, 0);	
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.newline_clear_lines"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_CLEAR_ALL, new String[] { CLEAR_ALL, PRESERVE_ONE }, 0);	
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.newline_else_if.label"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_ELSE_IF, insertNotInsert, 0);	
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.newline_empty_block.label"); 
		addCheckBox(newlineComposite, label, PREF_NEWLINE_EMPTY_BLOCK, insertNotInsert, 0);	
		
		layout= new GridLayout();
		layout.numColumns= nColumns;	
		
		Composite lineSplittingComposite= new Composite(folder, SWT.NULL);
		lineSplittingComposite.setLayout(layout);
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.split_line.label"); 
		addTextField(lineSplittingComposite, label, PREF_LINE_SPLIT, 0, textWidth);
		layout= new GridLayout();
		layout.numColumns= nColumns;	
		
		Composite styleComposite= new Composite(folder, SWT.NULL);
		styleComposite.setLayout(layout);
		
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.style_compact_assignement.label"); 
		addCheckBox(styleComposite, label, PREF_STYLE_COMPACT_ASSIGNEMENT, new String[] { COMPACT, NORMAL }, 0);		
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.style_space_castexpression.label"); 
		addCheckBox(styleComposite, label, PREF_SPACE_CASTEXPRESSION, insertNotInsert, 0);		
		label= PreferencesMessages.getString("CodeFormatterPreferencePage.tab_char.label"); 
		addCheckBox(styleComposite, label, PREF_TAB_CHAR, new String[] { TAB, SPACE }, 0);