Program: 75606
Project: 75606
Buggy source:
public void initialize() throws IllegalActionException {
  super.initialize();
  if (_canvas == null) {
    place(_container);
  }
  if (_frame != null) {
    _frame.setVisible(true);
  }
  if (simpleUniverse == null) {
    simpleUniverse=new SimpleUniverse(_canvas);
  }
  Enumeration branches=simpleUniverse.getLocale().getAllBranchGraphs();
  while (branches.hasMoreElements()) {
    BranchGroup branchGroup=(BranchGroup)branches.nextElement();
    if (branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) {
      simpleUniverse.getLocale().removeBranchGraph(branchGroup);
    }
  }
  branchRoot=new BranchGroup();
  branchRoot.setCapability(BranchGroup.ALLOW_DETACH);
  _userTransformation=new TransformGroup(_lastTransform);
  _userTransformation.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
  _userTransformation.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
  branchRoot.addChild(_userTransformation);
  bounds=new BoundingSphere(new Point3d(0.0,0.0,0.0),100.0);
  if (_isRotatable()) {
    mouseRotate=new MouseRotateView(this);
    mouseRotate.setTransformGroup(_userTransformation);
    mouseRotate.setSchedulingBounds(bounds);
    branchRoot.addChild(mouseRotate);
  }
  if (_isScalable()) {
    MouseZoom mouseZoom=new MouseZoom();
    mouseZoom.setTransformGroup(_userTransformation);
    mouseZoom.setSchedulingBounds(bounds);
    branchRoot.addChild(mouseZoom);
  }
  if (_isTranslatable()) {
    MouseTranslate mouseTranslate=new MouseTranslate();
    mouseTranslate.setTransformGroup(_userTransformation);
    _userTransformation.addChild(mouseTranslate);
    mouseTranslate.setSchedulingBounds(bounds);
  }
  if (_isIterationSynchronized()) {
    _iterationSynchronized=true;
  }
 else {
    _iterationSynchronized=false;
  }
  if (_shouldShowAxes()) {
    Sphere origin=new Sphere((float)0.05);
    _userTransformation.addChild(origin);
    Cylinder yAxis=new Cylinder((float)0.01,(float)6.0);
    _userTransformation.addChild(yAxis);
    Cylinder xAxis=new Cylinder((float)0.01,(float)6.0);
    Transform3D rotation=new Transform3D();
    Quat4d quat=new Quat4d();
    quat.set(new AxisAngle4d(0.0,0.0,1.0,Math.PI / 2.0));
    rotation.set(quat);
    TransformGroup xAxisGroup=new TransformGroup(rotation);
    xAxisGroup.addChild(xAxis);
    _userTransformation.addChild(xAxisGroup);
    Cylinder zAxis=new Cylinder((float)0.01,(float)6.0);
    Transform3D rotation2=new Transform3D();
    Quat4d quat2=new Quat4d();
    quat2.set(new AxisAngle4d(1.0,0.0,0.0,Math.PI / 2.0));
    rotation2.set(quat2);
    TransformGroup zAxisGroup=new TransformGroup(rotation2);
    zAxisGroup.addChild(zAxis);
    _userTransformation.addChild(zAxisGroup);
  }
  BranchGroup lightRoot=new BranchGroup();
  AmbientLight lightA=new AmbientLight(new Color3f(0.8f,0.8f,0.8f));
  lightA.setInfluencingBounds(bounds);
  lightRoot.addChild(lightA);
  DirectionalLight lightD1=new DirectionalLight();
  lightD1.setInfluencingBounds(bounds);
  Vector3f direction=new Vector3f(0.0f,-1.0f,-1.0f);
  direction.normalize();
  lightD1.setDirection(direction);
  lightD1.setColor(new Color3f(1.0f,1.0f,1.0f));
  lightRoot.addChild(lightD1);
  simpleUniverse.getViewer().getView().setLocalEyeLightingEnable(true);
  simpleUniverse.addBranchGraph(lightRoot);
  if (_iterationSynchronized) {
    if (_canvas != null)     _canvas.stopRenderer();
  }
}

