Source:
<code>public void preferenceChange( PreferenceChangeEvent event ) { String property = event.getKey(); if ( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT.equals( property ) ) { if ( event.getNewValue() == null || !event.getNewValue().equals( event.getOldValue() ) ) { <START> fTimeoutEnabled = Boolean.parseBoolean( event.getNewValue().toString() ); <END> updateWaitTimeout(); fTimerThread.setState( ( fTimerThread.getWaitTimeout() > 0 ) ? TimerThreadState.RUNNING : TimerThreadState.HALTED ); } } else if ( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT_VALUE.equals( property ) ) { if ( !event.getNewValue().equals( event.getOldValue() ) ) { try { fTimeout = Integer.parseInt( event.getNewValue().toString() ); updateWaitTimeout(); fTimerThread.setState( ( fTimerThread.getWaitTimeout() > 0 ) ? TimerThreadState.RUNNING : TimerThreadState.HALTED ); } catch( NumberFormatException e ) { GdbPlugin.getDefault().getLog().log( new Status( IStatus.ERROR, GdbPlugin.PLUGIN_ID, "Invlaid timeout value" ) ); } } } else if ( IGdbDebugPreferenceConstants.PREF_COMMAND_CUSTOM_TIMEOUTS.equals( property ) ) { if ( event.getNewValue() instanceof String ) { fCustomTimeouts.initializeFromMemento( (String)event.getNewValue() ); } else if ( event.getNewValue() == null ) { fCustomTimeouts.clear(); } updateWaitTimeout(); fTimerThread.setState( ( fTimerThread.getWaitTimeout() > 0 ) ? TimerThreadState.RUNNING : TimerThreadState.HALTED ); } }</code><technical_language>if statement checks for event.getNewValue() == null do a event.getNewValue().toString(). a risk for NPE..</technical_language>

Target:
public void preferenceChange( PreferenceChangeEvent event ) { String property = event.getKey(); if ( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT.equals( property ) ) { if ( event.getNewValue() == null || !event.getNewValue().equals( event.getOldValue() ) ) { fTimeoutEnabled = ( event.getNewValue() != null ) ? Boolean.parseBoolean( event.getNewValue().toString() ) : Boolean.FALSE; updateWaitTimeout(); fTimerThread.setTimerThreadState( ( fTimerThread.getWaitTimeout() > 0 ) ? TimerThreadState.RUNNING : TimerThreadState.HALTED ); } } else if ( IGdbDebugPreferenceConstants.PREF_COMMAND_TIMEOUT_VALUE.equals( property ) ) { if ( event.getNewValue() == null || !event.getNewValue().equals( event.getOldValue() ) ) { try { fTimeout = ( event.getNewValue() != null ) ? Integer.parseInt( event.getNewValue().toString() ) : IGdbDebugPreferenceConstants.COMMAND_TIMEOUT_VALUE_DEFAULT; updateWaitTimeout(); fTimerThread.setTimerThreadState( ( fTimerThread.getWaitTimeout() > 0 ) ? TimerThreadState.RUNNING : TimerThreadState.HALTED ); } catch( NumberFormatException e ) { GdbPlugin.getDefault().getLog().log( new Status( IStatus.ERROR, GdbPlugin.PLUGIN_ID, "Invlaid timeout value" ) ); } } } else if ( IGdbDebugPreferenceConstants.PREF_COMMAND_CUSTOM_TIMEOUTS.equals( property ) ) { if ( event.getNewValue() instanceof String ) { fCustomTimeouts.initializeFromMemento( (String)event.getNewValue() ); } else if ( event.getNewValue() == null ) { fCustomTimeouts.clear(); } updateWaitTimeout(); fTimerThread.setTimerThreadState( ( fTimerThread.getWaitTimeout() > 0 ) ? TimerThreadState.RUNNING : TimerThreadState.HALTED ); } }