private static boolean same(String[] s1,String[] s2){
  if (s1 == null) {
    return s2 == null;
  }
 else   if (s2 == null || s1.length != s2.length) {
    return false;
  }
  outer:   for (int i=s2.length; i > 0; ) {
    String onm=s2[--i];
    String ocls=s2[--i];
    for (int j=s1.length; j > 0; ) {
      String nm=s1[--j];
      String cls=s1[--j];
      if (cls.equals(ocls) && (nm == null ? onm == null : nm.equals(onm))) {
        continue outer;
      }
    }
    return false;
  }
  return true;
}

private static boolean same ( String [ ] s1 , String [ ] s2 ) { if ( s1 == null ) { return s2 == null ; } else if ( s2 == null || s1 . length != s2 . length ) { return false ; } outer : for ( int i = s2 . length ; i > 0 ; ) { String onm = s2 [ -- i ] ; String ocls = s2 [ -- i ] ; for ( int j = s1 . length ; j > 0 ; ) { String nm = s1 [ -- j ] ; String cls = s1 [ -- j ] ; if ( cls . equals ( ocls ) && ( nm == null ? onm == null : nm . equals ( onm ) ) ) { continue outer ; } } return false ; } return true ; }
returns true if both arrays are null , or both arrays are the same length and contain the same pairs ( ignoring order ) .
