Apple is a significant company that draws investors’ attention due to its various legal issues. When encountering problems, investors must make decisions that involve both rational and irrational aspects and are often influenced by psychological biases. This study aims to analyze investor sentiment towards the two legal cases faced by Apple and relate it to behavioral finance theory. Using the Naive Bayes classification method on 16,955 tweets from X social media related to these cases, a classification accuracy of 76% was achieved. The analysis results show that positive sentiment is more dominant than neutral and negative sentiment. These findings indicate that despite Apple's involvement in significant legal issues, investor perceptions remain optimistic about the company's prospects and stock value. This suggests that investor behavior is influenced by psychological biases such as overconfidence, representativeness, and availability, which are essential to consider in investment decisions.