id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,800 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java | PKIXRevocationChecker.getOcspResponses | public Map<X509Certificate, byte[]> getOcspResponses() {
Map<X509Certificate, byte[]> copy = new HashMap<>(ocspResponses.size());
for (Map.Entry<X509Certificate, byte[]> e : ocspResponses.entrySet()) {
copy.put(e.getKey(), e.getValue().clone());
}
return copy;
} | java | public Map<X509Certificate, byte[]> getOcspResponses() {
Map<X509Certificate, byte[]> copy = new HashMap<>(ocspResponses.size());
for (Map.Entry<X509Certificate, byte[]> e : ocspResponses.entrySet()) {
copy.put(e.getKey(), e.getValue().clone());
}
return copy;
} | [
"public",
"Map",
"<",
"X509Certificate",
",",
"byte",
"[",
"]",
">",
"getOcspResponses",
"(",
")",
"{",
"Map",
"<",
"X509Certificate",
",",
"byte",
"[",
"]",
">",
"copy",
"=",
"new",
"HashMap",
"<>",
"(",
"ocspResponses",
".",
"size",
"(",
")",
")",
... | Gets the OCSP responses. These responses are used to determine
the revocation status of the specified certificates when OCSP is used.
@return a map of OCSP responses. Each key is an
{@code X509Certificate} that maps to the corresponding
DER-encoded OCSP response for that certificate. A deep copy of
the map is returned... | [
"Gets",
"the",
"OCSP",
"responses",
".",
"These",
"responses",
"are",
"used",
"to",
"determine",
"the",
"revocation",
"status",
"of",
"the",
"specified",
"certificates",
"when",
"OCSP",
"is",
"used",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java#L217-L223 |
34,801 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java | PKIXRevocationChecker.setOptions | public void setOptions(Set<Option> options) {
this.options = (options == null)
? Collections.<Option>emptySet()
: new HashSet<Option>(options);
} | java | public void setOptions(Set<Option> options) {
this.options = (options == null)
? Collections.<Option>emptySet()
: new HashSet<Option>(options);
} | [
"public",
"void",
"setOptions",
"(",
"Set",
"<",
"Option",
">",
"options",
")",
"{",
"this",
".",
"options",
"=",
"(",
"options",
"==",
"null",
")",
"?",
"Collections",
".",
"<",
"Option",
">",
"emptySet",
"(",
")",
":",
"new",
"HashSet",
"<",
"Optio... | Sets the revocation options.
@param options a set of revocation options. The set is copied to protect
against subsequent modification. | [
"Sets",
"the",
"revocation",
"options",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/PKIXRevocationChecker.java#L231-L235 |
34,802 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java | NodeSet.runTo | public void runTo(int index)
{
if (!m_cacheNodes)
throw new RuntimeException(
XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_CANNOT_INDEX, null)); //"This NodeSet can not do indexing or counting functions!");
if ((index >= 0) && (m_next < m_firstFree))
m_next = index;
... | java | public void runTo(int index)
{
if (!m_cacheNodes)
throw new RuntimeException(
XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_CANNOT_INDEX, null)); //"This NodeSet can not do indexing or counting functions!");
if ((index >= 0) && (m_next < m_firstFree))
m_next = index;
... | [
"public",
"void",
"runTo",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"!",
"m_cacheNodes",
")",
"throw",
"new",
"RuntimeException",
"(",
"XSLMessages",
".",
"createXPATHMessage",
"(",
"XPATHErrorResources",
".",
"ER_NODESET_CANNOT_INDEX",
",",
"null",
")",
")",
... | If an index is requested, NodeSet will call this method
to run the iterator to the index. By default this sets
m_next to the index. If the index argument is -1, this
signals that the iterator should be run to the end.
@param index Position to advance (or retreat) to, with
0 requesting the reset ("fresh") position an... | [
"If",
"an",
"index",
"is",
"requested",
"NodeSet",
"will",
"call",
"this",
"method",
"to",
"run",
"the",
"iterator",
"to",
"the",
"index",
".",
"By",
"default",
"this",
"sets",
"m_next",
"to",
"the",
"index",
".",
"If",
"the",
"index",
"argument",
"is",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L322-L333 |
34,803 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java | NodeSet.addNode | public void addNode(Node n)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!");
this.addElement(n);
} | java | public void addNode(Node n)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!");
this.addElement(n);
} | [
"public",
"void",
"addNode",
"(",
"Node",
"n",
")",
"{",
"if",
"(",
"!",
"m_mutable",
")",
"throw",
"new",
"RuntimeException",
"(",
"XSLMessages",
".",
"createXPATHMessage",
"(",
"XPATHErrorResources",
".",
"ER_NODESET_NOT_MUTABLE",
",",
"null",
")",
")",
";",... | Add a node to the NodeSet. Not all types of NodeSets support this
operation
@param n Node to be added
@throws RuntimeException thrown if this NodeSet is not of
a mutable type. | [
"Add",
"a",
"node",
"to",
"the",
"NodeSet",
".",
"Not",
"all",
"types",
"of",
"NodeSets",
"support",
"this",
"operation"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L379-L386 |
34,804 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java | NodeSet.addNodesInDocOrder | private boolean addNodesInDocOrder(int start, int end, int testIndex,
NodeList nodelist, XPathContext support)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!... | java | private boolean addNodesInDocOrder(int start, int end, int testIndex,
NodeList nodelist, XPathContext support)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!... | [
"private",
"boolean",
"addNodesInDocOrder",
"(",
"int",
"start",
",",
"int",
"end",
",",
"int",
"testIndex",
",",
"NodeList",
"nodelist",
",",
"XPathContext",
"support",
")",
"{",
"if",
"(",
"!",
"m_mutable",
")",
"throw",
"new",
"RuntimeException",
"(",
"XS... | Add the node list to this node set in document order.
@param start index.
@param end index.
@param testIndex index.
@param nodelist The nodelist to add.
@param support The XPath runtime context.
@return false always.
@throws RuntimeException thrown if this NodeSet is not of
a mutable type. | [
"Add",
"the",
"node",
"list",
"to",
"this",
"node",
"set",
"in",
"document",
"order",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L571-L620 |
34,805 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java | NodeSet.setCurrentPos | public void setCurrentPos(int i)
{
if (!m_cacheNodes)
throw new RuntimeException(
XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_CANNOT_INDEX, null)); //"This NodeSet can not do indexing or counting functions!");
m_next = i;
} | java | public void setCurrentPos(int i)
{
if (!m_cacheNodes)
throw new RuntimeException(
XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_CANNOT_INDEX, null)); //"This NodeSet can not do indexing or counting functions!");
m_next = i;
} | [
"public",
"void",
"setCurrentPos",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"!",
"m_cacheNodes",
")",
"throw",
"new",
"RuntimeException",
"(",
"XSLMessages",
".",
"createXPATHMessage",
"(",
"XPATHErrorResources",
".",
"ER_NODESET_CANNOT_INDEX",
",",
"null",
")",
")... | Set the current position in the node set.
@param i Must be a valid index.
@throws RuntimeException thrown if this NodeSet is not of
a cached type, and thus doesn't permit indexed access. | [
"Set",
"the",
"current",
"position",
"in",
"the",
"node",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L739-L747 |
34,806 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.objectEquals | public final static boolean objectEquals(Object a, Object b) {
return a == null ?
b == null ? true : false :
b == null ? false : a.equals(b);
} | java | public final static boolean objectEquals(Object a, Object b) {
return a == null ?
b == null ? true : false :
b == null ? false : a.equals(b);
} | [
"public",
"final",
"static",
"boolean",
"objectEquals",
"(",
"Object",
"a",
",",
"Object",
"b",
")",
"{",
"return",
"a",
"==",
"null",
"?",
"b",
"==",
"null",
"?",
"true",
":",
"false",
":",
"b",
"==",
"null",
"?",
"false",
":",
"a",
".",
"equals",... | Convenience utility. Does null checks on objects, then calls equals. | [
"Convenience",
"utility",
".",
"Does",
"null",
"checks",
"on",
"objects",
"then",
"calls",
"equals",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L191-L195 |
34,807 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.checkCompare | public static <T extends Comparable<T>> int checkCompare(T a, T b) {
return a == null ?
b == null ? 0 : -1 :
b == null ? 1 : a.compareTo(b);
} | java | public static <T extends Comparable<T>> int checkCompare(T a, T b) {
return a == null ?
b == null ? 0 : -1 :
b == null ? 1 : a.compareTo(b);
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"T",
">",
">",
"int",
"checkCompare",
"(",
"T",
"a",
",",
"T",
"b",
")",
"{",
"return",
"a",
"==",
"null",
"?",
"b",
"==",
"null",
"?",
"0",
":",
"-",
"1",
":",
"b",
"==",
"null",
"?... | Convenience utility. Does null checks on objects, then calls compare. | [
"Convenience",
"utility",
".",
"Does",
"null",
"checks",
"on",
"objects",
"then",
"calls",
"compare",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L200-L204 |
34,808 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.appendEncodedByte | private static final <T extends Appendable> void appendEncodedByte(T buffer, byte value,
byte[] state) {
try {
if (state[0] != 0) {
char c = (char) ((state[1] << 8) | ((value) & 0xFF));
buffer.append(c);
state[0] = 0;
}
... | java | private static final <T extends Appendable> void appendEncodedByte(T buffer, byte value,
byte[] state) {
try {
if (state[0] != 0) {
char c = (char) ((state[1] << 8) | ((value) & 0xFF));
buffer.append(c);
state[0] = 0;
}
... | [
"private",
"static",
"final",
"<",
"T",
"extends",
"Appendable",
">",
"void",
"appendEncodedByte",
"(",
"T",
"buffer",
",",
"byte",
"value",
",",
"byte",
"[",
"]",
"state",
")",
"{",
"try",
"{",
"if",
"(",
"state",
"[",
"0",
"]",
"!=",
"0",
")",
"{... | Append a byte to the given Appendable, packing two bytes into each
character. The state parameter maintains intermediary data between
calls.
@param state A two-element array, with state[0] == 0 if this is the
first byte of a pair, or state[0] != 0 if this is the second byte
of a pair, in which case state[1] is the fir... | [
"Append",
"a",
"byte",
"to",
"the",
"given",
"Appendable",
"packing",
"two",
"bytes",
"into",
"each",
"character",
".",
"The",
"state",
"parameter",
"maintains",
"intermediary",
"data",
"between",
"calls",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L462-L477 |
34,809 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.RLEStringToIntArray | static public final int[] RLEStringToIntArray(String s) {
int length = getInt(s, 0);
int[] array = new int[length];
int ai = 0, i = 1;
int maxI = s.length() / 2;
while (ai < length && i < maxI) {
int c = getInt(s, i++);
if (c == ESCAPE) {
... | java | static public final int[] RLEStringToIntArray(String s) {
int length = getInt(s, 0);
int[] array = new int[length];
int ai = 0, i = 1;
int maxI = s.length() / 2;
while (ai < length && i < maxI) {
int c = getInt(s, i++);
if (c == ESCAPE) {
... | [
"static",
"public",
"final",
"int",
"[",
"]",
"RLEStringToIntArray",
"(",
"String",
"s",
")",
"{",
"int",
"length",
"=",
"getInt",
"(",
"s",
",",
"0",
")",
";",
"int",
"[",
"]",
"array",
"=",
"new",
"int",
"[",
"length",
"]",
";",
"int",
"ai",
"=... | Construct an array of ints from a run-length encoded string. | [
"Construct",
"an",
"array",
"of",
"ints",
"from",
"a",
"run",
"-",
"length",
"encoded",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L482-L513 |
34,810 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.RLEStringToShortArray | static public final short[] RLEStringToShortArray(String s) {
int length = ((s.charAt(0)) << 16) | (s.charAt(1));
short[] array = new short[length];
int ai = 0;
for (int i=2; i<s.length(); ++i) {
char c = s.charAt(i);
if (c == ESCAPE) {
c = s.charA... | java | static public final short[] RLEStringToShortArray(String s) {
int length = ((s.charAt(0)) << 16) | (s.charAt(1));
short[] array = new short[length];
int ai = 0;
for (int i=2; i<s.length(); ++i) {
char c = s.charAt(i);
if (c == ESCAPE) {
c = s.charA... | [
"static",
"public",
"final",
"short",
"[",
"]",
"RLEStringToShortArray",
"(",
"String",
"s",
")",
"{",
"int",
"length",
"=",
"(",
"(",
"s",
".",
"charAt",
"(",
"0",
")",
")",
"<<",
"16",
")",
"|",
"(",
"s",
".",
"charAt",
"(",
"1",
")",
")",
";... | Construct an array of shorts from a run-length encoded string. | [
"Construct",
"an",
"array",
"of",
"shorts",
"from",
"a",
"run",
"-",
"length",
"encoded",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L521-L546 |
34,811 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.RLEStringToByteArray | static public final byte[] RLEStringToByteArray(String s) {
int length = ((s.charAt(0)) << 16) | (s.charAt(1));
byte[] array = new byte[length];
boolean nextChar = true;
char c = 0;
int node = 0;
int runLength = 0;
int i = 2;
for (int ai=0; ai<length; ) {
... | java | static public final byte[] RLEStringToByteArray(String s) {
int length = ((s.charAt(0)) << 16) | (s.charAt(1));
byte[] array = new byte[length];
boolean nextChar = true;
char c = 0;
int node = 0;
int runLength = 0;
int i = 2;
for (int ai=0; ai<length; ) {
... | [
"static",
"public",
"final",
"byte",
"[",
"]",
"RLEStringToByteArray",
"(",
"String",
"s",
")",
"{",
"int",
"length",
"=",
"(",
"(",
"s",
".",
"charAt",
"(",
"0",
")",
")",
"<<",
"16",
")",
"|",
"(",
"s",
".",
"charAt",
"(",
"1",
")",
")",
";",... | Construct an array of bytes from a run-length encoded string. | [
"Construct",
"an",
"array",
"of",
"bytes",
"from",
"a",
"run",
"-",
"length",
"encoded",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L581-L649 |
34,812 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.format1ForSource | static public final String format1ForSource(String s) {
StringBuilder buffer = new StringBuilder();
buffer.append("\"");
for (int i=0; i<s.length();) {
char c = s.charAt(i++);
if (c < '\u0020' || c == '"' || c == '\\') {
if (c == '\n') {
... | java | static public final String format1ForSource(String s) {
StringBuilder buffer = new StringBuilder();
buffer.append("\"");
for (int i=0; i<s.length();) {
char c = s.charAt(i++);
if (c < '\u0020' || c == '"' || c == '\\') {
if (c == '\n') {
... | [
"static",
"public",
"final",
"String",
"format1ForSource",
"(",
"String",
"s",
")",
"{",
"StringBuilder",
"buffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"buffer",
".",
"append",
"(",
"\"\\\"\"",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"... | Format a String for representation in a source file. Like
formatForSource but does not do line breaking. | [
"Format",
"a",
"String",
"for",
"representation",
"in",
"a",
"source",
"file",
".",
"Like",
"formatForSource",
"but",
"does",
"not",
"do",
"line",
"breaking",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L713-L749 |
34,813 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.escape | public static final String escape(String s) {
StringBuilder buf = new StringBuilder();
for (int i=0; i<s.length(); ) {
int c = Character.codePointAt(s, i);
i += UTF16.getCharCount(c);
if (c >= ' ' && c <= 0x007F) {
if (c == '\\') {
... | java | public static final String escape(String s) {
StringBuilder buf = new StringBuilder();
for (int i=0; i<s.length(); ) {
int c = Character.codePointAt(s, i);
i += UTF16.getCharCount(c);
if (c >= ' ' && c <= 0x007F) {
if (c == '\\') {
... | [
"public",
"static",
"final",
"String",
"escape",
"(",
"String",
"s",
")",
"{",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"s",
".",
"length",
"(",
")",
";",
")",
"{",
"int"... | Convert characters outside the range U+0020 to U+007F to
Unicode escapes, and convert backslash to a double backslash. | [
"Convert",
"characters",
"outside",
"the",
"range",
"U",
"+",
"0020",
"to",
"U",
"+",
"007F",
"to",
"Unicode",
"escapes",
"and",
"convert",
"backslash",
"to",
"a",
"double",
"backslash",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L755-L773 |
34,814 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.lookup | public static int lookup(String source, String[] target) {
for (int i = 0; i < target.length; ++i) {
if (source.equals(target[i])) return i;
}
return -1;
} | java | public static int lookup(String source, String[] target) {
for (int i = 0; i < target.length; ++i) {
if (source.equals(target[i])) return i;
}
return -1;
} | [
"public",
"static",
"int",
"lookup",
"(",
"String",
"source",
",",
"String",
"[",
"]",
"target",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"target",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"source",
".",
"equals",
"... | Look up a given string in a string array. Returns the index at
which the first occurrence of the string was found in the
array, or -1 if it was not found.
@param source the string to search for
@param target the array of zero or more strings in which to
look for source
@return the index of target at which source first... | [
"Look",
"up",
"a",
"given",
"string",
"in",
"a",
"string",
"array",
".",
"Returns",
"the",
"index",
"at",
"which",
"the",
"first",
"occurrence",
"of",
"the",
"string",
"was",
"found",
"in",
"the",
"array",
"or",
"-",
"1",
"if",
"it",
"was",
"not",
"f... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1112-L1117 |
34,815 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.parseChar | public static boolean parseChar(String id, int[] pos, char ch) {
int start = pos[0];
pos[0] = PatternProps.skipWhiteSpace(id, pos[0]);
if (pos[0] == id.length() ||
id.charAt(pos[0]) != ch) {
pos[0] = start;
return false;
}
++pos[0];
... | java | public static boolean parseChar(String id, int[] pos, char ch) {
int start = pos[0];
pos[0] = PatternProps.skipWhiteSpace(id, pos[0]);
if (pos[0] == id.length() ||
id.charAt(pos[0]) != ch) {
pos[0] = start;
return false;
}
++pos[0];
... | [
"public",
"static",
"boolean",
"parseChar",
"(",
"String",
"id",
",",
"int",
"[",
"]",
"pos",
",",
"char",
"ch",
")",
"{",
"int",
"start",
"=",
"pos",
"[",
"0",
"]",
";",
"pos",
"[",
"0",
"]",
"=",
"PatternProps",
".",
"skipWhiteSpace",
"(",
"id",
... | Parse a single non-whitespace character 'ch', optionally
preceded by whitespace.
@param id the string to be parsed
@param pos INPUT-OUTPUT parameter. On input, pos[0] is the
offset of the first character to be parsed. On output, pos[0]
is the index after the last parsed character. If the parse
fails, pos[0] will be ... | [
"Parse",
"a",
"single",
"non",
"-",
"whitespace",
"character",
"ch",
"optionally",
"preceded",
"by",
"whitespace",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1131-L1141 |
34,816 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.parsePattern | @SuppressWarnings("fallthrough")
public static int parsePattern(String rule, int pos, int limit,
String pattern, int[] parsedInts) {
// TODO Update this to handle surrogates
int[] p = new int[1];
int intCount = 0; // number of integers parsed
for (int i=0; i<pattern.lengt... | java | @SuppressWarnings("fallthrough")
public static int parsePattern(String rule, int pos, int limit,
String pattern, int[] parsedInts) {
// TODO Update this to handle surrogates
int[] p = new int[1];
int intCount = 0; // number of integers parsed
for (int i=0; i<pattern.lengt... | [
"@",
"SuppressWarnings",
"(",
"\"fallthrough\"",
")",
"public",
"static",
"int",
"parsePattern",
"(",
"String",
"rule",
",",
"int",
"pos",
",",
"int",
"limit",
",",
"String",
"pattern",
",",
"int",
"[",
"]",
"parsedInts",
")",
"{",
"// TODO Update this to hand... | Parse a pattern string starting at offset pos. Keywords are
matched case-insensitively. Spaces may be skipped and may be
optional or required. Integer values may be parsed, and if
they are, they will be returned in the given array. If
successful, the offset of the next non-space character is
returned. On failure, ... | [
"Parse",
"a",
"pattern",
"string",
"starting",
"at",
"offset",
"pos",
".",
"Keywords",
"are",
"matched",
"case",
"-",
"insensitively",
".",
"Spaces",
"may",
"be",
"skipped",
"and",
"may",
"be",
"optional",
"or",
"required",
".",
"Integer",
"values",
"may",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1162-L1205 |
34,817 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.parseUnicodeIdentifier | public static String parseUnicodeIdentifier(String str, int[] pos) {
// assert(pos[0] < str.length());
StringBuilder buf = new StringBuilder();
int p = pos[0];
while (p < str.length()) {
int ch = Character.codePointAt(str, p);
if (buf.length() == 0) {
... | java | public static String parseUnicodeIdentifier(String str, int[] pos) {
// assert(pos[0] < str.length());
StringBuilder buf = new StringBuilder();
int p = pos[0];
while (p < str.length()) {
int ch = Character.codePointAt(str, p);
if (buf.length() == 0) {
... | [
"public",
"static",
"String",
"parseUnicodeIdentifier",
"(",
"String",
"str",
",",
"int",
"[",
"]",
"pos",
")",
"{",
"// assert(pos[0] < str.length());",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"int",
"p",
"=",
"pos",
"[",
"0",
"]... | Parse a Unicode identifier from the given string at the given
position. Return the identifier, or null if there is no
identifier.
@param str the string to parse
@param pos INPUT-OUPUT parameter. On INPUT, pos[0] is the
first character to examine. It must be less than str.length(),
and it must not point to a whitespa... | [
"Parse",
"a",
"Unicode",
"identifier",
"from",
"the",
"given",
"string",
"at",
"the",
"given",
"position",
".",
"Return",
"the",
"identifier",
"or",
"null",
"if",
"there",
"is",
"no",
"identifier",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1333-L1356 |
34,818 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.appendNumber | public static <T extends Appendable> T appendNumber(T result, int n,
int radix, int minDigits)
{
try {
if (radix < 2 || radix > 36) {
throw new IllegalArgumentException("Illegal radix " + radix);
}
int abs = n;
if (n < 0) {
... | java | public static <T extends Appendable> T appendNumber(T result, int n,
int radix, int minDigits)
{
try {
if (radix < 2 || radix > 36) {
throw new IllegalArgumentException("Illegal radix " + radix);
}
int abs = n;
if (n < 0) {
... | [
"public",
"static",
"<",
"T",
"extends",
"Appendable",
">",
"T",
"appendNumber",
"(",
"T",
"result",
",",
"int",
"n",
",",
"int",
"radix",
",",
"int",
"minDigits",
")",
"{",
"try",
"{",
"if",
"(",
"radix",
"<",
"2",
"||",
"radix",
">",
"36",
")",
... | Append a number to the given Appendable in the given radix.
Standard digits '0'-'9' are used and letters 'A'-'Z' for
radices 11 through 36.
@param result the digits of the number are appended here
@param n the number to be converted to digits; may be negative.
If negative, a '-' is prepended to the digits.
@param radix... | [
"Append",
"a",
"number",
"to",
"the",
"given",
"Appendable",
"in",
"the",
"given",
"radix",
".",
"Standard",
"digits",
"0",
"-",
"9",
"are",
"used",
"and",
"letters",
"A",
"-",
"Z",
"for",
"radices",
"11",
"through",
"36",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1404-L1427 |
34,819 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.appendToRule | public static void appendToRule(StringBuffer rule,
String text,
boolean isLiteral,
boolean escapeUnprintable,
StringBuffer quoteBuf) {
for (int i=0; i<text.length(); ++i) {
// Okay to process in 16-bit code units here
appendToRule(rule, tex... | java | public static void appendToRule(StringBuffer rule,
String text,
boolean isLiteral,
boolean escapeUnprintable,
StringBuffer quoteBuf) {
for (int i=0; i<text.length(); ++i) {
// Okay to process in 16-bit code units here
appendToRule(rule, tex... | [
"public",
"static",
"void",
"appendToRule",
"(",
"StringBuffer",
"rule",
",",
"String",
"text",
",",
"boolean",
"isLiteral",
",",
"boolean",
"escapeUnprintable",
",",
"StringBuffer",
"quoteBuf",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"t... | Append the given string to the rule. Calls the single-character
version of appendToRule for each character. | [
"Append",
"the",
"given",
"string",
"to",
"the",
"rule",
".",
"Calls",
"the",
"single",
"-",
"character",
"version",
"of",
"appendToRule",
"for",
"each",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1655-L1664 |
34,820 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.compareUnsigned | public static final int compareUnsigned(int source, int target)
{
source += MAGIC_UNSIGNED;
target += MAGIC_UNSIGNED;
if (source < target) {
return -1;
}
else if (source > target) {
return 1;
}
return 0;
} | java | public static final int compareUnsigned(int source, int target)
{
source += MAGIC_UNSIGNED;
target += MAGIC_UNSIGNED;
if (source < target) {
return -1;
}
else if (source > target) {
return 1;
}
return 0;
} | [
"public",
"static",
"final",
"int",
"compareUnsigned",
"(",
"int",
"source",
",",
"int",
"target",
")",
"{",
"source",
"+=",
"MAGIC_UNSIGNED",
";",
"target",
"+=",
"MAGIC_UNSIGNED",
";",
"if",
"(",
"source",
"<",
"target",
")",
"{",
"return",
"-",
"1",
"... | Compares 2 unsigned integers
@param source 32 bit unsigned integer
@param target 32 bit unsigned integer
@return 0 if equals, 1 if source is greater than target and -1
otherwise | [
"Compares",
"2",
"unsigned",
"integers"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1687-L1698 |
34,821 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java | Utility.highBit | public static final byte highBit(int n)
{
if (n <= 0) {
return -1;
}
byte bit = 0;
if (n >= 1 << 16) {
n >>= 16;
bit += 16;
}
if (n >= 1 << 8) {
n >>= 8;
bit += 8;
}
if (n >= 1 << 4) {
... | java | public static final byte highBit(int n)
{
if (n <= 0) {
return -1;
}
byte bit = 0;
if (n >= 1 << 16) {
n >>= 16;
bit += 16;
}
if (n >= 1 << 8) {
n >>= 8;
bit += 8;
}
if (n >= 1 << 4) {
... | [
"public",
"static",
"final",
"byte",
"highBit",
"(",
"int",
"n",
")",
"{",
"if",
"(",
"n",
"<=",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"byte",
"bit",
"=",
"0",
";",
"if",
"(",
"n",
">=",
"1",
"<<",
"16",
")",
"{",
"n",
">>=",
"16",
... | Find the highest bit in a positive integer. This is done
by doing a binary search through the bits.
@param n is the integer
@return the bit number of the highest bit, with 0 being
the low order bit, or -1 if <code>n</code> is not positive | [
"Find",
"the",
"highest",
"bit",
"in",
"a",
"positive",
"integer",
".",
"This",
"is",
"done",
"by",
"doing",
"a",
"binary",
"search",
"through",
"the",
"bits",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Utility.java#L1709-L1743 |
34,822 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/XPath.java | XPath.setExpression | public void setExpression(Expression exp)
{
if(null != m_mainExp)
exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus
m_mainExp = exp;
} | java | public void setExpression(Expression exp)
{
if(null != m_mainExp)
exp.exprSetParent(m_mainExp.exprGetParent()); // a bit bogus
m_mainExp = exp;
} | [
"public",
"void",
"setExpression",
"(",
"Expression",
"exp",
")",
"{",
"if",
"(",
"null",
"!=",
"m_mainExp",
")",
"exp",
".",
"exprSetParent",
"(",
"m_mainExp",
".",
"exprGetParent",
"(",
")",
")",
";",
"// a bit bogus",
"m_mainExp",
"=",
"exp",
";",
"}"
] | Set the raw expression object for this object.
@param exp the raw Expression object, which should not normally be null. | [
"Set",
"the",
"raw",
"expression",
"object",
"for",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/XPath.java#L97-L102 |
34,823 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | ElemContext.push | final ElemContext push()
{
ElemContext frame = this.m_next;
if (frame == null)
{
/* We have never been at this depth yet, and there is no
* stack frame to re-use, so we now make a new one.
*/
frame = new ElemContext(this);
this.m_... | java | final ElemContext push()
{
ElemContext frame = this.m_next;
if (frame == null)
{
/* We have never been at this depth yet, and there is no
* stack frame to re-use, so we now make a new one.
*/
frame = new ElemContext(this);
this.m_... | [
"final",
"ElemContext",
"push",
"(",
")",
"{",
"ElemContext",
"frame",
"=",
"this",
".",
"m_next",
";",
"if",
"(",
"frame",
"==",
"null",
")",
"{",
"/* We have never been at this depth yet, and there is no\n * stack frame to re-use, so we now make a new one.\n ... | This method pushes an element "stack frame"
but with no initialization of values in that frame.
This method is used for optimization purposes, like when pushing
a stack frame for an HTML "IMG" tag which has no children and
the stack frame will almost immediately be popped. | [
"This",
"method",
"pushes",
"an",
"element",
"stack",
"frame",
"but",
"with",
"no",
"initialization",
"of",
"values",
"in",
"that",
"frame",
".",
"This",
"method",
"is",
"used",
"for",
"optimization",
"purposes",
"like",
"when",
"pushing",
"a",
"stack",
"fra... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java#L165-L184 |
34,824 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java | ElemContext.push | final ElemContext push(
final String uri,
final String localName,
final String qName)
{
ElemContext frame = this.m_next;
if (frame == null)
{
/* We have never been at this depth yet, and there is no
* stack frame to re-use, so we now make a ne... | java | final ElemContext push(
final String uri,
final String localName,
final String qName)
{
ElemContext frame = this.m_next;
if (frame == null)
{
/* We have never been at this depth yet, and there is no
* stack frame to re-use, so we now make a ne... | [
"final",
"ElemContext",
"push",
"(",
"final",
"String",
"uri",
",",
"final",
"String",
"localName",
",",
"final",
"String",
"qName",
")",
"{",
"ElemContext",
"frame",
"=",
"this",
".",
"m_next",
";",
"if",
"(",
"frame",
"==",
"null",
")",
"{",
"/* We hav... | Push an element context on the stack. This context keeps track of
information gathered about the element.
@param uri The URI for the namespace for the element name,
can be null if it is not yet known.
@param localName The local name of the element (no prefix),
can be null.
@param qName The qualified name (with prefix, ... | [
"Push",
"an",
"element",
"context",
"on",
"the",
"stack",
".",
"This",
"context",
"keeps",
"track",
"of",
"information",
"gathered",
"about",
"the",
"element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ElemContext.java#L196-L221 |
34,825 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/PBEKeySpec.java | PBEKeySpec.clearPassword | public final void clearPassword() {
if (password != null) {
for (int i = 0; i < password.length; i++) {
password[i] = ' ';
}
password = null;
}
} | java | public final void clearPassword() {
if (password != null) {
for (int i = 0; i < password.length; i++) {
password[i] = ' ';
}
password = null;
}
} | [
"public",
"final",
"void",
"clearPassword",
"(",
")",
"{",
"if",
"(",
"password",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"password",
".",
"length",
";",
"i",
"++",
")",
"{",
"password",
"[",
"i",
"]",
"=",
"'",... | Clears the internal copy of the password. | [
"Clears",
"the",
"internal",
"copy",
"of",
"the",
"password",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/PBEKeySpec.java#L175-L182 |
34,826 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterOutputStream.java | InflaterOutputStream.flush | public void flush() throws IOException {
ensureOpen();
// Finish decompressing and writing pending output data
if (!inf.finished()) {
try {
while (!inf.finished() && !inf.needsInput()) {
int n;
// Decompress pending output d... | java | public void flush() throws IOException {
ensureOpen();
// Finish decompressing and writing pending output data
if (!inf.finished()) {
try {
while (!inf.finished() && !inf.needsInput()) {
int n;
// Decompress pending output d... | [
"public",
"void",
"flush",
"(",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"// Finish decompressing and writing pending output data",
"if",
"(",
"!",
"inf",
".",
"finished",
"(",
")",
")",
"{",
"try",
"{",
"while",
"(",
"!",
"inf",
".",
... | Flushes this output stream, forcing any pending buffered output bytes to be
written.
@throws IOException if an I/O error occurs or this stream is already
closed | [
"Flushes",
"this",
"output",
"stream",
"forcing",
"any",
"pending",
"buffered",
"output",
"bytes",
"to",
"be",
"written",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterOutputStream.java#L144-L172 |
34,827 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterOutputStream.java | InflaterOutputStream.write | public void write(byte[] b, int off, int len) throws IOException {
// Sanity checks
ensureOpen();
if (b == null) {
throw new NullPointerException("Null buffer for read");
} else if (off < 0 || len < 0 || len > b.length - off) {
throw new IndexOutOfBoundsException(... | java | public void write(byte[] b, int off, int len) throws IOException {
// Sanity checks
ensureOpen();
if (b == null) {
throw new NullPointerException("Null buffer for read");
} else if (off < 0 || len < 0 || len > b.length - off) {
throw new IndexOutOfBoundsException(... | [
"public",
"void",
"write",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"// Sanity checks",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"b",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerExcepti... | Writes an array of bytes to the uncompressed output stream.
@param b buffer containing compressed data to decompress and write to
the output stream
@param off starting offset of the compressed data within {@code b}
@param len number of bytes to decompress from {@code b}
@throws IndexOutOfBoundsException if {@code off ... | [
"Writes",
"an",
"array",
"of",
"bytes",
"to",
"the",
"uncompressed",
"output",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterOutputStream.java#L221-L275 |
34,828 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.add | public void add(URI uri, HttpCookie cookie) {
// pre-condition : argument can't be null
if (cookie == null) {
throw new NullPointerException("cookie is null");
}
lock.lock();
try {
if (cookie.getMaxAge() != 0) {
addIndex(uriIndex, getEffec... | java | public void add(URI uri, HttpCookie cookie) {
// pre-condition : argument can't be null
if (cookie == null) {
throw new NullPointerException("cookie is null");
}
lock.lock();
try {
if (cookie.getMaxAge() != 0) {
addIndex(uriIndex, getEffec... | [
"public",
"void",
"add",
"(",
"URI",
"uri",
",",
"HttpCookie",
"cookie",
")",
"{",
"// pre-condition : argument can't be null",
"if",
"(",
"cookie",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"cookie is null\"",
")",
";",
"}",
"lock",... | Add one cookie into cookie store. | [
"Add",
"one",
"cookie",
"into",
"cookie",
"store",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L70-L84 |
34,829 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.getCookies | public List<HttpCookie> getCookies() {
List<HttpCookie> rt = new ArrayList<HttpCookie>();
lock.lock();
try {
for (List<HttpCookie> list : uriIndex.values()) {
Iterator<HttpCookie> it = list.iterator();
while (it.hasNext()) {
HttpCo... | java | public List<HttpCookie> getCookies() {
List<HttpCookie> rt = new ArrayList<HttpCookie>();
lock.lock();
try {
for (List<HttpCookie> list : uriIndex.values()) {
Iterator<HttpCookie> it = list.iterator();
while (it.hasNext()) {
HttpCo... | [
"public",
"List",
"<",
"HttpCookie",
">",
"getCookies",
"(",
")",
"{",
"List",
"<",
"HttpCookie",
">",
"rt",
"=",
"new",
"ArrayList",
"<",
"HttpCookie",
">",
"(",
")",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"for",
"(",
"List",
"<",
... | Get all cookies in cookie store, except those have expired | [
"Get",
"all",
"cookies",
"in",
"cookie",
"store",
"except",
"those",
"have",
"expired"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L117-L139 |
34,830 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.getURIs | public List<URI> getURIs() {
List<URI> uris = new ArrayList<URI>();
lock.lock();
try {
List<URI> result = new ArrayList<URI>(uriIndex.keySet());
result.remove(null);
return Collections.unmodifiableList(result);
} finally {
uris.addAll(uriI... | java | public List<URI> getURIs() {
List<URI> uris = new ArrayList<URI>();
lock.lock();
try {
List<URI> result = new ArrayList<URI>(uriIndex.keySet());
result.remove(null);
return Collections.unmodifiableList(result);
} finally {
uris.addAll(uriI... | [
"public",
"List",
"<",
"URI",
">",
"getURIs",
"(",
")",
"{",
"List",
"<",
"URI",
">",
"uris",
"=",
"new",
"ArrayList",
"<",
"URI",
">",
"(",
")",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"List",
"<",
"URI",
">",
"result",
"=",
"ne... | Get all URIs, which are associated with at least one cookie
of this cookie store. | [
"Get",
"all",
"URIs",
"which",
"are",
"associated",
"with",
"at",
"least",
"one",
"cookie",
"of",
"this",
"cookie",
"store",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L145-L157 |
34,831 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.remove | public boolean remove(URI uri, HttpCookie ck) {
// argument can't be null
if (ck == null) {
throw new NullPointerException("cookie is null");
}
lock.lock();
try {
uri = getEffectiveURI(uri);
if (uriIndex.get(uri) == null) {
ret... | java | public boolean remove(URI uri, HttpCookie ck) {
// argument can't be null
if (ck == null) {
throw new NullPointerException("cookie is null");
}
lock.lock();
try {
uri = getEffectiveURI(uri);
if (uriIndex.get(uri) == null) {
ret... | [
"public",
"boolean",
"remove",
"(",
"URI",
"uri",
",",
"HttpCookie",
"ck",
")",
"{",
"// argument can't be null",
"if",
"(",
"ck",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"cookie is null\"",
")",
";",
"}",
"lock",
".",
"lock",
... | Remove a cookie from store | [
"Remove",
"a",
"cookie",
"from",
"store"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L163-L185 |
34,832 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.removeAll | public boolean removeAll() {
lock.lock();
boolean result = false;
try {
result = !uriIndex.isEmpty();
uriIndex.clear();
} finally {
lock.unlock();
}
return result;
} | java | public boolean removeAll() {
lock.lock();
boolean result = false;
try {
result = !uriIndex.isEmpty();
uriIndex.clear();
} finally {
lock.unlock();
}
return result;
} | [
"public",
"boolean",
"removeAll",
"(",
")",
"{",
"lock",
".",
"lock",
"(",
")",
";",
"boolean",
"result",
"=",
"false",
";",
"try",
"{",
"result",
"=",
"!",
"uriIndex",
".",
"isEmpty",
"(",
")",
";",
"uriIndex",
".",
"clear",
"(",
")",
";",
"}",
... | Remove all cookies in this cookie store. | [
"Remove",
"all",
"cookies",
"in",
"this",
"cookie",
"store",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L191-L203 |
34,833 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.getInternal2 | private <T extends Comparable<T>>
void getInternal2(List<HttpCookie> cookies, Map<T, List<HttpCookie>> cookieIndex,
T comparator)
{
// Removed cookieJar
for (T index : cookieIndex.keySet()) {
if ((index == comparator) || (index != null && comparator.comp... | java | private <T extends Comparable<T>>
void getInternal2(List<HttpCookie> cookies, Map<T, List<HttpCookie>> cookieIndex,
T comparator)
{
// Removed cookieJar
for (T index : cookieIndex.keySet()) {
if ((index == comparator) || (index != null && comparator.comp... | [
"private",
"<",
"T",
"extends",
"Comparable",
"<",
"T",
">",
">",
"void",
"getInternal2",
"(",
"List",
"<",
"HttpCookie",
">",
"cookies",
",",
"Map",
"<",
"T",
",",
"List",
"<",
"HttpCookie",
">",
">",
"cookieIndex",
",",
"T",
"comparator",
")",
"{",
... | a cookie in index should be returned | [
"a",
"cookie",
"in",
"index",
"should",
"be",
"returned"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L304-L329 |
34,834 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java | InMemoryCookieStore.addIndex | private <T> void addIndex(Map<T, List<HttpCookie>> indexStore,
T index,
HttpCookie cookie)
{
// Android-changed : "index" can be null. We only use the URI based
// index on Android and we want to support null URIs. The underlying
//... | java | private <T> void addIndex(Map<T, List<HttpCookie>> indexStore,
T index,
HttpCookie cookie)
{
// Android-changed : "index" can be null. We only use the URI based
// index on Android and we want to support null URIs. The underlying
//... | [
"private",
"<",
"T",
">",
"void",
"addIndex",
"(",
"Map",
"<",
"T",
",",
"List",
"<",
"HttpCookie",
">",
">",
"indexStore",
",",
"T",
"index",
",",
"HttpCookie",
"cookie",
")",
"{",
"// Android-changed : \"index\" can be null. We only use the URI based",
"// index... | add 'cookie' indexed by 'index' into 'indexStore' | [
"add",
"cookie",
"indexed",
"by",
"index",
"into",
"indexStore"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InMemoryCookieStore.java#L332-L350 |
34,835 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CurrencyPluralInfo.java | CurrencyPluralInfo.getCurrencyPluralPattern | public String getCurrencyPluralPattern(String pluralCount) {
String currencyPluralPattern = pluralCountToCurrencyUnitPattern.get(pluralCount);
if (currencyPluralPattern == null) {
// fall back to "other"
if (!pluralCount.equals("other")) {
currencyPluralPattern = ... | java | public String getCurrencyPluralPattern(String pluralCount) {
String currencyPluralPattern = pluralCountToCurrencyUnitPattern.get(pluralCount);
if (currencyPluralPattern == null) {
// fall back to "other"
if (!pluralCount.equals("other")) {
currencyPluralPattern = ... | [
"public",
"String",
"getCurrencyPluralPattern",
"(",
"String",
"pluralCount",
")",
"{",
"String",
"currencyPluralPattern",
"=",
"pluralCountToCurrencyUnitPattern",
".",
"get",
"(",
"pluralCount",
")",
";",
"if",
"(",
"currencyPluralPattern",
"==",
"null",
")",
"{",
... | Given a plural count, gets currency plural pattern of this locale,
used for currency plural format
@param pluralCount currency plural count
@return a currency plural pattern based on plural count | [
"Given",
"a",
"plural",
"count",
"gets",
"currency",
"plural",
"pattern",
"of",
"this",
"locale",
"used",
"for",
"currency",
"plural",
"format"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CurrencyPluralInfo.java#L111-L128 |
34,836 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.set | private void set(int pos, String s) {
buffer.delete(pos, buffer.length());
buffer.insert(pos, s);
} | java | private void set(int pos, String s) {
buffer.delete(pos, buffer.length());
buffer.insert(pos, s);
} | [
"private",
"void",
"set",
"(",
"int",
"pos",
",",
"String",
"s",
")",
"{",
"buffer",
".",
"delete",
"(",
"pos",
",",
"buffer",
".",
"length",
"(",
")",
")",
";",
"buffer",
".",
"insert",
"(",
"pos",
",",
"s",
")",
";",
"}"
] | Set the length of the buffer to pos, then append the string. | [
"Set",
"the",
"length",
"of",
"the",
"buffer",
"to",
"pos",
"then",
"append",
"the",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L100-L103 |
34,837 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.haveKeywordAssign | private boolean haveKeywordAssign() {
// assume it is safe to start from index
for (int i = index; i < id.length; ++i) {
if (id[i] == KEYWORD_ASSIGN) {
return true;
}
}
return false;
} | java | private boolean haveKeywordAssign() {
// assume it is safe to start from index
for (int i = index; i < id.length; ++i) {
if (id[i] == KEYWORD_ASSIGN) {
return true;
}
}
return false;
} | [
"private",
"boolean",
"haveKeywordAssign",
"(",
")",
"{",
"// assume it is safe to start from index",
"for",
"(",
"int",
"i",
"=",
"index",
";",
"i",
"<",
"id",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"id",
"[",
"i",
"]",
"==",
"KEYWORD_ASSIG... | Returns true if a value separator occurs at or after index. | [
"Returns",
"true",
"if",
"a",
"value",
"separator",
"occurs",
"at",
"or",
"after",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L182-L190 |
34,838 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.parseLanguage | private int parseLanguage() {
int startLength = buffer.length();
if (haveExperimentalLanguagePrefix()) {
append(AsciiUtil.toLower(id[0]));
append(HYPHEN);
index = 2;
}
char c;
while(!isTerminatorOrIDSeparator(c = next())) {
append... | java | private int parseLanguage() {
int startLength = buffer.length();
if (haveExperimentalLanguagePrefix()) {
append(AsciiUtil.toLower(id[0]));
append(HYPHEN);
index = 2;
}
char c;
while(!isTerminatorOrIDSeparator(c = next())) {
append... | [
"private",
"int",
"parseLanguage",
"(",
")",
"{",
"int",
"startLength",
"=",
"buffer",
".",
"length",
"(",
")",
";",
"if",
"(",
"haveExperimentalLanguagePrefix",
"(",
")",
")",
"{",
"append",
"(",
"AsciiUtil",
".",
"toLower",
"(",
"id",
"[",
"0",
"]",
... | Advance index past language, and accumulate normalized language code in buffer.
Index must be at 0 when this is called. Index is left at a terminator or id
separator. Returns the start of the language code in the buffer. | [
"Advance",
"index",
"past",
"language",
"and",
"accumulate",
"normalized",
"language",
"code",
"in",
"buffer",
".",
"Index",
"must",
"be",
"at",
"0",
"when",
"this",
"is",
"called",
".",
"Index",
"is",
"left",
"at",
"a",
"terminator",
"or",
"id",
"separato... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L197-L220 |
34,839 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.parseVariant | private int parseVariant() {
int oldBlen = buffer.length();
boolean start = true;
boolean needSeparator = true;
boolean skipping = false;
char c;
boolean firstPass = true;
while ((c = next()) != DONE) {
if (c == DOT) {
start = false;
... | java | private int parseVariant() {
int oldBlen = buffer.length();
boolean start = true;
boolean needSeparator = true;
boolean skipping = false;
char c;
boolean firstPass = true;
while ((c = next()) != DONE) {
if (c == DOT) {
start = false;
... | [
"private",
"int",
"parseVariant",
"(",
")",
"{",
"int",
"oldBlen",
"=",
"buffer",
".",
"length",
"(",
")",
";",
"boolean",
"start",
"=",
"true",
";",
"boolean",
"needSeparator",
"=",
"true",
";",
"boolean",
"skipping",
"=",
"false",
";",
"char",
"c",
"... | Advance index past variant, and accumulate normalized variant in buffer. This ignores
the codepage information from POSIX ids. Index must be immediately after the country
or script. Index is left at the keyword separator or at the end of the text. Return
the start of the variant code in the buffer.
In standard for... | [
"Advance",
"index",
"past",
"variant",
"and",
"accumulate",
"normalized",
"variant",
"in",
"buffer",
".",
"This",
"ignores",
"the",
"codepage",
"information",
"from",
"POSIX",
"ids",
".",
"Index",
"must",
"be",
"immediately",
"after",
"the",
"country",
"or",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L394-L442 |
34,840 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.getLanguageScriptCountryVariant | public String[] getLanguageScriptCountryVariant() {
reset();
return new String[] {
getString(parseLanguage()),
getString(parseScript()),
getString(parseCountry()),
getString(parseVariant())
};
} | java | public String[] getLanguageScriptCountryVariant() {
reset();
return new String[] {
getString(parseLanguage()),
getString(parseScript()),
getString(parseCountry()),
getString(parseVariant())
};
} | [
"public",
"String",
"[",
"]",
"getLanguageScriptCountryVariant",
"(",
")",
"{",
"reset",
"(",
")",
";",
"return",
"new",
"String",
"[",
"]",
"{",
"getString",
"(",
"parseLanguage",
"(",
")",
")",
",",
"getString",
"(",
"parseScript",
"(",
")",
")",
",",
... | Returns the language, script, country, and variant as separate strings. | [
"Returns",
"the",
"language",
"script",
"country",
"and",
"variant",
"as",
"separate",
"strings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L488-L496 |
34,841 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.setToKeywordStart | private boolean setToKeywordStart() {
for (int i = index; i < id.length; ++i) {
if (id[i] == KEYWORD_SEPARATOR) {
if (canonicalize) {
for (int j = ++i; j < id.length; ++j) { // increment i past separator for return
if (id[j] == KEYWORD_ASSI... | java | private boolean setToKeywordStart() {
for (int i = index; i < id.length; ++i) {
if (id[i] == KEYWORD_SEPARATOR) {
if (canonicalize) {
for (int j = ++i; j < id.length; ++j) { // increment i past separator for return
if (id[j] == KEYWORD_ASSI... | [
"private",
"boolean",
"setToKeywordStart",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"index",
";",
"i",
"<",
"id",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"id",
"[",
"i",
"]",
"==",
"KEYWORD_SEPARATOR",
")",
"{",
"if",
"(",
"canonic... | If we have keywords, advance index to the start of the keywords and return true,
otherwise return false. | [
"If",
"we",
"have",
"keywords",
"advance",
"index",
"to",
"the",
"start",
"of",
"the",
"keywords",
"and",
"return",
"true",
"otherwise",
"return",
"false",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L548-L568 |
34,842 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.getKeywordMap | public Map<String, String> getKeywordMap() {
if (keywords == null) {
TreeMap<String, String> m = null;
if (setToKeywordStart()) {
// trim spaces and convert to lower case, both keywords and values.
do {
String key = getKeyword();
... | java | public Map<String, String> getKeywordMap() {
if (keywords == null) {
TreeMap<String, String> m = null;
if (setToKeywordStart()) {
// trim spaces and convert to lower case, both keywords and values.
do {
String key = getKeyword();
... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getKeywordMap",
"(",
")",
"{",
"if",
"(",
"keywords",
"==",
"null",
")",
"{",
"TreeMap",
"<",
"String",
",",
"String",
">",
"m",
"=",
"null",
";",
"if",
"(",
"setToKeywordStart",
"(",
")",
")",
"... | Returns a map of the keywords and values, or null if there are none. | [
"Returns",
"a",
"map",
"of",
"the",
"keywords",
"and",
"values",
"or",
"null",
"if",
"there",
"are",
"none",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L607-L644 |
34,843 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.parseKeywords | private int parseKeywords() {
int oldBlen = buffer.length();
Map<String, String> m = getKeywordMap();
if (!m.isEmpty()) {
boolean first = true;
for (Map.Entry<String, String> e : m.entrySet()) {
append(first ? KEYWORD_SEPARATOR : ITEM_SEPARATOR);
... | java | private int parseKeywords() {
int oldBlen = buffer.length();
Map<String, String> m = getKeywordMap();
if (!m.isEmpty()) {
boolean first = true;
for (Map.Entry<String, String> e : m.entrySet()) {
append(first ? KEYWORD_SEPARATOR : ITEM_SEPARATOR);
... | [
"private",
"int",
"parseKeywords",
"(",
")",
"{",
"int",
"oldBlen",
"=",
"buffer",
".",
"length",
"(",
")",
";",
"Map",
"<",
"String",
",",
"String",
">",
"m",
"=",
"getKeywordMap",
"(",
")",
";",
"if",
"(",
"!",
"m",
".",
"isEmpty",
"(",
")",
")... | Parse the keywords and return start of the string in the buffer. | [
"Parse",
"the",
"keywords",
"and",
"return",
"start",
"of",
"the",
"string",
"in",
"the",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L650-L667 |
34,844 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.getKeywords | public Iterator<String> getKeywords() {
Map<String, String> m = getKeywordMap();
return m.isEmpty() ? null : m.keySet().iterator();
} | java | public Iterator<String> getKeywords() {
Map<String, String> m = getKeywordMap();
return m.isEmpty() ? null : m.keySet().iterator();
} | [
"public",
"Iterator",
"<",
"String",
">",
"getKeywords",
"(",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"m",
"=",
"getKeywordMap",
"(",
")",
";",
"return",
"m",
".",
"isEmpty",
"(",
")",
"?",
"null",
":",
"m",
".",
"keySet",
"(",
")",
"... | Returns an iterator over the keywords, or null if we have an empty map. | [
"Returns",
"an",
"iterator",
"over",
"the",
"keywords",
"or",
"null",
"if",
"we",
"have",
"an",
"empty",
"map",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L672-L675 |
34,845 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java | LocaleIDParser.getKeywordValue | public String getKeywordValue(String keywordName) {
Map<String, String> m = getKeywordMap();
return m.isEmpty() ? null : m.get(AsciiUtil.toLowerString(keywordName.trim()));
} | java | public String getKeywordValue(String keywordName) {
Map<String, String> m = getKeywordMap();
return m.isEmpty() ? null : m.get(AsciiUtil.toLowerString(keywordName.trim()));
} | [
"public",
"String",
"getKeywordValue",
"(",
"String",
"keywordName",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"m",
"=",
"getKeywordMap",
"(",
")",
";",
"return",
"m",
".",
"isEmpty",
"(",
")",
"?",
"null",
":",
"m",
".",
"get",
"(",
"Ascii... | Returns the value for the named keyword, or null if the keyword is not
present. | [
"Returns",
"the",
"value",
"for",
"the",
"named",
"keyword",
"or",
"null",
"if",
"the",
"keyword",
"is",
"not",
"present",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/LocaleIDParser.java#L681-L684 |
34,846 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralFormat.java | PluralFormat.applyPattern | public void applyPattern(String pattern) {
this.pattern = pattern;
if (msgPattern == null) {
msgPattern = new MessagePattern();
}
try {
msgPattern.parsePluralStyle(pattern);
offset = msgPattern.getPluralOffset(0);
} catch(RuntimeException e) {
... | java | public void applyPattern(String pattern) {
this.pattern = pattern;
if (msgPattern == null) {
msgPattern = new MessagePattern();
}
try {
msgPattern.parsePluralStyle(pattern);
offset = msgPattern.getPluralOffset(0);
} catch(RuntimeException e) {
... | [
"public",
"void",
"applyPattern",
"(",
"String",
"pattern",
")",
"{",
"this",
".",
"pattern",
"=",
"pattern",
";",
"if",
"(",
"msgPattern",
"==",
"null",
")",
"{",
"msgPattern",
"=",
"new",
"MessagePattern",
"(",
")",
";",
"}",
"try",
"{",
"msgPattern",
... | Sets the pattern used by this plural format.
The method parses the pattern and creates a map of format strings
for the plural rules.
Patterns and their interpretation are specified in the class description.
@param pattern the pattern for this plural format.
@throws IllegalArgumentException if the pattern is invalid. | [
"Sets",
"the",
"pattern",
"used",
"by",
"this",
"plural",
"format",
".",
"The",
"method",
"parses",
"the",
"pattern",
"and",
"creates",
"a",
"map",
"of",
"format",
"strings",
"for",
"the",
"plural",
"rules",
".",
"Patterns",
"and",
"their",
"interpretation",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralFormat.java#L400-L412 |
34,847 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java | PKCS9Attributes.decode | private byte[] decode(DerInputStream in) throws IOException {
DerValue val = in.getDerValue();
// save the DER encoding with its proper tag byte.
byte[] derEncoding = val.toByteArray();
derEncoding[0] = DerValue.tag_SetOf;
DerInputStream derIn = new DerInputStream(derEncoding)... | java | private byte[] decode(DerInputStream in) throws IOException {
DerValue val = in.getDerValue();
// save the DER encoding with its proper tag byte.
byte[] derEncoding = val.toByteArray();
derEncoding[0] = DerValue.tag_SetOf;
DerInputStream derIn = new DerInputStream(derEncoding)... | [
"private",
"byte",
"[",
"]",
"decode",
"(",
"DerInputStream",
"in",
")",
"throws",
"IOException",
"{",
"DerValue",
"val",
"=",
"in",
".",
"getDerValue",
"(",
")",
";",
"// save the DER encoding with its proper tag byte.",
"byte",
"[",
"]",
"derEncoding",
"=",
"v... | Decode this set of PKCS9 attributes from the contents of its
DER encoding. Ignores unsupported attributes when directed.
@param in
the contents of the DER encoding of the attribute set.
@exception IOException
on i/o error, encoding syntax error, unacceptable or
unsupported attribute, or duplicate attribute. | [
"Decode",
"this",
"set",
"of",
"PKCS9",
"attributes",
"from",
"the",
"contents",
"of",
"its",
"DER",
"encoding",
".",
"Ignores",
"unsupported",
"attributes",
"when",
"directed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java#L186-L227 |
34,848 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java | PKCS9Attributes.encode | public void encode(byte tag, OutputStream out) throws IOException {
out.write(tag);
out.write(derEncoding, 1, derEncoding.length -1);
} | java | public void encode(byte tag, OutputStream out) throws IOException {
out.write(tag);
out.write(derEncoding, 1, derEncoding.length -1);
} | [
"public",
"void",
"encode",
"(",
"byte",
"tag",
",",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"write",
"(",
"tag",
")",
";",
"out",
".",
"write",
"(",
"derEncoding",
",",
"1",
",",
"derEncoding",
".",
"length",
"-",
"1",
... | Put the DER encoding of this PKCS9 attribute set on an
DerOutputStream, tagged with the given implicit tag.
@param tag the implicit tag to use in the DER encoding.
@param out the output stream on which to put the DER encoding.
@exception IOException on output error. | [
"Put",
"the",
"DER",
"encoding",
"of",
"this",
"PKCS9",
"attribute",
"set",
"on",
"an",
"DerOutputStream",
"tagged",
"with",
"the",
"given",
"implicit",
"tag",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java#L238-L241 |
34,849 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java | PKCS9Attributes.getAttributes | public PKCS9Attribute[] getAttributes() {
PKCS9Attribute[] attribs = new PKCS9Attribute[attributes.size()];
ObjectIdentifier oid;
int j = 0;
for (int i=1; i < PKCS9Attribute.PKCS9_OIDS.length &&
j < attribs.length; i++) {
attribs[j] = getAttribute(PKCS9... | java | public PKCS9Attribute[] getAttributes() {
PKCS9Attribute[] attribs = new PKCS9Attribute[attributes.size()];
ObjectIdentifier oid;
int j = 0;
for (int i=1; i < PKCS9Attribute.PKCS9_OIDS.length &&
j < attribs.length; i++) {
attribs[j] = getAttribute(PKCS9... | [
"public",
"PKCS9Attribute",
"[",
"]",
"getAttributes",
"(",
")",
"{",
"PKCS9Attribute",
"[",
"]",
"attribs",
"=",
"new",
"PKCS9Attribute",
"[",
"attributes",
".",
"size",
"(",
")",
"]",
";",
"ObjectIdentifier",
"oid",
";",
"int",
"j",
"=",
"0",
";",
"for... | Get an array of all attributes in this set, in order of OID. | [
"Get",
"an",
"array",
"of",
"all",
"attributes",
"in",
"this",
"set",
"in",
"order",
"of",
"OID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java#L279-L292 |
34,850 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java | PKCS9Attributes.getAttributeValue | public Object getAttributeValue(ObjectIdentifier oid)
throws IOException {
try {
Object value = getAttribute(oid).getValue();
return value;
} catch (NullPointerException ex) {
throw new IOException("No value found for attribute " + oid);
}
} | java | public Object getAttributeValue(ObjectIdentifier oid)
throws IOException {
try {
Object value = getAttribute(oid).getValue();
return value;
} catch (NullPointerException ex) {
throw new IOException("No value found for attribute " + oid);
}
} | [
"public",
"Object",
"getAttributeValue",
"(",
"ObjectIdentifier",
"oid",
")",
"throws",
"IOException",
"{",
"try",
"{",
"Object",
"value",
"=",
"getAttribute",
"(",
"oid",
")",
".",
"getValue",
"(",
")",
";",
"return",
"value",
";",
"}",
"catch",
"(",
"Nul... | Get an attribute value by OID. | [
"Get",
"an",
"attribute",
"value",
"by",
"OID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java#L297-L306 |
34,851 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java | PKCS9Attributes.getAttributeValue | public Object getAttributeValue(String name) throws IOException {
ObjectIdentifier oid = PKCS9Attribute.getOID(name);
if (oid == null)
throw new IOException("Attribute name " + name +
" not recognized or not supported.");
return getAttributeValue(o... | java | public Object getAttributeValue(String name) throws IOException {
ObjectIdentifier oid = PKCS9Attribute.getOID(name);
if (oid == null)
throw new IOException("Attribute name " + name +
" not recognized or not supported.");
return getAttributeValue(o... | [
"public",
"Object",
"getAttributeValue",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"ObjectIdentifier",
"oid",
"=",
"PKCS9Attribute",
".",
"getOID",
"(",
"name",
")",
";",
"if",
"(",
"oid",
"==",
"null",
")",
"throw",
"new",
"IOException",
"("... | Get an attribute value by type name. | [
"Get",
"an",
"attribute",
"value",
"by",
"type",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/pkcs/PKCS9Attributes.java#L311-L319 |
34,852 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GregorianCalendar.java | GregorianCalendar.roll | public void roll(int field, int amount) {
switch (field) {
case WEEK_OF_YEAR:
{
// Unlike WEEK_OF_MONTH, WEEK_OF_YEAR never shifts the day of the
// week. Also, rolling the week of the year can have seemingly
// strange effects simply because... | java | public void roll(int field, int amount) {
switch (field) {
case WEEK_OF_YEAR:
{
// Unlike WEEK_OF_MONTH, WEEK_OF_YEAR never shifts the day of the
// week. Also, rolling the week of the year can have seemingly
// strange effects simply because... | [
"public",
"void",
"roll",
"(",
"int",
"field",
",",
"int",
"amount",
")",
"{",
"switch",
"(",
"field",
")",
"{",
"case",
"WEEK_OF_YEAR",
":",
"{",
"// Unlike WEEK_OF_MONTH, WEEK_OF_YEAR never shifts the day of the",
"// week. Also, rolling the week of the year can have see... | Roll a field by a signed amount. | [
"Roll",
"a",
"field",
"by",
"a",
"signed",
"amount",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GregorianCalendar.java#L538-L590 |
34,853 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GregorianCalendar.java | GregorianCalendar.getActualMaximum | public int getActualMaximum(int field) {
/* It is a known limitation that the code here (and in getActualMinimum)
* won't behave properly at the extreme limits of GregorianCalendar's
* representable range (except for the code that handles the YEAR
* field). That's because the ends of... | java | public int getActualMaximum(int field) {
/* It is a known limitation that the code here (and in getActualMinimum)
* won't behave properly at the extreme limits of GregorianCalendar's
* representable range (except for the code that handles the YEAR
* field). That's because the ends of... | [
"public",
"int",
"getActualMaximum",
"(",
"int",
"field",
")",
"{",
"/* It is a known limitation that the code here (and in getActualMinimum)\n * won't behave properly at the extreme limits of GregorianCalendar's\n * representable range (except for the code that handles the YEAR\n ... | Return the maximum value that this field could have, given the current date.
For example, with the date "Feb 3, 1997" and the DAY_OF_MONTH field, the actual
maximum would be 28; for "Feb 3, 1996" it s 29. Similarly for a Hebrew calendar,
for some years the actual maximum for MONTH is 12, and for others 13. | [
"Return",
"the",
"maximum",
"value",
"that",
"this",
"field",
"could",
"have",
"given",
"the",
"current",
"date",
".",
"For",
"example",
"with",
"the",
"date",
"Feb",
"3",
"1997",
"and",
"the",
"DAY_OF_MONTH",
"field",
"the",
"actual",
"maximum",
"would",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GregorianCalendar.java#L606-L677 |
34,854 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/KeyChecker.java | KeyChecker.check | @Override
public void check(Certificate cert, Collection<String> unresCritExts)
throws CertPathValidatorException
{
X509Certificate currCert = (X509Certificate)cert;
remainingCerts--;
// if final certificate, check that target constraints are satisfied
if (remainingCert... | java | @Override
public void check(Certificate cert, Collection<String> unresCritExts)
throws CertPathValidatorException
{
X509Certificate currCert = (X509Certificate)cert;
remainingCerts--;
// if final certificate, check that target constraints are satisfied
if (remainingCert... | [
"@",
"Override",
"public",
"void",
"check",
"(",
"Certificate",
"cert",
",",
"Collection",
"<",
"String",
">",
"unresCritExts",
")",
"throws",
"CertPathValidatorException",
"{",
"X509Certificate",
"currCert",
"=",
"(",
"X509Certificate",
")",
"cert",
";",
"remaini... | Checks that keyUsage and target constraints are satisfied by
the specified certificate.
@param cert the Certificate
@param unresolvedCritExts the unresolved critical extensions
@throws CertPathValidatorException if certificate does not verify | [
"Checks",
"that",
"keyUsage",
"and",
"target",
"constraints",
"are",
"satisfied",
"by",
"the",
"specified",
"certificate",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/KeyChecker.java#L105-L131 |
34,855 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/Autoboxer.java | Autoboxer.unbox | private void unbox(Expression expr, PrimitiveType primitiveType) {
TypeElement boxedClass = findBoxedSuperclass(expr.getTypeMirror());
if (primitiveType == null && boxedClass != null) {
primitiveType = typeUtil.unboxedType(boxedClass.asType());
}
if (primitiveType == null) {
return;
}
... | java | private void unbox(Expression expr, PrimitiveType primitiveType) {
TypeElement boxedClass = findBoxedSuperclass(expr.getTypeMirror());
if (primitiveType == null && boxedClass != null) {
primitiveType = typeUtil.unboxedType(boxedClass.asType());
}
if (primitiveType == null) {
return;
}
... | [
"private",
"void",
"unbox",
"(",
"Expression",
"expr",
",",
"PrimitiveType",
"primitiveType",
")",
"{",
"TypeElement",
"boxedClass",
"=",
"findBoxedSuperclass",
"(",
"expr",
".",
"getTypeMirror",
"(",
")",
")",
";",
"if",
"(",
"primitiveType",
"==",
"null",
"&... | Convert a wrapper class instance to a specified primitive equivalent. | [
"Convert",
"a",
"wrapper",
"class",
"instance",
"to",
"a",
"specified",
"primitive",
"equivalent",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/Autoboxer.java#L121-L135 |
34,856 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Integer.java | Integer.getInteger | public static Integer getInteger(String nm, int val) {
Integer result = getInteger(nm, null);
return (result == null) ? Integer.valueOf(val) : result;
} | java | public static Integer getInteger(String nm, int val) {
Integer result = getInteger(nm, null);
return (result == null) ? Integer.valueOf(val) : result;
} | [
"public",
"static",
"Integer",
"getInteger",
"(",
"String",
"nm",
",",
"int",
"val",
")",
"{",
"Integer",
"result",
"=",
"getInteger",
"(",
"nm",
",",
"null",
")",
";",
"return",
"(",
"result",
"==",
"null",
")",
"?",
"Integer",
".",
"valueOf",
"(",
... | Determines the integer value of the system property with the
specified name.
<p>The first argument is treated as the name of a system
property. System properties are accessible through the {@link
java.lang.System#getProperty(java.lang.String)} method. The
string value of this property is then interpreted as an intege... | [
"Determines",
"the",
"integer",
"value",
"of",
"the",
"system",
"property",
"with",
"the",
"specified",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Integer.java#L856-L859 |
34,857 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java | DateFormat.format | @Override
public final StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition fieldPosition)
{
if (obj instanceof Calendar)
return format( (Calendar)obj, toAppendTo, fieldPosition );
else if (obj instanceof Date)
return... | java | @Override
public final StringBuffer format(Object obj, StringBuffer toAppendTo,
FieldPosition fieldPosition)
{
if (obj instanceof Calendar)
return format( (Calendar)obj, toAppendTo, fieldPosition );
else if (obj instanceof Date)
return... | [
"@",
"Override",
"public",
"final",
"StringBuffer",
"format",
"(",
"Object",
"obj",
",",
"StringBuffer",
"toAppendTo",
",",
"FieldPosition",
"fieldPosition",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"Calendar",
")",
"return",
"format",
"(",
"(",
"Calendar",
"... | Formats a time object into a time string. Examples of time objects
are a time value expressed in milliseconds and a Date object.
@param obj must be a Number or a Date or a Calendar.
@param toAppendTo the string buffer for the returning time string.
@return the formatted time string.
@param fieldPosition keeps track of ... | [
"Formats",
"a",
"time",
"object",
"into",
"a",
"time",
"string",
".",
"Examples",
"of",
"time",
"objects",
"are",
"a",
"time",
"value",
"expressed",
"in",
"milliseconds",
"and",
"a",
"Date",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java#L549-L563 |
34,858 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java | DateFormat.getDateInstance | public final static DateFormat getDateInstance(int style,
Locale aLocale)
{
return get(style, -1, ULocale.forLocale(aLocale), null);
} | java | public final static DateFormat getDateInstance(int style,
Locale aLocale)
{
return get(style, -1, ULocale.forLocale(aLocale), null);
} | [
"public",
"final",
"static",
"DateFormat",
"getDateInstance",
"(",
"int",
"style",
",",
"Locale",
"aLocale",
")",
"{",
"return",
"get",
"(",
"style",
",",
"-",
"1",
",",
"ULocale",
".",
"forLocale",
"(",
"aLocale",
")",
",",
"null",
")",
";",
"}"
] | Returns the date formatter with the given formatting style
for the given locale.
@param style the given formatting style. For example,
SHORT for "M/d/yy" in the US locale. As currently implemented, relative date
formatting only affects a limited range of calendar days before or after the
current date, based on the CLDR... | [
"Returns",
"the",
"date",
"formatter",
"with",
"the",
"given",
"formatting",
"style",
"for",
"the",
"given",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java#L1316-L1320 |
34,859 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java | DateFormat.setBooleanAttribute | public DateFormat setBooleanAttribute(BooleanAttribute key, boolean value)
{
if(key.equals(DateFormat.BooleanAttribute.PARSE_PARTIAL_MATCH)) {
key = DateFormat.BooleanAttribute.PARSE_PARTIAL_LITERAL_MATCH;
}
if(value)
{
booleanAttributes.add(key);
}
... | java | public DateFormat setBooleanAttribute(BooleanAttribute key, boolean value)
{
if(key.equals(DateFormat.BooleanAttribute.PARSE_PARTIAL_MATCH)) {
key = DateFormat.BooleanAttribute.PARSE_PARTIAL_LITERAL_MATCH;
}
if(value)
{
booleanAttributes.add(key);
}
... | [
"public",
"DateFormat",
"setBooleanAttribute",
"(",
"BooleanAttribute",
"key",
",",
"boolean",
"value",
")",
"{",
"if",
"(",
"key",
".",
"equals",
"(",
"DateFormat",
".",
"BooleanAttribute",
".",
"PARSE_PARTIAL_MATCH",
")",
")",
"{",
"key",
"=",
"DateFormat",
... | Sets a boolean attribute for this instance. Aspects of DateFormat leniency are controlled by
boolean attributes.
@see BooleanAttribute | [
"Sets",
"a",
"boolean",
"attribute",
"for",
"this",
"instance",
".",
"Aspects",
"of",
"DateFormat",
"leniency",
"are",
"controlled",
"by",
"boolean",
"attributes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java#L1564-L1579 |
34,860 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java | DateFormat.getBooleanAttribute | public boolean getBooleanAttribute(BooleanAttribute key)
{
if(key == DateFormat.BooleanAttribute.PARSE_PARTIAL_MATCH) {
key = DateFormat.BooleanAttribute.PARSE_PARTIAL_LITERAL_MATCH;
}
return booleanAttributes.contains(key);
} | java | public boolean getBooleanAttribute(BooleanAttribute key)
{
if(key == DateFormat.BooleanAttribute.PARSE_PARTIAL_MATCH) {
key = DateFormat.BooleanAttribute.PARSE_PARTIAL_LITERAL_MATCH;
}
return booleanAttributes.contains(key);
} | [
"public",
"boolean",
"getBooleanAttribute",
"(",
"BooleanAttribute",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"DateFormat",
".",
"BooleanAttribute",
".",
"PARSE_PARTIAL_MATCH",
")",
"{",
"key",
"=",
"DateFormat",
".",
"BooleanAttribute",
".",
"PARSE_PARTIAL_LITERAL_... | Returns the current value for the specified BooleanAttribute for this instance
if attribute is missing false is returned.
@see BooleanAttribute | [
"Returns",
"the",
"current",
"value",
"for",
"the",
"specified",
"BooleanAttribute",
"for",
"this",
"instance"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormat.java#L1588-L1594 |
34,861 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/HasPositionalPredChecker.java | HasPositionalPredChecker.check | public static boolean check(LocPathIterator path)
{
HasPositionalPredChecker hppc = new HasPositionalPredChecker();
path.callVisitors(null, hppc);
return hppc.m_hasPositionalPred;
} | java | public static boolean check(LocPathIterator path)
{
HasPositionalPredChecker hppc = new HasPositionalPredChecker();
path.callVisitors(null, hppc);
return hppc.m_hasPositionalPred;
} | [
"public",
"static",
"boolean",
"check",
"(",
"LocPathIterator",
"path",
")",
"{",
"HasPositionalPredChecker",
"hppc",
"=",
"new",
"HasPositionalPredChecker",
"(",
")",
";",
"path",
".",
"callVisitors",
"(",
"null",
",",
"hppc",
")",
";",
"return",
"hppc",
".",... | Process the LocPathIterator to see if it contains variables
or functions that may make it context dependent.
@param path LocPathIterator that is assumed to be absolute, but needs checking.
@return true if the path is confirmed to be absolute, false if it
may contain context dependencies. | [
"Process",
"the",
"LocPathIterator",
"to",
"see",
"if",
"it",
"contains",
"variables",
"or",
"functions",
"that",
"may",
"make",
"it",
"context",
"dependent",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/HasPositionalPredChecker.java#L50-L55 |
34,862 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Nodes.java | Nodes.emptyNode | @SuppressWarnings("unchecked")
static <T> Node<T> emptyNode(StreamShape shape) {
switch (shape) {
case REFERENCE: return (Node<T>) EMPTY_NODE;
case INT_VALUE: return (Node<T>) EMPTY_INT_NODE;
case LONG_VALUE: return (Node<T>) EMPTY_LONG_NODE;
case DOUB... | java | @SuppressWarnings("unchecked")
static <T> Node<T> emptyNode(StreamShape shape) {
switch (shape) {
case REFERENCE: return (Node<T>) EMPTY_NODE;
case INT_VALUE: return (Node<T>) EMPTY_INT_NODE;
case LONG_VALUE: return (Node<T>) EMPTY_LONG_NODE;
case DOUB... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"static",
"<",
"T",
">",
"Node",
"<",
"T",
">",
"emptyNode",
"(",
"StreamShape",
"shape",
")",
"{",
"switch",
"(",
"shape",
")",
"{",
"case",
"REFERENCE",
":",
"return",
"(",
"Node",
"<",
"T",
">",
... | Produces an empty node whose count is zero, has no children and no content.
@param <T> the type of elements of the created node
@param shape the shape of the node to be created
@return an empty node. | [
"Produces",
"an",
"empty",
"node",
"whose",
"count",
"is",
"zero",
"has",
"no",
"children",
"and",
"no",
"content",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/Nodes.java#L81-L91 |
34,863 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java | USerializedSet.getSet | public final boolean getSet(char src[], int srcStart) {
// leave most argument checking up to Java exceptions
array=null;
arrayOffset=bmpLength=length=0;
length=src[srcStart++];
if ((length&0x8000) != 0) {
/* there are supplementary values */
len... | java | public final boolean getSet(char src[], int srcStart) {
// leave most argument checking up to Java exceptions
array=null;
arrayOffset=bmpLength=length=0;
length=src[srcStart++];
if ((length&0x8000) != 0) {
/* there are supplementary values */
len... | [
"public",
"final",
"boolean",
"getSet",
"(",
"char",
"src",
"[",
"]",
",",
"int",
"srcStart",
")",
"{",
"// leave most argument checking up to Java exceptions",
"array",
"=",
"null",
";",
"arrayOffset",
"=",
"bmpLength",
"=",
"length",
"=",
"0",
";",
"length",
... | Fill in the given serialized set object.
@param src pointer to start of array
@param srcStart pointer to start of serialized data (length value)
@return true if the given array is valid, otherwise false | [
"Fill",
"in",
"the",
"given",
"serialized",
"set",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java#L32-L59 |
34,864 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java | USerializedSet.getRange | public final boolean getRange(int rangeIndex, int[] range) {
if( rangeIndex<0) {
return false;
}
if(array==null){
array = new char[8];
}
if(range==null || range.length <2){
throw new IllegalArgumentException();
}
rangeIndex*=2; ... | java | public final boolean getRange(int rangeIndex, int[] range) {
if( rangeIndex<0) {
return false;
}
if(array==null){
array = new char[8];
}
if(range==null || range.length <2){
throw new IllegalArgumentException();
}
rangeIndex*=2; ... | [
"public",
"final",
"boolean",
"getRange",
"(",
"int",
"rangeIndex",
",",
"int",
"[",
"]",
"range",
")",
"{",
"if",
"(",
"rangeIndex",
"<",
"0",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"array",
"==",
"null",
")",
"{",
"array",
"=",
"new",
... | Returns a range of characters contained in the given serialized
set.
@param rangeIndex a non-negative integer in the range <code>0..
getSerializedRangeCount()-1</code>
@param range variable to receive the data in the range
@return true if rangeIndex is valid, otherwise false | [
"Returns",
"a",
"range",
"of",
"characters",
"contained",
"in",
"the",
"given",
"serialized",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java#L104-L143 |
34,865 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java | USerializedSet.contains | public final boolean contains(int c) {
if(c>0x10ffff) {
return false;
}
if(c<=0xffff) {
int i;
/* find c in the BMP part */
for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
return ((i&1) != 0);
} else {
... | java | public final boolean contains(int c) {
if(c>0x10ffff) {
return false;
}
if(c<=0xffff) {
int i;
/* find c in the BMP part */
for(i=0; i<bmpLength && (char)c>=array[i]; ++i) {}
return ((i&1) != 0);
} else {
... | [
"public",
"final",
"boolean",
"contains",
"(",
"int",
"c",
")",
"{",
"if",
"(",
"c",
">",
"0x10ffff",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"c",
"<=",
"0xffff",
")",
"{",
"int",
"i",
";",
"/* find c in the BMP part */",
"for",
"(",
"i",
... | Returns true if the given USerializedSet contains the given
character.
@param c the character to test for
@return true if set contains c | [
"Returns",
"true",
"if",
"the",
"given",
"USerializedSet",
"contains",
"the",
"given",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/USerializedSet.java#L151-L173 |
34,866 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicStampedReference.java | AtomicStampedReference.set | public void set(V newReference, int newStamp) {
Pair<V> current = pair;
if (newReference != current.reference || newStamp != current.stamp)
this.pair = Pair.of(newReference, newStamp);
} | java | public void set(V newReference, int newStamp) {
Pair<V> current = pair;
if (newReference != current.reference || newStamp != current.stamp)
this.pair = Pair.of(newReference, newStamp);
} | [
"public",
"void",
"set",
"(",
"V",
"newReference",
",",
"int",
"newStamp",
")",
"{",
"Pair",
"<",
"V",
">",
"current",
"=",
"pair",
";",
"if",
"(",
"newReference",
"!=",
"current",
".",
"reference",
"||",
"newStamp",
"!=",
"current",
".",
"stamp",
")",... | Unconditionally sets the value of both the reference and stamp.
@param newReference the new value for the reference
@param newStamp the new value for the stamp | [
"Unconditionally",
"sets",
"the",
"value",
"of",
"both",
"the",
"reference",
"and",
"stamp",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicStampedReference.java#L164-L168 |
34,867 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/spec/EllipticCurve.java | EllipticCurve.checkValidity | private static void checkValidity(ECField field, BigInteger c,
String cName) {
// can only perform check if field is ECFieldFp or ECFieldF2m.
if (field instanceof ECFieldFp) {
BigInteger p = ((ECFieldFp)field).getP();
if (p.compareTo(c) != 1) {
throw new I... | java | private static void checkValidity(ECField field, BigInteger c,
String cName) {
// can only perform check if field is ECFieldFp or ECFieldF2m.
if (field instanceof ECFieldFp) {
BigInteger p = ((ECFieldFp)field).getP();
if (p.compareTo(c) != 1) {
throw new I... | [
"private",
"static",
"void",
"checkValidity",
"(",
"ECField",
"field",
",",
"BigInteger",
"c",
",",
"String",
"cName",
")",
"{",
"// can only perform check if field is ECFieldFp or ECFieldF2m.",
"if",
"(",
"field",
"instanceof",
"ECFieldFp",
")",
"{",
"BigInteger",
"p... | Check coefficient c is a valid element in ECField field. | [
"Check",
"coefficient",
"c",
"is",
"a",
"valid",
"element",
"in",
"ECField",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/spec/EllipticCurve.java#L51-L67 |
34,868 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneRegion.java | ZoneRegion.checkName | private static void checkName(String zoneId) {
int n = zoneId.length();
if (n < 2) {
throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId);
}
for (int i = 0; i < n; i++) {
char c = zoneId.charAt(i);
if (c >= 'a' &&... | java | private static void checkName(String zoneId) {
int n = zoneId.length();
if (n < 2) {
throw new DateTimeException("Invalid ID for region-based ZoneId, invalid format: " + zoneId);
}
for (int i = 0; i < n; i++) {
char c = zoneId.charAt(i);
if (c >= 'a' &&... | [
"private",
"static",
"void",
"checkName",
"(",
"String",
"zoneId",
")",
"{",
"int",
"n",
"=",
"zoneId",
".",
"length",
"(",
")",
";",
"if",
"(",
"n",
"<",
"2",
")",
"{",
"throw",
"new",
"DateTimeException",
"(",
"\"Invalid ID for region-based ZoneId, invalid... | Checks that the given string is a legal ZondId name.
@param zoneId the time-zone ID, not null
@throws DateTimeException if the ID format is invalid | [
"Checks",
"that",
"the",
"given",
"string",
"is",
"a",
"legal",
"ZondId",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneRegion.java#L135-L153 |
34,869 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java | TreeMap.compare | @SuppressWarnings("unchecked")
final int compare(Object k1, Object k2) {
return comparator==null ? ((Comparable<? super K>)k1).compareTo((K)k2)
: comparator.compare((K)k1, (K)k2);
} | java | @SuppressWarnings("unchecked")
final int compare(Object k1, Object k2) {
return comparator==null ? ((Comparable<? super K>)k1).compareTo((K)k2)
: comparator.compare((K)k1, (K)k2);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"final",
"int",
"compare",
"(",
"Object",
"k1",
",",
"Object",
"k2",
")",
"{",
"return",
"comparator",
"==",
"null",
"?",
"(",
"(",
"Comparable",
"<",
"?",
"super",
"K",
">",
")",
"k1",
")",
".",
"c... | Compares two keys using the correct comparison method for this TreeMap. | [
"Compares",
"two",
"keys",
"using",
"the",
"correct",
"comparison",
"method",
"for",
"this",
"TreeMap",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java#L1345-L1349 |
34,870 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java | TreeMap.readTreeSet | void readTreeSet(int size, java.io.ObjectInputStream s, V defaultVal)
throws java.io.IOException, ClassNotFoundException {
buildFromSorted(size, null, s, defaultVal);
} | java | void readTreeSet(int size, java.io.ObjectInputStream s, V defaultVal)
throws java.io.IOException, ClassNotFoundException {
buildFromSorted(size, null, s, defaultVal);
} | [
"void",
"readTreeSet",
"(",
"int",
"size",
",",
"java",
".",
"io",
".",
"ObjectInputStream",
"s",
",",
"V",
"defaultVal",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
",",
"ClassNotFoundException",
"{",
"buildFromSorted",
"(",
"size",
",",
"null",
... | Intended to be called only from TreeSet.readObject | [
"Intended",
"to",
"be",
"called",
"only",
"from",
"TreeSet",
".",
"readObject"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java#L2541-L2544 |
34,871 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java | TreeMap.keySpliteratorFor | static <K> Spliterator<K> keySpliteratorFor(NavigableMap<K,?> m) {
if (m instanceof TreeMap) {
@SuppressWarnings("unchecked") TreeMap<K,Object> t =
(TreeMap<K,Object>) m;
return t.keySpliterator();
}
if (m instanceof DescendingSubMap) {
@Suppre... | java | static <K> Spliterator<K> keySpliteratorFor(NavigableMap<K,?> m) {
if (m instanceof TreeMap) {
@SuppressWarnings("unchecked") TreeMap<K,Object> t =
(TreeMap<K,Object>) m;
return t.keySpliterator();
}
if (m instanceof DescendingSubMap) {
@Suppre... | [
"static",
"<",
"K",
">",
"Spliterator",
"<",
"K",
">",
"keySpliteratorFor",
"(",
"NavigableMap",
"<",
"K",
",",
"?",
">",
"m",
")",
"{",
"if",
"(",
"m",
"instanceof",
"TreeMap",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"TreeMap",
"... | Currently, we support Spliterator-based versions only for the
full map, in either plain of descending form, otherwise relying
on defaults because size estimation for submaps would dominate
costs. The type tests needed to check these for key views are
not very nice but avoid disrupting existing class
structures. Callers... | [
"Currently",
"we",
"support",
"Spliterator",
"-",
"based",
"versions",
"only",
"for",
"the",
"full",
"map",
"in",
"either",
"plain",
"of",
"descending",
"form",
"otherwise",
"relying",
"on",
"defaults",
"because",
"size",
"estimation",
"for",
"submaps",
"would",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/TreeMap.java#L2700-L2719 |
34,872 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringPrep.java | StringPrep.getInstance | public static StringPrep getInstance(int profile) {
if (profile < 0 || profile > MAX_PROFILE) {
throw new IllegalArgumentException("Bad profile type");
}
StringPrep instance = null;
// A StringPrep instance is immutable. We use a single instance
// per type and sto... | java | public static StringPrep getInstance(int profile) {
if (profile < 0 || profile > MAX_PROFILE) {
throw new IllegalArgumentException("Bad profile type");
}
StringPrep instance = null;
// A StringPrep instance is immutable. We use a single instance
// per type and sto... | [
"public",
"static",
"StringPrep",
"getInstance",
"(",
"int",
"profile",
")",
"{",
"if",
"(",
"profile",
"<",
"0",
"||",
"profile",
">",
"MAX_PROFILE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Bad profile type\"",
")",
";",
"}",
"StringPrep... | Gets a StringPrep instance for the specified profile
@param profile The profile passed to find the StringPrep instance. | [
"Gets",
"a",
"StringPrep",
"instance",
"for",
"the",
"specified",
"profile"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringPrep.java#L295-L325 |
34,873 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertPath.java | X509CertPath.parsePKIPATH | private static List<X509Certificate> parsePKIPATH(InputStream is)
throws CertificateException {
List<X509Certificate> certList = null;
CertificateFactory certFac = null;
if (is == null) {
throw new CertificateException("input stream is null");
}
try {
... | java | private static List<X509Certificate> parsePKIPATH(InputStream is)
throws CertificateException {
List<X509Certificate> certList = null;
CertificateFactory certFac = null;
if (is == null) {
throw new CertificateException("input stream is null");
}
try {
... | [
"private",
"static",
"List",
"<",
"X509Certificate",
">",
"parsePKIPATH",
"(",
"InputStream",
"is",
")",
"throws",
"CertificateException",
"{",
"List",
"<",
"X509Certificate",
">",
"certList",
"=",
"null",
";",
"CertificateFactory",
"certFac",
"=",
"null",
";",
... | Parse a PKIPATH format CertPath from an InputStream. Return an
unmodifiable List of the certificates.
@param is the <code>InputStream</code> to read the data from
@return an unmodifiable List of the certificates
@exception CertificateException if an exception occurs | [
"Parse",
"a",
"PKIPATH",
"format",
"CertPath",
"from",
"an",
"InputStream",
".",
"Return",
"an",
"unmodifiable",
"List",
"of",
"the",
"certificates",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertPath.java#L176-L207 |
34,874 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertPath.java | X509CertPath.encodePKIPATH | private byte[] encodePKIPATH() throws CertificateEncodingException {
ListIterator<X509Certificate> li = certs.listIterator(certs.size());
try {
DerOutputStream bytes = new DerOutputStream();
// encode certs in reverse order (trust anchor to target)
// according to Pk... | java | private byte[] encodePKIPATH() throws CertificateEncodingException {
ListIterator<X509Certificate> li = certs.listIterator(certs.size());
try {
DerOutputStream bytes = new DerOutputStream();
// encode certs in reverse order (trust anchor to target)
// according to Pk... | [
"private",
"byte",
"[",
"]",
"encodePKIPATH",
"(",
")",
"throws",
"CertificateEncodingException",
"{",
"ListIterator",
"<",
"X509Certificate",
">",
"li",
"=",
"certs",
".",
"listIterator",
"(",
"certs",
".",
"size",
"(",
")",
")",
";",
"try",
"{",
"DerOutput... | Encode the CertPath using PKIPATH format.
@return a byte array containing the binary encoding of the PkiPath object
@exception CertificateEncodingException if an exception occurs | [
"Encode",
"the",
"CertPath",
"using",
"PKIPATH",
"format",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertPath.java#L287-L315 |
34,875 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertPath.java | X509CertPath.getEncoded | @Override
public byte[] getEncoded(String encoding)
throws CertificateEncodingException {
switch (encoding) {
case PKIPATH_ENCODING:
return encodePKIPATH();
case PKCS7_ENCODING:
return encodePKCS7();
default:
thr... | java | @Override
public byte[] getEncoded(String encoding)
throws CertificateEncodingException {
switch (encoding) {
case PKIPATH_ENCODING:
return encodePKIPATH();
case PKCS7_ENCODING:
return encodePKCS7();
default:
thr... | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"getEncoded",
"(",
"String",
"encoding",
")",
"throws",
"CertificateEncodingException",
"{",
"switch",
"(",
"encoding",
")",
"{",
"case",
"PKIPATH_ENCODING",
":",
"return",
"encodePKIPATH",
"(",
")",
";",
"case",
"P... | Returns the encoded form of this certification path, using the
specified encoding.
@param encoding the name of the encoding to use
@return the encoded bytes
@exception CertificateEncodingException if an encoding error occurs or
the encoding requested is not supported | [
"Returns",
"the",
"encoded",
"form",
"of",
"this",
"certification",
"path",
"using",
"the",
"specified",
"encoding",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/X509CertPath.java#L346-L357 |
34,876 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java | ReferenceQueue.enqueueLocked | private boolean enqueueLocked(Reference<? extends T> r) {
// Verify the reference has not already been enqueued.
if (r.queueNext != null) {
return false;
}
/* J2ObjC removed.
if (r instanceof Cleaner) {
// If this reference is a Cleaner, then simply invok... | java | private boolean enqueueLocked(Reference<? extends T> r) {
// Verify the reference has not already been enqueued.
if (r.queueNext != null) {
return false;
}
/* J2ObjC removed.
if (r instanceof Cleaner) {
// If this reference is a Cleaner, then simply invok... | [
"private",
"boolean",
"enqueueLocked",
"(",
"Reference",
"<",
"?",
"extends",
"T",
">",
"r",
")",
"{",
"// Verify the reference has not already been enqueued.",
"if",
"(",
"r",
".",
"queueNext",
"!=",
"null",
")",
"{",
"return",
"false",
";",
"}",
"/* J2ObjC rem... | Enqueue the given reference onto this queue.
The caller is responsible for ensuring the lock is held on this queue,
and for calling notifyAll on this queue after the reference has been
enqueued. Returns true if the reference was enqueued successfully,
false if the reference had already been enqueued.
@GuardedBy("lock") | [
"Enqueue",
"the",
"given",
"reference",
"onto",
"this",
"queue",
".",
"The",
"caller",
"is",
"responsible",
"for",
"ensuring",
"the",
"lock",
"is",
"held",
"on",
"this",
"queue",
"and",
"for",
"calling",
"notifyAll",
"on",
"this",
"queue",
"after",
"the",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java#L67-L96 |
34,877 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java | ReferenceQueue.isEnqueued | boolean isEnqueued(Reference<? extends T> reference) {
synchronized (lock) {
return reference.queueNext != null && reference.queueNext != sQueueNextUnenqueued;
}
} | java | boolean isEnqueued(Reference<? extends T> reference) {
synchronized (lock) {
return reference.queueNext != null && reference.queueNext != sQueueNextUnenqueued;
}
} | [
"boolean",
"isEnqueued",
"(",
"Reference",
"<",
"?",
"extends",
"T",
">",
"reference",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"return",
"reference",
".",
"queueNext",
"!=",
"null",
"&&",
"reference",
".",
"queueNext",
"!=",
"sQueueNextUnenqueued",
... | Test if the given reference object has been enqueued but not yet
removed from the queue, assuming this is the reference object's queue. | [
"Test",
"if",
"the",
"given",
"reference",
"object",
"has",
"been",
"enqueued",
"but",
"not",
"yet",
"removed",
"from",
"the",
"queue",
"assuming",
"this",
"is",
"the",
"reference",
"object",
"s",
"queue",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java#L102-L106 |
34,878 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java | ReferenceQueue.enqueue | boolean enqueue(Reference<? extends T> reference) {
synchronized (lock) {
if (enqueueLocked(reference)) {
lock.notifyAll();
return true;
}
return false;
}
} | java | boolean enqueue(Reference<? extends T> reference) {
synchronized (lock) {
if (enqueueLocked(reference)) {
lock.notifyAll();
return true;
}
return false;
}
} | [
"boolean",
"enqueue",
"(",
"Reference",
"<",
"?",
"extends",
"T",
">",
"reference",
")",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"enqueueLocked",
"(",
"reference",
")",
")",
"{",
"lock",
".",
"notifyAll",
"(",
")",
";",
"return",
"true",... | Enqueue the reference object on the receiver.
@param reference
reference object to be enqueued.
@return true if the reference was enqueued. | [
"Enqueue",
"the",
"reference",
"object",
"on",
"the",
"receiver",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java#L115-L123 |
34,879 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java | ReferenceQueue.remove | public Reference<? extends T> remove(long timeout)
throws IllegalArgumentException, InterruptedException
{
if (timeout < 0) {
throw new IllegalArgumentException("Negative timeout value");
}
synchronized (lock) {
Reference<? extends T> r = reallyPollLocked();
... | java | public Reference<? extends T> remove(long timeout)
throws IllegalArgumentException, InterruptedException
{
if (timeout < 0) {
throw new IllegalArgumentException("Negative timeout value");
}
synchronized (lock) {
Reference<? extends T> r = reallyPollLocked();
... | [
"public",
"Reference",
"<",
"?",
"extends",
"T",
">",
"remove",
"(",
"long",
"timeout",
")",
"throws",
"IllegalArgumentException",
",",
"InterruptedException",
"{",
"if",
"(",
"timeout",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"N... | Removes the next reference object in this queue, blocking until either
one becomes available or the given timeout period expires.
<p> This method does not offer real-time guarantees: It schedules the
timeout as if by invoking the {@link Object#wait(long)} method.
@param timeout If positive, block for up to <code>ti... | [
"Removes",
"the",
"next",
"reference",
"object",
"in",
"this",
"queue",
"blocking",
"until",
"either",
"one",
"becomes",
"available",
"or",
"the",
"given",
"timeout",
"period",
"expires",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/ref/ReferenceQueue.java#L182-L204 |
34,880 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedWriter.java | PipedWriter.flush | public synchronized void flush() throws IOException {
if (sink != null) {
if (sink.closedByReader || closed) {
throw new IOException("Pipe closed");
}
synchronized (sink) {
sink.notifyAll();
}
}
} | java | public synchronized void flush() throws IOException {
if (sink != null) {
if (sink.closedByReader || closed) {
throw new IOException("Pipe closed");
}
synchronized (sink) {
sink.notifyAll();
}
}
} | [
"public",
"synchronized",
"void",
"flush",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"sink",
"!=",
"null",
")",
"{",
"if",
"(",
"sink",
".",
"closedByReader",
"||",
"closed",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Pipe closed\"",
")",
... | Flushes this output stream and forces any buffered output characters
to be written out.
This will notify any readers that characters are waiting in the pipe.
@exception IOException if the pipe is closed, or an I/O error occurs. | [
"Flushes",
"this",
"output",
"stream",
"and",
"forces",
"any",
"buffered",
"output",
"characters",
"to",
"be",
"written",
"out",
".",
"This",
"will",
"notify",
"any",
"readers",
"that",
"characters",
"are",
"waiting",
"in",
"the",
"pipe",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedWriter.java#L160-L169 |
34,881 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java | ULocale.getDefault | public static ULocale getDefault(Category category) {
synchronized (ULocale.class) {
int idx = category.ordinal();
if (defaultCategoryULocales[idx] == null) {
// Just in case this method is called during ULocale class
// initialization. Unlike getDefault()... | java | public static ULocale getDefault(Category category) {
synchronized (ULocale.class) {
int idx = category.ordinal();
if (defaultCategoryULocales[idx] == null) {
// Just in case this method is called during ULocale class
// initialization. Unlike getDefault()... | [
"public",
"static",
"ULocale",
"getDefault",
"(",
"Category",
"category",
")",
"{",
"synchronized",
"(",
"ULocale",
".",
"class",
")",
"{",
"int",
"idx",
"=",
"category",
".",
"ordinal",
"(",
")",
";",
"if",
"(",
"defaultCategoryULocales",
"[",
"idx",
"]",... | Returns the current default ULocale for the specified category.
@param category the category
@return the default ULocale for the specified category. | [
"Returns",
"the",
"current",
"default",
"ULocale",
"for",
"the",
"specified",
"category",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L656-L701 |
34,882 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java | ULocale.appendTag | private static void appendTag(String tag, StringBuilder buffer) {
if (buffer.length() != 0) {
buffer.append(UNDERSCORE);
}
buffer.append(tag);
} | java | private static void appendTag(String tag, StringBuilder buffer) {
if (buffer.length() != 0) {
buffer.append(UNDERSCORE);
}
buffer.append(tag);
} | [
"private",
"static",
"void",
"appendTag",
"(",
"String",
"tag",
",",
"StringBuilder",
"buffer",
")",
"{",
"if",
"(",
"buffer",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"UNDERSCORE",
")",
";",
"}",
"buffer",
".",
"ap... | Append a tag to a StringBuilder, adding the separator if necessary.The tag must
not be a zero-length string.
@param tag The tag to add.
@param buffer The output buffer. | [
"Append",
"a",
"tag",
"to",
"a",
"StringBuilder",
"adding",
"the",
"separator",
"if",
"necessary",
".",
"The",
"tag",
"must",
"not",
"be",
"a",
"zero",
"-",
"length",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L2603-L2609 |
34,883 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java | ULocale.createTagString | private static String createTagString(String lang, String script, String region,
String trailing, String alternateTags) {
LocaleIDParser parser = null;
boolean regionAppended = false;
StringBuilder tag = new StringBuilder();
if (!isEmptyString(lang)) {
appendTa... | java | private static String createTagString(String lang, String script, String region,
String trailing, String alternateTags) {
LocaleIDParser parser = null;
boolean regionAppended = false;
StringBuilder tag = new StringBuilder();
if (!isEmptyString(lang)) {
appendTa... | [
"private",
"static",
"String",
"createTagString",
"(",
"String",
"lang",
",",
"String",
"script",
",",
"String",
"region",
",",
"String",
"trailing",
",",
"String",
"alternateTags",
")",
"{",
"LocaleIDParser",
"parser",
"=",
"null",
";",
"boolean",
"regionAppend... | Create a tag string from the supplied parameters. The lang, script and region
parameters may be null references.
If any of the language, script or region parameters are empty, and the alternateTags
parameter is not null, it will be parsed for potential language, script and region tags
to be used when constructing the... | [
"Create",
"a",
"tag",
"string",
"from",
"the",
"supplied",
"parameters",
".",
"The",
"lang",
"script",
"and",
"region",
"parameters",
"may",
"be",
"null",
"references",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L2627-L2753 |
34,884 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java | ULocale.createTagString | static String createTagString(String lang, String script, String region, String trailing) {
return createTagString(lang, script, region, trailing, null);
} | java | static String createTagString(String lang, String script, String region, String trailing) {
return createTagString(lang, script, region, trailing, null);
} | [
"static",
"String",
"createTagString",
"(",
"String",
"lang",
",",
"String",
"script",
",",
"String",
"region",
",",
"String",
"trailing",
")",
"{",
"return",
"createTagString",
"(",
"lang",
",",
"script",
",",
"region",
",",
"trailing",
",",
"null",
")",
... | Create a tag string from the supplied parameters. The lang, script and region
parameters may be null references.If the lang parameter is an empty string, the
default value for an unknown language is written to the output buffer.
@param lang The language tag to use.
@param script The script tag to use.
@param region T... | [
"Create",
"a",
"tag",
"string",
"from",
"the",
"supplied",
"parameters",
".",
"The",
"lang",
"script",
"and",
"region",
"parameters",
"may",
"be",
"null",
"references",
".",
"If",
"the",
"lang",
"parameter",
"is",
"an",
"empty",
"string",
"the",
"default",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L2766-L2768 |
34,885 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java | ULocale.parseTagString | private static int parseTagString(String localeID, String tags[]) {
LocaleIDParser parser = new LocaleIDParser(localeID);
String lang = parser.getLanguage();
String script = parser.getScript();
String region = parser.getCountry();
if (isEmptyString(lang)) {
tags[0] ... | java | private static int parseTagString(String localeID, String tags[]) {
LocaleIDParser parser = new LocaleIDParser(localeID);
String lang = parser.getLanguage();
String script = parser.getScript();
String region = parser.getCountry();
if (isEmptyString(lang)) {
tags[0] ... | [
"private",
"static",
"int",
"parseTagString",
"(",
"String",
"localeID",
",",
"String",
"tags",
"[",
"]",
")",
"{",
"LocaleIDParser",
"parser",
"=",
"new",
"LocaleIDParser",
"(",
"localeID",
")",
";",
"String",
"lang",
"=",
"parser",
".",
"getLanguage",
"(",... | Parse the language, script, and region subtags from a tag string, and return the results.
This function does not return the canonical strings for the unknown script and region.
@param localeID The locale ID to parse.
@param tags An array of three String references to return the subtag strings.
@return The number of c... | [
"Parse",
"the",
"language",
"script",
"and",
"region",
"subtags",
"from",
"a",
"tag",
"string",
"and",
"return",
"the",
"results",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L2779-L2833 |
34,886 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/TreeConverter.java | TreeConverter.convertWithoutParens | private Expression convertWithoutParens(ExpressionTree condition, TreePath parent) {
Expression result = (Expression) convert(condition, parent);
if (result.getKind() == TreeNode.Kind.PARENTHESIZED_EXPRESSION) {
result = TreeUtil.remove(((ParenthesizedExpression) result).getExpression());
}
return... | java | private Expression convertWithoutParens(ExpressionTree condition, TreePath parent) {
Expression result = (Expression) convert(condition, parent);
if (result.getKind() == TreeNode.Kind.PARENTHESIZED_EXPRESSION) {
result = TreeUtil.remove(((ParenthesizedExpression) result).getExpression());
}
return... | [
"private",
"Expression",
"convertWithoutParens",
"(",
"ExpressionTree",
"condition",
",",
"TreePath",
"parent",
")",
"{",
"Expression",
"result",
"=",
"(",
"Expression",
")",
"convert",
"(",
"condition",
",",
"parent",
")",
";",
"if",
"(",
"result",
".",
"getK... | javac uses a ParenthesizedExpression for the if, do, and while statements, while JDT doesn't. | [
"javac",
"uses",
"a",
"ParenthesizedExpression",
"for",
"the",
"if",
"do",
"and",
"while",
"statements",
"while",
"JDT",
"doesn",
"t",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/TreeConverter.java#L1502-L1508 |
34,887 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/TreeConverter.java | TreeConverter.getNamePosition | private SourcePosition getNamePosition(Tree node) {
int start = (int) sourcePositions.getStartPosition(unit, node);
if (start == -1) {
return SourcePosition.NO_POSITION;
}
String src = newUnit.getSource();
Kind kind = node.getKind();
if (kind == Kind.ANNOTATION_TYPE
|| kind == Kind... | java | private SourcePosition getNamePosition(Tree node) {
int start = (int) sourcePositions.getStartPosition(unit, node);
if (start == -1) {
return SourcePosition.NO_POSITION;
}
String src = newUnit.getSource();
Kind kind = node.getKind();
if (kind == Kind.ANNOTATION_TYPE
|| kind == Kind... | [
"private",
"SourcePosition",
"getNamePosition",
"(",
"Tree",
"node",
")",
"{",
"int",
"start",
"=",
"(",
"int",
")",
"sourcePositions",
".",
"getStartPosition",
"(",
"unit",
",",
"node",
")",
";",
"if",
"(",
"start",
"==",
"-",
"1",
")",
"{",
"return",
... | Return best guess for the position of a declaration node's name. | [
"Return",
"best",
"guess",
"for",
"the",
"position",
"of",
"a",
"declaration",
"node",
"s",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/TreeConverter.java#L1520-L1544 |
34,888 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/OcniExtractor.java | OcniExtractor.findBlockComments | private static ListMultimap<TreeNode, Comment> findBlockComments(CompilationUnit unit) {
ListMultimap<TreeNode, Comment> blockComments =
MultimapBuilder.hashKeys().arrayListValues().build();
for (Comment comment : unit.getCommentList()) {
if (!comment.isBlockComment()) {
continue;
}
... | java | private static ListMultimap<TreeNode, Comment> findBlockComments(CompilationUnit unit) {
ListMultimap<TreeNode, Comment> blockComments =
MultimapBuilder.hashKeys().arrayListValues().build();
for (Comment comment : unit.getCommentList()) {
if (!comment.isBlockComment()) {
continue;
}
... | [
"private",
"static",
"ListMultimap",
"<",
"TreeNode",
",",
"Comment",
">",
"findBlockComments",
"(",
"CompilationUnit",
"unit",
")",
"{",
"ListMultimap",
"<",
"TreeNode",
",",
"Comment",
">",
"blockComments",
"=",
"MultimapBuilder",
".",
"hashKeys",
"(",
")",
".... | Finds all block comments and associates them with their containing type.
This is trickier than you might expect because of inner types. | [
"Finds",
"all",
"block",
"comments",
"and",
"associates",
"them",
"with",
"their",
"containing",
"type",
".",
"This",
"is",
"trickier",
"than",
"you",
"might",
"expect",
"because",
"of",
"inner",
"types",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/OcniExtractor.java#L69-L93 |
34,889 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/OcniExtractor.java | OcniExtractor.findMethodSignatures | private static void findMethodSignatures(String code, Set<String> signatures) {
if (code == null) {
return;
}
Matcher matcher = OBJC_METHOD_DECL_PATTERN.matcher(code);
while (matcher.find()) {
StringBuilder signature = new StringBuilder();
signature.append(matcher.group(1));
if (... | java | private static void findMethodSignatures(String code, Set<String> signatures) {
if (code == null) {
return;
}
Matcher matcher = OBJC_METHOD_DECL_PATTERN.matcher(code);
while (matcher.find()) {
StringBuilder signature = new StringBuilder();
signature.append(matcher.group(1));
if (... | [
"private",
"static",
"void",
"findMethodSignatures",
"(",
"String",
"code",
",",
"Set",
"<",
"String",
">",
"signatures",
")",
"{",
"if",
"(",
"code",
"==",
"null",
")",
"{",
"return",
";",
"}",
"Matcher",
"matcher",
"=",
"OBJC_METHOD_DECL_PATTERN",
".",
"... | Finds the signatures of methods defined in the native code. | [
"Finds",
"the",
"signatures",
"of",
"methods",
"defined",
"in",
"the",
"native",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/OcniExtractor.java#L195-L215 |
34,890 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.escape | private static int escape(char[] cc, char c, int index) {
cc[index++] = '%';
cc[index++] = Character.forDigit((c >> 4) & 0xF, 16);
cc[index++] = Character.forDigit(c & 0xF, 16);
return index;
} | java | private static int escape(char[] cc, char c, int index) {
cc[index++] = '%';
cc[index++] = Character.forDigit((c >> 4) & 0xF, 16);
cc[index++] = Character.forDigit(c & 0xF, 16);
return index;
} | [
"private",
"static",
"int",
"escape",
"(",
"char",
"[",
"]",
"cc",
",",
"char",
"c",
",",
"int",
"index",
")",
"{",
"cc",
"[",
"index",
"++",
"]",
"=",
"'",
"'",
";",
"cc",
"[",
"index",
"++",
"]",
"=",
"Character",
".",
"forDigit",
"(",
"(",
... | Appends the URL escape sequence for the specified char to the
specified StringBuffer. | [
"Appends",
"the",
"URL",
"escape",
"sequence",
"for",
"the",
"specified",
"char",
"to",
"the",
"specified",
"StringBuffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L153-L158 |
34,891 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.unescape | private static byte unescape(String s, int i) {
return (byte) Integer.parseInt(s.substring(i+1,i+3),16);
} | java | private static byte unescape(String s, int i) {
return (byte) Integer.parseInt(s.substring(i+1,i+3),16);
} | [
"private",
"static",
"byte",
"unescape",
"(",
"String",
"s",
",",
"int",
"i",
")",
"{",
"return",
"(",
"byte",
")",
"Integer",
".",
"parseInt",
"(",
"s",
".",
"substring",
"(",
"i",
"+",
"1",
",",
"i",
"+",
"3",
")",
",",
"16",
")",
";",
"}"
] | Un-escape and return the character at position i in string s. | [
"Un",
"-",
"escape",
"and",
"return",
"the",
"character",
"at",
"position",
"i",
"in",
"string",
"s",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L163-L165 |
34,892 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.decode | public static String decode(String s) {
int n = s.length();
if ((n == 0) || (s.indexOf('%') < 0))
return s;
StringBuilder sb = new StringBuilder(n);
ByteBuffer bb = ByteBuffer.allocate(n);
CharBuffer cb = CharBuffer.allocate(n);
CharsetDecoder dec = ThreadLoc... | java | public static String decode(String s) {
int n = s.length();
if ((n == 0) || (s.indexOf('%') < 0))
return s;
StringBuilder sb = new StringBuilder(n);
ByteBuffer bb = ByteBuffer.allocate(n);
CharBuffer cb = CharBuffer.allocate(n);
CharsetDecoder dec = ThreadLoc... | [
"public",
"static",
"String",
"decode",
"(",
"String",
"s",
")",
"{",
"int",
"n",
"=",
"s",
".",
"length",
"(",
")",
";",
"if",
"(",
"(",
"n",
"==",
"0",
")",
"||",
"(",
"s",
".",
"indexOf",
"(",
"'",
"'",
")",
"<",
"0",
")",
")",
"return",... | Returns a new String constructed from the specified String by replacing
the URL escape sequences and UTF8 encoding with the characters they
represent. | [
"Returns",
"a",
"new",
"String",
"constructed",
"from",
"the",
"specified",
"String",
"by",
"replacing",
"the",
"URL",
"escape",
"sequences",
"and",
"UTF8",
"encoding",
"with",
"the",
"characters",
"they",
"represent",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L173-L224 |
34,893 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.canonizeString | public String canonizeString(String file) {
int i = 0;
int lim = file.length();
// Remove embedded /../
while ((i = file.indexOf("/../")) >= 0) {
if ((lim = file.lastIndexOf('/', i - 1)) >= 0) {
file = file.substring(0, lim) + file.substring(i + 3);
... | java | public String canonizeString(String file) {
int i = 0;
int lim = file.length();
// Remove embedded /../
while ((i = file.indexOf("/../")) >= 0) {
if ((lim = file.lastIndexOf('/', i - 1)) >= 0) {
file = file.substring(0, lim) + file.substring(i + 3);
... | [
"public",
"String",
"canonizeString",
"(",
"String",
"file",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"lim",
"=",
"file",
".",
"length",
"(",
")",
";",
"// Remove embedded /../",
"while",
"(",
"(",
"i",
"=",
"file",
".",
"indexOf",
"(",
"\"/../\"",
... | Returns a canonical version of the specified string. | [
"Returns",
"a",
"canonical",
"version",
"of",
"the",
"specified",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L229-L259 |
34,894 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.match | private static boolean match(char c, long lowMask, long highMask) {
if (c < 64)
return ((1L << c) & lowMask) != 0;
if (c < 128)
return ((1L << (c - 64)) & highMask) != 0;
return false;
} | java | private static boolean match(char c, long lowMask, long highMask) {
if (c < 64)
return ((1L << c) & lowMask) != 0;
if (c < 128)
return ((1L << (c - 64)) & highMask) != 0;
return false;
} | [
"private",
"static",
"boolean",
"match",
"(",
"char",
"c",
",",
"long",
"lowMask",
",",
"long",
"highMask",
")",
"{",
"if",
"(",
"c",
"<",
"64",
")",
"return",
"(",
"(",
"1L",
"<<",
"c",
")",
"&",
"lowMask",
")",
"!=",
"0",
";",
"if",
"(",
"c",... | Tell whether the given character is permitted by the given mask pair | [
"Tell",
"whether",
"the",
"given",
"character",
"is",
"permitted",
"by",
"the",
"given",
"mask",
"pair"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L519-L525 |
34,895 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.lowMask | private static long lowMask(char first, char last) {
long m = 0;
int f = Math.max(Math.min(first, 63), 0);
int l = Math.max(Math.min(last, 63), 0);
for (int i = f; i <= l; i++)
m |= 1L << i;
return m;
} | java | private static long lowMask(char first, char last) {
long m = 0;
int f = Math.max(Math.min(first, 63), 0);
int l = Math.max(Math.min(last, 63), 0);
for (int i = f; i <= l; i++)
m |= 1L << i;
return m;
} | [
"private",
"static",
"long",
"lowMask",
"(",
"char",
"first",
",",
"char",
"last",
")",
"{",
"long",
"m",
"=",
"0",
";",
"int",
"f",
"=",
"Math",
".",
"max",
"(",
"Math",
".",
"min",
"(",
"first",
",",
"63",
")",
",",
"0",
")",
";",
"int",
"l... | between first and last, inclusive | [
"between",
"first",
"and",
"last",
"inclusive"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L545-L552 |
34,896 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java | ParseUtil.lowMask | private static long lowMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if (c < 64)
m |= (1L << c);
}
return m;
} | java | private static long lowMask(String chars) {
int n = chars.length();
long m = 0;
for (int i = 0; i < n; i++) {
char c = chars.charAt(i);
if (c < 64)
m |= (1L << c);
}
return m;
} | [
"private",
"static",
"long",
"lowMask",
"(",
"String",
"chars",
")",
"{",
"int",
"n",
"=",
"chars",
".",
"length",
"(",
")",
";",
"long",
"m",
"=",
"0",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"c... | Compute the low-order mask for the characters in the given string | [
"Compute",
"the",
"low",
"-",
"order",
"mask",
"for",
"the",
"characters",
"in",
"the",
"given",
"string"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/www/ParseUtil.java#L555-L564 |
34,897 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.anyInet4Address | static Inet4Address anyInet4Address(final NetworkInterface interf) {
return AccessController.doPrivileged(new PrivilegedAction<Inet4Address>() {
public Inet4Address run() {
Enumeration<InetAddress> addrs = interf.getInetAddresses();
while (addrs.hasMoreElements()) {
... | java | static Inet4Address anyInet4Address(final NetworkInterface interf) {
return AccessController.doPrivileged(new PrivilegedAction<Inet4Address>() {
public Inet4Address run() {
Enumeration<InetAddress> addrs = interf.getInetAddresses();
while (addrs.hasMoreElements()) {
... | [
"static",
"Inet4Address",
"anyInet4Address",
"(",
"final",
"NetworkInterface",
"interf",
")",
"{",
"return",
"AccessController",
".",
"doPrivileged",
"(",
"new",
"PrivilegedAction",
"<",
"Inet4Address",
">",
"(",
")",
"{",
"public",
"Inet4Address",
"run",
"(",
")"... | Returns any IPv4 address of the given network interface, or
null if the interface does not have any IPv4 addresses. | [
"Returns",
"any",
"IPv4",
"address",
"of",
"the",
"given",
"network",
"interface",
"or",
"null",
"if",
"the",
"interface",
"does",
"not",
"have",
"any",
"IPv4",
"addresses",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L258-L271 |
34,898 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.inet4AsInt | static int inet4AsInt(InetAddress ia) {
if (ia instanceof Inet4Address) {
byte[] addr = ia.getAddress();
int address = addr[3] & 0xFF;
address |= ((addr[2] << 8) & 0xFF00);
address |= ((addr[1] << 16) & 0xFF0000);
address |= ((addr[0] << 24) & 0xFF000... | java | static int inet4AsInt(InetAddress ia) {
if (ia instanceof Inet4Address) {
byte[] addr = ia.getAddress();
int address = addr[3] & 0xFF;
address |= ((addr[2] << 8) & 0xFF00);
address |= ((addr[1] << 16) & 0xFF0000);
address |= ((addr[0] << 24) & 0xFF000... | [
"static",
"int",
"inet4AsInt",
"(",
"InetAddress",
"ia",
")",
"{",
"if",
"(",
"ia",
"instanceof",
"Inet4Address",
")",
"{",
"byte",
"[",
"]",
"addr",
"=",
"ia",
".",
"getAddress",
"(",
")",
";",
"int",
"address",
"=",
"addr",
"[",
"3",
"]",
"&",
"0... | Returns an IPv4 address as an int. | [
"Returns",
"an",
"IPv4",
"address",
"as",
"an",
"int",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L276-L286 |
34,899 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.inet4FromInt | static InetAddress inet4FromInt(int address) {
byte[] addr = new byte[4];
addr[0] = (byte) ((address >>> 24) & 0xFF);
addr[1] = (byte) ((address >>> 16) & 0xFF);
addr[2] = (byte) ((address >>> 8) & 0xFF);
addr[3] = (byte) (address & 0xFF);
try {
return InetAdd... | java | static InetAddress inet4FromInt(int address) {
byte[] addr = new byte[4];
addr[0] = (byte) ((address >>> 24) & 0xFF);
addr[1] = (byte) ((address >>> 16) & 0xFF);
addr[2] = (byte) ((address >>> 8) & 0xFF);
addr[3] = (byte) (address & 0xFF);
try {
return InetAdd... | [
"static",
"InetAddress",
"inet4FromInt",
"(",
"int",
"address",
")",
"{",
"byte",
"[",
"]",
"addr",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"addr",
"[",
"0",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"address",
">>>",
"24",
")",
"&",
"0xFF",
")",
"... | Returns an InetAddress from the given IPv4 address
represented as an int. | [
"Returns",
"an",
"InetAddress",
"from",
"the",
"given",
"IPv4",
"address",
"represented",
"as",
"an",
"int",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L292-L303 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.