Display the javax.xa.XAResource end flag constant corresponding to the
value supplied.

@param level a valid javax.xa.XAResource end flag constant.

@return the name of the constant, or a string indicating the constant is unknown.
191325
public static String getXAResourceEndFlagString(int flag) {
        switch (flag) {
            case XAResource.TMFAIL:
                return "TMFAIL (" + flag + ')'; 

            case XAResource.TMSUCCESS:
                return "TMSUCCESS (" + flag + ')'; 

            case XAResource.TMSUSPEND:
                return "TMSUSPEND (" + flag + ')'; 
        }

        return "UNKNOWN XA RESOURCE END FLAG (" + flag + ')'; 
    }
267751
private static Node getConstantDeclValue(Node name) {
    Node parent = name.getParent();
    if (parent == null) {
      return null;
    }
    if (name.isName()) {
      if (parent.isConst()) {
        return name.getFirstChild();
      } else if (!parent.isVar()) {
        return null;
      }
      JSDocInfo jsdoc = NodeUtil.getBestJSDocInfo(name);
      return jsdoc != null && jsdoc.isConstant() ? name.getFirstChild() : null;
    } else if (name.isGetProp() && parent.isAssign()) {
      JSDocInfo jsdoc = NodeUtil.getBestJSDocInfo(name);
      return jsdoc != null && jsdoc.isConstant() ? name.getNext() : null;
    }
    return null;
  }
1091509
protected function getLevelName($level)
    {
        return in_array($level, self::$levels) ? array_search($level, self::$levels) : '--';
    }
1243055
protected void unmark(final int level) {
        assert level <= this.seen.size();
        while (level < this.seen.size()) {
            final int lit = this.seen.back();
            this.seen.pop();
            final CLVar v = var(lit);
            assert v.mark() == sign(lit);
            v.setMark(0);
        }
    }
967713
static org.apache.log4j.Level toLog4jLevel(java.util.logging.Level level) {
    if (level.intValue() >= java.util.logging.Level.SEVERE.intValue()) {
      return org.apache.log4j.Level.ERROR;
    } else if (level.intValue() >= java.util.logging.Level.WARNING.intValue()) {
      return org.apache.log4j.Level.WARN;
    } else if (level.intValue() >= java.util.logging.Level.INFO.intValue()) {
      return org.apache.log4j.Level.INFO;
    } else if (level.intValue() >= java.util.logging.Level.FINE.intValue()) {
      return org.apache.log4j.Level.DEBUG;
    }
    return org.apache.log4j.Level.TRACE;
  }
416207
public Element getElementAtLevel(int level) {
        checkArgument(level >= 0);
        if (level > element.level) return null;
        if (level < element.level) return parent.getElementAtLevel(level);
        return element;
    }
1180987
public static String logLevelToString(final int level) {
        String logLevel;
        switch (level) {
            case Project.MSG_DEBUG:
                logLevel = "DEBUG";
                break;
            case Project.MSG_VERBOSE:
                logLevel = "VERBOSE";
                break;
            case Project.MSG_INFO:
                logLevel = "INFO";
                break;
            case Project.MSG_WARN:
                logLevel = "WARN";
                break;
            case Project.MSG_ERR:
                logLevel = "ERROR";
                break;
            default:
                logLevel = "UNKNOWN";
                break;
        }
        return logLevel;

    }
474519
public static String getLevelPrefix(final Level level) {
        // Get the pre link string
        switch (level.getLevelType()) {
            case APPENDIX:
                return "appe-";
            case SECTION:
                return "sect-";
            case PROCESS:
                return "proc-";
            case CHAPTER:
                return "chap-";
            case PART:
                return "part-";
            case PREFACE:
                return "pref-";
            default:
                return "";
        }
    }
513893
private static Level translateLevel(final int level) {
		if (level <= TRACE_INT) {
			return Level.TRACE;
		} else if (level <= DEBUG_INT) {
			return Level.DEBUG;
		} else if (level <= INFO_INT) {
			return Level.INFO;
		} else if (level <= WARN_INT) {
			return Level.WARN;
		} else {
			return Level.ERROR;
		}
	}
778765
public String getNameAt(int level) {
    return this.levelwiseNames[level] instanceof Integer ? this.levelwiseNames[level].toString() : (String) this.levelwiseNames[level];
  }
453547
public static function findFlagStabilityName($level)
    {
        $stability = 'dev';

        /** @var string $stabilityName */
        /** @var int $stabilityLevel */
        foreach (Package::$stabilities as $stabilityName => $stabilityLevel) {
            if ($stabilityLevel === $level) {
                $stability = $stabilityName;

                break;
            }
        }

        return $stability;
    }
280301
public String getResource(final int level) {
        if (level < resource.length) {
            return resource[level];
        }
        // offset is out of bounds...
        throw new IndexOutOfBoundsException("Index: " + level + ", Size: " + resource.length);
    }
1212890
function (level, x, y) {
            var url = null;
            if (level >= this.minLevel && level <= this.maxLevel) {
                url = this.levels[level].url;
            }
            return url;
        }
939785
private int endCheckLabel()
    {
        int rv = END_UNREACHED;

        rv = next.endCheck();
        rv |= getIntProp(CONTROL_BLOCK_PROP, END_UNREACHED);

        return rv;
    }
1036859
protected function _getLevelFromConstant( $level )
	{
		switch( $level )
		{
			case MW_Tree_Manager_Abstract::LEVEL_ONE:
				return 0;
			case MW_Tree_Manager_Abstract::LEVEL_LIST:
				return 1;
			case MW_Tree_Manager_Abstract::LEVEL_TREE:
				return 0x7FFFFFFF; // max. possible level
			default:
				throw new MW_Tree_Exception( sprintf( 'Invalid level constant "%1$d"', $level ) );
		}
	}
166245
private String formatLevel(Event.Level level) {
        if (level == null) {
            return null;
        }

        switch (level) {
            case DEBUG:
                return "debug";
            case FATAL:
                return "fatal";
            case WARNING:
                return "warning";
            case INFO:
                return "info";
            case ERROR:
                return "error";
            default:
                logger.error("The level '{}' isn't supported, this should NEVER happen, contact Sentry developers",
                    level.name());
                return null;
        }
    }
1198783
public final hqlParser.constant_return constant() throws RecognitionException {
		hqlParser.constant_return retval = new hqlParser.constant_return();
		retval.start = input.LT(1);

		CommonTree root_0 = null;

		Token set301=null;

		CommonTree set301_tree=null;

		try {
			// hql.g:691:2: ( NUM_INT | NUM_FLOAT | NUM_LONG | NUM_DOUBLE | NUM_DECIMAL | QUOTED_String | NULL | TRUE | FALSE | EMPTY )
			// hql.g:
			{
			root_0 = (CommonTree)adaptor.nil();


			set301=input.LT(1);
			if ( input.LA(1)==EMPTY||input.LA(1)==FALSE||(input.LA(1) >= NULL && input.LA(1) <= NUM_LONG)||input.LA(1)==QUOTED_String||input.LA(1)==TRUE ) {
				input.consume();
				adaptor.addChild(root_0, adaptor.create(set301));
				state.errorRecovery=false;
			}
			else {
				MismatchedSetException mse = new MismatchedSetException(null,input);
				throw mse;
			}
			}

			retval.stop = input.LT(-1);

			retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);
			adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
			retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);
		}
		finally {
			// do for sure before leaving
		}
		return retval;
	}