Program: 75077
Project: 75077
Buggy source:
/** 
 * Initialize the execution.  Create the MovieViewScreen3D frame if it hasn't been set using the place() method.
 * @exception IllegalActionException If the base class throws it.
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  _frameNumber=0;
  _frameWidth=_getHorizontalPixels();
  _frameHeight=_getVerticalPixels();
  try {
    QTSession.open();
    Frame frame=new Frame("String_Node_Str");
    QTCanvas canv=new QTCanvas(QTCanvas.kInitialSize,0.5F,0.5F);
    frame.add("String_Node_Str",canv);
    Painter painter=new Painter();
    _imageDrawer=new QTImageDrawer(painter,new Dimension(_frameWidth,_frameHeight),Redrawable.kMultiFrame);
    _imageDrawer.setRedrawing(true);
    canv.setClient(_imageDrawer,true);
    frame.pack();
    _file=new QTFile(fileName.asFile());
    _movie=Movie.createMovieFile(_file,kMoviePlayer,createMovieFileDeleteCurFile | createMovieFileDontCreateResFile);
    System.out.println("String_Node_Str");
    int kNoVolume=0;
    int kVidTimeScale=600;
    _videoTrack=_movie.addTrack(_frameWidth,_frameHeight,kNoVolume);
    _videoMedia=new VideoMedia(_videoTrack,kVidTimeScale);
    _videoMedia.beginEdits();
    _videoSize=new QDRect(_frameWidth,_frameHeight);
    _gw=new QDGraphics(_videoSize);
    int size=QTImage.getMaxCompressionSize(_gw,_videoSize,_gw.getPixMap().getPixelSize(),codecNormalQuality,kAnimationCodecType,CodecComponent.anyCodec);
    _imageHandle=new QTHandle(size,true);
    _imageHandle.lock();
    _compressedFrame=RawEncodedImage.fromQTHandle(_imageHandle);
    _frameRateValue=((IntToken)frameRate.getToken()).intValue();
    _videoSequence=new CSequence(_gw,_videoSize,_gw.getPixMap().getPixelSize(),kAnimationCodecType,CodecComponent.bestFidelityCodec,codecNormalQuality,codecNormalQuality,_frameRateValue,null,0);
    ImageDescription desc=_videoSequence.getDescription();
    _imageDrawer.setRedrawing(true);
    _imageDrawer.redraw(null);
    _imageDrawer.setGWorld(_gw);
    _imageDrawer.setDisplayBounds(_videoSize);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Initialize the execution.  Create the MovieViewScreen3D frame if it hasn't been set using the place() method.
 * @exception IllegalActionException If the base class throws it.
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  _frameNumber=0;
  _frameWidth=((IntToken)horizontalResolution.getToken()).intValue();
  _frameHeight=((IntToken)verticalResolution.getToken()).intValue();
  try {
    QTSession.open();
    Frame frame=new Frame("String_Node_Str");
    QTCanvas canv=new QTCanvas(QTCanvas.kInitialSize,0.5F,0.5F);
    frame.add("String_Node_Str",canv);
    Painter painter=new Painter();
    _imageDrawer=new QTImageDrawer(painter,new Dimension(_frameWidth,_frameHeight),Redrawable.kMultiFrame);
    _imageDrawer.setRedrawing(true);
    canv.setClient(_imageDrawer,true);
    frame.pack();
    _file=new QTFile(fileName.asFile());
    _movie=Movie.createMovieFile(_file,kMoviePlayer,createMovieFileDeleteCurFile | createMovieFileDontCreateResFile);
    System.out.println("String_Node_Str");
    int kNoVolume=0;
    int kVidTimeScale=600;
    _videoTrack=_movie.addTrack(_frameWidth,_frameHeight,kNoVolume);
    _videoMedia=new VideoMedia(_videoTrack,kVidTimeScale);
    _videoMedia.beginEdits();
    _videoSize=new QDRect(_frameWidth,_frameHeight);
    _gw=new QDGraphics(_videoSize);
    int size=QTImage.getMaxCompressionSize(_gw,_videoSize,_gw.getPixMap().getPixelSize(),codecNormalQuality,kAnimationCodecType,CodecComponent.anyCodec);
    _imageHandle=new QTHandle(size,true);
    _imageHandle.lock();
    _compressedFrame=RawEncodedImage.fromQTHandle(_imageHandle);
    _frameRateValue=((IntToken)frameRate.getToken()).intValue();
    _videoSequence=new CSequence(_gw,_videoSize,_gw.getPixMap().getPixelSize(),kAnimationCodecType,CodecComponent.bestFidelityCodec,codecNormalQuality,codecNormalQuality,_frameRateValue,null,0);
    ImageDescription desc=_videoSequence.getDescription();
    _imageDrawer.setRedrawing(true);
    _imageDrawer.redraw(null);
    _imageDrawer.setGWorld(_gw);
    _imageDrawer.setDisplayBounds(_videoSize);
  }
 catch (  Exception ex) {
    ex.printStackTrace();
  }
}