druidG.g:502:1: simpleArith returns [PostAggItem postAggItem] : (a= simplePostAggAccess ) ( ( WS )? postAggArithOper[postAggItem] ( WS )? b= simplePostAggAccess )? ;
341805
public final PostAggItem simpleArith() throws RecognitionException {
		PostAggItem postAggItem = null;


		PostAggItem a =null;
		PostAggItem b =null;

		  postAggItem = new PostAggItem("arithmetic"); 
		try {
			// druidG.g:504:2: ( (a= simplePostAggAccess ) ( ( WS )? postAggArithOper[postAggItem] ( WS )? b= simplePostAggAccess )? )
			// druidG.g:504:4: (a= simplePostAggAccess ) ( ( WS )? postAggArithOper[postAggItem] ( WS )? b= simplePostAggAccess )?
			{
			// druidG.g:504:4: (a= simplePostAggAccess )
			// druidG.g:504:5: a= simplePostAggAccess
			{
			pushFollow(FOLLOW_simplePostAggAccess_in_simpleArith3320);
			a=simplePostAggAccess();
			state._fsp--;

			postAggItem=a;
			}

			// druidG.g:504:45: ( ( WS )? postAggArithOper[postAggItem] ( WS )? b= simplePostAggAccess )?
			int alt212=2;
			alt212 = dfa212.predict(input);
			switch (alt212) {
				case 1 :
					// druidG.g:504:46: ( WS )? postAggArithOper[postAggItem] ( WS )? b= simplePostAggAccess
					{
					// druidG.g:504:46: ( WS )?
					int alt210=2;
					int LA210_0 = input.LA(1);
					if ( (LA210_0==WS) ) {
						alt210=1;
					}
					switch (alt210) {
						case 1 :
							// druidG.g:504:46: WS
							{
							match(input,WS,FOLLOW_WS_in_simpleArith3326); 
							}
							break;

					}

					pushFollow(FOLLOW_postAggArithOper_in_simpleArith3329);
					postAggArithOper(postAggItem);
					state._fsp--;

					// druidG.g:504:80: ( WS )?
					int alt211=2;
					int LA211_0 = input.LA(1);
					if ( (LA211_0==WS) ) {
						alt211=1;
					}
					switch (alt211) {
						case 1 :
							// druidG.g:504:80: WS
							{
							match(input,WS,FOLLOW_WS_in_simpleArith3332); 
							}
							break;

					}

					pushFollow(FOLLOW_simplePostAggAccess_in_simpleArith3337);
					b=simplePostAggAccess();
					state._fsp--;


						    postAggItem = new PostAggItem("arithmetic"); 
						    if (postAggItem.fields == null) {
						       postAggItem.fields = new ArrayList<>();
						    }
					            postAggItem.fields.add(a);
						    postAggItem.fields.add(b);
						   
					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return postAggItem;
	}
890518
public void mTokens() throws RecognitionException {
        // src/riemann/Query.g:1:8: ( AND | OR | NOT | APPROXIMATELY | REGEX_MATCH | NOT_EQUAL | EQUAL | LESSER | LESSER_EQUAL | GREATER | GREATER_EQUAL | TAGGED | T__25 | T__26 | T__27 | T__28 | T__29 | T__30 | T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | ID | INT | FLOAT | WS | String )
        int alt13=31;
        alt13 = dfa13.predict(input);
        switch (alt13) {
            case 1 :
                // src/riemann/Query.g:1:10: AND
                {
                mAND(); 

                }
                break;
            case 2 :
                // src/riemann/Query.g:1:14: OR
                {
                mOR(); 

                }
                break;
            case 3 :
                // src/riemann/Query.g:1:17: NOT
                {
                mNOT(); 

                }
                break;
            case 4 :
                // src/riemann/Query.g:1:21: APPROXIMATELY
                {
                mAPPROXIMATELY(); 

                }
                break;
            case 5 :
                // src/riemann/Query.g:1:35: REGEX_MATCH
                {
                mREGEX_MATCH(); 

                }
                break;
            case 6 :
                // src/riemann/Query.g:1:47: NOT_EQUAL
                {
                mNOT_EQUAL(); 

                }
                break;
            case 7 :
                // src/riemann/Query.g:1:57: EQUAL
                {
                mEQUAL(); 

                }
                break;
            case 8 :
                // src/riemann/Query.g:1:63: LESSER
                {
                mLESSER(); 

                }
                break;
            case 9 :
                // src/riemann/Query.g:1:70: LESSER_EQUAL
                {
                mLESSER_EQUAL(); 

                }
                break;
            case 10 :
                // src/riemann/Query.g:1:83: GREATER
                {
                mGREATER(); 

                }
                break;
            case 11 :
                // src/riemann/Query.g:1:91: GREATER_EQUAL
                {
                mGREATER_EQUAL(); 

                }
                break;
            case 12 :
                // src/riemann/Query.g:1:105: TAGGED
                {
                mTAGGED(); 

                }
                break;
            case 13 :
                // src/riemann/Query.g:1:112: T__25
                {
                mT__25(); 

                }
                break;
            case 14 :
                // src/riemann/Query.g:1:118: T__26
                {
                mT__26(); 

                }
                break;
            case 15 :
                // src/riemann/Query.g:1:124: T__27
                {
                mT__27(); 

                }
                break;
            case 16 :
                // src/riemann/Query.g:1:130: T__28
                {
                mT__28(); 

                }
                break;
            case 17 :
                // src/riemann/Query.g:1:136: T__29
                {
                mT__29(); 

                }
                break;
            case 18 :
                // src/riemann/Query.g:1:142: T__30
                {
                mT__30(); 

                }
                break;
            case 19 :
                // src/riemann/Query.g:1:148: T__31
                {
                mT__31(); 

                }
                break;
            case 20 :
                // src/riemann/Query.g:1:154: T__32
                {
                mT__32(); 

                }
                break;
            case 21 :
                // src/riemann/Query.g:1:160: T__33
                {
                mT__33(); 

                }
                break;
            case 22 :
                // src/riemann/Query.g:1:166: T__34
                {
                mT__34(); 

                }
                break;
            case 23 :
                // src/riemann/Query.g:1:172: T__35
                {
                mT__35(); 

                }
                break;
            case 24 :
                // src/riemann/Query.g:1:178: T__36
                {
                mT__36(); 

                }
                break;
            case 25 :
                // src/riemann/Query.g:1:184: T__37
                {
                mT__37(); 

                }
                break;
            case 26 :
                // src/riemann/Query.g:1:190: T__38
                {
                mT__38(); 

                }
                break;
            case 27 :
                // src/riemann/Query.g:1:196: ID
                {
                mID(); 

                }
                break;
            case 28 :
                // src/riemann/Query.g:1:199: INT
                {
                mINT(); 

                }
                break;
            case 29 :
                // src/riemann/Query.g:1:203: FLOAT
                {
                mFLOAT(); 

                }
                break;
            case 30 :
                // src/riemann/Query.g:1:209: WS
                {
                mWS(); 

                }
                break;
            case 31 :
                // src/riemann/Query.g:1:212: String
                {
                mString(); 

                }
                break;

        }

    }
637894
function parseSignature (sig) {
  var tmp = /^(\w+)\((.*)\)$/.exec(sig)

  if (tmp.length !== 3) {
    throw new Error('Invalid method signature')
  }

  var args = /^(.+)\):\((.+)$/.exec(tmp[2])

  if (args !== null && args.length === 3) {
    return {
      method: tmp[1],
      args: args[1].split(','),
      retargs: args[2].split(',')
    }
  } else {
    var params = tmp[2].split(',')
    if (params.length === 1 && params[0] === '') {
      // Special-case (possibly naive) fixup for functions that take no arguments.
      // TODO: special cases are always bad, but this makes the function return
      // match what the calling functions expect
      params = []
    }
    return {
      method: tmp[1],
      args: params
    }
  }
}
1075719
function isCTag (str, cTag, index) {
    var l = cTag.length, s = str.substr(index, l);
    if (cTag === s) {
        return {
            str: s,
            index: index,
            type: 1,
            jump: l - 1
        };
    }
}
317140
public final String getTargetPosTag() {
    String targetPosTag = match.getPosTag();
    List<String> posTags = new ArrayList<>();
    Pattern pPosRegexMatch = match.getPosRegexMatch();
    String posTagReplace = match.getPosTagReplace();

    if (match.isStaticLemma()) {
      for (AnalyzedToken analyzedToken : matchedToken) {
        String tst = analyzedToken.getPOSTag();
        if (tst != null && pPosRegexMatch.matcher(tst).matches()) {
          targetPosTag = analyzedToken.getPOSTag();
          posTags.add(targetPosTag);
        }
      }
      
      if (pPosRegexMatch != null && posTagReplace != null && !posTags.isEmpty()) {
        targetPosTag = pPosRegexMatch.matcher(targetPosTag).replaceAll(
            posTagReplace);
      }
    } else {
      for (AnalyzedToken analyzedToken : formattedToken) {
        String tst = analyzedToken.getPOSTag();
        if (tst != null && pPosRegexMatch.matcher(tst).matches()) {
          targetPosTag = analyzedToken.getPOSTag();
          posTags.add(targetPosTag);
        }
      }
      if (pPosRegexMatch != null && posTagReplace != null) {
        if (posTags.isEmpty()) {
          posTags.add(targetPosTag);
        }
        StringBuilder sb = new StringBuilder();
        int posTagLen = posTags.size();
        int l = 0;
        for (String lPosTag : posTags) {
          l++;
          lPosTag = pPosRegexMatch.matcher(lPosTag).replaceAll(posTagReplace);
          if (match.setsPos()) {
            lPosTag = synthesizer.getPosTagCorrection(lPosTag);
          }
          sb.append(lPosTag);
          if (l < posTagLen) {
            sb.append('|');
          }
        }
        targetPosTag = sb.toString();
      }
    }
    return targetPosTag;
  }
385702
@Nullable
  private String getNumAgreedPosTag(String leftPosTag, String rightPosTag, boolean leftNv) {
    String agreedPosTag = null;
    
    if( leftPosTag.contains(":p:") && SING_REGEX_F.matcher(rightPosTag).find()
        || SING_REGEX_F.matcher(leftPosTag).find() && rightPosTag.contains(":p:")) {
      String leftConj = PosTagHelper.getConj(leftPosTag);
      if( leftConj != null && leftConj.equals(PosTagHelper.getConj(rightPosTag)) ) {
        agreedPosTag = leftPosTag;
      }
    }
    return agreedPosTag;
  }
966425
def toArgs(self):
        """"""
        # FIXME - undocumented exception
        post_args = self.toPostArgs()
        kvargs = {}
        for k, v in post_args.items():
            if not k.startswith('openid.'):
                raise ValueError(
                    'This message can only be encoded as a POST, because it '
                    'contains arguments that are not prefixed with "openid."')
            else:
                kvargs[k[7:]] = v

        return kvargs
494580
@Override
  public S handle(int version, water.api.Route route, Properties parms, String postBody) throws Exception {
    // Only here for train or validate-parms
    if( !route._handler_method.getName().equals("train") )
      throw water.H2O.unimpl();

    // Peek out the desired algo from the URL
    String ss[] = route._url.split("/");
    String algoURLName = ss[3]; // {}/{99}/{Grid}/{gbm}/
    String algoName = ModelBuilder.algoName(algoURLName); // gbm -> GBM; deeplearning -> DeepLearning
    String schemaDir = ModelBuilder.schemaDirectory(algoURLName);
    // Get the latest version of this algo: /99/Grid/gbm  ==> GBMV3
    // String algoSchemaName = SchemaServer.schemaClass(version, algoName).getSimpleName(); // GBMV3
    // int algoVersion = Integer.valueOf(algoSchemaName.substring(algoSchemaName.lastIndexOf("V")+1)); // '3'
    // Ok, i'm replacing one hack with another hack here, because SchemaServer.schema*() calls are getting eliminated.
    // There probably shouldn't be any reference to algoVersion here at all... TODO: unhack all of this
    int algoVersion = 3;
    if (algoName.equals("SVD") || algoName.equals("Aggregator") || algoName.equals("StackedEnsemble")) algoVersion = 99;

    // TODO: this is a horrible hack which is going to cause maintenance problems:
    String paramSchemaName = schemaDir+algoName+"V"+algoVersion+"$"+ModelBuilder.paramName(algoURLName)+"V"+algoVersion;

    // Build the Grid Search schema, and fill it from the parameters
    S gss = (S) new GridSearchSchema();
    gss.init_meta();
    gss.parameters = (P)TypeMap.newFreezable(paramSchemaName);
    gss.parameters.init_meta();
    gss.hyper_parameters = new IcedHashMap<>();

    // Get default parameters, then overlay the passed-in values
    ModelBuilder builder = ModelBuilder.make(algoURLName,null,null); // Default parameter settings
    gss.parameters.fillFromImpl(builder._parms); // Defaults for this builder into schema

    gss.fillFromParms(parms);   // Override defaults from user parms

    // Verify list of hyper parameters
    // Right now only names, no types
    // note: still use _validation_frame and and _training_frame at this point.
    // Do not change those names yet.
    validateHyperParams((P)gss.parameters, gss.hyper_parameters);

    // Get actual parameters
    MP params = (MP) gss.parameters.createAndFillImpl();

    Map<String,Object[]> sortedMap = new TreeMap<>(gss.hyper_parameters);

    // Need to change validation_frame to valid now.  HyperSpacewalker will complain
    // if it encountered an illegal parameter name.  From now on, validation_frame,
    // training_fame are no longer valid names.
    if (sortedMap.containsKey("validation_frame")) {
      sortedMap.put("valid", sortedMap.get("validation_frame"));
      sortedMap.remove("validation_frame");
    }

    // Get/create a grid for given frame
    // FIXME: Grid ID is not pass to grid search builder!
    Key<Grid> destKey = gss.grid_id != null ? gss.grid_id.key() : null;
    // Create target grid search object (keep it private for now)
    // Start grid search and return the schema back with job key
    Job<Grid> gsJob = GridSearch.startGridSearch(
        destKey,
        params,
        sortedMap,
        new DefaultModelParametersBuilderFactory<MP, P>(),
        (HyperSpaceSearchCriteria) gss.search_criteria.createAndFillImpl()
    );

    // Fill schema with job parameters
    // FIXME: right now we have to remove grid parameters which we sent back
    gss.hyper_parameters = null;
    gss.total_models = gsJob._result.get().getModelCount(); // TODO: looks like it's currently always 0
    gss.job = new JobV3(gsJob);

    return gss;
  }
585025
function parsePostfixExpression() {
        var expr, token, startToken = lookahead;

        expr = inheritCoverGrammar(parseLeftHandSideExpressionAllowCall);

        if (!hasLineTerminator && lookahead.type === Token.Punctuator) {
            if (match('++') || match('--')) {
                // ECMA-262 11.3.1, 11.3.2
                if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
                    tolerateError(Messages.StrictLHSPostfix);
                }

                if (!isAssignmentTarget) {
                    tolerateError(Messages.InvalidLHSInAssignment);
                }

                isAssignmentTarget = isBindingElement = false;

                token = lex();
                expr = new WrappingNode(startToken).finishPostfixExpression(token.value, expr);
            }
        }

        return expr;
    }
146180
static int lastArgMatchesVarg(Parameter[] params, ClassNode... args) {
        if (!isVargs(params)) return -1;
        // case length ==0 handled already
        // we have now two cases,
        // the argument is wrapped in the vargs array or
        // the argument is an array that can be used for the vargs part directly
        // we test only the wrapping part, since the non wrapping is done already
        ClassNode lastParamType = params[params.length - 1].getType();
        ClassNode ptype = lastParamType.getComponentType();
        ClassNode arg = args[args.length - 1];
        if (isNumberType(ptype) && isNumberType(arg) && !ptype.equals(arg)) return -1;
        return isAssignableTo(arg, ptype)?Math.min(getDistance(arg, lastParamType), getDistance(arg, ptype)):-1;
    }
1084430
public final String aggFunc() throws RecognitionException {
		String name = null;


		try {
			// druidG.g:470:2: ( LONG_SUM | DOUBLE_SUM | UNIQUE | HYPER_UNIQUE | MIN | MAX | JAVASCRIPT )
			int alt199=7;
			switch ( input.LA(1) ) {
			case LONG_SUM:
				{
				alt199=1;
				}
				break;
			case DOUBLE_SUM:
				{
				alt199=2;
				}
				break;
			case UNIQUE:
				{
				alt199=3;
				}
				break;
			case HYPER_UNIQUE:
				{
				alt199=4;
				}
				break;
			case MIN:
				{
				alt199=5;
				}
				break;
			case MAX:
				{
				alt199=6;
				}
				break;
			case JAVASCRIPT:
				{
				alt199=7;
				}
				break;
			default:
				NoViableAltException nvae =
					new NoViableAltException("", 199, 0, input);
				throw nvae;
			}
			switch (alt199) {
				case 1 :
					// druidG.g:470:4: LONG_SUM
					{
					match(input,LONG_SUM,FOLLOW_LONG_SUM_in_aggFunc3148); 
					name = "longSum";
					}
					break;
				case 2 :
					// druidG.g:471:4: DOUBLE_SUM
					{
					match(input,DOUBLE_SUM,FOLLOW_DOUBLE_SUM_in_aggFunc3155); 
					name = "doubleSum";
					}
					break;
				case 3 :
					// druidG.g:472:4: UNIQUE
					{
					match(input,UNIQUE,FOLLOW_UNIQUE_in_aggFunc3162); 
					name = "unique";
					}
					break;
				case 4 :
					// druidG.g:473:4: HYPER_UNIQUE
					{
					match(input,HYPER_UNIQUE,FOLLOW_HYPER_UNIQUE_in_aggFunc3169); 
					name = "hyperUnique";
					}
					break;
				case 5 :
					// druidG.g:474:4: MIN
					{
					match(input,MIN,FOLLOW_MIN_in_aggFunc3176); 
					name = "min";
					}
					break;
				case 6 :
					// druidG.g:475:4: MAX
					{
					match(input,MAX,FOLLOW_MAX_in_aggFunc3183); 
					name = "max";
					}
					break;
				case 7 :
					// druidG.g:476:4: JAVASCRIPT
					{
					match(input,JAVASCRIPT,FOLLOW_JAVASCRIPT_in_aggFunc3190); 
					name = "javascript";
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return name;
	}
206618
static MolgenisValidationException translateInvalidIntegerException(PSQLException pSqlException) {
    ServerErrorMessage serverErrorMessage = pSqlException.getServerErrorMessage();
    String message = serverErrorMessage.getMessage();
    Matcher matcher =
        Pattern.compile("invalid input syntax for \\b(?:type )?\\b(.+?): \"(.*?)\"")
            .matcher(message);
    boolean matches = matcher.matches();
    if (!matches) {
      throw new RuntimeException(ERROR_TRANSLATING_EXCEPTION_MSG, pSqlException);
    }
    String postgreSqlType = matcher.group(1);

    // convert PostgreSQL data type to attribute type:
    String type;
    switch (postgreSqlType) {
      case "boolean":
        type = BOOL.toString();
        break;
      case "date":
        type = DATE.toString();
        break;
      case "timestamp with time zone":
        type = DATE_TIME.toString();
        break;
      case "double precision":
        type = DECIMAL.toString();
        break;
      case "integer":
        type = INT.toString() + " or " + LONG.toString();
        break;
      default:
        type = postgreSqlType;
        break;
    }
    String value = matcher.group(2);

    ConstraintViolation constraintViolation =
        new ConstraintViolation(
            format("Value [%s] of this entity attribute is not of type [%s].", value, type), null);
    return new MolgenisValidationException(singleton(constraintViolation));
  }
500054
def simple_equality(cls, first, second, msg=None):
        
        if not first==second:
            standardMsg = '%s != %s' % (safe_repr(first), safe_repr(second))
            raise cls.failureException(msg or standardMsg)
416572
public final AggItem aggItem() throws RecognitionException {
		AggItem aggItem = null;


		Token x=null;

		  aggItem = new AggItem(); 
		try {
			// druidG.g:455:2: ( aggCallSite[aggItem] ( WS AS WS x= ID )? )
			// druidG.g:455:4: aggCallSite[aggItem] ( WS AS WS x= ID )?
			{
			pushFollow(FOLLOW_aggCallSite_in_aggItem3045);
			aggCallSite(aggItem);
			state._fsp--;

			// druidG.g:455:25: ( WS AS WS x= ID )?
			int alt191=2;
			int LA191_0 = input.LA(1);
			if ( (LA191_0==WS) ) {
				int LA191_1 = input.LA(2);
				if ( (LA191_1==AS) ) {
					alt191=1;
				}
			}
			switch (alt191) {
				case 1 :
					// druidG.g:455:26: WS AS WS x= ID
					{
					match(input,WS,FOLLOW_WS_in_aggItem3049); 
					match(input,AS,FOLLOW_AS_in_aggItem3051); 
					match(input,WS,FOLLOW_WS_in_aggItem3053); 
					x=(Token)match(input,ID,FOLLOW_ID_in_aggItem3057); 
					aggItem.setAsName((x!=null?x.getText():null));
					}
					break;

			}

			}

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
		}
		return aggItem;
	}
764898
private final void readPostScript(FontFileReader in) throws IOException {
        seekTab(in, "post", 0);
        postFormat = in.readTTFLong();
        italicAngle = in.readTTFULong();
        underlinePosition = in.readTTFShort();
        underlineThickness = in.readTTFShort();
        isFixedPitch = in.readTTFULong();

        //Skip memory usage values
        in.skip(4 * 4);

        log.debug("PostScript format: 0x" + Integer.toHexString(postFormat));
        switch (postFormat) {
        case 0x00010000:
            log.debug("PostScript format 1");
            for (int i = 0; i < Glyphs.MAC_GLYPH_NAMES.length; i++) {
                mtxTab[i].setName(Glyphs.MAC_GLYPH_NAMES[i]);
            }
            break;
        case 0x00020000:
            log.debug("PostScript format 2");
            int numGlyphStrings = 0;

            // Read Number of Glyphs
            int l = in.readTTFUShort();

            // Read indexes
            for (int i = 0; i < l; i++) {
                mtxTab[i].setIndex(in.readTTFUShort());

                if (mtxTab[i].getIndex() > 257) {
                    //Index is not in the Macintosh standard set
                    numGlyphStrings++;
                }

                if (log.isTraceEnabled()) {
                    log.trace("PostScript index: " + mtxTab[i].getIndexAsString());
                }
            }

            // firstChar=minIndex;
            String[] psGlyphsBuffer = new String[numGlyphStrings];
            if (log.isDebugEnabled()) {
                log.debug("Reading " + numGlyphStrings
                        + " glyphnames, that are not in the standard Macintosh"
                        + " set. Total number of glyphs=" + l);
            }
            for (int i = 0; i < psGlyphsBuffer.length; i++) {
                psGlyphsBuffer[i] = in.readTTFString(in.readTTFUByte());
            }

            //Set glyph names
            for (int i = 0; i < l; i++) {
                if (mtxTab[i].getIndex() < NMACGLYPHS) {
                    mtxTab[i].setName(Glyphs.MAC_GLYPH_NAMES[mtxTab[i].getIndex()]);
                } else {
                    if (!mtxTab[i].isIndexReserved()) {
                        int k = mtxTab[i].getIndex() - NMACGLYPHS;

                        if (log.isTraceEnabled()) {
                            log.trace(k + " i=" + i + " mtx=" + mtxTab.length
                                + " ps=" + psGlyphsBuffer.length);
                        }

                        mtxTab[i].setName(psGlyphsBuffer[k]);
                    }
                }
            }

            break;
        case 0x00030000:
            // PostScript format 3 contains no glyph names
            log.debug("PostScript format 3");
            break;
        default:
            log.error("Unknown PostScript format: " + postFormat);
        }
    }
660862
def POST_query(self, req_hook, req_args):
        '''  '''
        # HTTP POST queries require keyManagerTokens and sessionTokens
        headers = {'Content-Type': 'application/json',
                   'sessionToken': self.__session__,
                   'keyManagerToken': self.__keymngr__}

        # HTTP POST query to keymanager authenticate API
        try:
            if req_args is None:
                response = requests.post(self.__url__ + req_hook,
                                         headers=headers,
                                         verify=True)
            else:
                response = requests.post(self.__url__ + req_hook,
                                         headers=headers,
                                         data=req_args,
                                         verify=True)
        except requests.exceptions.RequestException as err:
            self.logger.error(err)
            return '500', 'Internal Error in RESTful.POST_query()'
        # return the token
        return response.status_code, response.text
293555
private boolean checkForH2MagicString(HttpInboundServiceContextImpl isc) {

        boolean hasMagicString = false;
        WsByteBuffer buffer;

        if (myTSC == null || myTSC.getReadInterface() == null ||
            (buffer = myTSC.getReadInterface().getBuffer()) == null) {
            return hasMagicString;
        }

        // read the buffer, flip it, and if there is a backing array pull that out
        buffer = buffer.duplicate();
        buffer.flip();
        byte[] bufferArray = null;
        if (buffer.hasArray()) {
            bufferArray = buffer.array();
        }

        // return true if the read buffer starts with the magic string
        if (bufferArray != null && bufferArray.length >= 24) {
            String bufferString = new String(bufferArray, 0, 24);
            if (bufferString.startsWith(HttpConstants.HTTP2PrefaceString)) {
                hasMagicString = true;
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "checkForH2MagicString: returning " + hasMagicString);
        }
        buffer.release();
        return hasMagicString;
    }