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,600 | google/j2objc | cycle_finder/src/main/java/com/google/devtools/cyclefinder/NameUtil.java | NameUtil.getQualifiedName | public static String getQualifiedName(TypeMirror type) {
switch (type.getKind()) {
case DECLARED:
return getQualifiedNameForTypeElement((TypeElement) ((DeclaredType) type).asElement());
case TYPEVAR:
return getQualifiedNameForElement(((TypeVariable) type).asElement());
case INTERSE... | java | public static String getQualifiedName(TypeMirror type) {
switch (type.getKind()) {
case DECLARED:
return getQualifiedNameForTypeElement((TypeElement) ((DeclaredType) type).asElement());
case TYPEVAR:
return getQualifiedNameForElement(((TypeVariable) type).asElement());
case INTERSE... | [
"public",
"static",
"String",
"getQualifiedName",
"(",
"TypeMirror",
"type",
")",
"{",
"switch",
"(",
"type",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"DECLARED",
":",
"return",
"getQualifiedNameForTypeElement",
"(",
"(",
"TypeElement",
")",
"(",
"(",
"De... | Gets the qualified name for this type, as expected by a NameList instance. | [
"Gets",
"the",
"qualified",
"name",
"for",
"this",
"type",
"as",
"expected",
"by",
"a",
"NameList",
"instance",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/cycle_finder/src/main/java/com/google/devtools/cyclefinder/NameUtil.java#L262-L275 |
34,601 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java | QuantityFormatter.addIfAbsent | public void addIfAbsent(CharSequence variant, String template) {
int idx = StandardPlural.indexFromString(variant);
if (templates[idx] != null) {
return;
}
templates[idx] = SimpleFormatter.compileMinMaxArguments(template, 0, 1);
} | java | public void addIfAbsent(CharSequence variant, String template) {
int idx = StandardPlural.indexFromString(variant);
if (templates[idx] != null) {
return;
}
templates[idx] = SimpleFormatter.compileMinMaxArguments(template, 0, 1);
} | [
"public",
"void",
"addIfAbsent",
"(",
"CharSequence",
"variant",
",",
"String",
"template",
")",
"{",
"int",
"idx",
"=",
"StandardPlural",
".",
"indexFromString",
"(",
"variant",
")",
";",
"if",
"(",
"templates",
"[",
"idx",
"]",
"!=",
"null",
")",
"{",
... | Adds a template if there is none yet for the plural form.
@param variant the plural variant, e.g "zero", "one", "two", "few", "many", "other"
@param template the text for that plural variant with "{0}" as the quantity. For
example, in English, the template for the "one" variant may be "{0} apple" while the
template fo... | [
"Adds",
"a",
"template",
"if",
"there",
"is",
"none",
"yet",
"for",
"the",
"plural",
"form",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java#L42-L48 |
34,602 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java | QuantityFormatter.format | public String format(double number, NumberFormat numberFormat, PluralRules pluralRules) {
String formatStr = numberFormat.format(number);
StandardPlural p = selectPlural(number, numberFormat, pluralRules);
SimpleFormatter formatter = templates[p.ordinal()];
if (formatter == null) {
... | java | public String format(double number, NumberFormat numberFormat, PluralRules pluralRules) {
String formatStr = numberFormat.format(number);
StandardPlural p = selectPlural(number, numberFormat, pluralRules);
SimpleFormatter formatter = templates[p.ordinal()];
if (formatter == null) {
... | [
"public",
"String",
"format",
"(",
"double",
"number",
",",
"NumberFormat",
"numberFormat",
",",
"PluralRules",
"pluralRules",
")",
"{",
"String",
"formatStr",
"=",
"numberFormat",
".",
"format",
"(",
"number",
")",
";",
"StandardPlural",
"p",
"=",
"selectPlural... | Format formats a number with this object.
@param number the number to be formatted
@param numberFormat used to actually format the number.
@param pluralRules uses the number and the numberFormat to determine what plural
variant to use for fetching the formatting template.
@return the formatted string e.g '3 apples' | [
"Format",
"formats",
"a",
"number",
"with",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java#L65-L74 |
34,603 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java | QuantityFormatter.getByVariant | public SimpleFormatter getByVariant(CharSequence variant) {
assert isValid();
int idx = StandardPlural.indexOrOtherIndexFromString(variant);
SimpleFormatter template = templates[idx];
return (template == null && idx != StandardPlural.OTHER_INDEX) ?
templates[StandardPlura... | java | public SimpleFormatter getByVariant(CharSequence variant) {
assert isValid();
int idx = StandardPlural.indexOrOtherIndexFromString(variant);
SimpleFormatter template = templates[idx];
return (template == null && idx != StandardPlural.OTHER_INDEX) ?
templates[StandardPlura... | [
"public",
"SimpleFormatter",
"getByVariant",
"(",
"CharSequence",
"variant",
")",
"{",
"assert",
"isValid",
"(",
")",
";",
"int",
"idx",
"=",
"StandardPlural",
".",
"indexOrOtherIndexFromString",
"(",
"variant",
")",
";",
"SimpleFormatter",
"template",
"=",
"templ... | Gets the SimpleFormatter for a particular variant.
@param variant "zero", "one", "two", "few", "many", "other"
@return the SimpleFormatter | [
"Gets",
"the",
"SimpleFormatter",
"for",
"a",
"particular",
"variant",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java#L81-L87 |
34,604 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java | QuantityFormatter.format | public static StringBuilder format(String compiledPattern, CharSequence value,
StringBuilder appendTo, FieldPosition pos) {
int[] offsets = new int[1];
SimpleFormatterImpl.formatAndAppend(compiledPattern, appendTo, offsets, value);
if (pos.getBeginIndex() != 0 || pos.getEndIndex() !=... | java | public static StringBuilder format(String compiledPattern, CharSequence value,
StringBuilder appendTo, FieldPosition pos) {
int[] offsets = new int[1];
SimpleFormatterImpl.formatAndAppend(compiledPattern, appendTo, offsets, value);
if (pos.getBeginIndex() != 0 || pos.getEndIndex() !=... | [
"public",
"static",
"StringBuilder",
"format",
"(",
"String",
"compiledPattern",
",",
"CharSequence",
"value",
",",
"StringBuilder",
"appendTo",
",",
"FieldPosition",
"pos",
")",
"{",
"int",
"[",
"]",
"offsets",
"=",
"new",
"int",
"[",
"1",
"]",
";",
"Simple... | Formats the pattern with the value and adjusts the FieldPosition. | [
"Formats",
"the",
"pattern",
"with",
"the",
"value",
"and",
"adjusts",
"the",
"FieldPosition",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/QuantityFormatter.java#L126-L140 |
34,605 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer2.java | Normalizer2.normalize | public String normalize(CharSequence src) {
if(src instanceof String) {
// Fastpath: Do not construct a new String if the src is a String
// and is already normalized.
int spanLength=spanQuickCheckYes(src);
if(spanLength==src.length()) {
return (St... | java | public String normalize(CharSequence src) {
if(src instanceof String) {
// Fastpath: Do not construct a new String if the src is a String
// and is already normalized.
int spanLength=spanQuickCheckYes(src);
if(spanLength==src.length()) {
return (St... | [
"public",
"String",
"normalize",
"(",
"CharSequence",
"src",
")",
"{",
"if",
"(",
"src",
"instanceof",
"String",
")",
"{",
"// Fastpath: Do not construct a new String if the src is a String",
"// and is already normalized.",
"int",
"spanLength",
"=",
"spanQuickCheckYes",
"(... | Returns the normalized form of the source string.
@param src source string
@return normalized src | [
"Returns",
"the",
"normalized",
"form",
"of",
"the",
"source",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Normalizer2.java#L206-L218 |
34,606 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificatePolicyMap.java | CertificatePolicyMap.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
issuerDomain.encode(tmp);
subjectDomain.encode(tmp);
out.write(DerValue.tag_Sequence,tmp);
} | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
issuerDomain.encode(tmp);
subjectDomain.encode(tmp);
out.write(DerValue.tag_Sequence,tmp);
} | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"issuerDomain",
".",
"encode",
"(",
"tmp",
")",
";",
"subjectDomain",
".",
"encode",
"(",
"t... | Write the CertificatePolicyMap to the DerOutputStream.
@param out the DerOutputStream to write the object to.
@exception IOException on errors. | [
"Write",
"the",
"CertificatePolicyMap",
"to",
"the",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CertificatePolicyMap.java#L99-L105 |
34,607 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/Mappings.java | Mappings.addMapping | private static void addMapping(Map<String, String> map, String key, String value, String kind) {
String oldValue = map.put(key, value);
if (oldValue != null && !oldValue.equals(value)) {
ErrorUtil.error(kind + " redefined; was \"" + oldValue + ", now " + value);
}
} | java | private static void addMapping(Map<String, String> map, String key, String value, String kind) {
String oldValue = map.put(key, value);
if (oldValue != null && !oldValue.equals(value)) {
ErrorUtil.error(kind + " redefined; was \"" + oldValue + ", now " + value);
}
} | [
"private",
"static",
"void",
"addMapping",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"map",
",",
"String",
"key",
",",
"String",
"value",
",",
"String",
"kind",
")",
"{",
"String",
"oldValue",
"=",
"map",
".",
"put",
"(",
"key",
",",
"value",
")... | Adds a class, method or package-prefix property to its map, reporting an error
if that mapping was previously specified. | [
"Adds",
"a",
"class",
"method",
"or",
"package",
"-",
"prefix",
"property",
"to",
"its",
"map",
"reporting",
"an",
"error",
"if",
"that",
"mapping",
"was",
"previously",
"specified",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/Mappings.java#L121-L126 |
34,608 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/OCSP.java | OCSP.initializeTimeout | private static int initializeTimeout() {
// Integer tmp = java.security.AccessController.doPrivileged(
// new GetIntegerAction("com.sun.security.ocsp.timeout"));
Integer tmp = Integer.getInteger("com.sun.security.ocsp.timeout");
if (tmp == null || tmp < 0) {
return DEFA... | java | private static int initializeTimeout() {
// Integer tmp = java.security.AccessController.doPrivileged(
// new GetIntegerAction("com.sun.security.ocsp.timeout"));
Integer tmp = Integer.getInteger("com.sun.security.ocsp.timeout");
if (tmp == null || tmp < 0) {
return DEFA... | [
"private",
"static",
"int",
"initializeTimeout",
"(",
")",
"{",
"// Integer tmp = java.security.AccessController.doPrivileged(",
"// new GetIntegerAction(\"com.sun.security.ocsp.timeout\"));",
"Integer",
"tmp",
"=",
"Integer",
".",
"getInteger",
"(",
"\"com.sun.... | Initialize the timeout length by getting the OCSP timeout
system property. If the property has not been set, or if its
value is negative, set the timeout length to the default. | [
"Initialize",
"the",
"timeout",
"length",
"by",
"getting",
"the",
"OCSP",
"timeout",
"system",
"property",
".",
"If",
"the",
"property",
"has",
"not",
"been",
"set",
"or",
"if",
"its",
"value",
"is",
"negative",
"set",
"the",
"timeout",
"length",
"to",
"th... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/OCSP.java#L86-L96 |
34,609 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/OCSP.java | OCSP.check | public static RevocationStatus check(X509Certificate cert,
X509Certificate issuerCert,
URI responderURI,
X509Certificate responderCert,
Date date)
t... | java | public static RevocationStatus check(X509Certificate cert,
X509Certificate issuerCert,
URI responderURI,
X509Certificate responderCert,
Date date)
t... | [
"public",
"static",
"RevocationStatus",
"check",
"(",
"X509Certificate",
"cert",
",",
"X509Certificate",
"issuerCert",
",",
"URI",
"responderURI",
",",
"X509Certificate",
"responderCert",
",",
"Date",
"date",
")",
"throws",
"IOException",
",",
"CertPathValidatorExceptio... | Obtains the revocation status of a certificate using OCSP.
@param cert the certificate to be checked
@param issuerCert the issuer certificate
@param responderURI the URI of the OCSP responder
@param responderCert the OCSP responder's certificate
@param date the time the validity of the OCSP responder's certificate
sho... | [
"Obtains",
"the",
"revocation",
"status",
"of",
"a",
"certificate",
"using",
"OCSP",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/OCSP.java#L152-L161 |
34,610 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.linkBefore | void linkBefore(E e, Node<E> succ) {
// assert succ != null;
final Node<E> pred = succ.prev;
final Node<E> newNode = new Node<>(pred, e, succ);
succ.prev = newNode;
if (pred == null)
first = newNode;
else
pred.next = newNode;
size++;
... | java | void linkBefore(E e, Node<E> succ) {
// assert succ != null;
final Node<E> pred = succ.prev;
final Node<E> newNode = new Node<>(pred, e, succ);
succ.prev = newNode;
if (pred == null)
first = newNode;
else
pred.next = newNode;
size++;
... | [
"void",
"linkBefore",
"(",
"E",
"e",
",",
"Node",
"<",
"E",
">",
"succ",
")",
"{",
"// assert succ != null;",
"final",
"Node",
"<",
"E",
">",
"pred",
"=",
"succ",
".",
"prev",
";",
"final",
"Node",
"<",
"E",
">",
"newNode",
"=",
"new",
"Node",
"<>"... | Inserts element e before non-null Node succ. | [
"Inserts",
"element",
"e",
"before",
"non",
"-",
"null",
"Node",
"succ",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L157-L168 |
34,611 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.unlinkFirst | private E unlinkFirst(Node<E> f) {
// assert f == first && f != null;
final E element = f.item;
final Node<E> next = f.next;
f.item = null;
f.next = null; // help GC
first = next;
if (next == null)
last = null;
else
next.prev = null... | java | private E unlinkFirst(Node<E> f) {
// assert f == first && f != null;
final E element = f.item;
final Node<E> next = f.next;
f.item = null;
f.next = null; // help GC
first = next;
if (next == null)
last = null;
else
next.prev = null... | [
"private",
"E",
"unlinkFirst",
"(",
"Node",
"<",
"E",
">",
"f",
")",
"{",
"// assert f == first && f != null;",
"final",
"E",
"element",
"=",
"f",
".",
"item",
";",
"final",
"Node",
"<",
"E",
">",
"next",
"=",
"f",
".",
"next",
";",
"f",
".",
"item",... | Unlinks non-null first node f. | [
"Unlinks",
"non",
"-",
"null",
"first",
"node",
"f",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L173-L187 |
34,612 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.unlinkLast | private E unlinkLast(Node<E> l) {
// assert l == last && l != null;
final E element = l.item;
final Node<E> prev = l.prev;
l.item = null;
l.prev = null; // help GC
last = prev;
if (prev == null)
first = null;
else
prev.next = null;
... | java | private E unlinkLast(Node<E> l) {
// assert l == last && l != null;
final E element = l.item;
final Node<E> prev = l.prev;
l.item = null;
l.prev = null; // help GC
last = prev;
if (prev == null)
first = null;
else
prev.next = null;
... | [
"private",
"E",
"unlinkLast",
"(",
"Node",
"<",
"E",
">",
"l",
")",
"{",
"// assert l == last && l != null;",
"final",
"E",
"element",
"=",
"l",
".",
"item",
";",
"final",
"Node",
"<",
"E",
">",
"prev",
"=",
"l",
".",
"prev",
";",
"l",
".",
"item",
... | Unlinks non-null last node l. | [
"Unlinks",
"non",
"-",
"null",
"last",
"node",
"l",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L192-L206 |
34,613 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.getFirst | public E getFirst() {
final Node<E> f = first;
if (f == null)
throw new NoSuchElementException();
return f.item;
} | java | public E getFirst() {
final Node<E> f = first;
if (f == null)
throw new NoSuchElementException();
return f.item;
} | [
"public",
"E",
"getFirst",
"(",
")",
"{",
"final",
"Node",
"<",
"E",
">",
"f",
"=",
"first",
";",
"if",
"(",
"f",
"==",
"null",
")",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"return",
"f",
".",
"item",
";",
"}"
] | Returns the first element in this list.
@return the first element in this list
@throws NoSuchElementException if this list is empty | [
"Returns",
"the",
"first",
"element",
"in",
"this",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L243-L248 |
34,614 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.getLast | public E getLast() {
final Node<E> l = last;
if (l == null)
throw new NoSuchElementException();
return l.item;
} | java | public E getLast() {
final Node<E> l = last;
if (l == null)
throw new NoSuchElementException();
return l.item;
} | [
"public",
"E",
"getLast",
"(",
")",
"{",
"final",
"Node",
"<",
"E",
">",
"l",
"=",
"last",
";",
"if",
"(",
"l",
"==",
"null",
")",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"return",
"l",
".",
"item",
";",
"}"
] | Returns the last element in this list.
@return the last element in this list
@throws NoSuchElementException if this list is empty | [
"Returns",
"the",
"last",
"element",
"in",
"this",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L256-L261 |
34,615 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.removeFirst | public E removeFirst() {
final Node<E> f = first;
if (f == null)
throw new NoSuchElementException();
return unlinkFirst(f);
} | java | public E removeFirst() {
final Node<E> f = first;
if (f == null)
throw new NoSuchElementException();
return unlinkFirst(f);
} | [
"public",
"E",
"removeFirst",
"(",
")",
"{",
"final",
"Node",
"<",
"E",
">",
"f",
"=",
"first",
";",
"if",
"(",
"f",
"==",
"null",
")",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"return",
"unlinkFirst",
"(",
"f",
")",
";",
"}"
] | Removes and returns the first element from this list.
@return the first element from this list
@throws NoSuchElementException if this list is empty | [
"Removes",
"and",
"returns",
"the",
"first",
"element",
"from",
"this",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L269-L274 |
34,616 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java | LinkedList.removeLast | public E removeLast() {
final Node<E> l = last;
if (l == null)
throw new NoSuchElementException();
return unlinkLast(l);
} | java | public E removeLast() {
final Node<E> l = last;
if (l == null)
throw new NoSuchElementException();
return unlinkLast(l);
} | [
"public",
"E",
"removeLast",
"(",
")",
"{",
"final",
"Node",
"<",
"E",
">",
"l",
"=",
"last",
";",
"if",
"(",
"l",
"==",
"null",
")",
"throw",
"new",
"NoSuchElementException",
"(",
")",
";",
"return",
"unlinkLast",
"(",
"l",
")",
";",
"}"
] | Removes and returns the last element from this list.
@return the last element from this list
@throws NoSuchElementException if this list is empty | [
"Removes",
"and",
"returns",
"the",
"last",
"element",
"from",
"this",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/LinkedList.java#L282-L287 |
34,617 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/JarURLConnection.java | JarURLConnection.getAttributes | public Attributes getAttributes() throws IOException {
JarEntry e = getJarEntry();
return e != null ? e.getAttributes() : null;
} | java | public Attributes getAttributes() throws IOException {
JarEntry e = getJarEntry();
return e != null ? e.getAttributes() : null;
} | [
"public",
"Attributes",
"getAttributes",
"(",
")",
"throws",
"IOException",
"{",
"JarEntry",
"e",
"=",
"getJarEntry",
"(",
")",
";",
"return",
"e",
"!=",
"null",
"?",
"e",
".",
"getAttributes",
"(",
")",
":",
"null",
";",
"}"
] | Return the Attributes object for this connection if the URL
for it points to a JAR file entry, null otherwise.
@return the Attributes object for this connection if the URL
for it points to a JAR file entry, null otherwise.
@exception IOException if getting the JAR entry causes an
IOException to be thrown.
@see #getJ... | [
"Return",
"the",
"Attributes",
"object",
"for",
"this",
"connection",
"if",
"the",
"URL",
"for",
"it",
"points",
"to",
"a",
"JAR",
"file",
"entry",
"null",
"otherwise",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/JarURLConnection.java#L264-L267 |
34,618 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/JarURLConnection.java | JarURLConnection.getMainAttributes | public Attributes getMainAttributes() throws IOException {
Manifest man = getManifest();
return man != null ? man.getMainAttributes() : null;
} | java | public Attributes getMainAttributes() throws IOException {
Manifest man = getManifest();
return man != null ? man.getMainAttributes() : null;
} | [
"public",
"Attributes",
"getMainAttributes",
"(",
")",
"throws",
"IOException",
"{",
"Manifest",
"man",
"=",
"getManifest",
"(",
")",
";",
"return",
"man",
"!=",
"null",
"?",
"man",
".",
"getMainAttributes",
"(",
")",
":",
"null",
";",
"}"
] | Returns the main Attributes for the JAR file for this
connection.
@return the main Attributes for the JAR file for this
connection.
@exception IOException if getting the manifest causes an
IOException to be thrown.
@see #getJarFile
@see #getManifest | [
"Returns",
"the",
"main",
"Attributes",
"for",
"the",
"JAR",
"file",
"for",
"this",
"connection",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/JarURLConnection.java#L282-L285 |
34,619 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliterationRuleSet.java | TransliterationRuleSet.addRule | public void addRule(TransliterationRule rule) {
ruleVector.add(rule);
int len;
if ((len = rule.getAnteContextLength()) > maxContextLength) {
maxContextLength = len;
}
rules = null;
} | java | public void addRule(TransliterationRule rule) {
ruleVector.add(rule);
int len;
if ((len = rule.getAnteContextLength()) > maxContextLength) {
maxContextLength = len;
}
rules = null;
} | [
"public",
"void",
"addRule",
"(",
"TransliterationRule",
"rule",
")",
"{",
"ruleVector",
".",
"add",
"(",
"rule",
")",
";",
"int",
"len",
";",
"if",
"(",
"(",
"len",
"=",
"rule",
".",
"getAnteContextLength",
"(",
")",
")",
">",
"maxContextLength",
")",
... | Add a rule to this set. Rules are added in order, and order is
significant.
@param rule the rule to add | [
"Add",
"a",
"rule",
"to",
"this",
"set",
".",
"Rules",
"are",
"added",
"in",
"order",
"and",
"order",
"is",
"significant",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliterationRuleSet.java#L78-L86 |
34,620 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliterationRuleSet.java | TransliterationRuleSet.freeze | public void freeze() {
/* Construct the rule array and index table. We reorder the
* rules by sorting them into 256 bins. Each bin contains all
* rules matching the index value for that bin. A rule
* matches an index value if string whose first key character
* has a low by... | java | public void freeze() {
/* Construct the rule array and index table. We reorder the
* rules by sorting them into 256 bins. Each bin contains all
* rules matching the index value for that bin. A rule
* matches an index value if string whose first key character
* has a low by... | [
"public",
"void",
"freeze",
"(",
")",
"{",
"/* Construct the rule array and index table. We reorder the\n * rules by sorting them into 256 bins. Each bin contains all\n * rules matching the index value for that bin. A rule\n * matches an index value if string whose first key c... | Close this rule set to further additions, check it for masked rules,
and index it to optimize performance.
@exception IllegalArgumentException if some rules are masked | [
"Close",
"this",
"rule",
"set",
"to",
"further",
"additions",
"check",
"it",
"for",
"masked",
"rules",
"and",
"index",
"it",
"to",
"optimize",
"performance",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliterationRuleSet.java#L93-L176 |
34,621 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliterationRuleSet.java | TransliterationRuleSet.toRules | String toRules(boolean escapeUnprintable) {
int i;
int count = ruleVector.size();
StringBuilder ruleSource = new StringBuilder();
for (i=0; i<count; ++i) {
if (i != 0) {
ruleSource.append('\n');
}
TransliterationRule r = ruleVector.get(... | java | String toRules(boolean escapeUnprintable) {
int i;
int count = ruleVector.size();
StringBuilder ruleSource = new StringBuilder();
for (i=0; i<count; ++i) {
if (i != 0) {
ruleSource.append('\n');
}
TransliterationRule r = ruleVector.get(... | [
"String",
"toRules",
"(",
"boolean",
"escapeUnprintable",
")",
"{",
"int",
"i",
";",
"int",
"count",
"=",
"ruleVector",
".",
"size",
"(",
")",
";",
"StringBuilder",
"ruleSource",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"i",
"=",
"0",
";... | Create rule strings that represents this rule set. | [
"Create",
"rule",
"strings",
"that",
"represents",
"this",
"rule",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliterationRuleSet.java#L230-L242 |
34,622 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/SwitchRewriter.java | SwitchRewriter.fixVariableDeclarations | private void fixVariableDeclarations(SwitchStatement node) {
List<Statement> statements = node.getStatements();
Block block = new Block();
List<Statement> blockStmts = block.getStatements();
for (int i = 0; i < statements.size(); i++) {
Statement stmt = statements.get(i);
if (stmt instanceof... | java | private void fixVariableDeclarations(SwitchStatement node) {
List<Statement> statements = node.getStatements();
Block block = new Block();
List<Statement> blockStmts = block.getStatements();
for (int i = 0; i < statements.size(); i++) {
Statement stmt = statements.get(i);
if (stmt instanceof... | [
"private",
"void",
"fixVariableDeclarations",
"(",
"SwitchStatement",
"node",
")",
"{",
"List",
"<",
"Statement",
">",
"statements",
"=",
"node",
".",
"getStatements",
"(",
")",
";",
"Block",
"block",
"=",
"new",
"Block",
"(",
")",
";",
"List",
"<",
"State... | Moves all variable declarations above the first case statement. | [
"Moves",
"all",
"variable",
"declarations",
"above",
"the",
"first",
"case",
"statement",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/SwitchRewriter.java#L101-L128 |
34,623 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/libcore/reflect/AnnotatedElements.java | AnnotatedElements.insertAnnotationValues | private static <T extends Annotation> void insertAnnotationValues(Annotation annotation,
Class<T> annotationClass, ArrayList<T> unfoldedAnnotations) {
// annotation is a complex annotation which has elements of instance annotationClass
// (whose static type is T).
//
// @interface SomeName { <---... | java | private static <T extends Annotation> void insertAnnotationValues(Annotation annotation,
Class<T> annotationClass, ArrayList<T> unfoldedAnnotations) {
// annotation is a complex annotation which has elements of instance annotationClass
// (whose static type is T).
//
// @interface SomeName { <---... | [
"private",
"static",
"<",
"T",
"extends",
"Annotation",
">",
"void",
"insertAnnotationValues",
"(",
"Annotation",
"annotation",
",",
"Class",
"<",
"T",
">",
"annotationClass",
",",
"ArrayList",
"<",
"T",
">",
"unfoldedAnnotations",
")",
"{",
"// annotation is a co... | Extracts annotations from a container annotation and inserts them into a list.
<p>
Given a complex annotation "annotation", it should have a "T[] value()" method on it.
Call that method and add all of the nested annotations into unfoldedAnnotations list.
</p> | [
"Extracts",
"annotations",
"from",
"a",
"container",
"annotation",
"and",
"inserts",
"them",
"into",
"a",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/reflect/AnnotatedElements.java#L78-L127 |
34,624 | google/j2objc | jre_emul/Classes/com/google/j2objc/util/ReflectionUtil.java | ReflectionUtil.matchClassNamePrefix | public static boolean matchClassNamePrefix(String actual, String expected) {
return actual.equals(expected) || actual.equals(getCamelCase(expected));
} | java | public static boolean matchClassNamePrefix(String actual, String expected) {
return actual.equals(expected) || actual.equals(getCamelCase(expected));
} | [
"public",
"static",
"boolean",
"matchClassNamePrefix",
"(",
"String",
"actual",
",",
"String",
"expected",
")",
"{",
"return",
"actual",
".",
"equals",
"(",
"expected",
")",
"||",
"actual",
".",
"equals",
"(",
"getCamelCase",
"(",
"expected",
")",
")",
";",
... | When reflection is stripped, the transpiled code uses NSStringFromClass to return the name of a
class. For example, instead of getting something like java.lang.Throwable, we get
JavaLangThrowable.
<p>This method assumes that {@code actual} and {@code expected} contain a class name as prefix.
Firts, it compares directl... | [
"When",
"reflection",
"is",
"stripped",
"the",
"transpiled",
"code",
"uses",
"NSStringFromClass",
"to",
"return",
"the",
"name",
"of",
"a",
"class",
".",
"For",
"example",
"instead",
"of",
"getting",
"something",
"like",
"java",
".",
"lang",
".",
"Throwable",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/util/ReflectionUtil.java#L36-L38 |
34,625 | google/j2objc | jre_emul/Classes/com/google/j2objc/util/ReflectionUtil.java | ReflectionUtil.getSerialVersionUID | public static long getSerialVersionUID(Class<? extends Serializable> clazz) {
try {
return clazz.getField("serialVersionUID").getLong(null);
} catch (NoSuchFieldException | IllegalAccessException ex) {
// ignored.
return 0;
}
} | java | public static long getSerialVersionUID(Class<? extends Serializable> clazz) {
try {
return clazz.getField("serialVersionUID").getLong(null);
} catch (NoSuchFieldException | IllegalAccessException ex) {
// ignored.
return 0;
}
} | [
"public",
"static",
"long",
"getSerialVersionUID",
"(",
"Class",
"<",
"?",
"extends",
"Serializable",
">",
"clazz",
")",
"{",
"try",
"{",
"return",
"clazz",
".",
"getField",
"(",
"\"serialVersionUID\"",
")",
".",
"getLong",
"(",
"null",
")",
";",
"}",
"cat... | Transpiled code that directly acccess the serialVersionUID field when reflection is stripped
won't compile because this field is also stripped.
<p>Accessing it via reflection allows the non-stripped code to keep the same behavior and
allows the stripped code to compile. Note that in the later case, a ReflectionStrippe... | [
"Transpiled",
"code",
"that",
"directly",
"acccess",
"the",
"serialVersionUID",
"field",
"when",
"reflection",
"is",
"stripped",
"won",
"t",
"compile",
"because",
"this",
"field",
"is",
"also",
"stripped",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/util/ReflectionUtil.java#L55-L62 |
34,626 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UTS46.java | UTS46.checkLabelBiDi | private void
checkLabelBiDi(CharSequence label, int labelStart, int labelLength, Info info) {
// IDNA2008 BiDi rule
// Get the directionality of the first character.
int c;
int i=labelStart;
c=Character.codePointAt(label, i);
i+=Character.charCount(c);
int fir... | java | private void
checkLabelBiDi(CharSequence label, int labelStart, int labelLength, Info info) {
// IDNA2008 BiDi rule
// Get the directionality of the first character.
int c;
int i=labelStart;
c=Character.codePointAt(label, i);
i+=Character.charCount(c);
int fir... | [
"private",
"void",
"checkLabelBiDi",
"(",
"CharSequence",
"label",
",",
"int",
"labelStart",
",",
"int",
"labelLength",
",",
"Info",
"info",
")",
"{",
"// IDNA2008 BiDi rule",
"// Get the directionality of the first character.",
"int",
"c",
";",
"int",
"i",
"=",
"la... | processing several earlier labels. | [
"processing",
"several",
"earlier",
"labels",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UTS46.java#L547-L624 |
34,627 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/KeyUtil.java | KeyUtil.getKeySize | public static final int getKeySize(Key key) {
int size = -1;
if (key instanceof Length) {
try {
Length ruler = (Length)key;
size = ruler.length();
} catch (UnsupportedOperationException usoe) {
// ignore the exception
}... | java | public static final int getKeySize(Key key) {
int size = -1;
if (key instanceof Length) {
try {
Length ruler = (Length)key;
size = ruler.length();
} catch (UnsupportedOperationException usoe) {
// ignore the exception
}... | [
"public",
"static",
"final",
"int",
"getKeySize",
"(",
"Key",
"key",
")",
"{",
"int",
"size",
"=",
"-",
"1",
";",
"if",
"(",
"key",
"instanceof",
"Length",
")",
"{",
"try",
"{",
"Length",
"ruler",
"=",
"(",
"Length",
")",
"key",
";",
"size",
"=",
... | Returns the key size of the given key object in bits.
@param key the key object, cannot be null
@return the key size of the given key object in bits, or -1 if the
key size is not accessible | [
"Returns",
"the",
"key",
"size",
"of",
"the",
"given",
"key",
"object",
"in",
"bits",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/KeyUtil.java#L58-L114 |
34,628 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/KeyUtil.java | KeyUtil.validateDHPublicKey | private static void validateDHPublicKey(DHPublicKey publicKey)
throws InvalidKeyException {
DHParameterSpec paramSpec = publicKey.getParams();
BigInteger p = paramSpec.getP();
BigInteger g = paramSpec.getG();
BigInteger y = publicKey.getY();
validateDHPublicKey(p, g... | java | private static void validateDHPublicKey(DHPublicKey publicKey)
throws InvalidKeyException {
DHParameterSpec paramSpec = publicKey.getParams();
BigInteger p = paramSpec.getP();
BigInteger g = paramSpec.getG();
BigInteger y = publicKey.getY();
validateDHPublicKey(p, g... | [
"private",
"static",
"void",
"validateDHPublicKey",
"(",
"DHPublicKey",
"publicKey",
")",
"throws",
"InvalidKeyException",
"{",
"DHParameterSpec",
"paramSpec",
"=",
"publicKey",
".",
"getParams",
"(",
")",
";",
"BigInteger",
"p",
"=",
"paramSpec",
".",
"getP",
"("... | Returns whether the Diffie-Hellman public key is valid or not.
Per RFC 2631 and NIST SP800-56A, the following algorithm is used to
validate Diffie-Hellman public keys:
1. Verify that y lies within the interval [2,p-1]. If it does not,
the key is invalid.
2. Compute y^q mod p. If the result == 1, the key is valid.
Othe... | [
"Returns",
"whether",
"the",
"Diffie",
"-",
"Hellman",
"public",
"key",
"is",
"valid",
"or",
"not",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/KeyUtil.java#L188-L197 |
34,629 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Double.java | Double.doubleToLongBits | public static long doubleToLongBits(double value) {
long result = doubleToRawLongBits(value);
// Check for NaN based on values of bit fields, maximum
// exponent and nonzero significand.
if ( ((result & DoubleConsts.EXP_BIT_MASK) ==
DoubleConsts.EXP_BIT_MASK) &&
... | java | public static long doubleToLongBits(double value) {
long result = doubleToRawLongBits(value);
// Check for NaN based on values of bit fields, maximum
// exponent and nonzero significand.
if ( ((result & DoubleConsts.EXP_BIT_MASK) ==
DoubleConsts.EXP_BIT_MASK) &&
... | [
"public",
"static",
"long",
"doubleToLongBits",
"(",
"double",
"value",
")",
"{",
"long",
"result",
"=",
"doubleToRawLongBits",
"(",
"value",
")",
";",
"// Check for NaN based on values of bit fields, maximum",
"// exponent and nonzero significand.",
"if",
"(",
"(",
"(",
... | Returns a representation of the specified floating-point value
according to the IEEE 754 floating-point "double
format" bit layout.
<p>Bit 63 (the bit that is selected by the mask
{@code 0x8000000000000000L}) represents the sign of the
floating-point number. Bits
62-52 (the bits that are selected by the mask
{@code 0x... | [
"Returns",
"a",
"representation",
"of",
"the",
"specified",
"floating",
"-",
"point",
"value",
"according",
"to",
"the",
"IEEE",
"754",
"floating",
"-",
"point",
"double",
"format",
"bit",
"layout",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Double.java#L836-L845 |
34,630 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/WeakHashMap.java | WeakHashMap.removeMapping | boolean removeMapping(Object o) {
if (!(o instanceof Map.Entry))
return false;
Entry<K,V>[] tab = getTable();
Map.Entry<?,?> entry = (Map.Entry<?,?>)o;
Object k = maskNull(entry.getKey());
int h = sun.misc.Hashing.singleWordWangJenkinsHash(k);
int i = indexFor... | java | boolean removeMapping(Object o) {
if (!(o instanceof Map.Entry))
return false;
Entry<K,V>[] tab = getTable();
Map.Entry<?,?> entry = (Map.Entry<?,?>)o;
Object k = maskNull(entry.getKey());
int h = sun.misc.Hashing.singleWordWangJenkinsHash(k);
int i = indexFor... | [
"boolean",
"removeMapping",
"(",
"Object",
"o",
")",
"{",
"if",
"(",
"!",
"(",
"o",
"instanceof",
"Map",
".",
"Entry",
")",
")",
"return",
"false",
";",
"Entry",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
"=",
"getTable",
"(",
")",
";",
"Map",
"... | Special version of remove needed by Entry set | [
"Special",
"version",
"of",
"remove",
"needed",
"by",
"Entry",
"set"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/WeakHashMap.java#L604-L631 |
34,631 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/WeakHashMap.java | WeakHashMap.containsNullValue | private boolean containsNullValue() {
Entry<K,V>[] tab = getTable();
for (int i = tab.length; i-- > 0;)
for (Entry<K,V> e = tab[i]; e != null; e = e.next)
if (e.value==null)
return true;
return false;
} | java | private boolean containsNullValue() {
Entry<K,V>[] tab = getTable();
for (int i = tab.length; i-- > 0;)
for (Entry<K,V> e = tab[i]; e != null; e = e.next)
if (e.value==null)
return true;
return false;
} | [
"private",
"boolean",
"containsNullValue",
"(",
")",
"{",
"Entry",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
"=",
"getTable",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"tab",
".",
"length",
";",
"i",
"--",
">",
"0",
";",
")",
"for",
"(",
"E... | Special-case code for containsValue with null argument | [
"Special",
"-",
"case",
"code",
"for",
"containsValue",
"with",
"null",
"argument"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/WeakHashMap.java#L677-L684 |
34,632 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/logging/PlatformLogger.java | PlatformLogger.redirectToJavaLoggerProxy | private void redirectToJavaLoggerProxy() {
DefaultLoggerProxy lp = DefaultLoggerProxy.class.cast(this.loggerProxy);
JavaLoggerProxy jlp = new JavaLoggerProxy(lp.name, lp.level);
// the order of assignments is important
this.javaLoggerProxy = jlp; // isLoggable checks javaLoggerProxy if... | java | private void redirectToJavaLoggerProxy() {
DefaultLoggerProxy lp = DefaultLoggerProxy.class.cast(this.loggerProxy);
JavaLoggerProxy jlp = new JavaLoggerProxy(lp.name, lp.level);
// the order of assignments is important
this.javaLoggerProxy = jlp; // isLoggable checks javaLoggerProxy if... | [
"private",
"void",
"redirectToJavaLoggerProxy",
"(",
")",
"{",
"DefaultLoggerProxy",
"lp",
"=",
"DefaultLoggerProxy",
".",
"class",
".",
"cast",
"(",
"this",
".",
"loggerProxy",
")",
";",
"JavaLoggerProxy",
"jlp",
"=",
"new",
"JavaLoggerProxy",
"(",
"lp",
".",
... | Creates a new JavaLoggerProxy and redirects the platform logger to it | [
"Creates",
"a",
"new",
"JavaLoggerProxy",
"and",
"redirects",
"the",
"platform",
"logger",
"to",
"it"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/logging/PlatformLogger.java#L225-L231 |
34,633 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/logging/PlatformLogger.java | PlatformLogger.setLevel | @Deprecated
public void setLevel(int newLevel) {
loggerProxy.setLevel(newLevel == 0 ? null : Level.valueOf(newLevel));
} | java | @Deprecated
public void setLevel(int newLevel) {
loggerProxy.setLevel(newLevel == 0 ? null : Level.valueOf(newLevel));
} | [
"@",
"Deprecated",
"public",
"void",
"setLevel",
"(",
"int",
"newLevel",
")",
"{",
"loggerProxy",
".",
"setLevel",
"(",
"newLevel",
"==",
"0",
"?",
"null",
":",
"Level",
".",
"valueOf",
"(",
"newLevel",
")",
")",
";",
"}"
] | Sets the log level.
@deprecated Use setLevel(Level) instead | [
"Sets",
"the",
"log",
"level",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/logging/PlatformLogger.java#L289-L292 |
34,634 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/logging/PlatformLogger.java | PlatformLogger.isLoggable | public boolean isLoggable(Level level) {
if (level == null) {
throw new NullPointerException();
}
// performance-sensitive method: use two monomorphic call-sites
JavaLoggerProxy jlp = javaLoggerProxy;
return jlp != null ? jlp.isLoggable(level) : loggerProxy.isLoggable... | java | public boolean isLoggable(Level level) {
if (level == null) {
throw new NullPointerException();
}
// performance-sensitive method: use two monomorphic call-sites
JavaLoggerProxy jlp = javaLoggerProxy;
return jlp != null ? jlp.isLoggable(level) : loggerProxy.isLoggable... | [
"public",
"boolean",
"isLoggable",
"(",
"Level",
"level",
")",
"{",
"if",
"(",
"level",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"// performance-sensitive method: use two monomorphic call-sites",
"JavaLoggerProxy",
"jlp",
"... | Returns true if a message of the given level would actually
be logged by this logger. | [
"Returns",
"true",
"if",
"a",
"message",
"of",
"the",
"given",
"level",
"would",
"actually",
"be",
"logged",
"by",
"this",
"logger",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/logging/PlatformLogger.java#L298-L305 |
34,635 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | TreeBin.tieBreakOrder | static int tieBreakOrder(Object a, Object b) {
int d;
if (a == null || b == null ||
(d = a.getClass().getName().
compareTo(b.getClass().getName())) == 0)
d = (System.identityHashCode(a) <= System.identityHashCode(b) ?
-1 : 1);... | java | static int tieBreakOrder(Object a, Object b) {
int d;
if (a == null || b == null ||
(d = a.getClass().getName().
compareTo(b.getClass().getName())) == 0)
d = (System.identityHashCode(a) <= System.identityHashCode(b) ?
-1 : 1);... | [
"static",
"int",
"tieBreakOrder",
"(",
"Object",
"a",
",",
"Object",
"b",
")",
"{",
"int",
"d",
";",
"if",
"(",
"a",
"==",
"null",
"||",
"b",
"==",
"null",
"||",
"(",
"d",
"=",
"a",
".",
"getClass",
"(",
")",
".",
"getName",
"(",
")",
".",
"c... | Tie-breaking utility for ordering insertions when equal
hashCodes and non-comparable. We don't require a total
order, just a consistent insertion rule to maintain
equivalence across rebalancings. Tie-breaking further than
necessary simplifies testing a bit. | [
"Tie",
"-",
"breaking",
"utility",
"for",
"ordering",
"insertions",
"when",
"equal",
"hashCodes",
"and",
"non",
"-",
"comparable",
".",
"We",
"don",
"t",
"require",
"a",
"total",
"order",
"just",
"a",
"consistent",
"insertion",
"rule",
"to",
"maintain",
"equ... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L2800-L2808 |
34,636 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | TreeBin.contendedLock | private final void contendedLock() {
boolean waiting = false;
for (int s;;) {
if (((s = lockState) & ~WAITER) == 0) {
if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) {
if (waiting)
waiter = null;
... | java | private final void contendedLock() {
boolean waiting = false;
for (int s;;) {
if (((s = lockState) & ~WAITER) == 0) {
if (U.compareAndSwapInt(this, LOCKSTATE, s, WRITER)) {
if (waiting)
waiter = null;
... | [
"private",
"final",
"void",
"contendedLock",
"(",
")",
"{",
"boolean",
"waiting",
"=",
"false",
";",
"for",
"(",
"int",
"s",
";",
";",
")",
"{",
"if",
"(",
"(",
"(",
"s",
"=",
"lockState",
")",
"&",
"~",
"WAITER",
")",
"==",
"0",
")",
"{",
"if"... | Possibly blocks awaiting root lock. | [
"Possibly",
"blocks",
"awaiting",
"root",
"lock",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L2875-L2894 |
34,637 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | TreeBin.find | final Node<K,V> find(int h, Object k) {
if (k != null) {
for (Node<K,V> e = first; e != null; ) {
int s; K ek;
if (((s = lockState) & (WAITER|WRITER)) != 0) {
if (e.hash == h &&
((ek = e.key) == k || ... | java | final Node<K,V> find(int h, Object k) {
if (k != null) {
for (Node<K,V> e = first; e != null; ) {
int s; K ek;
if (((s = lockState) & (WAITER|WRITER)) != 0) {
if (e.hash == h &&
((ek = e.key) == k || ... | [
"final",
"Node",
"<",
"K",
",",
"V",
">",
"find",
"(",
"int",
"h",
",",
"Object",
"k",
")",
"{",
"if",
"(",
"k",
"!=",
"null",
")",
"{",
"for",
"(",
"Node",
"<",
"K",
",",
"V",
">",
"e",
"=",
"first",
";",
"e",
"!=",
"null",
";",
")",
"... | Returns matching node or null if none. Tries to search
using tree comparisons from root, but continues linear
search when lock not available. | [
"Returns",
"matching",
"node",
"or",
"null",
"if",
"none",
".",
"Tries",
"to",
"search",
"using",
"tree",
"comparisons",
"from",
"root",
"but",
"continues",
"linear",
"search",
"when",
"lock",
"not",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L2901-L2928 |
34,638 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | TreeBin.putTreeVal | final TreeNode<K,V> putTreeVal(int h, K k, V v) {
Class<?> kc = null;
boolean searched = false;
for (TreeNode<K,V> p = root;;) {
int dir, ph; K pk;
if (p == null) {
first = root = new TreeNode<K,V>(h, k, v, null, null);
... | java | final TreeNode<K,V> putTreeVal(int h, K k, V v) {
Class<?> kc = null;
boolean searched = false;
for (TreeNode<K,V> p = root;;) {
int dir, ph; K pk;
if (p == null) {
first = root = new TreeNode<K,V>(h, k, v, null, null);
... | [
"final",
"TreeNode",
"<",
"K",
",",
"V",
">",
"putTreeVal",
"(",
"int",
"h",
",",
"K",
"k",
",",
"V",
"v",
")",
"{",
"Class",
"<",
"?",
">",
"kc",
"=",
"null",
";",
"boolean",
"searched",
"=",
"false",
";",
"for",
"(",
"TreeNode",
"<",
"K",
"... | Finds or adds a node.
@return null if added | [
"Finds",
"or",
"adds",
"a",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L2934-L2989 |
34,639 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | TreeBin.rotateLeft | static <K,V> TreeNode<K,V> rotateLeft(TreeNode<K,V> root,
TreeNode<K,V> p) {
TreeNode<K,V> r, pp, rl;
if (p != null && (r = p.right) != null) {
if ((rl = p.right = r.left) != null)
rl.parent = p;
if... | java | static <K,V> TreeNode<K,V> rotateLeft(TreeNode<K,V> root,
TreeNode<K,V> p) {
TreeNode<K,V> r, pp, rl;
if (p != null && (r = p.right) != null) {
if ((rl = p.right = r.left) != null)
rl.parent = p;
if... | [
"static",
"<",
"K",
",",
"V",
">",
"TreeNode",
"<",
"K",
",",
"V",
">",
"rotateLeft",
"(",
"TreeNode",
"<",
"K",
",",
"V",
">",
"root",
",",
"TreeNode",
"<",
"K",
",",
"V",
">",
"p",
")",
"{",
"TreeNode",
"<",
"K",
",",
"V",
">",
"r",
",",
... | Red-black tree methods, all adapted from CLR | [
"Red",
"-",
"black",
"tree",
"methods",
"all",
"adapted",
"from",
"CLR"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L3100-L3116 |
34,640 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | TreeBin.checkInvariants | static <K,V> boolean checkInvariants(TreeNode<K,V> t) {
TreeNode<K,V> tp = t.parent, tl = t.left, tr = t.right,
tb = t.prev, tn = (TreeNode<K,V>)t.next;
if (tb != null && tb.next != t)
return false;
if (tn != null && tn.prev != t)
retur... | java | static <K,V> boolean checkInvariants(TreeNode<K,V> t) {
TreeNode<K,V> tp = t.parent, tl = t.left, tr = t.right,
tb = t.prev, tn = (TreeNode<K,V>)t.next;
if (tb != null && tb.next != t)
return false;
if (tn != null && tn.prev != t)
retur... | [
"static",
"<",
"K",
",",
"V",
">",
"boolean",
"checkInvariants",
"(",
"TreeNode",
"<",
"K",
",",
"V",
">",
"t",
")",
"{",
"TreeNode",
"<",
"K",
",",
"V",
">",
"tp",
"=",
"t",
".",
"parent",
",",
"tl",
"=",
"t",
".",
"left",
",",
"tr",
"=",
... | Checks invariants recursively for the tree of Nodes rooted at t. | [
"Checks",
"invariants",
"recursively",
"for",
"the",
"tree",
"of",
"Nodes",
"rooted",
"at",
"t",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L3286-L3306 |
34,641 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | Traverser.advance | final Node<K,V> advance() {
Node<K,V> e;
if ((e = next) != null)
e = e.next;
for (;;) {
Node<K,V>[] t; int i, n; // must use locals in checks
if (e != null)
return next = e;
if (baseIndex >= baseLimi... | java | final Node<K,V> advance() {
Node<K,V> e;
if ((e = next) != null)
e = e.next;
for (;;) {
Node<K,V>[] t; int i, n; // must use locals in checks
if (e != null)
return next = e;
if (baseIndex >= baseLimi... | [
"final",
"Node",
"<",
"K",
",",
"V",
">",
"advance",
"(",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"e",
";",
"if",
"(",
"(",
"e",
"=",
"next",
")",
"!=",
"null",
")",
"e",
"=",
"e",
".",
"next",
";",
"for",
"(",
";",
";",
")",
"{",
... | Advances if possible, returning next valid node, or null if none. | [
"Advances",
"if",
"possible",
"returning",
"next",
"valid",
"node",
"or",
"null",
"if",
"none",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L3375-L3403 |
34,642 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | Traverser.pushState | private void pushState(Node<K,V>[] t, int i, int n) {
TableStack<K,V> s = spare; // reuse if possible
if (s != null)
spare = s.next;
else
s = new TableStack<K,V>();
s.tab = t;
s.length = n;
s.index = i;
... | java | private void pushState(Node<K,V>[] t, int i, int n) {
TableStack<K,V> s = spare; // reuse if possible
if (s != null)
spare = s.next;
else
s = new TableStack<K,V>();
s.tab = t;
s.length = n;
s.index = i;
... | [
"private",
"void",
"pushState",
"(",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"t",
",",
"int",
"i",
",",
"int",
"n",
")",
"{",
"TableStack",
"<",
"K",
",",
"V",
">",
"s",
"=",
"spare",
";",
"// reuse if possible",
"if",
"(",
"s",
"!=",
"null"... | Saves traversal state upon encountering a forwarding node. | [
"Saves",
"traversal",
"state",
"upon",
"encountering",
"a",
"forwarding",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L3408-L3419 |
34,643 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java | Traverser.recoverState | private void recoverState(int n) {
TableStack<K,V> s; int len;
while ((s = stack) != null && (index += (len = s.length)) >= n) {
n = len;
index = s.index;
tab = s.tab;
s.tab = null;
TableStack<K,V> next = s.next;
... | java | private void recoverState(int n) {
TableStack<K,V> s; int len;
while ((s = stack) != null && (index += (len = s.length)) >= n) {
n = len;
index = s.index;
tab = s.tab;
s.tab = null;
TableStack<K,V> next = s.next;
... | [
"private",
"void",
"recoverState",
"(",
"int",
"n",
")",
"{",
"TableStack",
"<",
"K",
",",
"V",
">",
"s",
";",
"int",
"len",
";",
"while",
"(",
"(",
"s",
"=",
"stack",
")",
"!=",
"null",
"&&",
"(",
"index",
"+=",
"(",
"len",
"=",
"s",
".",
"l... | Possibly pops traversal state.
@param n length of current table | [
"Possibly",
"pops",
"traversal",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentHashMap.java#L3426-L3440 |
34,644 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.applyPattern | public final UnicodeSet applyPattern(String pattern) {
checkFrozen();
return applyPattern(pattern, null, null, IGNORE_SPACE);
} | java | public final UnicodeSet applyPattern(String pattern) {
checkFrozen();
return applyPattern(pattern, null, null, IGNORE_SPACE);
} | [
"public",
"final",
"UnicodeSet",
"applyPattern",
"(",
"String",
"pattern",
")",
"{",
"checkFrozen",
"(",
")",
";",
"return",
"applyPattern",
"(",
"pattern",
",",
"null",
",",
"null",
",",
"IGNORE_SPACE",
")",
";",
"}"
] | Modifies this set to represent the set specified by the given pattern.
See the class description for the syntax of the pattern language.
Whitespace is ignored.
@param pattern a string specifying what characters are in the set
@exception java.lang.IllegalArgumentException if the pattern
contains a syntax error. | [
"Modifies",
"this",
"set",
"to",
"represent",
"the",
"set",
"specified",
"by",
"the",
"given",
"pattern",
".",
"See",
"the",
"class",
"description",
"for",
"the",
"syntax",
"of",
"the",
"pattern",
"language",
".",
"Whitespace",
"is",
"ignored",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L544-L547 |
34,645 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.applyPattern | public UnicodeSet applyPattern(String pattern, int options) {
checkFrozen();
return applyPattern(pattern, null, null, options);
} | java | public UnicodeSet applyPattern(String pattern, int options) {
checkFrozen();
return applyPattern(pattern, null, null, options);
} | [
"public",
"UnicodeSet",
"applyPattern",
"(",
"String",
"pattern",
",",
"int",
"options",
")",
"{",
"checkFrozen",
"(",
")",
";",
"return",
"applyPattern",
"(",
"pattern",
",",
"null",
",",
"null",
",",
"options",
")",
";",
"}"
] | Modifies this set to represent the set specified by the given pattern,
optionally ignoring whitespace.
See the class description for the syntax of the pattern language.
@param pattern a string specifying what characters are in the set
@param options a bitmask indicating which options to apply.
Valid options are IGNORE_... | [
"Modifies",
"this",
"set",
"to",
"represent",
"the",
"set",
"specified",
"by",
"the",
"given",
"pattern",
"optionally",
"ignoring",
"whitespace",
".",
"See",
"the",
"class",
"description",
"for",
"the",
"syntax",
"of",
"the",
"pattern",
"language",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L573-L576 |
34,646 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.resemblesPattern | public static boolean resemblesPattern(String pattern, int pos) {
return ((pos+1) < pattern.length() &&
pattern.charAt(pos) == '[') ||
resemblesPropertyPattern(pattern, pos);
} | java | public static boolean resemblesPattern(String pattern, int pos) {
return ((pos+1) < pattern.length() &&
pattern.charAt(pos) == '[') ||
resemblesPropertyPattern(pattern, pos);
} | [
"public",
"static",
"boolean",
"resemblesPattern",
"(",
"String",
"pattern",
",",
"int",
"pos",
")",
"{",
"return",
"(",
"(",
"pos",
"+",
"1",
")",
"<",
"pattern",
".",
"length",
"(",
")",
"&&",
"pattern",
".",
"charAt",
"(",
"pos",
")",
"==",
"'",
... | Return true if the given position, in the given pattern, appears
to be the start of a UnicodeSet pattern.
@hide unsupported on Android | [
"Return",
"true",
"if",
"the",
"given",
"position",
"in",
"the",
"given",
"pattern",
"appears",
"to",
"be",
"the",
"start",
"of",
"a",
"UnicodeSet",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L583-L587 |
34,647 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.toPattern | @Override
public String toPattern(boolean escapeUnprintable) {
if (pat != null && !escapeUnprintable) {
return pat;
}
StringBuilder result = new StringBuilder();
return _toPattern(result, escapeUnprintable).toString();
} | java | @Override
public String toPattern(boolean escapeUnprintable) {
if (pat != null && !escapeUnprintable) {
return pat;
}
StringBuilder result = new StringBuilder();
return _toPattern(result, escapeUnprintable).toString();
} | [
"@",
"Override",
"public",
"String",
"toPattern",
"(",
"boolean",
"escapeUnprintable",
")",
"{",
"if",
"(",
"pat",
"!=",
"null",
"&&",
"!",
"escapeUnprintable",
")",
"{",
"return",
"pat",
";",
"}",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",... | Returns a string representation of this set. If the result of
calling this function is passed to a UnicodeSet constructor, it
will produce another set that is equal to this one. | [
"Returns",
"a",
"string",
"representation",
"of",
"this",
"set",
".",
"If",
"the",
"result",
"of",
"calling",
"this",
"function",
"is",
"passed",
"to",
"a",
"UnicodeSet",
"constructor",
"it",
"will",
"produce",
"another",
"set",
"that",
"is",
"equal",
"to",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L678-L685 |
34,648 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.matchesAt | @Deprecated
public int matchesAt(CharSequence text, int offset) {
int lastLen = -1;
strings:
if (strings.size() != 0) {
char firstChar = text.charAt(offset);
String trial = null;
// find the first string starting with firstChar
... | java | @Deprecated
public int matchesAt(CharSequence text, int offset) {
int lastLen = -1;
strings:
if (strings.size() != 0) {
char firstChar = text.charAt(offset);
String trial = null;
// find the first string starting with firstChar
... | [
"@",
"Deprecated",
"public",
"int",
"matchesAt",
"(",
"CharSequence",
"text",
",",
"int",
"offset",
")",
"{",
"int",
"lastLen",
"=",
"-",
"1",
";",
"strings",
":",
"if",
"(",
"strings",
".",
"size",
"(",
")",
"!=",
"0",
")",
"{",
"char",
"firstChar",... | Tests whether the text matches at the offset. If so, returns the end of the longest substring that it matches. If not, returns -1.
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden on Android | [
"Tests",
"whether",
"the",
"text",
"matches",
"at",
"the",
"offset",
".",
"If",
"so",
"returns",
"the",
"end",
"of",
"the",
"longest",
"substring",
"that",
"it",
"matches",
".",
"If",
"not",
"returns",
"-",
"1",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1016-L1048 |
34,649 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.add_unchecked | private UnicodeSet add_unchecked(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6));
}
if (end < MIN_VALUE || end > MAX_VALUE) {
throw new IllegalArgumentException("Invali... | java | private UnicodeSet add_unchecked(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6));
}
if (end < MIN_VALUE || end > MAX_VALUE) {
throw new IllegalArgumentException("Invali... | [
"private",
"UnicodeSet",
"add_unchecked",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"start",
"<",
"MIN_VALUE",
"||",
"start",
">",
"MAX_VALUE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid code point U+\"",
"+",
"Uti... | for internal use, after checkFrozen has been called | [
"for",
"internal",
"use",
"after",
"checkFrozen",
"has",
"been",
"called"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1164-L1177 |
34,650 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.add_unchecked | private final UnicodeSet add_unchecked(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(c, 6));
}
// find smallest i such that c < list[i]
// if odd, then it is IN the set
// if even, then it is O... | java | private final UnicodeSet add_unchecked(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(c, 6));
}
// find smallest i such that c < list[i]
// if odd, then it is IN the set
// if even, then it is O... | [
"private",
"final",
"UnicodeSet",
"add_unchecked",
"(",
"int",
"c",
")",
"{",
"if",
"(",
"c",
"<",
"MIN_VALUE",
"||",
"c",
">",
"MAX_VALUE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid code point U+\"",
"+",
"Utility",
".",
"hex",
"... | for internal use only, after checkFrozen has been called | [
"for",
"internal",
"use",
"only",
"after",
"checkFrozen",
"has",
"been",
"called"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1209-L1294 |
34,651 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.retain | public final UnicodeSet retain(CharSequence cs) {
int cp = getSingleCP(cs);
if (cp < 0) {
String s = cs.toString();
boolean isIn = strings.contains(s);
if (isIn && size() == 1) {
return this;
}
clear();
strings.add(... | java | public final UnicodeSet retain(CharSequence cs) {
int cp = getSingleCP(cs);
if (cp < 0) {
String s = cs.toString();
boolean isIn = strings.contains(s);
if (isIn && size() == 1) {
return this;
}
clear();
strings.add(... | [
"public",
"final",
"UnicodeSet",
"retain",
"(",
"CharSequence",
"cs",
")",
"{",
"int",
"cp",
"=",
"getSingleCP",
"(",
"cs",
")",
";",
"if",
"(",
"cp",
"<",
"0",
")",
"{",
"String",
"s",
"=",
"cs",
".",
"toString",
"(",
")",
";",
"boolean",
"isIn",
... | Retain the specified string in this set if it is present.
Upon return this set will be empty if it did not contain s, or
will only contain s if it did contain s.
@param cs the string to be retained
@return this object, for chaining | [
"Retain",
"the",
"specified",
"string",
"in",
"this",
"set",
"if",
"it",
"is",
"present",
".",
"Upon",
"return",
"this",
"set",
"will",
"be",
"empty",
"if",
"it",
"did",
"not",
"contain",
"s",
"or",
"will",
"only",
"contain",
"s",
"if",
"it",
"did",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1463-L1479 |
34,652 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.remove | public final UnicodeSet remove(CharSequence s) {
int cp = getSingleCP(s);
if (cp < 0) {
strings.remove(s.toString());
pat = null;
} else {
remove(cp, cp);
}
return this;
} | java | public final UnicodeSet remove(CharSequence s) {
int cp = getSingleCP(s);
if (cp < 0) {
strings.remove(s.toString());
pat = null;
} else {
remove(cp, cp);
}
return this;
} | [
"public",
"final",
"UnicodeSet",
"remove",
"(",
"CharSequence",
"s",
")",
"{",
"int",
"cp",
"=",
"getSingleCP",
"(",
"s",
")",
";",
"if",
"(",
"cp",
"<",
"0",
")",
"{",
"strings",
".",
"remove",
"(",
"s",
".",
"toString",
"(",
")",
")",
";",
"pat... | Removes the specified string from this set if it is present.
The set will not contain the specified string once the call
returns.
@param s the string to be removed
@return this object, for chaining | [
"Removes",
"the",
"specified",
"string",
"from",
"this",
"set",
"if",
"it",
"is",
"present",
".",
"The",
"set",
"will",
"not",
"contain",
"the",
"specified",
"string",
"once",
"the",
"call",
"returns",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1524-L1533 |
34,653 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.contains | @Override
public boolean contains(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(c, 6));
}
if (bmpSet != null) {
return bmpSet.contains(c);
}
if (stringSpan != null) {
... | java | @Override
public boolean contains(int c) {
if (c < MIN_VALUE || c > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(c, 6));
}
if (bmpSet != null) {
return bmpSet.contains(c);
}
if (stringSpan != null) {
... | [
"@",
"Override",
"public",
"boolean",
"contains",
"(",
"int",
"c",
")",
"{",
"if",
"(",
"c",
"<",
"MIN_VALUE",
"||",
"c",
">",
"MAX_VALUE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid code point U+\"",
"+",
"Utility",
".",
"hex",
... | Returns true if this set contains the given character.
@param c character to be checked for containment
@return true if the test condition is met | [
"Returns",
"true",
"if",
"this",
"set",
"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/text/UnicodeSet.java#L1619-L1643 |
34,654 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.contains | public boolean contains(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6));
}
if (end < MIN_VALUE || end > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code po... | java | public boolean contains(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6));
}
if (end < MIN_VALUE || end > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code po... | [
"public",
"boolean",
"contains",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"start",
"<",
"MIN_VALUE",
"||",
"start",
">",
"MAX_VALUE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid code point U+\"",
"+",
"Utility",
... | Returns true if this set contains every character
of the given range.
@param start first character, inclusive, of the range
@param end last character, inclusive, of the range
@return true if the test condition is met | [
"Returns",
"true",
"if",
"this",
"set",
"contains",
"every",
"character",
"of",
"the",
"given",
"range",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1808-L1821 |
34,655 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.containsAll | public boolean containsAll(UnicodeSet b) {
// The specified set is a subset if all of its pairs are contained in
// this set. This implementation accesses the lists directly for speed.
// TODO: this could be faster if size() were cached. But that would affect building speed
// so it need... | java | public boolean containsAll(UnicodeSet b) {
// The specified set is a subset if all of its pairs are contained in
// this set. This implementation accesses the lists directly for speed.
// TODO: this could be faster if size() were cached. But that would affect building speed
// so it need... | [
"public",
"boolean",
"containsAll",
"(",
"UnicodeSet",
"b",
")",
"{",
"// The specified set is a subset if all of its pairs are contained in",
"// this set. This implementation accesses the lists directly for speed.",
"// TODO: this could be faster if size() were cached. But that would affect bu... | Returns true if this set contains all the characters and strings
of the given set.
@param b set to be checked for containment
@return true if the test condition is met | [
"Returns",
"true",
"if",
"this",
"set",
"contains",
"all",
"the",
"characters",
"and",
"strings",
"of",
"the",
"given",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1845-L1897 |
34,656 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.containsAll | private boolean containsAll(String s, int i) {
if (i >= s.length()) {
return true;
}
int cp= UTF16.charAt(s, i);
if (contains(cp) && containsAll(s, i+UTF16.getCharCount(cp))) {
return true;
}
for (String setStr : strings) {
if (s.start... | java | private boolean containsAll(String s, int i) {
if (i >= s.length()) {
return true;
}
int cp= UTF16.charAt(s, i);
if (contains(cp) && containsAll(s, i+UTF16.getCharCount(cp))) {
return true;
}
for (String setStr : strings) {
if (s.start... | [
"private",
"boolean",
"containsAll",
"(",
"String",
"s",
",",
"int",
"i",
")",
"{",
"if",
"(",
"i",
">=",
"s",
".",
"length",
"(",
")",
")",
"{",
"return",
"true",
";",
"}",
"int",
"cp",
"=",
"UTF16",
".",
"charAt",
"(",
"s",
",",
"i",
")",
"... | Recursive routine called if we fail to find a match in containsAll, and there are strings
@param s source string
@param i point to match to the end on
@return true if ok | [
"Recursive",
"routine",
"called",
"if",
"we",
"fail",
"to",
"find",
"a",
"match",
"in",
"containsAll",
"and",
"there",
"are",
"strings"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1948-L1963 |
34,657 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.getRegexEquivalent | @Deprecated
public String getRegexEquivalent() {
if (strings.size() == 0) {
return toString();
}
StringBuilder result = new StringBuilder("(?:");
appendNewPattern(result, true, false);
for (String s : strings) {
result.append('|');
_appendT... | java | @Deprecated
public String getRegexEquivalent() {
if (strings.size() == 0) {
return toString();
}
StringBuilder result = new StringBuilder("(?:");
appendNewPattern(result, true, false);
for (String s : strings) {
result.append('|');
_appendT... | [
"@",
"Deprecated",
"public",
"String",
"getRegexEquivalent",
"(",
")",
"{",
"if",
"(",
"strings",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"toString",
"(",
")",
";",
"}",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
"\"(?:\""... | Get the Regex equivalent for this UnicodeSet
@return regex pattern equivalent to this UnicodeSet
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden on Android | [
"Get",
"the",
"Regex",
"equivalent",
"for",
"this",
"UnicodeSet"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1972-L1984 |
34,658 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.containsNone | public boolean containsNone(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6));
}
if (end < MIN_VALUE || end > MAX_VALUE) {
throw new IllegalArgumentException("Invalid cod... | java | public boolean containsNone(int start, int end) {
if (start < MIN_VALUE || start > MAX_VALUE) {
throw new IllegalArgumentException("Invalid code point U+" + Utility.hex(start, 6));
}
if (end < MIN_VALUE || end > MAX_VALUE) {
throw new IllegalArgumentException("Invalid cod... | [
"public",
"boolean",
"containsNone",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"start",
"<",
"MIN_VALUE",
"||",
"start",
">",
"MAX_VALUE",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid code point U+\"",
"+",
"Utility"... | Returns true if this set contains none of the characters
of the given range.
@param start first character, inclusive, of the range
@param end last character, inclusive, of the range
@return true if the test condition is met | [
"Returns",
"true",
"if",
"this",
"set",
"contains",
"none",
"of",
"the",
"characters",
"of",
"the",
"given",
"range",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L1993-L2005 |
34,659 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.complementAll | public UnicodeSet complementAll(UnicodeSet c) {
checkFrozen();
xor(c.list, c.len, 0);
SortedSetRelation.doOperation(strings, SortedSetRelation.COMPLEMENTALL, c.strings);
return this;
} | java | public UnicodeSet complementAll(UnicodeSet c) {
checkFrozen();
xor(c.list, c.len, 0);
SortedSetRelation.doOperation(strings, SortedSetRelation.COMPLEMENTALL, c.strings);
return this;
} | [
"public",
"UnicodeSet",
"complementAll",
"(",
"UnicodeSet",
"c",
")",
"{",
"checkFrozen",
"(",
")",
";",
"xor",
"(",
"c",
".",
"list",
",",
"c",
".",
"len",
",",
"0",
")",
";",
"SortedSetRelation",
".",
"doOperation",
"(",
"strings",
",",
"SortedSetRelat... | Complements in this set all elements contained in the specified
set. Any character in the other set will be removed if it is
in this set, or will be added if it is not in this set.
@param c set that defines which elements will be complemented from
this set. | [
"Complements",
"in",
"this",
"set",
"all",
"elements",
"contained",
"in",
"the",
"specified",
"set",
".",
"Any",
"character",
"in",
"the",
"other",
"set",
"will",
"be",
"removed",
"if",
"it",
"is",
"in",
"this",
"set",
"or",
"will",
"be",
"added",
"if",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L2185-L2190 |
34,660 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.clear | public UnicodeSet clear() {
checkFrozen();
list[0] = HIGH;
len = 1;
pat = null;
strings.clear();
return this;
} | java | public UnicodeSet clear() {
checkFrozen();
list[0] = HIGH;
len = 1;
pat = null;
strings.clear();
return this;
} | [
"public",
"UnicodeSet",
"clear",
"(",
")",
"{",
"checkFrozen",
"(",
")",
";",
"list",
"[",
"0",
"]",
"=",
"HIGH",
";",
"len",
"=",
"1",
";",
"pat",
"=",
"null",
";",
"strings",
".",
"clear",
"(",
")",
";",
"return",
"this",
";",
"}"
] | Removes all of the elements from this set. This set will be
empty after this call returns. | [
"Removes",
"all",
"of",
"the",
"elements",
"from",
"this",
"set",
".",
"This",
"set",
"will",
"be",
"empty",
"after",
"this",
"call",
"returns",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L2196-L2203 |
34,661 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.compact | public UnicodeSet compact() {
checkFrozen();
if (len != list.length) {
int[] temp = new int[len];
System.arraycopy(list, 0, temp, 0, len);
list = temp;
}
rangeList = null;
buffer = null;
return this;
} | java | public UnicodeSet compact() {
checkFrozen();
if (len != list.length) {
int[] temp = new int[len];
System.arraycopy(list, 0, temp, 0, len);
list = temp;
}
rangeList = null;
buffer = null;
return this;
} | [
"public",
"UnicodeSet",
"compact",
"(",
")",
"{",
"checkFrozen",
"(",
")",
";",
"if",
"(",
"len",
"!=",
"list",
".",
"length",
")",
"{",
"int",
"[",
"]",
"temp",
"=",
"new",
"int",
"[",
"len",
"]",
";",
"System",
".",
"arraycopy",
"(",
"list",
",... | Reallocate this objects internal structures to take up the least
possible space, without changing this object's value. | [
"Reallocate",
"this",
"objects",
"internal",
"structures",
"to",
"take",
"up",
"the",
"least",
"possible",
"space",
"without",
"changing",
"this",
"object",
"s",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L2243-L2253 |
34,662 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.range | private int[] range(int start, int end) {
if (rangeList == null) {
rangeList = new int[] { start, end+1, HIGH };
} else {
rangeList[0] = start;
rangeList[1] = end+1;
}
return rangeList;
} | java | private int[] range(int start, int end) {
if (rangeList == null) {
rangeList = new int[] { start, end+1, HIGH };
} else {
rangeList[0] = start;
rangeList[1] = end+1;
}
return rangeList;
} | [
"private",
"int",
"[",
"]",
"range",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"if",
"(",
"rangeList",
"==",
"null",
")",
"{",
"rangeList",
"=",
"new",
"int",
"[",
"]",
"{",
"start",
",",
"end",
"+",
"1",
",",
"HIGH",
"}",
";",
"}",
"... | Assumes start <= end. | [
"Assumes",
"start",
"<",
"=",
"end",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L2868-L2876 |
34,663 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.applyFilter | private UnicodeSet applyFilter(Filter filter, int src) {
// Logically, walk through all Unicode characters, noting the start
// and end of each range for which filter.contain(c) is
// true. Add each range to a set.
//
// To improve performance, use an inclusions set which
... | java | private UnicodeSet applyFilter(Filter filter, int src) {
// Logically, walk through all Unicode characters, noting the start
// and end of each range for which filter.contain(c) is
// true. Add each range to a set.
//
// To improve performance, use an inclusions set which
... | [
"private",
"UnicodeSet",
"applyFilter",
"(",
"Filter",
"filter",
",",
"int",
"src",
")",
"{",
"// Logically, walk through all Unicode characters, noting the start",
"// and end of each range for which filter.contain(c) is",
"// true. Add each range to a set.",
"//",
"// To improve per... | Generic filter-based scanning code for UCD property UnicodeSets. | [
"Generic",
"filter",
"-",
"based",
"scanning",
"code",
"for",
"UCD",
"property",
"UnicodeSets",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3217-L3258 |
34,664 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.mungeCharName | private static String mungeCharName(String source) {
source = PatternProps.trimWhiteSpace(source);
StringBuilder buf = null;
for (int i=0; i<source.length(); ++i) {
char ch = source.charAt(i);
if (PatternProps.isWhiteSpace(ch)) {
if (buf == null) {
... | java | private static String mungeCharName(String source) {
source = PatternProps.trimWhiteSpace(source);
StringBuilder buf = null;
for (int i=0; i<source.length(); ++i) {
char ch = source.charAt(i);
if (PatternProps.isWhiteSpace(ch)) {
if (buf == null) {
... | [
"private",
"static",
"String",
"mungeCharName",
"(",
"String",
"source",
")",
"{",
"source",
"=",
"PatternProps",
".",
"trimWhiteSpace",
"(",
"source",
")",
";",
"StringBuilder",
"buf",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
... | Remove leading and trailing Pattern_White_Space and compress
internal Pattern_White_Space to a single space character. | [
"Remove",
"leading",
"and",
"trailing",
"Pattern_White_Space",
"and",
"compress",
"internal",
"Pattern_White_Space",
"to",
"a",
"single",
"space",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3265-L3283 |
34,665 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.applyIntPropertyValue | public UnicodeSet applyIntPropertyValue(int prop, int value) {
checkFrozen();
if (prop == UProperty.GENERAL_CATEGORY_MASK) {
applyFilter(new GeneralCategoryMaskFilter(value), UCharacterProperty.SRC_CHAR);
} else if (prop == UProperty.SCRIPT_EXTENSIONS) {
applyFilter(new S... | java | public UnicodeSet applyIntPropertyValue(int prop, int value) {
checkFrozen();
if (prop == UProperty.GENERAL_CATEGORY_MASK) {
applyFilter(new GeneralCategoryMaskFilter(value), UCharacterProperty.SRC_CHAR);
} else if (prop == UProperty.SCRIPT_EXTENSIONS) {
applyFilter(new S... | [
"public",
"UnicodeSet",
"applyIntPropertyValue",
"(",
"int",
"prop",
",",
"int",
"value",
")",
"{",
"checkFrozen",
"(",
")",
";",
"if",
"(",
"prop",
"==",
"UProperty",
".",
"GENERAL_CATEGORY_MASK",
")",
"{",
"applyFilter",
"(",
"new",
"GeneralCategoryMaskFilter"... | Modifies this set to contain those code points which have the
given value for the given binary or enumerated property, as
returned by UCharacter.getIntPropertyValue. Prior contents of
this set are lost.
@param prop a property in the range
UProperty.BIN_START..UProperty.BIN_LIMIT-1 or
UProperty.INT_START..UProperty.IN... | [
"Modifies",
"this",
"set",
"to",
"contain",
"those",
"code",
"points",
"which",
"have",
"the",
"given",
"value",
"for",
"the",
"given",
"binary",
"or",
"enumerated",
"property",
"as",
"returned",
"by",
"UCharacter",
".",
"getIntPropertyValue",
".",
"Prior",
"c... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3310-L3320 |
34,666 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.resemblesPropertyPattern | private static boolean resemblesPropertyPattern(String pattern, int pos) {
// Patterns are at least 5 characters long
if ((pos+5) > pattern.length()) {
return false;
}
// Look for an opening [:, [:^, \p, or \P
return pattern.regionMatches(pos, "[:", 0, 2) ||
... | java | private static boolean resemblesPropertyPattern(String pattern, int pos) {
// Patterns are at least 5 characters long
if ((pos+5) > pattern.length()) {
return false;
}
// Look for an opening [:, [:^, \p, or \P
return pattern.regionMatches(pos, "[:", 0, 2) ||
... | [
"private",
"static",
"boolean",
"resemblesPropertyPattern",
"(",
"String",
"pattern",
",",
"int",
"pos",
")",
"{",
"// Patterns are at least 5 characters long",
"if",
"(",
"(",
"pos",
"+",
"5",
")",
">",
"pattern",
".",
"length",
"(",
")",
")",
"{",
"return",
... | Return true if the given position, in the given pattern, appears
to be the start of a property set pattern. | [
"Return",
"true",
"if",
"the",
"given",
"position",
"in",
"the",
"given",
"pattern",
"appears",
"to",
"be",
"the",
"start",
"of",
"a",
"property",
"set",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3522-L3532 |
34,667 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.resemblesPropertyPattern | private static boolean resemblesPropertyPattern(RuleCharacterIterator chars,
int iterOpts) {
boolean result = false;
iterOpts &= ~RuleCharacterIterator.PARSE_ESCAPES;
Object pos = chars.getPos(null);
int c = chars.next(iterOpts);
if (c == '[' || c == '\\') {
... | java | private static boolean resemblesPropertyPattern(RuleCharacterIterator chars,
int iterOpts) {
boolean result = false;
iterOpts &= ~RuleCharacterIterator.PARSE_ESCAPES;
Object pos = chars.getPos(null);
int c = chars.next(iterOpts);
if (c == '[' || c == '\\') {
... | [
"private",
"static",
"boolean",
"resemblesPropertyPattern",
"(",
"RuleCharacterIterator",
"chars",
",",
"int",
"iterOpts",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"iterOpts",
"&=",
"~",
"RuleCharacterIterator",
".",
"PARSE_ESCAPES",
";",
"Object",
"pos",
... | Return true if the given iterator appears to point at a
property pattern. Regardless of the result, return with the
iterator unchanged.
@param chars iterator over the pattern characters. Upon return
it will be unchanged.
@param iterOpts RuleCharacterIterator options | [
"Return",
"true",
"if",
"the",
"given",
"iterator",
"appears",
"to",
"point",
"at",
"a",
"property",
"pattern",
".",
"Regardless",
"of",
"the",
"result",
"return",
"with",
"the",
"iterator",
"unchanged",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3542-L3555 |
34,668 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.applyPropertyPattern | private UnicodeSet applyPropertyPattern(String pattern, ParsePosition ppos, SymbolTable symbols) {
int pos = ppos.getIndex();
// On entry, ppos should point to one of the following locations:
// Minimum length is 5 characters, e.g. \p{L}
if ((pos+5) > pattern.length()) {
re... | java | private UnicodeSet applyPropertyPattern(String pattern, ParsePosition ppos, SymbolTable symbols) {
int pos = ppos.getIndex();
// On entry, ppos should point to one of the following locations:
// Minimum length is 5 characters, e.g. \p{L}
if ((pos+5) > pattern.length()) {
re... | [
"private",
"UnicodeSet",
"applyPropertyPattern",
"(",
"String",
"pattern",
",",
"ParsePosition",
"ppos",
",",
"SymbolTable",
"symbols",
")",
"{",
"int",
"pos",
"=",
"ppos",
".",
"getIndex",
"(",
")",
";",
"// On entry, ppos should point to one of the following locations... | Parse the given property pattern at the given parse position.
@param symbols TODO | [
"Parse",
"the",
"given",
"property",
"pattern",
"at",
"the",
"given",
"parse",
"position",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3561-L3643 |
34,669 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.applyPropertyPattern | private void applyPropertyPattern(RuleCharacterIterator chars,
Appendable rebuiltPat, SymbolTable symbols) {
String patStr = chars.lookahead();
ParsePosition pos = new ParsePosition(0);
applyPropertyPattern(patStr, pos, symbols);
if (pos.getIndex() == 0) {
syntaxE... | java | private void applyPropertyPattern(RuleCharacterIterator chars,
Appendable rebuiltPat, SymbolTable symbols) {
String patStr = chars.lookahead();
ParsePosition pos = new ParsePosition(0);
applyPropertyPattern(patStr, pos, symbols);
if (pos.getIndex() == 0) {
syntaxE... | [
"private",
"void",
"applyPropertyPattern",
"(",
"RuleCharacterIterator",
"chars",
",",
"Appendable",
"rebuiltPat",
",",
"SymbolTable",
"symbols",
")",
"{",
"String",
"patStr",
"=",
"chars",
".",
"lookahead",
"(",
")",
";",
"ParsePosition",
"pos",
"=",
"new",
"Pa... | Parse a property pattern.
@param chars iterator over the pattern characters. Upon return
it will be advanced to the first character after the parsed
pattern, or the end of the iteration if all characters are
parsed.
@param rebuiltPat the pattern that was parsed, rebuilt or
copied from the input pattern, as appropriate... | [
"Parse",
"a",
"property",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3655-L3665 |
34,670 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.addCaseMapping | private static final void addCaseMapping(UnicodeSet set, int result, StringBuilder full) {
if(result >= 0) {
if(result > UCaseProps.MAX_STRING_LENGTH) {
// add a single-code point case mapping
set.add(result);
} else {
// add a string case ... | java | private static final void addCaseMapping(UnicodeSet set, int result, StringBuilder full) {
if(result >= 0) {
if(result > UCaseProps.MAX_STRING_LENGTH) {
// add a single-code point case mapping
set.add(result);
} else {
// add a string case ... | [
"private",
"static",
"final",
"void",
"addCaseMapping",
"(",
"UnicodeSet",
"set",
",",
"int",
"result",
",",
"StringBuilder",
"full",
")",
"{",
"if",
"(",
"result",
">=",
"0",
")",
"{",
"if",
"(",
"result",
">",
"UCaseProps",
".",
"MAX_STRING_LENGTH",
")",... | use str as a temporary string to avoid constructing one | [
"use",
"str",
"as",
"a",
"temporary",
"string",
"to",
"avoid",
"constructing",
"one"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3731-L3744 |
34,671 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.freeze | @Override
public UnicodeSet freeze() {
if (!isFrozen()) {
// Do most of what compact() does before freezing because
// compact() will not work when the set is frozen.
// Small modification: Don't shrink if the savings would be tiny (<=GROW_EXTRA).
// Delete b... | java | @Override
public UnicodeSet freeze() {
if (!isFrozen()) {
// Do most of what compact() does before freezing because
// compact() will not work when the set is frozen.
// Small modification: Don't shrink if the savings would be tiny (<=GROW_EXTRA).
// Delete b... | [
"@",
"Override",
"public",
"UnicodeSet",
"freeze",
"(",
")",
"{",
"if",
"(",
"!",
"isFrozen",
"(",
")",
")",
"{",
"// Do most of what compact() does before freezing because",
"// compact() will not work when the set is frozen.",
"// Small modification: Don't shrink if the savings... | Freeze this class, according to the Freezable interface.
@return this | [
"Freeze",
"this",
"class",
"according",
"to",
"the",
"Freezable",
"interface",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L3913-L3948 |
34,672 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.compareTo | public int compareTo(UnicodeSet o, ComparisonStyle style) {
if (style != ComparisonStyle.LEXICOGRAPHIC) {
int diff = size() - o.size();
if (diff != 0) {
return (diff < 0) == (style == ComparisonStyle.SHORTER_FIRST) ? -1 : 1;
}
}
int result;
... | java | public int compareTo(UnicodeSet o, ComparisonStyle style) {
if (style != ComparisonStyle.LEXICOGRAPHIC) {
int diff = size() - o.size();
if (diff != 0) {
return (diff < 0) == (style == ComparisonStyle.SHORTER_FIRST) ? -1 : 1;
}
}
int result;
... | [
"public",
"int",
"compareTo",
"(",
"UnicodeSet",
"o",
",",
"ComparisonStyle",
"style",
")",
"{",
"if",
"(",
"style",
"!=",
"ComparisonStyle",
".",
"LEXICOGRAPHIC",
")",
"{",
"int",
"diff",
"=",
"size",
"(",
")",
"-",
"o",
".",
"size",
"(",
")",
";",
... | Compares UnicodeSets, in three different ways.
@see java.lang.Comparable#compareTo(java.lang.Object) | [
"Compares",
"UnicodeSets",
"in",
"three",
"different",
"ways",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L4407-L4437 |
34,673 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java | UnicodeSet.compare | public static <T extends Comparable<T>> int compare(Collection<T> collection1, Collection<T> collection2, ComparisonStyle style) {
if (style != ComparisonStyle.LEXICOGRAPHIC) {
int diff = collection1.size() - collection2.size();
if (diff != 0) {
return (diff < 0) == (styl... | java | public static <T extends Comparable<T>> int compare(Collection<T> collection1, Collection<T> collection2, ComparisonStyle style) {
if (style != ComparisonStyle.LEXICOGRAPHIC) {
int diff = collection1.size() - collection2.size();
if (diff != 0) {
return (diff < 0) == (styl... | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"T",
">",
">",
"int",
"compare",
"(",
"Collection",
"<",
"T",
">",
"collection1",
",",
"Collection",
"<",
"T",
">",
"collection2",
",",
"ComparisonStyle",
"style",
")",
"{",
"if",
"(",
"style",
... | Utility to compare two collections, optionally by size, and then lexicographically.
@hide unsupported on Android | [
"Utility",
"to",
"compare",
"two",
"collections",
"optionally",
"by",
"size",
"and",
"then",
"lexicographically",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeSet.java#L4514-L4522 |
34,674 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/AlgorithmParameters.java | AlgorithmParameters.init | public final void init(byte[] params) throws IOException {
if (this.initialized)
throw new IOException("already initialized");
paramSpi.engineInit(params);
this.initialized = true;
} | java | public final void init(byte[] params) throws IOException {
if (this.initialized)
throw new IOException("already initialized");
paramSpi.engineInit(params);
this.initialized = true;
} | [
"public",
"final",
"void",
"init",
"(",
"byte",
"[",
"]",
"params",
")",
"throws",
"IOException",
"{",
"if",
"(",
"this",
".",
"initialized",
")",
"throw",
"new",
"IOException",
"(",
"\"already initialized\"",
")",
";",
"paramSpi",
".",
"engineInit",
"(",
... | Imports the specified parameters and decodes them according to the
primary decoding format for parameters. The primary decoding
format for parameters is ASN.1, if an ASN.1 specification for this type
of parameters exists.
@param params the encoded parameters.
@exception IOException on decoding errors, or if this para... | [
"Imports",
"the",
"specified",
"parameters",
"and",
"decodes",
"them",
"according",
"to",
"the",
"primary",
"decoding",
"format",
"for",
"parameters",
".",
"The",
"primary",
"decoding",
"format",
"for",
"parameters",
"is",
"ASN",
".",
"1",
"if",
"an",
"ASN",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/AlgorithmParameters.java#L379-L384 |
34,675 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PropsVectors.java | PropsVectors.areElementsSame | private boolean areElementsSame(int index1, int[] target, int index2,
int length) {
for (int i = 0; i < length; ++i) {
if (v[index1 + i] != target[index2 + i]) {
return false;
}
}
return true;
} | java | private boolean areElementsSame(int index1, int[] target, int index2,
int length) {
for (int i = 0; i < length; ++i) {
if (v[index1 + i] != target[index2 + i]) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"areElementsSame",
"(",
"int",
"index1",
",",
"int",
"[",
"]",
"target",
",",
"int",
"index2",
",",
"int",
"length",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
... | starting from index2 to index2 + length - 1 | [
"starting",
"from",
"index2",
"to",
"index2",
"+",
"length",
"-",
"1"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PropsVectors.java#L53-L61 |
34,676 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PropsVectors.java | PropsVectors.findRow | private int findRow(int rangeStart) {
int index = 0;
// check the vicinity of the last-seen row (start
// searching with an unrolled loop)
index = prevRow * columns;
if (rangeStart >= v[index]) {
if (rangeStart < v[index + 1]) {
// same row as last s... | java | private int findRow(int rangeStart) {
int index = 0;
// check the vicinity of the last-seen row (start
// searching with an unrolled loop)
index = prevRow * columns;
if (rangeStart >= v[index]) {
if (rangeStart < v[index + 1]) {
// same row as last s... | [
"private",
"int",
"findRow",
"(",
"int",
"rangeStart",
")",
"{",
"int",
"index",
"=",
"0",
";",
"// check the vicinity of the last-seen row (start",
"// searching with an unrolled loop)",
"index",
"=",
"prevRow",
"*",
"columns",
";",
"if",
"(",
"rangeStart",
">=",
"... | points to the start of a row. | [
"points",
"to",
"the",
"start",
"of",
"a",
"row",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PropsVectors.java#L67-L127 |
34,677 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/DESKeySpec.java | DESKeySpec.isWeak | public static boolean isWeak(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
throw new InvalidKeyException("null key");
}
if (key.length - offset < DES_KEY_LEN) {
throw new InvalidKeyException("Wrong key size");
}
for (int i... | java | public static boolean isWeak(byte[] key, int offset)
throws InvalidKeyException {
if (key == null) {
throw new InvalidKeyException("null key");
}
if (key.length - offset < DES_KEY_LEN) {
throw new InvalidKeyException("Wrong key size");
}
for (int i... | [
"public",
"static",
"boolean",
"isWeak",
"(",
"byte",
"[",
"]",
"key",
",",
"int",
"offset",
")",
"throws",
"InvalidKeyException",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"throw",
"new",
"InvalidKeyException",
"(",
"\"null key\"",
")",
";",
"}",
"... | Checks if the given DES key material is weak or semi-weak.
@param key the buffer with the DES key material.
@param offset the offset in <code>key</code>, where the DES key
material starts.
@return true if the given DES key material is weak or semi-weak, false
otherwise.
@exception InvalidKeyException if the given ke... | [
"Checks",
"if",
"the",
"given",
"DES",
"key",
"material",
"is",
"weak",
"or",
"semi",
"-",
"weak",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/spec/DESKeySpec.java#L219-L239 |
34,678 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/UnicodeUtils.java | UnicodeUtils.hasValidCppCharacters | public static boolean hasValidCppCharacters(String s) {
for (char c : s.toCharArray()) {
if (!isValidCppCharacter(c)) {
return false;
}
}
return true;
} | java | public static boolean hasValidCppCharacters(String s) {
for (char c : s.toCharArray()) {
if (!isValidCppCharacter(c)) {
return false;
}
}
return true;
} | [
"public",
"static",
"boolean",
"hasValidCppCharacters",
"(",
"String",
"s",
")",
"{",
"for",
"(",
"char",
"c",
":",
"s",
".",
"toCharArray",
"(",
")",
")",
"{",
"if",
"(",
"!",
"isValidCppCharacter",
"(",
"c",
")",
")",
"{",
"return",
"false",
";",
"... | Returns true if all characters in a string can be expressed as either
C++ universal characters or valid hexadecimal escape sequences. | [
"Returns",
"true",
"if",
"all",
"characters",
"in",
"a",
"string",
"can",
"be",
"expressed",
"as",
"either",
"C",
"++",
"universal",
"characters",
"or",
"valid",
"hexadecimal",
"escape",
"sequences",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/UnicodeUtils.java#L111-L118 |
34,679 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/util/Base64OutputStream.java | Base64OutputStream.embiggen | private byte[] embiggen(byte[] b, int len) {
if (b == null || b.length < len) {
return new byte[len];
} else {
return b;
}
} | java | private byte[] embiggen(byte[] b, int len) {
if (b == null || b.length < len) {
return new byte[len];
} else {
return b;
}
} | [
"private",
"byte",
"[",
"]",
"embiggen",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"len",
")",
"{",
"if",
"(",
"b",
"==",
"null",
"||",
"b",
".",
"length",
"<",
"len",
")",
"{",
"return",
"new",
"byte",
"[",
"len",
"]",
";",
"}",
"else",
"{",
... | If b.length is at least len, return b. Otherwise return a new
byte array of length len. | [
"If",
"b",
".",
"length",
"is",
"at",
"least",
"len",
"return",
"b",
".",
"Otherwise",
"return",
"a",
"new",
"byte",
"array",
"of",
"length",
"len",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/util/Base64OutputStream.java#L148-L154 |
34,680 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/OpMap.java | OpMap.shrink | void shrink()
{
int n = m_opMap.elementAt(MAPINDEX_LENGTH);
m_opMap.setToSize(n + 4);
m_opMap.setElementAt(0,n);
m_opMap.setElementAt(0,n+1);
m_opMap.setElementAt(0,n+2);
n = m_tokenQueue.size();
m_tokenQueue.setToSize(n + 4);
m_tokenQueue.setElementAt(null,n);
m_tokenQueue.se... | java | void shrink()
{
int n = m_opMap.elementAt(MAPINDEX_LENGTH);
m_opMap.setToSize(n + 4);
m_opMap.setElementAt(0,n);
m_opMap.setElementAt(0,n+1);
m_opMap.setElementAt(0,n+2);
n = m_tokenQueue.size();
m_tokenQueue.setToSize(n + 4);
m_tokenQueue.setElementAt(null,n);
m_tokenQueue.se... | [
"void",
"shrink",
"(",
")",
"{",
"int",
"n",
"=",
"m_opMap",
".",
"elementAt",
"(",
"MAPINDEX_LENGTH",
")",
";",
"m_opMap",
".",
"setToSize",
"(",
"n",
"+",
"4",
")",
";",
"m_opMap",
".",
"setElementAt",
"(",
"0",
",",
"n",
")",
";",
"m_opMap",
"."... | Replace the large arrays
with a small array. | [
"Replace",
"the",
"large",
"arrays",
"with",
"a",
"small",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/OpMap.java#L149-L166 |
34,681 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/OpMap.java | OpMap.getNextStepPos | public int getNextStepPos(int opPos)
{
int stepType = getOp(opPos);
if ((stepType >= OpCodes.AXES_START_TYPES)
&& (stepType <= OpCodes.AXES_END_TYPES))
{
return getNextOpPos(opPos);
}
else if ((stepType >= OpCodes.FIRST_NODESET_OP)
&& (stepType <= OpCodes.LAST_NODE... | java | public int getNextStepPos(int opPos)
{
int stepType = getOp(opPos);
if ((stepType >= OpCodes.AXES_START_TYPES)
&& (stepType <= OpCodes.AXES_END_TYPES))
{
return getNextOpPos(opPos);
}
else if ((stepType >= OpCodes.FIRST_NODESET_OP)
&& (stepType <= OpCodes.LAST_NODE... | [
"public",
"int",
"getNextStepPos",
"(",
"int",
"opPos",
")",
"{",
"int",
"stepType",
"=",
"getOp",
"(",
"opPos",
")",
";",
"if",
"(",
"(",
"stepType",
">=",
"OpCodes",
".",
"AXES_START_TYPES",
")",
"&&",
"(",
"stepType",
"<=",
"OpCodes",
".",
"AXES_END_T... | Given a location step position, return the end position, i.e. the
beginning of the next step.
@param opPos the position of a location step.
@return the position of the next location step. | [
"Given",
"a",
"location",
"step",
"position",
"return",
"the",
"end",
"position",
"i",
".",
"e",
".",
"the",
"beginning",
"of",
"the",
"next",
"step",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/OpMap.java#L210-L246 |
34,682 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/OpMap.java | OpMap.getStepNS | public String getStepNS(int opPosOfStep)
{
int argLenOfStep = getArgLengthOfStep(opPosOfStep);
// System.out.println("getStepNS.argLenOfStep: "+argLenOfStep);
if (argLenOfStep == 3)
{
int index = m_opMap.elementAt(opPosOfStep + 4);
if (index >= 0)
return (String) m_tokenQueue.el... | java | public String getStepNS(int opPosOfStep)
{
int argLenOfStep = getArgLengthOfStep(opPosOfStep);
// System.out.println("getStepNS.argLenOfStep: "+argLenOfStep);
if (argLenOfStep == 3)
{
int index = m_opMap.elementAt(opPosOfStep + 4);
if (index >= 0)
return (String) m_tokenQueue.el... | [
"public",
"String",
"getStepNS",
"(",
"int",
"opPosOfStep",
")",
"{",
"int",
"argLenOfStep",
"=",
"getArgLengthOfStep",
"(",
"opPosOfStep",
")",
";",
"// System.out.println(\"getStepNS.argLenOfStep: \"+argLenOfStep);",
"if",
"(",
"argLenOfStep",
"==",
"3",
")",
"{",
"... | Get the namespace of the step.
@param opPosOfStep The position of the FROM_XXX step.
@return The step's namespace, NodeTest.WILD, or null for null namespace. | [
"Get",
"the",
"namespace",
"of",
"the",
"step",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/OpMap.java#L391-L410 |
34,683 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/IPAddressName.java | IPAddressName.parseIPv4 | private void parseIPv4(String name) throws IOException {
// Parse name into byte-value address components
int slashNdx = name.indexOf('/');
if (slashNdx == -1) {
address = InetAddress.getByName(name).getAddress();
} else {
address = new byte[8];
// p... | java | private void parseIPv4(String name) throws IOException {
// Parse name into byte-value address components
int slashNdx = name.indexOf('/');
if (slashNdx == -1) {
address = InetAddress.getByName(name).getAddress();
} else {
address = new byte[8];
// p... | [
"private",
"void",
"parseIPv4",
"(",
"String",
"name",
")",
"throws",
"IOException",
"{",
"// Parse name into byte-value address components",
"int",
"slashNdx",
"=",
"name",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"if",
"(",
"slashNdx",
"==",
"-",
"1",
")",
... | Parse an IPv4 address.
@param name IPv4 address with optional mask values
@throws IOException on error | [
"Parse",
"an",
"IPv4",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/IPAddressName.java#L156-L176 |
34,684 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java | ObjectStreamField.compareTo | public int compareTo(Object o) {
ObjectStreamField f = (ObjectStreamField) o;
boolean thisPrimitive = this.isPrimitive();
boolean fPrimitive = f.isPrimitive();
// If one is primitive and the other isn't, we have enough info to
// compare
if (thisPrimitive != fPrimitive) ... | java | public int compareTo(Object o) {
ObjectStreamField f = (ObjectStreamField) o;
boolean thisPrimitive = this.isPrimitive();
boolean fPrimitive = f.isPrimitive();
// If one is primitive and the other isn't, we have enough info to
// compare
if (thisPrimitive != fPrimitive) ... | [
"public",
"int",
"compareTo",
"(",
"Object",
"o",
")",
"{",
"ObjectStreamField",
"f",
"=",
"(",
"ObjectStreamField",
")",
"o",
";",
"boolean",
"thisPrimitive",
"=",
"this",
".",
"isPrimitive",
"(",
")",
";",
"boolean",
"fPrimitive",
"=",
"f",
".",
"isPrimi... | Compares this field descriptor to the specified one. Checks first if one
of the compared fields has a primitive type and the other one not. If so,
the field with the primitive type is considered to be "smaller". If both
fields are equal, their names are compared.
@param o
the object to compare with.
@return -1 if this... | [
"Compares",
"this",
"field",
"descriptor",
"to",
"the",
"specified",
"one",
".",
"Checks",
"first",
"if",
"one",
"of",
"the",
"compared",
"fields",
"has",
"a",
"primitive",
"type",
"and",
"the",
"other",
"one",
"not",
".",
"If",
"so",
"the",
"field",
"wi... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java#L121-L134 |
34,685 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java | ObjectStreamField.getType | public Class<?> getType() {
Class<?> cl = getTypeInternal();
if (isDeserialized && !cl.isPrimitive()) {
return Object.class;
}
return cl;
} | java | public Class<?> getType() {
Class<?> cl = getTypeInternal();
if (isDeserialized && !cl.isPrimitive()) {
return Object.class;
}
return cl;
} | [
"public",
"Class",
"<",
"?",
">",
"getType",
"(",
")",
"{",
"Class",
"<",
"?",
">",
"cl",
"=",
"getTypeInternal",
"(",
")",
";",
"if",
"(",
"isDeserialized",
"&&",
"!",
"cl",
".",
"isPrimitive",
"(",
")",
")",
"{",
"return",
"Object",
".",
"class",... | Gets the type of this field.
@return a {@code Class} object representing the type of the field. | [
"Gets",
"the",
"type",
"of",
"this",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java#L173-L179 |
34,686 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java | ObjectStreamField.getTypeString | public String getTypeString() {
if (isPrimitive()) {
return null;
}
if (typeString == null) {
Class<?> t = getTypeInternal();
String typeName = t.getName().replace('.', '/');
String str = (t.isArray()) ? typeName : ("L" + typeName + ';');
... | java | public String getTypeString() {
if (isPrimitive()) {
return null;
}
if (typeString == null) {
Class<?> t = getTypeInternal();
String typeName = t.getName().replace('.', '/');
String str = (t.isArray()) ? typeName : ("L" + typeName + ';');
... | [
"public",
"String",
"getTypeString",
"(",
")",
"{",
"if",
"(",
"isPrimitive",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"typeString",
"==",
"null",
")",
"{",
"Class",
"<",
"?",
">",
"t",
"=",
"getTypeInternal",
"(",
")",
";",
"Stri... | Gets the type signature used by the VM to represent the type of this
field.
@return the signature of this field's class or {@code null} if this
field's type is primitive. | [
"Gets",
"the",
"type",
"signature",
"used",
"by",
"the",
"VM",
"to",
"represent",
"the",
"type",
"of",
"this",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java#L235-L246 |
34,687 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java | ObjectStreamField.defaultResolve | private boolean defaultResolve() {
switch (typeString.charAt(0)) {
case 'I':
type = int.class;
return true;
case 'B':
type = byte.class;
return true;
case 'C':
type = char.class;
return true;
case 'S':
... | java | private boolean defaultResolve() {
switch (typeString.charAt(0)) {
case 'I':
type = int.class;
return true;
case 'B':
type = byte.class;
return true;
case 'C':
type = char.class;
return true;
case 'S':
... | [
"private",
"boolean",
"defaultResolve",
"(",
")",
"{",
"switch",
"(",
"typeString",
".",
"charAt",
"(",
"0",
")",
")",
"{",
"case",
"'",
"'",
":",
"type",
"=",
"int",
".",
"class",
";",
"return",
"true",
";",
"case",
"'",
"'",
":",
"type",
"=",
"... | Resolves typeString into type. Returns true if the type is primitive
and false otherwise. | [
"Resolves",
"typeString",
"into",
"type",
".",
"Returns",
"true",
"if",
"the",
"type",
"is",
"primitive",
"and",
"false",
"otherwise",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectStreamField.java#L329-L359 |
34,688 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/AbstractMethodRewriter.java | AbstractMethodRewriter.addReturnTypeNarrowingDeclarations | private void addReturnTypeNarrowingDeclarations(AbstractTypeDeclaration node) {
TypeElement type = node.getTypeElement();
// No need to run this if the entire class is dead.
if (deadCodeMap != null && deadCodeMap.containsClass(type, elementUtil)) {
return;
}
Map<String, ExecutablePair> newDe... | java | private void addReturnTypeNarrowingDeclarations(AbstractTypeDeclaration node) {
TypeElement type = node.getTypeElement();
// No need to run this if the entire class is dead.
if (deadCodeMap != null && deadCodeMap.containsClass(type, elementUtil)) {
return;
}
Map<String, ExecutablePair> newDe... | [
"private",
"void",
"addReturnTypeNarrowingDeclarations",
"(",
"AbstractTypeDeclaration",
"node",
")",
"{",
"TypeElement",
"type",
"=",
"node",
".",
"getTypeElement",
"(",
")",
";",
"// No need to run this if the entire class is dead.",
"if",
"(",
"deadCodeMap",
"!=",
"nul... | specific than what is already declared in inherited types. | [
"specific",
"than",
"what",
"is",
"already",
"declared",
"in",
"inherited",
"types",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/AbstractMethodRewriter.java#L118-L165 |
34,689 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/ReferencePipeline.java | ReferencePipeline.unordered | @Override
public Stream<P_OUT> unordered() {
if (!isOrdered())
return this;
return new StatelessOp<P_OUT, P_OUT>(this, StreamShape.REFERENCE, StreamOpFlag.NOT_ORDERED) {
@Override
public Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) {
return ... | java | @Override
public Stream<P_OUT> unordered() {
if (!isOrdered())
return this;
return new StatelessOp<P_OUT, P_OUT>(this, StreamShape.REFERENCE, StreamOpFlag.NOT_ORDERED) {
@Override
public Sink<P_OUT> opWrapSink(int flags, Sink<P_OUT> sink) {
return ... | [
"@",
"Override",
"public",
"Stream",
"<",
"P_OUT",
">",
"unordered",
"(",
")",
"{",
"if",
"(",
"!",
"isOrdered",
"(",
")",
")",
"return",
"this",
";",
"return",
"new",
"StatelessOp",
"<",
"P_OUT",
",",
"P_OUT",
">",
"(",
"this",
",",
"StreamShape",
"... | Stateless intermediate operations from Stream | [
"Stateless",
"intermediate",
"operations",
"from",
"Stream"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/ReferencePipeline.java#L148-L158 |
34,690 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/ReferencePipeline.java | ReferencePipeline.forEach | @Override
public void forEach(Consumer<? super P_OUT> action) {
evaluate(ForEachOps.makeRef(action, false));
} | java | @Override
public void forEach(Consumer<? super P_OUT> action) {
evaluate(ForEachOps.makeRef(action, false));
} | [
"@",
"Override",
"public",
"void",
"forEach",
"(",
"Consumer",
"<",
"?",
"super",
"P_OUT",
">",
"action",
")",
"{",
"evaluate",
"(",
"ForEachOps",
".",
"makeRef",
"(",
"action",
",",
"false",
")",
")",
";",
"}"
] | Terminal operations from Stream | [
"Terminal",
"operations",
"from",
"Stream"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/ReferencePipeline.java#L417-L420 |
34,691 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java | VariableStack.clearLocalSlots | public void clearLocalSlots(int start, int len)
{
start += _currentFrameBottom;
System.arraycopy(m_nulls, 0, _stackFrames, start, len);
} | java | public void clearLocalSlots(int start, int len)
{
start += _currentFrameBottom;
System.arraycopy(m_nulls, 0, _stackFrames, start, len);
} | [
"public",
"void",
"clearLocalSlots",
"(",
"int",
"start",
",",
"int",
"len",
")",
"{",
"start",
"+=",
"_currentFrameBottom",
";",
"System",
".",
"arraycopy",
"(",
"m_nulls",
",",
"0",
",",
"_stackFrames",
",",
"start",
",",
"len",
")",
";",
"}"
] | Use this to clear the variables in a section of the stack. This is
used to clear the parameter section of the stack, so that default param
values can tell if they've already been set. It is important to note that
this function has a 1K limitation.
@param start The start position, relative to the current local stack ... | [
"Use",
"this",
"to",
"clear",
"the",
"variables",
"in",
"a",
"section",
"of",
"the",
"stack",
".",
"This",
"is",
"used",
"to",
"clear",
"the",
"parameter",
"section",
"of",
"the",
"stack",
"so",
"that",
"default",
"param",
"values",
"can",
"tell",
"if",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java#L408-L414 |
34,692 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java | VariableStack.getGlobalVariable | public XObject getGlobalVariable(XPathContext xctxt, final int index)
throws TransformerException
{
XObject val = _stackFrames[index];
// Lazy execution of variables.
if (val.getType() == XObject.CLASS_UNRESOLVEDVARIABLE)
return (_stackFrames[index] = val.execute(xctxt));
return val... | java | public XObject getGlobalVariable(XPathContext xctxt, final int index)
throws TransformerException
{
XObject val = _stackFrames[index];
// Lazy execution of variables.
if (val.getType() == XObject.CLASS_UNRESOLVEDVARIABLE)
return (_stackFrames[index] = val.execute(xctxt));
return val... | [
"public",
"XObject",
"getGlobalVariable",
"(",
"XPathContext",
"xctxt",
",",
"final",
"int",
"index",
")",
"throws",
"TransformerException",
"{",
"XObject",
"val",
"=",
"_stackFrames",
"[",
"index",
"]",
";",
"// Lazy execution of variables.",
"if",
"(",
"val",
".... | Get a global variable or parameter from the global stack frame.
@param xctxt The XPath context, which must be passed in order to
lazy evaluate variables.
@param index Global variable index relative to the global stack
frame bottom.
@return The value of the variable.
@throws TransformerException | [
"Get",
"a",
"global",
"variable",
"or",
"parameter",
"from",
"the",
"global",
"stack",
"frame",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java#L444-L455 |
34,693 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java | VariableStack.getVariableOrParam | public XObject getVariableOrParam(
XPathContext xctxt, org.apache.xml.utils.QName qname)
throws javax.xml.transform.TransformerException
{
org.apache.xml.utils.PrefixResolver prefixResolver =
xctxt.getNamespaceContext();
// Get the current ElemTemplateElement, which must be pushe... | java | public XObject getVariableOrParam(
XPathContext xctxt, org.apache.xml.utils.QName qname)
throws javax.xml.transform.TransformerException
{
org.apache.xml.utils.PrefixResolver prefixResolver =
xctxt.getNamespaceContext();
// Get the current ElemTemplateElement, which must be pushe... | [
"public",
"XObject",
"getVariableOrParam",
"(",
"XPathContext",
"xctxt",
",",
"org",
".",
"apache",
".",
"xml",
".",
"utils",
".",
"QName",
"qname",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"org",
".",
"apache",... | Get a variable based on it's qualified name.
This is for external use only.
@param xctxt The XPath context, which must be passed in order to
lazy evaluate variables.
@param qname The qualified name of the variable.
@return The evaluated value of the variable.
@throws javax.xml.transform.TransformerException | [
"Get",
"a",
"variable",
"based",
"on",
"it",
"s",
"qualified",
"name",
".",
"This",
"is",
"for",
"external",
"use",
"only",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/VariableStack.java#L497-L545 |
34,694 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GenderInfo.java | GenderInfo.getListGender | @Deprecated
public Gender getListGender(List<Gender> genders) {
if (genders.size() == 0) {
return Gender.OTHER; // degenerate case
}
if (genders.size() == 1) {
return genders.get(0); // degenerate case
}
switch(style) {
case NEUTRAL:
... | java | @Deprecated
public Gender getListGender(List<Gender> genders) {
if (genders.size() == 0) {
return Gender.OTHER; // degenerate case
}
if (genders.size() == 1) {
return genders.get(0); // degenerate case
}
switch(style) {
case NEUTRAL:
... | [
"@",
"Deprecated",
"public",
"Gender",
"getListGender",
"(",
"List",
"<",
"Gender",
">",
"genders",
")",
"{",
"if",
"(",
"genders",
".",
"size",
"(",
")",
"==",
"0",
")",
"{",
"return",
"Gender",
".",
"OTHER",
";",
"// degenerate case",
"}",
"if",
"(",... | Get the gender of a list, based on locale usage.
@param genders a list of genders.
@return the gender of the list.
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Get",
"the",
"gender",
"of",
"a",
"list",
"based",
"on",
"locale",
"usage",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GenderInfo.java#L166-L210 |
34,695 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/GeneralName.java | GeneralName.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
name.encode(tmp);
int nameType = name.getType();
if (nameType == GeneralNameInterface.NAME_ANY ||
nameType == GeneralNameInterface.NAME_X400 ||
nameType == Ge... | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
name.encode(tmp);
int nameType = name.getType();
if (nameType == GeneralNameInterface.NAME_ANY ||
nameType == GeneralNameInterface.NAME_X400 ||
nameType == Ge... | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"name",
".",
"encode",
"(",
"tmp",
")",
";",
"int",
"nameType",
"=",
"name",
".",
"getType... | Encode the name to the specified DerOutputStream.
@param out the DerOutputStream to encode the the GeneralName to.
@exception IOException on encoding errors. | [
"Encode",
"the",
"name",
"to",
"the",
"specified",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/GeneralName.java#L227-L248 |
34,696 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.handleGetExtendedYear | protected int handleGetExtendedYear() {
int year;
if (newestStamp(ERA, YEAR, UNSET) <= getStamp(EXTENDED_YEAR)) {
year = internalGet(EXTENDED_YEAR, 1); // Default to year 1
} else {
int cycle = internalGet(ERA, 1) - 1; // 0-based cycle
// adjust to the instanc... | java | protected int handleGetExtendedYear() {
int year;
if (newestStamp(ERA, YEAR, UNSET) <= getStamp(EXTENDED_YEAR)) {
year = internalGet(EXTENDED_YEAR, 1); // Default to year 1
} else {
int cycle = internalGet(ERA, 1) - 1; // 0-based cycle
// adjust to the instanc... | [
"protected",
"int",
"handleGetExtendedYear",
"(",
")",
"{",
"int",
"year",
";",
"if",
"(",
"newestStamp",
"(",
"ERA",
",",
"YEAR",
",",
"UNSET",
")",
"<=",
"getStamp",
"(",
"EXTENDED_YEAR",
")",
")",
"{",
"year",
"=",
"internalGet",
"(",
"EXTENDED_YEAR",
... | Implement abstract Calendar method to return the extended year
defined by the current fields. This will use either the ERA and
YEAR field as the cycle and year-of-cycle, or the EXTENDED_YEAR
field as the continuous year count, depending on which is newer. | [
"Implement",
"abstract",
"Calendar",
"method",
"to",
"return",
"the",
"extended",
"year",
"defined",
"by",
"the",
"current",
"fields",
".",
"This",
"will",
"use",
"either",
"the",
"ERA",
"and",
"YEAR",
"field",
"as",
"the",
"cycle",
"and",
"year",
"-",
"of... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L432-L442 |
34,697 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.handleGetMonthLength | protected int handleGetMonthLength(int extendedYear, int month) {
int thisStart = handleComputeMonthStart(extendedYear, month, true) -
EPOCH_JULIAN_DAY + 1; // Julian day -> local days
int nextStart = newMoonNear(thisStart + SYNODIC_GAP, true);
return nextStart - thisStart;
} | java | protected int handleGetMonthLength(int extendedYear, int month) {
int thisStart = handleComputeMonthStart(extendedYear, month, true) -
EPOCH_JULIAN_DAY + 1; // Julian day -> local days
int nextStart = newMoonNear(thisStart + SYNODIC_GAP, true);
return nextStart - thisStart;
} | [
"protected",
"int",
"handleGetMonthLength",
"(",
"int",
"extendedYear",
",",
"int",
"month",
")",
"{",
"int",
"thisStart",
"=",
"handleComputeMonthStart",
"(",
"extendedYear",
",",
"month",
",",
"true",
")",
"-",
"EPOCH_JULIAN_DAY",
"+",
"1",
";",
"// Julian day... | Override Calendar method to return the number of days in the given
extended year and month.
<p>Note: This method also reads the IS_LEAP_MONTH field to determine
whether or not the given month is a leap month. | [
"Override",
"Calendar",
"method",
"to",
"return",
"the",
"number",
"of",
"days",
"in",
"the",
"given",
"extended",
"year",
"and",
"month",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L451-L456 |
34,698 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.newMoonNear | private int newMoonNear(int days, boolean after) {
astro.setTime(daysToMillis(days));
long newMoon = astro.getMoonTime(CalendarAstronomer.NEW_MOON, after);
return millisToDays(newMoon);
} | java | private int newMoonNear(int days, boolean after) {
astro.setTime(daysToMillis(days));
long newMoon = astro.getMoonTime(CalendarAstronomer.NEW_MOON, after);
return millisToDays(newMoon);
} | [
"private",
"int",
"newMoonNear",
"(",
"int",
"days",
",",
"boolean",
"after",
")",
"{",
"astro",
".",
"setTime",
"(",
"daysToMillis",
"(",
"days",
")",
")",
";",
"long",
"newMoon",
"=",
"astro",
".",
"getMoonTime",
"(",
"CalendarAstronomer",
".",
"NEW_MOON... | Return the closest new moon to the given date, searching either
forward or backward in time.
@param days days after January 1, 1970 0:00 Asia/Shanghai
@param after if true, search for a new moon on or after the given
date; otherwise, search for a new moon before it
@return days after January 1, 1970 0:00 Asia/Shanghai ... | [
"Return",
"the",
"closest",
"new",
"moon",
"to",
"the",
"given",
"date",
"searching",
"either",
"forward",
"or",
"backward",
"in",
"time",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L712-L718 |
34,699 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java | ChineseCalendar.majorSolarTerm | private int majorSolarTerm(int days) {
astro.setTime(daysToMillis(days));
// Compute (floor(solarLongitude / (pi/6)) + 2) % 12
int term = ((int) Math.floor(6 * astro.getSunLongitude() / Math.PI) + 2) % 12;
if (term < 1) {
term += 12;
}
return term;
... | java | private int majorSolarTerm(int days) {
astro.setTime(daysToMillis(days));
// Compute (floor(solarLongitude / (pi/6)) + 2) % 12
int term = ((int) Math.floor(6 * astro.getSunLongitude() / Math.PI) + 2) % 12;
if (term < 1) {
term += 12;
}
return term;
... | [
"private",
"int",
"majorSolarTerm",
"(",
"int",
"days",
")",
"{",
"astro",
".",
"setTime",
"(",
"daysToMillis",
"(",
"days",
")",
")",
";",
"// Compute (floor(solarLongitude / (pi/6)) + 2) % 12",
"int",
"term",
"=",
"(",
"(",
"int",
")",
"Math",
".",
"floor",
... | Return the major solar term on or before a given date. This
will be an integer from 1..12, with 1 corresponding to 330 degrees,
2 to 0 degrees, 3 to 30 degrees,..., and 12 to 300 degrees.
@param days days after January 1, 1970 0:00 Asia/Shanghai | [
"Return",
"the",
"major",
"solar",
"term",
"on",
"or",
"before",
"a",
"given",
"date",
".",
"This",
"will",
"be",
"an",
"integer",
"from",
"1",
"..",
"12",
"with",
"1",
"corresponding",
"to",
"330",
"degrees",
"2",
"to",
"0",
"degrees",
"3",
"to",
"3... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ChineseCalendar.java#L737-L747 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.