public boolean membershipQueryOnSortedArr(int[] array, int key) {
        
        //sanity check on input arguments
        if(array == null || array.length == 0){
          return false;
        }
        //sanity check on the array
        if (!validateArraySorted(array)) {
          return false;
        }
        
        
        int x,left,right;

        x=0;
        /* INJECTION-4: left = 2 */
        left=2;
        /* INJECTION-5: right = array.length */
        right = array.length -1 ;
        /* INJECTION-3: key != array[x] || left <=right */
        /* INJECTION-6: key != array[x] && left < right */
        while ( key != array[x] && left <= right ){

            x = (left+right) >> 1;

            if( key < array[x]){
                /* INJECTION-1: right = x + 2 */
                right = x - 1;
            }
            else{
                left = x + 1;
            }

        }
        /* INJECTION-2: key != array[x] */
        if (key == array[x]){
            return true;
        }
        else{
            return false;
        }
    }