title: How to find a repeating pattern in a list of strings?
body: <p>I have a list of methods from a trace that is taken of a process. I want to detect if anything is essentially called in a loop. For example, I might have</p>
  
  <pre><code>method1
      method2
      method2
      method2
  </code></pre>
  
  <p>Might display 'method2 called by method1 3 times in a possible loop'.</p>
  
  <pre><code>method3
      method1
      methodd
      methoda
      methodb
      methodc
      methodd
      methoda
      methodb
      methodc
      methodd
  </code></pre>
  
  <p>Would display 'methoda, methodb, methodc, methodd 2 times in a possible loop'.</p>
  
  <p>Obviously, there is no guarantee that there is a loop, but at least we know that there is a repeating pattern. The only input is the list of the children (for example from above method2, method2, method2).</p>