{"question_id": "6367676d1a6d9265ec018229", "input": "/** \n * Trim the elements of the given String array, calling String.trim() on each of them.\n * @param array the original String array\n * @return the resulting array (of the same size) with trimmed elements\n */\n\npublic static String[] trimArrayElements(String[] array){", "signature": "public static String[] trimArrayElements(String[] array){", "docstring": "/** \n * Trim the elements of the given String array, calling String.trim() on each of them.\n * @param array the original String array\n * @return the resulting array (of the same size) with trimmed elements\n */\n"}
{"question_id": "6367670b1a6d9265ec017a00", "input": "/** \n *
Checks whether two arrays are the same length, treating null arrays as length 0.
null\n * @param array2 the second array, may be null\n * @return true if length of arrays matches, treatingnull as an empty array\n */\n\npublic static boolean isSameLength(final byte[] array1,final byte[] array2){", "signature": "public static boolean isSameLength(final byte[] array1,final byte[] array2){", "docstring": "/** \n * Checks whether two arrays are the same length, treating null arrays as length 0.
null\n * @param array2 the second array, may be null\n * @return true if length of arrays matches, treatingnull as an empty array\n */\n"}
{"question_id": "636766a91a6d9265ec0175c2", "input": "/** \n * Pops an abstract type from the output frame stack and returns its value.\n * @return the abstract type that has been popped from the output frame stack.\n */\n\nprivate int pop(){", "signature": "private int pop(){", "docstring": "/** \n * Pops an abstract type from the output frame stack and returns its value.\n * @return the abstract type that has been popped from the output frame stack.\n */\n"}
{"question_id": "636767081a6d9265ec017989", "input": "/** \n * Converts an array of object Booleans to primitives.
This method returns null for a null input array.
Boolean array, may be null\n * @return a boolean array, null if null array input\n * @throws NullPointerException if array content is null\n */\n\npublic static boolean[] toPrimitive(final Boolean[] array){", "signature": "public static boolean[] toPrimitive(final Boolean[] array){", "docstring": "/** \n * Converts an array of object Booleans to primitives.
This method returns null for a null input array.
Boolean array, may be null\n * @return a boolean array, null if null array input\n * @throws NullPointerException if array content is null\n */\n"}
{"question_id": "6367672d1a6d9265ec017c73", "input": "/** \n * 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. \n */\n\npublic boolean shouldPrintMessage(int timestamp,String message){", "signature": "public boolean shouldPrintMessage(int timestamp,String message){", "docstring": "/** \n * 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. \n */\n"}
{"question_id": "636766f81a6d9265ec01775c", "input": "/** \n * 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\"\n * @see StringUtils#defaultString(String)\n * @see String#valueOf(Object)\n * @param obj the Object to
toString, may be null\n * @return the passed in Object's toString, or nullStr if null input\n * @since 2.0\n */\n\npublic static String toString(Object obj){", "signature": "public static String toString(Object obj){", "docstring": "/** \n * 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\"\n * @see StringUtils#defaultString(String)\n * @see String#valueOf(Object)\n * @param obj the Object to
toString, may be null\n * @return the passed in Object's toString, or nullStr if null input\n * @since 2.0\n */\n"}
{"question_id": "6367667f1a6d9265ec017457", "input": "/** \n * Decodes octets to characters using the UTF-8 decoding and appends the characters to a StringBuffer.\n * @return the index to the next unchecked character in the string to decode\n */\n\nprivate static int decodeOctets(int i,ByteBuffer bb,StringBuilder sb){", "signature": "private static int decodeOctets(int i,ByteBuffer bb,StringBuilder sb){", "docstring": "/** \n * Decodes octets to characters using the UTF-8 decoding and appends the characters to a StringBuffer.\n * @return the index to the next unchecked character in the string to decode\n */\n"}
{"question_id": "636766aa1a6d9265ec0175ce", "input": "/** \n * Starts the visit of a new stack map frame, stored in {@link #currentFrame}.\n * @param offset the bytecode offset of the instruction to which the frame corresponds.\n * @param numLocal the number of local variables in the frame.\n * @param numStack the number of stack elements in the frame.\n * @return the index of the next element to be written in this frame.\n */\n\nint visitFrameStart(final int offset,final int numLocal,final int numStack){", "signature": "int visitFrameStart(final int offset,final int numLocal,final int numStack){", "docstring": "/** \n * Starts the visit of a new stack map frame, stored in {@link #currentFrame}.\n * @param offset the bytecode offset of the instruction to which the frame corresponds.\n * @param numLocal the number of local variables in the frame.\n * @param numStack the number of stack elements in the frame.\n * @return the index of the next element to be written in this frame.\n */\n"}
{"question_id": "636767191a6d9265ec017c0f", "input": "/** \n * Enlarges this byte vector so that it can receive 'size' more bytes.\n * @param size number of additional bytes that this byte vector should be able to receive.\n */\n\nprivate void enlarge(final int size){", "signature": "private void enlarge(final int size){", "docstring": "/** \n * Enlarges this byte vector so that it can receive 'size' more bytes.\n * @param size number of additional bytes that this byte vector should be able to receive.\n */\n"}
{"question_id": "636767821a6d9265ec0183a0", "input": "/** \n * Delete's the specified file if it exists \n */\n\nprotected static void deleteFile(String fileName){", "signature": "protected static void deleteFile(String fileName){", "docstring": "/** \n * Delete's the specified file if it exists \n */\n"}
{"question_id": "636767691a6d9265ec0181aa", "input": "/** \n * Return a hash code based on the contents of the specified array. If array is null, this method returns 0.\n * @param array the long array to obtain a hashcode\n * @return the long array's hashcode, which could be 0 if the array is null.\n */\n\npublic static int nullSafeHashCode(long[] array){", "signature": "public static int nullSafeHashCode(long[] array){", "docstring": "/** \n * Return a hash code based on the contents of the specified array. If array is null, this method returns 0.\n * @param array the long array to obtain a hashcode\n * @return the long array's hashcode, which could be 0 if the array is null.\n */\n"}
{"question_id": "636767441a6d9265ec017cc1", "input": "/** \n * Performs a right node rotation.\n * @param node a node to rotate\n * @return a new parent of the {@code node}\n */\n\nprivate TreeNodeThis method will handle a file in either Unix or Windows format. The position of the last forward or backslash is returned.
The output will be the same irrespective of the machine that the code is running on.\n * @param filename the filename to find the last path separator in, null returns -1\n * @return the index of the last separator character, or -1 if thereis no such character\n */\n\npublic static int indexOfLastSeparator(String filename){", "signature": "public static int indexOfLastSeparator(String filename){", "docstring": "/** \n * Returns the index of the last directory separator character.
This method will handle a file in either Unix or Windows format. The position of the last forward or backslash is returned.
The output will be the same irrespective of the machine that the code is running on.\n * @param filename the filename to find the last path separator in, null returns -1\n * @return the index of the last separator character, or -1 if thereis no such character\n */\n"}
{"question_id": "636767121a6d9265ec017b0a", "input": "/** \n * Skips bytes until the end of the current line.\n * @param headerPart The headers, which are being parsed.\n * @param end Index of the last byte, which has yet been processed.\n * @return Index of the \\r\\n sequence, which indicates end of line.\n */\n\nprivate int parseEndOfLine(String headerPart,int end){", "signature": "private int parseEndOfLine(String headerPart,int end){", "docstring": "/** \n * Skips bytes until the end of the current line.\n * @param headerPart The headers, which are being parsed.\n * @param end Index of the last byte, which has yet been processed.\n * @return Index of the \\r\\n sequence, which indicates end of line.\n */\n"}
{"question_id": "636766f61a6d9265ec017701", "input": "/** \n * Finds the last index within a String, handling null. This method uses {@link String#lastIndexOf(String)}. \n */\n\npublic static int lastIndexOf(String str,String searchStr){", "signature": "public static int lastIndexOf(String str,String searchStr){", "docstring": "/** \n * Finds the last index within a String, handling null. This method uses {@link String#lastIndexOf(String)}. \n */\n"}
{"question_id": "6367670b1a6d9265ec0179fe", "input": "/** \n * Writes b.length bytes from the specified byte array to this output stream.\n * @param b The array of bytes to be written.\n * @exception IOException if an error occurs.\n */\n\n@Override public void write(byte b[]) throws IOException {", "signature": "@Override public void write(byte b[]) throws IOException {", "docstring": "/** \n * Writes b.length bytes from the specified byte array to this output stream.\n * @param b The array of bytes to be written.\n * @exception IOException if an error occurs.\n */\n"}
{"question_id": "636767df1a6d9265ec01873c", "input": "/** \n * @return the row id\n */\n\npublic String id(String entityId){", "signature": "public String id(String entityId){", "docstring": "/** \n * @return the row id\n */\n"}
{"question_id": "636766f91a6d9265ec01777f", "input": "/** \n *
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\n * @param bool the boolean to convert\n * @return
true or false, null returns false\n */\n\npublic static boolean toBoolean(Boolean bool){", "signature": "public static boolean toBoolean(Boolean bool){", "docstring": "/** \n * 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\n * @param bool the boolean to convert\n * @return
true or false, null returns false\n */\n"}
{"question_id": "6367675f1a6d9265ec0180d3", "input": "/** \n * Computes an identity automorphism (i.e. a self-mapping of a graph in which each vertex also maps to itself).\n * @param graph the input graph\n * @param < V > the graph vertex type\n * @param < E > the graph edge type\n * @return a mapping from graph to graph\n */\n\npublic static buffer, starting at the specified position.\n * @param value The value to find.\n * @param pos The starting position for searching.\n * @return The position of byte found, counting from beginning of thebuffer, or -1 if not found.\n */\n\nprotected int findByte(byte value,int pos){", "signature": "protected int findByte(byte value,int pos){", "docstring": "/** \n * Searches for a byte of specified value in the buffer, starting at the specified position.\n * @param value The value to find.\n * @param pos The starting position for searching.\n * @return The position of byte found, counting from beginning of thebuffer, or -1 if not found.\n */\n"}
{"question_id": "636767a41a6d9265ec018582", "input": "/** \n * Serializes the {@code message}, prefixed with its length, into an {@link OutputStream}.\n * @return the size of the message\n */\n\npublic static Gets the String built by this builder.
\n * @return the built string\n */\n\npublic String toString(){", "signature": "public String toString(){", "docstring": "/** \n *Gets the String built by this builder.
\n * @return the built string\n */\n"} {"question_id": "636767781a6d9265ec01823d", "input": "/** \n * This method does actual writing\n */\n\nprotected void subAppend(LoggingEvent event){", "signature": "protected void subAppend(LoggingEvent event){", "docstring": "/** \n * This method does actual writing\n */\n"} {"question_id": "636766ef1a6d9265ec01761a", "input": "/** \n * Adds a type in the type table of this symbol table. Does nothing if the type table already contains a similar type.\n * @param value an internal class name.\n * @return the index of a new or already existing type Symbol with the given value.\n */\n\nint addType(final String value){", "signature": "int addType(final String value){", "docstring": "/** \n * Adds a type in the type table of this symbol table. Does nothing if the type table already contains a similar type.\n * @param value an internal class name.\n * @return the index of a new or already existing type Symbol with the given value.\n */\n"} {"question_id": "636766821a6d9265ec0174b6", "input": "/** \n * 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.\n */\n\npublic static Class>[] resolveArguments(Type genericType,Class> targetType){", "signature": "public static Class>[] resolveArguments(Type genericType,Class> targetType){", "docstring": "/** \n * 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.\n */\n"} {"question_id": "636767e11a6d9265ec018781", "input": "/** \n * Accept the data into the cache and merge with the existing value. This method is not thread safe, should avoid concurrency calling.\n * @param data to be added potentially.\n */\n\n@Override public void accept(final METRICS data){", "signature": "@Override public void accept(final METRICS data){", "docstring": "/** \n * Accept the data into the cache and merge with the existing value. This method is not thread safe, should avoid concurrency calling.\n * @param data to be added potentially.\n */\n"} {"question_id": "636767531a6d9265ec017efb", "input": "/** \n * Inserts this bucket in the data structure before the {@code bucket}.\n * @param bucket the bucket, that will be the next to this bucket.\n */\n\nvoid insertBefore(Bucket bucket){", "signature": "void insertBefore(Bucket bucket){", "docstring": "/** \n * Inserts this bucket in the data structure before the {@code bucket}.\n * @param bucket the bucket, that will be the next to this bucket.\n */\n"} {"question_id": "636766f11a6d9265ec017641", "input": "/** \n * @see InputStream#available() \n */\n\n@Override public int available() throws IOException {", "signature": "@Override public int available() throws IOException {", "docstring": "/** \n * @see InputStream#available() \n */\n"} {"question_id": "636767de1a6d9265ec018706", "input": "/** \n * 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.\n */\n\npublic Mappings diffStructure(String tableName,Mappings mappings){", "signature": "public Mappings diffStructure(String tableName,Mappings mappings){", "docstring": "/** \n * 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.\n */\n"} {"question_id": "636767dd1a6d9265ec0186e5", "input": "/** \n * Add a new target channels.\n */\n\npublic void addNewTarget(Channels channels,IConsumer consumer){", "signature": "public void addNewTarget(Channels channels,IConsumer consumer){", "docstring": "/** \n * Add a new target channels.\n */\n"} {"question_id": "636767871a6d9265ec01846d", "input": "/** \n * 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.\n */\n\npublic static void createConfigurationDirectory(){", "signature": "public static void createConfigurationDirectory(){", "docstring": "/** \n * 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.\n */\n"} {"question_id": "636766f81a6d9265ec01775b", "input": "/** \n * Reads a signed long value in this {@link ClassReader}. This method is intended for {@link Attribute} sub classes, and is normally not needed by class generators or adapters.\n * @param offset the start offset of the value to be read in this {@link ClassReader}.\n * @return the read value.\n */\n\npublic long readLong(final int offset){", "signature": "public long readLong(final int offset){", "docstring": "/** \n * Reads a signed long value in this {@link ClassReader}. This method is intended for {@link Attribute} sub classes, and is normally not needed by class generators or adapters.\n * @param offset the start offset of the value to be read in this {@link ClassReader}.\n * @return the read value.\n */\n"} {"question_id": "636767a51a6d9265ec01859d", "input": "/** \n * Returns true if the contents of the internal array and the provided array match.\n */\n\npublic boolean equals(final byte[] data,int offset,final int len){", "signature": "public boolean equals(final byte[] data,int offset,final int len){", "docstring": "/** \n * Returns true if the contents of the internal array and the provided array match.\n */\n"} {"question_id": "6367670b1a6d9265ec0179ff", "input": "/** \n *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.
null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n\npublic static Byte[] nullToEmpty(final Byte[] array){", "signature": "public static Byte[] nullToEmpty(final Byte[] array){", "docstring": "/** \n * 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.
null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n"}
{"question_id": "6367677f1a6d9265ec018347", "input": "/** \n * sends a message to each of the clients in telnet-friendly output. \n */\n\npublic synchronized void send(final String message){", "signature": "public synchronized void send(final String message){", "docstring": "/** \n * sends a message to each of the clients in telnet-friendly output. \n */\n"}
{"question_id": "6367670a1a6d9265ec0179e8", "input": "/** \n * 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.
null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n\npublic static Boolean[] nullToEmpty(final Boolean[] array){", "signature": "public static Boolean[] nullToEmpty(final Boolean[] array){", "docstring": "/** \n * 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.
null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n"}
{"question_id": "6367677f1a6d9265ec01834b", "input": "/** \n * Place a {@link LoggingEvent} in the buffer. If the buffer is fullthen the event is silently dropped. It is the caller's responsability to make sure that the buffer has free space. \n */\n\npublic void put(LoggingEvent o){", "signature": "public void put(LoggingEvent o){", "docstring": "/** \n * Place a {@link LoggingEvent} in the buffer. If the buffer is fullthen the event is silently dropped. It is the caller's responsability to make sure that the buffer has free space. \n */\n"}
{"question_id": "636767df1a6d9265ec018744", "input": "/** \n * Split time ranges to insure the start time and end time is small then {@link #FETCH_DATA_DURATION}\n */\n\nprotected ListConverts an array of object Bytes to primitives.
This method returns null for a null input array.
Byte array, may be null\n * @return a byte array, null if null array input\n * @throws NullPointerException if array content is null\n */\n\npublic static byte[] toPrimitive(final Byte[] array){", "signature": "public static byte[] toPrimitive(final Byte[] array){", "docstring": "/** \n * Converts an array of object Bytes to primitives.
This method returns null for a null input array.
Byte array, may be null\n * @return a byte array, null if null array input\n * @throws NullPointerException if array content is null\n */\n"}
{"question_id": "636767dc1a6d9265ec0186be", "input": "/** \n * 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\n */\n\nstatic long compressTimeBucket(long timeBucket,int dayStep){", "signature": "static long compressTimeBucket(long timeBucket,int dayStep){", "docstring": "/** \n * 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\n */\n"}
{"question_id": "636767a41a6d9265ec01856c", "input": "/** \n * Computes the size of the utf8 string beginning at the specified {@code index} with the specified {@code length}.\n */\n\npublic static int computeUTF8Size(final CharSequence str,final int index,final int len){", "signature": "public static int computeUTF8Size(final CharSequence str,final int index,final int len){", "docstring": "/** \n * Computes the size of the utf8 string beginning at the specified {@code index} with the specified {@code length}.\n */\n"}
{"question_id": "636766f01a6d9265ec017639", "input": "/** \n * Array to List. Works like {@link Arrays#asList(Object)}, but handles null arrays.\n * @return a list backed by the array.\n */\n\npublic static Works like {@link Arrays#asList(Object)}, but handles null arrays.\n * @return a list backed by the array.\n */\n"}
{"question_id": "6367672d1a6d9265ec017c74", "input": "/** \n * Removes a value from the set. Returns true if the set contained the specified element. \n */\n\npublic boolean remove(int val){", "signature": "public boolean remove(int val){", "docstring": "/** \n * Removes a value from the set. Returns true if the set contained the specified element. \n */\n"}
{"question_id": "6367676b1a6d9265ec0181df", "input": "/** \n * Returns {@code true} if the given string starts with the specified case-insensitive prefix, {@code false} otherwise.\n * @param str the String to check\n * @param prefix the prefix to look for\n * @return {@code true} if the given string starts with the specified case-insensitive prefix, {@code false} otherwise.\n * @see java.lang.String#startsWith\n */\n\npublic static boolean startsWithIgnoreCase(String str,String prefix){", "signature": "public static boolean startsWithIgnoreCase(String str,String prefix){", "docstring": "/** \n * Returns {@code true} if the given string starts with the specified case-insensitive prefix, {@code false} otherwise.\n * @param str the String to check\n * @param prefix the prefix to look for\n * @return {@code true} if the given string starts with the specified case-insensitive prefix, {@code false} otherwise.\n * @see java.lang.String#startsWith\n */\n"}
{"question_id": "6367674b1a6d9265ec017dc0", "input": "/** \n * 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.\n * @return set of vertices with positive degree\n */\n\nprivate Set Reverses a String as per {@link StringBuilder#reverse()}. A Reverses a String as per {@link StringBuilder#reverse()}. A Append to the Append to the Checks whether the Checks whether the Check if a String ends with a specified suffix (optionally case insensitive). Check if a String ends with a specified suffix (optionally case insensitive). Defensive programming technique to change a This method returns an empty array for a As a memory optimizing technique an empty array passed in will be overridden with the empty Defensive programming technique to change a This method returns an empty array for a As a memory optimizing technique an empty array passed in will be overridden with the empty The returned value is the value that was pushed last. If no context is available, then the empty string \"\" is returned.\n * @return String The innermost diagnostic context.\n */\n\npublic static String peek(){", "signature": "public static String peek(){", "docstring": "/** \n * Looks at the last diagnostic context at the top of this NDC without removing it. The returned value is the value that was pushed last. If no context is available, then the empty string \"\" is returned.\n * @return String The innermost diagnostic context.\n */\n"}
{"question_id": "636767de1a6d9265ec01871c", "input": "/** \n * Accumulate the value with existing value in the same given key.\n */\n\npublic void valueAccumulation(String key,Long value){", "signature": "public void valueAccumulation(String key,Long value){", "docstring": "/** \n * Accumulate the value with existing value in the same given key.\n */\n"}
{"question_id": "636766811a6d9265ec017496", "input": "/** \n * Return the next {@link java.io.File} object or {@code null} if no more files areavailable.\n */\n\npublic InputStream next() throws IOException {", "signature": "public InputStream next() throws IOException {", "docstring": "/** \n * Return the next {@link java.io.File} object or {@code null} if no more files areavailable.\n */\n"}
{"question_id": "6367677e1a6d9265ec01832e", "input": "/** \n * Check if the named logger exists in the hierarchy. If so return its reference, otherwise returns Defensive programming technique to change a This method returns an empty array for a As a memory optimizing technique an empty array passed in will be overridden with the empty Defensive programming technique to change a This method returns an empty array for a As a memory optimizing technique an empty array passed in will be overridden with the empty Checks if an array of primitive doubles is empty or Checks if an array of primitive doubles is empty or Using this method to copy string arrays means that changes to the src array do not modify the dst array.\n */\n\nprivate static String[] copyStrings(final String[] src){", "signature": "private static String[] copyStrings(final String[] src){", "docstring": "/** \n * 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. Using this method to copy string arrays means that changes to the src array do not modify the dst array.\n */\n"}
{"question_id": "636767521a6d9265ec017ecc", "input": "/** \n * Split a box along the x axis into two equal boxes.\n * @param box the box to split\n * @return a pair with the two resulting boxes\n */\n\npublic static Pair Checks if a Checks if a Converts an array of object Doubles to primitives. This method returns Converts an array of object Doubles to primitives. This method returns Convert the input object into a java.lang.Character. Convert the input object into a java.lang.Character. Converts the Character to a char handling Converts the Character to a char handling Unescapes any Java literals found in the Unescapes any Java literals found in the Utility method for {@link #createNumber(String)}. Returns Utility method for {@link #createNumber(String)}. Returns Case of value is unimportant. \n */\n\npublic static boolean toBoolean(String value,boolean dEfault){", "signature": "public static boolean toBoolean(String value,boolean dEfault){", "docstring": "/** \n * If Case of value is unimportant. \n */\n"}
{"question_id": "6367676a1a6d9265ec0181cd", "input": "/** \n * Trim leading whitespace from the given String.\n * @param str the String to check\n * @return the trimmed String\n * @see java.lang.Character#isWhitespace\n */\n\npublic static String trimLeadingWhitespace(String str){", "signature": "public static String trimLeadingWhitespace(String str){", "docstring": "/** \n * Trim leading whitespace from the given String.\n * @param str the String to check\n * @return the trimmed String\n * @see java.lang.Character#isWhitespace\n */\n"}
{"question_id": "636766fe1a6d9265ec01782a", "input": "/** \n * Reads a CONSTANT_Utf8 constant pool entry in {@link #classFileBuffer}.\n * @param constantPoolEntryIndex the index of a CONSTANT_Utf8 entry in the class's constant pooltable.\n * @param charBuffer the buffer to be used to read the string. This buffer must be sufficientlylarge. It is not automatically resized.\n * @return the String corresponding to the specified CONSTANT_Utf8 entry.\n */\n\nfinal String readUtf(final int constantPoolEntryIndex,final char[] charBuffer){", "signature": "final String readUtf(final int constantPoolEntryIndex,final char[] charBuffer){", "docstring": "/** \n * Reads a CONSTANT_Utf8 constant pool entry in {@link #classFileBuffer}.\n * @param constantPoolEntryIndex the index of a CONSTANT_Utf8 entry in the class's constant pooltable.\n * @param charBuffer the buffer to be used to read the string. This buffer must be sufficientlylarge. It is not automatically resized.\n * @return the String corresponding to the specified CONSTANT_Utf8 entry.\n */\n"}
{"question_id": "636766851a6d9265ec01751b", "input": "/** \n * Helper to decode half of a hexadecimal number from a string.\n * @param c The ASCII character of the hexadecimal number to decode.Must be in the range {@code [0-9a-fA-F]}.\n * @return The hexadecimal value represented in the ASCII charactergiven, or {@link Character#MAX_VALUE} if the character is invalid.\n */\n\nprivate static char decodeHexNibble(final char c){", "signature": "private static char decodeHexNibble(final char c){", "docstring": "/** \n * Helper to decode half of a hexadecimal number from a string.\n * @param c The ASCII character of the hexadecimal number to decode.Must be in the range {@code [0-9a-fA-F]}.\n * @return The hexadecimal value represented in the ASCII charactergiven, or {@link Character#MAX_VALUE} if the character is invalid.\n */\n"}
{"question_id": "636766f21a6d9265ec01767d", "input": "/** \n * Object to String ,when null object then null else return toString(); \n */\n\npublic static String toString(Object object){", "signature": "public static String toString(Object object){", "docstring": "/** \n * Object to String ,when null object then null else return toString(); \n */\n"}
{"question_id": "636767581a6d9265ec017fc4", "input": "/** \n * Calculate the factorial of $n$.\n * @param n the input number\n * @return the factorial\n */\n\npublic static long factorial(int n){", "signature": "public static long factorial(int n){", "docstring": "/** \n * Calculate the factorial of $n$.\n * @param n the input number\n * @return the factorial\n */\n"}
{"question_id": "636767511a6d9265ec017eb6", "input": "/** \n * 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.\n * @param predicate the condition the desired node should satisfy\n * @param start the node to start the search from\n * @param stop the node to end the search with\n * @param dir the direction to start the traversal in\n * @return a circulator to the node satisfying the {@code predicate} or to the {@code stop} node\n */\n\nprivate OuterFaceCirculator selectOnOuterFace(Predicate Note for Java 7 and later: this method should be treated as deprecated; use the equivalent {@link Long#compare} method instead.\n * @param a the first {@code long} to compare\n * @param b the second {@code long} to compare\n * @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\n */\n\nprivate static int compareSigned(long a,long b){", "signature": "private static int compareSigned(long a,long b){", "docstring": "/** \n * Compares the two specified {@code long} values. The sign of the value returned is the same as that of{@code ((Long) a).compareTo(b)}. Note for Java 7 and later: this method should be treated as deprecated; use the equivalent {@link Long#compare} method instead.\n * @param a the first {@code long} to compare\n * @param b the second {@code long} to compare\n * @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\n */\n"}
{"question_id": "636767691a6d9265ec0181ae", "input": "/** \n * Copy the given Enumeration into a String array. The Enumeration must contain String elements only.\n * @param enumeration the Enumeration to copy\n * @return the String array (null String returns null. StringUtils.reverse(null) = null StringUtils.reverse(\"\") = \"\" StringUtils.reverse(\"bat\") = \"tab\"
\n * @param str the String to reverse, may be null\n * @return the reversed String, null if null String input\n */\n\npublic static String reverse(final String str){", "signature": "public static String reverse(final String str){", "docstring": "/** \n * null String returns null. StringUtils.reverse(null) = null StringUtils.reverse(\"\") = \"\" StringUtils.reverse(\"bat\") = \"tab\"
\n * @param str the String to reverse, may be null\n * @return the reversed String, null if null String input\n */\n"}
{"question_id": "636766ff1a6d9265ec01783b", "input": "/** \n * Gets a substring from the specified String avoiding exceptions. \n */\n\npublic static String sub(String str,int start,int end){", "signature": "public static String sub(String str,int start,int end){", "docstring": "/** \n * Gets a substring from the specified String avoiding exceptions. \n */\n"}
{"question_id": "6367671a1a6d9265ec017c15", "input": "/** \n * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.\n * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} nullbytes into this byte vector.\n * @param byteOffset index of the first byte of byteArrayValue that must be copied.\n * @param byteLength number of bytes of byteArrayValue that must be copied.\n * @return this byte vector.\n */\n\npublic ByteVector putByteArray(final byte[] byteArrayValue,final int byteOffset,final int byteLength){", "signature": "public ByteVector putByteArray(final byte[] byteArrayValue,final int byteOffset,final int byteLength){", "docstring": "/** \n * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.\n * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} nullbytes into this byte vector.\n * @param byteOffset index of the first byte of byteArrayValue that must be copied.\n * @param byteLength number of bytes of byteArrayValue that must be copied.\n * @return this byte vector.\n */\n"}
{"question_id": "636766821a6d9265ec0174d2", "input": "/** \n * Wrap an {@link HttpServletRequest}.\n * @param request {@link HttpServletRequest}\n * @return an {@link AtmosphereRequest}\n */\n\npublic static AtmosphereRequest wrap(HttpServletRequest request){", "signature": "public static AtmosphereRequest wrap(HttpServletRequest request){", "docstring": "/** \n * Wrap an {@link HttpServletRequest}.\n * @param request {@link HttpServletRequest}\n * @return an {@link AtmosphereRequest}\n */\n"}
{"question_id": "636767ab1a6d9265ec01867b", "input": "/** \n * Writes the utf8-encoded bytes from the string into the {@link LinkedBuffer}.\n */\n\npublic static LinkedBuffer writeUTF8(final CharSequence str,final WriteSession session,final LinkedBuffer lb){", "signature": "public static LinkedBuffer writeUTF8(final CharSequence str,final WriteSession session,final LinkedBuffer lb){", "docstring": "/** \n * Writes the utf8-encoded bytes from the string into the {@link LinkedBuffer}.\n */\n"}
{"question_id": "6367675c1a6d9265ec01805b", "input": "/** \n * Removes this edge from both doubly linked lists of tree edges.\n */\n\npublic void removeFromTreeEdgeList(){", "signature": "public void removeFromTreeEdgeList(){", "docstring": "/** \n * Removes this edge from both doubly linked lists of tree edges.\n */\n"}
{"question_id": "636767791a6d9265ec01826d", "input": "/** \n * Find the value corresponding to key in props. Then perform variable substitution on the found value.\n */\n\npublic static String findAndSubst(String key,Properties props){", "signature": "public static String findAndSubst(String key,Properties props){", "docstring": "/** \n * Find the value corresponding to key in props. Then perform variable substitution on the found value.\n */\n"}
{"question_id": "636767001a6d9265ec01787f", "input": "/** \n * toString the detail of an int array.StringBuffer to populate\n * @param fieldName the field name, typically not used as already appended\n * @param array the array to add to the toString,not null\n */\n\nprotected void appendDetail(StringBuffer buffer,String fieldName,int[] array){", "signature": "protected void appendDetail(StringBuffer buffer,String fieldName,int[] array){", "docstring": "/** \n * toString the detail of an int array.StringBuffer to populate\n * @param fieldName the field name, typically not used as already appended\n * @param array the array to add to the toString,not null\n */\n"}
{"question_id": "636766fe1a6d9265ec017834", "input": "/** \n * Session ID. \n */\n\npublic static String sessionId(){", "signature": "public static String sessionId(){", "docstring": "/** \n * Session ID. \n */\n"}
{"question_id": "636766ff1a6d9265ec01784b", "input": "/** \n * String contains only digit characters.Null and empty String will return false.String to check\n * @return true if str contains only unicode numeric\n */\n\npublic static boolean isDigits(String str){", "signature": "public static boolean isDigits(String str){", "docstring": "/** \n * String contains only digit characters.Null and empty String will return false.String to check\n * @return true if str contains only unicode numeric\n */\n"}
{"question_id": "636766fc1a6d9265ec0177da", "input": "/** \n * Determine whether a parameter name ends at the current position, that is, whether the given character qualifies as a separator. \n */\n\nprivate static boolean isParameterSeparator(final char c){", "signature": "private static boolean isParameterSeparator(final char c){", "docstring": "/** \n * Determine whether a parameter name ends at the current position, that is, whether the given character qualifies as a separator. \n */\n"}
{"question_id": "6367670c1a6d9265ec017a35", "input": "/** \n * true if the String starts with the prefix orboth null\n */\n\nprivate static boolean endsWith(final String str,final String suffix,final boolean ignoreCase){", "signature": "private static boolean endsWith(final String str,final String suffix,final boolean ignoreCase){", "docstring": "/** \n * true if the String starts with the prefix orboth null\n */\n"}
{"question_id": "6367667f1a6d9265ec01745d", "input": "/** \n * Decode the path component of a URI as path segments.\n * @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.\n * @param decode true if the path segments of the path componentshould be in decoded form.\n * @return the list of path segments.\n */\n\npublic static Listnull reference to an empty one.null input array.public static references in this class.null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n\npublic static Character[] nullToEmpty(final Character[] array){", "signature": "public static Character[] nullToEmpty(final Character[] array){", "docstring": "/** \n * null reference to an empty one.null input array.public static references in this class.null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n"}
{"question_id": "636767821a6d9265ec0183ab", "input": "/** \n * @return true if getThrown().toString() is a non-empty string.\n */\n\npublic boolean hasThrown(){", "signature": "public boolean hasThrown(){", "docstring": "/** \n * @return true if getThrown().toString() is a non-empty string.\n */\n"}
{"question_id": "636767831a6d9265ec0183c9", "input": "/** \n * Looks at the last diagnostic context at the top of this NDC without removing it. null.\n * @param name The name of the logger to search for.\n */\n\npublic Logger exists(String name){", "signature": "public Logger exists(String name){", "docstring": "/** \n * Check if the named logger exists in the hierarchy. If so return its reference, otherwise returns null.\n * @param name The name of the logger to search for.\n */\n"}
{"question_id": "6367670a1a6d9265ec0179e7", "input": "/** \n * Look up and return any registered {@link Converter} for the specifieddestination class; if there is no registered Converter, return null.\n * @param clazz Class for which to return a registered Converter\n * @return The registered {@link Converter} or null if not found\n */\n\npublic Converter lookup(final Class> clazz){", "signature": "public Converter lookup(final Class> clazz){", "docstring": "/** \n * Look up and return any registered {@link Converter} for the specifieddestination class; if there is no registered Converter, return null.\n * @param clazz Class for which to return a registered Converter\n * @return The registered {@link Converter} or null if not found\n */\n"}
{"question_id": "636767a41a6d9265ec018572", "input": "/** \n * Read a raw Varint from the stream.\n */\n\npublic long readRawVarint64() throws IOException {", "signature": "public long readRawVarint64() throws IOException {", "docstring": "/** \n * Read a raw Varint from the stream.\n */\n"}
{"question_id": "636767021a6d9265ec0178bb", "input": "/** \n * null reference to an empty one.null input array.public static references in this class.null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n\npublic static Double[] nullToEmpty(final Double[] array){", "signature": "public static Double[] nullToEmpty(final Double[] array){", "docstring": "/** \n * null reference to an empty one.null input array.public static references in this class.null or empty\n * @return the same array, public static empty array if null or empty input\n * @since 2.5\n */\n"}
{"question_id": "636767021a6d9265ec0178b2", "input": "/** \n * Pops as many abstract types from the output frame stack as described by the given descriptor.\n * @param descriptor a type or method descriptor (in which case its argument types are popped).\n */\n\nprivate void pop(final String descriptor){", "signature": "private void pop(final String descriptor){", "docstring": "/** \n * Pops as many abstract types from the output frame stack as described by the given descriptor.\n * @param descriptor a type or method descriptor (in which case its argument types are popped).\n */\n"}
{"question_id": "636766f91a6d9265ec01776e", "input": "/** \n * Writes len bytes from the specified byte array starting at offset off to this byte array output stream.\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n */\n\n@Override public void write(final byte b[],final int off,final int len) throws IOException {", "signature": "@Override public void write(final byte b[],final int off,final int len) throws IOException {", "docstring": "/** \n * Writes len bytes from the specified byte array starting at offset off to this byte array output stream.\n * @param b the data.\n * @param off the start offset in the data.\n * @param len the number of bytes to write.\n */\n"}
{"question_id": "636767551a6d9265ec017f3f", "input": "/** \n * Swaps the two elements at the specified indices in the given array.\n * @param < V > the type of elements in the array\n * @param arr the array\n * @param i the index of the first element\n * @param j the index of the second element\n */\n\npublic static final null.true if the array is empty or null\n * @since 2.1\n */\n\npublic static boolean isEmpty(final double[] array){", "signature": "public static boolean isEmpty(final double[] array){", "docstring": "/** \n * null.true if the array is empty or null\n * @since 2.1\n */\n"}
{"question_id": "6367667e1a6d9265ec01743a", "input": "/** \n * The last time, in milliseconds, a write operation occurred.\n * @return this\n */\n\npublic long lastWriteTimeStampInMilliseconds(){", "signature": "public long lastWriteTimeStampInMilliseconds(){", "docstring": "/** \n * The last time, in milliseconds, a write operation occurred.\n * @return this\n */\n"}
{"question_id": "636767601a6d9265ec0180fd", "input": "/** \n * Add an edge to the index.\n * @param sourceVertex the source vertex\n * @param targetVertex the target vertex\n * @param e the edge\n */\n\nprotected void addToIndex(V sourceVertex,V targetVertex,E e){", "signature": "protected void addToIndex(V sourceVertex,V targetVertex,E e){", "docstring": "/** \n * Add an edge to the index.\n * @param sourceVertex the source vertex\n * @param targetVertex the target vertex\n * @param e the edge\n */\n"}
{"question_id": "636766821a6d9265ec0174c9", "input": "/** \n * Returns the class path of the current JVM instance as an array of {@link File} objects.\n */\n\nprivate static File[] classPath(){", "signature": "private static File[] classPath(){", "docstring": "/** \n * Returns the class path of the current JVM instance as an array of {@link File} objects.\n */\n"}
{"question_id": "636767041a6d9265ec0178f8", "input": "/** \n * 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. true if the specified appender is in the list of attached appenders, false otherwise.\n * @since 1.2 \n */\n\npublic boolean isAttached(Appender appender){", "signature": "public boolean isAttached(Appender appender){", "docstring": "/** \n * Returns true if the specified appender is in the list of attached appenders, false otherwise.\n * @since 1.2 \n */\n"}
{"question_id": "6367674a1a6d9265ec017dab", "input": "/** \n * Compares two floating point values. Returns 0 if they are equal, -1 if {@literal o1 < o2}, 1 otherwise\n * @param o1 the first value\n * @param o2 the second value\n * @return 0 if they are equal, -1 if {@literal o1 < o2}, 1 otherwise\n */\n\n@Override public int compare(Double o1,Double o2){", "signature": "@Override public int compare(Double o1,Double o2){", "docstring": "/** \n * Compares two floating point values. Returns 0 if they are equal, -1 if {@literal o1 < o2}, 1 otherwise\n * @param o1 the first value\n * @param o2 the second value\n * @return 0 if they are equal, -1 if {@literal o1 < o2}, 1 otherwise\n */\n"}
{"question_id": "6367672d1a6d9265ec017c78", "input": "/** \n * Inserts a value to the set. Returns true if the set did not already contain the specified element. \n */\n\npublic boolean insert(int val){", "signature": "public boolean insert(int val){", "docstring": "/** \n * Inserts a value to the set. Returns true if the set did not already contain the specified element. \n */\n"}
{"question_id": "636767dc1a6d9265ec0186c6", "input": "/** \n * Returns ture when the input fields have already been stored in the properties.\n */\n\nprivate boolean containsAllFields(Fields fields){", "signature": "private boolean containsAllFields(Fields fields){", "docstring": "/** \n * Returns ture when the input fields have already been stored in the properties.\n */\n"}
{"question_id": "636766821a6d9265ec0174bf", "input": "/** \n * Reverse of Introspector.decapitalize\n */\n\npublic static String capitalize(String name){", "signature": "public static String capitalize(String name){", "docstring": "/** \n * Reverse of Introspector.decapitalize\n */\n"}
{"question_id": "636767aa1a6d9265ec01865a", "input": "/** \n * Writes the contents of the {@link LinkedBuffer} into the {@link DataOutput}.\n * @return the total content size of the buffer.\n */\n\npublic static int writeTo(final DataOutput out,LinkedBuffer node) throws IOException {", "signature": "public static int writeTo(final DataOutput out,LinkedBuffer node) throws IOException {", "docstring": "/** \n * Writes the contents of the {@link LinkedBuffer} into the {@link DataOutput}.\n * @return the total content size of the buffer.\n */\n"}
{"question_id": "636766f21a6d9265ec017677", "input": "/** \n * Boolean value is not true, handling null by returning true. BooleanUtils.isNotTrue(Boolean.TRUE) = false BooleanUtils.isNotTrue(Boolean.FALSE) = true BooleanUtils.isNotTrue(null) = true
\n * @param bool the boolean to check, null returns true\n * @return true if the input is null or false\n * @since 2.3\n */\n\npublic static boolean isNotTrue(Boolean bool){", "signature": "public static boolean isNotTrue(Boolean bool){", "docstring": "/** \n * Boolean value is not true, handling null by returning true. BooleanUtils.isNotTrue(Boolean.TRUE) = false BooleanUtils.isNotTrue(Boolean.FALSE) = true BooleanUtils.isNotTrue(null) = true
\n * @param bool the boolean to check, null returns true\n * @return true if the input is null or false\n * @since 2.3\n */\n"}
{"question_id": "6367674f1a6d9265ec017e74", "input": "/** \n * Returns a textual representation of the queue.\n * @return a textual representation of the queue.\n */\n\npublic String toString(){", "signature": "public String toString(){", "docstring": "/** \n * Returns a textual representation of the queue.\n * @return a textual representation of the queue.\n */\n"}
{"question_id": "6367675c1a6d9265ec018058", "input": "/** \n * Create a string supplier which returns unique strings. The returns strings are simply integers starting from start.\n * @param start where to start the sequence\n * @return a string supplier\n */\n\n@SuppressWarnings(\"unchecked\") public static Suppliernull for a null input array.Double array, may be null\n * @return a double array, null if null array input\n * @throws NullPointerException if array content is null\n */\n\npublic static double[] toPrimitive(final Double[] array){", "signature": "public static double[] toPrimitive(final Double[] array){", "docstring": "/** \n * null for a null input array.Double array, may be null\n * @return a double array, null if null array input\n * @throws NullPointerException if array content is null\n */\n"}
{"question_id": "636766fa1a6d9265ec0177a9", "input": "/** \n * Adds an abstract type to the list of types on which a constructor is invoked in the basic block.\n * @param abstractType an abstract type on a which a constructor is invoked.\n */\n\nprivate void addInitializedType(final int abstractType){", "signature": "private void addInitializedType(final int abstractType){", "docstring": "/** \n * Adds an abstract type to the list of types on which a constructor is invoked in the basic block.\n * @param abstractType an abstract type on a which a constructor is invoked.\n */\n"}
{"question_id": "6367670a1a6d9265ec0179dc", "input": "/** \n * Puts some abstract types of {@link #currentFrame} in {@link #stackMapTableEntries} , using theJVMS verification_type_info format used in StackMapTable attributes.\n * @param start index of the first type in {@link #currentFrame} to write.\n * @param end index of last type in {@link #currentFrame} to write (exclusive).\n */\n\nprivate void putAbstractTypes(final int start,final int end){", "signature": "private void putAbstractTypes(final int start,final int end){", "docstring": "/** \n * Puts some abstract types of {@link #currentFrame} in {@link #stackMapTableEntries} , using theJVMS verification_type_info format used in StackMapTable attributes.\n * @param start index of the first type in {@link #currentFrame} to write.\n * @param end index of last type in {@link #currentFrame} to write (exclusive).\n */\n"}
{"question_id": "636766801a6d9265ec017482", "input": "/** \n * 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.\n */\n\npublic void readFrom(final InputStream in) throws IOException {", "signature": "public void readFrom(final InputStream in) throws IOException {", "docstring": "/** \n * 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.\n */\n"}
{"question_id": "6367670a1a6d9265ec0179d8", "input": "/** \n * @see OutputStream#write(byte[]) \n */\n\n@Override public void write(final byte[] b) throws IOException {", "signature": "@Override public void write(final byte[] b) throws IOException {", "docstring": "/** \n * @see OutputStream#write(byte[]) \n */\n"}
{"question_id": "636766a81a6d9265ec01757b", "input": "/** \n * Serialize to JSON {@link String}\n * @param features features to be enabled in serialization\n * @return JSON {@link String}\n */\n\n@SuppressWarnings(\"unchecked\") public String toString(JSONWriter.Feature... features){", "signature": "@SuppressWarnings(\"unchecked\") public String toString(JSONWriter.Feature... features){", "docstring": "/** \n * Serialize to JSON {@link String}\n * @param features features to be enabled in serialization\n * @return JSON {@link String}\n */\n"}
{"question_id": "636767021a6d9265ec0178bf", "input": "/** \n * >= desiredCapacity and very close to desiredCapacity (within 11% if desiredCapacity >= 1000).\n * @param desiredCapacity the capacity desired by the user.\n * @return the capacity which should be used for a hashtable.\n */\n\npublic static int nextPrime(int desiredCapacity){", "signature": "public static int nextPrime(int desiredCapacity){", "docstring": "/** \n * Returns a prime number which is >= desiredCapacity and very close to desiredCapacity (within 11% if desiredCapacity >= 1000).\n * @param desiredCapacity the capacity desired by the user.\n * @return the capacity which should be used for a hashtable.\n */\n"}
{"question_id": "6367670a1a6d9265ec0179cf", "input": "/** \n * null. CharUtils.toChar(null, 'X') = 'X' CharUtils.toChar(' ', 'X') = ' ' CharUtils.toChar('A', 'X') = 'A' \n * @param ch the character to convert\n * @param defaultValue the value to use if the Character is null\n * @return the char value of the Character or the default if null\n */\n\npublic static char toChar(final Character ch,final char defaultValue){", "signature": "public static char toChar(final Character ch,final char defaultValue){", "docstring": "/** \n * null. CharUtils.toChar(null, 'X') = 'X' CharUtils.toChar(' ', 'X') = ' ' CharUtils.toChar('A', 'X') = 'A' \n * @param ch the character to convert\n * @param defaultValue the value to use if the Character is null\n * @return the char value of the Character or the default if null\n */\n"}
{"question_id": "6367676b1a6d9265ec0181e2", "input": "/** \n * 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.\n * @param source the source Collection\n * @param candidates the candidates to search for\n * @return the first present object, or null if not found\n */\n\npublic static Object findFirstMatch(Collection source,Collection candidates){", "signature": "public static Object findFirstMatch(Collection source,Collection candidates){", "docstring": "/** \n * 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.\n * @param source the source Collection\n * @param candidates the candidates to search for\n * @return the first present object, or null if not found\n */\n"}
{"question_id": "6367676b1a6d9265ec0181ee", "input": "/** \n * Trim trailing whitespace from the given String.\n * @param str the String to check\n * @return the trimmed String\n * @see java.lang.Character#isWhitespace\n */\n\npublic static String trimTrailingWhitespace(String str){", "signature": "public static String trimTrailingWhitespace(String str){", "docstring": "/** \n * Trim trailing whitespace from the given String.\n * @param str the String to check\n * @return the trimmed String\n * @see java.lang.Character#isWhitespace\n */\n"}
{"question_id": "636767dc1a6d9265ec0186cb", "input": "/** \n * initialize config, such as check dist path\n */\n\npublic void init(){", "signature": "public void init(){", "docstring": "/** \n * initialize config, such as check dist path\n */\n"}
{"question_id": "636767a31a6d9265ec018552", "input": "/** \n * Read a {@code string} field value from the stream.\n */\n\n@Override public String readString() throws IOException {", "signature": "@Override public String readString() throws IOException {", "docstring": "/** \n * Read a {@code string} field value from the stream.\n */\n"}
{"question_id": "636767a61a6d9265ec0185b7", "input": "/** \n * 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.\n */\n\nprivate static int digitValue(final char c){", "signature": "private static int digitValue(final char c){", "docstring": "/** \n * 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.\n */\n"}
{"question_id": "636767e01a6d9265ec018755", "input": "/** \n * build content,if it has ats someone set the ats\n */\n\nprivate MapString. For example, it will turn a sequence of '\\' and 'n' into a newline character, unless the '\\' is preceded by another '\\'.String to unescape, may be null\n * @return a new unescaped String, null if null string input\n */\n\npublic static String unescapeJava(String str) throws Exception {", "signature": "public static String unescapeJava(String str) throws Exception {", "docstring": "/** \n * String. For example, it will turn a sequence of '\\' and 'n' into a newline character, unless the '\\' is preceded by another '\\'.String to unescape, may be null\n * @return a new unescaped String, null if null string input\n */\n"}
{"question_id": "636766f01a6d9265ec01763e", "input": "/** \n * Translate a MIME standard character set name into the Java equivalent.\n * @param charset The MIME standard name.\n * @return The Java equivalent for this name.\n */\n\nprivate static String javaCharset(String charset){", "signature": "private static String javaCharset(String charset){", "docstring": "/** \n * Translate a MIME standard character set name into the Java equivalent.\n * @param charset The MIME standard name.\n * @return The Java equivalent for this name.\n */\n"}
{"question_id": "6367676a1a6d9265ec0181bf", "input": "/** \n * Turn the given Object into a String with single quotes if it is a String; keeping the Object as-is else.\n * @param obj the input Object (e.g. \"myString\")\n * @return the quoted String (e.g. \"'myString'\"),or the input object as-is if not a String\n */\n\npublic static Object quoteIfString(Object obj){", "signature": "public static Object quoteIfString(Object obj){", "docstring": "/** \n * Turn the given Object into a String with single quotes if it is a String; keeping the Object as-is else.\n * @param obj the input Object (e.g. \"myString\")\n * @return the quoted String (e.g. \"'myString'\"),or the input object as-is if not a String\n */\n"}
{"question_id": "636767501a6d9265ec017e86", "input": "/** \n * {@inheritDoc}\n */\n\n@Override public ListNodenull.\n * @param newArrayComponentType If array is null, create asize 1 array of this type.\n * @return A new copy of the array of size 1 greater than the input.\n */\n\nprivate static Object copyArrayGrow1(final Object array,final Class> newArrayComponentType){", "signature": "private static Object copyArrayGrow1(final Object array,final Class> newArrayComponentType){", "docstring": "/** \n * 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.\n * @param array The array to copy, must not be null.\n * @param newArrayComponentType If array is null, create asize 1 array of this type.\n * @return A new copy of the array of size 1 greater than the input.\n */\n"}
{"question_id": "636767431a6d9265ec017c8d", "input": "/** \n * Computes floor($\\log_2 (n)$) $+ 1$\n */\n\nprivate int computeBinaryLog(int n){", "signature": "private int computeBinaryLog(int n){", "docstring": "/** \n * Computes floor($\\log_2 (n)$) $+ 1$\n */\n"}
{"question_id": "636767611a6d9265ec018116", "input": "/** \n * Efficient way to compute the intersection between two sets\n * @param set1 set $1$\n * @param set2 set $2$\n * @return intersection of set $1$ and $2$\n */\n\nprivate Setnull entries. Note that {@link Arrays#sort(Object[])} will throw an {@link NullPointerException} if an array element is null.\n * @param collection The collection to convert\n * @return A new array of Strings.\n */\n\nstatic String[] toNoNullStringArray(Collection> collection){", "signature": "static String[] toNoNullStringArray(Collection> collection){", "docstring": "/** \n * 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.\n * @param collection The collection to convert\n * @return A new array of Strings.\n */\n"}
{"question_id": "636767081a6d9265ec0179a2", "input": "/** \n * true if s is null.null\n */\n\nprivate static boolean isAllZeros(String s){", "signature": "private static boolean isAllZeros(String s){", "docstring": "/** \n * true if s is null.null\n */\n"}
{"question_id": "636766821a6d9265ec0174b3", "input": "/** \n * Invoke the {@link BroadcastFilter}\n * @param msg\n * @return\n */\n\nprotected Object filter(Object msg){", "signature": "protected Object filter(Object msg){", "docstring": "/** \n * Invoke the {@link BroadcastFilter}\n * @param msg\n * @return\n */\n"}
{"question_id": "636767e01a6d9265ec018764", "input": "/** \n * Convert process properties to source data\n */\n\nprivate JsonObject convertProperties(Listvalue is \"true\", then true is returned. If value is \"false\", then true is returned. Otherwise, default is returned. value is \"true\", then true is returned. If value is \"false\", then true is returned. Otherwise, default is returned. event as the last event in the buffer.\n */\n\npublic void add(LoggingEvent event){", "signature": "public void add(LoggingEvent event){", "docstring": "/** \n * Add an event as the last event in the buffer.\n */\n"}
{"question_id": "636767a41a6d9265ec01857e", "input": "/** \n * Compares the two specified {@code long} values. The sign of the value returned is the same as that of{@code ((Long) a).compareTo(b)}. null if the passed-inEnumeration was null)\n */\n\npublic static String[] toStringArray(Enumerationnull if the passed-inEnumeration was null)\n */\n"}
{"question_id": "636766a91a6d9265ec0175ae", "input": "/** \n * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.\n * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} nullbytes into this byte vector.\n * @param byteOffset index of the first byte of byteArrayValue that must be copied.\n * @param byteLength number of bytes of byteArrayValue that must be copied.\n * @return this byte vector.\n */\n\npublic ByteVector putByteArray(final byte[] byteArrayValue,final int byteOffset,final int byteLength){", "signature": "public ByteVector putByteArray(final byte[] byteArrayValue,final int byteOffset,final int byteLength){", "docstring": "/** \n * Puts an array of bytes into this byte vector. The byte vector is automatically enlarged if necessary.\n * @param byteArrayValue an array of bytes. May be {@literal null} to put {@code byteLength} nullbytes into this byte vector.\n * @param byteOffset index of the first byte of byteArrayValue that must be copied.\n * @param byteLength number of bytes of byteArrayValue that must be copied.\n * @return this byte vector.\n */\n"}
{"question_id": "636766f11a6d9265ec01764f", "input": "/** \n * Returns the values for the BeanMap.\n * @return values for the BeanMap. The returned collection is not modifiable.\n */\n\npublic Collection