Buggy code:
public class IndexDiffCacheEntry { private static final String GITIGNORE_NAME = ".gitignore" ; private static final int RESOURCE_LIST_UPDATE_LIMIT = 1000 ; private Repository repository ; private volatile IndexDiffData indexDiffData ; private Job reloadJob ; private ReentrantLock lock = new ReentrantLock ( true ) ; private Set < IndexDiffChangedListener > listeners = new HashSet < IndexDiffChangedListener > ( ) ; private IResourceChangeListener resourceChangeListener ; private static int INTERESTING_CHANGES = ( ( ( ( ( IResourceDelta . CONTENT ) | ( IResourceDelta . MOVED_FROM ) ) | ( IResourceDelta . MOVED_TO ) ) | ( IResourceDelta . OPEN ) ) | ( IResourceDelta . REPLACED ) ) | ( IResourceDelta . TYPE ) ; public IndexDiffCacheEntry ( Repository repository ) { } public void addIndexDiffChangedListener ( IndexDiffChangedListener listener ) { } public void removeIndexDiffChangedListener ( IndexDiffChangedListener listener ) { } public void refresh ( ) { } public IndexDiffData getIndexDiff ( ) { } private void scheduleReloadJob ( ) { } private void scheduleUpdateJob ( final Collection < String > filesToUpdate , final Collection < IFile > fileResourcesToUpdate ) { } private IndexDiffData calcIndexDiffData ( IProgressMonitor monitor , String jobName , Collection < String > filesToUpdate , Collection < IFile > fileResourcesToUpdate ) { } private void notifyListeners ( ) { } private IndexDiff calcIndexDiff ( IProgressMonitor monitor , String jobName ) { } private String getReloadJobName ( ) { } private void createResourceChangeListener ( ) { resourceChangeListener = new IResourceChangeListener ( ) { public void resourceChanged ( IResourceChangeEvent event ) { final Collection < String > filesToUpdate = new HashSet < String > ( ) ; final Collection < IFile > fileResourcesToUpdate = new HashSet < IFile > ( ) ; final boolean [ ] gitIgnoreChanged = new boolean [ 1 ] ; gitIgnoreChanged [ 0 ] = false ; try { event . getDelta ( ) . accept ( new IResourceDeltaVisitor ( ) { public boolean visit ( IResourceDelta delta ) throws CoreException { if ( ( ( delta . getKind ( ) ) == ( IResourceDelta . CHANGED ) ) && ( ( ( delta . getFlags ( ) ) & ( IndexDiffCacheEntry . INTERESTING_CHANGES ) ) == 0 ) ) return true ; final IResource resource = delta . getResource ( ) ; if ( ( resource . getType ( ) ) != ( IResource . FILE ) ) return true ; final RepositoryMapping mapping = RepositoryMapping . getMapping ( resource ) ; if ( ( mapping == null ) || ( ( mapping . getRepository ( ) ) != ( repository ) ) ) return true ; if ( resource . getName ( ) . equals ( IndexDiffCacheEntry . GITIGNORE_NAME ) ) { gitIgnoreChanged [ 0 ] = true ; return false ; } if ( Team . isIgnoredHint ( resource ) ) return false ; String repoRelativePath = mapping . getRepoRelativePath ( resource ) ; filesToUpdate . add ( repoRelativePath ) ; fileResourcesToUpdate . add ( ( ( IFile ) ( resource ) ) ) ; return true ; } } ) ; } catch ( CoreException e ) { Activator . logError ( e . getMessage ( ) , e ) ; return ; } <START_BUG> if ( gitIgnoreChanged [ 0 ] ) <END_BUG> scheduleReloadJob ( ) ; else if ( ! ( filesToUpdate . isEmpty ( ) ) ) if ( ( filesToUpdate . size ( ) ) < ( IndexDiffCacheEntry . RESOURCE_LIST_UPDATE_LIMIT ) ) scheduleUpdateJob ( filesToUpdate , fileResourcesToUpdate ) ; else scheduleReloadJob ( ) ; } } ; ResourcesPlugin . getWorkspace ( ) . addResourceChangeListener ( resourceChangeListener , IResourceChangeEvent . POST_CHANGE ) ; } }

Fix:
if ( ( gitIgnoreChanged [ 0 ] ) || ( ( indexDiffData ) == null ) )