Program: 174058
Project: 174058
Buggy source:
public static void checkAddReaction(GuildMessageReactionAddEvent event){
  if (!(Bot.getInstance().dataEnabled))   return;
  thread.submit(() -> {
    Guild guild=event.getGuild();
    if (!(event.getChannel().getTopic() == null) && event.getChannel().getTopic().toLowerCase().contains("String_Node_Str"))     return;
    if (!(isConfigured(guild)))     return;
    TextChannel starboard=GuildUtils.getStarboardChannel(event.getGuild());
    Message starredMsg=getMessage(event.getMessageIdLong(),event.getChannel());
    if (starredMsg == null)     return;
    String emote=Bot.getInstance().endless.getGuildSettings(guild).getStarboardEmote();
    MessageReaction.ReactionEmote re=event.getReactionEmote();
    if (isSameAuthor(starredMsg.getAuthor(),event.getUser()) && (re.isEmote() ? re.getEmote().getId().equals(emote) : re.getName().equals(emote)))     return;
    if (!(amountPassed(starredMsg)))     return;
    if (!(starboard.canTalk())) {
      FinderUtil.getDefaultChannel(guild).sendMessage("String_Node_Str").queue(null,e -> guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage("String_Node_Str").queue(null,null)));
      return;
    }
    if (event.getChannel().getIdLong() == starboard.getIdLong()) {
      boolean isUnicode=false;
      String content=starredMsg.getContentRaw();
      String unicode;
      Pattern REGEX;
      if (starredMsg.getEmotes().isEmpty()) {
        isUnicode=true;
        REGEX=EMOJI_PATTERN;
        unicode=getUnicode(emote);
        content=content.replace(emote,unicode);
      }
 else       REGEX=EMOTE_PATTERN;
      Matcher m=REGEX.matcher(content);
      if (m.matches() && starredMsg.getAuthor().getIdLong() == event.getJDA().getSelfUser().getIdLong()) {
        String channelId;
        String msgId;
        if (isUnicode) {
          channelId=m.group(3);
          msgId=m.group(4);
        }
 else {
          channelId=m.group(4);
          msgId=m.group(5);
        }
        TextChannel originalTc=guild.getTextChannelById(channelId);
        if (originalTc == null || !(ChecksUtil.hasPermission(guild.getSelfMember(),originalTc,Permission.MESSAGE_HISTORY)))         return;
        Message originalMsg=originalTc.getMessageById(msgId).complete();
        MessageReaction reaction=originalMsg.getReactions().stream().filter(r -> {
          MessageReaction.ReactionEmote reE=r.getReactionEmote();
          return (reE.isEmote() ? reE.getId().equals(emote) : reE.getName().equals(emote));
        }
).findFirst().orElse(null);
        if (reaction == null || reaction.getUsers().complete().contains(event.getUser()))         return;
        if (isSameAuthor(originalMsg.getAuthor(),event.getUser()) && (re.isEmote() ? re.getId().equals(emote) : re.getName().equals(emote)))         return;
        int count=getStarCount(originalMsg) + getStarCount(starredMsg);
        sdm.updateCount(originalMsg.getIdLong(),count);
        updateCount(starredMsg,sdm.getStarboardMessage(originalMsg.getIdLong()).getStarboardMessageIdLong(),count);
      }
 else       addMessage(starredMsg,starboard);
    }
 else {
      if (existsOnStarboard(starredMsg.getIdLong())) {
        sdm.updateCount(starredMsg.getIdLong(),getStarCount(starredMsg));
        updateCount(starredMsg,sdm.getStarboardMessage(starredMsg.getIdLong()).getStarboardMessageIdLong(),getStarCount(starredMsg));
      }
 else       addMessage(starredMsg,starboard);
    }
  }
);
}

