code: boolean cleanupBadClusters( LloydsIterationTask task, final Vec[] vecs, final double[][] centers, final double[] means, final double[] mults, final int[] modes ) {
        // Find any bad clusters
        int clu;
        for( clu=0; clu<centers.length; clu++ )
          if( task._size[clu] == 0 ) break;
        if( clu == centers.length ) return false; // No bad clusters
  
        long row = task._worst_row;
        Log.warn("KMeans: Re-initializing cluster " + clu + " to row " + row);
        data(centers[clu] = task._cMeans[clu], vecs, row, means, mults, modes);
        task._size[clu] = 1; //FIXME: PUBDEV-871 Some other cluster had their membership count reduced by one! (which one?)
  
        // Find any MORE bad clusters; we only fixed the first one
        for( clu=0; clu<centers.length; clu++ )
          if( task._size[clu] == 0 ) break;
        if( clu == centers.length ) return false; // No MORE bad clusters
  
        // If we see 2 or more bad rows, just re-run Lloyds to get the
        // next-worst row.  We don't count this as an iteration, because
        // we're not really adjusting the centers, we're trying to get
        // some centers *at-all*.
        Log.warn("KMeans: Re-running Lloyds to re-init another cluster");
        if (_reinit_attempts++ < centers.length) {
          return true;  // Rerun Lloyds, and assign points to centroids
        } else {
          _reinit_attempts = 0;
          return false;
        }
      }
docs: per iteration ('cause we only tracked the 1 worst row)