Fixed version (ground truth):
public void initialize() throws IllegalActionException {
  super.initialize();
  if (_canvas == null) {
    place(_container);
  }
  if (_frame != null) {
    _frame.setVisible(true);
  }
  if (simpleUniverse == null) {
    simpleUniverse=new SimpleUniverse(_canvas);
  }
  Enumeration branches=simpleUniverse.getLocale().getAllBranchGraphs();
  while (branches.hasMoreElements()) {
    BranchGroup branchGroup=(BranchGroup)branches.nextElement();
    if (branchGroup.getCapability(BranchGroup.ALLOW_DETACH)) {
      if (!(branchGroup instanceof com.sun.j3d.utils.universe.ViewingPlatform)) {
        simpleUniverse.getLocale().removeBranchGraph(branchGroup);
      }
    }
  }
  branchRoot=new BranchGroup();
  branchRoot.setCapability(BranchGroup.ALLOW_DETACH);
  _userTransformation=new TransformGroup(_lastTransform);
  _userTransformation.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
  _userTransformation.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
  branchRoot.addChild(_userTransformation);
  bounds=new BoundingSphere(new Point3d(0.0,0.0,0.0),100.0);
  if (_isRotatable()) {
    mouseRotate=new MouseRotateView(this);
    mouseRotate.setTransformGroup(_userTransformation);
    mouseRotate.setSchedulingBounds(bounds);
    branchRoot.addChild(mouseRotate);
  }
  if (_isScalable()) {
    MouseZoom mouseZoom=new MouseZoom();
    mouseZoom.setTransformGroup(_userTransformation);
    mouseZoom.setSchedulingBounds(bounds);
    branchRoot.addChild(mouseZoom);
  }
  if (_isTranslatable()) {
    MouseTranslate mouseTranslate=new MouseTranslate();
    mouseTranslate.setTransformGroup(_userTransformation);
    _userTransformation.addChild(mouseTranslate);
    mouseTranslate.setSchedulingBounds(bounds);
  }
  if (_isIterationSynchronized()) {
    _iterationSynchronized=true;
  }
 else {
    _iterationSynchronized=false;
  }
  if (_shouldShowAxes()) {
    Sphere origin=new Sphere((float)0.05);
    _userTransformation.addChild(origin);
    Cylinder yAxis=new Cylinder((float)0.01,(float)6.0);
    _userTransformation.addChild(yAxis);
    Cylinder xAxis=new Cylinder((float)0.01,(float)6.0);
    Transform3D rotation=new Transform3D();
    Quat4d quat=new Quat4d();
    quat.set(new AxisAngle4d(0.0,0.0,1.0,Math.PI / 2.0));
    rotation.set(quat);
    TransformGroup xAxisGroup=new TransformGroup(rotation);
    xAxisGroup.addChild(xAxis);
    _userTransformation.addChild(xAxisGroup);
    Cylinder zAxis=new Cylinder((float)0.01,(float)6.0);
    Transform3D rotation2=new Transform3D();
    Quat4d quat2=new Quat4d();
    quat2.set(new AxisAngle4d(1.0,0.0,0.0,Math.PI / 2.0));
    rotation2.set(quat2);
    TransformGroup zAxisGroup=new TransformGroup(rotation2);
    zAxisGroup.addChild(zAxis);
    _userTransformation.addChild(zAxisGroup);
  }
  BranchGroup lightRoot=new BranchGroup();
  AmbientLight lightA=new AmbientLight(new Color3f(0.8f,0.8f,0.8f));
  lightA.setInfluencingBounds(bounds);
  lightRoot.addChild(lightA);
  DirectionalLight lightD1=new DirectionalLight();
  lightD1.setInfluencingBounds(bounds);
  Vector3f direction=new Vector3f(0.0f,-1.0f,-1.0f);
  direction.normalize();
  lightD1.setDirection(direction);
  lightD1.setColor(new Color3f(1.0f,1.0f,1.0f));
  lightRoot.addChild(lightD1);
  simpleUniverse.getViewer().getView().setLocalEyeLightingEnable(true);
  simpleUniverse.addBranchGraph(lightRoot);
  if (_iterationSynchronized) {
    if (_canvas != null)     _canvas.stopRenderer();
  }
}