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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35,400 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactByteArray.java | CompactByteArray.expand | private void expand()
{
int i;
if (isCompact) {
byte[] tempArray;
hashes = new int[INDEXCOUNT];
tempArray = new byte[UNICODECOUNT];
for (i = 0; i < UNICODECOUNT; ++i) {
byte value = elementAt((char)i);
tempArray[i] = va... | java | private void expand()
{
int i;
if (isCompact) {
byte[] tempArray;
hashes = new int[INDEXCOUNT];
tempArray = new byte[UNICODECOUNT];
for (i = 0; i < UNICODECOUNT; ++i) {
byte value = elementAt((char)i);
tempArray[i] = va... | [
"private",
"void",
"expand",
"(",
")",
"{",
"int",
"i",
";",
"if",
"(",
"isCompact",
")",
"{",
"byte",
"[",
"]",
"tempArray",
";",
"hashes",
"=",
"new",
"int",
"[",
"INDEXCOUNT",
"]",
";",
"tempArray",
"=",
"new",
"byte",
"[",
"UNICODECOUNT",
"]",
... | Expanding takes the array back to a 65536 element array. | [
"Expanding",
"takes",
"the",
"array",
"back",
"to",
"a",
"65536",
"element",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactByteArray.java#L375-L394 |
35,401 | google/j2objc | jre_emul/Classes/java/text/IOSCollator.java | IOSCollator.setDecomposition | @Override
public void setDecomposition(int value) {
if (value < Collator.NO_DECOMPOSITION || value > Collator.FULL_DECOMPOSITION) {
throw new IllegalArgumentException();
}
decomposition = value;
} | java | @Override
public void setDecomposition(int value) {
if (value < Collator.NO_DECOMPOSITION || value > Collator.FULL_DECOMPOSITION) {
throw new IllegalArgumentException();
}
decomposition = value;
} | [
"@",
"Override",
"public",
"void",
"setDecomposition",
"(",
"int",
"value",
")",
"{",
"if",
"(",
"value",
"<",
"Collator",
".",
"NO_DECOMPOSITION",
"||",
"value",
">",
"Collator",
".",
"FULL_DECOMPOSITION",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
... | Sets decomposition field, but is otherwise unused. | [
"Sets",
"decomposition",
"field",
"but",
"is",
"otherwise",
"unused",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/java/text/IOSCollator.java#L82-L88 |
35,402 | google/j2objc | jre_emul/Classes/java/text/IOSCollator.java | IOSCollator.setStrength | @Override
public void setStrength(int value) {
if (value < Collator.PRIMARY || value > Collator.IDENTICAL) {
throw new IllegalArgumentException();
}
strength = value;
} | java | @Override
public void setStrength(int value) {
if (value < Collator.PRIMARY || value > Collator.IDENTICAL) {
throw new IllegalArgumentException();
}
strength = value;
} | [
"@",
"Override",
"public",
"void",
"setStrength",
"(",
"int",
"value",
")",
"{",
"if",
"(",
"value",
"<",
"Collator",
".",
"PRIMARY",
"||",
"value",
">",
"Collator",
".",
"IDENTICAL",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"... | Sets strength field, but is otherwise unused. | [
"Sets",
"strength",
"field",
"but",
"is",
"otherwise",
"unused",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/java/text/IOSCollator.java#L93-L99 |
35,403 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/BitArray.java | BitArray.get | public boolean get(int index) throws ArrayIndexOutOfBoundsException {
if (index < 0 || index >= length) {
throw new ArrayIndexOutOfBoundsException(Integer.toString(index));
}
return (repn[subscript(index)] & position(index)) != 0;
} | java | public boolean get(int index) throws ArrayIndexOutOfBoundsException {
if (index < 0 || index >= length) {
throw new ArrayIndexOutOfBoundsException(Integer.toString(index));
}
return (repn[subscript(index)] & position(index)) != 0;
} | [
"public",
"boolean",
"get",
"(",
"int",
"index",
")",
"throws",
"ArrayIndexOutOfBoundsException",
"{",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">=",
"length",
")",
"{",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"Integer",
".",
"toString",
"("... | Returns the indexed bit in this BitArray. | [
"Returns",
"the",
"indexed",
"bit",
"in",
"this",
"BitArray",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/BitArray.java#L127-L133 |
35,404 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/BitArray.java | BitArray.set | public void set(int index, boolean value)
throws ArrayIndexOutOfBoundsException {
if (index < 0 || index >= length) {
throw new ArrayIndexOutOfBoundsException(Integer.toString(index));
}
int idx = subscript(index);
int bit = position(index);
if (value) {
... | java | public void set(int index, boolean value)
throws ArrayIndexOutOfBoundsException {
if (index < 0 || index >= length) {
throw new ArrayIndexOutOfBoundsException(Integer.toString(index));
}
int idx = subscript(index);
int bit = position(index);
if (value) {
... | [
"public",
"void",
"set",
"(",
"int",
"index",
",",
"boolean",
"value",
")",
"throws",
"ArrayIndexOutOfBoundsException",
"{",
"if",
"(",
"index",
"<",
"0",
"||",
"index",
">=",
"length",
")",
"{",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"Integer"... | Sets the indexed bit in this BitArray. | [
"Sets",
"the",
"indexed",
"bit",
"in",
"this",
"BitArray",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/BitArray.java#L138-L151 |
35,405 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/BitArray.java | BitArray.toBooleanArray | public boolean[] toBooleanArray() {
boolean[] bits = new boolean[length];
for (int i=0; i < length; i++) {
bits[i] = get(i);
}
return bits;
} | java | public boolean[] toBooleanArray() {
boolean[] bits = new boolean[length];
for (int i=0; i < length; i++) {
bits[i] = get(i);
}
return bits;
} | [
"public",
"boolean",
"[",
"]",
"toBooleanArray",
"(",
")",
"{",
"boolean",
"[",
"]",
"bits",
"=",
"new",
"boolean",
"[",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
"{",
"bits",
"[",
"i",
... | Return a boolean array with the same bit values a this BitArray. | [
"Return",
"a",
"boolean",
"array",
"with",
"the",
"same",
"bit",
"values",
"a",
"this",
"BitArray",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/BitArray.java#L190-L197 |
35,406 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/calendar/BaseCalendar.java | BaseCalendar.getCalendarDateFromFixedDate | public void getCalendarDateFromFixedDate(CalendarDate date,
long fixedDate) {
Date gdate = (Date) date;
int year;
long jan1;
boolean isLeap;
if (gdate.hit(fixedDate)) {
year = gdate.getCachedYear();
jan1 = gdate... | java | public void getCalendarDateFromFixedDate(CalendarDate date,
long fixedDate) {
Date gdate = (Date) date;
int year;
long jan1;
boolean isLeap;
if (gdate.hit(fixedDate)) {
year = gdate.getCachedYear();
jan1 = gdate... | [
"public",
"void",
"getCalendarDateFromFixedDate",
"(",
"CalendarDate",
"date",
",",
"long",
"fixedDate",
")",
"{",
"Date",
"gdate",
"=",
"(",
"Date",
")",
"date",
";",
"int",
"year",
";",
"long",
"jan1",
";",
"boolean",
"isLeap",
";",
"if",
"(",
"gdate",
... | should be 'protected' | [
"should",
"be",
"protected"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/calendar/BaseCalendar.java#L419-L467 |
35,407 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/calendar/BaseCalendar.java | BaseCalendar.getGregorianYearFromFixedDate | final int getGregorianYearFromFixedDate(long fixedDate) {
long d0;
int d1, d2, d3, d4;
int n400, n100, n4, n1;
int year;
if (fixedDate > 0) {
d0 = fixedDate - 1;
n400 = (int)(d0 / 146097);
d1 = (int)(d0 % 146097);
n100 = d1 / 36... | java | final int getGregorianYearFromFixedDate(long fixedDate) {
long d0;
int d1, d2, d3, d4;
int n400, n100, n4, n1;
int year;
if (fixedDate > 0) {
d0 = fixedDate - 1;
n400 = (int)(d0 / 146097);
d1 = (int)(d0 % 146097);
n100 = d1 / 36... | [
"final",
"int",
"getGregorianYearFromFixedDate",
"(",
"long",
"fixedDate",
")",
"{",
"long",
"d0",
";",
"int",
"d1",
",",
"d2",
",",
"d3",
",",
"d4",
";",
"int",
"n400",
",",
"n100",
",",
"n4",
",",
"n1",
";",
"int",
"year",
";",
"if",
"(",
"fixedD... | Returns the Gregorian year number of the given fixed date. | [
"Returns",
"the",
"Gregorian",
"year",
"number",
"of",
"the",
"given",
"fixed",
"date",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/util/calendar/BaseCalendar.java#L492-L524 |
35,408 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/NumberFormat.java | NumberFormat.setMaximumFractionDigits | public void setMaximumFractionDigits(int newValue) {
maximumFractionDigits = Math.max(0,newValue);
if (maximumFractionDigits < minimumFractionDigits) {
minimumFractionDigits = maximumFractionDigits;
}
} | java | public void setMaximumFractionDigits(int newValue) {
maximumFractionDigits = Math.max(0,newValue);
if (maximumFractionDigits < minimumFractionDigits) {
minimumFractionDigits = maximumFractionDigits;
}
} | [
"public",
"void",
"setMaximumFractionDigits",
"(",
"int",
"newValue",
")",
"{",
"maximumFractionDigits",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"newValue",
")",
";",
"if",
"(",
"maximumFractionDigits",
"<",
"minimumFractionDigits",
")",
"{",
"minimumFractionDigit... | Sets the maximum number of digits allowed in the fraction portion of a
number. maximumFractionDigits must be >= minimumFractionDigits. If the
new value for maximumFractionDigits is less than the current value
of minimumFractionDigits, then minimumFractionDigits will also be set to
the new value.
@param newValue the ma... | [
"Sets",
"the",
"maximum",
"number",
"of",
"digits",
"allowed",
"in",
"the",
"fraction",
"portion",
"of",
"a",
"number",
".",
"maximumFractionDigits",
"must",
"be",
">",
"=",
"minimumFractionDigits",
".",
"If",
"the",
"new",
"value",
"for",
"maximumFractionDigits... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/NumberFormat.java#L624-L629 |
35,409 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/NumberFormat.java | NumberFormat.adjustForCurrencyDefaultFractionDigits | private static void adjustForCurrencyDefaultFractionDigits(
DecimalFormat format, DecimalFormatSymbols symbols) {
Currency currency = symbols.getCurrency();
if (currency == null) {
try {
currency = Currency.getInstance(symbols.getInternationalCurrencySymbol());
... | java | private static void adjustForCurrencyDefaultFractionDigits(
DecimalFormat format, DecimalFormatSymbols symbols) {
Currency currency = symbols.getCurrency();
if (currency == null) {
try {
currency = Currency.getInstance(symbols.getInternationalCurrencySymbol());
... | [
"private",
"static",
"void",
"adjustForCurrencyDefaultFractionDigits",
"(",
"DecimalFormat",
"format",
",",
"DecimalFormatSymbols",
"symbols",
")",
"{",
"Currency",
"currency",
"=",
"symbols",
".",
"getCurrency",
"(",
")",
";",
"if",
"(",
"currency",
"==",
"null",
... | Adjusts the minimum and maximum fraction digits to values that
are reasonable for the currency's default fraction digits. | [
"Adjusts",
"the",
"minimum",
"and",
"maximum",
"fraction",
"digits",
"to",
"values",
"that",
"are",
"reasonable",
"for",
"the",
"currency",
"s",
"default",
"fraction",
"digits",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/NumberFormat.java#L783-L807 |
35,410 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/GZIPOutputStream.java | GZIPOutputStream.write | public synchronized void write(byte[] buf, int off, int len)
throws IOException
{
super.write(buf, off, len);
crc.update(buf, off, len);
} | java | public synchronized void write(byte[] buf, int off, int len)
throws IOException
{
super.write(buf, off, len);
crc.update(buf, off, len);
} | [
"public",
"synchronized",
"void",
"write",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"super",
".",
"write",
"(",
"buf",
",",
"off",
",",
"len",
")",
";",
"crc",
".",
"update",
"(",
"buf",... | Writes array of bytes to the compressed output stream. This method
will block until all the bytes are written.
@param buf the data to be written
@param off the start offset of the data
@param len the length of the data
@exception IOException If an I/O error has occurred. | [
"Writes",
"array",
"of",
"bytes",
"to",
"the",
"compressed",
"output",
"stream",
".",
"This",
"method",
"will",
"block",
"until",
"all",
"the",
"bytes",
"are",
"written",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/GZIPOutputStream.java#L142-L147 |
35,411 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/GZIPOutputStream.java | GZIPOutputStream.finish | public void finish() throws IOException {
if (!def.finished()) {
def.finish();
while (!def.finished()) {
int len = def.deflate(buf, 0, buf.length);
if (def.finished() && len <= buf.length - TRAILER_SIZE) {
// last deflater buffer. Fit t... | java | public void finish() throws IOException {
if (!def.finished()) {
def.finish();
while (!def.finished()) {
int len = def.deflate(buf, 0, buf.length);
if (def.finished() && len <= buf.length - TRAILER_SIZE) {
// last deflater buffer. Fit t... | [
"public",
"void",
"finish",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"def",
".",
"finished",
"(",
")",
")",
"{",
"def",
".",
"finish",
"(",
")",
";",
"while",
"(",
"!",
"def",
".",
"finished",
"(",
")",
")",
"{",
"int",
"len",
"=... | Finishes writing compressed data to the output stream without closing
the underlying stream. Use this method when applying multiple filters
in succession to the same output stream.
@exception IOException if an I/O error has occurred | [
"Finishes",
"writing",
"compressed",
"data",
"to",
"the",
"output",
"stream",
"without",
"closing",
"the",
"underlying",
"stream",
".",
"Use",
"this",
"method",
"when",
"applying",
"multiple",
"filters",
"in",
"succession",
"to",
"the",
"same",
"output",
"stream... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/GZIPOutputStream.java#L155-L176 |
35,412 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java | EasterRule.firstBetween | @Override
public Date firstBetween(Date start, Date end)
{
return doFirstBetween(start, end);
} | java | @Override
public Date firstBetween(Date start, Date end)
{
return doFirstBetween(start, end);
} | [
"@",
"Override",
"public",
"Date",
"firstBetween",
"(",
"Date",
"start",
",",
"Date",
"end",
")",
"{",
"return",
"doFirstBetween",
"(",
"start",
",",
"end",
")",
";",
"}"
] | Return the first occurrence of this rule on or after
the given start date and before the given end date. | [
"Return",
"the",
"first",
"occurrence",
"of",
"this",
"rule",
"on",
"or",
"after",
"the",
"given",
"start",
"date",
"and",
"before",
"the",
"given",
"end",
"date",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java#L161-L165 |
35,413 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java | EasterRule.isOn | @Override
public boolean isOn(Date date)
{
synchronized(calendar) {
calendar.setTime(date);
int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
calendar.setTime(computeInYear(calendar.getTime(), calendar));
return calendar.get(Calendar.DAY_OF_YEAR) == da... | java | @Override
public boolean isOn(Date date)
{
synchronized(calendar) {
calendar.setTime(date);
int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
calendar.setTime(computeInYear(calendar.getTime(), calendar));
return calendar.get(Calendar.DAY_OF_YEAR) == da... | [
"@",
"Override",
"public",
"boolean",
"isOn",
"(",
"Date",
"date",
")",
"{",
"synchronized",
"(",
"calendar",
")",
"{",
"calendar",
".",
"setTime",
"(",
"date",
")",
";",
"int",
"dayOfYear",
"=",
"calendar",
".",
"get",
"(",
"Calendar",
".",
"DAY_OF_YEAR... | Return true if the given Date is on the same day as Easter | [
"Return",
"true",
"if",
"the",
"given",
"Date",
"is",
"on",
"the",
"same",
"day",
"as",
"Easter"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java#L170-L181 |
35,414 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java | EasterRule.isBetween | @Override
public boolean isBetween(Date start, Date end)
{
return firstBetween(start, end) != null; // TODO: optimize?
} | java | @Override
public boolean isBetween(Date start, Date end)
{
return firstBetween(start, end) != null; // TODO: optimize?
} | [
"@",
"Override",
"public",
"boolean",
"isBetween",
"(",
"Date",
"start",
",",
"Date",
"end",
")",
"{",
"return",
"firstBetween",
"(",
"start",
",",
"end",
")",
"!=",
"null",
";",
"// TODO: optimize?",
"}"
] | Return true if Easter occurs between the two dates given | [
"Return",
"true",
"if",
"Easter",
"occurs",
"between",
"the",
"two",
"dates",
"given"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/EasterHoliday.java#L186-L190 |
35,415 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRulesProvider.java | ZoneRulesProvider.getProvider | private static ZoneRulesProvider getProvider(String zoneId) {
ZoneRulesProvider provider = ZONES.get(zoneId);
if (provider == null) {
if (ZONES.isEmpty()) {
throw new ZoneRulesException("No time-zone data files registered");
}
throw new ZoneRulesExcept... | java | private static ZoneRulesProvider getProvider(String zoneId) {
ZoneRulesProvider provider = ZONES.get(zoneId);
if (provider == null) {
if (ZONES.isEmpty()) {
throw new ZoneRulesException("No time-zone data files registered");
}
throw new ZoneRulesExcept... | [
"private",
"static",
"ZoneRulesProvider",
"getProvider",
"(",
"String",
"zoneId",
")",
"{",
"ZoneRulesProvider",
"provider",
"=",
"ZONES",
".",
"get",
"(",
"zoneId",
")",
";",
"if",
"(",
"provider",
"==",
"null",
")",
"{",
"if",
"(",
"ZONES",
".",
"isEmpty... | Gets the provider for the zone ID.
@param zoneId the zone ID as defined by {@code ZoneId}, not null
@return the provider, not null
@throws ZoneRulesException if the zone ID is unknown | [
"Gets",
"the",
"provider",
"for",
"the",
"zone",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRulesProvider.java#L222-L231 |
35,416 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.formatMeasurePerUnit | public StringBuilder formatMeasurePerUnit(
Measure measure,
MeasureUnit perUnit,
StringBuilder appendTo,
FieldPosition pos) {
MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit(
measure.getUnit(), perUnit);
if (resolvedUnit != null) ... | java | public StringBuilder formatMeasurePerUnit(
Measure measure,
MeasureUnit perUnit,
StringBuilder appendTo,
FieldPosition pos) {
MeasureUnit resolvedUnit = MeasureUnit.resolveUnitPerUnit(
measure.getUnit(), perUnit);
if (resolvedUnit != null) ... | [
"public",
"StringBuilder",
"formatMeasurePerUnit",
"(",
"Measure",
"measure",
",",
"MeasureUnit",
"perUnit",
",",
"StringBuilder",
"appendTo",
",",
"FieldPosition",
"pos",
")",
"{",
"MeasureUnit",
"resolvedUnit",
"=",
"MeasureUnit",
".",
"resolveUnitPerUnit",
"(",
"me... | Formats a single measure per unit.
An example of such a formatted string is "3.5 meters per second."
@param measure the measure object. In above example, 3.5 meters.
@param perUnit the per unit. In above example, it is MeasureUnit.SECOND
@param appendTo formatted string appended here.
@param pos The field posi... | [
"Formats",
"a",
"single",
"measure",
"per",
"unit",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L480-L502 |
35,417 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.formatMeasures | public StringBuilder formatMeasures(
StringBuilder appendTo, FieldPosition fieldPosition, Measure... measures) {
// fast track for trivial cases
if (measures.length == 0) {
return appendTo;
}
if (measures.length == 1) {
return formatMeasure(measures[0]... | java | public StringBuilder formatMeasures(
StringBuilder appendTo, FieldPosition fieldPosition, Measure... measures) {
// fast track for trivial cases
if (measures.length == 0) {
return appendTo;
}
if (measures.length == 1) {
return formatMeasure(measures[0]... | [
"public",
"StringBuilder",
"formatMeasures",
"(",
"StringBuilder",
"appendTo",
",",
"FieldPosition",
"fieldPosition",
",",
"Measure",
"...",
"measures",
")",
"{",
"// fast track for trivial cases",
"if",
"(",
"measures",
".",
"length",
"==",
"0",
")",
"{",
"return",... | Formats a sequence of measures.
If the fieldPosition argument identifies a NumberFormat field,
then its indices are set to the beginning and end of the first such field
encountered. MeasureFormat itself does not supply any fields.
@param appendTo the formatted string appended here.
@param fieldPosition Identifies a f... | [
"Formats",
"a",
"sequence",
"of",
"measures",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L517-L550 |
35,418 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.loadLocaleData | private static MeasureFormatData loadLocaleData(ULocale locale) {
ICUResourceBundle resource =
(ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_UNIT_BASE_NAME, locale);
MeasureFormatData cacheData = new MeasureFormatData();
UnitDataSink sink = new UnitDataSink(cac... | java | private static MeasureFormatData loadLocaleData(ULocale locale) {
ICUResourceBundle resource =
(ICUResourceBundle)UResourceBundle.getBundleInstance(ICUData.ICU_UNIT_BASE_NAME, locale);
MeasureFormatData cacheData = new MeasureFormatData();
UnitDataSink sink = new UnitDataSink(cac... | [
"private",
"static",
"MeasureFormatData",
"loadLocaleData",
"(",
"ULocale",
"locale",
")",
"{",
"ICUResourceBundle",
"resource",
"=",
"(",
"ICUResourceBundle",
")",
"UResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_UNIT_BASE_NAME",
",",
"locale",
... | Returns formatting data for all MeasureUnits except for currency ones. | [
"Returns",
"formatting",
"data",
"for",
"all",
"MeasureUnits",
"except",
"for",
"currency",
"ones",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L952-L959 |
35,419 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.loadNumericDurationFormat | private static DateFormat loadNumericDurationFormat(
ICUResourceBundle r, String type) {
r = r.getWithFallback(String.format("durationUnits/%s", type));
// We replace 'h' with 'H' because 'h' does not make sense in the context of durations.
DateFormat result = new SimpleDateFormat(r.... | java | private static DateFormat loadNumericDurationFormat(
ICUResourceBundle r, String type) {
r = r.getWithFallback(String.format("durationUnits/%s", type));
// We replace 'h' with 'H' because 'h' does not make sense in the context of durations.
DateFormat result = new SimpleDateFormat(r.... | [
"private",
"static",
"DateFormat",
"loadNumericDurationFormat",
"(",
"ICUResourceBundle",
"r",
",",
"String",
"type",
")",
"{",
"r",
"=",
"r",
".",
"getWithFallback",
"(",
"String",
".",
"format",
"(",
"\"durationUnits/%s\"",
",",
"type",
")",
")",
";",
"// We... | type is one of "hm", "ms" or "hms" | [
"type",
"is",
"one",
"of",
"hm",
"ms",
"or",
"hms"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L1195-L1202 |
35,420 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.toHMS | private static Number[] toHMS(Measure[] measures) {
Number[] result = new Number[3];
int lastIdx = -1;
for (Measure m : measures) {
if (m.getNumber().doubleValue() < 0.0) {
return null;
}
Integer idxObj = hmsTo012.get(m.getUnit());
... | java | private static Number[] toHMS(Measure[] measures) {
Number[] result = new Number[3];
int lastIdx = -1;
for (Measure m : measures) {
if (m.getNumber().doubleValue() < 0.0) {
return null;
}
Integer idxObj = hmsTo012.get(m.getUnit());
... | [
"private",
"static",
"Number",
"[",
"]",
"toHMS",
"(",
"Measure",
"[",
"]",
"measures",
")",
"{",
"Number",
"[",
"]",
"result",
"=",
"new",
"Number",
"[",
"3",
"]",
";",
"int",
"lastIdx",
"=",
"-",
"1",
";",
"for",
"(",
"Measure",
"m",
":",
"meas... | returned array will be null. | [
"returned",
"array",
"will",
"be",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L1209-L1229 |
35,421 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.formatNumeric | private StringBuilder formatNumeric(Number[] hms, StringBuilder appendable) {
// find the start and end of non-nil values in hms array. We have to know if we
// have hour-minute; minute-second; or hour-minute-second.
int startIndex = -1;
int endIndex = -1;
for (int i = 0; i < hm... | java | private StringBuilder formatNumeric(Number[] hms, StringBuilder appendable) {
// find the start and end of non-nil values in hms array. We have to know if we
// have hour-minute; minute-second; or hour-minute-second.
int startIndex = -1;
int endIndex = -1;
for (int i = 0; i < hm... | [
"private",
"StringBuilder",
"formatNumeric",
"(",
"Number",
"[",
"]",
"hms",
",",
"StringBuilder",
"appendable",
")",
"{",
"// find the start and end of non-nil values in hms array. We have to know if we",
"// have hour-minute; minute-second; or hour-minute-second.",
"int",
"startInd... | values in hms with 0. | [
"values",
"in",
"hms",
"with",
"0",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L1233-L1283 |
35,422 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java | MeasureFormat.formatNumeric | private StringBuilder formatNumeric(
Date duration,
DateFormat formatter,
DateFormat.Field smallestField,
Number smallestAmount,
StringBuilder appendTo) {
// Format the smallest amount ahead of time.
String smallestAmountFormatted;
// ... | java | private StringBuilder formatNumeric(
Date duration,
DateFormat formatter,
DateFormat.Field smallestField,
Number smallestAmount,
StringBuilder appendTo) {
// Format the smallest amount ahead of time.
String smallestAmountFormatted;
// ... | [
"private",
"StringBuilder",
"formatNumeric",
"(",
"Date",
"duration",
",",
"DateFormat",
"formatter",
",",
"DateFormat",
".",
"Field",
"smallestField",
",",
"Number",
"smallestAmount",
",",
"StringBuilder",
"appendTo",
")",
"{",
"// Format the smallest amount ahead of tim... | appendTo is where the formatted string is appended. | [
"appendTo",
"is",
"where",
"the",
"formatted",
"string",
"is",
"appended",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MeasureFormat.java#L1294-L1347 |
35,423 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/SAXException.java | SAXException.getMessage | public String getMessage ()
{
String message = super.getMessage();
if (message == null && exception != null) {
return exception.getMessage();
} else {
return message;
}
} | java | public String getMessage ()
{
String message = super.getMessage();
if (message == null && exception != null) {
return exception.getMessage();
} else {
return message;
}
} | [
"public",
"String",
"getMessage",
"(",
")",
"{",
"String",
"message",
"=",
"super",
".",
"getMessage",
"(",
")",
";",
"if",
"(",
"message",
"==",
"null",
"&&",
"exception",
"!=",
"null",
")",
"{",
"return",
"exception",
".",
"getMessage",
"(",
")",
";"... | Return a detail message for this exception.
<p>If there is an embedded exception, and if the SAXException
has no detail message of its own, this method will return
the detail message from the embedded exception.</p>
@return The error or warning message. | [
"Return",
"a",
"detail",
"message",
"for",
"this",
"exception",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/SAXException.java#L100-L109 |
35,424 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java | PluralRules.parseDescription | public static PluralRules parseDescription(String description)
throws ParseException {
description = description.trim();
return description.length() == 0 ? DEFAULT : new PluralRules(parseRuleChain(description));
} | java | public static PluralRules parseDescription(String description)
throws ParseException {
description = description.trim();
return description.length() == 0 ? DEFAULT : new PluralRules(parseRuleChain(description));
} | [
"public",
"static",
"PluralRules",
"parseDescription",
"(",
"String",
"description",
")",
"throws",
"ParseException",
"{",
"description",
"=",
"description",
".",
"trim",
"(",
")",
";",
"return",
"description",
".",
"length",
"(",
")",
"==",
"0",
"?",
"DEFAULT... | Parses a plural rules description and returns a PluralRules.
@param description the rule description.
@throws ParseException if the description cannot be parsed.
The exception index is typically not set, it will be -1. | [
"Parses",
"a",
"plural",
"rules",
"description",
"and",
"returns",
"a",
"PluralRules",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L384-L389 |
35,425 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java | PluralRules.select | @Deprecated
public String select(double number, int countVisibleFractionDigits, long fractionaldigits) {
return rules.select(new FixedDecimal(number, countVisibleFractionDigits, fractionaldigits));
} | java | @Deprecated
public String select(double number, int countVisibleFractionDigits, long fractionaldigits) {
return rules.select(new FixedDecimal(number, countVisibleFractionDigits, fractionaldigits));
} | [
"@",
"Deprecated",
"public",
"String",
"select",
"(",
"double",
"number",
",",
"int",
"countVisibleFractionDigits",
",",
"long",
"fractionaldigits",
")",
"{",
"return",
"rules",
".",
"select",
"(",
"new",
"FixedDecimal",
"(",
"number",
",",
"countVisibleFractionDi... | Given a number, returns the keyword of the first rule that applies to
the number.
@param number The number for which the rule has to be determined.
@return The keyword of the selected rule.
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / internal are hidden ... | [
"Given",
"a",
"number",
"returns",
"the",
"keyword",
"of",
"the",
"first",
"rule",
"that",
"applies",
"to",
"the",
"number",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L2000-L2003 |
35,426 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java | PluralRules.matches | @Deprecated
public boolean matches(FixedDecimal sample, String keyword) {
return rules.select(sample, keyword);
} | java | @Deprecated
public boolean matches(FixedDecimal sample, String keyword) {
return rules.select(sample, keyword);
} | [
"@",
"Deprecated",
"public",
"boolean",
"matches",
"(",
"FixedDecimal",
"sample",
",",
"String",
"keyword",
")",
"{",
"return",
"rules",
".",
"select",
"(",
"sample",
",",
"keyword",
")",
";",
"}"
] | Given a number information, and keyword, return whether the keyword would match the number.
@param sample The number information for which the rule has to be determined.
@param keyword The keyword to filter on
@deprecated This API is ICU internal only.
@hide original deprecated declaration
@hide draft / provisional / ... | [
"Given",
"a",
"number",
"information",
"and",
"keyword",
"return",
"whether",
"the",
"keyword",
"would",
"match",
"the",
"number",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L2029-L2032 |
35,427 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkingIteratorSorted.java | WalkingIteratorSorted.canBeWalkedInNaturalDocOrderStatic | boolean canBeWalkedInNaturalDocOrderStatic()
{
if (null != m_firstWalker)
{
AxesWalker walker = m_firstWalker;
int prevAxis = -1;
boolean prevIsSimpleDownAxis = true;
for(int i = 0; null != walker; i++)
{
int axis = walker.getAxis();
if(walker.isDocOrde... | java | boolean canBeWalkedInNaturalDocOrderStatic()
{
if (null != m_firstWalker)
{
AxesWalker walker = m_firstWalker;
int prevAxis = -1;
boolean prevIsSimpleDownAxis = true;
for(int i = 0; null != walker; i++)
{
int axis = walker.getAxis();
if(walker.isDocOrde... | [
"boolean",
"canBeWalkedInNaturalDocOrderStatic",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"m_firstWalker",
")",
"{",
"AxesWalker",
"walker",
"=",
"m_firstWalker",
";",
"int",
"prevAxis",
"=",
"-",
"1",
";",
"boolean",
"prevIsSimpleDownAxis",
"=",
"true",
";",
"... | Tell if the nodeset can be walked in doc order, via static analysis.
@return true if the nodeset can be walked in doc order, without sorting. | [
"Tell",
"if",
"the",
"nodeset",
"can",
"be",
"walked",
"in",
"doc",
"order",
"via",
"static",
"analysis",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkingIteratorSorted.java#L93-L134 |
35,428 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkingIteratorSorted.java | WalkingIteratorSorted.fixupVariables | public void fixupVariables(java.util.Vector vars, int globalsSize)
{
super.fixupVariables(vars, globalsSize);
int analysis = getAnalysisBits();
if(WalkerFactory.isNaturalDocOrder(analysis))
{
m_inNaturalOrderStatic = true;
}
else
{
m_inNaturalOrderStatic = false;
// System.... | java | public void fixupVariables(java.util.Vector vars, int globalsSize)
{
super.fixupVariables(vars, globalsSize);
int analysis = getAnalysisBits();
if(WalkerFactory.isNaturalDocOrder(analysis))
{
m_inNaturalOrderStatic = true;
}
else
{
m_inNaturalOrderStatic = false;
// System.... | [
"public",
"void",
"fixupVariables",
"(",
"java",
".",
"util",
".",
"Vector",
"vars",
",",
"int",
"globalsSize",
")",
"{",
"super",
".",
"fixupVariables",
"(",
"vars",
",",
"globalsSize",
")",
";",
"int",
"analysis",
"=",
"getAnalysisBits",
"(",
")",
";",
... | This function is used to perform some extra analysis of the iterator.
@param vars List of QNames that correspond to variables. This list
should be searched backwards for the first qualified name that
corresponds to the variable reference qname. The position of the
QName in the vector from the start of the vector wil... | [
"This",
"function",
"is",
"used",
"to",
"perform",
"some",
"extra",
"analysis",
"of",
"the",
"iterator",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/WalkingIteratorSorted.java#L196-L212 |
35,429 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/SecretKeyFactory.java | SecretKeyFactory.translateKey | public final SecretKey translateKey(SecretKey key)
throws InvalidKeyException {
if (serviceIterator == null) {
return spi.engineTranslateKey(key);
}
Exception failure = null;
SecretKeyFactorySpi mySpi = spi;
do {
try {
return my... | java | public final SecretKey translateKey(SecretKey key)
throws InvalidKeyException {
if (serviceIterator == null) {
return spi.engineTranslateKey(key);
}
Exception failure = null;
SecretKeyFactorySpi mySpi = spi;
do {
try {
return my... | [
"public",
"final",
"SecretKey",
"translateKey",
"(",
"SecretKey",
"key",
")",
"throws",
"InvalidKeyException",
"{",
"if",
"(",
"serviceIterator",
"==",
"null",
")",
"{",
"return",
"spi",
".",
"engineTranslateKey",
"(",
"key",
")",
";",
"}",
"Exception",
"failu... | Translates a key object, whose provider may be unknown or potentially
untrusted, into a corresponding key object of this secret-key factory.
@param key the key whose provider is unknown or untrusted
@return the translated key
@exception InvalidKeyException if the given key cannot be processed
by this secret-key fact... | [
"Translates",
"a",
"key",
"object",
"whose",
"provider",
"may",
"be",
"unknown",
"or",
"potentially",
"untrusted",
"into",
"a",
"corresponding",
"key",
"object",
"of",
"this",
"secret",
"-",
"key",
"factory",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/SecretKeyFactory.java#L590-L612 |
35,430 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java | CyclicBarrier.dowait | private int dowait(boolean timed, long nanos)
throws InterruptedException, BrokenBarrierException,
TimeoutException {
final ReentrantLock lock = this.lock;
lock.lock();
try {
// The call to trip.await() further down will release the lock while this thread block... | java | private int dowait(boolean timed, long nanos)
throws InterruptedException, BrokenBarrierException,
TimeoutException {
final ReentrantLock lock = this.lock;
lock.lock();
try {
// The call to trip.await() further down will release the lock while this thread block... | [
"private",
"int",
"dowait",
"(",
"boolean",
"timed",
",",
"long",
"nanos",
")",
"throws",
"InterruptedException",
",",
"BrokenBarrierException",
",",
"TimeoutException",
"{",
"final",
"ReentrantLock",
"lock",
"=",
"this",
".",
"lock",
";",
"lock",
".",
"lock",
... | Main barrier code, covering the various policies. | [
"Main",
"barrier",
"code",
"covering",
"the",
"various",
"policies",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java#L201-L270 |
35,431 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java | CyclicBarrier.isBroken | public boolean isBroken() {
final ReentrantLock lock = this.lock;
lock.lock();
try {
return generation.broken;
} finally {
lock.unlock();
}
} | java | public boolean isBroken() {
final ReentrantLock lock = this.lock;
lock.lock();
try {
return generation.broken;
} finally {
lock.unlock();
}
} | [
"public",
"boolean",
"isBroken",
"(",
")",
"{",
"final",
"ReentrantLock",
"lock",
"=",
"this",
".",
"lock",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"generation",
".",
"broken",
";",
"}",
"finally",
"{",
"lock",
".",
"unlock",
"... | Queries if this barrier is in a broken state.
@return {@code true} if one or more parties broke out of this
barrier due to interruption or timeout since
construction or the last reset, or a barrier action
failed due to an exception; {@code false} otherwise. | [
"Queries",
"if",
"this",
"barrier",
"is",
"in",
"a",
"broken",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java#L453-L461 |
35,432 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java | CyclicBarrier.getNumberWaiting | public int getNumberWaiting() {
final ReentrantLock lock = this.lock;
lock.lock();
try {
return parties - count;
} finally {
lock.unlock();
}
} | java | public int getNumberWaiting() {
final ReentrantLock lock = this.lock;
lock.lock();
try {
return parties - count;
} finally {
lock.unlock();
}
} | [
"public",
"int",
"getNumberWaiting",
"(",
")",
"{",
"final",
"ReentrantLock",
"lock",
"=",
"this",
".",
"lock",
";",
"lock",
".",
"lock",
"(",
")",
";",
"try",
"{",
"return",
"parties",
"-",
"count",
";",
"}",
"finally",
"{",
"lock",
".",
"unlock",
"... | Returns the number of parties currently waiting at the barrier.
This method is primarily useful for debugging and assertions.
@return the number of parties currently blocked in {@link #await} | [
"Returns",
"the",
"number",
"of",
"parties",
"currently",
"waiting",
"at",
"the",
"barrier",
".",
"This",
"method",
"is",
"primarily",
"useful",
"for",
"debugging",
"and",
"assertions",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/CyclicBarrier.java#L489-L497 |
35,433 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java | CollationData.getCEFromOffsetCE32 | long getCEFromOffsetCE32(int c, int ce32) {
long dataCE = ces[Collation.indexFromCE32(ce32)];
return Collation.makeCE(Collation.getThreeBytePrimaryForOffsetData(c, dataCE));
} | java | long getCEFromOffsetCE32(int c, int ce32) {
long dataCE = ces[Collation.indexFromCE32(ce32)];
return Collation.makeCE(Collation.getThreeBytePrimaryForOffsetData(c, dataCE));
} | [
"long",
"getCEFromOffsetCE32",
"(",
"int",
"c",
",",
"int",
"ce32",
")",
"{",
"long",
"dataCE",
"=",
"ces",
"[",
"Collation",
".",
"indexFromCE32",
"(",
"ce32",
")",
"]",
";",
"return",
"Collation",
".",
"makeCE",
"(",
"Collation",
".",
"getThreeBytePrimar... | Computes a CE from c's ce32 which has the OFFSET_TAG. | [
"Computes",
"a",
"CE",
"from",
"c",
"s",
"ce32",
"which",
"has",
"the",
"OFFSET_TAG",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java#L111-L114 |
35,434 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java | CollationData.getSingleCE | long getSingleCE(int c) {
CollationData d;
int ce32 = getCE32(c);
if(ce32 == Collation.FALLBACK_CE32) {
d = base;
ce32 = base.getCE32(c);
} else {
d = this;
}
while(Collation.isSpecialCE32(ce32)) {
switch(Collation.tagFromCE... | java | long getSingleCE(int c) {
CollationData d;
int ce32 = getCE32(c);
if(ce32 == Collation.FALLBACK_CE32) {
d = base;
ce32 = base.getCE32(c);
} else {
d = this;
}
while(Collation.isSpecialCE32(ce32)) {
switch(Collation.tagFromCE... | [
"long",
"getSingleCE",
"(",
"int",
"c",
")",
"{",
"CollationData",
"d",
";",
"int",
"ce32",
"=",
"getCE32",
"(",
"c",
")",
";",
"if",
"(",
"ce32",
"==",
"Collation",
".",
"FALLBACK_CE32",
")",
"{",
"d",
"=",
"base",
";",
"ce32",
"=",
"base",
".",
... | Returns the single CE that c maps to.
Throws UnsupportedOperationException if c does not map to a single CE. | [
"Returns",
"the",
"single",
"CE",
"that",
"c",
"maps",
"to",
".",
"Throws",
"UnsupportedOperationException",
"if",
"c",
"does",
"not",
"map",
"to",
"a",
"single",
"CE",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java#L120-L182 |
35,435 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java | CollationData.getLastPrimaryForGroup | public long getLastPrimaryForGroup(int script) {
int index = getScriptIndex(script);
if(index == 0) {
return 0;
}
long limit = scriptStarts[index + 1];
return (limit << 16) - 1;
} | java | public long getLastPrimaryForGroup(int script) {
int index = getScriptIndex(script);
if(index == 0) {
return 0;
}
long limit = scriptStarts[index + 1];
return (limit << 16) - 1;
} | [
"public",
"long",
"getLastPrimaryForGroup",
"(",
"int",
"script",
")",
"{",
"int",
"index",
"=",
"getScriptIndex",
"(",
"script",
")",
";",
"if",
"(",
"index",
"==",
"0",
")",
"{",
"return",
"0",
";",
"}",
"long",
"limit",
"=",
"scriptStarts",
"[",
"in... | Returns the last primary for the script's reordering group.
@return the last primary of the group
(not an actual root collator primary weight),
or 0 if the script is unknown | [
"Returns",
"the",
"last",
"primary",
"for",
"the",
"script",
"s",
"reordering",
"group",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java#L208-L215 |
35,436 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java | CollationData.getGroupForPrimary | public int getGroupForPrimary(long p) {
p >>= 16;
if(p < scriptStarts[1] || scriptStarts[scriptStarts.length - 1] <= p) {
return -1;
}
int index = 1;
while(p >= scriptStarts[index + 1]) { ++index; }
for(int i = 0; i < numScripts; ++i) {
if(scriptsI... | java | public int getGroupForPrimary(long p) {
p >>= 16;
if(p < scriptStarts[1] || scriptStarts[scriptStarts.length - 1] <= p) {
return -1;
}
int index = 1;
while(p >= scriptStarts[index + 1]) { ++index; }
for(int i = 0; i < numScripts; ++i) {
if(scriptsI... | [
"public",
"int",
"getGroupForPrimary",
"(",
"long",
"p",
")",
"{",
"p",
">>=",
"16",
";",
"if",
"(",
"p",
"<",
"scriptStarts",
"[",
"1",
"]",
"||",
"scriptStarts",
"[",
"scriptStarts",
".",
"length",
"-",
"1",
"]",
"<=",
"p",
")",
"{",
"return",
"-... | Finds the reordering group which contains the primary weight.
@return the first script of the group, or -1 if the weight is beyond the last group | [
"Finds",
"the",
"reordering",
"group",
"which",
"contains",
"the",
"primary",
"weight",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/CollationData.java#L221-L239 |
35,437 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/Charsets.java | Charsets.toBigEndianUtf16Bytes | public static byte[] toBigEndianUtf16Bytes(char[] chars, int offset, int length) {
byte[] result = new byte[length * 2];
int end = offset + length;
int resultIndex = 0;
for (int i = offset; i < end; ++i) {
char ch = chars[i];
result[resultIndex++] = (byte) (ch >> ... | java | public static byte[] toBigEndianUtf16Bytes(char[] chars, int offset, int length) {
byte[] result = new byte[length * 2];
int end = offset + length;
int resultIndex = 0;
for (int i = offset; i < end; ++i) {
char ch = chars[i];
result[resultIndex++] = (byte) (ch >> ... | [
"public",
"static",
"byte",
"[",
"]",
"toBigEndianUtf16Bytes",
"(",
"char",
"[",
"]",
"chars",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"byte",
"[",
"]",
"result",
"=",
"new",
"byte",
"[",
"length",
"*",
"2",
"]",
";",
"int",
"end",
"=... | Returns a new byte array containing the bytes corresponding to the given characters,
encoded in UTF-16BE. All characters are representable in UTF-16BE. | [
"Returns",
"a",
"new",
"byte",
"array",
"containing",
"the",
"bytes",
"corresponding",
"to",
"the",
"given",
"characters",
"encoded",
"in",
"UTF",
"-",
"16BE",
".",
"All",
"characters",
"are",
"representable",
"in",
"UTF",
"-",
"16BE",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/Charsets.java#L66-L76 |
35,438 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMStringPool.java | DTMStringPool.main | public static void main(String[] args)
{
String[] word={
"Zero","One","Two","Three","Four","Five",
"Six","Seven","Eight","Nine","Ten",
"Eleven","Twelve","Thirteen","Fourteen","Fifteen",
"Sixteen","Seventeen","Eighteen","Nineteen","Twenty",
"Twenty-One","Twenty-Two","Twenty-Three","Tw... | java | public static void main(String[] args)
{
String[] word={
"Zero","One","Two","Three","Four","Five",
"Six","Seven","Eight","Nine","Ten",
"Eleven","Twelve","Thirteen","Fourteen","Fifteen",
"Sixteen","Seventeen","Eighteen","Nineteen","Twenty",
"Twenty-One","Twenty-Two","Twenty-Three","Tw... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"String",
"[",
"]",
"word",
"=",
"{",
"\"Zero\"",
",",
"\"One\"",
",",
"\"Two\"",
",",
"\"Three\"",
",",
"\"Four\"",
",",
"\"Five\"",
",",
"\"Six\"",
",",
"\"Seven\"",
",",
... | Command-line unit test driver. This test relies on the fact that
this version of the pool assigns indices consecutively, starting
from zero, as new unique strings are encountered. | [
"Command",
"-",
"line",
"unit",
"test",
"driver",
".",
"This",
"test",
"relies",
"on",
"the",
"fact",
"that",
"this",
"version",
"of",
"the",
"pool",
"assigns",
"indices",
"consecutively",
"starting",
"from",
"zero",
"as",
"new",
"unique",
"strings",
"are",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMStringPool.java#L141-L190 |
35,439 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedOutputStream.java | PipedOutputStream.close | @Override
public void close() throws IOException {
// Is the pipe connected?
PipedInputStream stream = target;
if (stream != null) {
stream.done();
target = null;
}
} | java | @Override
public void close() throws IOException {
// Is the pipe connected?
PipedInputStream stream = target;
if (stream != null) {
stream.done();
target = null;
}
} | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"// Is the pipe connected?",
"PipedInputStream",
"stream",
"=",
"target",
";",
"if",
"(",
"stream",
"!=",
"null",
")",
"{",
"stream",
".",
"done",
"(",
")",
";",
"target",
... | Closes this stream. If this stream is connected to an input stream, the
input stream is closed and the pipe is disconnected.
@throws IOException
if an error occurs while closing this stream. | [
"Closes",
"this",
"stream",
".",
"If",
"this",
"stream",
"is",
"connected",
"to",
"an",
"input",
"stream",
"the",
"input",
"stream",
"is",
"closed",
"and",
"the",
"pipe",
"is",
"disconnected",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedOutputStream.java#L63-L71 |
35,440 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/Inflater.java | Inflater.reset | public void reset() {
synchronized (zsRef) {
ensureOpen();
reset(zsRef.address());
buf = defaultBuf;
finished = false;
needDict = false;
off = len = 0;
bytesRead = bytesWritten = 0;
}
} | java | public void reset() {
synchronized (zsRef) {
ensureOpen();
reset(zsRef.address());
buf = defaultBuf;
finished = false;
needDict = false;
off = len = 0;
bytesRead = bytesWritten = 0;
}
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"synchronized",
"(",
"zsRef",
")",
"{",
"ensureOpen",
"(",
")",
";",
"reset",
"(",
"zsRef",
".",
"address",
"(",
")",
")",
";",
"buf",
"=",
"defaultBuf",
";",
"finished",
"=",
"false",
";",
"needDict",
"=",
... | Resets inflater so that a new set of input data can be processed. | [
"Resets",
"inflater",
"so",
"that",
"a",
"new",
"set",
"of",
"input",
"data",
"can",
"be",
"processed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/Inflater.java#L352-L362 |
35,441 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/AnnualTimeZoneRule.java | AnnualTimeZoneRule.getStartInYear | public Date getStartInYear(int year, int prevRawOffset, int prevDSTSavings) {
if (year < startYear || year > endYear) {
return null;
}
long ruleDay;
int type = dateTimeRule.getDateRuleType();
if (type == DateTimeRule.DOM) {
ruleDay = Grego.fieldsToDay(ye... | java | public Date getStartInYear(int year, int prevRawOffset, int prevDSTSavings) {
if (year < startYear || year > endYear) {
return null;
}
long ruleDay;
int type = dateTimeRule.getDateRuleType();
if (type == DateTimeRule.DOM) {
ruleDay = Grego.fieldsToDay(ye... | [
"public",
"Date",
"getStartInYear",
"(",
"int",
"year",
",",
"int",
"prevRawOffset",
",",
"int",
"prevDSTSavings",
")",
"{",
"if",
"(",
"year",
"<",
"startYear",
"||",
"year",
">",
"endYear",
")",
"{",
"return",
"null",
";",
"}",
"long",
"ruleDay",
";",
... | Gets the time when this rule takes effect in the given year.
@param year The Gregorian year, with 0 == 1 BCE, -1 == 2 BCE, etc.
@param prevRawOffset The standard time offset from UTC before this rule
takes effect in milliseconds.
@param prevDSTSavings The amount of daylight saving offset from the
s... | [
"Gets",
"the",
"time",
"when",
"this",
"rule",
"takes",
"effect",
"in",
"the",
"given",
"year",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/AnnualTimeZoneRule.java#L101-L155 |
35,442 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.getAvailableULocales | public ULocale[] getAvailableULocales() {
Set<String> keys = getLocaleIdToRulesIdMap(PluralType.CARDINAL).keySet();
ULocale[] locales = new ULocale[keys.size()];
int n = 0;
for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
locales[n++] = ULocale.createCanonical... | java | public ULocale[] getAvailableULocales() {
Set<String> keys = getLocaleIdToRulesIdMap(PluralType.CARDINAL).keySet();
ULocale[] locales = new ULocale[keys.size()];
int n = 0;
for (Iterator<String> iter = keys.iterator(); iter.hasNext();) {
locales[n++] = ULocale.createCanonical... | [
"public",
"ULocale",
"[",
"]",
"getAvailableULocales",
"(",
")",
"{",
"Set",
"<",
"String",
">",
"keys",
"=",
"getLocaleIdToRulesIdMap",
"(",
"PluralType",
".",
"CARDINAL",
")",
".",
"keySet",
"(",
")",
";",
"ULocale",
"[",
"]",
"locales",
"=",
"new",
"U... | Returns the locales for which we have plurals data. Utility for testing. | [
"Returns",
"the",
"locales",
"for",
"which",
"we",
"have",
"plurals",
"data",
".",
"Utility",
"for",
"testing",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L50-L58 |
35,443 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.getFunctionalEquivalent | public ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable) {
if (isAvailable != null && isAvailable.length > 0) {
String localeId = ULocale.canonicalize(locale.getBaseName());
Map<String, String> idMap = getLocaleIdToRulesIdMap(PluralType.CARDINAL);
isAvail... | java | public ULocale getFunctionalEquivalent(ULocale locale, boolean[] isAvailable) {
if (isAvailable != null && isAvailable.length > 0) {
String localeId = ULocale.canonicalize(locale.getBaseName());
Map<String, String> idMap = getLocaleIdToRulesIdMap(PluralType.CARDINAL);
isAvail... | [
"public",
"ULocale",
"getFunctionalEquivalent",
"(",
"ULocale",
"locale",
",",
"boolean",
"[",
"]",
"isAvailable",
")",
"{",
"if",
"(",
"isAvailable",
"!=",
"null",
"&&",
"isAvailable",
".",
"length",
">",
"0",
")",
"{",
"String",
"localeId",
"=",
"ULocale",... | Returns the functionally equivalent locale. | [
"Returns",
"the",
"functionally",
"equivalent",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L63-L82 |
35,444 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.getLocaleIdToRulesIdMap | private Map<String, String> getLocaleIdToRulesIdMap(PluralType type) {
checkBuildRulesIdMaps();
return (type == PluralType.CARDINAL) ? localeIdToCardinalRulesId : localeIdToOrdinalRulesId;
} | java | private Map<String, String> getLocaleIdToRulesIdMap(PluralType type) {
checkBuildRulesIdMaps();
return (type == PluralType.CARDINAL) ? localeIdToCardinalRulesId : localeIdToOrdinalRulesId;
} | [
"private",
"Map",
"<",
"String",
",",
"String",
">",
"getLocaleIdToRulesIdMap",
"(",
"PluralType",
"type",
")",
"{",
"checkBuildRulesIdMaps",
"(",
")",
";",
"return",
"(",
"type",
"==",
"PluralType",
".",
"CARDINAL",
")",
"?",
"localeIdToCardinalRulesId",
":",
... | Returns the lazily-constructed map. | [
"Returns",
"the",
"lazily",
"-",
"constructed",
"map",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L87-L90 |
35,445 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.checkBuildRulesIdMaps | private void checkBuildRulesIdMaps() {
boolean haveMap;
synchronized (this) {
haveMap = localeIdToCardinalRulesId != null;
}
if (!haveMap) {
Map<String, String> tempLocaleIdToCardinalRulesId;
Map<String, String> tempLocaleIdToOrdinalRulesId;
... | java | private void checkBuildRulesIdMaps() {
boolean haveMap;
synchronized (this) {
haveMap = localeIdToCardinalRulesId != null;
}
if (!haveMap) {
Map<String, String> tempLocaleIdToCardinalRulesId;
Map<String, String> tempLocaleIdToOrdinalRulesId;
... | [
"private",
"void",
"checkBuildRulesIdMaps",
"(",
")",
"{",
"boolean",
"haveMap",
";",
"synchronized",
"(",
"this",
")",
"{",
"haveMap",
"=",
"localeIdToCardinalRulesId",
"!=",
"null",
";",
"}",
"if",
"(",
"!",
"haveMap",
")",
"{",
"Map",
"<",
"String",
","... | Lazily constructs the localeIdToRulesId and rulesIdToEquivalentULocale
maps if necessary. These exactly reflect the contents of the locales
resource in plurals.res. | [
"Lazily",
"constructs",
"the",
"localeIdToRulesId",
"and",
"rulesIdToEquivalentULocale",
"maps",
"if",
"necessary",
".",
"These",
"exactly",
"reflect",
"the",
"contents",
"of",
"the",
"locales",
"resource",
"in",
"plurals",
".",
"res",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L105-L159 |
35,446 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.getRulesIdForLocale | public String getRulesIdForLocale(ULocale locale, PluralType type) {
Map<String, String> idMap = getLocaleIdToRulesIdMap(type);
String localeId = ULocale.canonicalize(locale.getBaseName());
String rulesId = null;
while (null == (rulesId = idMap.get(localeId))) {
int ix = loca... | java | public String getRulesIdForLocale(ULocale locale, PluralType type) {
Map<String, String> idMap = getLocaleIdToRulesIdMap(type);
String localeId = ULocale.canonicalize(locale.getBaseName());
String rulesId = null;
while (null == (rulesId = idMap.get(localeId))) {
int ix = loca... | [
"public",
"String",
"getRulesIdForLocale",
"(",
"ULocale",
"locale",
",",
"PluralType",
"type",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"idMap",
"=",
"getLocaleIdToRulesIdMap",
"(",
"type",
")",
";",
"String",
"localeId",
"=",
"ULocale",
".",
"ca... | Gets the rulesId from the locale,with locale fallback. If there is no
rulesId, return null. The rulesId might be the empty string if the rule
is the default rule. | [
"Gets",
"the",
"rulesId",
"from",
"the",
"locale",
"with",
"locale",
"fallback",
".",
"If",
"there",
"is",
"no",
"rulesId",
"return",
"null",
".",
"The",
"rulesId",
"might",
"be",
"the",
"empty",
"string",
"if",
"the",
"rule",
"is",
"the",
"default",
"ru... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L166-L178 |
35,447 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.getRulesForRulesId | public PluralRules getRulesForRulesId(String rulesId) {
// synchronize on the map. release the lock temporarily while we build the rules.
PluralRules rules = null;
boolean hasRules; // Separate boolean because stored rules can be null.
synchronized (rulesIdToRules) {
hasRul... | java | public PluralRules getRulesForRulesId(String rulesId) {
// synchronize on the map. release the lock temporarily while we build the rules.
PluralRules rules = null;
boolean hasRules; // Separate boolean because stored rules can be null.
synchronized (rulesIdToRules) {
hasRul... | [
"public",
"PluralRules",
"getRulesForRulesId",
"(",
"String",
"rulesId",
")",
"{",
"// synchronize on the map. release the lock temporarily while we build the rules.",
"PluralRules",
"rules",
"=",
"null",
";",
"boolean",
"hasRules",
";",
"// Separate boolean because stored rules c... | Gets the rule from the rulesId. If there is no rule for this rulesId,
return null. | [
"Gets",
"the",
"rule",
"from",
"the",
"rulesId",
".",
"If",
"there",
"is",
"no",
"rule",
"for",
"this",
"rulesId",
"return",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L184-L223 |
35,448 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.getPluralBundle | public UResourceBundle getPluralBundle() throws MissingResourceException {
return ICUResourceBundle.getBundleInstance(
ICUData.ICU_BASE_NAME, "plurals",
ICUResourceBundle.ICU_DATA_CLASS_LOADER, true);
} | java | public UResourceBundle getPluralBundle() throws MissingResourceException {
return ICUResourceBundle.getBundleInstance(
ICUData.ICU_BASE_NAME, "plurals",
ICUResourceBundle.ICU_DATA_CLASS_LOADER, true);
} | [
"public",
"UResourceBundle",
"getPluralBundle",
"(",
")",
"throws",
"MissingResourceException",
"{",
"return",
"ICUResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_BASE_NAME",
",",
"\"plurals\"",
",",
"ICUResourceBundle",
".",
"ICU_DATA_CLASS_LOADER",
... | Return the plurals resource. Note MissingResourceException is unchecked,
listed here for clarity. Callers should handle this exception. | [
"Return",
"the",
"plurals",
"resource",
".",
"Note",
"MissingResourceException",
"is",
"unchecked",
"listed",
"here",
"for",
"clarity",
".",
"Callers",
"should",
"handle",
"this",
"exception",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L229-L233 |
35,449 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java | PluralRulesLoader.forLocale | public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) {
String rulesId = getRulesIdForLocale(locale, type);
if (rulesId == null || rulesId.trim().length() == 0) {
return PluralRules.DEFAULT;
}
PluralRules rules = getRulesForRulesId(rulesId);
if (ru... | java | public PluralRules forLocale(ULocale locale, PluralRules.PluralType type) {
String rulesId = getRulesIdForLocale(locale, type);
if (rulesId == null || rulesId.trim().length() == 0) {
return PluralRules.DEFAULT;
}
PluralRules rules = getRulesForRulesId(rulesId);
if (ru... | [
"public",
"PluralRules",
"forLocale",
"(",
"ULocale",
"locale",
",",
"PluralRules",
".",
"PluralType",
"type",
")",
"{",
"String",
"rulesId",
"=",
"getRulesIdForLocale",
"(",
"locale",
",",
"type",
")",
";",
"if",
"(",
"rulesId",
"==",
"null",
"||",
"rulesId... | Returns the plural rules for the the locale. If we don't have data,
android.icu.text.PluralRules.DEFAULT is returned. | [
"Returns",
"the",
"plural",
"rules",
"for",
"the",
"the",
"locale",
".",
"If",
"we",
"don",
"t",
"have",
"data",
"android",
".",
"icu",
".",
"text",
".",
"PluralRules",
".",
"DEFAULT",
"is",
"returned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PluralRulesLoader.java#L239-L249 |
35,450 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java | CharsetDecoder.replaceWith | public final CharsetDecoder replaceWith(String newReplacement) {
if (newReplacement == null)
throw new IllegalArgumentException("Null replacement");
int len = newReplacement.length();
if (len == 0)
throw new IllegalArgumentException("Empty replacement");
if (len >... | java | public final CharsetDecoder replaceWith(String newReplacement) {
if (newReplacement == null)
throw new IllegalArgumentException("Null replacement");
int len = newReplacement.length();
if (len == 0)
throw new IllegalArgumentException("Empty replacement");
if (len >... | [
"public",
"final",
"CharsetDecoder",
"replaceWith",
"(",
"String",
"newReplacement",
")",
"{",
"if",
"(",
"newReplacement",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null replacement\"",
")",
";",
"int",
"len",
"=",
"newReplacement",
"... | Changes this decoder's replacement value.
<p> This method invokes the {@link #implReplaceWith implReplaceWith}
method, passing the new replacement, after checking that the new
replacement is acceptable. </p>
@param newReplacement
The new replacement; must not be <tt>null</tt>
and must have non-zero length
... | [
"Changes",
"this",
"decoder",
"s",
"replacement",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java#L278-L293 |
35,451 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java | CharsetDecoder.onUnmappableCharacter | public final CharsetDecoder onUnmappableCharacter(CodingErrorAction
newAction)
{
if (newAction == null)
throw new IllegalArgumentException("Null action");
unmappableCharacterAction = newAction;
implOnUnmappableCharacter(newAct... | java | public final CharsetDecoder onUnmappableCharacter(CodingErrorAction
newAction)
{
if (newAction == null)
throw new IllegalArgumentException("Null action");
unmappableCharacterAction = newAction;
implOnUnmappableCharacter(newAct... | [
"public",
"final",
"CharsetDecoder",
"onUnmappableCharacter",
"(",
"CodingErrorAction",
"newAction",
")",
"{",
"if",
"(",
"newAction",
"==",
"null",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Null action\"",
")",
";",
"unmappableCharacterAction",
"=",
"n... | Changes this decoder's action for unmappable-character errors.
<p> This method invokes the {@link #implOnUnmappableCharacter
implOnUnmappableCharacter} method, passing the new action. </p>
@param newAction The new action; must not be <tt>null</tt>
@return This decoder
@throws IllegalArgumentException
If the pre... | [
"Changes",
"this",
"decoder",
"s",
"action",
"for",
"unmappable",
"-",
"character",
"errors",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java#L410-L418 |
35,452 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java | CharsetDecoder.decode | public final CoderResult decode(ByteBuffer in, CharBuffer out,
boolean endOfInput)
{
int newState = endOfInput ? ST_END : ST_CODING;
if ((state != ST_RESET) && (state != ST_CODING)
&& !(endOfInput && (state == ST_END)))
throwIllegalStateExc... | java | public final CoderResult decode(ByteBuffer in, CharBuffer out,
boolean endOfInput)
{
int newState = endOfInput ? ST_END : ST_CODING;
if ((state != ST_RESET) && (state != ST_CODING)
&& !(endOfInput && (state == ST_END)))
throwIllegalStateExc... | [
"public",
"final",
"CoderResult",
"decode",
"(",
"ByteBuffer",
"in",
",",
"CharBuffer",
"out",
",",
"boolean",
"endOfInput",
")",
"{",
"int",
"newState",
"=",
"endOfInput",
"?",
"ST_END",
":",
"ST_CODING",
";",
"if",
"(",
"(",
"state",
"!=",
"ST_RESET",
")... | Decodes as many bytes as possible from the given input buffer,
writing the results to the given output buffer.
<p> The buffers are read from, and written to, starting at their current
positions. At most {@link Buffer#remaining in.remaining()} bytes
will be read and at most {@link Buffer#remaining out.remaining()}
cha... | [
"Decodes",
"as",
"many",
"bytes",
"as",
"possible",
"from",
"the",
"given",
"input",
"buffer",
"writing",
"the",
"results",
"to",
"the",
"given",
"output",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java#L551-L610 |
35,453 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java | CharsetDecoder.flush | public final CoderResult flush(CharBuffer out) {
if (state == ST_END) {
CoderResult cr = implFlush(out);
if (cr.isUnderflow())
state = ST_FLUSHED;
return cr;
}
if (state != ST_FLUSHED)
throwIllegalStateException(state, ST_FLUSHED);... | java | public final CoderResult flush(CharBuffer out) {
if (state == ST_END) {
CoderResult cr = implFlush(out);
if (cr.isUnderflow())
state = ST_FLUSHED;
return cr;
}
if (state != ST_FLUSHED)
throwIllegalStateException(state, ST_FLUSHED);... | [
"public",
"final",
"CoderResult",
"flush",
"(",
"CharBuffer",
"out",
")",
"{",
"if",
"(",
"state",
"==",
"ST_END",
")",
"{",
"CoderResult",
"cr",
"=",
"implFlush",
"(",
"out",
")",
";",
"if",
"(",
"cr",
".",
"isUnderflow",
"(",
")",
")",
"state",
"="... | Flushes this decoder.
<p> Some decoders maintain internal state and may need to write some
final characters to the output buffer once the overall input sequence has
been read.
<p> Any additional output is written to the output buffer beginning at
its current position. At most {@link Buffer#remaining out.remaining()}... | [
"Flushes",
"this",
"decoder",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/charset/CharsetDecoder.java#L651-L663 |
35,454 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java | ICUBinary.readHeader | public static int readHeader(ByteBuffer bytes, int dataFormat, Authenticate authenticate)
throws IOException {
assert bytes != null && bytes.position() == 0;
byte magic1 = bytes.get(2);
byte magic2 = bytes.get(3);
if (magic1 != MAGIC1 || magic2 != MAGIC2) {
throw ... | java | public static int readHeader(ByteBuffer bytes, int dataFormat, Authenticate authenticate)
throws IOException {
assert bytes != null && bytes.position() == 0;
byte magic1 = bytes.get(2);
byte magic2 = bytes.get(3);
if (magic1 != MAGIC1 || magic2 != MAGIC2) {
throw ... | [
"public",
"static",
"int",
"readHeader",
"(",
"ByteBuffer",
"bytes",
",",
"int",
"dataFormat",
",",
"Authenticate",
"authenticate",
")",
"throws",
"IOException",
"{",
"assert",
"bytes",
"!=",
"null",
"&&",
"bytes",
".",
"position",
"(",
")",
"==",
"0",
";",
... | Reads an ICU data header, checks the data format, and returns the data version.
<p>Assumes that the ByteBuffer position is 0 on input.
The buffer byte order is set according to the data.
The buffer position is advanced past the header (including UDataInfo and comment).
<p>See C++ ucmndata.h and unicode/udata.h.
@ret... | [
"Reads",
"an",
"ICU",
"data",
"header",
"checks",
"the",
"data",
"format",
"and",
"returns",
"the",
"data",
"version",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java#L575-L621 |
35,455 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java | ICUBinary.writeHeader | public static int writeHeader(int dataFormat, int formatVersion, int dataVersion,
DataOutputStream dos) throws IOException {
// ucmndata.h MappedData
dos.writeChar(32); // headerSize
dos.writeByte(MAGIC1);
dos.writeByte(MAGIC2);
// unicode/udata.h UDataInfo
d... | java | public static int writeHeader(int dataFormat, int formatVersion, int dataVersion,
DataOutputStream dos) throws IOException {
// ucmndata.h MappedData
dos.writeChar(32); // headerSize
dos.writeByte(MAGIC1);
dos.writeByte(MAGIC2);
// unicode/udata.h UDataInfo
d... | [
"public",
"static",
"int",
"writeHeader",
"(",
"int",
"dataFormat",
",",
"int",
"formatVersion",
",",
"int",
"dataVersion",
",",
"DataOutputStream",
"dos",
")",
"throws",
"IOException",
"{",
"// ucmndata.h MappedData",
"dos",
".",
"writeChar",
"(",
"32",
")",
";... | Writes an ICU data header.
Does not write a copyright string.
@return The length of the header (number of bytes written).
@throws IOException from the DataOutputStream | [
"Writes",
"an",
"ICU",
"data",
"header",
".",
"Does",
"not",
"write",
"a",
"copyright",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java#L630-L650 |
35,456 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java | ICUBinary.getByteBufferFromInputStreamAndCloseStream | public static ByteBuffer getByteBufferFromInputStreamAndCloseStream(InputStream is) throws IOException {
try {
// is.available() may return 0, or 1, or the total number of bytes in the stream,
// or some other number.
// Do not try to use is.available() == 0 to find the end o... | java | public static ByteBuffer getByteBufferFromInputStreamAndCloseStream(InputStream is) throws IOException {
try {
// is.available() may return 0, or 1, or the total number of bytes in the stream,
// or some other number.
// Do not try to use is.available() == 0 to find the end o... | [
"public",
"static",
"ByteBuffer",
"getByteBufferFromInputStreamAndCloseStream",
"(",
"InputStream",
"is",
")",
"throws",
"IOException",
"{",
"try",
"{",
"// is.available() may return 0, or 1, or the total number of bytes in the stream,",
"// or some other number.",
"// Do not try to us... | Reads the entire contents from the stream into a byte array
and wraps it into a ByteBuffer. Closes the InputStream at the end. | [
"Reads",
"the",
"entire",
"contents",
"from",
"the",
"stream",
"into",
"a",
"byte",
"array",
"and",
"wraps",
"it",
"into",
"a",
"ByteBuffer",
".",
"Closes",
"the",
"InputStream",
"at",
"the",
"end",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUBinary.java#L705-L751 |
35,457 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharacterIteration.java | CharacterIteration.next32 | public static int next32(CharacterIterator ci) {
// If the current position is at a surrogate pair, move to the trail surrogate
// which leaves it in position for underlying iterator's next() to work.
int c = ci.current();
if (c >= UTF16.LEAD_SURROGATE_MIN_VALUE && c<=UTF16.LEAD_SURROG... | java | public static int next32(CharacterIterator ci) {
// If the current position is at a surrogate pair, move to the trail surrogate
// which leaves it in position for underlying iterator's next() to work.
int c = ci.current();
if (c >= UTF16.LEAD_SURROGATE_MIN_VALUE && c<=UTF16.LEAD_SURROG... | [
"public",
"static",
"int",
"next32",
"(",
"CharacterIterator",
"ci",
")",
"{",
"// If the current position is at a surrogate pair, move to the trail surrogate",
"// which leaves it in position for underlying iterator's next() to work.",
"int",
"c",
"=",
"ci",
".",
"current",
"(",... | Move the iterator forward to the next code point, and return that code point,
leaving the iterator positioned at char returned.
For Supplementary chars, the iterator is left positioned at the lead surrogate.
@param ci The character iterator
@return The next code point. | [
"Move",
"the",
"iterator",
"forward",
"to",
"the",
"next",
"code",
"point",
"and",
"return",
"that",
"code",
"point",
"leaving",
"the",
"iterator",
"positioned",
"at",
"char",
"returned",
".",
"For",
"Supplementary",
"chars",
"the",
"iterator",
"is",
"left",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CharacterIteration.java#L35-L61 |
35,458 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StringWriter.java | StringWriter.append | public StringWriter append(CharSequence csq, int start, int end) {
CharSequence cs = (csq == null ? "null" : csq);
write(cs.subSequence(start, end).toString());
return this;
} | java | public StringWriter append(CharSequence csq, int start, int end) {
CharSequence cs = (csq == null ? "null" : csq);
write(cs.subSequence(start, end).toString());
return this;
} | [
"public",
"StringWriter",
"append",
"(",
"CharSequence",
"csq",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"CharSequence",
"cs",
"=",
"(",
"csq",
"==",
"null",
"?",
"\"null\"",
":",
"csq",
")",
";",
"write",
"(",
"cs",
".",
"subSequence",
"(",
... | Appends a subsequence of the specified character sequence to this writer.
<p> An invocation of this method of the form <tt>out.append(csq, start,
end)</tt> when <tt>csq</tt> is not <tt>null</tt>, behaves in
exactly the same way as the invocation
<pre>
out.write(csq.subSequence(start, end).toString()) </pre>
@param ... | [
"Appends",
"a",
"subsequence",
"of",
"the",
"specified",
"character",
"sequence",
"to",
"this",
"writer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StringWriter.java#L179-L183 |
35,459 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java | AxesWalker.init | public void init(Compiler compiler, int opPos, int stepType)
throws javax.xml.transform.TransformerException
{
initPredicateInfo(compiler, opPos);
// int testType = compiler.getOp(nodeTestOpPos);
} | java | public void init(Compiler compiler, int opPos, int stepType)
throws javax.xml.transform.TransformerException
{
initPredicateInfo(compiler, opPos);
// int testType = compiler.getOp(nodeTestOpPos);
} | [
"public",
"void",
"init",
"(",
"Compiler",
"compiler",
",",
"int",
"opPos",
",",
"int",
"stepType",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"initPredicateInfo",
"(",
"compiler",
",",
"opPos",
")",
";",
"// int ... | Initialize an AxesWalker during the parse of the XPath expression.
@param compiler The Compiler object that has information about this
walker in the op map.
@param opPos The op code position of this location step.
@param stepType The type of location step.
@throws javax.xml.transform.TransformerException | [
"Initialize",
"an",
"AxesWalker",
"during",
"the",
"parse",
"of",
"the",
"XPath",
"expression",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java#L71-L78 |
35,460 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java | AxesWalker.cloneDeep | AxesWalker cloneDeep(WalkingIterator cloneOwner, Vector cloneList)
throws CloneNotSupportedException
{
AxesWalker clone = findClone(this, cloneList);
if(null != clone)
return clone;
clone = (AxesWalker)this.clone();
clone.setLocPathIterator(cloneOwner);
if(null != cloneList)
{
... | java | AxesWalker cloneDeep(WalkingIterator cloneOwner, Vector cloneList)
throws CloneNotSupportedException
{
AxesWalker clone = findClone(this, cloneList);
if(null != clone)
return clone;
clone = (AxesWalker)this.clone();
clone.setLocPathIterator(cloneOwner);
if(null != cloneList)
{
... | [
"AxesWalker",
"cloneDeep",
"(",
"WalkingIterator",
"cloneOwner",
",",
"Vector",
"cloneList",
")",
"throws",
"CloneNotSupportedException",
"{",
"AxesWalker",
"clone",
"=",
"findClone",
"(",
"this",
",",
"cloneList",
")",
";",
"if",
"(",
"null",
"!=",
"clone",
")"... | Do a deep clone of this walker, including next and previous walkers.
If the this AxesWalker is on the clone list, don't clone but
return the already cloned version.
@param cloneOwner non-null reference to the cloned location path
iterator to which this clone will be added.
@param cloneList non-null vector of sources i... | [
"Do",
"a",
"deep",
"clone",
"of",
"this",
"walker",
"including",
"next",
"and",
"previous",
"walkers",
".",
"If",
"the",
"this",
"AxesWalker",
"is",
"on",
"the",
"clone",
"list",
"don",
"t",
"clone",
"but",
"return",
"the",
"already",
"cloned",
"version",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java#L113-L146 |
35,461 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java | AxesWalker.findClone | static AxesWalker findClone(AxesWalker key, Vector cloneList)
{
if(null != cloneList)
{
// First, look for clone on list.
int n = cloneList.size();
for (int i = 0; i < n; i+=2)
{
if(key == cloneList.elementAt(i))
return (AxesWalker)cloneList.elementAt(i+1);
}
... | java | static AxesWalker findClone(AxesWalker key, Vector cloneList)
{
if(null != cloneList)
{
// First, look for clone on list.
int n = cloneList.size();
for (int i = 0; i < n; i+=2)
{
if(key == cloneList.elementAt(i))
return (AxesWalker)cloneList.elementAt(i+1);
}
... | [
"static",
"AxesWalker",
"findClone",
"(",
"AxesWalker",
"key",
",",
"Vector",
"cloneList",
")",
"{",
"if",
"(",
"null",
"!=",
"cloneList",
")",
"{",
"// First, look for clone on list.",
"int",
"n",
"=",
"cloneList",
".",
"size",
"(",
")",
";",
"for",
"(",
... | Find a clone that corresponds to the key argument.
@param key The original AxesWalker for which there may be a clone.
@param cloneList vector of sources in odd elements, and the
corresponding clones in even vectors, may be null.
@return A clone that corresponds to the key, or null if key not found. | [
"Find",
"a",
"clone",
"that",
"corresponds",
"to",
"the",
"key",
"argument",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java#L157-L170 |
35,462 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java | AxesWalker.detach | public void detach()
{
m_currentNode = DTM.NULL;
m_dtm = null;
m_traverser = null;
m_isFresh = true;
m_root = DTM.NULL;
} | java | public void detach()
{
m_currentNode = DTM.NULL;
m_dtm = null;
m_traverser = null;
m_isFresh = true;
m_root = DTM.NULL;
} | [
"public",
"void",
"detach",
"(",
")",
"{",
"m_currentNode",
"=",
"DTM",
".",
"NULL",
";",
"m_dtm",
"=",
"null",
";",
"m_traverser",
"=",
"null",
";",
"m_isFresh",
"=",
"true",
";",
"m_root",
"=",
"DTM",
".",
"NULL",
";",
"}"
] | Detaches the walker from the set which it iterated over, releasing
any computational resources and placing the iterator in the INVALID
state. | [
"Detaches",
"the",
"walker",
"from",
"the",
"set",
"which",
"it",
"iterated",
"over",
"releasing",
"any",
"computational",
"resources",
"and",
"placing",
"the",
"iterator",
"in",
"the",
"INVALID",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java#L177-L184 |
35,463 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java | AxesWalker.getLastPos | public int getLastPos(XPathContext xctxt)
{
int pos = getProximityPosition();
AxesWalker walker;
try
{
walker = (AxesWalker) clone();
}
catch (CloneNotSupportedException cnse)
{
return -1;
}
walker.setPredicateCount(m_predicateIndex);
walker.setNextWalker(nu... | java | public int getLastPos(XPathContext xctxt)
{
int pos = getProximityPosition();
AxesWalker walker;
try
{
walker = (AxesWalker) clone();
}
catch (CloneNotSupportedException cnse)
{
return -1;
}
walker.setPredicateCount(m_predicateIndex);
walker.setNextWalker(nu... | [
"public",
"int",
"getLastPos",
"(",
"XPathContext",
"xctxt",
")",
"{",
"int",
"pos",
"=",
"getProximityPosition",
"(",
")",
";",
"AxesWalker",
"walker",
";",
"try",
"{",
"walker",
"=",
"(",
"AxesWalker",
")",
"clone",
"(",
")",
";",
"}",
"catch",
"(",
... | Get the index of the last node that can be itterated to.
@param xctxt XPath runtime context.
@return the index of the last node that can be itterated to. | [
"Get",
"the",
"index",
"of",
"the",
"last",
"node",
"that",
"can",
"be",
"itterated",
"to",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java#L412-L455 |
35,464 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java | AxesWalker.callVisitors | public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitStep(owner, this))
{
callPredicateVisitors(visitor);
if(null != m_nextWalker)
{
m_nextWalker.callVisitors(this, visitor);
}
}
} | java | public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
if(visitor.visitStep(owner, this))
{
callPredicateVisitors(visitor);
if(null != m_nextWalker)
{
m_nextWalker.callVisitors(this, visitor);
}
}
} | [
"public",
"void",
"callVisitors",
"(",
"ExpressionOwner",
"owner",
",",
"XPathVisitor",
"visitor",
")",
"{",
"if",
"(",
"visitor",
".",
"visitStep",
"(",
"owner",
",",
"this",
")",
")",
"{",
"callPredicateVisitors",
"(",
"visitor",
")",
";",
"if",
"(",
"nu... | This will traverse the heararchy, calling the visitor for
each member. If the called visitor method returns
false, the subtree should not be called.
@param owner The owner of the visitor, where that path may be
rewritten if needed.
@param visitor The visitor whose appropriate method will be called. | [
"This",
"will",
"traverse",
"the",
"heararchy",
"calling",
"the",
"visitor",
"for",
"each",
"member",
".",
"If",
"the",
"called",
"visitor",
"method",
"returns",
"false",
"the",
"subtree",
"should",
"not",
"be",
"called",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/AxesWalker.java#L520-L530 |
35,465 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNodeProxy.java | DTMNodeProxy.getDocumentElement | public final Element getDocumentElement()
{
int dochandle=dtm.getDocument();
int elementhandle=DTM.NULL;
for(int kidhandle=dtm.getFirstChild(dochandle);
kidhandle!=DTM.NULL;
kidhandle=dtm.getNextSibling(kidhandle))
{
switch(dtm.getNodeType(kidhandle))
{
case Node.ELEMENT_NODE:
if(elementh... | java | public final Element getDocumentElement()
{
int dochandle=dtm.getDocument();
int elementhandle=DTM.NULL;
for(int kidhandle=dtm.getFirstChild(dochandle);
kidhandle!=DTM.NULL;
kidhandle=dtm.getNextSibling(kidhandle))
{
switch(dtm.getNodeType(kidhandle))
{
case Node.ELEMENT_NODE:
if(elementh... | [
"public",
"final",
"Element",
"getDocumentElement",
"(",
")",
"{",
"int",
"dochandle",
"=",
"dtm",
".",
"getDocument",
"(",
")",
";",
"int",
"elementhandle",
"=",
"DTM",
".",
"NULL",
";",
"for",
"(",
"int",
"kidhandle",
"=",
"dtm",
".",
"getFirstChild",
... | This is a bit of a problem in DTM, since a DTM may be a Document
Fragment and hence not have a clear-cut Document Element. We can
make it work in the well-formed cases but would that be confusing for others?
@see org.w3c.dom.Document | [
"This",
"is",
"a",
"bit",
"of",
"a",
"problem",
"in",
"DTM",
"since",
"a",
"DTM",
"may",
"be",
"a",
"Document",
"Fragment",
"and",
"hence",
"not",
"have",
"a",
"clear",
"-",
"cut",
"Document",
"Element",
".",
"We",
"can",
"make",
"it",
"work",
"in",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNodeProxy.java#L590-L626 |
35,466 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNodeProxy.java | DTMNodeProxy.getOwnerElement | public final Element getOwnerElement()
{
if (getNodeType() != Node.ATTRIBUTE_NODE)
return null;
// In XPath and DTM data models, unlike DOM, an Attr's parent is its
// owner element.
int newnode = dtm.getParent(node);
return (newnode == DTM.NULL) ? null : (Element)(dtm.getNode(newnode));
} | java | public final Element getOwnerElement()
{
if (getNodeType() != Node.ATTRIBUTE_NODE)
return null;
// In XPath and DTM data models, unlike DOM, an Attr's parent is its
// owner element.
int newnode = dtm.getParent(node);
return (newnode == DTM.NULL) ? null : (Element)(dtm.getNode(newnode));
} | [
"public",
"final",
"Element",
"getOwnerElement",
"(",
")",
"{",
"if",
"(",
"getNodeType",
"(",
")",
"!=",
"Node",
".",
"ATTRIBUTE_NODE",
")",
"return",
"null",
";",
"// In XPath and DTM data models, unlike DOM, an Attr's parent is its",
"// owner element.",
"int",
"newn... | Get the owner element of an attribute.
@see org.w3c.dom.Attr as of DOM Level 2 | [
"Get",
"the",
"owner",
"element",
"of",
"an",
"attribute",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNodeProxy.java#L1312-L1320 |
35,467 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundleReader.java | ICUResourceBundleReader.getFullName | public static String getFullName(String baseName, String localeName) {
if (baseName == null || baseName.length() == 0) {
if (localeName.length() == 0) {
return localeName = ULocale.getDefault().toString();
}
return localeName + ICU_RESOURCE_SUFFIX;
} e... | java | public static String getFullName(String baseName, String localeName) {
if (baseName == null || baseName.length() == 0) {
if (localeName.length() == 0) {
return localeName = ULocale.getDefault().toString();
}
return localeName + ICU_RESOURCE_SUFFIX;
} e... | [
"public",
"static",
"String",
"getFullName",
"(",
"String",
"baseName",
",",
"String",
"localeName",
")",
"{",
"if",
"(",
"baseName",
"==",
"null",
"||",
"baseName",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"if",
"(",
"localeName",
".",
"length",
... | Gets the full name of the resource with suffix. | [
"Gets",
"the",
"full",
"name",
"of",
"the",
"resource",
"with",
"suffix",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundleReader.java#L1375-L1397 |
35,468 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java | AttributeListImpl.setAttributeList | public void setAttributeList (AttributeList atts)
{
int count = atts.getLength();
clear();
for (int i = 0; i < count; i++) {
addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i));
}
} | java | public void setAttributeList (AttributeList atts)
{
int count = atts.getLength();
clear();
for (int i = 0; i < count; i++) {
addAttribute(atts.getName(i), atts.getType(i), atts.getValue(i));
}
} | [
"public",
"void",
"setAttributeList",
"(",
"AttributeList",
"atts",
")",
"{",
"int",
"count",
"=",
"atts",
".",
"getLength",
"(",
")",
";",
"clear",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"count",
";",
"i",
"++",
")",
"{"... | Set the attribute list, discarding previous contents.
<p>This method allows an application writer to reuse an
attribute list easily.</p>
@param atts The attribute list to copy. | [
"Set",
"the",
"attribute",
"list",
"discarding",
"previous",
"contents",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java#L114-L123 |
35,469 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java | AttributeListImpl.addAttribute | public void addAttribute(String name, String type, String value) {
names.add(name);
types.add(type);
values.add(value);
} | java | public void addAttribute(String name, String type, String value) {
names.add(name);
types.add(type);
values.add(value);
} | [
"public",
"void",
"addAttribute",
"(",
"String",
"name",
",",
"String",
"type",
",",
"String",
"value",
")",
"{",
"names",
".",
"add",
"(",
"name",
")",
";",
"types",
".",
"add",
"(",
"type",
")",
";",
"values",
".",
"add",
"(",
"value",
")",
";",
... | Add an attribute to an attribute list.
<p>This method is provided for SAX parser writers, to allow them
to build up an attribute list incrementally before delivering
it to the application.</p>
@param name The attribute name.
@param type The attribute type ("NMTOKEN" for an enumeration).
@param value The attribute val... | [
"Add",
"an",
"attribute",
"to",
"an",
"attribute",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/xml/sax/helpers/AttributeListImpl.java#L139-L143 |
35,470 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java | Stylesheet.readObject | private void readObject(ObjectInputStream stream)
throws IOException, TransformerException
{
// System.out.println("Reading Stylesheet");
try
{
stream.defaultReadObject();
}
catch (ClassNotFoundException cnfe)
{
throw new TransformerException(cnfe);
}
// System.... | java | private void readObject(ObjectInputStream stream)
throws IOException, TransformerException
{
// System.out.println("Reading Stylesheet");
try
{
stream.defaultReadObject();
}
catch (ClassNotFoundException cnfe)
{
throw new TransformerException(cnfe);
}
// System.... | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"stream",
")",
"throws",
"IOException",
",",
"TransformerException",
"{",
"// System.out.println(\"Reading Stylesheet\");",
"try",
"{",
"stream",
".",
"defaultReadObject",
"(",
")",
";",
"}",
"catch",
"(",
"Cl... | Read the stylesheet from a serialization stream.
@param stream Input stream to read from
@throws IOException
@throws TransformerException | [
"Read",
"the",
"stylesheet",
"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/xalan/templates/Stylesheet.java#L146-L161 |
35,471 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java | Stylesheet.getStylesheetComposed | public StylesheetComposed getStylesheetComposed()
{
Stylesheet sheet = this;
while (!sheet.isAggregatedType())
{
sheet = sheet.getStylesheetParent();
}
return (StylesheetComposed) sheet;
} | java | public StylesheetComposed getStylesheetComposed()
{
Stylesheet sheet = this;
while (!sheet.isAggregatedType())
{
sheet = sheet.getStylesheetParent();
}
return (StylesheetComposed) sheet;
} | [
"public",
"StylesheetComposed",
"getStylesheetComposed",
"(",
")",
"{",
"Stylesheet",
"sheet",
"=",
"this",
";",
"while",
"(",
"!",
"sheet",
".",
"isAggregatedType",
"(",
")",
")",
"{",
"sheet",
"=",
"sheet",
".",
"getStylesheetParent",
"(",
")",
";",
"}",
... | Get the owning aggregated stylesheet, or this
stylesheet if it is aggregated.
@return the owning aggregated stylesheet or itself | [
"Get",
"the",
"owning",
"aggregated",
"stylesheet",
"or",
"this",
"stylesheet",
"if",
"it",
"is",
"aggregated",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/Stylesheet.java#L1315-L1326 |
35,472 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/SocketFactory.java | SocketFactory.createSocket | public Socket createSocket() throws IOException {
//
// bug 6771432:
// The Exception is used by HttpsClient to signal that
// unconnected sockets have not been implemented.
//
UnsupportedOperationException uop = new
UnsupportedOperationException();
... | java | public Socket createSocket() throws IOException {
//
// bug 6771432:
// The Exception is used by HttpsClient to signal that
// unconnected sockets have not been implemented.
//
UnsupportedOperationException uop = new
UnsupportedOperationException();
... | [
"public",
"Socket",
"createSocket",
"(",
")",
"throws",
"IOException",
"{",
"//",
"// bug 6771432:",
"// The Exception is used by HttpsClient to signal that",
"// unconnected sockets have not been implemented.",
"//",
"UnsupportedOperationException",
"uop",
"=",
"new",
"Unsupported... | Creates an unconnected socket.
@return the unconnected socket
@throws IOException if the socket cannot be created
@see java.net.Socket#connect(java.net.SocketAddress)
@see java.net.Socket#connect(java.net.SocketAddress, int)
@see java.net.Socket#Socket() | [
"Creates",
"an",
"unconnected",
"socket",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/SocketFactory.java#L124-L136 |
35,473 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java | StylesheetComposed.recompose | public void recompose(Vector recomposableElements) throws TransformerException
{
//recomposeImports(); // Calculate the number of this import.
//recomposeIncludes(this); // Build the global include list for this stylesheet.
// Now add in all of the recomposable elements at this precedence lev... | java | public void recompose(Vector recomposableElements) throws TransformerException
{
//recomposeImports(); // Calculate the number of this import.
//recomposeIncludes(this); // Build the global include list for this stylesheet.
// Now add in all of the recomposable elements at this precedence lev... | [
"public",
"void",
"recompose",
"(",
"Vector",
"recomposableElements",
")",
"throws",
"TransformerException",
"{",
"//recomposeImports(); // Calculate the number of this import.",
"//recomposeIncludes(this); // Build the global include list for this stylesheet.",
"// Now add in all... | Adds all recomposable values for this precedence level into the recomposableElements Vector
that was passed in as the first parameter. All elements added to the
recomposableElements vector should extend ElemTemplateElement.
@param recomposableElements a Vector of ElemTemplateElement objects that we will add all of
our... | [
"Adds",
"all",
"recomposable",
"values",
"for",
"this",
"precedence",
"level",
"into",
"the",
"recomposableElements",
"Vector",
"that",
"was",
"passed",
"in",
"as",
"the",
"first",
"parameter",
".",
"All",
"elements",
"added",
"to",
"the",
"recomposableElements",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java#L77-L161 |
35,474 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java | StylesheetComposed.recomposeImports | void recomposeImports()
{
m_importNumber = getStylesheetRoot().getImportNumber(this);
StylesheetRoot root = getStylesheetRoot();
int globalImportCount = root.getGlobalImportCount();
m_importCountComposed = (globalImportCount - m_importNumber) - 1;
// Now get the count of composed imports f... | java | void recomposeImports()
{
m_importNumber = getStylesheetRoot().getImportNumber(this);
StylesheetRoot root = getStylesheetRoot();
int globalImportCount = root.getGlobalImportCount();
m_importCountComposed = (globalImportCount - m_importNumber) - 1;
// Now get the count of composed imports f... | [
"void",
"recomposeImports",
"(",
")",
"{",
"m_importNumber",
"=",
"getStylesheetRoot",
"(",
")",
".",
"getImportNumber",
"(",
"this",
")",
";",
"StylesheetRoot",
"root",
"=",
"getStylesheetRoot",
"(",
")",
";",
"int",
"globalImportCount",
"=",
"root",
".",
"ge... | Recalculate the precedence of this stylesheet in the global
import list. The lowest precedence stylesheet is 0. A higher
number has a higher precedence. | [
"Recalculate",
"the",
"precedence",
"of",
"this",
"stylesheet",
"in",
"the",
"global",
"import",
"list",
".",
"The",
"lowest",
"precedence",
"stylesheet",
"is",
"0",
".",
"A",
"higher",
"number",
"has",
"a",
"higher",
"precedence",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java#L182-L212 |
35,475 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java | StylesheetComposed.recomposeIncludes | void recomposeIncludes(Stylesheet including)
{
int n = including.getIncludeCount();
if (n > 0)
{
if (null == m_includesComposed)
m_includesComposed = new Vector();
for (int i = 0; i < n; i++)
{
Stylesheet included = including.getInclude(i);
m_includesComposed.a... | java | void recomposeIncludes(Stylesheet including)
{
int n = including.getIncludeCount();
if (n > 0)
{
if (null == m_includesComposed)
m_includesComposed = new Vector();
for (int i = 0; i < n; i++)
{
Stylesheet included = including.getInclude(i);
m_includesComposed.a... | [
"void",
"recomposeIncludes",
"(",
"Stylesheet",
"including",
")",
"{",
"int",
"n",
"=",
"including",
".",
"getIncludeCount",
"(",
")",
";",
"if",
"(",
"n",
">",
"0",
")",
"{",
"if",
"(",
"null",
"==",
"m_includesComposed",
")",
"m_includesComposed",
"=",
... | Recompose the value of the composed include list. Builds a composite
list of all stylesheets included by this stylesheet to any depth.
@param including Stylesheet to recompose | [
"Recompose",
"the",
"value",
"of",
"the",
"composed",
"include",
"list",
".",
"Builds",
"a",
"composite",
"list",
"of",
"all",
"stylesheets",
"included",
"by",
"this",
"stylesheet",
"to",
"any",
"depth",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetComposed.java#L272-L289 |
35,476 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/StringRange.java | StringRange.compact | public static void compact(Set<String> source, Adder adder, boolean shorterPairs, boolean moreCompact) {
if (!moreCompact) {
String start = null;
String end = null;
int lastCp = 0;
int prefixLen = 0;
for (String s : source) {
if (start ... | java | public static void compact(Set<String> source, Adder adder, boolean shorterPairs, boolean moreCompact) {
if (!moreCompact) {
String start = null;
String end = null;
int lastCp = 0;
int prefixLen = 0;
for (String s : source) {
if (start ... | [
"public",
"static",
"void",
"compact",
"(",
"Set",
"<",
"String",
">",
"source",
",",
"Adder",
"adder",
",",
"boolean",
"shorterPairs",
",",
"boolean",
"moreCompact",
")",
"{",
"if",
"(",
"!",
"moreCompact",
")",
"{",
"String",
"start",
"=",
"null",
";",... | Compact the set of strings.
@param source set of strings
@param adder adds each pair to the output. See the {@link Adder} interface.
@param shorterPairs use abc-d instead of abc-abd
@param moreCompact use a more compact form, at the expense of more processing. If false, source must be sorted. | [
"Compact",
"the",
"set",
"of",
"strings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/StringRange.java#L60-L107 |
35,477 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/StringRange.java | StringRange.compact | public static void compact(Set<String> source, Adder adder, boolean shorterPairs) {
compact(source,adder,shorterPairs,false);
} | java | public static void compact(Set<String> source, Adder adder, boolean shorterPairs) {
compact(source,adder,shorterPairs,false);
} | [
"public",
"static",
"void",
"compact",
"(",
"Set",
"<",
"String",
">",
"source",
",",
"Adder",
"adder",
",",
"boolean",
"shorterPairs",
")",
"{",
"compact",
"(",
"source",
",",
"adder",
",",
"shorterPairs",
",",
"false",
")",
";",
"}"
] | Faster but not as good compaction. Only looks at final codepoint.
@param source set of strings
@param adder adds each pair to the output. See the {@link Adder} interface.
@param shorterPairs use abc-d instead of abc-abd | [
"Faster",
"but",
"not",
"as",
"good",
"compaction",
".",
"Only",
"looks",
"at",
"final",
"codepoint",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/StringRange.java#L115-L117 |
35,478 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/Hashing.java | Hashing.singleWordWangJenkinsHash | public static int singleWordWangJenkinsHash(Object k) {
int h = k.hashCode();
h += (h << 15) ^ 0xffffcd7d;
h ^= (h >>> 10);
h += (h << 3);
h ^= (h >>> 6);
h += (h << 2) + (h << 14);
return h ^ (h >>> 16);
} | java | public static int singleWordWangJenkinsHash(Object k) {
int h = k.hashCode();
h += (h << 15) ^ 0xffffcd7d;
h ^= (h >>> 10);
h += (h << 3);
h ^= (h >>> 6);
h += (h << 2) + (h << 14);
return h ^ (h >>> 16);
} | [
"public",
"static",
"int",
"singleWordWangJenkinsHash",
"(",
"Object",
"k",
")",
"{",
"int",
"h",
"=",
"k",
".",
"hashCode",
"(",
")",
";",
"h",
"+=",
"(",
"h",
"<<",
"15",
")",
"^",
"0xffffcd7d",
";",
"h",
"^=",
"(",
"h",
">>>",
"10",
")",
";",
... | Based on commit 1424a2a1a9fc53dc8b859a77c02c924. | [
"Based",
"on",
"commit",
"1424a2a1a9fc53dc8b859a77c02c924",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/Hashing.java#L47-L56 |
35,479 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.initXPath | public void initXPath(
Compiler compiler, String expression, PrefixResolver namespaceContext)
throws javax.xml.transform.TransformerException
{
m_ops = compiler;
m_namespaceContext = namespaceContext;
m_functionTable = compiler.getFunctionTable();
Lexer lexer = new Lexer(compil... | java | public void initXPath(
Compiler compiler, String expression, PrefixResolver namespaceContext)
throws javax.xml.transform.TransformerException
{
m_ops = compiler;
m_namespaceContext = namespaceContext;
m_functionTable = compiler.getFunctionTable();
Lexer lexer = new Lexer(compil... | [
"public",
"void",
"initXPath",
"(",
"Compiler",
"compiler",
",",
"String",
"expression",
",",
"PrefixResolver",
"namespaceContext",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"m_ops",
"=",
"compiler",
";",
"m_namespaceC... | Given an string, init an XPath object for selections,
in order that a parse doesn't
have to be done each time the expression is evaluated.
@param compiler The compiler object.
@param expression A string conforming to the XPath grammar.
@param namespaceContext An object that is able to resolve prefixes in
the XPath to ... | [
"Given",
"an",
"string",
"init",
"an",
"XPath",
"object",
"for",
"selections",
"in",
"order",
"that",
"a",
"parse",
"doesn",
"t",
"have",
"to",
"be",
"done",
"each",
"time",
"the",
"expression",
"is",
"evaluated",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L101-L164 |
35,480 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.tokenIs | final boolean tokenIs(String s)
{
return (m_token != null) ? (m_token.equals(s)) : (s == null);
} | java | final boolean tokenIs(String s)
{
return (m_token != null) ? (m_token.equals(s)) : (s == null);
} | [
"final",
"boolean",
"tokenIs",
"(",
"String",
"s",
")",
"{",
"return",
"(",
"m_token",
"!=",
"null",
")",
"?",
"(",
"m_token",
".",
"equals",
"(",
"s",
")",
")",
":",
"(",
"s",
"==",
"null",
")",
";",
"}"
] | Check whether m_token matches the target string.
@param s A string reference or null.
@return If m_token is null, returns false (or true if s is also null), or
return true if the current token matches the string, else false. | [
"Check",
"whether",
"m_token",
"matches",
"the",
"target",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L262-L265 |
35,481 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.lookbehind | private final boolean lookbehind(char c, int n)
{
boolean isToken;
int lookBehindPos = m_queueMark - (n + 1);
if (lookBehindPos >= 0)
{
String lookbehind = (String) m_ops.m_tokenQueue.elementAt(lookBehindPos);
if (lookbehind.length() == 1)
{
char c0 = (lookbehind == null) ... | java | private final boolean lookbehind(char c, int n)
{
boolean isToken;
int lookBehindPos = m_queueMark - (n + 1);
if (lookBehindPos >= 0)
{
String lookbehind = (String) m_ops.m_tokenQueue.elementAt(lookBehindPos);
if (lookbehind.length() == 1)
{
char c0 = (lookbehind == null) ... | [
"private",
"final",
"boolean",
"lookbehind",
"(",
"char",
"c",
",",
"int",
"n",
")",
"{",
"boolean",
"isToken",
";",
"int",
"lookBehindPos",
"=",
"m_queueMark",
"-",
"(",
"n",
"+",
"1",
")",
";",
"if",
"(",
"lookBehindPos",
">=",
"0",
")",
"{",
"Stri... | Look behind the first character of the current token in order to
make a branching decision.
@param c the character to compare it to.
@param n number of tokens to look behind. Must be
greater than 1. Note that the look behind terminates
at either the beginning of the string or on a '|'
character. Because of this, th... | [
"Look",
"behind",
"the",
"first",
"character",
"of",
"the",
"current",
"token",
"in",
"order",
"to",
"make",
"a",
"branching",
"decision",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L325-L352 |
35,482 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.lookbehindHasToken | private final boolean lookbehindHasToken(int n)
{
boolean hasToken;
if ((m_queueMark - n) > 0)
{
String lookbehind = (String) m_ops.m_tokenQueue.elementAt(m_queueMark - (n - 1));
char c0 = (lookbehind == null) ? '|' : lookbehind.charAt(0);
hasToken = (c0 == '|') ? false : true;
}
... | java | private final boolean lookbehindHasToken(int n)
{
boolean hasToken;
if ((m_queueMark - n) > 0)
{
String lookbehind = (String) m_ops.m_tokenQueue.elementAt(m_queueMark - (n - 1));
char c0 = (lookbehind == null) ? '|' : lookbehind.charAt(0);
hasToken = (c0 == '|') ? false : true;
}
... | [
"private",
"final",
"boolean",
"lookbehindHasToken",
"(",
"int",
"n",
")",
"{",
"boolean",
"hasToken",
";",
"if",
"(",
"(",
"m_queueMark",
"-",
"n",
")",
">",
"0",
")",
"{",
"String",
"lookbehind",
"=",
"(",
"String",
")",
"m_ops",
".",
"m_tokenQueue",
... | look behind the current token in order to
see if there is a useable token.
@param n number of tokens to look behind. Must be
greater than 1. Note that the look behind terminates
at either the beginning of the string or on a '|'
character. Because of this, this method should only
be used for pattern matching.
@retu... | [
"look",
"behind",
"the",
"current",
"token",
"in",
"order",
"to",
"see",
"if",
"there",
"is",
"a",
"useable",
"token",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L366-L384 |
35,483 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.nextToken | private final void nextToken()
{
if (m_queueMark < m_ops.getTokenQueueSize())
{
m_token = (String) m_ops.m_tokenQueue.elementAt(m_queueMark++);
m_tokenChar = m_token.charAt(0);
}
else
{
m_token = null;
m_tokenChar = 0;
}
} | java | private final void nextToken()
{
if (m_queueMark < m_ops.getTokenQueueSize())
{
m_token = (String) m_ops.m_tokenQueue.elementAt(m_queueMark++);
m_tokenChar = m_token.charAt(0);
}
else
{
m_token = null;
m_tokenChar = 0;
}
} | [
"private",
"final",
"void",
"nextToken",
"(",
")",
"{",
"if",
"(",
"m_queueMark",
"<",
"m_ops",
".",
"getTokenQueueSize",
"(",
")",
")",
"{",
"m_token",
"=",
"(",
"String",
")",
"m_ops",
".",
"m_tokenQueue",
".",
"elementAt",
"(",
"m_queueMark",
"++",
")... | Retrieve the next token from the command and
store it in m_token string. | [
"Retrieve",
"the",
"next",
"token",
"from",
"the",
"command",
"and",
"store",
"it",
"in",
"m_token",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L420-L433 |
35,484 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.getTokenRelative | private final String getTokenRelative(int i)
{
String tok;
int relative = m_queueMark + i;
if ((relative > 0) && (relative < m_ops.getTokenQueueSize()))
{
tok = (String) m_ops.m_tokenQueue.elementAt(relative);
}
else
{
tok = null;
}
return tok;
} | java | private final String getTokenRelative(int i)
{
String tok;
int relative = m_queueMark + i;
if ((relative > 0) && (relative < m_ops.getTokenQueueSize()))
{
tok = (String) m_ops.m_tokenQueue.elementAt(relative);
}
else
{
tok = null;
}
return tok;
} | [
"private",
"final",
"String",
"getTokenRelative",
"(",
"int",
"i",
")",
"{",
"String",
"tok",
";",
"int",
"relative",
"=",
"m_queueMark",
"+",
"i",
";",
"if",
"(",
"(",
"relative",
">",
"0",
")",
"&&",
"(",
"relative",
"<",
"m_ops",
".",
"getTokenQueue... | Retrieve a token relative to the current token.
@param i Position relative to current token.
@return The string at the given index, or null if the index is out
of range. | [
"Retrieve",
"a",
"token",
"relative",
"to",
"the",
"current",
"token",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L443-L459 |
35,485 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.prevToken | private final void prevToken()
{
if (m_queueMark > 0)
{
m_queueMark--;
m_token = (String) m_ops.m_tokenQueue.elementAt(m_queueMark);
m_tokenChar = m_token.charAt(0);
}
else
{
m_token = null;
m_tokenChar = 0;
}
} | java | private final void prevToken()
{
if (m_queueMark > 0)
{
m_queueMark--;
m_token = (String) m_ops.m_tokenQueue.elementAt(m_queueMark);
m_tokenChar = m_token.charAt(0);
}
else
{
m_token = null;
m_tokenChar = 0;
}
} | [
"private",
"final",
"void",
"prevToken",
"(",
")",
"{",
"if",
"(",
"m_queueMark",
">",
"0",
")",
"{",
"m_queueMark",
"--",
";",
"m_token",
"=",
"(",
"String",
")",
"m_ops",
".",
"m_tokenQueue",
".",
"elementAt",
"(",
"m_queueMark",
")",
";",
"m_tokenChar... | Retrieve the previous token from the command and
store it in m_token string. | [
"Retrieve",
"the",
"previous",
"token",
"from",
"the",
"command",
"and",
"store",
"it",
"in",
"m_token",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L465-L480 |
35,486 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.consumeExpected | private final void consumeExpected(String expected)
throws javax.xml.transform.TransformerException
{
if (tokenIs(expected))
{
nextToken();
}
else
{
error(XPATHErrorResources.ER_EXPECTED_BUT_FOUND, new Object[]{ expected,
... | java | private final void consumeExpected(String expected)
throws javax.xml.transform.TransformerException
{
if (tokenIs(expected))
{
nextToken();
}
else
{
error(XPATHErrorResources.ER_EXPECTED_BUT_FOUND, new Object[]{ expected,
... | [
"private",
"final",
"void",
"consumeExpected",
"(",
"String",
"expected",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"if",
"(",
"tokenIs",
"(",
"expected",
")",
")",
"{",
"nextToken",
"(",
")",
";",
"}",
"else",... | Consume an expected token, throwing an exception if it
isn't there.
@param expected The string to be expected.
@throws javax.xml.transform.TransformerException | [
"Consume",
"an",
"expected",
"token",
"throwing",
"an",
"exception",
"if",
"it",
"isn",
"t",
"there",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L490-L508 |
35,487 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.dumpRemainingTokenQueue | protected String dumpRemainingTokenQueue()
{
int q = m_queueMark;
String returnMsg;
if (q < m_ops.getTokenQueueSize())
{
String msg = "\n Remaining tokens: (";
while (q < m_ops.getTokenQueueSize())
{
String t = (String) m_ops.m_tokenQueue.elementAt(q++);
msg += ("... | java | protected String dumpRemainingTokenQueue()
{
int q = m_queueMark;
String returnMsg;
if (q < m_ops.getTokenQueueSize())
{
String msg = "\n Remaining tokens: (";
while (q < m_ops.getTokenQueueSize())
{
String t = (String) m_ops.m_tokenQueue.elementAt(q++);
msg += ("... | [
"protected",
"String",
"dumpRemainingTokenQueue",
"(",
")",
"{",
"int",
"q",
"=",
"m_queueMark",
";",
"String",
"returnMsg",
";",
"if",
"(",
"q",
"<",
"m_ops",
".",
"getTokenQueueSize",
"(",
")",
")",
"{",
"String",
"msg",
"=",
"\"\\n Remaining tokens: (\"",
... | Dump the remaining token queue.
Thanks to Craig for this.
@return A dump of the remaining token queue, which may be appended to
an error message. | [
"Dump",
"the",
"remaining",
"token",
"queue",
".",
"Thanks",
"to",
"Craig",
"for",
"this",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L674-L699 |
35,488 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.getFunctionToken | final int getFunctionToken(String key)
{
int tok;
Object id;
try
{
// These are nodetests, xpathparser treats them as functions when parsing
// a FilterExpr.
id = Keywords.lookupNodeTest(key);
if (null == id) id = m_functionTable.getFunctionID(key);
tok = ((Intege... | java | final int getFunctionToken(String key)
{
int tok;
Object id;
try
{
// These are nodetests, xpathparser treats them as functions when parsing
// a FilterExpr.
id = Keywords.lookupNodeTest(key);
if (null == id) id = m_functionTable.getFunctionID(key);
tok = ((Intege... | [
"final",
"int",
"getFunctionToken",
"(",
"String",
"key",
")",
"{",
"int",
"tok",
";",
"Object",
"id",
";",
"try",
"{",
"// These are nodetests, xpathparser treats them as functions when parsing",
"// a FilterExpr. ",
"id",
"=",
"Keywords",
".",
"lookupNodeTest",
"(",
... | Given a string, return the corresponding function token.
@param key A local name of a function.
@return The function ID, which may correspond to one of the FUNC_XXX
values found in {@link org.apache.xpath.compiler.FunctionTable}, but may
be a value installed by an external module. | [
"Given",
"a",
"string",
"return",
"the",
"corresponding",
"function",
"token",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L710-L735 |
35,489 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.insertOp | void insertOp(int pos, int length, int op)
{
int totalLen = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
for (int i = totalLen - 1; i >= pos; i--)
{
m_ops.setOp(i + length, m_ops.getOp(i));
}
m_ops.setOp(pos,op);
m_ops.setOp(OpMap.MAPINDEX_LENGTH,totalLen + length);
} | java | void insertOp(int pos, int length, int op)
{
int totalLen = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
for (int i = totalLen - 1; i >= pos; i--)
{
m_ops.setOp(i + length, m_ops.getOp(i));
}
m_ops.setOp(pos,op);
m_ops.setOp(OpMap.MAPINDEX_LENGTH,totalLen + length);
} | [
"void",
"insertOp",
"(",
"int",
"pos",
",",
"int",
"length",
",",
"int",
"op",
")",
"{",
"int",
"totalLen",
"=",
"m_ops",
".",
"getOp",
"(",
"OpMap",
".",
"MAPINDEX_LENGTH",
")",
";",
"for",
"(",
"int",
"i",
"=",
"totalLen",
"-",
"1",
";",
"i",
"... | Insert room for operation. This will NOT set
the length value of the operation, but will update
the length value for the total expression.
@param pos The position where the op is to be inserted.
@param length The length of the operation space in the op map.
@param op The op code to the inserted. | [
"Insert",
"room",
"for",
"operation",
".",
"This",
"will",
"NOT",
"set",
"the",
"length",
"value",
"of",
"the",
"operation",
"but",
"will",
"update",
"the",
"length",
"value",
"for",
"the",
"total",
"expression",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L746-L758 |
35,490 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.appendOp | void appendOp(int length, int op)
{
int totalLen = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
m_ops.setOp(totalLen, op);
m_ops.setOp(totalLen + OpMap.MAPINDEX_LENGTH, length);
m_ops.setOp(OpMap.MAPINDEX_LENGTH, totalLen + length);
} | java | void appendOp(int length, int op)
{
int totalLen = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
m_ops.setOp(totalLen, op);
m_ops.setOp(totalLen + OpMap.MAPINDEX_LENGTH, length);
m_ops.setOp(OpMap.MAPINDEX_LENGTH, totalLen + length);
} | [
"void",
"appendOp",
"(",
"int",
"length",
",",
"int",
"op",
")",
"{",
"int",
"totalLen",
"=",
"m_ops",
".",
"getOp",
"(",
"OpMap",
".",
"MAPINDEX_LENGTH",
")",
";",
"m_ops",
".",
"setOp",
"(",
"totalLen",
",",
"op",
")",
";",
"m_ops",
".",
"setOp",
... | Insert room for operation. This WILL set
the length value of the operation, and will update
the length value for the total expression.
@param length The length of the operation.
@param op The op code to the inserted. | [
"Insert",
"room",
"for",
"operation",
".",
"This",
"WILL",
"set",
"the",
"length",
"value",
"of",
"the",
"operation",
"and",
"will",
"update",
"the",
"length",
"value",
"for",
"the",
"total",
"expression",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L768-L776 |
35,491 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.UnionExpr | protected void UnionExpr() throws javax.xml.transform.TransformerException
{
int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
boolean continueOrLoop = true;
boolean foundUnion = false;
do
{
PathExpr();
if (tokenIs('|'))
{
if (false == foundUnion)
{
fou... | java | protected void UnionExpr() throws javax.xml.transform.TransformerException
{
int opPos = m_ops.getOp(OpMap.MAPINDEX_LENGTH);
boolean continueOrLoop = true;
boolean foundUnion = false;
do
{
PathExpr();
if (tokenIs('|'))
{
if (false == foundUnion)
{
fou... | [
"protected",
"void",
"UnionExpr",
"(",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"int",
"opPos",
"=",
"m_ops",
".",
"getOp",
"(",
"OpMap",
".",
"MAPINDEX_LENGTH",
")",
";",
"boolean",
"continueOrLoop",
"=",
"true... | The context of the right hand side expressions is the context of the
left hand side expression. The results of the right hand side expressions
are node sets. The result of the left hand side UnionExpr is the union
of the results of the right hand side expressions.
UnionExpr ::= PathExpr
| UnionExpr '|' PathExpr... | [
"The",
"context",
"of",
"the",
"right",
"hand",
"side",
"expressions",
"is",
"the",
"context",
"of",
"the",
"left",
"hand",
"side",
"expression",
".",
"The",
"results",
"of",
"the",
"right",
"hand",
"side",
"expressions",
"are",
"node",
"sets",
".",
"The",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L1227-L1260 |
35,492 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java | XPathParser.Literal | protected void Literal() throws javax.xml.transform.TransformerException
{
int last = m_token.length() - 1;
char c0 = m_tokenChar;
char cX = m_token.charAt(last);
if (((c0 == '\"') && (cX == '\"')) || ((c0 == '\'') && (cX == '\'')))
{
// Mutate the token to remove the quotes and have the ... | java | protected void Literal() throws javax.xml.transform.TransformerException
{
int last = m_token.length() - 1;
char c0 = m_tokenChar;
char cX = m_token.charAt(last);
if (((c0 == '\"') && (cX == '\"')) || ((c0 == '\'') && (cX == '\'')))
{
// Mutate the token to remove the quotes and have the ... | [
"protected",
"void",
"Literal",
"(",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"int",
"last",
"=",
"m_token",
".",
"length",
"(",
")",
"-",
"1",
";",
"char",
"c0",
"=",
"m_tokenChar",
";",
"char",
"cX",
"="... | The value of the Literal is the sequence of characters inside
the " or ' characters>.
Literal ::= '"' [^"]* '"'
| "'" [^']* "'"
@throws javax.xml.transform.TransformerException | [
"The",
"value",
"of",
"the",
"Literal",
"is",
"the",
"sequence",
"of",
"characters",
"inside",
"the",
"or",
"characters",
">",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/XPathParser.java#L2017-L2048 |
35,493 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XMLStringFactoryImpl.java | XMLStringFactoryImpl.newstr | public XMLString newstr(FastStringBuffer fsb, int start, int length)
{
return new XStringForFSB(fsb, start, length);
} | java | public XMLString newstr(FastStringBuffer fsb, int start, int length)
{
return new XStringForFSB(fsb, start, length);
} | [
"public",
"XMLString",
"newstr",
"(",
"FastStringBuffer",
"fsb",
",",
"int",
"start",
",",
"int",
"length",
")",
"{",
"return",
"new",
"XStringForFSB",
"(",
"fsb",
",",
"start",
",",
"length",
")",
";",
"}"
] | Create a XMLString from a FastStringBuffer.
@param fsb FastStringBuffer reference, which must be non-null.
@param start The start position in the array.
@param length The number of characters to read from the array.
@return An XMLString object that wraps the FastStringBuffer reference. | [
"Create",
"a",
"XMLString",
"from",
"a",
"FastStringBuffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XMLStringFactoryImpl.java#L71-L74 |
35,494 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/InitializationNormalizer.java | InitializationNormalizer.getInitLocation | private List<Statement> getInitLocation(MethodDeclaration node) {
List<Statement> stmts = node.getBody().getStatements();
if (!stmts.isEmpty() && stmts.get(0) instanceof SuperConstructorInvocation) {
return stmts.subList(0, 1);
}
// java.lang.Object supertype is null. All other types should have a... | java | private List<Statement> getInitLocation(MethodDeclaration node) {
List<Statement> stmts = node.getBody().getStatements();
if (!stmts.isEmpty() && stmts.get(0) instanceof SuperConstructorInvocation) {
return stmts.subList(0, 1);
}
// java.lang.Object supertype is null. All other types should have a... | [
"private",
"List",
"<",
"Statement",
">",
"getInitLocation",
"(",
"MethodDeclaration",
"node",
")",
"{",
"List",
"<",
"Statement",
">",
"stmts",
"=",
"node",
".",
"getBody",
"(",
")",
".",
"getStatements",
"(",
")",
";",
"if",
"(",
"!",
"stmts",
".",
"... | Finds the location in a constructor where init statements should be added. | [
"Finds",
"the",
"location",
"in",
"a",
"constructor",
"where",
"init",
"statements",
"should",
"be",
"added",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/InitializationNormalizer.java#L192-L202 |
35,495 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/URIName.java | URIName.nameConstraint | public static URIName nameConstraint(DerValue value) throws IOException {
URI uri;
String name = value.getIA5String();
try {
uri = new URI(name);
} catch (URISyntaxException use) {
throw new IOException("invalid URI name constraint:" + name, use);
}
... | java | public static URIName nameConstraint(DerValue value) throws IOException {
URI uri;
String name = value.getIA5String();
try {
uri = new URI(name);
} catch (URISyntaxException use) {
throw new IOException("invalid URI name constraint:" + name, use);
}
... | [
"public",
"static",
"URIName",
"nameConstraint",
"(",
"DerValue",
"value",
")",
"throws",
"IOException",
"{",
"URI",
"uri",
";",
"String",
"name",
"=",
"value",
".",
"getIA5String",
"(",
")",
";",
"try",
"{",
"uri",
"=",
"new",
"URI",
"(",
"name",
")",
... | Create the URIName object with the specified name constraint. URI
name constraints syntax is different than SubjectAltNames, etc. See
4.2.1.11 of RFC 3280.
@param value the URI name constraint
@throws IOException if name is not a proper URI name constraint | [
"Create",
"the",
"URIName",
"object",
"with",
"the",
"specified",
"name",
"constraint",
".",
"URI",
"name",
"constraints",
"syntax",
"is",
"different",
"than",
"SubjectAltNames",
"etc",
".",
"See",
"4",
".",
"2",
".",
"1",
".",
"11",
"of",
"RFC",
"3280",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/URIName.java#L156-L181 |
35,496 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/PropertyAnnotation.java | PropertyAnnotation.getAttributeKeyValue | private String getAttributeKeyValue(String key) {
String prefix = key + '=';
String attribute = getAttribute(prefix);
return attribute != null ? attribute.substring(prefix.length()) : null;
} | java | private String getAttributeKeyValue(String key) {
String prefix = key + '=';
String attribute = getAttribute(prefix);
return attribute != null ? attribute.substring(prefix.length()) : null;
} | [
"private",
"String",
"getAttributeKeyValue",
"(",
"String",
"key",
")",
"{",
"String",
"prefix",
"=",
"key",
"+",
"'",
"'",
";",
"String",
"attribute",
"=",
"getAttribute",
"(",
"prefix",
")",
";",
"return",
"attribute",
"!=",
"null",
"?",
"attribute",
"."... | Return the value for a specified key. Attributes are sequentially searched
rather than use a map, because most attributes are not key-value pairs. | [
"Return",
"the",
"value",
"for",
"a",
"specified",
"key",
".",
"Attributes",
"are",
"sequentially",
"searched",
"rather",
"than",
"use",
"a",
"map",
"because",
"most",
"attributes",
"are",
"not",
"key",
"-",
"value",
"pairs",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/PropertyAnnotation.java#L129-L133 |
35,497 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/PropertyAnnotation.java | PropertyAnnotation.toAttributeString | public static String toAttributeString(Set<String> attributes) {
List<String> list = new ArrayList<String>(attributes);
Collections.sort(list, ATTRIBUTES_COMPARATOR);
return Joiner.on(", ").join(list);
} | java | public static String toAttributeString(Set<String> attributes) {
List<String> list = new ArrayList<String>(attributes);
Collections.sort(list, ATTRIBUTES_COMPARATOR);
return Joiner.on(", ").join(list);
} | [
"public",
"static",
"String",
"toAttributeString",
"(",
"Set",
"<",
"String",
">",
"attributes",
")",
"{",
"List",
"<",
"String",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
"attributes",
")",
";",
"Collections",
".",
"sort",
"(",
"lis... | Return a sorted comma-separated list of the property attributes for this annotation. | [
"Return",
"a",
"sorted",
"comma",
"-",
"separated",
"list",
"of",
"the",
"property",
"attributes",
"for",
"this",
"annotation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/PropertyAnnotation.java#L142-L146 |
35,498 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/Extension.java | Extension.newExtension | public static Extension newExtension(ObjectIdentifier extensionId,
boolean critical, byte[] rawExtensionValue) throws IOException {
Extension ext = new Extension();
ext.extensionId = extensionId;
ext.critical = critical;
ext.extensionValue = rawExtensionValue;
return ext;... | java | public static Extension newExtension(ObjectIdentifier extensionId,
boolean critical, byte[] rawExtensionValue) throws IOException {
Extension ext = new Extension();
ext.extensionId = extensionId;
ext.critical = critical;
ext.extensionValue = rawExtensionValue;
return ext;... | [
"public",
"static",
"Extension",
"newExtension",
"(",
"ObjectIdentifier",
"extensionId",
",",
"boolean",
"critical",
",",
"byte",
"[",
"]",
"rawExtensionValue",
")",
"throws",
"IOException",
"{",
"Extension",
"ext",
"=",
"new",
"Extension",
"(",
")",
";",
"ext",... | Constructs an Extension from individual components of ObjectIdentifier,
criticality and the raw encoded extension value.
@param extensionId the ObjectIdentifier of the extension
@param critical the boolean indicating if the extension is critical
@param rawExtensionValue the raw DER-encoded extension value (this
is not... | [
"Constructs",
"an",
"Extension",
"from",
"individual",
"components",
"of",
"ObjectIdentifier",
"criticality",
"and",
"the",
"raw",
"encoded",
"extension",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/Extension.java#L135-L142 |
35,499 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Currency.java | Currency.getAvailableCurrencies | public static Set<Currency> getAvailableCurrencies() {
Set<Currency> result = new LinkedHashSet<Currency>();
for (String currencyCode : availableCurrencyCodes) {
result.add(Currency.getInstance(currencyCode));
}
return result;
} | java | public static Set<Currency> getAvailableCurrencies() {
Set<Currency> result = new LinkedHashSet<Currency>();
for (String currencyCode : availableCurrencyCodes) {
result.add(Currency.getInstance(currencyCode));
}
return result;
} | [
"public",
"static",
"Set",
"<",
"Currency",
">",
"getAvailableCurrencies",
"(",
")",
"{",
"Set",
"<",
"Currency",
">",
"result",
"=",
"new",
"LinkedHashSet",
"<",
"Currency",
">",
"(",
")",
";",
"for",
"(",
"String",
"currencyCode",
":",
"availableCurrencyCo... | Returns a set of all known currencies.
@since 1.7 | [
"Returns",
"a",
"set",
"of",
"all",
"known",
"currencies",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Currency.java#L104-L110 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.