Program: 45613
Project: 45613
Buggy source:
/** 
 */
@Override public void initialize(ServerSessionManager manager){
  loaderMap=new HashMap();
  avatarChangedListener=new AvatarChangedListener(){
    public void avatarChanged(    Avatar newAvatar){
      if (camState != null) {
        avatarCellRenderer.removeAvatarChangedListener(avatarChangedListener);
        if (newAvatar.getContext() != null) {
          camState.setTargetCharacter(newAvatar);
        }
 else {
          camState.setTargetCharacter(null);
        }
        CellTransform transform=avatarCellRenderer.getCell().getLocalTransform();
        camState.setCameraPosition(transform.getTranslation(null));
      }
    }
  }
;
  chaseCameraMI=new JRadioButtonMenuItem(bundle.getString("String_Node_Str"));
  chaseCameraMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      Vector3f offsetVec=new Vector3f(0.0f,4.0f,-10.0f);
      if (camState == null) {
        camModel=(ChaseCamModel)CameraModels.getCameraModel(ChaseCamModel.class);
        camState=new ChaseCamState(offsetVec,new Vector3f(0.0f,1.8f,0.0f));
        camState.setDamping(1.7f);
        camState.setLookAtDamping(1.7f);
      }
      camState.setCameraPosition(avatarCellRenderer.getCell().getLocalTransform().getTranslation(null).add(offsetVec));
      camState.setTargetCharacter(avatarCellRenderer.getAvatarCharacter());
      ClientContextJME.getViewManager().setCameraController(new FlexibleCameraAdapter(camModel,camState));
    }
  }
);
  gestureMI=new JCheckBoxMenuItem(bundle.getString("String_Node_Str"));
  gestureMI.setSelected(false);
  gestureMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      if (gestureHUDRef == null || gestureHUDRef.get() == null) {
        GestureHUD hud=new GestureHUD();
        hud.setAvatarCharacter(avatarCellRenderer.getAvatarCharacter());
        gestureHUDRef=new WeakReference(hud);
      }
      gestureHUDEnabled=!gestureHUDEnabled;
      gestureMI.setSelected(gestureHUDEnabled);
      ((GestureHUD)gestureHUDRef.get()).setVisible(gestureHUDEnabled);
    }
  }
);
  avatarConfigMI=new JMenuItem(bundle.getString("String_Node_Str"));
  avatarConfigMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      AvatarConfigFrame f=new AvatarConfigFrame();
      f.setVisible(true);
    }
  }
);
  collisionResponseEnabledMI=new JCheckBoxMenuItem(bundle.getString("String_Node_Str"));
  collisionResponseEnabledMI.setSelected(true);
  collisionResponseEnabledMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      boolean isCollisionResponse=collisionResponseEnabledMI.isSelected();
      boolean isGravity=gravityEnabledMI.isSelected();
      ClientContext.getInputManager().postEvent(new AvatarCollisionChangeRequestEvent(isCollisionResponse,isGravity));
    }
  }
);
  gravityEnabledMI=new JCheckBoxMenuItem(bundle.getString("String_Node_Str"));
  gravityEnabledMI.setSelected(true);
  gravityEnabledMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      boolean isCollisionResponse=collisionResponseEnabledMI.isSelected();
      boolean isGravity=gravityEnabledMI.isSelected();
      ClientContext.getInputManager().postEvent(new AvatarCollisionChangeRequestEvent(isCollisionResponse,isGravity));
    }
  }
);
  ClientContextJME.getAvatarRenderManager().registerRenderer(manager,AvatarImiJME.class,AvatarControls.class);
  try {
    String serverHostAndPort=manager.getServerNameAndPort();
    String baseURL="String_Node_Str";
    URL url=AssetUtils.getAssetURL(baseURL,serverHostAndPort);
    WorldManager worldManager=ClientContextJME.getWorldManager();
    worldManager.addUserData(Repository.class,new Repository(worldManager,new WonderlandAvatarCache(url.toExternalForm(),ClientContext.getUserDirectory(bundle.getString("String_Node_Str")))));
  }
 catch (  MalformedURLException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
catch (  Exception e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
  }
  AvatarSystem.initialize(ClientContextJME.getWorldManager());
  super.initialize(manager);
}

Fixed version (ground truth):
/** 
 */
