Program: 172364
Project: 172364
Buggy source:
/** 
 * 伤害统计 需要同步处理
 * @param playerId
 * @param hurt
 */
private synchronized void onBossHurt(int playerId,int hurt,int bossId){
  WorldBoss boss=worldBossData.getWorldBossMap().get(bossId);
  if (boss == null || boss.getCurHp() <= 0) {
    ServerLogger.warn("String_Node_Str",bossId);
    return;
  }
  Player player=playerService.getPlayer(playerId);
  HurtRecord hr=worldBossData.getHurtMap().get(playerId);
  if (hr == null) {
    hr=new HurtRecord(playerId,player.getName());
    worldBossData.getHurtMap().put(playerId,hr);
  }
  int realHurt=hurt > boss.getCurHp() ? boss.getCurHp() : hurt;
  try {
    lock.lock();
    treeMap.remove(hr);
    hr.setHurt(hr.getHurt() + realHurt);
    hr.setName(player.getName());
    treeMap.put(hr,hr);
    if (treeMap.size() > size) {
      treeMap.pollLastEntry();
    }
    worldBossData.setbUpdate(true);
  }
  finally {
    lock.unlock();
  }
  boss.setCurHp(boss.getCurHp() - hurt);
  cleanupHurt(hr,bossId);
  hr.setCurHurt(hr.getCurHurt() + realHurt);
  MonsterHurtVO ret=new MonsterHurtVO();
  ret.monsterId=bossId;
  ret.curHp=boss.getCurHp() < 0 ? 0 : boss.getCurHp();
  ret.hurt=hurt;
  broadcast(CMD_MONSTER_INFO,ret);
  if (boss.getCurHp() <= 0) {
    worldBossData.getKillMap().put(bossId,playerId);
    Int2Param param=new Int2Param();
    param.param1=playerId;
    param.param2=bossId;
    broadcast(WorldBossExtension.BOSS_DEAD,param);
    worldBossData.getKillMap().put(bossId,playerId);
    MonsterRefreshConfig conf=ConfigData.getConfig(MonsterRefreshConfig.class,bossId);
    MonsterConfig conf1=ConfigData.getConfig(MonsterConfig.class,conf.monsterId);
    messageService.sendSysMsg(5,player.getName(),conf1.name);
    hurtRank();
    if (worldBossData.checkAllDead()) {
      sendAward();
    }
    if (bossId == worldBossData.getLastBossId()) {
      worldBossData.setLastKillPlayerId(playerId);
      worldBossData.setLastKillTime(System.currentTimeMillis());
    }
    return;
  }
}

Fixed version (ground truth):
/** 
 * 伤害统计 需要同步处理
 * @param playerId
 * @param hurt
 */
private synchronized void onBossHurt(int playerId,int hurt,int bossId){
  WorldBoss boss=worldBossData.getWorldBossMap().get(bossId);
  if (boss == null || boss.getCurHp() <= 0) {
    ServerLogger.warn("String_Node_Str",bossId);
    return;
  }
  Player player=playerService.getPlayer(playerId);
  HurtRecord hr=worldBossData.getHurtMap().get(playerId);
  if (hr == null) {
    hr=new HurtRecord(playerId,player.getName());
    worldBossData.getHurtMap().put(playerId,hr);
  }
  int realHurt=hurt > boss.getCurHp() ? boss.getCurHp() : hurt;
  try {
    lock.lock();
    treeMap.remove(hr);
    hr.setHurt(hr.getHurt() + realHurt);
    hr.setName(player.getName());
    treeMap.put(hr,hr);
    if (treeMap.size() > size) {
      treeMap.pollLastEntry();
    }
    worldBossData.setbUpdate(true);
  }
  finally {
    lock.unlock();
  }
  boss.setCurHp(boss.getCurHp() - hurt);
  cleanupHurt(hr,bossId);
  hr.setCurHurt(hr.getCurHurt() + realHurt);
  MonsterHurtVO ret=new MonsterHurtVO();
  ret.monsterId=bossId;
  ret.curHp=boss.getCurHp() < 0 ? 0 : boss.getCurHp();
  ret.hurt=hurt;
  broadcast(CMD_MONSTER_INFO,ret);
  if (boss.getCurHp() <= 0) {
    worldBossData.getKillMap().put(bossId,playerId);
    Int2Param param=new Int2Param();
    param.param1=playerId;
    param.param2=bossId;
    broadcast(WorldBossExtension.BOSS_DEAD,param);
    worldBossData.getKillMap().put(bossId,playerId);
    MonsterRefreshConfig conf=ConfigData.getConfig(MonsterRefreshConfig.class,bossId);
    MonsterConfig conf1=ConfigData.getConfig(MonsterConfig.class,conf.monsterId);
    messageService.sendSysMsg(5,player.getName(),conf1.name);
    Context.getThreadService().execute(new Runnable(){
      @Override public void run(){
        try {
          hurtRank();
        }
 catch (        Exception e) {
          ServerLogger.err(e,"String_Node_Str");
        }
      }
    }
);
    if (worldBossData.checkAllDead()) {
      sendAward();
    }
    if (bossId == worldBossData.getLastBossId()) {
      worldBossData.setLastKillPlayerId(playerId);
      worldBossData.setLastKillTime(System.currentTimeMillis());
    }
    return;
  }
}