Program: 39411
Project: 39411
Buggy source:
/** 
 * 登陆
 * @param userName
 * @param password
 * @param email
 * @param handler
 */
public void login(String userName,final String password,String email,final Handler handler){
  if (!TextUtils.isEmpty(email)) {
    AVQuery<MyAVUser> query=AVObject.getQuery(MyAVUser.class);
    query.whereEqualTo("String_Node_Str",email);
    query.findInBackground(new FindCallback<MyAVUser>(){
      @Override public void done(      List<MyAVUser> list,      AVException e){
        final Message message=new Message();
        if (e == null) {
          if (list.size() > 0) {
            final MyAVUser myAVUser=list.get(0);
            myAVUser.logInInBackground(myAVUser.getUsername(),password,new LogInCallback<AVUser>(){
              @Override public void done(              AVUser avUser,              AVException e){
                if (e == null) {
                  User user=new User();
                  user.setUserId(myAVUser.getObjectId());
                  user.setHeadImage(getImgUrl(myAVUser.getHeadImage()));
                  user.setUserName(myAVUser.getUsername());
                  user.setUserCode(myAVUser.getUserCode());
                  userLocalDao.insertUser(user,_context);
                  message.what=Constant.MSG_SUCCESS;
                }
 else {
                  message.what=Constant.MSG_ERROR;
                  message.obj=ExceptionInfoUtil.getError(e.getCode());
                  getAvEx(e);
                }
                handler.sendMessage(message);
              }
            }
);
          }
 else {
            message.what=Constant.MSG_ERROR;
            message.obj="String_Node_Str";
            handler.sendMessage(message);
          }
        }
 else {
          message.what=Constant.MSG_ERROR;
          message.obj=ExceptionInfoUtil.getError(e.getCode());
          handler.sendMessage(message);
          getAvEx(e);
        }
      }
    }
);
    return;
  }
  AVUser.logInInBackground(userName,password,new LogInCallback<MyAVUser>(){
    @Override public void done(    MyAVUser avUser,    AVException e){
      Message message=new Message();
      if (e == null) {
        User user=new User();
        user.setUserId(avUser.getObjectId());
        user.setHeadImage(getImgUrl(avUser.getHeadImage()));
        user.setUserName(avUser.getUsername());
        userLocalDao.insertUser(user,_context);
        message.what=Constant.MSG_SUCCESS;
      }
 else {
        message.what=Constant.MSG_ERROR;
        message.obj=ExceptionInfoUtil.getError(e.getCode());
        getAvEx(e);
      }
      handler.sendMessage(message);
    }
  }
,MyAVUser.class);
}

Fixed version (ground truth):
/** 
 * 登陆
 * @param userName
 * @param password
 * @param email
 * @param handler
 */
public void login(String userName,final String password,String email,final Handler handler){
  if (!TextUtils.isEmpty(email)) {
    AVQuery<MyAVUser> query=AVObject.getQuery(MyAVUser.class);
    query.whereEqualTo("String_Node_Str",email);
    query.findInBackground(new FindCallback<MyAVUser>(){
      @Override public void done(      List<MyAVUser> list,      AVException e){
        final Message message=new Message();
        if (e == null) {
          if (list.size() > 0) {
            final MyAVUser myAVUser=list.get(0);
            myAVUser.logInInBackground(myAVUser.getUsername(),password,new LogInCallback<AVUser>(){
              @Override public void done(              AVUser avUser,              AVException e){
                if (e == null) {
                  User user=new User();
                  user.setUserId(myAVUser.getObjectId());
                  user.setHeadImage(getImgUrl(myAVUser.getHeadImage()));
                  user.setUserName(myAVUser.getUsername());
                  user.setUserCode(myAVUser.getUserCode());
                  userLocalDao.insertUser(user,_context);
                  message.what=Constant.MSG_SUCCESS;
                }
 else {
                  message.what=Constant.MSG_ERROR;
                  message.obj=ExceptionInfoUtil.getError(e.getCode());
                  getAvEx(e);
                }
                handler.sendMessage(message);
              }
            }
);
          }
 else {
            message.what=Constant.MSG_ERROR;
            message.obj="String_Node_Str";
            handler.sendMessage(message);
          }
        }
 else {
          message.what=Constant.MSG_ERROR;
          message.obj=ExceptionInfoUtil.getError(e.getCode());
          handler.sendMessage(message);
          getAvEx(e);
        }
      }
    }
);
    return;
  }
  AVUser.logInInBackground(userName,password,new LogInCallback<MyAVUser>(){
    @Override public void done(    MyAVUser avUser,    AVException e){
      Message message=new Message();
      if (e == null) {
        User user=new User();
        user.setUserId(avUser.getObjectId());
        user.setHeadImage(getImgUrl(avUser.getHeadImage()));
        user.setUserName(avUser.getUsername());
        user.setUserCode(avUser.getUserCode());
        userLocalDao.insertUser(user,_context);
        message.what=Constant.MSG_SUCCESS;
      }
 else {
        message.what=Constant.MSG_ERROR;
        message.obj=ExceptionInfoUtil.getError(e.getCode());
        getAvEx(e);
      }
      handler.sendMessage(message);
    }
  }
,MyAVUser.class);
}