@Override public void initialize(ServerSessionManager manager){
  loaderMap=new HashMap();
  avatarChangedListener=new AvatarChangedListener(){
    public void avatarChanged(    Avatar newAvatar){
      if (camState != null) {
        avatarCellRenderer.removeAvatarChangedListener(avatarChangedListener);
        if (newAvatar.getContext() != null) {
          camState.setTargetCharacter(newAvatar);
        }
 else {
          camState.setTargetCharacter(null);
        }
        CellTransform transform=avatarCellRenderer.getCell().getLocalTransform();
        camState.setCameraPosition(transform.getTranslation(null));
      }
    }
  }
;
  chaseCameraMI=new JRadioButtonMenuItem(bundle.getString("String_Node_Str"));
  chaseCameraMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent arg0){
      ViewManager viewManager=ViewManager.getViewManager();
      ViewCell viewCell=viewManager.getPrimaryViewCell();
      CellTransform transform=viewCell.getWorldTransform();
      Vector3f translation=transform.getTranslation(null);
      Vector3f offset=new Vector3f(0.0f,4.0f,-10.0f);
      if (camState == null) {
        camModel=(ChaseCamModel)CameraModels.getCameraModel(ChaseCamModel.class);
        camState=new ChaseCamState(offset,new Vector3f(0.0f,1.8f,0.0f));
        camState.setDamping(1.7f);
        camState.setLookAtDamping(1.7f);
      }
      camState.setCameraPosition(translation.add(offset));
      camState.setTargetCharacter(avatarCellRenderer.getAvatarCharacter());
      FlexibleCameraAdapter chaseCamera=new FlexibleCameraAdapter(camModel,camState);
      viewManager.setCameraController(chaseCamera);
    }
  }
);
  gestureMI=new JCheckBoxMenuItem(bundle.getString("String_Node_Str"));
  gestureMI.setSelected(false);
  gestureMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      if (gestureHUDRef == null || gestureHUDRef.get() == null) {
        GestureHUD hud=new GestureHUD();
        hud.setAvatarCharacter(avatarCellRenderer.getAvatarCharacter());
        gestureHUDRef=new WeakReference(hud);
      }
      gestureHUDEnabled=!gestureHUDEnabled;
      gestureMI.setSelected(gestureHUDEnabled);
      ((GestureHUD)gestureHUDRef.get()).setVisible(gestureHUDEnabled);
    }
  }
);
  avatarConfigMI=new JMenuItem(bundle.getString("String_Node_Str"));
  avatarConfigMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      AvatarConfigFrame f=new AvatarConfigFrame();
      f.setVisible(true);
    }
  }
);
  collisionResponseEnabledMI=new JCheckBoxMenuItem(bundle.getString("String_Node_Str"));
  collisionResponseEnabledMI.setSelected(true);
  collisionResponseEnabledMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      boolean isCollisionResponse=collisionResponseEnabledMI.isSelected();
      boolean isGravity=gravityEnabledMI.isSelected();
      ClientContext.getInputManager().postEvent(new AvatarCollisionChangeRequestEvent(isCollisionResponse,isGravity));
    }
  }
);
  gravityEnabledMI=new JCheckBoxMenuItem(bundle.getString("String_Node_Str"));
  gravityEnabledMI.setSelected(true);
  gravityEnabledMI.addActionListener(new ActionListener(){
    public void actionPerformed(    ActionEvent e){
      boolean isCollisionResponse=collisionResponseEnabledMI.isSelected();
      boolean isGravity=gravityEnabledMI.isSelected();
      ClientContext.getInputManager().postEvent(new AvatarCollisionChangeRequestEvent(isCollisionResponse,isGravity));
    }
  }
);
  ClientContextJME.getAvatarRenderManager().registerRenderer(manager,AvatarImiJME.class,AvatarControls.class);
  try {
    String serverHostAndPort=manager.getServerNameAndPort();
    String baseURL="String_Node_Str";
    URL url=AssetUtils.getAssetURL(baseURL,serverHostAndPort);
    WorldManager worldManager=ClientContextJME.getWorldManager();
    worldManager.addUserData(Repository.class,new Repository(worldManager,new WonderlandAvatarCache(url.toExternalForm(),ClientContext.getUserDirectory(bundle.getString("String_Node_Str")))));
  }
 catch (  MalformedURLException excp) {
    logger.log(Level.WARNING,"String_Node_Str",excp);
  }
catch (  Exception e) {
    logger.log(Level.SEVERE,"String_Node_Str",e);
  }
  AvatarSystem.initialize(ClientContextJME.getWorldManager());
  super.initialize(manager);
}