private static int stringToHash(String s){
  int len=s.length();
  int hash2=0;
  int hash=len;
  hash<<=5;
  hash+=s.charAt(0) - 0x60;
  int j=len;
  for (int i=0; i < 4 && j > 0; i++) {
    j--;
    hash<<=5;
    hash+=s.charAt(j) - 0x60;
    hash2<<=6;
    hash2+=s.charAt(i) - 0x5F;
  }
  return hash ^ hash2;
}

private static int stringToHash ( String s ) { int len = s . length ( ) ; int hash2 = 0 ; int hash = len ; hash <<= 5 ; hash += s . charAt ( 0 ) - 0x60 ; int j = len ; for ( int i = 0 ; i < 4 && j > 0 ; i ++ ) { j -- ; hash <<= 5 ; hash += s . charAt ( j ) - 0x60 ; hash2 <<= 6 ; hash2 += s . charAt ( i ) - 0x5F ; } return hash ^ hash2 ; }
this method has to return a unique integer for each well - known lower - cased attribute name .
