Both these routines call themselves, passing their same arguments to the new call:
When findRep(
String) calls findRep(String), that second call will call findRep(String) which will call findRep(String)... eventually, the JVM will run out of stack space to keep track of all those calls that haven't returned yet, and you'll get a StackOverflowException.
Both versions of findRep need to be implemented in terms of the ArrayList, not in terms of recursive calls.