Of course this is bad. You are doing O(n^2)
comparisons. For every word you are comparing with another word. You need to rethink your algorithm.
Read all the stop words in to a HashSet<String>
and then just check set.contains(word)
. This will improve your performance dramatically.