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
int value= Integer.parseInt(number);
				if (value < 0) {
					status.setError(PreferencesMessages.getFormattedString("CodeFormatterPreferencePage.invalid_input", number)); 
				}
			} catch (NumberFormatException e) {
				status.setError(PreferencesMessages.getFormattedString("CodeFormatterPreferencePage.invalid_input", number)); 
			}
		}
		return status;
	}
	
	private static int getPositiveIntValue(String string, int dflt) {
		try {
			int i= Integer.parseInt(string);
			if (i >= 0) {
				return i;
			}
		} catch (NumberFormatException e) {
		}
		return dflt;
	}		
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock#getFullBuildDialogStrings(boolean)
	 */
	protected String[] getFullBuildDialogStrings(boolean workspaceSettings) {
		return null; 
	}
		
}