title: When to create helper methods and separate files
body: <p><strong>Background:</strong> I have a large (several hundred lines) class that manages a concept based on some primitive-type data structures </p>
  
  <pre><code>long[] slist;  //list of unique patterns (related to polyominoes)
  int[][][] sref;//patterns at each place [location][depth][&lt;list of indices in slist&gt;]
  </code></pre>
  
  <p><strong>Question:</strong> The two methods that populate and update these data are going to be quite long, with handfuls of 5-20 line tasks, some shared, others unique. I probably want to make a helper method for each sub-task.</p>
  
  <pre><code>update(...){
      //do A
      //do B
      //do C
      //...
  }
  build(){
      //do D
      //do B
      //do E
      //...
  }
  </code></pre>
  
  <p>The problem is if there are too many unrelated helper methods in one file, readability does not improve. </p>
  
  <p>The answer to <a href="https://stackoverflow.com/questions/4063556/defining-inner-class-outside-java-file">this question</a> gets me most of the way there. I can declare the structures in the same package, in their own class, and access the primitive member field or call related methods. But I still want to know the accepted wisdom here because this organization did not come easily to mind.</p>
  
  <p>Would you ever go so far as to put <code>update()</code> and <code>build()</code> functions in their own files? If so, where should their common tasks be declared?</p>