As both Run methods were similar, the refactor extract superclass was used again so that we could increase the understandibility and reduce the code in only one class, the same refactor was needed to be used in the 4 code smells because this we found out the this was a big issue and we could improve this 4 issues in only one class.
Both run methods were based on the same logic:
if(filterCondition)
positivePositive();
else
negativeHandling();
We opted to make these methods abstract for other filter classes to implement their desired conditions and respective handling.
Code Smell: Duplicated Code
Classes: CurseWordFilter and AdvertiseFilterThread
Methods: Run (both)
Refactoring: Extract Superclass
Diff: