Input:
/**
 * Trim the elements of the given String array, calling String.trim() on each of them.
 * @param array the original String array
 * @return the resulting array (of the same size) with trimmed elements
 */

public static String[] trimArrayElements(String[] array){


Input:
/**
 *
Checks whether two arrays are the same length, treating null arrays as length 0.

 * @param array1 the first array, may be null
 * @param array2 the second array, may be null
 * @return true if length of arrays matches, treatingnull as an empty array
 */

public static boolean isSameLength(final byte[] array1,final byte[] array2){


Input:
/**
 * Pops an abstract type from the output frame stack and returns its value.
 * @return the abstract type that has been popped from the output frame stack.
 */

private int pop(){


Input:
/**
 *
Converts an array of object Booleans to primitives.

This method returns null for a null input array.

 * @param array  a Boolean array, may be null
 * @return a boolean array, null if null array input
 * @throws NullPointerException if array content is null
 */

public static boolean[] toPrimitive(final Boolean[] array){


Input:
/**
 * Returns true if the message should be printed in the given timestamp, otherwise returns false. If this method returns false, the message will not be printed. The timestamp is in seconds granularity.
 */

public boolean shouldPrintMessage(int timestamp,String message){


Input:
/**
 *
Gets the toString of an Object returning an empty string ("") if null input.

 ObjectUtils.toString(null)         = "" ObjectUtils.toString("")           = "" ObjectUtils.toString("bat")        = "bat" ObjectUtils.toString(Boolean.TRUE) = "true"

 * @see StringUtils#defaultString(String)
 * @see String#valueOf(Object)
 * @param obj  the Object to toString, may be null
 * @return the passed in Object's toString, or nullStr if null input
 * @since 2.0
 */

public static String toString(Object obj){


Input:
/**
 * Decodes octets to characters using the UTF-8 decoding and appends the characters to a StringBuffer.
 * @return the index to the next unchecked character in the string to decode
 */

private static int decodeOctets(int i,ByteBuffer bb,StringBuilder sb){


Input:
/**
 * Starts the visit of a new stack map frame, stored in  {@link #currentFrame}.
 * @param offset   the bytecode offset of the instruction to which the frame corresponds.
 * @param numLocal the number of local variables in the frame.
 * @param numStack the number of stack elements in the frame.
 * @return the index of the next element to be written in this frame.
 */

int visitFrameStart(final int offset,final int numLocal,final int numStack){


Input:
/**
 * Enlarges this byte vector so that it can receive 'size' more bytes.
 * @param size number of additional bytes that this byte vector should be able to receive.
 */

private void enlarge(final int size){


Input:
/**
 * Delete's the specified file if it exists
 */

protected static void deleteFile(String fileName){


Input:
/**
 * Return a hash code based on the contents of the specified array. If array is null, this method returns 0.
 * @param array the long array to obtain a hashcode
 * @return the long array's hashcode, which could be 0 if the array is null.
 */

public static int nullSafeHashCode(long[] array){


Input:
/**
 * Performs a right node rotation.
 * @param node a node to rotate
 * @return a new parent of the {@code node}
 */

private TreeNode<T> rotateRight(TreeNode<T> node){


Input:
/**
 * Add all the jar files in a dir to the classpath, represented as a Vector of URLs.
 */

@SuppressWarnings("unchecked") public static void addToClassPath(Vector<URL> cpV,String dir){


Input:
/**
 * Produces a formatted string as specified by the conversion pattern.
 */

public String format(LoggingEvent event){


Input:
/**
 * Retrieve the content length of the request.
 * @return The content length of the request.
 * @since 1.3
 */

public long contentLength(){


Input:
/**
 * Returns the index of the last directory separator character. <p> This method will handle a file in either Unix or Windows format. The position of the last forward or backslash is returned. <p> The output will be the same irrespective of the machine that the code is running on.
 * @param filename  the filename to find the last path separator in, null returns -1
 * @return the index of the last separator character, or -1 if thereis no such character
 */

public static int indexOfLastSeparator(String filename){


Input:
/**
 * Skips bytes until the end of the current line.
 * @param headerPart The headers, which are being parsed.
 * @param end Index of the last byte, which has yet been processed.
 * @return Index of the \r\n sequence, which indicates end of line.
 */

private int parseEndOfLine(String headerPart,int end){


Input:
/**
 * Finds the last index within a String, handling null. This method uses  {@link String#lastIndexOf(String)}.
 */

public static int lastIndexOf(String str,String searchStr){


Input:
/**
 * Writes b.length bytes from the specified byte array to this output stream.
 * @param b The array of bytes to be written.
 * @exception IOException if an error occurs.
 */

@Override public void write(byte b[]) throws IOException {


Input:
/**
 * @return the row id
 */

public String id(String entityId){


Input:
/**
 *
Converts a Boolean to a boolean handling null by returning false.

 BooleanUtils.toBoolean(Boolean.TRUE)  = true BooleanUtils.toBoolean(Boolean.FALSE) = false BooleanUtils.toBoolean(null)          = false

 * @param bool  the boolean to convert
 * @return true or false, null returns false
 */

public static boolean toBoolean(Boolean bool){


Input:
/**
 * Computes an identity automorphism (i.e. a self-mapping of a graph in which each vertex also maps to itself).
 * @param graph the input graph
 * @param < V > the graph vertex type
 * @param < E > the graph edge type
 * @return a mapping from graph to graph
 */

public static <V,E>IsomorphicGraphMapping<V,E> identity(Graph<V,E> graph){


Input:
/**
 * Schedules a file to be deleted when JVM exits. If file is directory delete it and all sub-directories.
 * @param file  file or directory to delete, must not be {@code null}
 * @throws NullPointerException if the file is {@code null}
 * @throws IOException in case deletion is unsuccessful
 */

public static void forceDeleteOnExit(File file) throws IOException {


Input:
/**
 * Add a log record message to be displayed in the LogTable. This method is thread-safe as it posts requests to the SwingThread rather than processing directly.
 */

public void addMessage(final LogRecord lr){


Input:
/**
 * Construct a complete bipartite graph
 */

@Override public void generateGraph(Graph<V,E> target,Map<String,V> resultMap){


Input:
/**
 * Searches for a byte of specified value in the buffer, starting at the specified position.
 * @param value The value to find.
 * @param pos   The starting position for searching.
 * @return The position of byte found, counting from beginning of thebuffer, or -1 if not found.
 */

protected int findByte(byte value,int pos){


Input:
/**
 * Serializes the  {@code message}, prefixed with its length, into an  {@link OutputStream}.
 * @return the size of the message
 */

public static <T>int writeDelimitedTo(OutputStream out,T message,Schema<T> schema,LinkedBuffer buffer) throws IOException {


Input:
/**
 * <p> Gets the String built by this builder. </p>
 * @return the built string
 */

public String toString(){


Input:
/**
 * This method does actual writing
 */

protected void subAppend(LoggingEvent event){


Input:
/**
 * Adds a type in the type table of this symbol table. Does nothing if the type table already contains a similar type.
 * @param value an internal class name.
 * @return the index of a new or already existing type Symbol with the given value.
 */

int addType(final String value){


Input:
/**
 * Resolves the arguments for the  {@code genericType} using the type variable information for the{@code targetType}. Returns  {@code null} if {@code genericType} is not parameterized or ifarguments cannot be resolved.
 */

public static Class<?>[] resolveArguments(Type genericType,Class<?> targetType){


Input:
/**
 * Accept the data into the cache and merge with the existing value. This method is not thread safe, should avoid concurrency calling.
 * @param data to be added potentially.
 */

@Override public void accept(final METRICS data){


Input:
/**
 * Inserts this bucket in the data structure before the  {@code bucket}.
 * @param bucket the bucket, that will be the next to this bucket.
 */

void insertBefore(Bucket bucket){


Input:
/**
 * @see InputStream#available()
 */

@Override public int available() throws IOException {


Input:
/**
 * Returns mappings with fields that not exist in the input mappings. The input mappings should be history mapping from current index. Do not return _source config to avoid current index update conflict.
 */

public Mappings diffStructure(String tableName,Mappings mappings){


Input:
/**
 * Add a new target channels.
 */

public void addNewTarget(Channels channels,IConsumer consumer){


Input:
/**
 * Creates the directory where the MRU file list will be written. The "lf5" directory is created in the Documents and Settings directory on Windows 2000 machines and where ever the user.home variable points on all other platforms.
 */

public static void createConfigurationDirectory(){


Input:
/**
 * Reads a signed long value in this  {@link ClassReader}. <i>This method is intended for  {@link Attribute} sub classes, and is normally not needed by class generators or adapters.</i>
 * @param offset the start offset of the value to be read in this {@link ClassReader}.
 * @return the read value.
 */

public long readLong(final int offset){


Input:
/**
 * Returns true if the contents of the internal array and the provided array match.
 */

public boolean equals(final byte[] data,int offset,final int len){


Input:
/**
 *
Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

 * @param array  the array to check for null or empty
 * @return the same array, public static empty array if null or empty input
 * @since 2.5
 */

public static Byte[] nullToEmpty(final Byte[] array){


Input:
/**
 * sends a message to each of the clients in telnet-friendly output.
 */

public synchronized void send(final String message){


Input:
/**
 *
Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

 * @param array  the array to check for null or empty
 * @return the same array, public static empty array if null or empty input
 * @since 2.5
 */

public static Boolean[] nullToEmpty(final Boolean[] array){


Input:
/**
 * Place a  {@link LoggingEvent} in the buffer. If the buffer is fullthen the event is <b>silently dropped</b>. It is the caller's responsability to make sure that the buffer has free space.
 */

public void put(LoggingEvent o){


Input:
/**
 * Split time ranges to insure the start time and end time is small then  {@link #FETCH_DATA_DURATION}
 */

protected List<TimeRange> buildTimeRanges(long start,long end){


Input:
/**
 *
Converts an array of object Bytes to primitives.

This method returns null for a null input array.

 * @param array  a Byte array, may be null
 * @return a byte array, null if null array input
 * @throws NullPointerException if array content is null
 */

public static byte[] toPrimitive(final Byte[] array){


Input:
/**
 * Follow the dayStep to re-format the time bucket literal long value. Such as, in dayStep == 11, 20000105 re-formatted time bucket is 20000101, 20000115 re-formatted time bucket is 20000112, 20000123 re-formatted time bucket is 20000123
 */

static long compressTimeBucket(long timeBucket,int dayStep){


Input:
/**
 * Computes the size of the utf8 string beginning at the specified  {@code index} with the specified {@code length}.
 */

public static int computeUTF8Size(final CharSequence str,final int index,final int len){


Input:
/**
 * Array to List. <p> Works like  {@link Arrays#asList(Object)}, but handles null arrays.
 * @return a list backed by the array.
 */

public static <T>List<T> asList(T[] a){


Input:
/**
 * Removes a value from the set. Returns true if the set contained the specified element.
 */

public boolean remove(int val){


Input:
/**
 * Returns  {@code true} if the given string starts with the specified case-insensitive prefix, {@code false} otherwise.
 * @param str the String to check
 * @param prefix the prefix to look for
 * @return {@code true} if the given string starts with the specified case-insensitive prefix, {@code false} otherwise.
 * @see java.lang.String#startsWith
 */

public static boolean startsWithIgnoreCase(String str,String prefix){


Input:
/**
 * Compute all vertices that have positive degree by iterating over the edges on purpose. This keeps the complexity to $O(m)$ where $m$ is the number of edges.
 * @return set of vertices with positive degree
 */

private Set<V> initVisibleVertices(){


Input:
/**
 *
Reverses a String as per  {@link StringBuilder#reverse()}.

A null String returns null.

 StringUtils.reverse(null)  = null StringUtils.reverse("")    = "" StringUtils.reverse("bat") = "tab"

 * @param str  the String to reverse, may be null
 * @return the reversed String, null if null String input
 */

public static String reverse(final String str){


Input:
/**
 * Gets a substring from the specified String avoiding exceptions.
 */

public static String sub(String str,int start,int end){


Input:
/**
 * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.
 * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} nullbytes into this byte vector.
 * @param byteOffset index of the first byte of byteArrayValue that must be copied.
 * @param byteLength number of bytes of byteArrayValue that must be copied.
 * @return this byte vector.
 */

public ByteVector putByteArray(final byte[] byteArrayValue,final int byteOffset,final int byteLength){


Input:
/**
 * Wrap an  {@link HttpServletRequest}.
 * @param request {@link HttpServletRequest}
 * @return an {@link AtmosphereRequest}
 */

public static AtmosphereRequest wrap(HttpServletRequest request){


Input:
/**
 * Writes the utf8-encoded bytes from the string into the  {@link LinkedBuffer}.
 */

public static LinkedBuffer writeUTF8(final CharSequence str,final WriteSession session,final LinkedBuffer lb){


Input:
/**
 * Removes this edge from both doubly linked lists of tree edges.
 */

public void removeFromTreeEdgeList(){


Input:
/**
 * Find the value corresponding to key in props. Then perform variable substitution on the found value.
 */

public static String findAndSubst(String key,Properties props){


Input:
/**
 *
Append to the toString the detail of an int array.

 * @param buffer  the StringBuffer to populate
 * @param fieldName  the field name, typically not used as already appended
 * @param array  the array to add to the toString,not null
 */

protected void appendDetail(StringBuffer buffer,String fieldName,int[] array){


Input:
/**
 * Session ID.
 */

public static String sessionId(){


Input:
/**
 *
Checks whether the String contains only digit characters.

Null and empty String will return false.

 * @param str  the String to check
 * @return true if str contains only unicode numeric
 */

public static boolean isDigits(String str){


Input:
/**
 * Determine whether a parameter name ends at the current position, that is, whether the given character qualifies as a separator.
 */

private static boolean isParameterSeparator(final char c){


Input:
/**
 *
Check if a String ends with a specified suffix (optionally case insensitive).

 * @see String#endsWith(String)
 * @param str  the String to check, may be null
 * @param suffix the suffix to find, may be null
 * @param ignoreCase inidicates whether the compare should ignore case(case insensitive) or not.
 * @return true if the String starts with the prefix orboth null
 */

private static boolean endsWith(final String str,final String suffix,final boolean ignoreCase){


Input:
/**
 * Decode the path component of a URI as path segments.
 * @param u the URI. If the path component is an absolute path componentthen the leading '/' is ignored and is not considered a delimiator of a path segment.
 * @param decode true if the path segments of the path componentshould be in decoded form.
 * @return the list of path segments.
 */

public static List<PathSegmentImpl> decodePath(URI u,boolean decode){


Input:
/**
 *
Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

 * @param array  the array to check for null or empty
 * @return the same array, public static empty array if null or empty input
 * @since 2.5
 */

public static Character[] nullToEmpty(final Character[] array){


Input:
/**
 * @return true if getThrown().toString() is a non-empty string.
 */

public boolean hasThrown(){


Input:
/**
 * Looks at the last diagnostic context at the top of this NDC without removing it. <p>The returned value is the value that was pushed last. If no context is available, then the empty string "" is returned.
 * @return String The innermost diagnostic context.
 */

public static String peek(){


Input:
/**
 * Accumulate the value with existing value in the same given key.
 */

public void valueAccumulation(String key,Long value){


Input:
/**
 * Return the next  {@link java.io.File} object or {@code null} if no more files areavailable.
 */

public InputStream next() throws IOException {


Input:
/**
 * Check if the named logger exists in the hierarchy. If so return its reference, otherwise returns null.
 * @param name The name of the logger to search for.
 */

public Logger exists(String name){


Input:
/**
 * Look up and return any registered  {@link Converter} for the specifieddestination class; if there is no registered Converter, return null.
 * @param clazz Class for which to return a registered Converter
 * @return The registered {@link Converter} or null if not found
 */

public Converter lookup(final Class<?> clazz){


Input:
/**
 * Read a raw Varint from the stream.
 */

public long readRawVarint64() throws IOException {


Input:
/**
 *
Defensive programming technique to change a null reference to an empty one.

This method returns an empty array for a null input array.

As a memory optimizing technique an empty array passed in will be overridden with the empty public static references in this class.

 * @param array  the array to check for null or empty
 * @return the same array, public static empty array if null or empty input
 * @since 2.5
 */

public static Double[] nullToEmpty(final Double[] array){


Input:
/**
 * Pops as many abstract types from the output frame stack as described by the given descriptor.
 * @param descriptor a type or method descriptor (in which case its argument types are popped).
 */

private void pop(final String descriptor){


Input:
/**
 * Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
 * @param b   the data.
 * @param off the start offset in the data.
 * @param len the number of bytes to write.
 */

@Override public void write(final byte b[],final int off,final int len) throws IOException {


Input:
/**
 * Swaps the two elements at the specified indices in the given array.
 * @param < V > the type of elements in the array
 * @param arr the array
 * @param i the index of the first element
 * @param j the index of the second element
 */

public static final <V>void swap(V[] arr,int i,int j){


Input:
/**
 * Check if the actual response is a Partial Content (HTTP 206 code)
 * @return is partial content or not
 */

public Boolean isPartialContentResponse(){


Input:
/**
 *
Checks if an array of primitive doubles is empty or null.

 * @param array  the array to test
 * @return true if the array is empty or null
 * @since 2.1
 */

public static boolean isEmpty(final double[] array){


Input:
/**
 * The last time, in milliseconds, a write operation occurred.
 * @return this
 */

public long lastWriteTimeStampInMilliseconds(){


Input:
/**
 * Add an edge to the index.
 * @param sourceVertex the source vertex
 * @param targetVertex the target vertex
 * @param e the edge
 */

protected void addToIndex(V sourceVertex,V targetVertex,E e){


Input:
/**
 * Returns the class path of the current JVM instance as an array of  {@link File} objects.
 */

private static File[] classPath(){


Input:
/**
 * This method creates a copy of the provided array, and ensures that all the strings in the newly created array contain only lower-case letters. <p> Using this method to copy string arrays means that changes to the src array do not modify the dst array.
 */

private static String[] copyStrings(final String[] src){


Input:
/**
 * Split a box along the x axis into two equal boxes.
 * @param box the box to split
 * @return a pair with the two resulting boxes
 */

public static Pair<Box2D,Box2D> splitAlongXAxis(Box2D box){


Input:
/**
 * Enlarges this byte vector so that it can receive 'size' more bytes.
 * @param size number of additional bytes that this byte vector should be able to receive.
 */

private void enlarge(final int size){


Input:
/**
 * Returns true if the specified appender is in the list of attached appenders, false otherwise.
 * @since 1.2
 */

public boolean isAttached(Appender appender){


Input:
/**
 * Compares two floating point values. Returns 0 if they are equal, -1 if  {@literal o1 < o2}, 1 otherwise
 * @param o1 the first value
 * @param o2 the second value
 * @return 0 if they are equal, -1 if {@literal o1 < o2}, 1 otherwise
 */

@Override public int compare(Double o1,Double o2){


Input:
/**
 * Inserts a value to the set. Returns true if the set did not already contain the specified element.
 */

public boolean insert(int val){


Input:
/**
 * Returns ture when the input fields have already been stored in the properties.
 */

private boolean containsAllFields(Fields fields){


Input:
/**
 * Reverse of Introspector.decapitalize
 */

public static String capitalize(String name){


Input:
/**
 * Writes the contents of the  {@link LinkedBuffer} into the {@link DataOutput}.
 * @return the total content size of the buffer.
 */

public static int writeTo(final DataOutput out,LinkedBuffer node) throws IOException {


Input:
/**
 *
Checks if a Boolean value is not true, handling null by returning true.

 BooleanUtils.isNotTrue(Boolean.TRUE)  = false BooleanUtils.isNotTrue(Boolean.FALSE) = true BooleanUtils.isNotTrue(null)          = true

 * @param bool  the boolean to check, null returns true
 * @return true if the input is null or false
 * @since 2.3
 */

public static boolean isNotTrue(Boolean bool){


Input:
/**
 * Returns a textual representation of the queue.
 * @return a textual representation of the queue.
 */

public String toString(){


Input:
/**
 * Create a string supplier which returns unique strings. The returns strings are simply integers starting from start.
 * @param start where to start the sequence
 * @return a string supplier
 */

@SuppressWarnings("unchecked") public static Supplier<String> createStringSupplier(int start){


Input:
/**
 * Formats a logging event to a writer.
 * @param event logging event to be formatted.
 */

public String format(final LoggingEvent event){


Input:
/**
 *
Converts an array of object Doubles to primitives.

This method returns null for a null input array.

 * @param array  a Double array, may be null
 * @return a double array, null if null array input
 * @throws NullPointerException if array content is null
 */

public static double[] toPrimitive(final Double[] array){


Input:
/**
 * Adds an abstract type to the list of types on which a constructor is invoked in the basic block.
 * @param abstractType an abstract type on a which a constructor is invoked.
 */

private void addInitializedType(final int abstractType){


Input:
/**
 * Puts some abstract types of  {@link #currentFrame} in {@link #stackMapTableEntries} , using theJVMS verification_type_info format used in StackMapTable attributes.
 * @param start index of the first type in {@link #currentFrame} to write.
 * @param end index of last type in {@link #currentFrame} to write (exclusive).
 */

private void putAbstractTypes(final int start,final int end){


Input:
/**
 * Clear and fill the buffer of this  {@code ClassFileBuffer} with thesupplied byte stream. The read pointer is reset to the start of the byte array.
 */

public void readFrom(final InputStream in) throws IOException {


Input:
/**
 * @see OutputStream#write(byte[])
 */

@Override public void write(final byte[] b) throws IOException {


Input:
/**
 * Serialize to JSON  {@link String}
 * @param features features to be enabled in serialization
 * @return JSON {@link String}
 */

@SuppressWarnings("unchecked") public String toString(JSONWriter.Feature... features){


Input:
/**
 *
Convert the input object into a java.lang.Character.

 * @param type Data type to which this value should be converted.
 * @param value The input value to be converted.
 * @return The converted value.
 * @throws Exception if conversion cannot be performed successfully
 * @since 1.8.0
 */

@Override protected Object convertToType(final Class<?> type,final Object value) throws Exception {


Input:
/**
 * Case in-sensitive Checks if the String contains any character in the given set of string.
 */

public static boolean containsAnyIgnoreCase(String str,List<String> searchStrArray){


Input:
/**
 * Returns a prime number which is >= desiredCapacity and very close to desiredCapacity (within 11% if desiredCapacity >= 1000).
 * @param desiredCapacity the capacity desired by the user.
 * @return the capacity which should be used for a hashtable.
 */

public static int nextPrime(int desiredCapacity){


Input:
/**
 *
Converts the Character to a char handling null.

 CharUtils.toChar(null, 'X') = 'X' CharUtils.toChar(' ', 'X')  = ' ' CharUtils.toChar('A', 'X')  = 'A'

 * @param ch  the character to convert
 * @param defaultValue  the value to use if the  Character is null
 * @return the char value of the Character or the default if null
 */

public static char toChar(final Character ch,final char defaultValue){


Input:
/**
 * Return the first element in 'candidates' that is contained in 'source'. If no element in 'candidates' is present in 'source' returns null. Iteration order is {@link Collection} implementation specific.
 * @param source the source Collection
 * @param candidates the candidates to search for
 * @return the first present object, or null if not found
 */

public static Object findFirstMatch(Collection source,Collection candidates){


Input:
/**
 * Trim trailing whitespace from the given String.
 * @param str the String to check
 * @return the trimmed String
 * @see java.lang.Character#isWhitespace
 */

public static String trimTrailingWhitespace(String str){


Input:
/**
 * initialize config, such as check dist path
 */

public void init(){


Input:
/**
 * Read a  {@code string} field value from the stream.
 */

@Override public String readString() throws IOException {


Input:
/**
 * Interpret a character as a digit (in any base up to 36) and return the numeric value. This is like {@code Character.digit()} but we don't accept non-ASCII digits.
 */

private static int digitValue(final char c){


Input:
/**
 * build content,if it has ats someone set the ats
 */

private Map<String,Object> buildContent(JsonObject jsonObject){


Input:
/**
 * Remove an  {@link AtmosphereHandler}.
 * @param mapping the mapping used when invoking {@link #addAtmosphereHandler(String,AtmosphereHandler)};
 * @return true if removed
 */

public AtmosphereFramework removeAtmosphereHandler(String mapping){


Input:
/**
 * Returns a single byte array containg all the contents written to the buffer(s).
 */

public final byte[] toByteArray(){


Input:
/**
 *
Unescapes any Java literals found in the String. For example, it will turn a sequence of '\' and 'n' into a newline character, unless the '\' is preceded by another '\'.

 * @param str the String to unescape, may be null
 * @return a new unescaped String, null if null string input
 */

public static String unescapeJava(String str) throws Exception {


Input:
/**
 * Translate a MIME standard character set name into the Java equivalent.
 * @param charset The MIME standard name.
 * @return The Java equivalent for this name.
 */

private static String javaCharset(String charset){


Input:
/**
 * Turn the given Object into a String with single quotes if it is a String; keeping the Object as-is else.
 * @param obj the input Object (e.g. "myString")
 * @return the quoted String (e.g. "'myString'"),or the input object as-is if not a String
 */

public static Object quoteIfString(Object obj){


Input:
/**
 * {@inheritDoc}
 */

@Override public ListNode<E> previousNode(){


Input:
/**
 * Reads a signed short value in this  {@link ClassReader}. <i>This method is intended for  {@link Attribute} sub classes, and is normally not needed by class generators or adapters.</i>
 * @param offset the start offset of the value to be read in this {@link ClassReader}.
 * @return the read value.
 */

public short readShort(final int offset){


Input:
/**
 * Returns a copy of the given array of size 1 greater than the argument. The last value of the array is left to the default value.
 * @param array The array to copy, must not be null.
 * @param newArrayComponentType If array is null, create asize 1 array of this type.
 * @return A new copy of the array of size 1 greater than the input.
 */

private static Object copyArrayGrow1(final Object array,final Class<?> newArrayComponentType){


Input:
/**
 * Computes floor($\log_2 (n)$) $+ 1$
 */

private int computeBinaryLog(int n){


Input:
/**
 * Efficient way to compute the intersection between two sets
 * @param set1 set $1$
 * @param set2 set $2$
 * @return intersection of set $1$ and $2$
 */

private Set<V> intersection(Set<V> set1,Set<V> set2){


Input:
/**
 * Converts the given Collection into an array of Strings. The returned array does not contain null entries. Note that  {@link Arrays#sort(Object[])} will throw an {@link NullPointerException} if an array element is null.
 * @param collection The collection to convert
 * @return A new array of Strings.
 */

static String[] toNoNullStringArray(Collection<?> collection){


Input:
/**
 *
Utility method for  {@link #createNumber(String)}.

Returns true if s is null.

 * @param s the String to check
 * @return if it is all zeros or null
 */

private static boolean isAllZeros(String s){


Input:
/**
 * Invoke the  {@link BroadcastFilter}
 * @param msg
 * @return
 */

protected Object filter(Object msg){


Input:
/**
 * Convert process properties to source data
 */

private JsonObject convertProperties(List<KeyStringValuePair> properties){


Input:
/**
 * Removes any inactive nodes from the Category tree.
 */

protected int removeUnusedNodes(){


Input:
/**
 * Returns the label corresponding to the given bytecode offset. The default implementation of this method creates a label for the given offset if it has not been already created.
 * @param bytecodeOffset a bytecode offset in a method.
 * @param labels the already created labels, indexed by their offset. If a label already existsfor bytecodeOffset this method must not create a new one. Otherwise it must store the new label in this array.
 * @return a non null Label, which must be equal to labels[bytecodeOffset].
 */

protected Label readLabel(final int bytecodeOffset,final Label[] labels){


Input:
/**
 * If value is "true", then true is returned. If value is "false", then true is returned. Otherwise, default is returned.
Case of value is unimportant.
 */

public static boolean toBoolean(String value,boolean dEfault){


Input:
/**
 * Trim leading whitespace from the given String.
 * @param str the String to check
 * @return the trimmed String
 * @see java.lang.Character#isWhitespace
 */

public static String trimLeadingWhitespace(String str){


Input:
/**
 * Reads a CONSTANT_Utf8 constant pool entry in  {@link #classFileBuffer}.
 * @param constantPoolEntryIndex the index of a CONSTANT_Utf8 entry in the class's constant pooltable.
 * @param charBuffer the buffer to be used to read the string. This buffer must be sufficientlylarge. It is not automatically resized.
 * @return the String corresponding to the specified CONSTANT_Utf8 entry.
 */

final String readUtf(final int constantPoolEntryIndex,final char[] charBuffer){


Input:
/**
 * Helper to decode half of a hexadecimal number from a string.
 * @param c The ASCII character of the hexadecimal number to decode.Must be in the range  {@code [0-9a-fA-F]}.
 * @return The hexadecimal value represented in the ASCII charactergiven, or  {@link Character#MAX_VALUE} if the character is invalid.
 */

private static char decodeHexNibble(final char c){


Input:
/**
 * Object to String ,when null object then null else return toString();
 */

public static String toString(Object object){


Input:
/**
 * Calculate the factorial of $n$.
 * @param n the input number
 * @return the factorial
 */

public static long factorial(int n){


Input:
/**
 * Either finds and returns a circulator to the node on the boundary of the component, which satisfies the  {@code predicate} or returns a circulator to the {@code stop} node.
 * @param predicate the condition the desired node should satisfy
 * @param start the node to start the search from
 * @param stop the node to end the search with
 * @param dir the direction to start the traversal in
 * @return a circulator to the node satisfying the {@code predicate} or to the {@code stop} node
 */

private OuterFaceCirculator selectOnOuterFace(Predicate<Node> predicate,Node start,Node stop,int dir){


Input:
/**
 * Add an event as the last event in the buffer.
 */

public void add(LoggingEvent event){


Input:
/**
 * Compares the two specified  {@code long} values. The sign of the value returned is the same as that of{@code ((Long) a).compareTo(b)}. <p> <b>Note for Java 7 and later:</b> this method should be treated as deprecated; use the equivalent {@link Long#compare} method instead.
 * @param a the first  {@code long} to compare
 * @param b the second  {@code long} to compare
 * @return a negative value if {@code a} is less than {@code b}; a positive value if  {@code a} is greater than{@code b}; or zero if they are equal
 */

private static int compareSigned(long a,long b){


Input:
/**
 * Copy the given Enumeration into a String array. The Enumeration must contain String elements only.
 * @param enumeration the Enumeration to copy
 * @return the String array (null if the passed-inEnumeration was null)
 */

public static String[] toStringArray(Enumeration<String> enumeration){


Input:
/**
 * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.
 * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} nullbytes into this byte vector.
 * @param byteOffset     index of the first byte of byteArrayValue that must be copied.
 * @param byteLength     number of bytes of byteArrayValue that must be copied.
 * @return this byte vector.
 */

public ByteVector putByteArray(final byte[] byteArrayValue,final int byteOffset,final int byteLength){


Input:
/**
 * Returns the values for the BeanMap.
 * @return values for the BeanMap. The returned collection is not modifiable.
 */

public Collection<Object> values(){


Input:
/**
 * Returns a hash code value for this type.
 * @return a hash code value for this type.
 */

@Override public int hashCode(){


Input:
/**
 * Delete any character in a given String.
 * @param inString the original String
 * @param charsToDelete a set of characters to delete.E.g. "az\n" will delete 'a's, 'z's and new lines.
 * @return the resulting String
 */

public static String deleteAny(String inString,String charsToDelete){


Input:
/**
 * Match a URI against the pattern.
 * @param uri the uri to match against the template.
 * @return the match result, otherwise null if no match occurs.
 */

public final MatchResult match(CharSequence uri){


Input:
/**
 * @param b An ASCII encoded character 0-9 a-f A-F
 * @return The byte value of the character 0-16.
 */

public static byte convertHexDigit(byte b){


Input:
/**
 * Add the specified files in reverse order.
 */

private void addReverse(final InputStream[] files){


Input:
/**
 * @param modelName model name of the entity
 * @throws IllegalStateException if sharding key indices are not continuous
 */

private void check(String modelName) throws IllegalStateException {


Input:
/**
 * Reads a byte from the buffer, and refills it as necessary.
 * @return The next byte from the input stream.
 * @throws IOException if there is no more data available.
 */

public byte readByte() throws IOException {


Input:
/**
 * Automatically suspend the  {@link AtmosphereResource} based on {@link AtmosphereResource.TRANSPORT} value.
 * @param r a {@link AtmosphereResource}
 * @return {@link Action#CONTINUE}
 */

@Override public Action inspect(AtmosphereResource r){


Input:
/**
 * Compute the sum of the weights entering a vertex
 * @param v the vertex
 * @return the sum of the weights entering a vertex
 */

public double vertexWeight(Set<V> v){


Input:
/**
 * @see Comparator
 */

public int compare(Object aObj1,Object aObj2){


Input:
/**
 * Remove the appender with the name passed as parameter form the list of appenders.
 */

public void removeAppender(String name){


Input:
/**
 * Call the doAppend method on all attached appenders.
 */

public int appendLoopOnAppenders(LoggingEvent event){


Input:
/**
 *
Converts an array of object Integers to primitives.

This method returns null for a null input array.

 * @param array  a Integer array, may be null
 * @return an int array, null if null array input
 * @throws NullPointerException if array content is null
 */

public static int[] toPrimitive(final Integer[] array){


Input:
/**
 * <p> Registers the given object. Used by the reflection methods to avoid infinite loops. </p>
 * @param value The object to register.
 */

static void register(Object value){


Input:
/**
 * Get the number of non-zero entries of a row.
 * @param row the row
 * @return the number of non-zero entries of a row
 */

public int nonZeros(int row){


Input:
/**
 * Check whether the given Collection contains the given element instance.
Enforces the given instance to be present, rather than returning true for an equal element as well.
 * @param collection the Collection to check
 * @param element the element to look for
 * @return true if found, false else
 */

public static boolean containsInstance(Collection collection,Object element){


Input:
/**
 *
Checks whether the character is ASCII 7 bit control.

 CharUtils.isAsciiControl('a')  = false CharUtils.isAsciiControl('A')  = false CharUtils.isAsciiControl('3')  = false CharUtils.isAsciiControl('-')  = false CharUtils.isAsciiControl('\n') = true CharUtils.isAsciiControl('©') = false

 * @param ch  the character to check
 * @return true if less than 32 or equals 127
 */

public static boolean isAsciiControl(final char ch){


Input:
/**
 * Return true if this map contains a mapping for the specified key.
 * @param key  the key to be searched for
 * @return true if the map contains the key
 */

@Override public boolean containsKey(final Object key){


Input:
/**
 *
Converts an array of primitive booleans to objects.

This method returns null for a null input array.

 * @param array  a boolean array
 * @return a Boolean array, null if null array input
 */

public static Boolean[] toObject(final boolean[] array){


Input:
/**
 * Copies bytes to a  {@code byte[]}.
 */

public byte[] toByteArray(){


Input:
/**
 * Transform from a Set representation to a graph path.
 * @param tour a set containing the edges of the tour
 * @param graph the graph
 * @return a graph path
 */

protected GraphPath<V,E> edgeSetToTour(Set<E> tour,Graph<V,E> graph){


Input:
/**
 *
Converts an array of primitive shorts to objects.

This method returns null for a null input array.

 * @param array  a short array
 * @return a Short array, null if null array input
 */

public static Short[] toObject(final short[] array){


Input:
/**
 * Adds a CONSTANT_NameAndType_info to the constant pool of this symbol table. Does nothing if the constant pool already contains a similar item.
 * @param name a field or method name.
 * @param descriptor a field or method descriptor.
 * @return a new or already existing Symbol with the given value.
 */

int addConstantNameAndType(final String name,final String descriptor){


Input:
/**
 * Unescape a string DOT identifier.
 * @param input the input
 * @return the unescaped output
 */

private String unescapeId(String input){


Input:
/**
 * Concatenate the given String arrays into one, with overlapping array elements included twice.
The order of elements in the original arrays is preserved.
 * @param array1 the first array (can be null)
 * @param array2 the second array (can be null)
 * @return the new array (null if both given arrays were null)
 */

public static String[] concatenateStringArrays(String[] array1,String[] array2){


Input:
/**
 * Moves all vertices from the bucket with label  {@code minLabel} to the bucket with label 0.Clears the bucket with label  {@code minLabel}. Updates the labeling accordingly.
 * @param bucketsByLabel the buckets vertices are stored in
 * @param labels the labels of the vertices
 * @param minLabel the minimum value of the non-empty bucket
 */

private void reload(List<Set<Integer>> bucketsByLabel,List<Integer> labels,int minLabel){


Input:
/**
 * Append the given String to the given String array, returning a new array consisting of the input array contents plus the given String.
 * @param array the array to append to (can be null)
 * @param str the String to append
 * @return the new array (never null)
 */

public static String[] addStringToArray(String[] array,String str){


Input:
/**
 * Returns the number of occurrences the substring  {@code sub} appears in string {@code str}.
 * @param str string to search in. Return 0 if this is null.
 * @param sub string to search for. Return 0 if this is null.
 * @return the number of occurrences the substring {@code sub} appears in string {@code str}.
 */

public static int countOccurrencesOf(String str,String sub){


Input:
/**
 * <p> Checks in the specified list if there is at least one instance of the given {@link AtmosphereInterceptor interceptor} implementation class.</p>
 * @param interceptorList the interceptors
 * @param c               the interceptor class
 * @return {@code false} if an instance of the class already exists in the list, {@code true} otherwise
 */

private boolean checkDuplicate(final List<AtmosphereInterceptor> interceptorList,Class<? extends AtmosphereInterceptor> c){


Input:
/**
 *
Append to the toString the detail of a byte array.

 * @param buffer  the StringBuffer to populate
 * @param fieldName  the field name, typically not used as already appended
 * @param array  the array to add to the toString,not null
 */

protected void appendDetail(StringBuffer buffer,String fieldName,byte[] array){


Input:
/**
 * Checks whether there exist unvisited vertices.
 * @return true if there exist unvisited vertices.
 */

@Override public boolean hasNext(){


Input:
/**
 * Pops the given number of abstract types from the output frame stack.
 * @param elements the number of abstract types that must be popped.
 */

private void pop(final int elements){


Input:
/**
 * @return true if the bucket is same.
 */

public boolean isCompatible(DataTable dataset){


Input:
/**
 * Find class given class name.
 * @param className class name, may not be null.
 * @return class, will not be null.
 * @throws ClassNotFoundException thrown if class can not be found.
 */

private Class findClass(final String className) throws ClassNotFoundException {


Input:
/**
 * {@inheritDoc}
 */

@Override protected V provideNextVertex(){


Input:
/**
 * Adds a source line number corresponding to this label.
 * @param lineNumber a source line number (which should be strictly positive).
 */

final void addLineNumber(final int lineNumber){


Input:
/**
 * Removes this bucket from the data structure.
 */

void removeSelf(){


Input:
/**
 * Keep the same name replacement as  {@link ColumnName#overrideName(String,String)}
 * @param oldName to be replaced.
 * @param newName to use in the storage level.
 */

public void overrideName(String oldName,String newName){


Input:
/**
 * Remove the non null  {@code node} from the list.
 */

private boolean unlink(ListNodeImpl<E> node){


Input:
/**
 * build current profiles segment snapshot search sequence ranges
 */

public List<SequenceRange> buildSequenceRanges(){


Input:
/**
 * True is the body is a byte array
 * @return True is the body is a byte array
 */

public boolean hasBytes(){


Input:
/**
 * Strip the filename extension from the given path, e.g. "mypath/myfile.txt" -> "mypath/myfile".
 * @param path the file path (may be null)
 * @return the path with stripped filename extension,or null if none
 */

public static String stripFilenameExtension(String path){


Input:
/**
 *
Converts an array of object Characters to primitives.

This method returns null for a null input array.

 * @param array  a Character array, may be null
 * @return a char array, null if null array input
 * @throws NullPointerException if array content is null
 */

public static char[] toPrimitive(final Character[] array){


Input:
/**
 * Parses out a token until any of the given terminators is encountered.
 * @param terminators the array of terminating characters. Any of these characters when encountered signify the end of the token
 * @return the token
 */

private String parseToken(final char[] terminators){


Input:
/**
 * Trim all occurrences of the supplied leading character from the given String.
 * @param str the String to check
 * @param leadingCharacter the leading character to be trimmed
 * @return the trimmed String
 */

public static String trimLeadingCharacter(String str,char leadingCharacter){


Input:
/**
 *
Converts an array of primitive ints to objects.

This method returns null for a null input array.

 * @param array  an int array
 * @return an Integer array, null if null array input
 */

public static Integer[] toObject(final int[] array){


Input:
/**
 *
Converts an array of primitive doubles to objects.

This method returns null for a null input array.

 * @param array  a double array
 * @return a Double array, null if null array input
 */

public static Double[] toObject(final double[] array){


Input:
/**
 * Computes a suffix sum of the  {@code bounds}. Returns computed suffix sum and the sum of all elements in the  {@code bounds list}.
 * @param bounds list of integers.
 * @return computed pair of suffix sum list and a sum of all elements.
 */

private Pair<List<Integer>,Long> computeSuffixSum(List<Integer> bounds){


Input:
/**
 * Reverses the order of the elements in the specified range within the given array.
 * @param < V > the type of elements in the array
 * @param arr the array
 * @param from the index of the first element (inclusive) inside the range to reverse
 * @param to the index of the last element (inclusive) inside the range to reverse
 */

public static final <V>void reverse(V[] arr,int from,int to){


Input:
/**
 * Atomically moves all  {@link ListNode ListNodes} from {@code list} to this list as if eachnode was removed with  {@link #removeListNode(ListNodeImpl)} from {@code list} andsubsequently added to this list by  {@link #addListNode(ListNodeImpl)}.
 */

private void moveAllListNodes(DoublyLinkedList<E> list){


Input:
/**
 *
Check if a String starts with a specified prefix (optionally case insensitive).

 * @see String#startsWith(String)
 * @param str  the String to check, may be null
 * @param prefix the prefix to find, may be null
 * @param ignoreCase inidicates whether the compare should ignore case(case insensitive) or not.
 * @return true if the String starts with the prefix orboth null
 */

private static boolean startsWith(final String str,final String prefix,final boolean ignoreCase){


Input:
/**
 *
Converts the character to a Character.

For ASCII 7 bit characters, this uses a cache that will return the same Character object each time.

 CharUtils.toCharacterObject(' ')  = ' ' CharUtils.toCharacterObject('A')  = 'A'

 * @param ch  the character to convert
 * @return a Character of the specified character
 */

public static Character toCharacterObject(final char ch){


Input:
/**
 *
Checks whether the character is ASCII 7 bit alphabetic upper case.

 CharUtils.isAsciiAlphaUpper('a')  = false CharUtils.isAsciiAlphaUpper('A')  = true CharUtils.isAsciiAlphaUpper('3')  = false CharUtils.isAsciiAlphaUpper('-')  = false CharUtils.isAsciiAlphaUpper('\n') = false CharUtils.isAsciiAlphaUpper('©') = false

 * @param ch  the character to check
 * @return true if between 65 and 90 inclusive
 */

public static boolean isAsciiAlphaUpper(final char ch){


Input:
/**
 * Returns  {@link Filter#NEUTRAL} is there is no string match.
 */

public int decide(LoggingEvent event){


Input:
/**
 * Ascertain if a template variable is a member of this template.
 * @param name name The template variable.
 * @return true if the template variable is a member of the template, otherwisefalse.
 */

public final boolean isTemplateVariablePresent(String name){


Input:
/**
 * Puts all of the writable properties from the given BeanMap into this BeanMap. Read-only and Write-only properties will be ignored.
 * @param map  the BeanMap whose properties to put
 */

public void putAllWriteable(BeanMap map){


Input:
/**
 * Gets a String's length or 0 if the String is null.
 * @param str a String or null
 * @return String length or 0 if the String is null.
 * @since 2.4
 */

public static int length(final String str){


Input:
/**
 * Is this a hex digit?
 */

private static boolean isHex(final char c){


Input:
/**
 * Decoding a string to a string follow the Base64 regular.
 */

public static String base64Decode(final String s){


Input:
/**
 *
Checks whether two arrays are the same length, treating null arrays as length 0.

 * @param array1 the first array, may be null
 * @param array2 the second array, may be null
 * @return true if length of arrays matches, treatingnull as an empty array
 */

public static boolean isSameLength(final double[] array1,final double[] array2){


Input:
/**
 * Retrieve an instance of  {@link Meteor} based on the {@link HttpServletRequest}.
 * @param r {@link HttpServletRequest}
 * @return a {@link Meteor} or null if not found
 */

public static Meteor lookup(HttpServletRequest r){


Input:
/**
 * Split a String at the first occurrence of the delimiter. Does not include the delimiter in the result.
 * @param toSplit the string to split
 * @param delimiter to split the string up with
 * @return a two element array with index 0 being before the delimiter, andindex 1 being after the delimiter (neither element includes the delimiter); or null if the delimiter wasn't found in the given input String
 */

public static String[] split(String toSplit,String delimiter){


Input:
/**
 * Computes the global separator list of the  {@code graph}. More precisely, for every edge $e$ in the $G = (V, E)$ computes list of minimal separators $S_e$ in the neighborhood of $e$ and then concatenates these lists. Note: the result may contain duplicates
 * @return the list of minimal separators of every edge $e$ in the inspected graph
 */

private List<Pair<List<Pair<Integer,Integer>>,E>> computeGlobalSeparatorList(){


Input:
/**
 *
Clones an array returning a typecast result and handling null.

This method returns null for a null input array.

 * @param array  the array to clone, may be null
 * @return the cloned array, null if null input
 */

public static char[] clone(final char[] array){


Input:
/**
 * Add the specified files in reverse order.
 */

private void addReverse(final File[] files){


Input:
/**
 * Selects a the specified row in the specified JTable and scrolls the specified JScrollpane to the newly selected row. More importantly, the call to repaint() delayed long enough to have the table properly paint the newly selected row which may be offscre
 * @param table should belong to the specified JScrollPane
 */

public static void selectRow(int row,JTable table,JScrollPane pane){


Input:
/**
 * Puts an int into this byte vector. The byte vector is automatically enlarged if necessary.
 * @param intValue an int.
 * @return this byte vector.
 */

public ByteVector putInt(final int intValue){


Input:
/**
 * Compares count first bytes in the arrays a and b.
 * @param a     The first array to compare.
 * @param b     The second array to compare.
 * @param count How many bytes should be compared.
 * @return true if count first bytes in arraysa and b are equal.
 */

public static boolean arrayequals(byte[] a,byte[] b,int count){


Input:
/**
 * Abbreviate name.
 * @param buf buffer to append abbreviation.
 * @param nameStart start of name to abbreviate.
 */

public void abbreviate(final int nameStart,final StringBuffer buf){


Input:
/**
 * Resolves the first bound for the  {@code typeVariable}, returning  {@code Unknown.class} if nonecan be resolved.
 */

public static Type resolveBound(TypeVariable<?> typeVariable){


Input:
/**
 * Check whether the subgraph of graph induced by the given vertices is complete, i.e. a clique.
 * @param graph the graph.
 * @param vertices the vertices to induce the subgraph from.
 * @return true if the induced subgraph is a clique.
 */

private static <V,E>boolean isClique(Graph<V,E> graph,Set<V> vertices){


Input:
/**
 * Finds a maximum lower bound for every key.
 * @param keys list of keys.
 * @return the computed key lower bounds.
 */

private List<Integer> computeLowerBounds(List<K> keys){


Input:
/**
 * Pops as many abstract types from the output frame stack as described by the given descriptor.
 * @param descriptor a type or method descriptor (in which case its argument types are popped).
 */

private void pop(final String descriptor){


Input:
/**
 *
Checks whether the character is ASCII 7 bit.

 CharUtils.isAscii('a')  = true CharUtils.isAscii('A')  = true CharUtils.isAscii('3')  = true CharUtils.isAscii('-')  = true CharUtils.isAscii('\n') = true CharUtils.isAscii('©') = false

 * @param ch  the character to check
 * @return true if less than 128
 */

public static boolean isAscii(final char ch){


Input:
/**
 * Finds a minimum lower bound for every key.
 * @param keys a list of keys.
 * @return the computed key upper bound.
 */

private List<Integer> computeUpperBounds(List<K> keys){


Input:
/**
 * Encodes a string with template parameters names present, specifically the characters '{' and '}' will be percent-encoded.
 * @param s the string with zero or more template parameters names
 * @return the string with encoded template parameters names.
 */

public static String encodeTemplateNames(String s){


Input:
/**
 * Compare two points for equality using tolerance 1e-9.
 * @param p1 the first point
 * @param p2 the second point
 * @return whether the two points are equal or not
 */

public static boolean equals(Point2D p1,Point2D p2){


Input:
/**
 * Add a  {@link AtmosphereResourceEventListener}.
 * @param e an instance of AtmosphereResourceEventListener
 */

@Override public AtmosphereResource addEventListener(AtmosphereResourceEventListener e){


Input:
/**
 * Apply the given relative path to the given path, assuming standard Java folder separation (i.e. "/" separators).
 * @param path the path to start from (usually a full file path)
 * @param relativePath the relative path to apply(relative to the full file path above)
 * @return the full file path that results from applying the relative path
 */

public static String applyRelativePath(String path,String relativePath){


Input:
/**
 * Finds the first index within a String, handling null. This method uses  {@link String#indexOf(String)}.
 */

public static int indexOf(String str,String searchStr){


Input:
/**
 * Returns a new array of Strings without null elements. Internal method used to normalize exclude lists (arrays and collections). Note that  {@link Arrays#sort(Object[])} will throw an {@link NullPointerException}if an array element is null.
 * @param array The array to check
 * @return The given array or a new array without null.
 */

static String[] toNoNullStringArray(Object[] array){


Input:
/**
 * Returns the index of the last extension separator character, which is a dot. <p> This method also checks that there is no directory separator after the last dot. To do this it uses  {@link #indexOfLastSeparator(String)} which willhandle a file in either Unix or Windows format. <p> The output will be the same irrespective of the machine that the code is running on.
 * @param filename  the filename to find the last path separator in, null returns -1
 * @return the index of the last separator character, or -1 if thereis no such character
 */

public static int indexOfExtension(String filename){


Input:
/**
 * @param timestamp        of current time
 * @param expiredThreshold represents the duration between last update time and the time point removing from cache.
 * @return true means this metrics should be removed from cache.
 */

public boolean isExpired(long timestamp,long expiredThreshold){


Input:
/**
 * Returns an edge connecting previously returned node with node, which will be returned next. If either of the mentioned nodes is virtual, the edge will be incident to its real counterpart.
 * @return an edge from the current node to the next node
 */

Edge edgeToNext(){


Input:
/**
 * Returns  {@code true} if the given string matches the given substring at the given index, {@code false} otherwise.
 * @param str the original string (or StringBuilder)
 * @param index the index in the original string to start matching against
 * @param substring the substring to match at the given index
 * @return {@code true} if the given string matches the given substring at the given index, {@code false} otherwise.
 */

public static boolean substringMatch(CharSequence str,int index,CharSequence substring){


Input:
/**
 * Handles a log event.  For this appender, that means writing the message to each connected client.
 */

protected void append(LoggingEvent event){


Input:
/**
 *
Converts the character to a String that contains the one character.

For ASCII 7 bit characters, this uses a cache that will return the same String object each time.

 CharUtils.toString(' ')  = " " CharUtils.toString('A')  = "A"

 * @param ch  the character to convert
 * @return a String containing the one specified character
 */

public static String toString(final char ch){


Input:
/**
 * Check if this field have been packed into a length-delimited field. If so, update internal state to reflect that packed fields are being read.
 * @throws IOException
 */

private void checkIfPackedField() throws IOException {


Input:
/**
 * Attempt to read a field tag, returning zero if we have reached EOF. Protocol message parsers use this to read tags, since a protocol message may legally end wherever a tag occurs, and zero is not a valid tag number.
 */

public int readTag() throws IOException {


Input:
/**
 * Puts two bytes into this byte vector. The byte vector is automatically enlarged if necessary.
 * @param byteValue1 a byte.
 * @param byteValue2 another byte.
 * @return this byte vector.
 */

final ByteVector put11(final int byteValue1,final int byteValue2){


Input:
/**
 * Build the 'Content-Range' HTTP Header value.
 * @return 'Content-Range' value
 */

private String buildContentRange(){


Input:
/**
 * load thread snapshots in appointing time range
 */

public static List<ThreadSnapshot> parseFromFileWithTimeRange(File file,List<ProfileAnalyzeTimeRange> timeRanges) throws IOException {