Fixed version (ground truth):
public static void checkAddReaction(GuildMessageReactionAddEvent event){
  if (!(Bot.getInstance().dataEnabled))   return;
  thread.submit(() -> {
    Guild guild=event.getGuild();
    if (!(event.getChannel().getTopic() == null) && event.getChannel().getTopic().toLowerCase().contains("String_Node_Str"))     return;
    if (!(isConfigured(guild)))     return;
    TextChannel starboard=GuildUtils.getStarboardChannel(event.getGuild());
    Message starredMsg=getMessage(event.getMessageIdLong(),event.getChannel());
    if (starredMsg == null)     return;
    String emote=Bot.getInstance().endless.getGuildSettings(guild).getStarboardEmote();
    MessageReaction.ReactionEmote re=event.getReactionEmote();
    if (isSameAuthor(starredMsg.getAuthor(),event.getUser()) && (re.isEmote() ? re.getEmote().getId().equals(emote) : re.getName().equals(emote)))     return;
    if (!(amountPassed(starredMsg)))     return;
    if (!(starboard.canTalk())) {
      FinderUtil.getDefaultChannel(guild).sendMessage("String_Node_Str").queue(null,e -> guild.getOwner().getUser().openPrivateChannel().queue(s -> s.sendMessage("String_Node_Str").queue(null,null)));
      return;
    }
    if (event.getChannel().getIdLong() == starboard.getIdLong()) {
      boolean isUnicode=false;
      String content=starredMsg.getContentRaw();
      String unicode;
      Pattern REGEX;
      if (starredMsg.getEmotes().isEmpty()) {
        isUnicode=true;
        REGEX=EMOJI_PATTERN;
        unicode=getUnicode(emote);
        content=content.replace(emote,unicode);
      }
 else       REGEX=EMOTE_PATTERN;
      Matcher m=REGEX.matcher(content);
      if (m.matches() && starredMsg.getAuthor().getIdLong() == event.getJDA().getSelfUser().getIdLong()) {
        String channelId;
        String msgId;
        if (isUnicode) {
          channelId=m.group(3);
          msgId=m.group(4);
        }
 else {
          channelId=m.group(4);
          msgId=m.group(5);
        }
        TextChannel originalTc=guild.getTextChannelById(channelId);
        if (originalTc == null || !(ChecksUtil.hasPermission(guild.getSelfMember(),originalTc,Permission.MESSAGE_HISTORY)))         return;
        Message originalMsg=originalTc.getMessageById(msgId).complete();
        MessageReaction reaction=originalMsg.getReactions().stream().filter(r -> {
          MessageReaction.ReactionEmote reE=r.getReactionEmote();
          return (reE.isEmote() ? reE.getId().equals(emote) : reE.getName().equals(emote));
        }
).findFirst().orElse(null);
        if (reaction == null || reaction.getUsers().complete().contains(event.getUser()))         return;
        if (isSameAuthor(originalMsg.getAuthor(),event.getUser()) && (re.isEmote() ? re.getId().equals(emote) : re.getName().equals(emote)))         return;
        int count=getStarCount(originalMsg) + getStarCount(starredMsg);
        sdm.updateCount(originalMsg.getIdLong(),count);
        updateCount(starredMsg,sdm.getStarboardMessage(originalMsg.getIdLong()).getStarboardMessageIdLong(),count);
      }
 else {
        if (existsOnStarboard(starredMsg.getIdLong())) {
          sdm.updateCount(starredMsg.getIdLong(),getStarCount(starredMsg));
          updateCount(starredMsg,sdm.getStarboardMessage(starredMsg.getIdLong()).getStarboardMessageIdLong(),getStarCount(starredMsg));
        }
 else         addMessage(starredMsg,starboard);
      }
    }
 else {
      if (existsOnStarboard(starredMsg.getIdLong())) {
        sdm.updateCount(starredMsg.getIdLong(),getStarCount(starredMsg));
        updateCount(starredMsg,sdm.getStarboardMessage(starredMsg.getIdLong()).getStarboardMessageIdLong(),getStarCount(starredMsg));
      }
 else       addMessage(starredMsg,starboard);
    }
  }
);
}