Buggy code:
public class ICEResourceView extends PlayableViewPart implements IUpdateableListener , IPartListener2 { public static final String ID = "org.eclipse.ice.client.widgets.ICEResourceView" ; private ICEFormEditor editor ; private ResourceComponent resourceComponent ; private TreeViewer resourceTreeViewer ; private TabFolder tabFolder ; private final List < ICEResourceView . ResourcePropertySource > textList ; private final List < ICEResourceView . ResourcePropertySource > imageList ; private final Map < String , ICEResource > resourceChildMap ; private PreviousAction prevAction ; private PlayAction playAction ; private NextAction nextAction ; private final ListComponent < VizResource > plotList ; public ICEResourceView ( ) { } private void setActiveEditor ( ICEFormEditor activeEditor ) { } private void setResourceComponent ( ResourceComponent component ) { } public ResourceComponent getResourceComponent ( ) { } @ Override public void createPartControl ( Composite parent ) { tabFolder = new TabFolder ( parent , SWT . NONE ) ; TabItem textTab = new TabItem ( tabFolder , SWT . NONE , 0 ) ; textTab . setText ( "Files" ) ; TabItem imageTab = new TabItem ( tabFolder , SWT . NONE , 1 ) ; imageTab . setText ( "Images" ) ; TabItem plotTab = new TabItem ( tabFolder , SWT . NONE , 2 ) ; plotTab . setText ( "Plots" ) ; createActions ( ) ; resourceTreeViewer = new TreeViewer ( tabFolder ) ; initializeTreeViewer ( resourceTreeViewer ) ; textTab . setControl ( resourceTreeViewer . getControl ( ) ) ; imageTab . setControl ( resourceTreeViewer . getControl ( ) ) ; getSite ( ) . setSelectionProvider ( resourceTreeViewer ) ; tabFolder . addListener ( Selection , new Listener ( ) { @ Override public void handleEvent ( Event event ) { if ( playAction . isInPlayState ( ) ) { playAction . stop ( ) ; } setTreeContent ( tabFolder . indexOf ( ( ( TabItem ) ( event . item ) ) ) ) ; } } ) ; Table listTable = new Table ( tabFolder , SWT . FLAT ) ; DefaultEventTableViewer < VizResource > listTableViewer = new DefaultEventTableViewer < VizResource > ( plotList , listTable , plotList ) ; plotTab . setControl ( listTable ) ; IPartService partService = getSite ( ) . getWorkbenchWindow ( ) . getPartService ( ) ; IWorkbenchPartReference partRef = partService . getActivePartReference ( ) ; <START_BUG> if ( ICEFormEditor . ID . equals ( partRef . getId ( ) ) ) { <END_BUG> ICEFormEditor activeEditor = ( ( ICEFormEditor ) ( partRef . getPart ( false ) ) ) ; if ( activeEditor != ( editor ) ) { setActiveEditor ( activeEditor ) ; } } partService . addPartListener ( this ) ; return ; } private void initializeTreeViewer ( TreeViewer inputTreeViewer ) { } @ Override public void setFocus ( ) { } @ Override public void update ( IUpdateable component ) { } private void sortTreeContent ( ) { } private void setTreeContent ( ) { } private void setTreeContent ( int tabIndex ) { } @ Override public void partActivated ( IWorkbenchPartReference partRef ) { } @ Override public void partClosed ( IWorkbenchPartReference partRef ) { } @ Override public void partHidden ( IWorkbenchPartReference partRef ) { } @ Override public void partBroughtToTop ( IWorkbenchPartReference partRef ) { } @ Override public void partDeactivated ( IWorkbenchPartReference partRef ) { } @ Override public void partOpened ( IWorkbenchPartReference partRef ) { } @ Override public void partVisible ( IWorkbenchPartReference partRef ) { } @ Override public void partInputChanged ( IWorkbenchPartReference partRef ) { } public ICEResource getResourceFromSelection ( ISelection selection ) { } private void createActions ( ) { } public void setToNextResource ( ) { } public void setToPreviousResource ( ) { } public void removeSelection ( ) { } private static class ResourcePropertySource extends PropertySource { public static final String ID_PATH = "Path" ; public static final String ID_DATE = "Date" ; protected static IPropertyDescriptor [ ] descriptors ; public ResourcePropertySource ( Object obj ) { } @ Override public IPropertyDescriptor [ ] getPropertyDescriptors ( ) { } @ Override public Object getPropertyValue ( Object id ) { } } No newline ; at end ; of file ; }

Fix:
if ( ( partRef != null ) && ( ICEFormEditor . ID . equals ( partRef . getId ( ) ) ) ) {