class Utils {

  public static String[][] normalizeArrays( int normalizeToLength, String[]... arraysToNormalize ) {
    if ( arraysToNormalize == null ) {
      return null;
    }
    int arraysToProcess = arraysToNormalize.length;
    String[][] rtn = new String[ arraysToProcess ][];
    for ( int i = 0; i < arraysToNormalize.length; i++ ) {
      String[] nextArray = arraysToNormalize[ i ];
      if ( nextArray != null ) {
        if ( nextArray.length < normalizeToLength ) {
          String[] newArray = new String[ normalizeToLength ];
          System.arraycopy( nextArray, 0, newArray, 0, nextArray.length );
          rtn[ i ] = newArray;
        } else {
          rtn[ i ] = nextArray;
        }
      } else {
        rtn[ i ] = new String[ normalizeToLength ];
      }
    }
    return rtn;
  }

}