Program: 133693
Project: 133693
Buggy source:
/** 
 * This operation overrides the default/abstract implementation of ISelectionListener.selectionChanged to display the resource selected in the ICEResourceView.
 * @param part The IWorkbenchPart that called this function.
 * @param selection The ISelection chosen in the part parameter.
 */
@Override public void selectionChanged(IWorkbenchPart part,ISelection selection){
  if (part.getSite().getId().equals(ICEResourceView.ID)) {
    Object selectedElement=((ITreeSelection)selection).getFirstElement();
    ICEResource selectedResource=null;
    if (selectedElement instanceof String) {
      selectedResource=resourceView.resourceChildMap.get(selectedElement);
    }
 else     if (selectedElement instanceof PropertySource) {
      PropertySource source=(PropertySource)selectedElement;
      selectedResource=(ICEResource)source.getWrappedData();
    }
    if (selectedResource != null && !(selectedResource instanceof VizResource)) {
      if (browser != null && !browser.isDisposed()) {
        currentResource=selectedResource;
        browser.setUrl(currentResource.getPath().toString());
        layout.topControl=browser;
        parent.layout();
      }
    }
 else     if (selectedResource != null) {
      layout.topControl=plotComposite;
      try {
        IPlot plot=plotMap.get(selectedResource.getPath().toString());
        if (plot == null) {
          plot=vizFactory.get().createPlot(selectedResource.getPath());
        }
        Map<String,String[]> plotTypes=plot.getPlotTypes();
        ArrayList<String> keys=new ArrayList<String>(plotTypes.keySet());
        String category;
        category=keys.get(0);
        String[] types=plotTypes.get(category);
        String type=types[0];
        plot.draw(category,type,plotComposite);
        plotComposite.layout();
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
      parent.layout();
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * This operation overrides the default/abstract implementation of ISelectionListener.selectionChanged to display the resource selected in the ICEResourceView.
 * @param part 			The IWorkbenchPart that called this function.
 * @param selection		The ISelection chosen in the part parameter.
 */
@Override public void selectionChanged(IWorkbenchPart part,ISelection selection){
  if (part.getSite().getId().equals(ICEResourceView.ID)) {
    Object selectedElement=((ITreeSelection)selection).getFirstElement();
    ICEResource selectedResource=null;
    if (selectedElement instanceof String) {
      selectedResource=resourceView.resourceChildMap.get(selectedElement);
    }
 else     if (selectedElement instanceof PropertySource) {
      PropertySource source=(PropertySource)selectedElement;
      selectedResource=(ICEResource)source.getWrappedData();
    }
    if (selectedResource != null && !(selectedResource instanceof VizResource)) {
      if (browser != null && !browser.isDisposed()) {
        currentResource=selectedResource;
        browser.setUrl(currentResource.getPath().toString());
        layout.topControl=browser;
        parent.layout();
      }
    }
 else     if (selectedResource != null) {
      layout.topControl=plotComposite;
      try {
        IPlot plot=plotMap.get(selectedResource.getPath().toString());
        if (plot == null) {
          plot=vizFactory.get().createPlot(selectedResource.getPath());
        }
        Map<String,String[]> plotTypes=plot.getPlotTypes();
        ArrayList<String> keys=new ArrayList<String>(plotTypes.keySet());
        String category=keys.get(0);
        String type=plotTypes.get(category)[0];
        plot.draw(category,type,plotComposite);
        plotComposite.layout();
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
      parent.layout();
    }
  }
  return;
}