Program: 46072
Project: 46072
Buggy source:
public void setAvatarCharacter(final WlAvatarCharacter avatar){
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      if (mainHUD == null) {
        mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
      }
      for (      String name : buttonMap.keySet()) {
        HUDButton button=buttonMap.get(name);
        button.setVisible(false);
      }
      buttonMap.clear();
      gestureMap.clear();
      if (avatar == null) {
        return;
      }
      for (      String action : avatar.getAnimationNames()) {
        String name=action;
        if (action.startsWith("String_Node_Str") == true) {
          name=name.substring(5);
        }
 else         if (action.startsWith("String_Node_Str") == true) {
          name=name.substring(7);
        }
        gestureMap.put(bundle.getString(name),action);
      }
      gestureMap.put("String_Node_Str","String_Node_Str");
      gestureMap.put("String_Node_Str","String_Node_Str");
      for (      String name : gestureMap.keySet()) {
        int row=0;
        int column=0;
        for (        String[] gesture : gestures) {
          if (gesture[0].equals(name)) {
            column=Integer.valueOf(gesture[1]);
            row=Integer.valueOf(gesture[2]);
            HUDButton button=mainHUD.createButton(name);
            button.setDecoratable(false);
            button.setLocation(leftMargin + column * columnWidth,bottomMargin + row * rowHeight);
            mainHUD.addComponent(button);
            buttonMap.put(name,button);
            button.addActionListener(new ActionListener(){
              public void actionPerformed(              ActionEvent event){
                String action=gestureMap.get(event.getActionCommand());
                logger.info("String_Node_Str" + event.getActionCommand());
                if (action.equals("String_Node_Str") == true) {
                  CharacterEyes eyes=avatar.getEyes();
                  eyes.wink(false);
                }
 else                 if (action.equals("String_Node_Str") == true) {
                  CharacterEyes eyes=avatar.getEyes();
                  eyes.wink(true);
                }
 else {
                  avatar.playAnimation(action);
                }
              }
            }
);
            break;
          }
        }
      }
      setVisible(true);
    }
  }
);
}

Fixed version (ground truth):
public void setAvatarCharacter(final WlAvatarCharacter avatar){
  SwingUtilities.invokeLater(new Runnable(){
    public void run(){
      if (mainHUD == null) {
        mainHUD=HUDManagerFactory.getHUDManager().getHUD("String_Node_Str");
      }
      for (      String name : buttonMap.keySet()) {
        HUDButton button=buttonMap.get(name);
        mainHUD.removeComponent(button);
      }
      buttonMap.clear();
      gestureMap.clear();
      if (avatar == null) {
        return;
      }
      for (      String action : avatar.getAnimationNames()) {
        String name=action;
        if (action.startsWith("String_Node_Str") == true) {
          name=name.substring(5);
        }
 else         if (action.startsWith("String_Node_Str") == true) {
          name=name.substring(7);
        }
        gestureMap.put(bundle.getString(name),action);
      }
      gestureMap.put("String_Node_Str","String_Node_Str");
      gestureMap.put("String_Node_Str","String_Node_Str");
      for (      String name : gestureMap.keySet()) {
        int row=0;
        int column=0;
        for (        String[] gesture : gestures) {
          if (gesture[0].equals(name)) {
            column=Integer.valueOf(gesture[1]);
            row=Integer.valueOf(gesture[2]);
            HUDButton button=mainHUD.createButton(name);
            button.setDecoratable(false);
            button.setLocation(leftMargin + column * columnWidth,bottomMargin + row * rowHeight);
            mainHUD.addComponent(button);
            buttonMap.put(name,button);
            button.addActionListener(new ActionListener(){
              public void actionPerformed(              ActionEvent event){
                String action=gestureMap.get(event.getActionCommand());
                logger.info("String_Node_Str" + event.getActionCommand());
                if (action.equals("String_Node_Str") == true) {
                  avatar.triggerActionStart(TriggerNames.SitOnGround);
                }
 else                 if (action.equals("String_Node_Str") == true) {
                  CharacterEyes eyes=avatar.getEyes();
                  eyes.wink(false);
                }
 else {
                  avatar.playAnimation(action);
                }
              }
            }
);
            break;
          }
        }
      }
      setVisible(true);
    }
  }
);
}