Program: 45562
Project: 45562
Buggy source:
/** 
 * Load and return the avatar. To make this the current avatar changeAvatar() must be called
 * @param avatarConfigURL
 * @return
 */
private WlAvatarCharacter loadAvatarInternal(AvatarConfigInfo avatarConfigInfo) throws MalformedURLException, IOException {
  WlAvatarCharacter ret=null;
  PMatrix origin=new PMatrix();
  CellTransform transform=cell.getLocalTransform();
  origin.setTranslation(transform.getTranslation(null));
  origin.setRotation(transform.getRotation(null));
  String avatarDetail=System.getProperty("String_Node_Str","String_Node_Str");
  String shaderCheck=System.getProperty("String_Node_Str");
  boolean shaderPass=true;
  RenderManager rm=ClientContextJME.getWorldManager().getRenderManager();
  if (shaderCheck != null && shaderCheck.equals("String_Node_Str")) {
    shaderPass=rm.getContextCaps().GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB >= 512;
  }
  if (rm.supportsOpenGL20() == false || !shaderPass) {
    avatarDetail="String_Node_Str";
  }
  AvatarLoaderRegistry registry=AvatarLoaderRegistry.getAvatarLoaderRegistry();
  if (avatarConfigInfo == null || avatarDetail.equalsIgnoreCase("String_Node_Str")) {
    AvatarLoaderFactorySPI factory=registry.getDefaultAvatarLoaderFactory();
    if (factory == null) {
      logger.warning("String_Node_Str");
      return null;
    }
    ret=factory.getAvatarLoader().getAvatarCharacter(cell,username,avatarConfigInfo);
  }
 else {
    String className=avatarConfigInfo.getLoaderFactoryClassName();
    if (className == null) {
      logger.warning("String_Node_Str" + "String_Node_Str" + avatarConfigInfo.getAvatarConfigURL());
      return null;
    }
    AvatarLoaderFactorySPI factory=registry.getAvatarLoaderFactory(className);
    if (factory == null) {
      logger.warning("String_Node_Str" + className + "String_Node_Str"+ avatarConfigInfo.getAvatarConfigURL());
      return null;
    }
    ret=factory.getAvatarLoader().getAvatarCharacter(cell,username,avatarConfigInfo);
  }
  ret.getModelInst().getTransform().getLocalMatrix(true).set(origin);
  Node external=ret.getJScene().getExternalKidsRoot();
  setZBufferState(external);
  return ret;
}

Fixed version (ground truth):
/** 
 * Load and return the avatar. To make this the current avatar changeAvatar() must be called
 * @param avatarConfigURL
 * @return
 */
private WlAvatarCharacter loadAvatarInternal(AvatarConfigInfo avatarConfigInfo) throws MalformedURLException, IOException {
  WlAvatarCharacter ret=null;
  PMatrix origin=new PMatrix();
  CellTransform transform=cell.getLocalTransform();
  origin.setTranslation(transform.getTranslation(null));
  origin.setRotation(transform.getRotation(null));
  String avatarDetail=System.getProperty("String_Node_Str","String_Node_Str");
  String shaderCheck=System.getProperty("String_Node_Str");
  boolean shaderPass=true;
  RenderManager rm=ClientContextJME.getWorldManager().getRenderManager();
  if (shaderCheck != null && shaderCheck.equals("String_Node_Str")) {
    shaderPass=rm.getContextCaps().GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB >= 512;
  }
  if (rm.supportsOpenGL20() == false || !shaderPass) {
    avatarDetail="String_Node_Str";
  }
  AvatarLoaderRegistry registry=AvatarLoaderRegistry.getAvatarLoaderRegistry();
  if (avatarConfigInfo == null || avatarDetail.equalsIgnoreCase("String_Node_Str")) {
    AvatarLoaderFactorySPI factory=registry.getDefaultAvatarLoaderFactory();
    if (factory == null) {
      logger.warning("String_Node_Str");
      return null;
    }
    String defaultClassName=factory.getClass().getName();
    AvatarConfigInfo defaultInfo=new AvatarConfigInfo(null,defaultClassName);
    ret=factory.getAvatarLoader().getAvatarCharacter(cell,username,defaultInfo);
  }
 else {
    String className=avatarConfigInfo.getLoaderFactoryClassName();
    if (className == null) {
      logger.warning("String_Node_Str" + "String_Node_Str" + avatarConfigInfo.getAvatarConfigURL());
      return null;
    }
    AvatarLoaderFactorySPI factory=registry.getAvatarLoaderFactory(className);
    if (factory == null) {
      logger.warning("String_Node_Str" + className + "String_Node_Str"+ avatarConfigInfo.getAvatarConfigURL());
      return null;
    }
    ret=factory.getAvatarLoader().getAvatarCharacter(cell,username,avatarConfigInfo);
  }
  ret.getModelInst().getTransform().getLocalMatrix(true).set(origin);
  Node external=ret.getJScene().getExternalKidsRoot();
  setZBufferState(external);
  return ret;
}