Program: 133549
Project: 133549
Buggy source:
@Override protected Composite createPlotComposite(Composite parent,int style,final VisItSwtConnection connection) throws Exception {
  Composite container=new Composite(parent,style);
  container.setBackground(parent.getBackground());
  container.setLayout(new GridLayout(1,false));
  canvas=new VisItSwtWidget(container,SWT.DOUBLE_BUFFERED);
  canvas.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  canvas.setBackground(parent.getBackground());
  int windowWidth=Integer.parseInt(adapter.getConnectionProperty("String_Node_Str"));
  int windowHeight=Integer.parseInt(adapter.getConnectionProperty("String_Node_Str"));
  int windowId=plot.getVisItConnectionAdapter().getNextWindowId();
  canvas.setVisItSwtConnection(connection,windowId,windowWidth,windowHeight);
  new VisItMouseManager(canvas);
  MenuManager menuManager=new MenuManager();
  Menu menu=parent.getMenu();
  if (menu == null) {
    menu=menuManager.createContextMenu(canvas);
  }
  menu.addMenuListener(new MenuListener(){
    @Override public void menuHidden(    MenuEvent e){
    }
    @Override public void menuShown(    MenuEvent e){
      repTree.getContributionItem().fill((Menu)e.widget,-1);
    }
  }
);
  canvas.setMenu(menu);
  timeSlider=new TimeSliderComposite(container,SWT.NONE);
  timeSlider.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  timeSlider.setBackground(parent.getBackground());
  timeSlider.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      widgetTimestep.set(timeSlider.getTimestep());
      executorService.submit(new Runnable(){
        @Override public void run(){
          ViewerMethods methods=connection.getViewerMethods();
          int targetStep;
          while (renderedTimestep != (targetStep=widgetTimestep.get())) {
            if (renderedTimestep < targetStep) {
              methods.animationNextState();
              renderedTimestep++;
            }
 else {
              methods.animationPreviousState();
              renderedTimestep--;
            }
          }
          return;
        }
      }
);
      return;
    }
  }
);
  ViewerMethods widget=connection.getViewerMethods();
  int timestepCount=widget.timeSliderGetNStates();
  List<Double> times=new ArrayList<Double>(timestepCount);
  for (double i=0.0; i < timestepCount; i++) {
    times.add(i);
  }
  timeSlider.setTimes(times);
  return container;
}

Fixed version (ground truth):
@Override protected Composite createPlotComposite(Composite parent,int style,final VisItSwtConnection connection) throws Exception {
  Composite container=new Composite(parent,style);
  container.setBackground(parent.getBackground());
  container.setLayout(new GridLayout(1,false));
  canvas=new VisItSwtWidget(container,SWT.DOUBLE_BUFFERED);
  canvas.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,true));
  canvas.setBackground(parent.getBackground());
  int windowWidth=Integer.parseInt(adapter.getConnectionProperty("String_Node_Str"));
  int windowHeight=Integer.parseInt(adapter.getConnectionProperty("String_Node_Str"));
  int windowId=plot.getVisItConnectionAdapter().getNextWindowId();
  canvas.setVisItSwtConnection(connection,windowId,windowWidth,windowHeight);
  new VisItMouseManager(canvas);
  MenuManager menuManager=new MenuManager();
  Menu menu=parent.getMenu();
  if (menu == null) {
    menu=menuManager.createContextMenu(canvas);
  }
  menu.addMenuListener(new MenuListener(){
    @Override public void menuHidden(    MenuEvent e){
    }
    @Override public void menuShown(    MenuEvent e){
      for (      MenuItem item : ((Menu)e.widget).getItems()) {
        item.dispose();
      }
      repTree.getContributionItem().fill((Menu)e.widget,-1);
    }
  }
);
  canvas.setMenu(menu);
  timeSlider=new TimeSliderComposite(container,SWT.NONE);
  timeSlider.setLayoutData(new GridData(SWT.FILL,SWT.FILL,true,false));
  timeSlider.setBackground(parent.getBackground());
  timeSlider.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent e){
      widgetTimestep.set(timeSlider.getTimestep());
      executorService.submit(new Runnable(){
        @Override public void run(){
          ViewerMethods methods=connection.getViewerMethods();
          int targetStep;
          while (renderedTimestep != (targetStep=widgetTimestep.get())) {
            if (renderedTimestep < targetStep) {
              methods.animationNextState();
              renderedTimestep++;
            }
 else {
              methods.animationPreviousState();
              renderedTimestep--;
            }
          }
          return;
        }
      }
);
      return;
    }
  }
);
  ViewerMethods widget=connection.getViewerMethods();
  int timestepCount=widget.timeSliderGetNStates();
  List<Double> times=new ArrayList<Double>(timestepCount);
  for (double i=0.0; i < timestepCount; i++) {
    times.add(i);
  }
  timeSlider.setTimes(times);
  return container;
}