private double match_bitapScore(int e,int x,int loc,String pattern){
  float accuracy=(float)e / pattern.length();
  int proximity=Math.abs(loc - x);
  if (Match_Distance == 0) {
    return proximity == 0 ? accuracy : 1.0;
  }
  return accuracy + (proximity / (float)Match_Distance);
}

private double match_bitapScore ( int e , int x , int loc , String pattern ) { float accuracy = ( float ) e / pattern . length ( ) ; int proximity = Math . abs ( loc - x ) ; if ( Match_Distance == 0 ) { return proximity == 0 ? accuracy : 1.0 ; } return accuracy + ( proximity / ( float ) Match_Distance ) ; }
compute and return the score for a match with e errors and x location .
