again, try something like (if possible)

for (String trckedEvent : trackedEventsList) {
    if (trackedEvent.contains("...") {
...