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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
32,900 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java | DateFormatSymbols.initializeData | protected void initializeData(ULocale desiredLocale, String type)
{
String key = desiredLocale.getBaseName() + '+' + type;
String ns = desiredLocale.getKeywordValue("numbers");
if (ns != null && ns.length() > 0) {
key += '+' + ns;
}
DateFormatSymbols dfs = DFSCACH... | java | protected void initializeData(ULocale desiredLocale, String type)
{
String key = desiredLocale.getBaseName() + '+' + type;
String ns = desiredLocale.getKeywordValue("numbers");
if (ns != null && ns.length() > 0) {
key += '+' + ns;
}
DateFormatSymbols dfs = DFSCACH... | [
"protected",
"void",
"initializeData",
"(",
"ULocale",
"desiredLocale",
",",
"String",
"type",
")",
"{",
"String",
"key",
"=",
"desiredLocale",
".",
"getBaseName",
"(",
")",
"+",
"'",
"'",
"+",
"type",
";",
"String",
"ns",
"=",
"desiredLocale",
".",
"getKe... | We may need to deescalate this API to @internal. | [
"We",
"may",
"need",
"to",
"deescalate",
"this",
"API",
"to"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L1499-L1508 |
32,901 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java | DateFormatSymbols.initializeData | void initializeData(DateFormatSymbols dfs) {
this.eras = dfs.eras;
this.eraNames = dfs.eraNames;
this.narrowEras = dfs.narrowEras;
this.months = dfs.months;
this.shortMonths = dfs.shortMonths;
this.narrowMonths = dfs.narrowMonths;
this.standaloneMonths = dfs.stand... | java | void initializeData(DateFormatSymbols dfs) {
this.eras = dfs.eras;
this.eraNames = dfs.eraNames;
this.narrowEras = dfs.narrowEras;
this.months = dfs.months;
this.shortMonths = dfs.shortMonths;
this.narrowMonths = dfs.narrowMonths;
this.standaloneMonths = dfs.stand... | [
"void",
"initializeData",
"(",
"DateFormatSymbols",
"dfs",
")",
"{",
"this",
".",
"eras",
"=",
"dfs",
".",
"eras",
";",
"this",
".",
"eraNames",
"=",
"dfs",
".",
"eraNames",
";",
"this",
".",
"narrowEras",
"=",
"dfs",
".",
"narrowEras",
";",
"this",
".... | Initializes format symbols using another instance.
TODO Clean up initialization methods for subclasses | [
"Initializes",
"format",
"symbols",
"using",
"another",
"instance",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L1515-L1558 |
32,902 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java | DateFormatSymbols.loadDayPeriodStrings | private String[] loadDayPeriodStrings(Map<String, String> resourceMap) {
String strings[] = new String[DAY_PERIOD_KEYS.length];
if (resourceMap != null) {
for (int i = 0; i < DAY_PERIOD_KEYS.length; ++i) {
strings[i] = resourceMap.get(DAY_PERIOD_KEYS[i]); // Null if string d... | java | private String[] loadDayPeriodStrings(Map<String, String> resourceMap) {
String strings[] = new String[DAY_PERIOD_KEYS.length];
if (resourceMap != null) {
for (int i = 0; i < DAY_PERIOD_KEYS.length; ++i) {
strings[i] = resourceMap.get(DAY_PERIOD_KEYS[i]); // Null if string d... | [
"private",
"String",
"[",
"]",
"loadDayPeriodStrings",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"resourceMap",
")",
"{",
"String",
"strings",
"[",
"]",
"=",
"new",
"String",
"[",
"DAY_PERIOD_KEYS",
".",
"length",
"]",
";",
"if",
"(",
"resourceMap",
... | Loads localized names for day periods in the requested format.
@param resourceMap Contains the dayPeriod resource to load | [
"Loads",
"localized",
"names",
"for",
"day",
"periods",
"in",
"the",
"requested",
"format",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L2069-L2077 |
32,903 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java | DateFormatSymbols.setLocale | final void setLocale(ULocale valid, ULocale actual) {
// Change the following to an assertion later
if ((valid == null) != (actual == null)) {
///CLOVER:OFF
throw new IllegalArgumentException();
///CLOVER:ON
}
// Another check we could do is that the a... | java | final void setLocale(ULocale valid, ULocale actual) {
// Change the following to an assertion later
if ((valid == null) != (actual == null)) {
///CLOVER:OFF
throw new IllegalArgumentException();
///CLOVER:ON
}
// Another check we could do is that the a... | [
"final",
"void",
"setLocale",
"(",
"ULocale",
"valid",
",",
"ULocale",
"actual",
")",
"{",
"// Change the following to an assertion later",
"if",
"(",
"(",
"valid",
"==",
"null",
")",
"!=",
"(",
"actual",
"==",
"null",
")",
")",
"{",
"///CLOVER:OFF",
"throw",
... | Sets information about the locales that were used to create this
object. If the object was not constructed from locale data,
both arguments should be set to null. Otherwise, neither
should be null. The actual locale must be at the same level or
less specific than the valid locale. This method is intended
for use by... | [
"Sets",
"information",
"about",
"the",
"locales",
"that",
"were",
"used",
"to",
"create",
"this",
"object",
".",
"If",
"the",
"object",
"was",
"not",
"constructed",
"from",
"locale",
"data",
"both",
"arguments",
"should",
"be",
"set",
"to",
"null",
".",
"O... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateFormatSymbols.java#L2437-L2448 |
32,904 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java | TransliteratorParser.checkVariableRange | private void checkVariableRange(int ch, String rule, int start) {
if (ch >= curData.variablesBase && ch < variableLimit) {
syntaxError("Variable range character in rule", rule, start);
}
} | java | private void checkVariableRange(int ch, String rule, int start) {
if (ch >= curData.variablesBase && ch < variableLimit) {
syntaxError("Variable range character in rule", rule, start);
}
} | [
"private",
"void",
"checkVariableRange",
"(",
"int",
"ch",
",",
"String",
"rule",
",",
"int",
"start",
")",
"{",
"if",
"(",
"ch",
">=",
"curData",
".",
"variablesBase",
"&&",
"ch",
"<",
"variableLimit",
")",
"{",
"syntaxError",
"(",
"\"Variable range charact... | Assert that the given character is NOT within the variable range.
If it is, signal an error. This is neccesary to ensure that the
variable range does not overlap characters used in a rule. | [
"Assert",
"that",
"the",
"given",
"character",
"is",
"NOT",
"within",
"the",
"variable",
"range",
".",
"If",
"it",
"is",
"signal",
"an",
"error",
".",
"This",
"is",
"neccesary",
"to",
"ensure",
"that",
"the",
"variable",
"range",
"does",
"not",
"overlap",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java#L1332-L1336 |
32,905 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java | TransliteratorParser.resemblesPragma | static boolean resemblesPragma(String rule, int pos, int limit) {
// Must start with /use\s/i
return Utility.parsePattern(rule, pos, limit, "use ", null) >= 0;
} | java | static boolean resemblesPragma(String rule, int pos, int limit) {
// Must start with /use\s/i
return Utility.parsePattern(rule, pos, limit, "use ", null) >= 0;
} | [
"static",
"boolean",
"resemblesPragma",
"(",
"String",
"rule",
",",
"int",
"pos",
",",
"int",
"limit",
")",
"{",
"// Must start with /use\\s/i",
"return",
"Utility",
".",
"parsePattern",
"(",
"rule",
",",
"pos",
",",
"limit",
",",
"\"use \"",
",",
"null",
")... | Return true if the given rule looks like a pragma.
@param pos offset to the first non-whitespace character
of the rule.
@param limit pointer past the last character of the rule. | [
"Return",
"true",
"if",
"the",
"given",
"rule",
"looks",
"like",
"a",
"pragma",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java#L1372-L1375 |
32,906 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java | TransliteratorParser.syntaxError | static final void syntaxError(String msg, String rule, int start) {
int end = ruleEnd(rule, start, rule.length());
throw new IllegalIcuArgumentException(msg + " in \"" +
Utility.escape(rule.substring(start, end)) + '"');
} | java | static final void syntaxError(String msg, String rule, int start) {
int end = ruleEnd(rule, start, rule.length());
throw new IllegalIcuArgumentException(msg + " in \"" +
Utility.escape(rule.substring(start, end)) + '"');
} | [
"static",
"final",
"void",
"syntaxError",
"(",
"String",
"msg",
",",
"String",
"rule",
",",
"int",
"start",
")",
"{",
"int",
"end",
"=",
"ruleEnd",
"(",
"rule",
",",
"start",
",",
"rule",
".",
"length",
"(",
")",
")",
";",
"throw",
"new",
"IllegalIcu... | Throw an exception indicating a syntax error. Search the rule string
for the probable end of the rule. Of course, if the error is that
the end of rule marker is missing, then the rule end will not be found.
In any case the rule start will be correctly reported.
@param msg error description
@param rule pattern string
... | [
"Throw",
"an",
"exception",
"indicating",
"a",
"syntax",
"error",
".",
"Search",
"the",
"rule",
"string",
"for",
"the",
"probable",
"end",
"of",
"the",
"rule",
".",
"Of",
"course",
"if",
"the",
"error",
"is",
"that",
"the",
"end",
"of",
"rule",
"marker",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java#L1435-L1439 |
32,907 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java | TransliteratorParser.parseSet | private final char parseSet(String rule, ParsePosition pos) {
UnicodeSet set = new UnicodeSet(rule, pos, parseData);
if (variableNext >= variableLimit) {
throw new RuntimeException("Private use variables exhausted");
}
set.compact();
return generateStandInFor(set);
... | java | private final char parseSet(String rule, ParsePosition pos) {
UnicodeSet set = new UnicodeSet(rule, pos, parseData);
if (variableNext >= variableLimit) {
throw new RuntimeException("Private use variables exhausted");
}
set.compact();
return generateStandInFor(set);
... | [
"private",
"final",
"char",
"parseSet",
"(",
"String",
"rule",
",",
"ParsePosition",
"pos",
")",
"{",
"UnicodeSet",
"set",
"=",
"new",
"UnicodeSet",
"(",
"rule",
",",
"pos",
",",
"parseData",
")",
";",
"if",
"(",
"variableNext",
">=",
"variableLimit",
")",... | Parse a UnicodeSet out, store it, and return the stand-in character
used to represent it. | [
"Parse",
"a",
"UnicodeSet",
"out",
"store",
"it",
"and",
"return",
"the",
"stand",
"-",
"in",
"character",
"used",
"to",
"represent",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java#L1453-L1460 |
32,908 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java | TransliteratorParser.generateStandInFor | char generateStandInFor(Object obj) {
// assert(obj != null);
// Look up previous stand-in, if any. This is a short list
// (typical n is 0, 1, or 2); linear search is optimal.
for (int i=0; i<variablesVector.size(); ++i) {
if (variablesVector.get(i) == obj) { // [sic] poin... | java | char generateStandInFor(Object obj) {
// assert(obj != null);
// Look up previous stand-in, if any. This is a short list
// (typical n is 0, 1, or 2); linear search is optimal.
for (int i=0; i<variablesVector.size(); ++i) {
if (variablesVector.get(i) == obj) { // [sic] poin... | [
"char",
"generateStandInFor",
"(",
"Object",
"obj",
")",
"{",
"// assert(obj != null);",
"// Look up previous stand-in, if any. This is a short list",
"// (typical n is 0, 1, or 2); linear search is optimal.",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"variablesVector",... | Generate and return a stand-in for a new UnicodeMatcher or UnicodeReplacer.
Store the object. | [
"Generate",
"and",
"return",
"a",
"stand",
"-",
"in",
"for",
"a",
"new",
"UnicodeMatcher",
"or",
"UnicodeReplacer",
".",
"Store",
"the",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java#L1466-L1482 |
32,909 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java | TransliteratorParser.appendVariableDef | private void appendVariableDef(String name, StringBuffer buf) {
char[] ch = variableNames.get(name);
if (ch == null) {
// We allow one undefined variable so that variable definition
// statements work. For the first undefined variable we return
// the special placeho... | java | private void appendVariableDef(String name, StringBuffer buf) {
char[] ch = variableNames.get(name);
if (ch == null) {
// We allow one undefined variable so that variable definition
// statements work. For the first undefined variable we return
// the special placeho... | [
"private",
"void",
"appendVariableDef",
"(",
"String",
"name",
",",
"StringBuffer",
"buf",
")",
"{",
"char",
"[",
"]",
"ch",
"=",
"variableNames",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"ch",
"==",
"null",
")",
"{",
"// We allow one undefined variab... | Append the value of the given variable name to the given
StringBuffer.
@exception IllegalIcuArgumentException if the name is unknown. | [
"Append",
"the",
"value",
"of",
"the",
"given",
"variable",
"name",
"to",
"the",
"given",
"StringBuffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorParser.java#L1542-L1562 |
32,910 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/security/auth/callback/PasswordCallback.java | PasswordCallback.clearPassword | public void clearPassword() {
if (inputPassword != null) {
for (int i = 0; i < inputPassword.length; i++)
inputPassword[i] = ' ';
}
} | java | public void clearPassword() {
if (inputPassword != null) {
for (int i = 0; i < inputPassword.length; i++)
inputPassword[i] = ' ';
}
} | [
"public",
"void",
"clearPassword",
"(",
")",
"{",
"if",
"(",
"inputPassword",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"inputPassword",
".",
"length",
";",
"i",
"++",
")",
"inputPassword",
"[",
"i",
"]",
"=",
"'",
... | Clear the retrieved password. | [
"Clear",
"the",
"retrieved",
"password",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/security/auth/callback/PasswordCallback.java#L136-L141 |
32,911 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/ServerSocketChannelImpl.java | ServerSocketChannelImpl.translateReadyOps | public boolean translateReadyOps(int ops, int initialOps,
SelectionKeyImpl sk) {
int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
int oldOps = sk.nioReadyOps();
int newOps = initialOps;
if ((ops & PollArrayWrapper.POLLNVAL) != ... | java | public boolean translateReadyOps(int ops, int initialOps,
SelectionKeyImpl sk) {
int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
int oldOps = sk.nioReadyOps();
int newOps = initialOps;
if ((ops & PollArrayWrapper.POLLNVAL) != ... | [
"public",
"boolean",
"translateReadyOps",
"(",
"int",
"ops",
",",
"int",
"initialOps",
",",
"SelectionKeyImpl",
"sk",
")",
"{",
"int",
"intOps",
"=",
"sk",
".",
"nioInterestOps",
"(",
")",
";",
"// Do this just once, it synchronizes",
"int",
"oldOps",
"=",
"sk",... | Translates native poll revent set into a ready operation set | [
"Translates",
"native",
"poll",
"revent",
"set",
"into",
"a",
"ready",
"operation",
"set"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/ServerSocketChannelImpl.java#L308-L334 |
32,912 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.getKeywordValues | public static final String[] getKeywordValues(String baseName, String keyword) {
Set<String> keywords = new HashSet<String>();
ULocale locales[] = getAvailEntry(baseName, ICU_DATA_CLASS_LOADER).getULocaleList();
int i;
for (i = 0; i < locales.length; i++) {
try {
... | java | public static final String[] getKeywordValues(String baseName, String keyword) {
Set<String> keywords = new HashSet<String>();
ULocale locales[] = getAvailEntry(baseName, ICU_DATA_CLASS_LOADER).getULocaleList();
int i;
for (i = 0; i < locales.length; i++) {
try {
... | [
"public",
"static",
"final",
"String",
"[",
"]",
"getKeywordValues",
"(",
"String",
"baseName",
",",
"String",
"keyword",
")",
"{",
"Set",
"<",
"String",
">",
"keywords",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"ULocale",
"locales",
"["... | Given a tree path and keyword, return a string enumeration of all possible values for that keyword.
@param baseName resource specifier
@param keyword a particular keyword to consider, must match a top level resource name
within the tree. (i.e. "collations")
@hide draft / provisional / internal are hidden on Android | [
"Given",
"a",
"tree",
"path",
"and",
"keyword",
"return",
"a",
"string",
"enumeration",
"of",
"all",
"possible",
"values",
"for",
"that",
"keyword",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L254-L279 |
32,913 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.getStringWithFallback | public String getStringWithFallback(String path) throws MissingResourceException {
// Optimized form of getWithFallback(path).getString();
ICUResourceBundle actualBundle = this;
String result = findStringWithFallback(path, actualBundle, null);
if (result == null) {
throw new... | java | public String getStringWithFallback(String path) throws MissingResourceException {
// Optimized form of getWithFallback(path).getString();
ICUResourceBundle actualBundle = this;
String result = findStringWithFallback(path, actualBundle, null);
if (result == null) {
throw new... | [
"public",
"String",
"getStringWithFallback",
"(",
"String",
"path",
")",
"throws",
"MissingResourceException",
"{",
"// Optimized form of getWithFallback(path).getString();",
"ICUResourceBundle",
"actualBundle",
"=",
"this",
";",
"String",
"result",
"=",
"findStringWithFallback... | will throw type mismatch exception if the resource is not a string | [
"will",
"throw",
"type",
"mismatch",
"exception",
"if",
"the",
"resource",
"is",
"not",
"a",
"string"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L353-L369 |
32,914 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.getAvailableLocaleNameSet | public static Set<String> getAvailableLocaleNameSet(String bundlePrefix, ClassLoader loader) {
return getAvailEntry(bundlePrefix, loader).getLocaleNameSet();
} | java | public static Set<String> getAvailableLocaleNameSet(String bundlePrefix, ClassLoader loader) {
return getAvailEntry(bundlePrefix, loader).getLocaleNameSet();
} | [
"public",
"static",
"Set",
"<",
"String",
">",
"getAvailableLocaleNameSet",
"(",
"String",
"bundlePrefix",
",",
"ClassLoader",
"loader",
")",
"{",
"return",
"getAvailEntry",
"(",
"bundlePrefix",
",",
"loader",
")",
".",
"getLocaleNameSet",
"(",
")",
";",
"}"
] | Return a set of the locale names supported by a collection of resource
bundles.
@param bundlePrefix the prefix of the resource bundles to use. | [
"Return",
"a",
"set",
"of",
"the",
"locale",
"names",
"supported",
"by",
"a",
"collection",
"of",
"resource",
"bundles",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L441-L443 |
32,915 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.getFullLocaleNameSet | public static Set<String> getFullLocaleNameSet(String bundlePrefix, ClassLoader loader) {
return getAvailEntry(bundlePrefix, loader).getFullLocaleNameSet();
} | java | public static Set<String> getFullLocaleNameSet(String bundlePrefix, ClassLoader loader) {
return getAvailEntry(bundlePrefix, loader).getFullLocaleNameSet();
} | [
"public",
"static",
"Set",
"<",
"String",
">",
"getFullLocaleNameSet",
"(",
"String",
"bundlePrefix",
",",
"ClassLoader",
"loader",
")",
"{",
"return",
"getAvailEntry",
"(",
"bundlePrefix",
",",
"loader",
")",
".",
"getFullLocaleNameSet",
"(",
")",
";",
"}"
] | Return a set of all the locale names supported by a collection of
resource bundles.
@param bundlePrefix the prefix of the resource bundles to use. | [
"Return",
"a",
"set",
"of",
"all",
"the",
"locale",
"names",
"supported",
"by",
"a",
"collection",
"of",
"resource",
"bundles",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L459-L461 |
32,916 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.addLocaleIDsFromIndexBundle | private static final void addLocaleIDsFromIndexBundle(String baseName,
ClassLoader root, Set<String> locales) {
ICUResourceBundle bundle;
try {
bundle = (ICUResourceBundle) UResourceBundle.instantiateBundle(baseName, ICU_RESOURCE_INDEX, root, true);
bundle = (ICUResou... | java | private static final void addLocaleIDsFromIndexBundle(String baseName,
ClassLoader root, Set<String> locales) {
ICUResourceBundle bundle;
try {
bundle = (ICUResourceBundle) UResourceBundle.instantiateBundle(baseName, ICU_RESOURCE_INDEX, root, true);
bundle = (ICUResou... | [
"private",
"static",
"final",
"void",
"addLocaleIDsFromIndexBundle",
"(",
"String",
"baseName",
",",
"ClassLoader",
"root",
",",
"Set",
"<",
"String",
">",
"locales",
")",
"{",
"ICUResourceBundle",
"bundle",
";",
"try",
"{",
"bundle",
"=",
"(",
"ICUResourceBundl... | and returns the data in a different form. | [
"and",
"returns",
"the",
"data",
"in",
"a",
"different",
"form",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L577-L596 |
32,917 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.getResPathKeys | private void getResPathKeys(String[] keys, int depth) {
ICUResourceBundle b = this;
while (depth > 0) {
keys[--depth] = b.key;
b = b.container;
assert (depth == 0) == (b.container == null);
}
} | java | private void getResPathKeys(String[] keys, int depth) {
ICUResourceBundle b = this;
while (depth > 0) {
keys[--depth] = b.key;
b = b.container;
assert (depth == 0) == (b.container == null);
}
} | [
"private",
"void",
"getResPathKeys",
"(",
"String",
"[",
"]",
"keys",
",",
"int",
"depth",
")",
"{",
"ICUResourceBundle",
"b",
"=",
"this",
";",
"while",
"(",
"depth",
">",
"0",
")",
"{",
"keys",
"[",
"--",
"depth",
"]",
"=",
"b",
".",
"key",
";",
... | Fills some of the keys array with the keys on the path to this resource object.
Writes the top-level key into index 0 and increments from there.
@param keys
@param depth must be {@link #getResDepth()} | [
"Fills",
"some",
"of",
"the",
"keys",
"array",
"with",
"the",
"keys",
"on",
"the",
"path",
"to",
"this",
"resource",
"object",
".",
"Writes",
"the",
"top",
"-",
"level",
"key",
"into",
"index",
"0",
"and",
"increments",
"from",
"there",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L976-L983 |
32,918 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java | ICUResourceBundle.createBundle | public static ICUResourceBundle createBundle(String baseName, String localeID, ClassLoader root) {
ICUResourceBundleReader reader = ICUResourceBundleReader.getReader(baseName, localeID, root);
if (reader == null) {
// could not open the .res file
return null;
}
re... | java | public static ICUResourceBundle createBundle(String baseName, String localeID, ClassLoader root) {
ICUResourceBundleReader reader = ICUResourceBundleReader.getReader(baseName, localeID, root);
if (reader == null) {
// could not open the .res file
return null;
}
re... | [
"public",
"static",
"ICUResourceBundle",
"createBundle",
"(",
"String",
"baseName",
",",
"String",
"localeID",
",",
"ClassLoader",
"root",
")",
"{",
"ICUResourceBundleReader",
"reader",
"=",
"ICUResourceBundleReader",
".",
"getReader",
"(",
"baseName",
",",
"localeID"... | Create a bundle using a reader.
@param baseName The name for the bundle.
@param localeID The locale identification.
@param root The ClassLoader object root.
@return the new bundle | [
"Create",
"a",
"bundle",
"using",
"a",
"reader",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L1283-L1290 |
32,919 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CanonicalIterator.java | CanonicalIterator.reset | public void reset() {
done = false;
for (int i = 0; i < current.length; ++i) {
current[i] = 0;
}
} | java | public void reset() {
done = false;
for (int i = 0; i < current.length; ++i) {
current[i] = 0;
}
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"done",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"current",
".",
"length",
";",
"++",
"i",
")",
"{",
"current",
"[",
"i",
"]",
"=",
"0",
";",
"}",
"}"
] | Resets the iterator so that one can start again from the beginning. | [
"Resets",
"the",
"iterator",
"so",
"that",
"one",
"can",
"start",
"again",
"from",
"the",
"beginning",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CanonicalIterator.java#L70-L75 |
32,920 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CanonicalIterator.java | CanonicalIterator.setSource | public void setSource(String newSource) {
source = nfd.normalize(newSource);
done = false;
// catch degenerate case
if (newSource.length() == 0) {
pieces = new String[1][];
current = new int[1];
pieces[0] = new String[]{""};
return;
... | java | public void setSource(String newSource) {
source = nfd.normalize(newSource);
done = false;
// catch degenerate case
if (newSource.length() == 0) {
pieces = new String[1][];
current = new int[1];
pieces[0] = new String[]{""};
return;
... | [
"public",
"void",
"setSource",
"(",
"String",
"newSource",
")",
"{",
"source",
"=",
"nfd",
".",
"normalize",
"(",
"newSource",
")",
";",
"done",
"=",
"false",
";",
"// catch degenerate case",
"if",
"(",
"newSource",
".",
"length",
"(",
")",
"==",
"0",
")... | Set a new source for this iterator. Allows object reuse.
@param newSource the source string to iterate against. This allows the same iterator to be used
while changing the source string, saving object creation. | [
"Set",
"a",
"new",
"source",
"for",
"this",
"iterator",
".",
"Allows",
"object",
"reuse",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CanonicalIterator.java#L113-L151 |
32,921 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CanonicalIterator.java | CanonicalIterator.getEquivalents | private String[] getEquivalents(String segment) {
Set<String> result = new HashSet<String>();
Set<String> basic = getEquivalents2(segment);
Set<String> permutations = new HashSet<String>();
// now get all the permutations
// add only the ones that are canonically equivalent
... | java | private String[] getEquivalents(String segment) {
Set<String> result = new HashSet<String>();
Set<String> basic = getEquivalents2(segment);
Set<String> permutations = new HashSet<String>();
// now get all the permutations
// add only the ones that are canonically equivalent
... | [
"private",
"String",
"[",
"]",
"getEquivalents",
"(",
"String",
"segment",
")",
"{",
"Set",
"<",
"String",
">",
"result",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"Set",
"<",
"String",
">",
"basic",
"=",
"getEquivalents2",
"(",
"segmen... | we have a segment, in NFD. Find all the strings that are canonically equivalent to it. | [
"we",
"have",
"a",
"segment",
"in",
"NFD",
".",
"Find",
"all",
"the",
"strings",
"that",
"are",
"canonically",
"equivalent",
"to",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CanonicalIterator.java#L246-L282 |
32,922 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/JapaneseCalendar.java | JapaneseCalendar.handleGetLimit | @SuppressWarnings("fallthrough")
protected int handleGetLimit(int field, int limitType) {
switch (field) {
case ERA:
if (limitType == MINIMUM || limitType == GREATEST_MINIMUM) {
return 0;
}
return CURRENT_ERA;
case YEAR:
{
... | java | @SuppressWarnings("fallthrough")
protected int handleGetLimit(int field, int limitType) {
switch (field) {
case ERA:
if (limitType == MINIMUM || limitType == GREATEST_MINIMUM) {
return 0;
}
return CURRENT_ERA;
case YEAR:
{
... | [
"@",
"SuppressWarnings",
"(",
"\"fallthrough\"",
")",
"protected",
"int",
"handleGetLimit",
"(",
"int",
"field",
",",
"int",
"limitType",
")",
"{",
"switch",
"(",
"field",
")",
"{",
"case",
"ERA",
":",
"if",
"(",
"limitType",
"==",
"MINIMUM",
"||",
"limitT... | Override GregorianCalendar. We should really handle YEAR_WOY and
EXTENDED_YEAR here too to implement the 1..5000000 range, but it's
not critical. | [
"Override",
"GregorianCalendar",
".",
"We",
"should",
"really",
"handle",
"YEAR_WOY",
"and",
"EXTENDED_YEAR",
"here",
"too",
"to",
"implement",
"the",
"1",
"..",
"5000000",
"range",
"but",
"it",
"s",
"not",
"critical",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/JapaneseCalendar.java#L587-L611 |
32,923 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/Providers.java | Providers.getSunProvider | public static Provider getSunProvider() {
try {
Class<?> clazz = Class.forName(jarVerificationProviders[0]);
return (Provider)clazz.newInstance();
} catch (Exception e) {
try {
Class<?> clazz = Class.forName(BACKUP_PROVIDER_CLASSNAME);
... | java | public static Provider getSunProvider() {
try {
Class<?> clazz = Class.forName(jarVerificationProviders[0]);
return (Provider)clazz.newInstance();
} catch (Exception e) {
try {
Class<?> clazz = Class.forName(BACKUP_PROVIDER_CLASSNAME);
... | [
"public",
"static",
"Provider",
"getSunProvider",
"(",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"Class",
".",
"forName",
"(",
"jarVerificationProviders",
"[",
"0",
"]",
")",
";",
"return",
"(",
"Provider",
")",
"clazz",
".",
"newInstan... | sun.security.util.ManifestEntryVerifier and java.security.SecureRandom. | [
"sun",
".",
"security",
".",
"util",
".",
"ManifestEntryVerifier",
"and",
"java",
".",
"security",
".",
"SecureRandom",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/Providers.java#L104-L116 |
32,924 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/Providers.java | Providers.getProviderList | public static ProviderList getProviderList() {
ProviderList list = getThreadProviderList();
if (list == null) {
list = getSystemProviderList();
}
return list;
} | java | public static ProviderList getProviderList() {
ProviderList list = getThreadProviderList();
if (list == null) {
list = getSystemProviderList();
}
return list;
} | [
"public",
"static",
"ProviderList",
"getProviderList",
"(",
")",
"{",
"ProviderList",
"list",
"=",
"getThreadProviderList",
"(",
")",
";",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"list",
"=",
"getSystemProviderList",
"(",
")",
";",
"}",
"return",
"list",
... | Return the current ProviderList. If the thread-local list is set,
it is returned. Otherwise, the system wide list is returned. | [
"Return",
"the",
"current",
"ProviderList",
".",
"If",
"the",
"thread",
"-",
"local",
"list",
"is",
"set",
"it",
"is",
"returned",
".",
"Otherwise",
"the",
"system",
"wide",
"list",
"is",
"returned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/Providers.java#L143-L149 |
32,925 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java | WriterToUTF8Buffered.write | public void write(final int c) throws IOException
{
/* If we are close to the end of the buffer then flush it.
* Remember the buffer can hold a few more bytes than BYTES_MAX
*/
if (count >= BYTES_MAX)
flushBuffer();
if (c < 0x80)
{
m_outputBytes[count++] = (byte) (c);
... | java | public void write(final int c) throws IOException
{
/* If we are close to the end of the buffer then flush it.
* Remember the buffer can hold a few more bytes than BYTES_MAX
*/
if (count >= BYTES_MAX)
flushBuffer();
if (c < 0x80)
{
m_outputBytes[count++] = (byte) (c);
... | [
"public",
"void",
"write",
"(",
"final",
"int",
"c",
")",
"throws",
"IOException",
"{",
"/* If we are close to the end of the buffer then flush it.\n * Remember the buffer can hold a few more bytes than BYTES_MAX\n */",
"if",
"(",
"count",
">=",
"BYTES_MAX",
")",
"flushBu... | Write a single character. The character to be written is contained in
the 16 low-order bits of the given integer value; the 16 high-order bits
are ignored.
<p> Subclasses that intend to support efficient single-character output
should override this method.
@param c int specifying a character to be written.
@excepti... | [
"Write",
"a",
"single",
"character",
".",
"The",
"character",
"to",
"be",
"written",
"is",
"contained",
"in",
"the",
"16",
"low",
"-",
"order",
"bits",
"of",
"the",
"given",
"integer",
"value",
";",
"the",
"16",
"high",
"-",
"order",
"bits",
"are",
"ig... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java#L132-L164 |
32,926 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java | LocPathIterator.readObject | private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException, javax.xml.transform.TransformerException
{
try
{
stream.defaultReadObject();
m_clones = new IteratorPool(this);
}
catch (ClassNotFoundException cnfe)
{
throw new javax.xml.transform.T... | java | private void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException, javax.xml.transform.TransformerException
{
try
{
stream.defaultReadObject();
m_clones = new IteratorPool(this);
}
catch (ClassNotFoundException cnfe)
{
throw new javax.xml.transform.T... | [
"private",
"void",
"readObject",
"(",
"java",
".",
"io",
".",
"ObjectInputStream",
"stream",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
",",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"try",
"{",
"stream",
".",
"def... | Read the object from a serialization stream.
@param stream Input stream to read from
@throws java.io.IOException
@throws javax.xml.transform.TransformerException | [
"Read",
"the",
"object",
"from",
"a",
"serialization",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java#L135-L147 |
32,927 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java | LocPathIterator.execute | public XObject execute(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
XNodeSet iter = new XNodeSet((LocPathIterator)m_clones.getInstance());
iter.setRoot(xctxt.getCurrentNode(), xctxt);
return iter;
} | java | public XObject execute(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
XNodeSet iter = new XNodeSet((LocPathIterator)m_clones.getInstance());
iter.setRoot(xctxt.getCurrentNode(), xctxt);
return iter;
} | [
"public",
"XObject",
"execute",
"(",
"XPathContext",
"xctxt",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"XNodeSet",
"iter",
"=",
"new",
"XNodeSet",
"(",
"(",
"LocPathIterator",
")",
"m_clones",
".",
"getInstance",
... | Execute this iterator, meaning create a clone that can
store state, and initialize it for fast execution from
the current runtime state. When this is called, no actual
query from the current context node is performed.
@param xctxt The XPath execution context.
@return An XNodeSet reference that holds this iterator.
... | [
"Execute",
"this",
"iterator",
"meaning",
"create",
"a",
"clone",
"that",
"can",
"store",
"state",
"and",
"initialize",
"it",
"for",
"fast",
"execution",
"from",
"the",
"current",
"runtime",
"state",
".",
"When",
"this",
"is",
"called",
"no",
"actual",
"quer... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java#L206-L215 |
32,928 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java | LocPathIterator.asNode | public int asNode(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
DTMIterator iter = (DTMIterator)m_clones.getInstance();
int current = xctxt.getCurrentNode();
iter.setRoot(current, xctxt);
int next = iter.nextNode();
// m_clones.freeInstance(iter);
iter.de... | java | public int asNode(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
DTMIterator iter = (DTMIterator)m_clones.getInstance();
int current = xctxt.getCurrentNode();
iter.setRoot(current, xctxt);
int next = iter.nextNode();
// m_clones.freeInstance(iter);
iter.de... | [
"public",
"int",
"asNode",
"(",
"XPathContext",
"xctxt",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"DTMIterator",
"iter",
"=",
"(",
"DTMIterator",
")",
"m_clones",
".",
"getInstance",
"(",
")",
";",
"int",
"curre... | Return the first node out of the nodeset, if this expression is
a nodeset expression. This is the default implementation for
nodesets. Derived classes should try and override this and return a
value without having to do a clone operation.
@param xctxt The XPath runtime context.
@return the first node out of the nodes... | [
"Return",
"the",
"first",
"node",
"out",
"of",
"the",
"nodeset",
"if",
"this",
"expression",
"is",
"a",
"nodeset",
"expression",
".",
"This",
"is",
"the",
"default",
"implementation",
"for",
"nodesets",
".",
"Derived",
"classes",
"should",
"try",
"and",
"ove... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java#L293-L306 |
32,929 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java | LocPathIterator.runTo | public void runTo(int index)
{
if (m_foundLast || ((index >= 0) && (index <= getCurrentPos())))
return;
int n;
if (-1 == index)
{
while (DTM.NULL != (n = nextNode()));
}
else
{
while (DTM.NULL != (n = nextNode()))
{
if (getCurrentPos() >= index)
... | java | public void runTo(int index)
{
if (m_foundLast || ((index >= 0) && (index <= getCurrentPos())))
return;
int n;
if (-1 == index)
{
while (DTM.NULL != (n = nextNode()));
}
else
{
while (DTM.NULL != (n = nextNode()))
{
if (getCurrentPos() >= index)
... | [
"public",
"void",
"runTo",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"m_foundLast",
"||",
"(",
"(",
"index",
">=",
"0",
")",
"&&",
"(",
"index",
"<=",
"getCurrentPos",
"(",
")",
")",
")",
")",
"return",
";",
"int",
"n",
";",
"if",
"(",
"-",
"1"... | If an index is requested, NodeSetDTM will call this method
to run the iterator to the index. By default this sets
m_next to the index. If the index argument is -1, this
signals that the iterator should be run to the end.
@param index The index to run to, or -1 if the iterator
should run to the end. | [
"If",
"an",
"index",
"is",
"requested",
"NodeSetDTM",
"will",
"call",
"this",
"method",
"to",
"run",
"the",
"iterator",
"to",
"the",
"index",
".",
"By",
"default",
"this",
"sets",
"m_next",
"to",
"the",
"index",
".",
"If",
"the",
"index",
"argument",
"is... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/LocPathIterator.java#L796-L816 |
32,930 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/DefaultMethodShimGenerator.java | DefaultMethodShimGenerator.getOverrideSignature | private String getOverrideSignature(ExecutablePair method) {
StringBuilder sb = new StringBuilder(ElementUtil.getName(method.element()));
sb.append('(');
for (TypeMirror pType : method.type().getParameterTypes()) {
sb.append(typeUtil.getSignatureName(pType));
}
sb.append(')');
return sb.to... | java | private String getOverrideSignature(ExecutablePair method) {
StringBuilder sb = new StringBuilder(ElementUtil.getName(method.element()));
sb.append('(');
for (TypeMirror pType : method.type().getParameterTypes()) {
sb.append(typeUtil.getSignatureName(pType));
}
sb.append(')');
return sb.to... | [
"private",
"String",
"getOverrideSignature",
"(",
"ExecutablePair",
"method",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
"ElementUtil",
".",
"getName",
"(",
"method",
".",
"element",
"(",
")",
")",
")",
";",
"sb",
".",
"append",
"(",
... | otherwise. Used as a key to group inherited methods together. | [
"otherwise",
".",
"Used",
"as",
"a",
"key",
"to",
"group",
"inherited",
"methods",
"together",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DefaultMethodShimGenerator.java#L244-L252 |
32,931 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Enum.java | Enum.compareTo | public final int compareTo(E o) {
Enum<?> other = (Enum<?>)o;
Enum<E> self = this;
if (self.getClass() != other.getClass() && // optimization
self.getDeclaringClass() != other.getDeclaringClass())
throw new ClassCastException();
return self.ordinal - other.ordinal... | java | public final int compareTo(E o) {
Enum<?> other = (Enum<?>)o;
Enum<E> self = this;
if (self.getClass() != other.getClass() && // optimization
self.getDeclaringClass() != other.getDeclaringClass())
throw new ClassCastException();
return self.ordinal - other.ordinal... | [
"public",
"final",
"int",
"compareTo",
"(",
"E",
"o",
")",
"{",
"Enum",
"<",
"?",
">",
"other",
"=",
"(",
"Enum",
"<",
"?",
">",
")",
"o",
";",
"Enum",
"<",
"E",
">",
"self",
"=",
"this",
";",
"if",
"(",
"self",
".",
"getClass",
"(",
")",
"... | Compares this enum with the specified object for order. Returns a
negative integer, zero, or a positive integer as this object is less
than, equal to, or greater than the specified object.
Enum constants are only comparable to other enum constants of the
same enum type. The natural order implemented by this
method i... | [
"Compares",
"this",
"enum",
"with",
"the",
"specified",
"object",
"for",
"order",
".",
"Returns",
"a",
"negative",
"integer",
"zero",
"or",
"a",
"positive",
"integer",
"as",
"this",
"object",
"is",
"less",
"than",
"equal",
"to",
"or",
"greater",
"than",
"t... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Enum.java#L192-L199 |
32,932 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Enum.java | Enum.getSharedConstants | @SuppressWarnings("unchecked") // the cache always returns the type matching enumType
public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) {
return (T[]) sharedConstantsCache.get(enumType);
} | java | @SuppressWarnings("unchecked") // the cache always returns the type matching enumType
public static <T extends Enum<T>> T[] getSharedConstants(Class<T> enumType) {
return (T[]) sharedConstantsCache.get(enumType);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"// the cache always returns the type matching enumType",
"public",
"static",
"<",
"T",
"extends",
"Enum",
"<",
"T",
">",
">",
"T",
"[",
"]",
"getSharedConstants",
"(",
"Class",
"<",
"T",
">",
"enumType",
")",
... | Returns a shared, mutable array containing the constants of this enum. It
is an error to modify the returned array.
@hide | [
"Returns",
"a",
"shared",
"mutable",
"array",
"containing",
"the",
"constants",
"of",
"this",
"enum",
".",
"It",
"is",
"an",
"error",
"to",
"modify",
"the",
"returned",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Enum.java#L299-L302 |
32,933 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.subStream | public DerInputStream subStream(int len, boolean do_skip)
throws IOException {
DerInputBuffer newbuf = buffer.dup();
newbuf.truncate(len);
if (do_skip) {
buffer.skip(len);
}
return new DerInputStream(newbuf);
} | java | public DerInputStream subStream(int len, boolean do_skip)
throws IOException {
DerInputBuffer newbuf = buffer.dup();
newbuf.truncate(len);
if (do_skip) {
buffer.skip(len);
}
return new DerInputStream(newbuf);
} | [
"public",
"DerInputStream",
"subStream",
"(",
"int",
"len",
",",
"boolean",
"do_skip",
")",
"throws",
"IOException",
"{",
"DerInputBuffer",
"newbuf",
"=",
"buffer",
".",
"dup",
"(",
")",
";",
"newbuf",
".",
"truncate",
"(",
"len",
")",
";",
"if",
"(",
"d... | Creates a new DER input stream from part of this input stream.
@param len how long a chunk of the current input stream to use,
starting at the current position.
@param do_skip true if the existing data in the input stream should
be skipped. If this value is false, the next data read
on this stream and the newly creat... | [
"Creates",
"a",
"new",
"DER",
"input",
"stream",
"from",
"part",
"of",
"this",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L132-L141 |
32,934 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getInteger | public int getInteger() throws IOException {
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
return buffer.getInteger(getLength(buffer));
} | java | public int getInteger() throws IOException {
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
return buffer.getInteger(getLength(buffer));
} | [
"public",
"int",
"getInteger",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_Integer",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"DER input, Integer tag error\"",
")",
";",
"}",
"return"... | Get an integer from the input stream as an integer.
@return the integer held in this DER input stream. | [
"Get",
"an",
"integer",
"from",
"the",
"input",
"stream",
"as",
"an",
"integer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L166-L171 |
32,935 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getBigInteger | public BigInteger getBigInteger() throws IOException {
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
return buffer.getBigInteger(getLength(buffer), false);
} | java | public BigInteger getBigInteger() throws IOException {
if (buffer.read() != DerValue.tag_Integer) {
throw new IOException("DER input, Integer tag error");
}
return buffer.getBigInteger(getLength(buffer), false);
} | [
"public",
"BigInteger",
"getBigInteger",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_Integer",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"DER input, Integer tag error\"",
")",
";",
"}",
... | Get a integer from the input stream as a BigInteger object.
@return the integer held in this DER input stream. | [
"Get",
"a",
"integer",
"from",
"the",
"input",
"stream",
"as",
"a",
"BigInteger",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L178-L183 |
32,936 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getEnumerated | public int getEnumerated() throws IOException {
if (buffer.read() != DerValue.tag_Enumerated) {
throw new IOException("DER input, Enumerated tag error");
}
return buffer.getInteger(getLength(buffer));
} | java | public int getEnumerated() throws IOException {
if (buffer.read() != DerValue.tag_Enumerated) {
throw new IOException("DER input, Enumerated tag error");
}
return buffer.getInteger(getLength(buffer));
} | [
"public",
"int",
"getEnumerated",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_Enumerated",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"DER input, Enumerated tag error\"",
")",
";",
"}",
... | Get an enumerated from the input stream.
@return the integer held in this DER input stream. | [
"Get",
"an",
"enumerated",
"from",
"the",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L204-L209 |
32,937 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getUnalignedBitString | public BitArray getUnalignedBitString() throws IOException {
if (buffer.read() != DerValue.tag_BitString)
throw new IOException("DER input not a bit string");
int length = getLength(buffer) - 1;
/*
* First byte = number of excess bits in the last octet of the
* re... | java | public BitArray getUnalignedBitString() throws IOException {
if (buffer.read() != DerValue.tag_BitString)
throw new IOException("DER input not a bit string");
int length = getLength(buffer) - 1;
/*
* First byte = number of excess bits in the last octet of the
* re... | [
"public",
"BitArray",
"getUnalignedBitString",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_BitString",
")",
"throw",
"new",
"IOException",
"(",
"\"DER input not a bit string\"",
")",
";",
"int",... | Get a bit string from the input stream. The bit string need
not be byte-aligned. | [
"Get",
"a",
"bit",
"string",
"from",
"the",
"input",
"stream",
".",
"The",
"bit",
"string",
"need",
"not",
"be",
"byte",
"-",
"aligned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L226-L243 |
32,938 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getOctetString | public byte[] getOctetString() throws IOException {
if (buffer.read() != DerValue.tag_OctetString)
throw new IOException("DER input not an octet string");
int length = getLength(buffer);
byte[] retval = new byte[length];
if ((length != 0) && (buffer.read(retval) != length))
... | java | public byte[] getOctetString() throws IOException {
if (buffer.read() != DerValue.tag_OctetString)
throw new IOException("DER input not an octet string");
int length = getLength(buffer);
byte[] retval = new byte[length];
if ((length != 0) && (buffer.read(retval) != length))
... | [
"public",
"byte",
"[",
"]",
"getOctetString",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_OctetString",
")",
"throw",
"new",
"IOException",
"(",
"\"DER input not an octet string\"",
")",
";",
... | Returns an ASN.1 OCTET STRING from the input stream. | [
"Returns",
"an",
"ASN",
".",
"1",
"OCTET",
"STRING",
"from",
"the",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L248-L258 |
32,939 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getBytes | public void getBytes(byte[] val) throws IOException {
if ((val.length != 0) && (buffer.read(val) != val.length)) {
throw new IOException("short read of DER octet string");
}
} | java | public void getBytes(byte[] val) throws IOException {
if ((val.length != 0) && (buffer.read(val) != val.length)) {
throw new IOException("short read of DER octet string");
}
} | [
"public",
"void",
"getBytes",
"(",
"byte",
"[",
"]",
"val",
")",
"throws",
"IOException",
"{",
"if",
"(",
"(",
"val",
".",
"length",
"!=",
"0",
")",
"&&",
"(",
"buffer",
".",
"read",
"(",
"val",
")",
"!=",
"val",
".",
"length",
")",
")",
"{",
"... | Returns the asked number of bytes from the input stream. | [
"Returns",
"the",
"asked",
"number",
"of",
"bytes",
"from",
"the",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L263-L267 |
32,940 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getSequence | public DerValue[] getSequence(int startLen,
boolean originalEncodedFormRetained) throws IOException {
tag = (byte)buffer.read();
if (tag != DerValue.tag_Sequence)
throw new IOException("Sequence tag error");
return readVector(startLen, originalEncodedFormRetained);
} | java | public DerValue[] getSequence(int startLen,
boolean originalEncodedFormRetained) throws IOException {
tag = (byte)buffer.read();
if (tag != DerValue.tag_Sequence)
throw new IOException("Sequence tag error");
return readVector(startLen, originalEncodedFormRetained);
} | [
"public",
"DerValue",
"[",
"]",
"getSequence",
"(",
"int",
"startLen",
",",
"boolean",
"originalEncodedFormRetained",
")",
"throws",
"IOException",
"{",
"tag",
"=",
"(",
"byte",
")",
"buffer",
".",
"read",
"(",
")",
";",
"if",
"(",
"tag",
"!=",
"DerValue",... | Return a sequence of encoded entities. ASN.1 sequences are
ordered, and they are often used, like a "struct" in C or C++,
to group data values. They may have optional or context
specific values.
@param startLen guess about how long the sequence will be
(used to initialize an auto-growing data structure)
@return arra... | [
"Return",
"a",
"sequence",
"of",
"encoded",
"entities",
".",
"ASN",
".",
"1",
"sequences",
"are",
"ordered",
"and",
"they",
"are",
"often",
"used",
"like",
"a",
"struct",
"in",
"C",
"or",
"C",
"++",
"to",
"group",
"data",
"values",
".",
"They",
"may",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L294-L300 |
32,941 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.readString | private String readString(byte stringTag, String stringName,
String enc) throws IOException {
if (buffer.read() != stringTag)
throw new IOException("DER input not a " +
stringName + " string");
int length = getLength(buffer);
... | java | private String readString(byte stringTag, String stringName,
String enc) throws IOException {
if (buffer.read() != stringTag)
throw new IOException("DER input not a " +
stringName + " string");
int length = getLength(buffer);
... | [
"private",
"String",
"readString",
"(",
"byte",
"stringTag",
",",
"String",
"stringName",
",",
"String",
"enc",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"stringTag",
")",
"throw",
"new",
"IOException",
"(",
"\"DE... | Private helper routine to read an encoded string from the input
stream.
@param stringTag the tag for the type of string to read
@param stringName a name to display in error messages
@param enc the encoder to use to interpret the data. Should
correspond to the stringTag above. | [
"Private",
"helper",
"routine",
"to",
"read",
"an",
"encoded",
"string",
"from",
"the",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L514-L528 |
32,942 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getUTCTime | public Date getUTCTime() throws IOException {
if (buffer.read() != DerValue.tag_UtcTime)
throw new IOException("DER input, UTCtime tag invalid ");
return buffer.getUTCTime(getLength(buffer));
} | java | public Date getUTCTime() throws IOException {
if (buffer.read() != DerValue.tag_UtcTime)
throw new IOException("DER input, UTCtime tag invalid ");
return buffer.getUTCTime(getLength(buffer));
} | [
"public",
"Date",
"getUTCTime",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_UtcTime",
")",
"throw",
"new",
"IOException",
"(",
"\"DER input, UTCtime tag invalid \"",
")",
";",
"return",
"buffe... | Get a UTC encoded time value from the input stream. | [
"Get",
"a",
"UTC",
"encoded",
"time",
"value",
"from",
"the",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L533-L537 |
32,943 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java | DerInputStream.getGeneralizedTime | public Date getGeneralizedTime() throws IOException {
if (buffer.read() != DerValue.tag_GeneralizedTime)
throw new IOException("DER input, GeneralizedTime tag invalid ");
return buffer.getGeneralizedTime(getLength(buffer));
} | java | public Date getGeneralizedTime() throws IOException {
if (buffer.read() != DerValue.tag_GeneralizedTime)
throw new IOException("DER input, GeneralizedTime tag invalid ");
return buffer.getGeneralizedTime(getLength(buffer));
} | [
"public",
"Date",
"getGeneralizedTime",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buffer",
".",
"read",
"(",
")",
"!=",
"DerValue",
".",
"tag_GeneralizedTime",
")",
"throw",
"new",
"IOException",
"(",
"\"DER input, GeneralizedTime tag invalid \"",
")",
"... | Get a Generalized encoded time value from the input stream. | [
"Get",
"a",
"Generalized",
"encoded",
"time",
"value",
"from",
"the",
"input",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputStream.java#L542-L546 |
32,944 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationRuleParser.java | CollationRuleParser.getReorderCode | public static int getReorderCode(String word) {
for(int i = 0; i < gSpecialReorderCodes.length; ++i) {
if(word.equalsIgnoreCase(gSpecialReorderCodes[i])) {
return Collator.ReorderCodes.FIRST + i;
}
}
try {
int script = UCharacter.getPropertyVal... | java | public static int getReorderCode(String word) {
for(int i = 0; i < gSpecialReorderCodes.length; ++i) {
if(word.equalsIgnoreCase(gSpecialReorderCodes[i])) {
return Collator.ReorderCodes.FIRST + i;
}
}
try {
int script = UCharacter.getPropertyVal... | [
"public",
"static",
"int",
"getReorderCode",
"(",
"String",
"word",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"gSpecialReorderCodes",
".",
"length",
";",
"++",
"i",
")",
"{",
"if",
"(",
"word",
".",
"equalsIgnoreCase",
"(",
"gSpecialRe... | Gets a script or reorder code from its string representation.
@return the script/reorder code, or
-1 if not recognized | [
"Gets",
"a",
"script",
"or",
"reorder",
"code",
"from",
"its",
"string",
"representation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationRuleParser.java#L746-L764 |
32,945 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java | JavadocConverter.convertJavadoc | static Javadoc convertJavadoc(
TreePath path, String source, JavacEnvironment env, boolean reportWarnings) {
DocTrees docTrees = DocTrees.instance(env.task());
DocCommentTree docComment = docTrees.getDocCommentTree(path);
if (docComment == null) {
return null; // Declaration does not have a java... | java | static Javadoc convertJavadoc(
TreePath path, String source, JavacEnvironment env, boolean reportWarnings) {
DocTrees docTrees = DocTrees.instance(env.task());
DocCommentTree docComment = docTrees.getDocCommentTree(path);
if (docComment == null) {
return null; // Declaration does not have a java... | [
"static",
"Javadoc",
"convertJavadoc",
"(",
"TreePath",
"path",
",",
"String",
"source",
",",
"JavacEnvironment",
"env",
",",
"boolean",
"reportWarnings",
")",
"{",
"DocTrees",
"docTrees",
"=",
"DocTrees",
".",
"instance",
"(",
"env",
".",
"task",
"(",
")",
... | Returns an AST node for the javadoc comment of a specified class, method, or field element. | [
"Returns",
"an",
"AST",
"node",
"for",
"the",
"javadoc",
"comment",
"of",
"a",
"specified",
"class",
"method",
"or",
"field",
"element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java#L80-L117 |
32,946 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java | JavadocConverter.setTagValues | private TagElement setTagValues(TagElement tag, TagKind tagKind, DocTree javadocNode,
DocTree body) {
tag.setTagKind(tagKind);
setPos(javadocNode, tag);
scan(body, tag);
return tag;
} | java | private TagElement setTagValues(TagElement tag, TagKind tagKind, DocTree javadocNode,
DocTree body) {
tag.setTagKind(tagKind);
setPos(javadocNode, tag);
scan(body, tag);
return tag;
} | [
"private",
"TagElement",
"setTagValues",
"(",
"TagElement",
"tag",
",",
"TagKind",
"tagKind",
",",
"DocTree",
"javadocNode",
",",
"DocTree",
"body",
")",
"{",
"tag",
".",
"setTagKind",
"(",
"tagKind",
")",
";",
"setPos",
"(",
"javadocNode",
",",
"tag",
")",
... | Updates a tag element with values from the javadoc node. | [
"Updates",
"a",
"tag",
"element",
"with",
"values",
"from",
"the",
"javadoc",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java#L310-L316 |
32,947 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java | JavadocConverter.setPos | private TreeNode setPos(DocTree node, TreeNode newNode) {
int pos = pos(node);
return newNode.setPosition(new SourcePosition(pos, length(node), lineNumber(pos)));
} | java | private TreeNode setPos(DocTree node, TreeNode newNode) {
int pos = pos(node);
return newNode.setPosition(new SourcePosition(pos, length(node), lineNumber(pos)));
} | [
"private",
"TreeNode",
"setPos",
"(",
"DocTree",
"node",
",",
"TreeNode",
"newNode",
")",
"{",
"int",
"pos",
"=",
"pos",
"(",
"node",
")",
";",
"return",
"newNode",
".",
"setPosition",
"(",
"new",
"SourcePosition",
"(",
"pos",
",",
"length",
"(",
"node",... | Set a TreeNode's position using the original DocTree. | [
"Set",
"a",
"TreeNode",
"s",
"position",
"using",
"the",
"original",
"DocTree",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java#L329-L332 |
32,948 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java | JavadocConverter.setPos | private TreeNode setPos(TreeNode newNode, int pos, int endPos) {
return newNode.setPosition(new SourcePosition(pos, endPos - pos, lineNumber(pos)));
} | java | private TreeNode setPos(TreeNode newNode, int pos, int endPos) {
return newNode.setPosition(new SourcePosition(pos, endPos - pos, lineNumber(pos)));
} | [
"private",
"TreeNode",
"setPos",
"(",
"TreeNode",
"newNode",
",",
"int",
"pos",
",",
"int",
"endPos",
")",
"{",
"return",
"newNode",
".",
"setPosition",
"(",
"new",
"SourcePosition",
"(",
"pos",
",",
"endPos",
"-",
"pos",
",",
"lineNumber",
"(",
"pos",
"... | Set a TreeNode's position using begin and end source offsets. Its line number
is unchanged. | [
"Set",
"a",
"TreeNode",
"s",
"position",
"using",
"begin",
"and",
"end",
"source",
"offsets",
".",
"Its",
"line",
"number",
"is",
"unchanged",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavadocConverter.java#L338-L340 |
32,949 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.transliterate | public final int transliterate(Replaceable text, int start, int limit) {
if (start < 0 ||
limit < start ||
text.length() < limit) {
return -1;
}
Position pos = new Position(start, limit, start);
filteredTransliterate(text, pos, false, true);
r... | java | public final int transliterate(Replaceable text, int start, int limit) {
if (start < 0 ||
limit < start ||
text.length() < limit) {
return -1;
}
Position pos = new Position(start, limit, start);
filteredTransliterate(text, pos, false, true);
r... | [
"public",
"final",
"int",
"transliterate",
"(",
"Replaceable",
"text",
",",
"int",
"start",
",",
"int",
"limit",
")",
"{",
"if",
"(",
"start",
"<",
"0",
"||",
"limit",
"<",
"start",
"||",
"text",
".",
"length",
"(",
")",
"<",
"limit",
")",
"{",
"re... | Transliterates a segment of a string, with optional filtering.
@param text the string to be transliterated
@param start the beginning index, inclusive; <code>0 <= start
<= limit</code>.
@param limit the ending index, exclusive; <code>start <= limit
<= text.length()</code>.
@return The new limit index. The... | [
"Transliterates",
"a",
"segment",
"of",
"a",
"string",
"with",
"optional",
"filtering",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L513-L523 |
32,950 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.transliterate | public final String transliterate(String text) {
ReplaceableString result = new ReplaceableString(text);
transliterate(result);
return result.toString();
} | java | public final String transliterate(String text) {
ReplaceableString result = new ReplaceableString(text);
transliterate(result);
return result.toString();
} | [
"public",
"final",
"String",
"transliterate",
"(",
"String",
"text",
")",
"{",
"ReplaceableString",
"result",
"=",
"new",
"ReplaceableString",
"(",
"text",
")",
";",
"transliterate",
"(",
"result",
")",
";",
"return",
"result",
".",
"toString",
"(",
")",
";"... | Transliterate an entire string and returns the result. Convenience method.
@param text the string to be transliterated
@return The transliterated text | [
"Transliterate",
"an",
"entire",
"string",
"and",
"returns",
"the",
"result",
".",
"Convenience",
"method",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L539-L543 |
32,951 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.filteredTransliterate | public void filteredTransliterate(Replaceable text,
Position index,
boolean incremental) {
filteredTransliterate(text, index, incremental, false);
} | java | public void filteredTransliterate(Replaceable text,
Position index,
boolean incremental) {
filteredTransliterate(text, index, incremental, false);
} | [
"public",
"void",
"filteredTransliterate",
"(",
"Replaceable",
"text",
",",
"Position",
"index",
",",
"boolean",
"incremental",
")",
"{",
"filteredTransliterate",
"(",
"text",
",",
"index",
",",
"incremental",
",",
"false",
")",
";",
"}"
] | Transliterate a substring of text, as specified by index, taking filters
into account. This method is for subclasses that need to delegate to
another transliterator, such as CompoundTransliterator.
@param text the text to be transliterated
@param index the position indices
@param incremental if TRUE, then assume more ... | [
"Transliterate",
"a",
"substring",
"of",
"text",
"as",
"specified",
"by",
"index",
"taking",
"filters",
"into",
"account",
".",
"This",
"method",
"is",
"for",
"subclasses",
"that",
"need",
"to",
"delegate",
"to",
"another",
"transliterator",
"such",
"as",
"Com... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1094-L1098 |
32,952 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.getBasicInstance | static Transliterator getBasicInstance(String id, String canonID) {
StringBuffer s = new StringBuffer();
Transliterator t = registry.get(id, s);
if (s.length() != 0) {
// assert(t==0);
// Instantiate an alias
t = getInstance(s.toString(), FORWARD);
}
... | java | static Transliterator getBasicInstance(String id, String canonID) {
StringBuffer s = new StringBuffer();
Transliterator t = registry.get(id, s);
if (s.length() != 0) {
// assert(t==0);
// Instantiate an alias
t = getInstance(s.toString(), FORWARD);
}
... | [
"static",
"Transliterator",
"getBasicInstance",
"(",
"String",
"id",
",",
"String",
"canonID",
")",
"{",
"StringBuffer",
"s",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"Transliterator",
"t",
"=",
"registry",
".",
"get",
"(",
"id",
",",
"s",
")",
";",
"i... | Create a transliterator from a basic ID. This is an ID
containing only the forward direction source, target, and
variant.
@param id a basic ID of the form S-T or S-T/V.
@param canonID canonical ID to apply to the result, or
null to leave the ID unchanged
@return a newly created Transliterator or null if the ID is
inva... | [
"Create",
"a",
"transliterator",
"from",
"a",
"basic",
"ID",
".",
"This",
"is",
"an",
"ID",
"containing",
"only",
"the",
"forward",
"direction",
"source",
"target",
"and",
"variant",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1357-L1369 |
32,953 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.registerFactory | public static void registerFactory(String ID, Factory factory) {
registry.put(ID, factory, true);
} | java | public static void registerFactory(String ID, Factory factory) {
registry.put(ID, factory, true);
} | [
"public",
"static",
"void",
"registerFactory",
"(",
"String",
"ID",
",",
"Factory",
"factory",
")",
"{",
"registry",
".",
"put",
"(",
"ID",
",",
"factory",
",",
"true",
")",
";",
"}"
] | Register a factory object with the given ID. The factory
method should return a new instance of the given transliterator.
<p>Because ICU may choose to cache Transliterator objects internally, this must
be called at application startup, prior to any calls to
Transliterator.getInstance to avoid undefined behavior.
@pa... | [
"Register",
"a",
"factory",
"object",
"with",
"the",
"given",
"ID",
".",
"The",
"factory",
"method",
"should",
"return",
"a",
"new",
"instance",
"of",
"the",
"given",
"transliterator",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1689-L1691 |
32,954 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.registerInstance | static void registerInstance(Transliterator trans, boolean visible) {
registry.put(trans.getID(), trans, visible);
} | java | static void registerInstance(Transliterator trans, boolean visible) {
registry.put(trans.getID(), trans, visible);
} | [
"static",
"void",
"registerInstance",
"(",
"Transliterator",
"trans",
",",
"boolean",
"visible",
")",
"{",
"registry",
".",
"put",
"(",
"trans",
".",
"getID",
"(",
")",
",",
"trans",
",",
"visible",
")",
";",
"}"
] | Register a Transliterator object.
<p>Because ICU may choose to cache Transliterator objects internally, this must
be called at application startup, prior to any calls to
Transliterator.getInstance to avoid undefined behavior.
@param trans the Transliterator object | [
"Register",
"a",
"Transliterator",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1715-L1717 |
32,955 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.registerAlias | public static void registerAlias(String aliasID, String realID) {
registry.put(aliasID, realID, true);
} | java | public static void registerAlias(String aliasID, String realID) {
registry.put(aliasID, realID, true);
} | [
"public",
"static",
"void",
"registerAlias",
"(",
"String",
"aliasID",
",",
"String",
"realID",
")",
"{",
"registry",
".",
"put",
"(",
"aliasID",
",",
"realID",
",",
"true",
")",
";",
"}"
] | Register an ID as an alias of another ID. Instantiating
alias ID produces the same result as instantiating the original ID.
This is generally used to create short aliases of compound IDs.
<p>Because ICU may choose to cache Transliterator objects internally, this must
be called at application startup, prior to any cal... | [
"Register",
"an",
"ID",
"as",
"an",
"alias",
"of",
"another",
"ID",
".",
"Instantiating",
"alias",
"ID",
"produces",
"the",
"same",
"result",
"as",
"instantiating",
"the",
"original",
"ID",
".",
"This",
"is",
"generally",
"used",
"to",
"create",
"short",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1731-L1733 |
32,956 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.unregister | public static void unregister(String ID) {
displayNameCache.remove(new CaseInsensitiveString(ID));
registry.remove(ID);
} | java | public static void unregister(String ID) {
displayNameCache.remove(new CaseInsensitiveString(ID));
registry.remove(ID);
} | [
"public",
"static",
"void",
"unregister",
"(",
"String",
"ID",
")",
"{",
"displayNameCache",
".",
"remove",
"(",
"new",
"CaseInsensitiveString",
"(",
"ID",
")",
")",
";",
"registry",
".",
"remove",
"(",
"ID",
")",
";",
"}"
] | Unregisters a transliterator or class. This may be either
a system transliterator or a user transliterator or class.
@param ID the ID of the transliterator or class
@see #registerClass | [
"Unregisters",
"a",
"transliterator",
"or",
"class",
".",
"This",
"may",
"be",
"either",
"a",
"system",
"transliterator",
"or",
"a",
"user",
"transliterator",
"or",
"class",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1780-L1783 |
32,957 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java | Transliterator.getAvailableVariants | public static final Enumeration<String> getAvailableVariants(String source,
String target) {
return registry.getAvailableVariants(source, target);
} | java | public static final Enumeration<String> getAvailableVariants(String source,
String target) {
return registry.getAvailableVariants(source, target);
} | [
"public",
"static",
"final",
"Enumeration",
"<",
"String",
">",
"getAvailableVariants",
"(",
"String",
"source",
",",
"String",
"target",
")",
"{",
"return",
"registry",
".",
"getAvailableVariants",
"(",
"source",
",",
"target",
")",
";",
"}"
] | Returns an enumeration over the variant names of registered
transliterators having a given source name and target name. | [
"Returns",
"an",
"enumeration",
"over",
"the",
"variant",
"names",
"of",
"registered",
"transliterators",
"having",
"a",
"given",
"source",
"name",
"and",
"target",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Transliterator.java#L1824-L1827 |
32,958 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.getFrozenInstance | @Deprecated
public static DateTimePatternGenerator getFrozenInstance(ULocale uLocale) {
String localeKey = uLocale.toString();
DateTimePatternGenerator result = DTPNG_CACHE.get(localeKey);
if (result != null) {
return result;
}
result = new DateTimePatternGenerat... | java | @Deprecated
public static DateTimePatternGenerator getFrozenInstance(ULocale uLocale) {
String localeKey = uLocale.toString();
DateTimePatternGenerator result = DTPNG_CACHE.get(localeKey);
if (result != null) {
return result;
}
result = new DateTimePatternGenerat... | [
"@",
"Deprecated",
"public",
"static",
"DateTimePatternGenerator",
"getFrozenInstance",
"(",
"ULocale",
"uLocale",
")",
"{",
"String",
"localeKey",
"=",
"uLocale",
".",
"toString",
"(",
")",
";",
"DateTimePatternGenerator",
"result",
"=",
"DTPNG_CACHE",
".",
"get",
... | Construct a frozen instance of DateTimePatternGenerator for a
given locale. This method returns a cached frozen instance of
DateTimePatternGenerator, so less expensive than the regular
factory method.
@param uLocale The locale to pass.
@return A frozen DateTimePatternGenerator.
@deprecated This API is ICU internal onl... | [
"Construct",
"a",
"frozen",
"instance",
"of",
"DateTimePatternGenerator",
"for",
"a",
"given",
"locale",
".",
"This",
"method",
"returns",
"a",
"cached",
"frozen",
"instance",
"of",
"DateTimePatternGenerator",
"so",
"less",
"expensive",
"than",
"the",
"regular",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L114-L129 |
32,959 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.getSkeletonAllowingDuplicates | @Deprecated
public String getSkeletonAllowingDuplicates(String pattern) {
synchronized (this) { // synchronized since a getter must be thread-safe
current.set(pattern, fp, true);
return current.toString();
}
} | java | @Deprecated
public String getSkeletonAllowingDuplicates(String pattern) {
synchronized (this) { // synchronized since a getter must be thread-safe
current.set(pattern, fp, true);
return current.toString();
}
} | [
"@",
"Deprecated",
"public",
"String",
"getSkeletonAllowingDuplicates",
"(",
"String",
"pattern",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"// synchronized since a getter must be thread-safe",
"current",
".",
"set",
"(",
"pattern",
",",
"fp",
",",
"true",
")... | Same as getSkeleton, but allows duplicates
@param pattern Input pattern, such as "dd/MMM"
@return skeleton, such as "MMMdd"
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden on Android | [
"Same",
"as",
"getSkeleton",
"but",
"allows",
"duplicates"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L730-L736 |
32,960 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.getCanonicalSkeletonAllowingDuplicates | @Deprecated
public String getCanonicalSkeletonAllowingDuplicates(String pattern) {
synchronized (this) { // synchronized since a getter must be thread-safe
current.set(pattern, fp, true);
return current.toCanonicalString();
}
} | java | @Deprecated
public String getCanonicalSkeletonAllowingDuplicates(String pattern) {
synchronized (this) { // synchronized since a getter must be thread-safe
current.set(pattern, fp, true);
return current.toCanonicalString();
}
} | [
"@",
"Deprecated",
"public",
"String",
"getCanonicalSkeletonAllowingDuplicates",
"(",
"String",
"pattern",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"// synchronized since a getter must be thread-safe",
"current",
".",
"set",
"(",
"pattern",
",",
"fp",
",",
"tr... | Same as getSkeleton, but allows duplicates
and returns a string using canonical pattern chars
@param pattern Input pattern, such as "ccc, d LLL"
@return skeleton, such as "MMMEd"
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden on Android | [
"Same",
"as",
"getSkeleton",
"but",
"allows",
"duplicates",
"and",
"returns",
"a",
"string",
"using",
"canonical",
"pattern",
"chars"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L748-L754 |
32,961 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.getRedundants | @Deprecated
public Collection<String> getRedundants(Collection<String> output) {
synchronized (this) { // synchronized since a getter must be thread-safe
if (output == null) {
output = new LinkedHashSet<String>();
}
for (DateTimeMatcher cur : skeleton2patt... | java | @Deprecated
public Collection<String> getRedundants(Collection<String> output) {
synchronized (this) { // synchronized since a getter must be thread-safe
if (output == null) {
output = new LinkedHashSet<String>();
}
for (DateTimeMatcher cur : skeleton2patt... | [
"@",
"Deprecated",
"public",
"Collection",
"<",
"String",
">",
"getRedundants",
"(",
"Collection",
"<",
"String",
">",
"output",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"// synchronized since a getter must be thread-safe",
"if",
"(",
"output",
"==",
"null... | Redundant patterns are those which if removed, make no difference in the
resulting getBestPattern values. This method returns a list of them, to
help check the consistency of the patterns used to build this generator.
@param output stores the redundant patterns that are removed. To get these
in internal order, supply ... | [
"Redundant",
"patterns",
"are",
"those",
"which",
"if",
"removed",
"make",
"no",
"difference",
"in",
"the",
"resulting",
"getBestPattern",
"values",
".",
"This",
"method",
"returns",
"a",
"list",
"of",
"them",
"to",
"help",
"check",
"the",
"consistency",
"of",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L916-L956 |
32,962 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.isSingleField | @Deprecated
public static boolean isSingleField(String skeleton) {
char first = skeleton.charAt(0);
for (int i = 1; i < skeleton.length(); ++i) {
if (skeleton.charAt(i) != first) return false;
}
return true;
} | java | @Deprecated
public static boolean isSingleField(String skeleton) {
char first = skeleton.charAt(0);
for (int i = 1; i < skeleton.length(); ++i) {
if (skeleton.charAt(i) != first) return false;
}
return true;
} | [
"@",
"Deprecated",
"public",
"static",
"boolean",
"isSingleField",
"(",
"String",
"skeleton",
")",
"{",
"char",
"first",
"=",
"skeleton",
".",
"charAt",
"(",
"0",
")",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"skeleton",
".",
"length",
"... | Determines whether a skeleton contains a single field
@param skeleton The skeleton to determine if it contains a single field.
@return true or not
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden on Android | [
"Determines",
"whether",
"a",
"skeleton",
"contains",
"a",
"single",
"field"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L1142-L1149 |
32,963 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.getBestAppending | private String getBestAppending(DateTimeMatcher source, int missingFields, DistanceInfo distInfo, DateTimeMatcher skipMatcher, EnumSet<DTPGflags> flags, int options) {
String resultPattern = null;
if (missingFields != 0) {
PatternWithMatcher resultPatternWithMatcher = getBestRaw(source, miss... | java | private String getBestAppending(DateTimeMatcher source, int missingFields, DistanceInfo distInfo, DateTimeMatcher skipMatcher, EnumSet<DTPGflags> flags, int options) {
String resultPattern = null;
if (missingFields != 0) {
PatternWithMatcher resultPatternWithMatcher = getBestRaw(source, miss... | [
"private",
"String",
"getBestAppending",
"(",
"DateTimeMatcher",
"source",
",",
"int",
"missingFields",
",",
"DistanceInfo",
"distInfo",
",",
"DateTimeMatcher",
"skipMatcher",
",",
"EnumSet",
"<",
"DTPGflags",
">",
"flags",
",",
"int",
"options",
")",
"{",
"String... | We only get called here if we failed to find an exact skeleton. We have broken it into date + time, and look for the pieces.
If we fail to find a complete skeleton, we compose in a loop until we have all the fields. | [
"We",
"only",
"get",
"called",
"here",
"if",
"we",
"failed",
"to",
"find",
"an",
"exact",
"skeleton",
".",
"We",
"have",
"broken",
"it",
"into",
"date",
"+",
"time",
"and",
"look",
"for",
"the",
"pieces",
".",
"If",
"we",
"fail",
"to",
"find",
"a",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L1761-L1791 |
32,964 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java | DateTimePatternGenerator.getCanonicalIndex | private static int getCanonicalIndex(String s, boolean strict) {
int len = s.length();
if (len == 0) {
return -1;
}
int ch = s.charAt(0);
// verify that all are the same character
for (int i = 1; i < len; ++i) {
if (s.charAt(i) != ch) {
... | java | private static int getCanonicalIndex(String s, boolean strict) {
int len = s.length();
if (len == 0) {
return -1;
}
int ch = s.charAt(0);
// verify that all are the same character
for (int i = 1; i < len; ++i) {
if (s.charAt(i) != ch) {
... | [
"private",
"static",
"int",
"getCanonicalIndex",
"(",
"String",
"s",
",",
"boolean",
"strict",
")",
"{",
"int",
"len",
"=",
"s",
".",
"length",
"(",
")",
";",
"if",
"(",
"len",
"==",
"0",
")",
"{",
"return",
"-",
"1",
";",
"}",
"int",
"ch",
"=",
... | Get the canonical index, or return -1 if illegal.
@param s
@param strict TODO | [
"Get",
"the",
"canonical",
"index",
"or",
"return",
"-",
"1",
"if",
"illegal",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DateTimePatternGenerator.java#L2085-L2107 |
32,965 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java | JavacParser.filterJavaFileObject | private static JavaFileObject filterJavaFileObject(JavaFileObject fobj) {
String path = fobj.getName();
if (path.endsWith("module-info.java")) {
String pkgName = null;
try {
pkgName = moduleName(fobj.getCharContent(true).toString());
String source = "package " + pkgName + ";";
... | java | private static JavaFileObject filterJavaFileObject(JavaFileObject fobj) {
String path = fobj.getName();
if (path.endsWith("module-info.java")) {
String pkgName = null;
try {
pkgName = moduleName(fobj.getCharContent(true).toString());
String source = "package " + pkgName + ";";
... | [
"private",
"static",
"JavaFileObject",
"filterJavaFileObject",
"(",
"JavaFileObject",
"fobj",
")",
"{",
"String",
"path",
"=",
"fobj",
".",
"getName",
"(",
")",
";",
"if",
"(",
"path",
".",
"endsWith",
"(",
"\"module-info.java\"",
")",
")",
"{",
"String",
"p... | To allow Java 9 libraries like GSON to be transpiled using -source 1.8, stub out
the module-info source. This creates an empty .o file, like package-info.java
files without annotations. Skipping the file isn't feasible because of build tool
output file expectations. | [
"To",
"allow",
"Java",
"9",
"libraries",
"like",
"GSON",
"to",
"be",
"transpiled",
"using",
"-",
"source",
"1",
".",
"8",
"stub",
"out",
"the",
"module",
"-",
"info",
"source",
".",
"This",
"creates",
"an",
"empty",
".",
"o",
"file",
"like",
"package",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java#L220-L233 |
32,966 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java | JavacParser.createEnvironment | private JavacEnvironment createEnvironment(String path, String source) throws IOException {
List<JavaFileObject> inputFiles = new ArrayList<>();
inputFiles.add(filterJavaFileObject(MemoryFileObject.createJavaFile(path, source)));
return createEnvironment(Collections.emptyList(), inputFiles, false);
} | java | private JavacEnvironment createEnvironment(String path, String source) throws IOException {
List<JavaFileObject> inputFiles = new ArrayList<>();
inputFiles.add(filterJavaFileObject(MemoryFileObject.createJavaFile(path, source)));
return createEnvironment(Collections.emptyList(), inputFiles, false);
} | [
"private",
"JavacEnvironment",
"createEnvironment",
"(",
"String",
"path",
",",
"String",
"source",
")",
"throws",
"IOException",
"{",
"List",
"<",
"JavaFileObject",
">",
"inputFiles",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"inputFiles",
".",
"add",
"("... | Creates a javac environment from a memory source. | [
"Creates",
"a",
"javac",
"environment",
"from",
"a",
"memory",
"source",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java#L245-L249 |
32,967 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java | JavacParser.packageName | @VisibleForTesting
static String packageName(String source) {
try (StringReader r = new StringReader(source)) {
StreamTokenizer tokenizer = new StreamTokenizer(r);
tokenizer.slashSlashComments(true);
tokenizer.slashStarComments(true);
StringBuilder sb = new StringBuilder();
boolean i... | java | @VisibleForTesting
static String packageName(String source) {
try (StringReader r = new StringReader(source)) {
StreamTokenizer tokenizer = new StreamTokenizer(r);
tokenizer.slashSlashComments(true);
tokenizer.slashStarComments(true);
StringBuilder sb = new StringBuilder();
boolean i... | [
"@",
"VisibleForTesting",
"static",
"String",
"packageName",
"(",
"String",
"source",
")",
"{",
"try",
"(",
"StringReader",
"r",
"=",
"new",
"StringReader",
"(",
"source",
")",
")",
"{",
"StreamTokenizer",
"tokenizer",
"=",
"new",
"StreamTokenizer",
"(",
"r",
... | Extract the name of a Java source's package, or null if not found. This method is only used
before javac parsing to determine the main type name. | [
"Extract",
"the",
"name",
"of",
"a",
"Java",
"source",
"s",
"package",
"or",
"null",
"if",
"not",
"found",
".",
"This",
"method",
"is",
"only",
"used",
"before",
"javac",
"parsing",
"to",
"determine",
"the",
"main",
"type",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/javac/JavacParser.java#L353-L384 |
32,968 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/DistributionPoint.java | DistributionPoint.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tagged = new DerOutputStream();
// NOTE: only one of pointNames and pointRDN can be set
if ((fullName != null) || (relativeName != null)) {
DerOutputStream distributionPoint = new DerOutputStream();
... | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tagged = new DerOutputStream();
// NOTE: only one of pointNames and pointRDN can be set
if ((fullName != null) || (relativeName != null)) {
DerOutputStream distributionPoint = new DerOutputStream();
... | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"tagged",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"// NOTE: only one of pointNames and pointRDN can be set",
"if",
"(",
"(",
"fullName",
"!=",
"null"... | Write the DistributionPoint value to the DerOutputStream.
@param out the DerOutputStream to write the extension to.
@exception IOException on error. | [
"Write",
"the",
"DistributionPoint",
"value",
"to",
"the",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/DistributionPoint.java#L280-L319 |
32,969 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/DistributionPoint.java | DistributionPoint.reasonToString | private static String reasonToString(int reason) {
if ((reason > 0) && (reason < REASON_STRINGS.length)) {
return REASON_STRINGS[reason];
}
return "Unknown reason " + reason;
} | java | private static String reasonToString(int reason) {
if ((reason > 0) && (reason < REASON_STRINGS.length)) {
return REASON_STRINGS[reason];
}
return "Unknown reason " + reason;
} | [
"private",
"static",
"String",
"reasonToString",
"(",
"int",
"reason",
")",
"{",
"if",
"(",
"(",
"reason",
">",
"0",
")",
"&&",
"(",
"reason",
"<",
"REASON_STRINGS",
".",
"length",
")",
")",
"{",
"return",
"REASON_STRINGS",
"[",
"reason",
"]",
";",
"}"... | Return a string representation for reasonFlag bit 'reason'. | [
"Return",
"a",
"string",
"representation",
"for",
"reasonFlag",
"bit",
"reason",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/DistributionPoint.java#L371-L376 |
32,970 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExsltFunction.java | ElemExsltFunction.compose | public void compose(StylesheetRoot sroot) throws TransformerException
{
super.compose(sroot);
// Register the function namespace (if not already registered).
String namespace = getName().getNamespace();
String handlerClass = sroot.getExtensionHandlerClass();
Object[] args ={namespace, sroot};... | java | public void compose(StylesheetRoot sroot) throws TransformerException
{
super.compose(sroot);
// Register the function namespace (if not already registered).
String namespace = getName().getNamespace();
String handlerClass = sroot.getExtensionHandlerClass();
Object[] args ={namespace, sroot};... | [
"public",
"void",
"compose",
"(",
"StylesheetRoot",
"sroot",
")",
"throws",
"TransformerException",
"{",
"super",
".",
"compose",
"(",
"sroot",
")",
";",
"// Register the function namespace (if not already registered).",
"String",
"namespace",
"=",
"getName",
"(",
")",
... | Called after everything else has been
recomposed, and allows the function to set remaining
values that may be based on some other property that
depends on recomposition. | [
"Called",
"after",
"everything",
"else",
"has",
"been",
"recomposed",
"and",
"allows",
"the",
"function",
"to",
"set",
"remaining",
"values",
"that",
"may",
"be",
"based",
"on",
"some",
"other",
"property",
"that",
"depends",
"on",
"recomposition",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemExsltFunction.java#L124-L144 |
32,971 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java | NumericShaper.getContextKey | private static int getContextKey(char c) {
if (c < contexts[ctCache]) {
while (ctCache > 0 && c < contexts[ctCache]) --ctCache;
} else if (c >= contexts[ctCache + 1]) {
while (ctCache < ctCacheLimit && c >= contexts[ctCache + 1]) ++ctCache;
}
// if we're not in a... | java | private static int getContextKey(char c) {
if (c < contexts[ctCache]) {
while (ctCache > 0 && c < contexts[ctCache]) --ctCache;
} else if (c >= contexts[ctCache + 1]) {
while (ctCache < ctCacheLimit && c >= contexts[ctCache + 1]) ++ctCache;
}
// if we're not in a... | [
"private",
"static",
"int",
"getContextKey",
"(",
"char",
"c",
")",
"{",
"if",
"(",
"c",
"<",
"contexts",
"[",
"ctCache",
"]",
")",
"{",
"while",
"(",
"ctCache",
">",
"0",
"&&",
"c",
"<",
"contexts",
"[",
"ctCache",
"]",
")",
"--",
"ctCache",
";",
... | warning, synchronize access to this as it modifies state | [
"warning",
"synchronize",
"access",
"to",
"this",
"as",
"it",
"modifies",
"state"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java#L552-L561 |
32,972 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java | NumericShaper.shape | public void shape(char[] text, int start, int count) {
checkParams(text, start, count);
if (isContextual()) {
if (rangeSet == null) {
shapeContextually(text, start, count, key);
} else {
shapeContextually(text, start, count, shapingRange);
... | java | public void shape(char[] text, int start, int count) {
checkParams(text, start, count);
if (isContextual()) {
if (rangeSet == null) {
shapeContextually(text, start, count, key);
} else {
shapeContextually(text, start, count, shapingRange);
... | [
"public",
"void",
"shape",
"(",
"char",
"[",
"]",
"text",
",",
"int",
"start",
",",
"int",
"count",
")",
"{",
"checkParams",
"(",
"text",
",",
"start",
",",
"count",
")",
";",
"if",
"(",
"isContextual",
"(",
")",
")",
"{",
"if",
"(",
"rangeSet",
... | Converts the digits in the text that occur between start and
start + count.
@param text an array of characters to convert
@param start the index into <code>text</code> to start
converting
@param count the number of characters in <code>text</code>
to convert
@throws IndexOutOfBoundsException if start or start + count is... | [
"Converts",
"the",
"digits",
"in",
"the",
"text",
"that",
"occur",
"between",
"start",
"and",
"start",
"+",
"count",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java#L1100-L1111 |
32,973 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java | NumericShaper.shape | public void shape(char[] text, int start, int count, int context) {
checkParams(text, start, count);
if (isContextual()) {
int ctxKey = getKeyFromMask(context);
if (rangeSet == null) {
shapeContextually(text, start, count, ctxKey);
} else {
... | java | public void shape(char[] text, int start, int count, int context) {
checkParams(text, start, count);
if (isContextual()) {
int ctxKey = getKeyFromMask(context);
if (rangeSet == null) {
shapeContextually(text, start, count, ctxKey);
} else {
... | [
"public",
"void",
"shape",
"(",
"char",
"[",
"]",
"text",
",",
"int",
"start",
",",
"int",
"count",
",",
"int",
"context",
")",
"{",
"checkParams",
"(",
"text",
",",
"start",
",",
"count",
")",
";",
"if",
"(",
"isContextual",
"(",
")",
")",
"{",
... | Converts the digits in the text that occur between start and
start + count, using the provided context.
Context is ignored if the shaper is not a contextual shaper.
@param text an array of characters
@param start the index into <code>text</code> to start
converting
@param count the number of characters in <code>text</c... | [
"Converts",
"the",
"digits",
"in",
"the",
"text",
"that",
"occur",
"between",
"start",
"and",
"start",
"+",
"count",
"using",
"the",
"provided",
"context",
".",
"Context",
"is",
"ignored",
"if",
"the",
"shaper",
"is",
"not",
"a",
"contextual",
"shaper",
".... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java#L1131-L1143 |
32,974 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java | NumericShaper.shapeNonContextually | private void shapeNonContextually(char[] text, int start, int count) {
int base;
char minDigit = '0';
if (shapingRange != null) {
base = shapingRange.getDigitBase();
minDigit += shapingRange.getNumericBase();
} else {
base = bases[key];
if ... | java | private void shapeNonContextually(char[] text, int start, int count) {
int base;
char minDigit = '0';
if (shapingRange != null) {
base = shapingRange.getDigitBase();
minDigit += shapingRange.getNumericBase();
} else {
base = bases[key];
if ... | [
"private",
"void",
"shapeNonContextually",
"(",
"char",
"[",
"]",
"text",
",",
"int",
"start",
",",
"int",
"count",
")",
"{",
"int",
"base",
";",
"char",
"minDigit",
"=",
"'",
"'",
";",
"if",
"(",
"shapingRange",
"!=",
"null",
")",
"{",
"base",
"=",
... | Perform non-contextual shaping. | [
"Perform",
"non",
"-",
"contextual",
"shaping",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java#L1244-L1262 |
32,975 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java | NumericShaper.shapeContextually | private synchronized void shapeContextually(char[] text, int start, int count, int ctxKey) {
// if we don't support this context, then don't shape
if ((mask & (1<<ctxKey)) == 0) {
ctxKey = EUROPEAN_KEY;
}
int lastkey = ctxKey;
int base = bases[ctxKey];
char ... | java | private synchronized void shapeContextually(char[] text, int start, int count, int ctxKey) {
// if we don't support this context, then don't shape
if ((mask & (1<<ctxKey)) == 0) {
ctxKey = EUROPEAN_KEY;
}
int lastkey = ctxKey;
int base = bases[ctxKey];
char ... | [
"private",
"synchronized",
"void",
"shapeContextually",
"(",
"char",
"[",
"]",
"text",
",",
"int",
"start",
",",
"int",
"count",
",",
"int",
"ctxKey",
")",
"{",
"// if we don't support this context, then don't shape",
"if",
"(",
"(",
"mask",
"&",
"(",
"1",
"<<... | Perform contextual shaping.
Synchronized to protect caches used in getContextKey. | [
"Perform",
"contextual",
"shaping",
".",
"Synchronized",
"to",
"protect",
"caches",
"used",
"in",
"getContextKey",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java#L1268-L1311 |
32,976 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java | NumericShaper.search | private static int search(int value, int[] array, int start, int length)
{
int power = 1 << getHighBit(length);
int extra = length - power;
int probe = power;
int index = start;
if (value >= array[index + extra]) {
index += extra;
}
while (probe ... | java | private static int search(int value, int[] array, int start, int length)
{
int power = 1 << getHighBit(length);
int extra = length - power;
int probe = power;
int index = start;
if (value >= array[index + extra]) {
index += extra;
}
while (probe ... | [
"private",
"static",
"int",
"search",
"(",
"int",
"value",
",",
"int",
"[",
"]",
"array",
",",
"int",
"start",
",",
"int",
"length",
")",
"{",
"int",
"power",
"=",
"1",
"<<",
"getHighBit",
"(",
"length",
")",
";",
"int",
"extra",
"=",
"length",
"-"... | fast binary search over subrange of array. | [
"fast",
"binary",
"search",
"over",
"subrange",
"of",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/NumericShaper.java#L1481-L1501 |
32,977 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBISymbolTable.java | RBBISymbolTable.lookupMatcher | public UnicodeMatcher lookupMatcher(int ch) {
UnicodeSet retVal = null;
if (ch == 0xffff) {
retVal = fCachedSetLookup;
fCachedSetLookup = null;
}
return retVal;
} | java | public UnicodeMatcher lookupMatcher(int ch) {
UnicodeSet retVal = null;
if (ch == 0xffff) {
retVal = fCachedSetLookup;
fCachedSetLookup = null;
}
return retVal;
} | [
"public",
"UnicodeMatcher",
"lookupMatcher",
"(",
"int",
"ch",
")",
"{",
"UnicodeSet",
"retVal",
"=",
"null",
";",
"if",
"(",
"ch",
"==",
"0xffff",
")",
"{",
"retVal",
"=",
"fCachedSetLookup",
";",
"fCachedSetLookup",
"=",
"null",
";",
"}",
"return",
"retV... | and we just need to remember what set to return between these two calls. | [
"and",
"we",
"just",
"need",
"to",
"remember",
"what",
"set",
"to",
"return",
"between",
"these",
"two",
"calls",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RBBISymbolTable.java#L101-L108 |
32,978 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/CertificateFactory.java | CertificateFactory.getInstance | public static final CertificateFactory getInstance(String type)
throws CertificateException {
try {
Instance instance = GetInstance.getInstance("CertificateFactory",
CertificateFactorySpi.class, type);
return new CertificateFactory((CertificateFactorySpi)insta... | java | public static final CertificateFactory getInstance(String type)
throws CertificateException {
try {
Instance instance = GetInstance.getInstance("CertificateFactory",
CertificateFactorySpi.class, type);
return new CertificateFactory((CertificateFactorySpi)insta... | [
"public",
"static",
"final",
"CertificateFactory",
"getInstance",
"(",
"String",
"type",
")",
"throws",
"CertificateException",
"{",
"try",
"{",
"Instance",
"instance",
"=",
"GetInstance",
".",
"getInstance",
"(",
"\"CertificateFactory\"",
",",
"CertificateFactorySpi",
... | Returns a certificate factory object that implements the
specified certificate type.
<p> This method traverses the list of registered security Providers,
starting with the most preferred Provider.
A new CertificateFactory object encapsulating the
CertificateFactorySpi implementation from the first
Provider that suppor... | [
"Returns",
"a",
"certificate",
"factory",
"object",
"that",
"implements",
"the",
"specified",
"certificate",
"type",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/CertificateFactory.java#L203-L213 |
32,979 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Timer.java | TaskQueue.add | void add(TimerTask task) {
// Grow backing store if necessary
if (size + 1 == queue.length)
queue = Arrays.copyOf(queue, 2*queue.length);
queue[++size] = task;
fixUp(size);
} | java | void add(TimerTask task) {
// Grow backing store if necessary
if (size + 1 == queue.length)
queue = Arrays.copyOf(queue, 2*queue.length);
queue[++size] = task;
fixUp(size);
} | [
"void",
"add",
"(",
"TimerTask",
"task",
")",
"{",
"// Grow backing store if necessary",
"if",
"(",
"size",
"+",
"1",
"==",
"queue",
".",
"length",
")",
"queue",
"=",
"Arrays",
".",
"copyOf",
"(",
"queue",
",",
"2",
"*",
"queue",
".",
"length",
")",
";... | Adds a new task to the priority queue. | [
"Adds",
"a",
"new",
"task",
"to",
"the",
"priority",
"queue",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Timer.java#L598-L605 |
32,980 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Timer.java | TaskQueue.quickRemove | void quickRemove(int i) {
assert i <= size;
queue[i] = queue[size];
queue[size--] = null; // Drop extra ref to prevent memory leak
} | java | void quickRemove(int i) {
assert i <= size;
queue[i] = queue[size];
queue[size--] = null; // Drop extra ref to prevent memory leak
} | [
"void",
"quickRemove",
"(",
"int",
"i",
")",
"{",
"assert",
"i",
"<=",
"size",
";",
"queue",
"[",
"i",
"]",
"=",
"queue",
"[",
"size",
"]",
";",
"queue",
"[",
"size",
"--",
"]",
"=",
"null",
";",
"// Drop extra ref to prevent memory leak",
"}"
] | Removes the ith element from queue without regard for maintaining
the heap invariant. Recall that queue is one-based, so
1 <= i <= size. | [
"Removes",
"the",
"ith",
"element",
"from",
"queue",
"without",
"regard",
"for",
"maintaining",
"the",
"heap",
"invariant",
".",
"Recall",
"that",
"queue",
"is",
"one",
"-",
"based",
"so",
"1",
"<",
"=",
"i",
"<",
"=",
"size",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Timer.java#L638-L643 |
32,981 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java | TimeZone.setID | public void setID(String ID) {
if (ID == null) {
throw new NullPointerException();
}
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify a frozen TimeZone instance.");
}
this.ID = ID;
} | java | public void setID(String ID) {
if (ID == null) {
throw new NullPointerException();
}
if (isFrozen()) {
throw new UnsupportedOperationException("Attempt to modify a frozen TimeZone instance.");
}
this.ID = ID;
} | [
"public",
"void",
"setID",
"(",
"String",
"ID",
")",
"{",
"if",
"(",
"ID",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"if",
"(",
"isFrozen",
"(",
")",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"... | Sets the time zone ID. This does not change any other data in
the time zone object.
@param ID the new time zone ID. | [
"Sets",
"the",
"time",
"zone",
"ID",
".",
"This",
"does",
"not",
"change",
"any",
"other",
"data",
"in",
"the",
"time",
"zone",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L355-L363 |
32,982 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java | TimeZone.getDisplayName | public final String getDisplayName(Locale locale) {
return _getDisplayName(LONG_GENERIC, false, ULocale.forLocale(locale));
} | java | public final String getDisplayName(Locale locale) {
return _getDisplayName(LONG_GENERIC, false, ULocale.forLocale(locale));
} | [
"public",
"final",
"String",
"getDisplayName",
"(",
"Locale",
"locale",
")",
"{",
"return",
"_getDisplayName",
"(",
"LONG_GENERIC",
",",
"false",
",",
"ULocale",
".",
"forLocale",
"(",
"locale",
")",
")",
";",
"}"
] | Returns a name of this time zone suitable for presentation to the user
in the specified locale.
This method returns the long generic name.
If the display name is not available for the locale,
a fallback based on the country, city, or time zone id will be used.
@param locale the locale in which to supply the display nam... | [
"Returns",
"a",
"name",
"of",
"this",
"time",
"zone",
"suitable",
"for",
"presentation",
"to",
"the",
"user",
"in",
"the",
"specified",
"locale",
".",
"This",
"method",
"returns",
"the",
"long",
"generic",
"name",
".",
"If",
"the",
"display",
"name",
"is",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L388-L390 |
32,983 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java | TimeZone.getFrozenICUTimeZone | static BasicTimeZone getFrozenICUTimeZone(String id, boolean trySystem) {
BasicTimeZone result = null;
if (trySystem) {
result = ZoneMeta.getSystemTimeZone(id);
}
if (result == null) {
result = ZoneMeta.getCustomTimeZone(id);
}
return result;
} | java | static BasicTimeZone getFrozenICUTimeZone(String id, boolean trySystem) {
BasicTimeZone result = null;
if (trySystem) {
result = ZoneMeta.getSystemTimeZone(id);
}
if (result == null) {
result = ZoneMeta.getCustomTimeZone(id);
}
return result;
} | [
"static",
"BasicTimeZone",
"getFrozenICUTimeZone",
"(",
"String",
"id",
",",
"boolean",
"trySystem",
")",
"{",
"BasicTimeZone",
"result",
"=",
"null",
";",
"if",
"(",
"trySystem",
")",
"{",
"result",
"=",
"ZoneMeta",
".",
"getSystemTimeZone",
"(",
"id",
")",
... | Returns a frozen ICU type TimeZone object given a time zone ID.
@param id the time zone ID
@param trySystem if true tries the system time zones first otherwise skip to the
custom time zones.
@return the frozen ICU TimeZone or null if one could not be created. | [
"Returns",
"a",
"frozen",
"ICU",
"type",
"TimeZone",
"object",
"given",
"a",
"time",
"zone",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L708-L717 |
32,984 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java | TimeZone.hasSameRules | public boolean hasSameRules(TimeZone other) {
return other != null &&
getRawOffset() == other.getRawOffset() &&
useDaylightTime() == other.useDaylightTime();
} | java | public boolean hasSameRules(TimeZone other) {
return other != null &&
getRawOffset() == other.getRawOffset() &&
useDaylightTime() == other.useDaylightTime();
} | [
"public",
"boolean",
"hasSameRules",
"(",
"TimeZone",
"other",
")",
"{",
"return",
"other",
"!=",
"null",
"&&",
"getRawOffset",
"(",
")",
"==",
"other",
".",
"getRawOffset",
"(",
")",
"&&",
"useDaylightTime",
"(",
")",
"==",
"other",
".",
"useDaylightTime",
... | Returns true if this zone has the same rule and offset as another zone.
That is, if this zone differs only in ID, if at all. Returns false
if the other zone is null.
@param other the <code>TimeZone</code> object to be compared with
@return true if the other zone is not null and is the same as this one,
with the possib... | [
"Returns",
"true",
"if",
"this",
"zone",
"has",
"the",
"same",
"rule",
"and",
"offset",
"as",
"another",
"zone",
".",
"That",
"is",
"if",
"this",
"zone",
"differs",
"only",
"in",
"ID",
"if",
"at",
"all",
".",
"Returns",
"false",
"if",
"the",
"other",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L952-L956 |
32,985 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/AdaptableX509CertSelector.java | AdaptableX509CertSelector.parseAuthorityKeyIdentifierExtension | void parseAuthorityKeyIdentifierExtension(
AuthorityKeyIdentifierExtension akidext) throws IOException {
if (akidext != null) {
KeyIdentifier akid = (KeyIdentifier)akidext.get(
AuthorityKeyIdentifierExtension.KEY_ID);
if (akid != null) {
//... | java | void parseAuthorityKeyIdentifierExtension(
AuthorityKeyIdentifierExtension akidext) throws IOException {
if (akidext != null) {
KeyIdentifier akid = (KeyIdentifier)akidext.get(
AuthorityKeyIdentifierExtension.KEY_ID);
if (akid != null) {
//... | [
"void",
"parseAuthorityKeyIdentifierExtension",
"(",
"AuthorityKeyIdentifierExtension",
"akidext",
")",
"throws",
"IOException",
"{",
"if",
"(",
"akidext",
"!=",
"null",
")",
"{",
"KeyIdentifier",
"akid",
"=",
"(",
"KeyIdentifier",
")",
"akidext",
".",
"get",
"(",
... | Parse the authority key identifier extension.
If the keyIdentifier field of the extension is non-null, set the
subjectKeyIdentifier criterion. If the authorityCertSerialNumber
field is non-null, set the serialNumber criterion.
Note that we will not set the subject criterion according to the
authorityCertIssuer field ... | [
"Parse",
"the",
"authority",
"key",
"identifier",
"extension",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/AdaptableX509CertSelector.java#L101-L129 |
32,986 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java | InetAddress.getHostName | public String getHostName() {
if (holder().getHostName() == null) {
holder().hostName = InetAddress.getHostFromNameService(this);
}
return holder().getHostName();
} | java | public String getHostName() {
if (holder().getHostName() == null) {
holder().hostName = InetAddress.getHostFromNameService(this);
}
return holder().getHostName();
} | [
"public",
"String",
"getHostName",
"(",
")",
"{",
"if",
"(",
"holder",
"(",
")",
".",
"getHostName",
"(",
")",
"==",
"null",
")",
"{",
"holder",
"(",
")",
".",
"hostName",
"=",
"InetAddress",
".",
"getHostFromNameService",
"(",
"this",
")",
";",
"}",
... | Gets the host name for this IP address.
<p>If this InetAddress was created with a host name,
this host name will be remembered and returned;
otherwise, a reverse name lookup will be performed
and the result will be returned based on the system
configured name lookup service. If a lookup of the name service
is required... | [
"Gets",
"the",
"host",
"name",
"for",
"this",
"IP",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java#L481-L486 |
32,987 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java | InetAddress.getHostFromNameService | private static String getHostFromNameService(InetAddress addr) {
String host = null;
try {
// first lookup the hostname
host = nameService.getHostByAddr(addr.getAddress());
/* now get all the IP addresses for this hostname,
* and make sure one of... | java | private static String getHostFromNameService(InetAddress addr) {
String host = null;
try {
// first lookup the hostname
host = nameService.getHostByAddr(addr.getAddress());
/* now get all the IP addresses for this hostname,
* and make sure one of... | [
"private",
"static",
"String",
"getHostFromNameService",
"(",
"InetAddress",
"addr",
")",
"{",
"String",
"host",
"=",
"null",
";",
"try",
"{",
"// first lookup the hostname",
"host",
"=",
"nameService",
".",
"getHostByAddr",
"(",
"addr",
".",
"getAddress",
"(",
... | Returns the hostname for this address.
<p>If there is a security manager, this method first
calls its <code>checkConnect</code> method
with the hostname and <code>-1</code>
as its arguments to see if the calling code is allowed to know
the hostname for this IP address, i.e., to connect to the host.
If the operation is... | [
"Returns",
"the",
"hostname",
"for",
"this",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java#L533-L562 |
32,988 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java | InetAddress.getByAddress | public static InetAddress getByAddress(String host, byte[] addr, int scopeId)
throws UnknownHostException {
if (host != null && host.length() > 0 && host.charAt(0) == '[') {
if (host.charAt(host.length()-1) == ']') {
host = host.substring(1, host.length() -1);
}
... | java | public static InetAddress getByAddress(String host, byte[] addr, int scopeId)
throws UnknownHostException {
if (host != null && host.length() > 0 && host.charAt(0) == '[') {
if (host.charAt(host.length()-1) == ']') {
host = host.substring(1, host.length() -1);
}
... | [
"public",
"static",
"InetAddress",
"getByAddress",
"(",
"String",
"host",
",",
"byte",
"[",
"]",
"addr",
",",
"int",
"scopeId",
")",
"throws",
"UnknownHostException",
"{",
"if",
"(",
"host",
"!=",
"null",
"&&",
"host",
".",
"length",
"(",
")",
">",
"0",
... | Do not delete. Called from native code. | [
"Do",
"not",
"delete",
".",
"Called",
"from",
"native",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java#L657-L678 |
32,989 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java | InetAddress.getAllByName | public static InetAddress[] getAllByName(String host)
throws UnknownHostException {
return impl.lookupAllHostAddr(host, NETID_UNSET).clone();
} | java | public static InetAddress[] getAllByName(String host)
throws UnknownHostException {
return impl.lookupAllHostAddr(host, NETID_UNSET).clone();
} | [
"public",
"static",
"InetAddress",
"[",
"]",
"getAllByName",
"(",
"String",
"host",
")",
"throws",
"UnknownHostException",
"{",
"return",
"impl",
".",
"lookupAllHostAddr",
"(",
"host",
",",
"NETID_UNSET",
")",
".",
"clone",
"(",
")",
";",
"}"
] | Given the name of a host, returns an array of its IP addresses,
based on the configured name service on the system.
<p> The host name can either be a machine name, such as
"<code>java.sun.com</code>", or a textual representation of its IP
address. If a literal IP address is supplied, only the
validity of the address f... | [
"Given",
"the",
"name",
"of",
"a",
"host",
"returns",
"an",
"array",
"of",
"its",
"IP",
"addresses",
"based",
"on",
"the",
"configured",
"name",
"service",
"on",
"the",
"system",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/InetAddress.java#L753-L756 |
32,990 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Manifest.java | Manifest.write | public void write(OutputStream out) throws IOException {
DataOutputStream dos = new DataOutputStream(out);
// Write out the main attributes for the manifest
attr.writeMain(dos);
// Now write out the pre-entry attributes
Iterator<Map.Entry<String, Attributes>> it = entries.entrySe... | java | public void write(OutputStream out) throws IOException {
DataOutputStream dos = new DataOutputStream(out);
// Write out the main attributes for the manifest
attr.writeMain(dos);
// Now write out the pre-entry attributes
Iterator<Map.Entry<String, Attributes>> it = entries.entrySe... | [
"public",
"void",
"write",
"(",
"OutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DataOutputStream",
"dos",
"=",
"new",
"DataOutputStream",
"(",
"out",
")",
";",
"// Write out the main attributes for the manifest",
"attr",
".",
"writeMain",
"(",
"dos",
")",... | Writes the Manifest to the specified OutputStream.
Attributes.Name.MANIFEST_VERSION must be set in
MainAttributes prior to invoking this method.
@param out the output stream
@exception IOException if an I/O error has occurred
@see #getMainAttributes | [
"Writes",
"the",
"Manifest",
"to",
"the",
"specified",
"OutputStream",
".",
"Attributes",
".",
"Name",
".",
"MANIFEST_VERSION",
"must",
"be",
"set",
"in",
"MainAttributes",
"prior",
"to",
"invoking",
"this",
"method",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Manifest.java#L146-L167 |
32,991 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Manifest.java | Manifest.make72Safe | static void make72Safe(StringBuffer line) {
int length = line.length();
if (length > 72) {
int index = 70;
while (index < length - 2) {
line.insert(index, "\r\n ");
index += 72;
length += 3;
}
}
return;
... | java | static void make72Safe(StringBuffer line) {
int length = line.length();
if (length > 72) {
int index = 70;
while (index < length - 2) {
line.insert(index, "\r\n ");
index += 72;
length += 3;
}
}
return;
... | [
"static",
"void",
"make72Safe",
"(",
"StringBuffer",
"line",
")",
"{",
"int",
"length",
"=",
"line",
".",
"length",
"(",
")",
";",
"if",
"(",
"length",
">",
"72",
")",
"{",
"int",
"index",
"=",
"70",
";",
"while",
"(",
"index",
"<",
"length",
"-",
... | Adds line breaks to enforce a maximum 72 bytes per line. | [
"Adds",
"line",
"breaks",
"to",
"enforce",
"a",
"maximum",
"72",
"bytes",
"per",
"line",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Manifest.java#L172-L183 |
32,992 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Manifest.java | Manifest.read | public void read(InputStream is) throws IOException {
// Buffered input stream for reading manifest data
FastInputStream fis = new FastInputStream(is);
// Line buffer
byte[] lbuf = new byte[512];
// Read the main attributes for the manifest
attr.read(fis, lbuf);
/... | java | public void read(InputStream is) throws IOException {
// Buffered input stream for reading manifest data
FastInputStream fis = new FastInputStream(is);
// Line buffer
byte[] lbuf = new byte[512];
// Read the main attributes for the manifest
attr.read(fis, lbuf);
/... | [
"public",
"void",
"read",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"// Buffered input stream for reading manifest data",
"FastInputStream",
"fis",
"=",
"new",
"FastInputStream",
"(",
"is",
")",
";",
"// Line buffer",
"byte",
"[",
"]",
"lbuf",
"="... | Reads the Manifest from the specified InputStream. The entry
names and attributes read will be merged in with the current
manifest entries.
@param is the input stream
@exception IOException if an I/O error has occurred | [
"Reads",
"the",
"Manifest",
"from",
"the",
"specified",
"InputStream",
".",
"The",
"entry",
"names",
"and",
"attributes",
"read",
"will",
"be",
"merged",
"in",
"with",
"the",
"current",
"manifest",
"entries",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/Manifest.java#L193-L262 |
32,993 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumMap.java | EnumMap.isValidKey | private boolean isValidKey(Object key) {
if (key == null)
return false;
// Cheaper than instanceof Enum followed by getDeclaringClass
Class<?> keyClass = key.getClass();
return keyClass == keyType || keyClass.getSuperclass() == keyType;
} | java | private boolean isValidKey(Object key) {
if (key == null)
return false;
// Cheaper than instanceof Enum followed by getDeclaringClass
Class<?> keyClass = key.getClass();
return keyClass == keyType || keyClass.getSuperclass() == keyType;
} | [
"private",
"boolean",
"isValidKey",
"(",
"Object",
"key",
")",
"{",
"if",
"(",
"key",
"==",
"null",
")",
"return",
"false",
";",
"// Cheaper than instanceof Enum followed by getDeclaringClass",
"Class",
"<",
"?",
">",
"keyClass",
"=",
"key",
".",
"getClass",
"("... | Returns true if key is of the proper type to be a key in this
enum map. | [
"Returns",
"true",
"if",
"key",
"is",
"of",
"the",
"proper",
"type",
"to",
"be",
"a",
"key",
"in",
"this",
"enum",
"map",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumMap.java#L324-L331 |
32,994 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumMap.java | EnumMap.getKeyUniverse | private static <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType) {
// Android-changed: Use JavaLangAccess directly instead of going through
// SharedSecrets.
return JavaLangAccess.getEnumConstantsShared(keyType);
} | java | private static <K extends Enum<K>> K[] getKeyUniverse(Class<K> keyType) {
// Android-changed: Use JavaLangAccess directly instead of going through
// SharedSecrets.
return JavaLangAccess.getEnumConstantsShared(keyType);
} | [
"private",
"static",
"<",
"K",
"extends",
"Enum",
"<",
"K",
">",
">",
"K",
"[",
"]",
"getKeyUniverse",
"(",
"Class",
"<",
"K",
">",
"keyType",
")",
"{",
"// Android-changed: Use JavaLangAccess directly instead of going through",
"// SharedSecrets.",
"return",
"JavaL... | Returns all of the values comprising K.
The result is uncloned, cached, and shared by all callers. | [
"Returns",
"all",
"of",
"the",
"values",
"comprising",
"K",
".",
"The",
"result",
"is",
"uncloned",
"cached",
"and",
"shared",
"by",
"all",
"callers",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumMap.java#L774-L778 |
32,995 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java | NameTable.getVariableShortName | public String getVariableShortName(VariableElement var) {
String baseName = getVariableBaseName(var);
if (var.getKind().isField() && !ElementUtil.isGlobalVar(var)) {
return baseName + '_';
}
return baseName;
} | java | public String getVariableShortName(VariableElement var) {
String baseName = getVariableBaseName(var);
if (var.getKind().isField() && !ElementUtil.isGlobalVar(var)) {
return baseName + '_';
}
return baseName;
} | [
"public",
"String",
"getVariableShortName",
"(",
"VariableElement",
"var",
")",
"{",
"String",
"baseName",
"=",
"getVariableBaseName",
"(",
"var",
")",
";",
"if",
"(",
"var",
".",
"getKind",
"(",
")",
".",
"isField",
"(",
")",
"&&",
"!",
"ElementUtil",
"."... | Gets the non-qualified variable name, with underscore suffix. | [
"Gets",
"the",
"non",
"-",
"qualified",
"variable",
"name",
"with",
"underscore",
"suffix",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java#L214-L220 |
32,996 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java | NameTable.getVariableQualifiedName | public String getVariableQualifiedName(VariableElement var) {
String shortName = getVariableShortName(var);
if (ElementUtil.isGlobalVar(var)) {
String className = getFullName(ElementUtil.getDeclaringClass(var));
if (ElementUtil.isEnumConstant(var)) {
// Enums are declared in an array, so we ... | java | public String getVariableQualifiedName(VariableElement var) {
String shortName = getVariableShortName(var);
if (ElementUtil.isGlobalVar(var)) {
String className = getFullName(ElementUtil.getDeclaringClass(var));
if (ElementUtil.isEnumConstant(var)) {
// Enums are declared in an array, so we ... | [
"public",
"String",
"getVariableQualifiedName",
"(",
"VariableElement",
"var",
")",
"{",
"String",
"shortName",
"=",
"getVariableShortName",
"(",
"var",
")",
";",
"if",
"(",
"ElementUtil",
".",
"isGlobalVar",
"(",
"var",
")",
")",
"{",
"String",
"className",
"... | Gets the name of the variable as it is declared in ObjC, fully qualified. | [
"Gets",
"the",
"name",
"of",
"the",
"variable",
"as",
"it",
"is",
"declared",
"in",
"ObjC",
"fully",
"qualified",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java#L225-L237 |
32,997 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java | NameTable.camelCaseQualifiedName | public static String camelCaseQualifiedName(String fqn) {
StringBuilder sb = new StringBuilder();
for (String part : fqn.split("\\.")) {
sb.append(capitalize(part));
}
return sb.toString();
} | java | public static String camelCaseQualifiedName(String fqn) {
StringBuilder sb = new StringBuilder();
for (String part : fqn.split("\\.")) {
sb.append(capitalize(part));
}
return sb.toString();
} | [
"public",
"static",
"String",
"camelCaseQualifiedName",
"(",
"String",
"fqn",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"String",
"part",
":",
"fqn",
".",
"split",
"(",
"\"\\\\.\"",
")",
")",
"{",
"sb",
".",... | Given a period-separated name, return as a camel-cased type name. For
example, java.util.logging.Level is returned as JavaUtilLoggingLevel. | [
"Given",
"a",
"period",
"-",
"separated",
"name",
"return",
"as",
"a",
"camel",
"-",
"cased",
"type",
"name",
".",
"For",
"example",
"java",
".",
"util",
".",
"logging",
".",
"Level",
"is",
"returned",
"as",
"JavaUtilLoggingLevel",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java#L257-L263 |
32,998 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java | NameTable.camelCasePath | public static String camelCasePath(String fqn) {
StringBuilder sb = new StringBuilder();
for (String part : fqn.split(Pattern.quote(File.separator))) {
sb.append(capitalize(part));
}
return sb.toString();
} | java | public static String camelCasePath(String fqn) {
StringBuilder sb = new StringBuilder();
for (String part : fqn.split(Pattern.quote(File.separator))) {
sb.append(capitalize(part));
}
return sb.toString();
} | [
"public",
"static",
"String",
"camelCasePath",
"(",
"String",
"fqn",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"String",
"part",
":",
"fqn",
".",
"split",
"(",
"Pattern",
".",
"quote",
"(",
"File",
".",
"s... | Given a path, return as a camel-cased name. Used, for example, in header guards. | [
"Given",
"a",
"path",
"return",
"as",
"a",
"camel",
"-",
"cased",
"name",
".",
"Used",
"for",
"example",
"in",
"header",
"guards",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java#L268-L274 |
32,999 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java | NameTable.getFullFunctionName | public String getFullFunctionName(ExecutableElement method) {
return getFullName(ElementUtil.getDeclaringClass(method)) + '_' + getFunctionName(method);
} | java | public String getFullFunctionName(ExecutableElement method) {
return getFullName(ElementUtil.getDeclaringClass(method)) + '_' + getFunctionName(method);
} | [
"public",
"String",
"getFullFunctionName",
"(",
"ExecutableElement",
"method",
")",
"{",
"return",
"getFullName",
"(",
"ElementUtil",
".",
"getDeclaringClass",
"(",
"method",
")",
")",
"+",
"'",
"'",
"+",
"getFunctionName",
"(",
"method",
")",
";",
"}"
] | Returns a "Type_method" function name for static methods, such as from
enum types. A combination of classname plus modified selector is
guaranteed to be unique within the app. | [
"Returns",
"a",
"Type_method",
"function",
"name",
"for",
"static",
"methods",
"such",
"as",
"from",
"enum",
"types",
".",
"A",
"combination",
"of",
"classname",
"plus",
"modified",
"selector",
"is",
"guaranteed",
"to",
"be",
"unique",
"within",
"the",
"app",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/NameTable.java#L413-L415 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.