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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,200 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterUtility.java | UCharacterUtility.compareNullTermByteSubString | static int compareNullTermByteSubString(String str, byte[] array,
int strindex, int aindex)
{
byte b = 1;
int length = str.length();
while (b != 0)
{
b = array[aindex];
aindex ++;
if... | java | static int compareNullTermByteSubString(String str, byte[] array,
int strindex, int aindex)
{
byte b = 1;
int length = str.length();
while (b != 0)
{
b = array[aindex];
aindex ++;
if... | [
"static",
"int",
"compareNullTermByteSubString",
"(",
"String",
"str",
",",
"byte",
"[",
"]",
"array",
",",
"int",
"strindex",
",",
"int",
"aindex",
")",
"{",
"byte",
"b",
"=",
"1",
";",
"int",
"length",
"=",
"str",
".",
"length",
"(",
")",
";",
"whi... | Compares a null terminated substring from an array of bytes.
Substring is a set of non-zero bytes starting from argument start to the
next zero byte. if the first byte is a zero, the next byte will be taken as
the first byte.
@param str string to compare
@param array byte array
@param strindex index within str to start... | [
"Compares",
"a",
"null",
"terminated",
"substring",
"from",
"an",
"array",
"of",
"bytes",
".",
"Substring",
"is",
"a",
"set",
"of",
"non",
"-",
"zero",
"bytes",
"starting",
"from",
"argument",
"start",
"to",
"the",
"next",
"zero",
"byte",
".",
"if",
"the... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterUtility.java#L90-L112 |
33,201 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterUtility.java | UCharacterUtility.skipNullTermByteSubString | static int skipNullTermByteSubString(byte[] array, int index,
int skipcount)
{
byte b;
for (int i = 0; i < skipcount; i ++)
{
b = 1;
while (b != 0)
{
b = array[index];
inde... | java | static int skipNullTermByteSubString(byte[] array, int index,
int skipcount)
{
byte b;
for (int i = 0; i < skipcount; i ++)
{
b = 1;
while (b != 0)
{
b = array[index];
inde... | [
"static",
"int",
"skipNullTermByteSubString",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"index",
",",
"int",
"skipcount",
")",
"{",
"byte",
"b",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"skipcount",
";",
"i",
"++",
")",
"{",
"b",
"... | Skip null terminated substrings from an array of bytes.
Substring is a set of non-zero bytes starting from argument start to the
next zero byte. If the first byte is a zero, the next byte will be taken as
the first byte.
@param array byte array
@param index to start substrings in byte count
@param skipcount number of n... | [
"Skip",
"null",
"terminated",
"substrings",
"from",
"an",
"array",
"of",
"bytes",
".",
"Substring",
"is",
"a",
"set",
"of",
"non",
"-",
"zero",
"bytes",
"starting",
"from",
"argument",
"start",
"to",
"the",
"next",
"zero",
"byte",
".",
"If",
"the",
"firs... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterUtility.java#L124-L138 |
33,202 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterUtility.java | UCharacterUtility.skipByteSubString | static int skipByteSubString(byte[] array, int index, int length,
byte skipend)
{
int result;
byte b;
for (result = 0; result < length; result ++)
{
b = array[index + result];
if (b == skipend)
{... | java | static int skipByteSubString(byte[] array, int index, int length,
byte skipend)
{
int result;
byte b;
for (result = 0; result < length; result ++)
{
b = array[index + result];
if (b == skipend)
{... | [
"static",
"int",
"skipByteSubString",
"(",
"byte",
"[",
"]",
"array",
",",
"int",
"index",
",",
"int",
"length",
",",
"byte",
"skipend",
")",
"{",
"int",
"result",
";",
"byte",
"b",
";",
"for",
"(",
"result",
"=",
"0",
";",
"result",
"<",
"length",
... | skip substrings from an array of characters, where each character is a set
of 2 bytes. substring is a set of non-zero bytes starting from argument
start to the byte of the argument value. skips up to a max number of
characters
@param array byte array to parse
@param index to start substrings in byte count
@param length... | [
"skip",
"substrings",
"from",
"an",
"array",
"of",
"characters",
"where",
"each",
"character",
"is",
"a",
"set",
"of",
"2",
"bytes",
".",
"substring",
"is",
"a",
"set",
"of",
"non",
"-",
"zero",
"bytes",
"starting",
"from",
"argument",
"start",
"to",
"th... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterUtility.java#L151-L168 |
33,203 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/SequenceInputStream.java | SequenceInputStream.nextStream | final void nextStream() throws IOException {
if (in != null) {
in.close();
}
if (e.hasMoreElements()) {
in = (InputStream) e.nextElement();
if (in == null)
throw new NullPointerException();
}
else in = null;
} | java | final void nextStream() throws IOException {
if (in != null) {
in.close();
}
if (e.hasMoreElements()) {
in = (InputStream) e.nextElement();
if (in == null)
throw new NullPointerException();
}
else in = null;
} | [
"final",
"void",
"nextStream",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"in",
"!=",
"null",
")",
"{",
"in",
".",
"close",
"(",
")",
";",
"}",
"if",
"(",
"e",
".",
"hasMoreElements",
"(",
")",
")",
"{",
"in",
"=",
"(",
"InputStream",
")"... | Continues reading in the next stream if an EOF is reached. | [
"Continues",
"reading",
"in",
"the",
"next",
"stream",
"if",
"an",
"EOF",
"is",
"reached",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/SequenceInputStream.java#L104-L116 |
33,204 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLImpl.java | URLImpl.getURLStreamHandler | public Object getURLStreamHandler(String protocol) {
URLStreamHandler handler = (URLStreamHandler) handlers.get(protocol);
if (handler == null) {
boolean checkedWithFactory = false;
// Use the factory (if any)
if (factory != null) {
handler = factory.createURLStreamHandler(protocol)... | java | public Object getURLStreamHandler(String protocol) {
URLStreamHandler handler = (URLStreamHandler) handlers.get(protocol);
if (handler == null) {
boolean checkedWithFactory = false;
// Use the factory (if any)
if (factory != null) {
handler = factory.createURLStreamHandler(protocol)... | [
"public",
"Object",
"getURLStreamHandler",
"(",
"String",
"protocol",
")",
"{",
"URLStreamHandler",
"handler",
"=",
"(",
"URLStreamHandler",
")",
"handlers",
".",
"get",
"(",
"protocol",
")",
";",
"if",
"(",
"handler",
"==",
"null",
")",
"{",
"boolean",
"che... | Returns the Stream Handler.
@param protocol
the protocol to use | [
"Returns",
"the",
"Stream",
"Handler",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/URLImpl.java#L218-L317 |
33,205 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/CastResolver.java | CastResolver.returnValueNeedsIntCast | private boolean returnValueNeedsIntCast(Expression arg) {
ExecutableElement methodElement = TreeUtil.getExecutableElement(arg);
assert methodElement != null;
if (arg.getParent() instanceof ExpressionStatement) {
// Avoid "unused return value" warning.
return false;
}
String methodName ... | java | private boolean returnValueNeedsIntCast(Expression arg) {
ExecutableElement methodElement = TreeUtil.getExecutableElement(arg);
assert methodElement != null;
if (arg.getParent() instanceof ExpressionStatement) {
// Avoid "unused return value" warning.
return false;
}
String methodName ... | [
"private",
"boolean",
"returnValueNeedsIntCast",
"(",
"Expression",
"arg",
")",
"{",
"ExecutableElement",
"methodElement",
"=",
"TreeUtil",
".",
"getExecutableElement",
"(",
"arg",
")",
";",
"assert",
"methodElement",
"!=",
"null",
";",
"if",
"(",
"arg",
".",
"g... | Some native objective-c methods are declared to return NSUInteger. | [
"Some",
"native",
"objective",
"-",
"c",
"methods",
"are",
"declared",
"to",
"return",
"NSUInteger",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/CastResolver.java#L277-L291 |
33,206 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/CastResolver.java | CastResolver.endVisit | @Override
public void endVisit(MethodDeclaration node) {
ExecutableElement element = node.getExecutableElement();
if (!ElementUtil.getName(element).equals("compareTo") || node.getBody() == null) {
return;
}
DeclaredType comparableType = typeUtil.findSupertype(
ElementUtil.getDeclaringCla... | java | @Override
public void endVisit(MethodDeclaration node) {
ExecutableElement element = node.getExecutableElement();
if (!ElementUtil.getName(element).equals("compareTo") || node.getBody() == null) {
return;
}
DeclaredType comparableType = typeUtil.findSupertype(
ElementUtil.getDeclaringCla... | [
"@",
"Override",
"public",
"void",
"endVisit",
"(",
"MethodDeclaration",
"node",
")",
"{",
"ExecutableElement",
"element",
"=",
"node",
".",
"getExecutableElement",
"(",
")",
";",
"if",
"(",
"!",
"ElementUtil",
".",
"getName",
"(",
"element",
")",
".",
"equa... | Adds a cast check to compareTo methods. This helps Comparable types behave
well in sorted collections which rely on Java's runtime type checking. | [
"Adds",
"a",
"cast",
"check",
"to",
"compareTo",
"methods",
".",
"This",
"helps",
"Comparable",
"types",
"behave",
"well",
"in",
"sorted",
"collections",
"which",
"rely",
"on",
"Java",
"s",
"runtime",
"type",
"checking",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/CastResolver.java#L382-L406 |
33,207 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.format | private StringBuffer format(long number, StringBuffer result,
FieldDelegate delegate) {
boolean isNegative = (number < 0);
if (isNegative) {
number = -number;
}
// In general, long values always represent real finite numbers, so
// we d... | java | private StringBuffer format(long number, StringBuffer result,
FieldDelegate delegate) {
boolean isNegative = (number < 0);
if (isNegative) {
number = -number;
}
// In general, long values always represent real finite numbers, so
// we d... | [
"private",
"StringBuffer",
"format",
"(",
"long",
"number",
",",
"StringBuffer",
"result",
",",
"FieldDelegate",
"delegate",
")",
"{",
"boolean",
"isNegative",
"=",
"(",
"number",
"<",
"0",
")",
";",
"if",
"(",
"isNegative",
")",
"{",
"number",
"=",
"-",
... | Format a long to produce a string.
@param number The long to format
@param result where the text is to be appended
@param delegate notified of locations of sub fields
@return The formatted number string
@exception ArithmeticException if rounding is needed with rounding
mode being set to RoundingMode.UNNECE... | [
"Format",
"a",
"long",
"to",
"produce",
"a",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L661-L717 |
33,208 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.checkAndSetFastPathStatus | private void checkAndSetFastPathStatus() {
boolean fastPathWasOn = isFastPath;
if ((roundingMode == RoundingMode.HALF_EVEN) &&
(isGroupingUsed()) &&
(groupingSize == 3) &&
(secondaryGroupingSize == 0) &&
(multiplier == 1) &&
(!decimalSeparato... | java | private void checkAndSetFastPathStatus() {
boolean fastPathWasOn = isFastPath;
if ((roundingMode == RoundingMode.HALF_EVEN) &&
(isGroupingUsed()) &&
(groupingSize == 3) &&
(secondaryGroupingSize == 0) &&
(multiplier == 1) &&
(!decimalSeparato... | [
"private",
"void",
"checkAndSetFastPathStatus",
"(",
")",
"{",
"boolean",
"fastPathWasOn",
"=",
"isFastPath",
";",
"if",
"(",
"(",
"roundingMode",
"==",
"RoundingMode",
".",
"HALF_EVEN",
")",
"&&",
"(",
"isGroupingUsed",
"(",
")",
")",
"&&",
"(",
"groupingSize... | Check validity of using fast-path for this instance. If fast-path is valid
for this instance, sets fast-path state as true and initializes fast-path
utility fields as needed.
This method is supposed to be called rarely, otherwise that will break the
fast-path performance. That means avoiding frequent changes of the
pr... | [
"Check",
"validity",
"of",
"using",
"fast",
"-",
"path",
"for",
"this",
"instance",
".",
"If",
"fast",
"-",
"path",
"is",
"valid",
"for",
"this",
"instance",
"sets",
"fast",
"-",
"path",
"state",
"as",
"true",
"and",
"initializes",
"fast",
"-",
"path",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L973-L1067 |
33,209 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.fastDoubleFormat | private void fastDoubleFormat(double d,
boolean negative) {
char[] container = fastPathData.fastPathContainer;
/*
* The principle of the algorithm is to :
* - Break the passed double into its integral and fractional parts
* converted into... | java | private void fastDoubleFormat(double d,
boolean negative) {
char[] container = fastPathData.fastPathContainer;
/*
* The principle of the algorithm is to :
* - Break the passed double into its integral and fractional parts
* converted into... | [
"private",
"void",
"fastDoubleFormat",
"(",
"double",
"d",
",",
"boolean",
"negative",
")",
"{",
"char",
"[",
"]",
"container",
"=",
"fastPathData",
".",
"fastPathContainer",
";",
"/*\n * The principle of the algorithm is to :\n * - Break the passed double int... | This is the main entry point for the fast-path format algorithm.
At this point we are sure to be in the expected conditions to run it.
This algorithm builds the formatted result and puts it in the dedicated
{@code fastPathData.fastPathContainer}.
@param d the double value to be formatted.
@param negative Flag precisi... | [
"This",
"is",
"the",
"main",
"entry",
"point",
"for",
"the",
"fast",
"-",
"path",
"format",
"algorithm",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L1458-L1543 |
33,210 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.setDecimalFormatSymbols | public void setDecimalFormatSymbols(DecimalFormatSymbols newSymbols) {
try {
// don't allow multiple references
symbols = (DecimalFormatSymbols) newSymbols.clone();
expandAffixes();
fastPathCheckNeeded = true;
} catch (Exception foo) {
// shoul... | java | public void setDecimalFormatSymbols(DecimalFormatSymbols newSymbols) {
try {
// don't allow multiple references
symbols = (DecimalFormatSymbols) newSymbols.clone();
expandAffixes();
fastPathCheckNeeded = true;
} catch (Exception foo) {
// shoul... | [
"public",
"void",
"setDecimalFormatSymbols",
"(",
"DecimalFormatSymbols",
"newSymbols",
")",
"{",
"try",
"{",
"// don't allow multiple references",
"symbols",
"=",
"(",
"DecimalFormatSymbols",
")",
"newSymbols",
".",
"clone",
"(",
")",
";",
"expandAffixes",
"(",
")",
... | Sets the decimal format symbols, which is generally not changed
by the programmer or user.
@param newSymbols desired DecimalFormatSymbols
@see java.text.DecimalFormatSymbols | [
"Sets",
"the",
"decimal",
"format",
"symbols",
"which",
"is",
"generally",
"not",
"changed",
"by",
"the",
"programmer",
"or",
"user",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L2377-L2386 |
33,211 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.expandAffixes | private void expandAffixes() {
// Reuse one StringBuffer for better performance
StringBuffer buffer = new StringBuffer();
if (posPrefixPattern != null) {
positivePrefix = expandAffix(posPrefixPattern, buffer);
positivePrefixFieldPositions = null;
}
if (pos... | java | private void expandAffixes() {
// Reuse one StringBuffer for better performance
StringBuffer buffer = new StringBuffer();
if (posPrefixPattern != null) {
positivePrefix = expandAffix(posPrefixPattern, buffer);
positivePrefixFieldPositions = null;
}
if (pos... | [
"private",
"void",
"expandAffixes",
"(",
")",
"{",
"// Reuse one StringBuffer for better performance",
"StringBuffer",
"buffer",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"posPrefixPattern",
"!=",
"null",
")",
"{",
"positivePrefix",
"=",
"expandAffix",
"... | Expand the affix pattern strings into the expanded affix strings. If any
affix pattern string is null, do not expand it. This method should be
called any time the symbols or the affix patterns change in order to keep
the expanded affix strings up to date. | [
"Expand",
"the",
"affix",
"pattern",
"strings",
"into",
"the",
"expanded",
"affix",
"strings",
".",
"If",
"any",
"affix",
"pattern",
"string",
"is",
"null",
"do",
"not",
"expand",
"it",
".",
"This",
"method",
"should",
"be",
"called",
"any",
"time",
"the",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L2782-L2801 |
33,212 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.appendAffix | private void appendAffix(StringBuffer buffer, String affix, boolean localized) {
boolean needQuote;
if (localized) {
needQuote = affix.indexOf(symbols.getZeroDigit()) >= 0
|| affix.indexOf(symbols.getGroupingSeparator()) >= 0
|| affix.indexOf(symbols.getDecima... | java | private void appendAffix(StringBuffer buffer, String affix, boolean localized) {
boolean needQuote;
if (localized) {
needQuote = affix.indexOf(symbols.getZeroDigit()) >= 0
|| affix.indexOf(symbols.getGroupingSeparator()) >= 0
|| affix.indexOf(symbols.getDecima... | [
"private",
"void",
"appendAffix",
"(",
"StringBuffer",
"buffer",
",",
"String",
"affix",
",",
"boolean",
"localized",
")",
"{",
"boolean",
"needQuote",
";",
"if",
"(",
"localized",
")",
"{",
"needQuote",
"=",
"affix",
".",
"indexOf",
"(",
"symbols",
".",
"... | Append an affix to the given StringBuffer, using quotes if
there are special characters. Single quotes themselves must be
escaped in either case. | [
"Append",
"an",
"affix",
"to",
"the",
"given",
"StringBuffer",
"using",
"quotes",
"if",
"there",
"are",
"special",
"characters",
".",
"Single",
"quotes",
"themselves",
"must",
"be",
"escaped",
"in",
"either",
"case",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L2992-L3025 |
33,213 | google/j2objc | jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java | DecimalFormat.toPattern | private String toPattern(boolean localized) {
StringBuffer result = new StringBuffer();
for (int j = 1; j >= 0; --j) {
if (j == 1)
appendAffix(result, posPrefixPattern, positivePrefix, localized);
else appendAffix(result, negPrefixPattern, negativePrefix, localize... | java | private String toPattern(boolean localized) {
StringBuffer result = new StringBuffer();
for (int j = 1; j >= 0; --j) {
if (j == 1)
appendAffix(result, posPrefixPattern, positivePrefix, localized);
else appendAffix(result, negPrefixPattern, negativePrefix, localize... | [
"private",
"String",
"toPattern",
"(",
"boolean",
"localized",
")",
"{",
"StringBuffer",
"result",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"for",
"(",
"int",
"j",
"=",
"1",
";",
"j",
">=",
"0",
";",
"--",
"j",
")",
"{",
"if",
"(",
"j",
"==",
"... | Does the real work of generating a pattern. | [
"Does",
"the",
"real",
"work",
"of",
"generating",
"a",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/text/DecimalFormat.java#L3029-L3088 |
33,214 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/BOCSU.java | BOCSU.getNegDivMod | private static final long getNegDivMod(int number, int factor)
{
int modulo = number % factor;
long result = number / factor;
if (modulo < 0) {
-- result;
modulo += factor;
}
return (result << 32) | modulo;
} | java | private static final long getNegDivMod(int number, int factor)
{
int modulo = number % factor;
long result = number / factor;
if (modulo < 0) {
-- result;
modulo += factor;
}
return (result << 32) | modulo;
} | [
"private",
"static",
"final",
"long",
"getNegDivMod",
"(",
"int",
"number",
",",
"int",
"factor",
")",
"{",
"int",
"modulo",
"=",
"number",
"%",
"factor",
";",
"long",
"result",
"=",
"number",
"/",
"factor",
";",
"if",
"(",
"modulo",
"<",
"0",
")",
"... | Integer division and modulo with negative numerators
yields negative modulo results and quotients that are one more than
what we need here.
@param number which operations are to be performed on
@param factor the factor to use for division
@return (result of division) << 32 | modulo | [
"Integer",
"division",
"and",
"modulo",
"with",
"negative",
"numerators",
"yields",
"negative",
"modulo",
"results",
"and",
"quotients",
"that",
"are",
"one",
"more",
"than",
"what",
"we",
"need",
"here",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/BOCSU.java#L240-L249 |
33,215 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/DriverManager.java | DriverManager.getDrivers | @CallerSensitive
public static java.util.Enumeration<Driver> getDrivers() {
java.util.Vector<Driver> result = new java.util.Vector<Driver>();
ClassLoader callerClassLoader = ClassLoader.getSystemClassLoader();
// Walk through the loaded registeredDrivers.
for(DriverInfo aDriver : r... | java | @CallerSensitive
public static java.util.Enumeration<Driver> getDrivers() {
java.util.Vector<Driver> result = new java.util.Vector<Driver>();
ClassLoader callerClassLoader = ClassLoader.getSystemClassLoader();
// Walk through the loaded registeredDrivers.
for(DriverInfo aDriver : r... | [
"@",
"CallerSensitive",
"public",
"static",
"java",
".",
"util",
".",
"Enumeration",
"<",
"Driver",
">",
"getDrivers",
"(",
")",
"{",
"java",
".",
"util",
".",
"Vector",
"<",
"Driver",
">",
"result",
"=",
"new",
"java",
".",
"util",
".",
"Vector",
"<",... | Retrieves an Enumeration with all of the currently loaded JDBC drivers
to which the current caller has access.
<P><B>Note:</B> The classname of a driver can be found using
<CODE>d.getClass().getName()</CODE>
@return the list of JDBC Drivers loaded by the caller's class loader | [
"Retrieves",
"an",
"Enumeration",
"with",
"all",
"of",
"the",
"currently",
"loaded",
"JDBC",
"drivers",
"to",
"which",
"the",
"current",
"caller",
"has",
"access",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/DriverManager.java#L343-L360 |
33,216 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/DriverManager.java | DriverManager.println | public static void println(String message) {
synchronized (logSync) {
if (logWriter != null) {
logWriter.println(message);
// automatic flushing is never enabled, so we must do it ourselves
logWriter.flush();
}
}
} | java | public static void println(String message) {
synchronized (logSync) {
if (logWriter != null) {
logWriter.println(message);
// automatic flushing is never enabled, so we must do it ourselves
logWriter.flush();
}
}
} | [
"public",
"static",
"void",
"println",
"(",
"String",
"message",
")",
"{",
"synchronized",
"(",
"logSync",
")",
"{",
"if",
"(",
"logWriter",
"!=",
"null",
")",
"{",
"logWriter",
".",
"println",
"(",
"message",
")",
";",
"// automatic flushing is never enabled,... | Prints a message to the current JDBC log stream.
@param message a log or tracing message | [
"Prints",
"a",
"message",
"to",
"the",
"current",
"JDBC",
"log",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/sql/DriverManager.java#L437-L446 |
33,217 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java | ArabicShaping.shape | public int shape(char[] source, int sourceStart, int sourceLength,
char[] dest, int destStart, int destSize) throws ArabicShapingException {
if (source == null) {
throw new IllegalArgumentException("source can not be null");
}
if (sourceStart < 0 || sourceLength ... | java | public int shape(char[] source, int sourceStart, int sourceLength,
char[] dest, int destStart, int destSize) throws ArabicShapingException {
if (source == null) {
throw new IllegalArgumentException("source can not be null");
}
if (sourceStart < 0 || sourceLength ... | [
"public",
"int",
"shape",
"(",
"char",
"[",
"]",
"source",
",",
"int",
"sourceStart",
",",
"int",
"sourceLength",
",",
"char",
"[",
"]",
"dest",
",",
"int",
"destStart",
",",
"int",
"destSize",
")",
"throws",
"ArabicShapingException",
"{",
"if",
"(",
"so... | Convert a range of text in the source array, putting the result
into a range of text in the destination array, and return the number
of characters written.
@param source An array containing the input text
@param sourceStart The start of the range of text to convert
@param sourceLength The length of the range of text t... | [
"Convert",
"a",
"range",
"of",
"text",
"in",
"the",
"source",
"array",
"putting",
"the",
"result",
"into",
"a",
"range",
"of",
"text",
"in",
"the",
"destination",
"array",
"and",
"return",
"the",
"number",
"of",
"characters",
"written",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java#L88-L133 |
33,218 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java | ArabicShaping.shape | public void shape(char[] source, int start, int length) throws ArabicShapingException {
if ((options & LAMALEF_MASK) == LAMALEF_RESIZE) {
throw new ArabicShapingException("Cannot shape in place with length option resize.");
}
shape(source, start, length, source, start, length);
} | java | public void shape(char[] source, int start, int length) throws ArabicShapingException {
if ((options & LAMALEF_MASK) == LAMALEF_RESIZE) {
throw new ArabicShapingException("Cannot shape in place with length option resize.");
}
shape(source, start, length, source, start, length);
} | [
"public",
"void",
"shape",
"(",
"char",
"[",
"]",
"source",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"ArabicShapingException",
"{",
"if",
"(",
"(",
"options",
"&",
"LAMALEF_MASK",
")",
"==",
"LAMALEF_RESIZE",
")",
"{",
"throw",
"new",
"A... | Convert a range of text in place. This may only be used if the Length option
does not grow or shrink the text.
@param source An array containing the input text
@param start The start of the range of text to convert
@param length The length of the range of text to convert
@throws ArabicShapingException if the text can... | [
"Convert",
"a",
"range",
"of",
"text",
"in",
"place",
".",
"This",
"may",
"only",
"be",
"used",
"if",
"the",
"Length",
"option",
"does",
"not",
"grow",
"or",
"shrink",
"the",
"text",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java#L144-L149 |
33,219 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java | ArabicShaping.shape | public String shape(String text) throws ArabicShapingException {
char[] src = text.toCharArray();
char[] dest = src;
if (((options & LAMALEF_MASK) == LAMALEF_RESIZE) &&
((options & LETTERS_MASK) == LETTERS_UNSHAPE)) {
dest = new char[src.length * 2]; // max
}
... | java | public String shape(String text) throws ArabicShapingException {
char[] src = text.toCharArray();
char[] dest = src;
if (((options & LAMALEF_MASK) == LAMALEF_RESIZE) &&
((options & LETTERS_MASK) == LETTERS_UNSHAPE)) {
dest = new char[src.length * 2]; // max
}
... | [
"public",
"String",
"shape",
"(",
"String",
"text",
")",
"throws",
"ArabicShapingException",
"{",
"char",
"[",
"]",
"src",
"=",
"text",
".",
"toCharArray",
"(",
")",
";",
"char",
"[",
"]",
"dest",
"=",
"src",
";",
"if",
"(",
"(",
"(",
"options",
"&",... | Convert a string, returning the new string.
@param text the string to convert
@return the converted string
@throws ArabicShapingException if the string cannot be converted according to the options. | [
"Convert",
"a",
"string",
"returning",
"the",
"new",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ArabicShaping.java#L158-L169 |
33,220 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicInteger.java | AtomicInteger.accumulateAndGet | public final int accumulateAndGet(int x,
IntBinaryOperator accumulatorFunction) {
int prev, next;
do {
prev = get();
next = accumulatorFunction.applyAsInt(prev, x);
} while (!compareAndSet(prev, next));
return next;
} | java | public final int accumulateAndGet(int x,
IntBinaryOperator accumulatorFunction) {
int prev, next;
do {
prev = get();
next = accumulatorFunction.applyAsInt(prev, x);
} while (!compareAndSet(prev, next));
return next;
} | [
"public",
"final",
"int",
"accumulateAndGet",
"(",
"int",
"x",
",",
"IntBinaryOperator",
"accumulatorFunction",
")",
"{",
"int",
"prev",
",",
"next",
";",
"do",
"{",
"prev",
"=",
"get",
"(",
")",
";",
"next",
"=",
"accumulatorFunction",
".",
"applyAsInt",
... | Atomically updates the current value with the results of
applying the given function to the current and given values,
returning the updated value. The function should be
side-effect-free, since it may be re-applied when attempted
updates fail due to contention among threads. The function
is applied with the current va... | [
"Atomically",
"updates",
"the",
"current",
"value",
"with",
"the",
"results",
"of",
"applying",
"the",
"given",
"function",
"to",
"the",
"current",
"and",
"given",
"values",
"returning",
"the",
"updated",
"value",
".",
"The",
"function",
"should",
"be",
"side"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicInteger.java#L289-L297 |
33,221 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/Phaser.java | Phaser.internalAwaitAdvance | private int internalAwaitAdvance(int phase, QNode node) {
// assert root == this;
releaseWaiters(phase-1); // ensure old queue clean
boolean queued = false; // true when node is enqueued
int lastUnarrived = 0; // to increase spins upon change
int spi... | java | private int internalAwaitAdvance(int phase, QNode node) {
// assert root == this;
releaseWaiters(phase-1); // ensure old queue clean
boolean queued = false; // true when node is enqueued
int lastUnarrived = 0; // to increase spins upon change
int spi... | [
"private",
"int",
"internalAwaitAdvance",
"(",
"int",
"phase",
",",
"QNode",
"node",
")",
"{",
"// assert root == this;",
"releaseWaiters",
"(",
"phase",
"-",
"1",
")",
";",
"// ensure old queue clean",
"boolean",
"queued",
"=",
"false",
";",
"// true when node is e... | Possibly blocks and waits for phase to advance unless aborted.
Call only on root phaser.
@param phase current phase
@param node if non-null, the wait node to track interrupt and timeout;
if null, denotes noninterruptible wait
@return current phase | [
"Possibly",
"blocks",
"and",
"waits",
"for",
"phase",
"to",
"advance",
"unless",
"aborted",
".",
"Call",
"only",
"on",
"root",
"phaser",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/Phaser.java#L1031-L1079 |
33,222 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SelectFormat.java | SelectFormat.applyPattern | public void applyPattern(String pattern) {
this.pattern = pattern;
if (msgPattern == null) {
msgPattern = new MessagePattern();
}
try {
msgPattern.parseSelectStyle(pattern);
} catch(RuntimeException e) {
reset();
throw e;
}
... | java | public void applyPattern(String pattern) {
this.pattern = pattern;
if (msgPattern == null) {
msgPattern = new MessagePattern();
}
try {
msgPattern.parseSelectStyle(pattern);
} catch(RuntimeException e) {
reset();
throw e;
}
... | [
"public",
"void",
"applyPattern",
"(",
"String",
"pattern",
")",
"{",
"this",
".",
"pattern",
"=",
"pattern",
";",
"if",
"(",
"msgPattern",
"==",
"null",
")",
"{",
"msgPattern",
"=",
"new",
"MessagePattern",
"(",
")",
";",
"}",
"try",
"{",
"msgPattern",
... | Sets the pattern used by this select format.
Patterns and their interpretation are specified in the class description.
@param pattern the pattern for this select format.
@throws IllegalArgumentException when the pattern is not a valid select format pattern. | [
"Sets",
"the",
"pattern",
"used",
"by",
"this",
"select",
"format",
".",
"Patterns",
"and",
"their",
"interpretation",
"are",
"specified",
"in",
"the",
"class",
"description",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SelectFormat.java#L190-L201 |
33,223 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SelectFormat.java | SelectFormat.format | public final String format(String keyword) {
//Check for the validity of the keyword
if (!PatternProps.isIdentifier(keyword)) {
throw new IllegalArgumentException("Invalid formatting argument.");
}
// If no pattern was applied, throw an exception
if (msgPattern == nul... | java | public final String format(String keyword) {
//Check for the validity of the keyword
if (!PatternProps.isIdentifier(keyword)) {
throw new IllegalArgumentException("Invalid formatting argument.");
}
// If no pattern was applied, throw an exception
if (msgPattern == nul... | [
"public",
"final",
"String",
"format",
"(",
"String",
"keyword",
")",
"{",
"//Check for the validity of the keyword",
"if",
"(",
"!",
"PatternProps",
".",
"isIdentifier",
"(",
"keyword",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Invalid form... | Selects the phrase for the given keyword.
@param keyword a phrase selection keyword.
@return the string containing the formatted select message.
@throws IllegalArgumentException when the given keyword is not a "pattern identifier" | [
"Selects",
"the",
"phrase",
"for",
"the",
"given",
"keyword",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SelectFormat.java#L249-L297 |
33,224 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/NodeSorter.java | NodeSorter.mergesort | void mergesort(Vector a, Vector b, int l, int r, XPathContext support)
throws TransformerException
{
if ((r - l) > 0)
{
int m = (r + l) / 2;
mergesort(a, b, l, m, support);
mergesort(a, b, m + 1, r, support);
int i, j, k;
for (i = m; i >= l; i--)
{
//... | java | void mergesort(Vector a, Vector b, int l, int r, XPathContext support)
throws TransformerException
{
if ((r - l) > 0)
{
int m = (r + l) / 2;
mergesort(a, b, l, m, support);
mergesort(a, b, m + 1, r, support);
int i, j, k;
for (i = m; i >= l; i--)
{
//... | [
"void",
"mergesort",
"(",
"Vector",
"a",
",",
"Vector",
"b",
",",
"int",
"l",
",",
"int",
"r",
",",
"XPathContext",
"support",
")",
"throws",
"TransformerException",
"{",
"if",
"(",
"(",
"r",
"-",
"l",
")",
">",
"0",
")",
"{",
"int",
"m",
"=",
"(... | This implements a standard Mergesort, as described in
Robert Sedgewick's Algorithms book. This is a better
sort for our purpose than the Quicksort because it
maintains the original document order of the input if
the order isn't changed by the sort.
@param a First vector of nodes to compare
@param b Second vector of ... | [
"This",
"implements",
"a",
"standard",
"Mergesort",
"as",
"described",
"in",
"Robert",
"Sedgewick",
"s",
"Algorithms",
"book",
".",
"This",
"is",
"a",
"better",
"sort",
"for",
"our",
"purpose",
"than",
"the",
"Quicksort",
"because",
"it",
"maintains",
"the",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/NodeSorter.java#L295-L363 |
33,225 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractSpinedBuffer.java | AbstractSpinedBuffer.chunkSize | protected int chunkSize(int n) {
int power = (n == 0 || n == 1)
? initialChunkPower
: Math.min(initialChunkPower + n - 1, AbstractSpinedBuffer.MAX_CHUNK_POWER);
return 1 << power;
} | java | protected int chunkSize(int n) {
int power = (n == 0 || n == 1)
? initialChunkPower
: Math.min(initialChunkPower + n - 1, AbstractSpinedBuffer.MAX_CHUNK_POWER);
return 1 << power;
} | [
"protected",
"int",
"chunkSize",
"(",
"int",
"n",
")",
"{",
"int",
"power",
"=",
"(",
"n",
"==",
"0",
"||",
"n",
"==",
"1",
")",
"?",
"initialChunkPower",
":",
"Math",
".",
"min",
"(",
"initialChunkPower",
"+",
"n",
"-",
"1",
",",
"AbstractSpinedBuff... | How big should the nth chunk be? | [
"How",
"big",
"should",
"the",
"nth",
"chunk",
"be?"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractSpinedBuffer.java#L116-L121 |
33,226 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java | ElemLiteralResult.getLiteralResultAttributeNS | public AVT getLiteralResultAttributeNS(String namespaceURI, String localName)
{
if (null != m_avts)
{
int nAttrs = m_avts.size();
for (int i = (nAttrs - 1); i >= 0; i--)
{
AVT avt = (AVT) m_avts.get(i);
if (avt.getName().equals(localName) &&
avt.getURI().e... | java | public AVT getLiteralResultAttributeNS(String namespaceURI, String localName)
{
if (null != m_avts)
{
int nAttrs = m_avts.size();
for (int i = (nAttrs - 1); i >= 0; i--)
{
AVT avt = (AVT) m_avts.get(i);
if (avt.getName().equals(localName) &&
avt.getURI().e... | [
"public",
"AVT",
"getLiteralResultAttributeNS",
"(",
"String",
"namespaceURI",
",",
"String",
"localName",
")",
"{",
"if",
"(",
"null",
"!=",
"m_avts",
")",
"{",
"int",
"nAttrs",
"=",
"m_avts",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"... | Get a literal result attribute by name.
@param namespaceURI Namespace URI of attribute node to get
@param localName Local part of qualified name of attribute node to get
@return literal result attribute (AVT) | [
"Get",
"a",
"literal",
"result",
"attribute",
"by",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L190-L210 |
33,227 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java | ElemLiteralResult.resolvePrefixTables | public void resolvePrefixTables() throws TransformerException
{
super.resolvePrefixTables();
StylesheetRoot stylesheet = getStylesheetRoot();
if ((null != m_namespace) && (m_namespace.length() > 0))
{
NamespaceAlias nsa = stylesheet.getNamespaceAliasComposed(m_namespace);
if (null != n... | java | public void resolvePrefixTables() throws TransformerException
{
super.resolvePrefixTables();
StylesheetRoot stylesheet = getStylesheetRoot();
if ((null != m_namespace) && (m_namespace.length() > 0))
{
NamespaceAlias nsa = stylesheet.getNamespaceAliasComposed(m_namespace);
if (null != n... | [
"public",
"void",
"resolvePrefixTables",
"(",
")",
"throws",
"TransformerException",
"{",
"super",
".",
"resolvePrefixTables",
"(",
")",
";",
"StylesheetRoot",
"stylesheet",
"=",
"getStylesheetRoot",
"(",
")",
";",
"if",
"(",
"(",
"null",
"!=",
"m_namespace",
")... | Augment resolvePrefixTables, resolving the namespace aliases once
the superclass has resolved the tables.
@throws TransformerException | [
"Augment",
"resolvePrefixTables",
"resolving",
"the",
"namespace",
"aliases",
"once",
"the",
"superclass",
"has",
"resolved",
"the",
"tables",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L332-L390 |
33,228 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java | ElemLiteralResult.needToCheckExclude | boolean needToCheckExclude()
{
if (null == m_excludeResultPrefixes && null == getPrefixTable()
&& m_ExtensionElementURIs==null // JJK Bugzilla 1133
)
return false;
else
{
// Create a new prefix table if one has not already been created.
if (null == ge... | java | boolean needToCheckExclude()
{
if (null == m_excludeResultPrefixes && null == getPrefixTable()
&& m_ExtensionElementURIs==null // JJK Bugzilla 1133
)
return false;
else
{
// Create a new prefix table if one has not already been created.
if (null == ge... | [
"boolean",
"needToCheckExclude",
"(",
")",
"{",
"if",
"(",
"null",
"==",
"m_excludeResultPrefixes",
"&&",
"null",
"==",
"getPrefixTable",
"(",
")",
"&&",
"m_ExtensionElementURIs",
"==",
"null",
"// JJK Bugzilla 1133",
")",
"return",
"false",
";",
"else",
"{",
"/... | Return whether we need to check namespace prefixes
against the exclude result prefixes or extensions lists.
Note that this will create a new prefix table if one
has not been created already.
NEEDSDOC ($objectName$) @return | [
"Return",
"whether",
"we",
"need",
"to",
"check",
"namespace",
"prefixes",
"against",
"the",
"exclude",
"result",
"prefixes",
"or",
"extensions",
"lists",
".",
"Note",
"that",
"this",
"will",
"create",
"a",
"new",
"prefix",
"table",
"if",
"one",
"has",
"not"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L400-L415 |
33,229 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java | ElemLiteralResult.getPrefix | public String getPrefix()
{
int len=m_rawName.length()-m_localName.length()-1;
return (len>0)
? m_rawName.substring(0,len)
: "";
} | java | public String getPrefix()
{
int len=m_rawName.length()-m_localName.length()-1;
return (len>0)
? m_rawName.substring(0,len)
: "";
} | [
"public",
"String",
"getPrefix",
"(",
")",
"{",
"int",
"len",
"=",
"m_rawName",
".",
"length",
"(",
")",
"-",
"m_localName",
".",
"length",
"(",
")",
"-",
"1",
";",
"return",
"(",
"len",
">",
"0",
")",
"?",
"m_rawName",
".",
"substring",
"(",
"0",
... | Get the prefix part of the raw name of the Literal Result Element.
@return The prefix, or the empty string if noprefix was provided. | [
"Get",
"the",
"prefix",
"part",
"of",
"the",
"raw",
"name",
"of",
"the",
"Literal",
"Result",
"Element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L517-L523 |
33,230 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java | ElemLiteralResult.throwDOMException | public void throwDOMException(short code, String msg)
{
String themsg = XSLMessages.createMessage(msg, null);
throw new DOMException(code, themsg);
} | java | public void throwDOMException(short code, String msg)
{
String themsg = XSLMessages.createMessage(msg, null);
throw new DOMException(code, themsg);
} | [
"public",
"void",
"throwDOMException",
"(",
"short",
"code",
",",
"String",
"msg",
")",
"{",
"String",
"themsg",
"=",
"XSLMessages",
".",
"createMessage",
"(",
"msg",
",",
"null",
")",
";",
"throw",
"new",
"DOMException",
"(",
"code",
",",
"themsg",
")",
... | Throw a DOMException
@param msg key of the error that occured. | [
"Throw",
"a",
"DOMException"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L1470-L1476 |
33,231 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | NFSubstitution.makeSubstitution | public static NFSubstitution makeSubstitution(int pos,
NFRule rule,
NFRule rulePredecessor,
NFRuleSet ruleSet,
RuleBased... | java | public static NFSubstitution makeSubstitution(int pos,
NFRule rule,
NFRule rulePredecessor,
NFRuleSet ruleSet,
RuleBased... | [
"public",
"static",
"NFSubstitution",
"makeSubstitution",
"(",
"int",
"pos",
",",
"NFRule",
"rule",
",",
"NFRule",
"rulePredecessor",
",",
"NFRuleSet",
"ruleSet",
",",
"RuleBasedNumberFormat",
"formatter",
",",
"String",
"description",
")",
"{",
"// if the description... | Parses the description, creates the right kind of substitution,
and initializes it based on the description.
@param pos The substitution's position in the rule text of the
rule that owns it.
@param rule The rule containing this substitution
@param rulePredecessor The rule preceding the one that contains
this substituti... | [
"Parses",
"the",
"description",
"creates",
"the",
"right",
"kind",
"of",
"substitution",
"and",
"initializes",
"it",
"based",
"on",
"the",
"description",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L69-L150 |
33,232 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | MultiplierSubstitution.setDivisor | public void setDivisor(int radix, short exponent) {
divisor = NFRule.power(radix, exponent);
if (divisor == 0) {
throw new IllegalStateException("Substitution with divisor 0");
}
} | java | public void setDivisor(int radix, short exponent) {
divisor = NFRule.power(radix, exponent);
if (divisor == 0) {
throw new IllegalStateException("Substitution with divisor 0");
}
} | [
"public",
"void",
"setDivisor",
"(",
"int",
"radix",
",",
"short",
"exponent",
")",
"{",
"divisor",
"=",
"NFRule",
".",
"power",
"(",
"radix",
",",
"exponent",
")",
";",
"if",
"(",
"divisor",
"==",
"0",
")",
"{",
"throw",
"new",
"IllegalStateException",
... | Sets the substitution's divisor based on the values passed in.
@param radix The radix of the divisor.
@param exponent The exponent of the divisor. | [
"Sets",
"the",
"substitution",
"s",
"divisor",
"based",
"on",
"the",
"values",
"passed",
"in",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L672-L678 |
33,233 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | ModulusSubstitution.doSubstitution | public void doSubstitution(long number, StringBuilder toInsertInto, int position, int recursionCount) {
// if this isn't a >>> substitution, just use the inherited version
// of this function (which uses either a rule set or a DecimalFormat
// to format its substitution value)
if (ruleTo... | java | public void doSubstitution(long number, StringBuilder toInsertInto, int position, int recursionCount) {
// if this isn't a >>> substitution, just use the inherited version
// of this function (which uses either a rule set or a DecimalFormat
// to format its substitution value)
if (ruleTo... | [
"public",
"void",
"doSubstitution",
"(",
"long",
"number",
",",
"StringBuilder",
"toInsertInto",
",",
"int",
"position",
",",
"int",
"recursionCount",
")",
"{",
"// if this isn't a >>> substitution, just use the inherited version",
"// of this function (which uses either a rule s... | If this is a >>> substitution, use ruleToUse to fill in
the substitution. Otherwise, just use the superclass function.
@param number The number being formatted
@param toInsertInto The string to insert the result of this substitution
into
@param position The position of the rule text in toInsertInto | [
"If",
"this",
"is",
"a",
">",
";",
">",
";",
">",
";",
"substitution",
"use",
"ruleToUse",
"to",
"fill",
"in",
"the",
"substitution",
".",
"Otherwise",
"just",
"use",
"the",
"superclass",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L879-L892 |
33,234 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | ModulusSubstitution.doParse | public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// if this isn't a >>> substitution, we can just use the
// inherited parse() routine to do the parsing
if (ruleToUse == null) {
return... | java | public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// if this isn't a >>> substitution, we can just use the
// inherited parse() routine to do the parsing
if (ruleToUse == null) {
return... | [
"public",
"Number",
"doParse",
"(",
"String",
"text",
",",
"ParsePosition",
"parsePosition",
",",
"double",
"baseValue",
",",
"double",
"upperBound",
",",
"boolean",
"lenientParse",
")",
"{",
"// if this isn't a >>> substitution, we can just use the",
"// inherited parse() ... | If this is a >>> substitution, match only against ruleToUse.
Otherwise, use the superclass function.
@param text The string to parse
@param parsePosition Ignored on entry, updated on exit to point to
the first unmatched character.
@param baseValue The partial parse result prior to calling this
routine. | [
"If",
"this",
"is",
"a",
">",
";",
">",
";",
">",
";",
"substitution",
"match",
"only",
"against",
"ruleToUse",
".",
"Otherwise",
"use",
"the",
"superclass",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L951-L977 |
33,235 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | FractionalPartSubstitution.doSubstitution | public void doSubstitution(double number, StringBuilder toInsertInto, int position, int recursionCount) {
if (!byDigits) {
// if we're not in "byDigits" mode, just use the inherited
// doSubstitution() routine
super.doSubstitution(number, toInsertInto, position, recursionCoun... | java | public void doSubstitution(double number, StringBuilder toInsertInto, int position, int recursionCount) {
if (!byDigits) {
// if we're not in "byDigits" mode, just use the inherited
// doSubstitution() routine
super.doSubstitution(number, toInsertInto, position, recursionCoun... | [
"public",
"void",
"doSubstitution",
"(",
"double",
"number",
",",
"StringBuilder",
"toInsertInto",
",",
"int",
"position",
",",
"int",
"recursionCount",
")",
"{",
"if",
"(",
"!",
"byDigits",
")",
"{",
"// if we're not in \"byDigits\" mode, just use the inherited",
"//... | If in "by digits" mode, fills in the substitution one decimal digit
at a time using the rule set containing this substitution.
Otherwise, uses the superclass function.
@param number The number being formatted
@param toInsertInto The string to insert the result of formatting
the substitution into
@param position The pos... | [
"If",
"in",
"by",
"digits",
"mode",
"fills",
"in",
"the",
"substitution",
"one",
"decimal",
"digit",
"at",
"a",
"time",
"using",
"the",
"rule",
"set",
"containing",
"this",
"substitution",
".",
"Otherwise",
"uses",
"the",
"superclass",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L1174-L1211 |
33,236 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | FractionalPartSubstitution.doParse | public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// if we're not in byDigits mode, we can just use the inherited
// doParse()
if (!byDigits) {
return super.doParse(text, parsePosition,... | java | public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// if we're not in byDigits mode, we can just use the inherited
// doParse()
if (!byDigits) {
return super.doParse(text, parsePosition,... | [
"public",
"Number",
"doParse",
"(",
"String",
"text",
",",
"ParsePosition",
"parsePosition",
",",
"double",
"baseValue",
",",
"double",
"upperBound",
",",
"boolean",
"lenientParse",
")",
"{",
"// if we're not in byDigits mode, we can just use the inherited",
"// doParse()",... | If in "by digits" mode, parses the string as if it were a string
of individual digits; otherwise, uses the superclass function.
@param text The string to parse
@param parsePosition Ignored on entry, but updated on exit to point
to the first unmatched character
@param baseValue The partial parse result prior to entering... | [
"If",
"in",
"by",
"digits",
"mode",
"parses",
"the",
"string",
"as",
"if",
"it",
"were",
"a",
"string",
"of",
"individual",
"digits",
";",
"otherwise",
"uses",
"the",
"superclass",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L1252-L1296 |
33,237 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java | NumeratorSubstitution.doParse | public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// we don't have to do anything special to do the parsing here,
// but we have to turn lenient parsing off-- if we leave it on,
// it SERIOUSLY mes... | java | public Number doParse(String text, ParsePosition parsePosition, double baseValue,
double upperBound, boolean lenientParse) {
// we don't have to do anything special to do the parsing here,
// but we have to turn lenient parsing off-- if we leave it on,
// it SERIOUSLY mes... | [
"public",
"Number",
"doParse",
"(",
"String",
"text",
",",
"ParsePosition",
"parsePosition",
",",
"double",
"baseValue",
",",
"double",
"upperBound",
",",
"boolean",
"lenientParse",
")",
"{",
"// we don't have to do anything special to do the parsing here,",
"// but we have... | Dispatches to the inherited version of this function, but makes
sure that lenientParse is off. | [
"Dispatches",
"to",
"the",
"inherited",
"version",
"of",
"this",
"function",
"but",
"makes",
"sure",
"that",
"lenientParse",
"is",
"off",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L1559-L1618 |
33,238 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java | DTMAxisIteratorBase.cloneIterator | public DTMAxisIterator cloneIterator()
{
try
{
final DTMAxisIteratorBase clone = (DTMAxisIteratorBase) super.clone();
clone._isRestartable = false;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedException e)
{
throw new org.apache.xml.utils.Wrappe... | java | public DTMAxisIterator cloneIterator()
{
try
{
final DTMAxisIteratorBase clone = (DTMAxisIteratorBase) super.clone();
clone._isRestartable = false;
// return clone.reset();
return clone;
}
catch (CloneNotSupportedException e)
{
throw new org.apache.xml.utils.Wrappe... | [
"public",
"DTMAxisIterator",
"cloneIterator",
"(",
")",
"{",
"try",
"{",
"final",
"DTMAxisIteratorBase",
"clone",
"=",
"(",
"DTMAxisIteratorBase",
")",
"super",
".",
"clone",
"(",
")",
";",
"clone",
".",
"_isRestartable",
"=",
"false",
";",
"// return clone.rese... | Returns a deep copy of this iterator. Cloned iterators may not be
restartable. The iterator being cloned may or may not become
non-restartable as a side effect of this operation.
@return a deep copy of this iterator. | [
"Returns",
"a",
"deep",
"copy",
"of",
"this",
"iterator",
".",
"Cloned",
"iterators",
"may",
"not",
"be",
"restartable",
".",
"The",
"iterator",
"being",
"cloned",
"may",
"or",
"may",
"not",
"become",
"non",
"-",
"restartable",
"as",
"a",
"side",
"effect",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java#L175-L191 |
33,239 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java | DTMAxisIteratorBase.getNodeByPosition | public int getNodeByPosition(int position)
{
if (position > 0) {
final int pos = isReverse() ? getLast() - position + 1
: position;
int node;
while ((node = next()) != DTMAxisIterator.END) {
if (pos == getPosition()) {
return node;
}
... | java | public int getNodeByPosition(int position)
{
if (position > 0) {
final int pos = isReverse() ? getLast() - position + 1
: position;
int node;
while ((node = next()) != DTMAxisIterator.END) {
if (pos == getPosition()) {
return node;
}
... | [
"public",
"int",
"getNodeByPosition",
"(",
"int",
"position",
")",
"{",
"if",
"(",
"position",
">",
"0",
")",
"{",
"final",
"int",
"pos",
"=",
"isReverse",
"(",
")",
"?",
"getLast",
"(",
")",
"-",
"position",
"+",
"1",
":",
"position",
";",
"int",
... | Return the node at the given position.
@param position The position
@return The node at the given position. | [
"Return",
"the",
"node",
"at",
"the",
"given",
"position",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java#L266-L279 |
33,240 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.isPrivateInnerType | public static boolean isPrivateInnerType(TypeElement type) {
switch (type.getNestingKind()) {
case ANONYMOUS:
case LOCAL:
return true;
case MEMBER:
return isPrivate(type) || isPrivateInnerType((TypeElement) type.getEnclosingElement());
case TOP_LEVEL:
return isPrivate... | java | public static boolean isPrivateInnerType(TypeElement type) {
switch (type.getNestingKind()) {
case ANONYMOUS:
case LOCAL:
return true;
case MEMBER:
return isPrivate(type) || isPrivateInnerType((TypeElement) type.getEnclosingElement());
case TOP_LEVEL:
return isPrivate... | [
"public",
"static",
"boolean",
"isPrivateInnerType",
"(",
"TypeElement",
"type",
")",
"{",
"switch",
"(",
"type",
".",
"getNestingKind",
"(",
")",
")",
"{",
"case",
"ANONYMOUS",
":",
"case",
"LOCAL",
":",
"return",
"true",
";",
"case",
"MEMBER",
":",
"retu... | Tests if this type element is private to it's source file. A public type declared
within a private type is considered private. | [
"Tests",
"if",
"this",
"type",
"element",
"is",
"private",
"to",
"it",
"s",
"source",
"file",
".",
"A",
"public",
"type",
"declared",
"within",
"a",
"private",
"type",
"is",
"considered",
"private",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L312-L323 |
33,241 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.hasOuterContext | public static boolean hasOuterContext(TypeElement type) {
switch (type.getNestingKind()) {
case ANONYMOUS:
case LOCAL:
return !isStatic(type.getEnclosingElement());
case MEMBER:
return !isStatic(type);
case TOP_LEVEL:
return false;
}
throw new AssertionError("... | java | public static boolean hasOuterContext(TypeElement type) {
switch (type.getNestingKind()) {
case ANONYMOUS:
case LOCAL:
return !isStatic(type.getEnclosingElement());
case MEMBER:
return !isStatic(type);
case TOP_LEVEL:
return false;
}
throw new AssertionError("... | [
"public",
"static",
"boolean",
"hasOuterContext",
"(",
"TypeElement",
"type",
")",
"{",
"switch",
"(",
"type",
".",
"getNestingKind",
"(",
")",
")",
"{",
"case",
"ANONYMOUS",
":",
"case",
"LOCAL",
":",
"return",
"!",
"isStatic",
"(",
"type",
".",
"getEnclo... | Determines if a type element can access fields and methods from an outer class. | [
"Determines",
"if",
"a",
"type",
"element",
"can",
"access",
"fields",
"and",
"methods",
"from",
"an",
"outer",
"class",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L328-L339 |
33,242 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.parsePropertyAttribute | public static Set<String> parsePropertyAttribute(AnnotationMirror annotation) {
assert getName(annotation.getAnnotationType().asElement()).equals("Property");
String attributesStr = (String) getAnnotationValue(annotation, "value");
Set<String> attributes = new HashSet<>();
if (attributesStr != null) {
... | java | public static Set<String> parsePropertyAttribute(AnnotationMirror annotation) {
assert getName(annotation.getAnnotationType().asElement()).equals("Property");
String attributesStr = (String) getAnnotationValue(annotation, "value");
Set<String> attributes = new HashSet<>();
if (attributesStr != null) {
... | [
"public",
"static",
"Set",
"<",
"String",
">",
"parsePropertyAttribute",
"(",
"AnnotationMirror",
"annotation",
")",
"{",
"assert",
"getName",
"(",
"annotation",
".",
"getAnnotationType",
"(",
")",
".",
"asElement",
"(",
")",
")",
".",
"equals",
"(",
"\"Proper... | Returns the attributes of a Property annotation. | [
"Returns",
"the",
"attributes",
"of",
"a",
"Property",
"annotation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L416-L425 |
33,243 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.findGetterMethod | public static ExecutableElement findGetterMethod(
String propertyName, TypeMirror propertyType, TypeElement declaringClass, boolean isStatic) {
// Try Objective-C getter naming convention.
ExecutableElement getter = ElementUtil.findMethod(declaringClass, propertyName);
if (getter == null) {
// T... | java | public static ExecutableElement findGetterMethod(
String propertyName, TypeMirror propertyType, TypeElement declaringClass, boolean isStatic) {
// Try Objective-C getter naming convention.
ExecutableElement getter = ElementUtil.findMethod(declaringClass, propertyName);
if (getter == null) {
// T... | [
"public",
"static",
"ExecutableElement",
"findGetterMethod",
"(",
"String",
"propertyName",
",",
"TypeMirror",
"propertyType",
",",
"TypeElement",
"declaringClass",
",",
"boolean",
"isStatic",
")",
"{",
"// Try Objective-C getter naming convention.",
"ExecutableElement",
"get... | Locate method which matches either Java or Objective C getter name patterns. | [
"Locate",
"method",
"which",
"matches",
"either",
"Java",
"or",
"Objective",
"C",
"getter",
"name",
"patterns",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L482-L492 |
33,244 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.fromModifierSet | public static int fromModifierSet(Set<Modifier> set) {
int modifiers = 0;
if (set.contains(Modifier.PUBLIC)) {
modifiers |= java.lang.reflect.Modifier.PUBLIC;
}
if (set.contains(Modifier.PRIVATE)) {
modifiers |= java.lang.reflect.Modifier.PRIVATE;
}
if (set.contains(Modifier.PROTECTE... | java | public static int fromModifierSet(Set<Modifier> set) {
int modifiers = 0;
if (set.contains(Modifier.PUBLIC)) {
modifiers |= java.lang.reflect.Modifier.PUBLIC;
}
if (set.contains(Modifier.PRIVATE)) {
modifiers |= java.lang.reflect.Modifier.PRIVATE;
}
if (set.contains(Modifier.PROTECTE... | [
"public",
"static",
"int",
"fromModifierSet",
"(",
"Set",
"<",
"Modifier",
">",
"set",
")",
"{",
"int",
"modifiers",
"=",
"0",
";",
"if",
"(",
"set",
".",
"contains",
"(",
"Modifier",
".",
"PUBLIC",
")",
")",
"{",
"modifiers",
"|=",
"java",
".",
"lan... | This conversion is lossy because there is no bit for "default" the JVM spec. | [
"This",
"conversion",
"is",
"lossy",
"because",
"there",
"is",
"no",
"bit",
"for",
"default",
"the",
"JVM",
"spec",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L581-L617 |
33,245 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.hasNamedAnnotation | public static boolean hasNamedAnnotation(AnnotatedConstruct ac, String name) {
for (AnnotationMirror annotation : ac.getAnnotationMirrors()) {
if (getName(annotation.getAnnotationType().asElement()).equals(name)) {
return true;
}
}
return false;
} | java | public static boolean hasNamedAnnotation(AnnotatedConstruct ac, String name) {
for (AnnotationMirror annotation : ac.getAnnotationMirrors()) {
if (getName(annotation.getAnnotationType().asElement()).equals(name)) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"hasNamedAnnotation",
"(",
"AnnotatedConstruct",
"ac",
",",
"String",
"name",
")",
"{",
"for",
"(",
"AnnotationMirror",
"annotation",
":",
"ac",
".",
"getAnnotationMirrors",
"(",
")",
")",
"{",
"if",
"(",
"getName",
"(",
"annotat... | Less strict version of the above where we don't care about the annotation's package. | [
"Less",
"strict",
"version",
"of",
"the",
"above",
"where",
"we",
"don",
"t",
"care",
"about",
"the",
"annotation",
"s",
"package",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L662-L669 |
33,246 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.hasNamedAnnotation | public static boolean hasNamedAnnotation(AnnotatedConstruct ac, Pattern pattern) {
for (AnnotationMirror annotation : ac.getAnnotationMirrors()) {
if (pattern.matcher(getName(annotation.getAnnotationType().asElement())).matches()) {
return true;
}
}
return false;
} | java | public static boolean hasNamedAnnotation(AnnotatedConstruct ac, Pattern pattern) {
for (AnnotationMirror annotation : ac.getAnnotationMirrors()) {
if (pattern.matcher(getName(annotation.getAnnotationType().asElement())).matches()) {
return true;
}
}
return false;
} | [
"public",
"static",
"boolean",
"hasNamedAnnotation",
"(",
"AnnotatedConstruct",
"ac",
",",
"Pattern",
"pattern",
")",
"{",
"for",
"(",
"AnnotationMirror",
"annotation",
":",
"ac",
".",
"getAnnotationMirrors",
"(",
")",
")",
"{",
"if",
"(",
"pattern",
".",
"mat... | Similar to the above but matches against a pattern. | [
"Similar",
"to",
"the",
"above",
"but",
"matches",
"against",
"a",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L672-L679 |
33,247 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.getSortedAnnotationMembers | public static List<ExecutableElement> getSortedAnnotationMembers(TypeElement annotation) {
List<ExecutableElement> members = Lists.newArrayList(getMethods(annotation));
Collections.sort(members, (m1, m2) -> getName(m1).compareTo(getName(m2)));
return members;
} | java | public static List<ExecutableElement> getSortedAnnotationMembers(TypeElement annotation) {
List<ExecutableElement> members = Lists.newArrayList(getMethods(annotation));
Collections.sort(members, (m1, m2) -> getName(m1).compareTo(getName(m2)));
return members;
} | [
"public",
"static",
"List",
"<",
"ExecutableElement",
">",
"getSortedAnnotationMembers",
"(",
"TypeElement",
"annotation",
")",
"{",
"List",
"<",
"ExecutableElement",
">",
"members",
"=",
"Lists",
".",
"newArrayList",
"(",
"getMethods",
"(",
"annotation",
")",
")"... | Returns an alphabetically sorted list of an annotation type's members.
This is necessary since an annotation's values can be specified in any
order, but the annotation's constructor needs to be invoked using its
declaration order. | [
"Returns",
"an",
"alphabetically",
"sorted",
"list",
"of",
"an",
"annotation",
"type",
"s",
"members",
".",
"This",
"is",
"necessary",
"since",
"an",
"annotation",
"s",
"values",
"can",
"be",
"specified",
"in",
"any",
"order",
"but",
"the",
"annotation",
"s"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L749-L753 |
33,248 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.suppressesWarning | @SuppressWarnings("unchecked")
public static boolean suppressesWarning(String warning, Element element) {
if (element == null || isPackage(element)) {
return false;
}
AnnotationMirror annotation = getAnnotation(element, SuppressWarnings.class);
if (annotation != null) {
for (AnnotationValu... | java | @SuppressWarnings("unchecked")
public static boolean suppressesWarning(String warning, Element element) {
if (element == null || isPackage(element)) {
return false;
}
AnnotationMirror annotation = getAnnotation(element, SuppressWarnings.class);
if (annotation != null) {
for (AnnotationValu... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"boolean",
"suppressesWarning",
"(",
"String",
"warning",
",",
"Element",
"element",
")",
"{",
"if",
"(",
"element",
"==",
"null",
"||",
"isPackage",
"(",
"element",
")",
")",
"{",
"retu... | Returns true if there's a SuppressedWarning annotation with the specified warning.
The SuppressWarnings annotation can be inherited from the owning method or class,
but does not have package scope. | [
"Returns",
"true",
"if",
"there",
"s",
"a",
"SuppressedWarning",
"annotation",
"with",
"the",
"specified",
"warning",
".",
"The",
"SuppressWarnings",
"annotation",
"can",
"be",
"inherited",
"from",
"the",
"owning",
"method",
"or",
"class",
"but",
"does",
"not",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L769-L784 |
33,249 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.getType | public TypeMirror getType(Element element) {
return elementTypeMap.containsKey(element) ? elementTypeMap.get(element) : element.asType();
} | java | public TypeMirror getType(Element element) {
return elementTypeMap.containsKey(element) ? elementTypeMap.get(element) : element.asType();
} | [
"public",
"TypeMirror",
"getType",
"(",
"Element",
"element",
")",
"{",
"return",
"elementTypeMap",
".",
"containsKey",
"(",
"element",
")",
"?",
"elementTypeMap",
".",
"get",
"(",
"element",
")",
":",
"element",
".",
"asType",
"(",
")",
";",
"}"
] | Returns the associated type mirror for an element. | [
"Returns",
"the",
"associated",
"type",
"mirror",
"for",
"an",
"element",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L799-L801 |
33,250 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.isNonnull | public static boolean isNonnull(Element element, boolean parametersNonnullByDefault) {
return hasNonnullAnnotation(element)
|| isConstructor(element) // Java constructors are always non-null.
|| (isParameter(element)
&& parametersNonnullByDefault
&& !((VariableElement) eleme... | java | public static boolean isNonnull(Element element, boolean parametersNonnullByDefault) {
return hasNonnullAnnotation(element)
|| isConstructor(element) // Java constructors are always non-null.
|| (isParameter(element)
&& parametersNonnullByDefault
&& !((VariableElement) eleme... | [
"public",
"static",
"boolean",
"isNonnull",
"(",
"Element",
"element",
",",
"boolean",
"parametersNonnullByDefault",
")",
"{",
"return",
"hasNonnullAnnotation",
"(",
"element",
")",
"||",
"isConstructor",
"(",
"element",
")",
"// Java constructors are always non-null.",
... | Returns whether an element is marked as always being non-null. Field, method,
and parameter elements can be defined as non-null with a Nonnull annotation.
Method parameters can also be defined as non-null by annotating the owning
package or type element with the ParametersNonnullByDefault annotation. | [
"Returns",
"whether",
"an",
"element",
"is",
"marked",
"as",
"always",
"being",
"non",
"-",
"null",
".",
"Field",
"method",
"and",
"parameter",
"elements",
"can",
"be",
"defined",
"as",
"non",
"-",
"null",
"with",
"a",
"Nonnull",
"annotation",
".",
"Method... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L809-L815 |
33,251 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java | ElementUtil.getSourceFile | public static String getSourceFile(TypeElement type) {
if (type instanceof ClassSymbol) {
JavaFileObject srcFile = ((ClassSymbol) type).sourcefile;
if (srcFile != null) {
return srcFile.getName();
}
}
return null;
} | java | public static String getSourceFile(TypeElement type) {
if (type instanceof ClassSymbol) {
JavaFileObject srcFile = ((ClassSymbol) type).sourcefile;
if (srcFile != null) {
return srcFile.getName();
}
}
return null;
} | [
"public",
"static",
"String",
"getSourceFile",
"(",
"TypeElement",
"type",
")",
"{",
"if",
"(",
"type",
"instanceof",
"ClassSymbol",
")",
"{",
"JavaFileObject",
"srcFile",
"=",
"(",
"(",
"ClassSymbol",
")",
"type",
")",
".",
"sourcefile",
";",
"if",
"(",
"... | Returns the source file name for a type element. Returns null if the element
isn't a javac ClassSymbol, or if it is defined by a classfile which was compiled
without a source attribute. | [
"Returns",
"the",
"source",
"file",
"name",
"for",
"a",
"type",
"element",
".",
"Returns",
"null",
"if",
"the",
"element",
"isn",
"t",
"a",
"javac",
"ClassSymbol",
"or",
"if",
"it",
"is",
"defined",
"by",
"a",
"classfile",
"which",
"was",
"compiled",
"wi... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L822-L830 |
33,252 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/SystemIDResolver.java | SystemIDResolver.isAbsolutePath | public static boolean isAbsolutePath(String systemId)
{
if(systemId == null)
return false;
final File file = new File(systemId);
return file.isAbsolute();
} | java | public static boolean isAbsolutePath(String systemId)
{
if(systemId == null)
return false;
final File file = new File(systemId);
return file.isAbsolute();
} | [
"public",
"static",
"boolean",
"isAbsolutePath",
"(",
"String",
"systemId",
")",
"{",
"if",
"(",
"systemId",
"==",
"null",
")",
"return",
"false",
";",
"final",
"File",
"file",
"=",
"new",
"File",
"(",
"systemId",
")",
";",
"return",
"file",
".",
"isAbso... | Return true if the local path is an absolute path.
@param systemId The path string
@return true if the path is absolute | [
"Return",
"true",
"if",
"the",
"local",
"path",
"is",
"an",
"absolute",
"path",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/SystemIDResolver.java#L148-L155 |
33,253 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/SystemIDResolver.java | SystemIDResolver.replaceChars | private static String replaceChars(String str)
{
StringBuffer buf = new StringBuffer(str);
int length = buf.length();
for (int i = 0; i < length; i++)
{
char currentChar = buf.charAt(i);
// Replace space with "%20"
if (currentChar == ' ')
{
buf.setCharAt(i, '%');
... | java | private static String replaceChars(String str)
{
StringBuffer buf = new StringBuffer(str);
int length = buf.length();
for (int i = 0; i < length; i++)
{
char currentChar = buf.charAt(i);
// Replace space with "%20"
if (currentChar == ' ')
{
buf.setCharAt(i, '%');
... | [
"private",
"static",
"String",
"replaceChars",
"(",
"String",
"str",
")",
"{",
"StringBuffer",
"buf",
"=",
"new",
"StringBuffer",
"(",
"str",
")",
";",
"int",
"length",
"=",
"buf",
".",
"length",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
... | Replace spaces with "%20" and backslashes with forward slashes in
the input string to generate a well-formed URI string.
@param str The input string
@return The string after conversion | [
"Replace",
"spaces",
"with",
"%20",
"and",
"backslashes",
"with",
"forward",
"slashes",
"in",
"the",
"input",
"string",
"to",
"generate",
"a",
"well",
"-",
"formed",
"URI",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/SystemIDResolver.java#L183-L206 |
33,254 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.newList | public static ProviderList newList(Provider ... providers) {
ProviderConfig[] configs = new ProviderConfig[providers.length];
for (int i = 0; i < providers.length; i++) {
configs[i] = new ProviderConfig(providers[i]);
}
return new ProviderList(configs, true);
} | java | public static ProviderList newList(Provider ... providers) {
ProviderConfig[] configs = new ProviderConfig[providers.length];
for (int i = 0; i < providers.length; i++) {
configs[i] = new ProviderConfig(providers[i]);
}
return new ProviderList(configs, true);
} | [
"public",
"static",
"ProviderList",
"newList",
"(",
"Provider",
"...",
"providers",
")",
"{",
"ProviderConfig",
"[",
"]",
"configs",
"=",
"new",
"ProviderConfig",
"[",
"providers",
".",
"length",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",... | This method is for use by SunJSSE. | [
"This",
"method",
"is",
"for",
"use",
"by",
"SunJSSE",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L134-L140 |
33,255 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getJarList | ProviderList getJarList(String[] jarClassNames) {
List<ProviderConfig> newConfigs = new ArrayList<>();
for (String className : jarClassNames) {
ProviderConfig newConfig = new ProviderConfig(className);
for (ProviderConfig config : configs) {
// if the equivalent o... | java | ProviderList getJarList(String[] jarClassNames) {
List<ProviderConfig> newConfigs = new ArrayList<>();
for (String className : jarClassNames) {
ProviderConfig newConfig = new ProviderConfig(className);
for (ProviderConfig config : configs) {
// if the equivalent o... | [
"ProviderList",
"getJarList",
"(",
"String",
"[",
"]",
"jarClassNames",
")",
"{",
"List",
"<",
"ProviderConfig",
">",
"newConfigs",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"String",
"className",
":",
"jarClassNames",
")",
"{",
"ProviderConf... | Construct a special ProviderList for JAR verification. It consists
of the providers specified via jarClassNames, which must be on the
bootclasspath and cannot be in signed JAR files. This is to avoid
possible recursion and deadlock during verification. | [
"Construct",
"a",
"special",
"ProviderList",
"for",
"JAR",
"verification",
".",
"It",
"consists",
"of",
"the",
"providers",
"specified",
"via",
"jarClassNames",
"which",
"must",
"be",
"on",
"the",
"bootclasspath",
"and",
"cannot",
"be",
"in",
"signed",
"JAR",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L209-L228 |
33,256 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getProvider | Provider getProvider(int index) {
Provider p = configs[index].getProvider();
return (p != null) ? p : EMPTY_PROVIDER;
} | java | Provider getProvider(int index) {
Provider p = configs[index].getProvider();
return (p != null) ? p : EMPTY_PROVIDER;
} | [
"Provider",
"getProvider",
"(",
"int",
"index",
")",
"{",
"Provider",
"p",
"=",
"configs",
"[",
"index",
"]",
".",
"getProvider",
"(",
")",
";",
"return",
"(",
"p",
"!=",
"null",
")",
"?",
"p",
":",
"EMPTY_PROVIDER",
";",
"}"
] | Return the Provider at the specified index. Returns EMPTY_PROVIDER
if the provider could not be loaded at this time. | [
"Return",
"the",
"Provider",
"at",
"the",
"specified",
"index",
".",
"Returns",
"EMPTY_PROVIDER",
"if",
"the",
"provider",
"could",
"not",
"be",
"loaded",
"at",
"this",
"time",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L238-L241 |
33,257 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getProvider | public Provider getProvider(String name) {
ProviderConfig config = getProviderConfig(name);
return (config == null) ? null : config.getProvider();
} | java | public Provider getProvider(String name) {
ProviderConfig config = getProviderConfig(name);
return (config == null) ? null : config.getProvider();
} | [
"public",
"Provider",
"getProvider",
"(",
"String",
"name",
")",
"{",
"ProviderConfig",
"config",
"=",
"getProviderConfig",
"(",
"name",
")",
";",
"return",
"(",
"config",
"==",
"null",
")",
"?",
"null",
":",
"config",
".",
"getProvider",
"(",
")",
";",
... | return the Provider with the specified name or null | [
"return",
"the",
"Provider",
"with",
"the",
"specified",
"name",
"or",
"null"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L258-L261 |
33,258 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getIndex | public int getIndex(String name) {
for (int i = 0; i < configs.length; i++) {
Provider p = getProvider(i);
if (p.getName().equals(name)) {
return i;
}
}
return -1;
} | java | public int getIndex(String name) {
for (int i = 0; i < configs.length; i++) {
Provider p = getProvider(i);
if (p.getName().equals(name)) {
return i;
}
}
return -1;
} | [
"public",
"int",
"getIndex",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"configs",
".",
"length",
";",
"i",
"++",
")",
"{",
"Provider",
"p",
"=",
"getProvider",
"(",
"i",
")",
";",
"if",
"(",
"p",
".",
"... | Return the index at which the provider with the specified name is
installed or -1 if it is not present in this ProviderList. | [
"Return",
"the",
"index",
"at",
"which",
"the",
"provider",
"with",
"the",
"specified",
"name",
"is",
"installed",
"or",
"-",
"1",
"if",
"it",
"is",
"not",
"present",
"in",
"this",
"ProviderList",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L267-L275 |
33,259 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.loadAll | private int loadAll() {
if (allLoaded) {
return configs.length;
}
if (debug != null) {
debug.println("Loading all providers");
new Exception("Call trace").printStackTrace();
}
int n = 0;
for (int i = 0; i < configs.length; i++) {
... | java | private int loadAll() {
if (allLoaded) {
return configs.length;
}
if (debug != null) {
debug.println("Loading all providers");
new Exception("Call trace").printStackTrace();
}
int n = 0;
for (int i = 0; i < configs.length; i++) {
... | [
"private",
"int",
"loadAll",
"(",
")",
"{",
"if",
"(",
"allLoaded",
")",
"{",
"return",
"configs",
".",
"length",
";",
"}",
"if",
"(",
"debug",
"!=",
"null",
")",
"{",
"debug",
".",
"println",
"(",
"\"Loading all providers\"",
")",
";",
"new",
"Excepti... | attempt to load all Providers not already loaded | [
"attempt",
"to",
"load",
"all",
"Providers",
"not",
"already",
"loaded"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L278-L297 |
33,260 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.removeInvalid | ProviderList removeInvalid() {
int n = loadAll();
if (n == configs.length) {
return this;
}
ProviderConfig[] newConfigs = new ProviderConfig[n];
for (int i = 0, j = 0; i < configs.length; i++) {
ProviderConfig config = configs[i];
if (config.is... | java | ProviderList removeInvalid() {
int n = loadAll();
if (n == configs.length) {
return this;
}
ProviderConfig[] newConfigs = new ProviderConfig[n];
for (int i = 0, j = 0; i < configs.length; i++) {
ProviderConfig config = configs[i];
if (config.is... | [
"ProviderList",
"removeInvalid",
"(",
")",
"{",
"int",
"n",
"=",
"loadAll",
"(",
")",
";",
"if",
"(",
"n",
"==",
"configs",
".",
"length",
")",
"{",
"return",
"this",
";",
"}",
"ProviderConfig",
"[",
"]",
"newConfigs",
"=",
"new",
"ProviderConfig",
"["... | Try to load all Providers and return the ProviderList. If one or
more Providers could not be loaded, a new ProviderList with those
entries removed is returned. Otherwise, the method returns this. | [
"Try",
"to",
"load",
"all",
"Providers",
"and",
"return",
"the",
"ProviderList",
".",
"If",
"one",
"or",
"more",
"Providers",
"could",
"not",
"be",
"loaded",
"a",
"new",
"ProviderList",
"with",
"those",
"entries",
"removed",
"is",
"returned",
".",
"Otherwise... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L304-L317 |
33,261 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getService | public Service getService(String type, String name) {
for (int i = 0; i < configs.length; i++) {
Provider p = getProvider(i);
Service s = p.getService(type, name);
if (s != null) {
return s;
}
}
return null;
} | java | public Service getService(String type, String name) {
for (int i = 0; i < configs.length; i++) {
Provider p = getProvider(i);
Service s = p.getService(type, name);
if (s != null) {
return s;
}
}
return null;
} | [
"public",
"Service",
"getService",
"(",
"String",
"type",
",",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"configs",
".",
"length",
";",
"i",
"++",
")",
"{",
"Provider",
"p",
"=",
"getProvider",
"(",
"i",
")",
";... | Return a Service describing an implementation of the specified
algorithm from the Provider with the highest precedence that
supports that algorithm. Return null if no Provider supports this
algorithm. | [
"Return",
"a",
"Service",
"describing",
"an",
"implementation",
"of",
"the",
"specified",
"algorithm",
"from",
"the",
"Provider",
"with",
"the",
"highest",
"precedence",
"that",
"supports",
"that",
"algorithm",
".",
"Return",
"null",
"if",
"no",
"Provider",
"sup... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L335-L344 |
33,262 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getServices | public List<Service> getServices(String type, String algorithm) {
return new ServiceList(type, algorithm);
} | java | public List<Service> getServices(String type, String algorithm) {
return new ServiceList(type, algorithm);
} | [
"public",
"List",
"<",
"Service",
">",
"getServices",
"(",
"String",
"type",
",",
"String",
"algorithm",
")",
"{",
"return",
"new",
"ServiceList",
"(",
"type",
",",
"algorithm",
")",
";",
"}"
] | Return a List containing all the Services describing implementations
of the specified algorithms in precedence order. If no implementation
exists, this method returns an empty List.
The elements of this list are determined lazily on demand.
The List returned is NOT thread safe. | [
"Return",
"a",
"List",
"containing",
"all",
"the",
"Services",
"describing",
"implementations",
"of",
"the",
"specified",
"algorithms",
"in",
"precedence",
"order",
".",
"If",
"no",
"implementation",
"exists",
"this",
"method",
"returns",
"an",
"empty",
"List",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L355-L357 |
33,263 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Formatter.java | Formatter.format | public Formatter format(String format, Object ... args) {
return format(l, format, args);
} | java | public Formatter format(String format, Object ... args) {
return format(l, format, args);
} | [
"public",
"Formatter",
"format",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"format",
"(",
"l",
",",
"format",
",",
"args",
")",
";",
"}"
] | Writes a formatted string to this object's destination using the
specified format string and arguments. The locale used is the one
defined during the construction of this formatter.
@param format
A format string as described in <a href="#syntax">Format string
syntax</a>.
@param args
Arguments referenced by the for... | [
"Writes",
"a",
"formatted",
"string",
"to",
"this",
"object",
"s",
"destination",
"using",
"the",
"specified",
"format",
"string",
"and",
"arguments",
".",
"The",
"locale",
"used",
"is",
"the",
"one",
"defined",
"during",
"the",
"construction",
"of",
"this",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Formatter.java#L2450-L2452 |
33,264 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Formatter.java | Formatter.format | public Formatter format(Locale l, String format, Object ... args) {
ensureOpen();
// index of last argument referenced
int last = -1;
// last ordinary index
int lasto = -1;
FormatString[] fsa = parse(format);
for (int i = 0; i < fsa.length; i++) {
Fo... | java | public Formatter format(Locale l, String format, Object ... args) {
ensureOpen();
// index of last argument referenced
int last = -1;
// last ordinary index
int lasto = -1;
FormatString[] fsa = parse(format);
for (int i = 0; i < fsa.length; i++) {
Fo... | [
"public",
"Formatter",
"format",
"(",
"Locale",
"l",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"ensureOpen",
"(",
")",
";",
"// index of last argument referenced",
"int",
"last",
"=",
"-",
"1",
";",
"// last ordinary index",
"int",
"last... | Writes a formatted string to this object's destination using the
specified locale, format string, and arguments.
@param l
The {@linkplain java.util.Locale locale} to apply during
formatting. If {@code l} is {@code null} then no localization
is applied. This does not change this object's locale that was
set during c... | [
"Writes",
"a",
"formatted",
"string",
"to",
"this",
"object",
"s",
"destination",
"using",
"the",
"specified",
"locale",
"format",
"string",
"and",
"arguments",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Formatter.java#L2489-L2530 |
33,265 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Formatter.java | Formatter.parse | private FormatString[] parse(String s) {
ArrayList<FormatString> al = new ArrayList<>();
for (int i = 0, len = s.length(); i < len; ) {
int nextPercent = s.indexOf('%', i);
if (s.charAt(i) != '%') {
// This is plain-text part, find the maximal plain-text
... | java | private FormatString[] parse(String s) {
ArrayList<FormatString> al = new ArrayList<>();
for (int i = 0, len = s.length(); i < len; ) {
int nextPercent = s.indexOf('%', i);
if (s.charAt(i) != '%') {
// This is plain-text part, find the maximal plain-text
... | [
"private",
"FormatString",
"[",
"]",
"parse",
"(",
"String",
"s",
")",
"{",
"ArrayList",
"<",
"FormatString",
">",
"al",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"len",
"=",
"s",
".",
"length",
"(",
")"... | Finds format specifiers in the format string. | [
"Finds",
"format",
"specifiers",
"in",
"the",
"format",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Formatter.java#L2536-L2556 |
33,266 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.failsChecks | public boolean failsChecks(String text, CheckResult checkResult) {
int length = text.length();
int result = 0;
if (checkResult != null) {
checkResult.position = 0;
checkResult.numerics = null;
checkResult.restrictionLevel = null;
}
if (0 != (... | java | public boolean failsChecks(String text, CheckResult checkResult) {
int length = text.length();
int result = 0;
if (checkResult != null) {
checkResult.position = 0;
checkResult.numerics = null;
checkResult.restrictionLevel = null;
}
if (0 != (... | [
"public",
"boolean",
"failsChecks",
"(",
"String",
"text",
",",
"CheckResult",
"checkResult",
")",
"{",
"int",
"length",
"=",
"text",
".",
"length",
"(",
")",
";",
"int",
"result",
"=",
"0",
";",
"if",
"(",
"checkResult",
"!=",
"null",
")",
"{",
"check... | Check the specified string for possible security issues. The text to be checked will typically be an identifier
of some sort. The set of checks to be performed was specified when building the SpoofChecker.
@param text
A String to be checked for possible security issues.
@param checkResult
Output parameter, indicates w... | [
"Check",
"the",
"specified",
"string",
"for",
"possible",
"security",
"issues",
".",
"The",
"text",
"to",
"be",
"checked",
"will",
"typically",
"be",
"an",
"identifier",
"of",
"some",
"sort",
".",
"The",
"set",
"of",
"checks",
"to",
"be",
"performed",
"was... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1223-L1312 |
33,267 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.areConfusable | public int areConfusable(String s1, String s2) {
//
// See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable,
// and for definitions of the types (single, whole, mixed-script) of confusables.
// We only care about a few of the check flags. Ignore the ... | java | public int areConfusable(String s1, String s2) {
//
// See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable,
// and for definitions of the types (single, whole, mixed-script) of confusables.
// We only care about a few of the check flags. Ignore the ... | [
"public",
"int",
"areConfusable",
"(",
"String",
"s1",
",",
"String",
"s2",
")",
"{",
"//",
"// See section 4 of UAX 39 for the algorithm for checking whether two strings are confusable,",
"// and for definitions of the types (single, whole, mixed-script) of confusables.",
"// We only ca... | Check the whether two specified strings are visually confusable. The types of confusability to be tested - single
script, mixed script, or whole script - are determined by the check options set for the SpoofChecker.
The tests to be performed are controlled by the flags SINGLE_SCRIPT_CONFUSABLE MIXED_SCRIPT_CONFUSABLE
... | [
"Check",
"the",
"whether",
"two",
"specified",
"strings",
"are",
"visually",
"confusable",
".",
"The",
"types",
"of",
"confusability",
"to",
"be",
"tested",
"-",
"single",
"script",
"mixed",
"script",
"or",
"whole",
"script",
"-",
"are",
"determined",
"by",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1344-L1387 |
33,268 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getSkeleton | public String getSkeleton(CharSequence str) {
// Apply the skeleton mapping to the NFD normalized input string
// Accumulate the skeleton, possibly unnormalized, in a String.
String nfdId = nfdNormalizer.normalize(str);
int normalizedLen = nfdId.length();
StringBuilder skelSB = n... | java | public String getSkeleton(CharSequence str) {
// Apply the skeleton mapping to the NFD normalized input string
// Accumulate the skeleton, possibly unnormalized, in a String.
String nfdId = nfdNormalizer.normalize(str);
int normalizedLen = nfdId.length();
StringBuilder skelSB = n... | [
"public",
"String",
"getSkeleton",
"(",
"CharSequence",
"str",
")",
"{",
"// Apply the skeleton mapping to the NFD normalized input string",
"// Accumulate the skeleton, possibly unnormalized, in a String.",
"String",
"nfdId",
"=",
"nfdNormalizer",
".",
"normalize",
"(",
"str",
"... | Get the "skeleton" for an identifier string. Skeletons are a transformation of the input string; Two strings are
confusable if their skeletons are identical. See Unicode UAX 39 for additional information.
Using skeletons directly makes it possible to quickly check whether an identifier is confusable with any of some
l... | [
"Get",
"the",
"skeleton",
"for",
"an",
"identifier",
"string",
".",
"Skeletons",
"are",
"a",
"transformation",
"of",
"the",
"input",
"string",
";",
"Two",
"strings",
"are",
"confusable",
"if",
"their",
"skeletons",
"are",
"identical",
".",
"See",
"Unicode",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1404-L1418 |
33,269 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getAugmentedScriptSet | private static void getAugmentedScriptSet(int codePoint, ScriptSet result) {
result.clear();
UScript.getScriptExtensions(codePoint, result);
// Section 5.1 step 1
if (result.get(UScript.HAN)) {
result.set(UScript.HAN_WITH_BOPOMOFO);
result.set(UScript.JAPANESE);
... | java | private static void getAugmentedScriptSet(int codePoint, ScriptSet result) {
result.clear();
UScript.getScriptExtensions(codePoint, result);
// Section 5.1 step 1
if (result.get(UScript.HAN)) {
result.set(UScript.HAN_WITH_BOPOMOFO);
result.set(UScript.JAPANESE);
... | [
"private",
"static",
"void",
"getAugmentedScriptSet",
"(",
"int",
"codePoint",
",",
"ScriptSet",
"result",
")",
"{",
"result",
".",
"clear",
"(",
")",
";",
"UScript",
".",
"getScriptExtensions",
"(",
"codePoint",
",",
"result",
")",
";",
"// Section 5.1 step 1",... | Computes the augmented script set for a code point, according to UTS 39 section 5.1. | [
"Computes",
"the",
"augmented",
"script",
"set",
"for",
"a",
"code",
"point",
"according",
"to",
"UTS",
"39",
"section",
"5",
".",
"1",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1487-L1514 |
33,270 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getResolvedScriptSet | private void getResolvedScriptSet(CharSequence input, ScriptSet result) {
getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result);
} | java | private void getResolvedScriptSet(CharSequence input, ScriptSet result) {
getResolvedScriptSetWithout(input, UScript.CODE_LIMIT, result);
} | [
"private",
"void",
"getResolvedScriptSet",
"(",
"CharSequence",
"input",
",",
"ScriptSet",
"result",
")",
"{",
"getResolvedScriptSetWithout",
"(",
"input",
",",
"UScript",
".",
"CODE_LIMIT",
",",
"result",
")",
";",
"}"
] | Computes the resolved script set for a string, according to UTS 39 section 5.1. | [
"Computes",
"the",
"resolved",
"script",
"set",
"for",
"a",
"string",
"according",
"to",
"UTS",
"39",
"section",
"5",
".",
"1",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1519-L1521 |
33,271 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getResolvedScriptSetWithout | private void getResolvedScriptSetWithout(CharSequence input, int script, ScriptSet result) {
result.setAll();
ScriptSet temp = new ScriptSet();
for (int utf16Offset = 0; utf16Offset < input.length();) {
int codePoint = Character.codePointAt(input, utf16Offset);
utf16Offs... | java | private void getResolvedScriptSetWithout(CharSequence input, int script, ScriptSet result) {
result.setAll();
ScriptSet temp = new ScriptSet();
for (int utf16Offset = 0; utf16Offset < input.length();) {
int codePoint = Character.codePointAt(input, utf16Offset);
utf16Offs... | [
"private",
"void",
"getResolvedScriptSetWithout",
"(",
"CharSequence",
"input",
",",
"int",
"script",
",",
"ScriptSet",
"result",
")",
"{",
"result",
".",
"setAll",
"(",
")",
";",
"ScriptSet",
"temp",
"=",
"new",
"ScriptSet",
"(",
")",
";",
"for",
"(",
"in... | Computes the resolved script set for a string, omitting characters having the specified script. If
UScript.CODE_LIMIT is passed as the second argument, all characters are included. | [
"Computes",
"the",
"resolved",
"script",
"set",
"for",
"a",
"string",
"omitting",
"characters",
"having",
"the",
"specified",
"script",
".",
"If",
"UScript",
".",
"CODE_LIMIT",
"is",
"passed",
"as",
"the",
"second",
"argument",
"all",
"characters",
"are",
"inc... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1527-L1544 |
33,272 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getNumerics | private void getNumerics(String input, UnicodeSet result) {
result.clear();
for (int utf16Offset = 0; utf16Offset < input.length();) {
int codePoint = Character.codePointAt(input, utf16Offset);
utf16Offset += Character.charCount(codePoint);
// Store a representative... | java | private void getNumerics(String input, UnicodeSet result) {
result.clear();
for (int utf16Offset = 0; utf16Offset < input.length();) {
int codePoint = Character.codePointAt(input, utf16Offset);
utf16Offset += Character.charCount(codePoint);
// Store a representative... | [
"private",
"void",
"getNumerics",
"(",
"String",
"input",
",",
"UnicodeSet",
"result",
")",
"{",
"result",
".",
"clear",
"(",
")",
";",
"for",
"(",
"int",
"utf16Offset",
"=",
"0",
";",
"utf16Offset",
"<",
"input",
".",
"length",
"(",
")",
";",
")",
"... | Computes the set of numerics for a string, according to UTS 39 section 5.3. | [
"Computes",
"the",
"set",
"of",
"numerics",
"for",
"a",
"string",
"according",
"to",
"UTS",
"39",
"section",
"5",
".",
"3",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1549-L1563 |
33,273 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java | SpoofChecker.getRestrictionLevel | private RestrictionLevel getRestrictionLevel(String input) {
// Section 5.2 step 1:
if (!fAllowedCharsSet.containsAll(input)) {
return RestrictionLevel.UNRESTRICTIVE;
}
// Section 5.2 step 2:
if (ASCII.containsAll(input)) {
return RestrictionLevel.ASCII;
... | java | private RestrictionLevel getRestrictionLevel(String input) {
// Section 5.2 step 1:
if (!fAllowedCharsSet.containsAll(input)) {
return RestrictionLevel.UNRESTRICTIVE;
}
// Section 5.2 step 2:
if (ASCII.containsAll(input)) {
return RestrictionLevel.ASCII;
... | [
"private",
"RestrictionLevel",
"getRestrictionLevel",
"(",
"String",
"input",
")",
"{",
"// Section 5.2 step 1:",
"if",
"(",
"!",
"fAllowedCharsSet",
".",
"containsAll",
"(",
"input",
")",
")",
"{",
"return",
"RestrictionLevel",
".",
"UNRESTRICTIVE",
";",
"}",
"//... | Computes the restriction level of a string, according to UTS 39 section 5.2. | [
"Computes",
"the",
"restriction",
"level",
"of",
"a",
"string",
"according",
"to",
"UTS",
"39",
"section",
"5",
".",
"2",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/SpoofChecker.java#L1568-L1606 |
33,274 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java | IndexedCollectionCertStore.buildIndex | private void buildIndex(Collection<?> coll) {
certSubjects = new HashMap<X500Principal, Object>();
crlIssuers = new HashMap<X500Principal, Object>();
otherCertificates = null;
otherCRLs = null;
for (Object obj : coll) {
if (obj instanceof X509Certificate) {
... | java | private void buildIndex(Collection<?> coll) {
certSubjects = new HashMap<X500Principal, Object>();
crlIssuers = new HashMap<X500Principal, Object>();
otherCertificates = null;
otherCRLs = null;
for (Object obj : coll) {
if (obj instanceof X509Certificate) {
... | [
"private",
"void",
"buildIndex",
"(",
"Collection",
"<",
"?",
">",
"coll",
")",
"{",
"certSubjects",
"=",
"new",
"HashMap",
"<",
"X500Principal",
",",
"Object",
">",
"(",
")",
";",
"crlIssuers",
"=",
"new",
"HashMap",
"<",
"X500Principal",
",",
"Object",
... | Index the specified Collection copying all references to Certificates
and CRLs. | [
"Index",
"the",
"specified",
"Collection",
"copying",
"all",
"references",
"to",
"Certificates",
"and",
"CRLs",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java#L140-L170 |
33,275 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java | IndexedCollectionCertStore.indexCertificate | private void indexCertificate(X509Certificate cert) {
X500Principal subject = cert.getSubjectX500Principal();
Object oldEntry = certSubjects.put(subject, cert);
if (oldEntry != null) { // assume this is unlikely
if (oldEntry instanceof X509Certificate) {
if (cert.equa... | java | private void indexCertificate(X509Certificate cert) {
X500Principal subject = cert.getSubjectX500Principal();
Object oldEntry = certSubjects.put(subject, cert);
if (oldEntry != null) { // assume this is unlikely
if (oldEntry instanceof X509Certificate) {
if (cert.equa... | [
"private",
"void",
"indexCertificate",
"(",
"X509Certificate",
"cert",
")",
"{",
"X500Principal",
"subject",
"=",
"cert",
".",
"getSubjectX500Principal",
"(",
")",
";",
"Object",
"oldEntry",
"=",
"certSubjects",
".",
"put",
"(",
"subject",
",",
"cert",
")",
";... | Add an X509Certificate to the index. | [
"Add",
"an",
"X509Certificate",
"to",
"the",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java#L175-L196 |
33,276 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java | IndexedCollectionCertStore.indexCRL | private void indexCRL(X509CRL crl) {
X500Principal issuer = crl.getIssuerX500Principal();
Object oldEntry = crlIssuers.put(issuer, crl);
if (oldEntry != null) { // assume this is unlikely
if (oldEntry instanceof X509CRL) {
if (crl.equals(oldEntry)) {
... | java | private void indexCRL(X509CRL crl) {
X500Principal issuer = crl.getIssuerX500Principal();
Object oldEntry = crlIssuers.put(issuer, crl);
if (oldEntry != null) { // assume this is unlikely
if (oldEntry instanceof X509CRL) {
if (crl.equals(oldEntry)) {
... | [
"private",
"void",
"indexCRL",
"(",
"X509CRL",
"crl",
")",
"{",
"X500Principal",
"issuer",
"=",
"crl",
".",
"getIssuerX500Principal",
"(",
")",
";",
"Object",
"oldEntry",
"=",
"crlIssuers",
".",
"put",
"(",
"issuer",
",",
"crl",
")",
";",
"if",
"(",
"old... | Add an X509CRL to the index. | [
"Add",
"an",
"X509CRL",
"to",
"the",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java#L201-L223 |
33,277 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java | IndexedCollectionCertStore.matchX509Certs | private void matchX509Certs(CertSelector selector,
Collection<Certificate> matches) {
for (Object obj : certSubjects.values()) {
if (obj instanceof X509Certificate) {
X509Certificate cert = (X509Certificate)obj;
if (selector.match(cert)) {
... | java | private void matchX509Certs(CertSelector selector,
Collection<Certificate> matches) {
for (Object obj : certSubjects.values()) {
if (obj instanceof X509Certificate) {
X509Certificate cert = (X509Certificate)obj;
if (selector.match(cert)) {
... | [
"private",
"void",
"matchX509Certs",
"(",
"CertSelector",
"selector",
",",
"Collection",
"<",
"Certificate",
">",
"matches",
")",
"{",
"for",
"(",
"Object",
"obj",
":",
"certSubjects",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"X50... | Iterate through all the X509Certificates and add matches to the
collection. | [
"Iterate",
"through",
"all",
"the",
"X509Certificates",
"and",
"add",
"matches",
"to",
"the",
"collection",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java#L308-L328 |
33,278 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java | IndexedCollectionCertStore.matchX509CRLs | private void matchX509CRLs(CRLSelector selector, Collection<CRL> matches) {
for (Object obj : crlIssuers.values()) {
if (obj instanceof X509CRL) {
X509CRL crl = (X509CRL)obj;
if (selector.match(crl)) {
matches.add(crl);
}
... | java | private void matchX509CRLs(CRLSelector selector, Collection<CRL> matches) {
for (Object obj : crlIssuers.values()) {
if (obj instanceof X509CRL) {
X509CRL crl = (X509CRL)obj;
if (selector.match(crl)) {
matches.add(crl);
}
... | [
"private",
"void",
"matchX509CRLs",
"(",
"CRLSelector",
"selector",
",",
"Collection",
"<",
"CRL",
">",
"matches",
")",
"{",
"for",
"(",
"Object",
"obj",
":",
"crlIssuers",
".",
"values",
"(",
")",
")",
"{",
"if",
"(",
"obj",
"instanceof",
"X509CRL",
")"... | Iterate through all the X509CRLs and add matches to the
collection. | [
"Iterate",
"through",
"all",
"the",
"X509CRLs",
"and",
"add",
"matches",
"to",
"the",
"collection",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/IndexedCollectionCertStore.java#L404-L422 |
33,279 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/UnImplNode.java | UnImplNode.renameNode | public Node renameNode(Node n,
String namespaceURI,
String name)
throws DOMException{
return n;
} | java | public Node renameNode(Node n,
String namespaceURI,
String name)
throws DOMException{
return n;
} | [
"public",
"Node",
"renameNode",
"(",
"Node",
"n",
",",
"String",
"namespaceURI",
",",
"String",
"name",
")",
"throws",
"DOMException",
"{",
"return",
"n",
";",
"}"
] | DOM Level 3
Renaming node | [
"DOM",
"Level",
"3",
"Renaming",
"node"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/UnImplNode.java#L1748-L1753 |
33,280 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemAttribute.java | ElemAttribute.resolvePrefix | protected String resolvePrefix(SerializationHandler rhandler,
String prefix, String nodeNamespace)
throws TransformerException
{
if (null != prefix && (prefix.length() == 0 || prefix.equals("xmlns")))
{
// Since we can't use default namespace, in this case we try an... | java | protected String resolvePrefix(SerializationHandler rhandler,
String prefix, String nodeNamespace)
throws TransformerException
{
if (null != prefix && (prefix.length() == 0 || prefix.equals("xmlns")))
{
// Since we can't use default namespace, in this case we try an... | [
"protected",
"String",
"resolvePrefix",
"(",
"SerializationHandler",
"rhandler",
",",
"String",
"prefix",
",",
"String",
"nodeNamespace",
")",
"throws",
"TransformerException",
"{",
"if",
"(",
"null",
"!=",
"prefix",
"&&",
"(",
"prefix",
".",
"length",
"(",
")",... | Resolve the namespace into a prefix. At this level, if no prefix exists,
then return a manufactured prefix.
@param rhandler The current result tree handler.
@param prefix The probable prefix if already known.
@param nodeNamespace The namespace, which should not be null.
@return The prefix to be used. | [
"Resolve",
"the",
"namespace",
"into",
"a",
"prefix",
".",
"At",
"this",
"level",
"if",
"no",
"prefix",
"exists",
"then",
"return",
"a",
"manufactured",
"prefix",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemAttribute.java#L124-L148 |
33,281 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemAttribute.java | ElemAttribute.validateNodeName | protected boolean validateNodeName(String nodeName)
{
if(null == nodeName)
return false;
if(nodeName.equals("xmlns"))
return false;
return XML11Char.isXML11ValidQName(nodeName);
} | java | protected boolean validateNodeName(String nodeName)
{
if(null == nodeName)
return false;
if(nodeName.equals("xmlns"))
return false;
return XML11Char.isXML11ValidQName(nodeName);
} | [
"protected",
"boolean",
"validateNodeName",
"(",
"String",
"nodeName",
")",
"{",
"if",
"(",
"null",
"==",
"nodeName",
")",
"return",
"false",
";",
"if",
"(",
"nodeName",
".",
"equals",
"(",
"\"xmlns\"",
")",
")",
"return",
"false",
";",
"return",
"XML11Cha... | Validate that the node name is good.
@param nodeName Name of the node being constructed, which may be null.
@return true if the node name is valid, false otherwise. | [
"Validate",
"that",
"the",
"node",
"name",
"is",
"good",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemAttribute.java#L157-L164 |
33,282 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/DoublePipeline.java | DoublePipeline.limit | @Override
public final DoubleStream limit(long maxSize) {
if (maxSize < 0)
throw new IllegalArgumentException(Long.toString(maxSize));
return SliceOps.makeDouble(this, (long) 0, maxSize);
} | java | @Override
public final DoubleStream limit(long maxSize) {
if (maxSize < 0)
throw new IllegalArgumentException(Long.toString(maxSize));
return SliceOps.makeDouble(this, (long) 0, maxSize);
} | [
"@",
"Override",
"public",
"final",
"DoubleStream",
"limit",
"(",
"long",
"maxSize",
")",
"{",
"if",
"(",
"maxSize",
"<",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"Long",
".",
"toString",
"(",
"maxSize",
")",
")",
";",
"return",
"SliceOps... | Stateful intermediate ops from DoubleStream | [
"Stateful",
"intermediate",
"ops",
"from",
"DoubleStream"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/DoublePipeline.java#L336-L341 |
33,283 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/BoolStack.java | BoolStack.grow | private void grow()
{
m_allocatedSize *= 2;
boolean newVector[] = new boolean[m_allocatedSize];
System.arraycopy(m_values, 0, newVector, 0, m_index + 1);
m_values = newVector;
} | java | private void grow()
{
m_allocatedSize *= 2;
boolean newVector[] = new boolean[m_allocatedSize];
System.arraycopy(m_values, 0, newVector, 0, m_index + 1);
m_values = newVector;
} | [
"private",
"void",
"grow",
"(",
")",
"{",
"m_allocatedSize",
"*=",
"2",
";",
"boolean",
"newVector",
"[",
"]",
"=",
"new",
"boolean",
"[",
"m_allocatedSize",
"]",
";",
"System",
".",
"arraycopy",
"(",
"m_values",
",",
"0",
",",
"newVector",
",",
"0",
"... | Grows the size of the stack | [
"Grows",
"the",
"size",
"of",
"the",
"stack"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/BoolStack.java#L184-L194 |
33,284 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/android/system/GaiException.java | GaiException.getMessage | @Override public String getMessage() {
String gaiName = OsConstants.gaiName(error);
if (gaiName == null) {
gaiName = "GAI_ error " + error;
}
String description = NetworkOs.gai_strerror(error);
return functionName + " failed: " + gaiName + " (" + description + ")";
} | java | @Override public String getMessage() {
String gaiName = OsConstants.gaiName(error);
if (gaiName == null) {
gaiName = "GAI_ error " + error;
}
String description = NetworkOs.gai_strerror(error);
return functionName + " failed: " + gaiName + " (" + description + ")";
} | [
"@",
"Override",
"public",
"String",
"getMessage",
"(",
")",
"{",
"String",
"gaiName",
"=",
"OsConstants",
".",
"gaiName",
"(",
"error",
")",
";",
"if",
"(",
"gaiName",
"==",
"null",
")",
"{",
"gaiName",
"=",
"\"GAI_ error \"",
"+",
"error",
";",
"}",
... | Converts the stashed function name and error value to a human-readable string.
We do this here rather than in the constructor so that callers only pay for
this if they need it. | [
"Converts",
"the",
"stashed",
"function",
"name",
"and",
"error",
"value",
"to",
"a",
"human",
"-",
"readable",
"string",
".",
"We",
"do",
"this",
"here",
"rather",
"than",
"in",
"the",
"constructor",
"so",
"that",
"callers",
"only",
"pay",
"for",
"this",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/android/system/GaiException.java#L60-L67 |
33,285 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneId.java | ZoneId.ofWithPrefix | private static ZoneId ofWithPrefix(String zoneId, int prefixLength, boolean checkAvailable) {
String prefix = zoneId.substring(0, prefixLength);
if (zoneId.length() == prefixLength) {
return ofOffset(prefix, ZoneOffset.UTC);
}
if (zoneId.charAt(prefixLength) != '+' && zoneId.... | java | private static ZoneId ofWithPrefix(String zoneId, int prefixLength, boolean checkAvailable) {
String prefix = zoneId.substring(0, prefixLength);
if (zoneId.length() == prefixLength) {
return ofOffset(prefix, ZoneOffset.UTC);
}
if (zoneId.charAt(prefixLength) != '+' && zoneId.... | [
"private",
"static",
"ZoneId",
"ofWithPrefix",
"(",
"String",
"zoneId",
",",
"int",
"prefixLength",
",",
"boolean",
"checkAvailable",
")",
"{",
"String",
"prefix",
"=",
"zoneId",
".",
"substring",
"(",
"0",
",",
"prefixLength",
")",
";",
"if",
"(",
"zoneId",... | Parse once a prefix is established.
@param zoneId the time-zone ID, not null
@param prefixLength the length of the prefix, 2 or 3
@return the zone ID, not null
@throws DateTimeException if the zone ID has an invalid format | [
"Parse",
"once",
"a",
"prefix",
"is",
"established",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneId.java#L430-L447 |
33,286 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemUnknown.java | ElemUnknown.executeFallbacks | private void executeFallbacks(
TransformerImpl transformer)
throws TransformerException
{
for (ElemTemplateElement child = m_firstChild; child != null;
child = child.m_nextSibling)
{
if (child.getXSLToken() == Constants.ELEMNAME_FALLBACK)
{
try
{
... | java | private void executeFallbacks(
TransformerImpl transformer)
throws TransformerException
{
for (ElemTemplateElement child = m_firstChild; child != null;
child = child.m_nextSibling)
{
if (child.getXSLToken() == Constants.ELEMNAME_FALLBACK)
{
try
{
... | [
"private",
"void",
"executeFallbacks",
"(",
"TransformerImpl",
"transformer",
")",
"throws",
"TransformerException",
"{",
"for",
"(",
"ElemTemplateElement",
"child",
"=",
"m_firstChild",
";",
"child",
"!=",
"null",
";",
"child",
"=",
"child",
".",
"m_nextSibling",
... | Execute the fallbacks when an extension is not available.
@param transformer non-null reference to the the current transform-time state.
@throws TransformerException | [
"Execute",
"the",
"fallbacks",
"when",
"an",
"extension",
"is",
"not",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemUnknown.java#L54-L75 |
33,287 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemUnknown.java | ElemUnknown.execute | public void execute(TransformerImpl transformer)
throws TransformerException
{
try {
if (hasFallbackChildren()) {
executeFallbacks(transformer);
} else {
// do nothing
}
} catch (TransformerException e) {
transformer.getErrorListener().fatalError(e);
}
} | java | public void execute(TransformerImpl transformer)
throws TransformerException
{
try {
if (hasFallbackChildren()) {
executeFallbacks(transformer);
} else {
// do nothing
}
} catch (TransformerException e) {
transformer.getErrorListener().fatalError(e);
}
} | [
"public",
"void",
"execute",
"(",
"TransformerImpl",
"transformer",
")",
"throws",
"TransformerException",
"{",
"try",
"{",
"if",
"(",
"hasFallbackChildren",
"(",
")",
")",
"{",
"executeFallbacks",
"(",
"transformer",
")",
";",
"}",
"else",
"{",
"// do nothing",... | Execute an unknown element.
Execute fallback if fallback child exists or do nothing
@param transformer non-null reference to the the current transform-time state.
@throws TransformerException | [
"Execute",
"an",
"unknown",
"element",
".",
"Execute",
"fallback",
"if",
"fallback",
"child",
"exists",
"or",
"do",
"nothing"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemUnknown.java#L103-L119 |
33,288 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/OutputStreamWriter.java | OutputStreamWriter.close | @Override
public void close() throws IOException {
synchronized (lock) {
if (encoder != null) {
drainEncoder();
flushBytes(false);
out.close();
encoder = null;
bytes = null;
}
}
} | java | @Override
public void close() throws IOException {
synchronized (lock) {
if (encoder != null) {
drainEncoder();
flushBytes(false);
out.close();
encoder = null;
bytes = null;
}
}
} | [
"@",
"Override",
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"if",
"(",
"encoder",
"!=",
"null",
")",
"{",
"drainEncoder",
"(",
")",
";",
"flushBytes",
"(",
"false",
")",
";",
"out",
".",
... | Closes this writer. This implementation flushes the buffer as well as the
target stream. The target stream is then closed and the resources for the
buffer and converter are released.
<p>Only the first invocation of this method has any effect. Subsequent calls
do nothing.
@throws IOException
if an error occurs while c... | [
"Closes",
"this",
"writer",
".",
"This",
"implementation",
"flushes",
"the",
"buffer",
"as",
"well",
"as",
"the",
"target",
"stream",
".",
"The",
"target",
"stream",
"is",
"then",
"closed",
"and",
"the",
"resources",
"for",
"the",
"buffer",
"and",
"converter... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/OutputStreamWriter.java#L135-L146 |
33,289 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.rdns | public List<RDN> rdns() {
List<RDN> list = rdnList;
if (list == null) {
list = Collections.unmodifiableList(Arrays.asList(names));
rdnList = list;
}
return list;
} | java | public List<RDN> rdns() {
List<RDN> list = rdnList;
if (list == null) {
list = Collections.unmodifiableList(Arrays.asList(names));
rdnList = list;
}
return list;
} | [
"public",
"List",
"<",
"RDN",
">",
"rdns",
"(",
")",
"{",
"List",
"<",
"RDN",
">",
"list",
"=",
"rdnList",
";",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"list",
"=",
"Collections",
".",
"unmodifiableList",
"(",
"Arrays",
".",
"asList",
"(",
"name... | Return an immutable List of all RDNs in this X500Name. | [
"Return",
"an",
"immutable",
"List",
"of",
"all",
"RDNs",
"in",
"this",
"X500Name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L326-L333 |
33,290 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.allAvas | public List<AVA> allAvas() {
List<AVA> list = allAvaList;
if (list == null) {
list = new ArrayList<AVA>();
for (int i = 0; i < names.length; i++) {
list.addAll(names[i].avas());
}
}
return list;
} | java | public List<AVA> allAvas() {
List<AVA> list = allAvaList;
if (list == null) {
list = new ArrayList<AVA>();
for (int i = 0; i < names.length; i++) {
list.addAll(names[i].avas());
}
}
return list;
} | [
"public",
"List",
"<",
"AVA",
">",
"allAvas",
"(",
")",
"{",
"List",
"<",
"AVA",
">",
"list",
"=",
"allAvaList",
";",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"list",
"=",
"new",
"ArrayList",
"<",
"AVA",
">",
"(",
")",
";",
"for",
"(",
"int",... | Return an immutable List of the the AVAs contained in all the
RDNs of this X500Name. | [
"Return",
"an",
"immutable",
"List",
"of",
"the",
"the",
"AVAs",
"contained",
"in",
"all",
"the",
"RDNs",
"of",
"this",
"X500Name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L346-L355 |
33,291 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.isEmpty | public boolean isEmpty() {
int n = names.length;
if (n == 0) {
return true;
}
for (int i = 0; i < n; i++) {
if (names[i].assertion.length != 0) {
return false;
}
}
return true;
} | java | public boolean isEmpty() {
int n = names.length;
if (n == 0) {
return true;
}
for (int i = 0; i < n; i++) {
if (names[i].assertion.length != 0) {
return false;
}
}
return true;
} | [
"public",
"boolean",
"isEmpty",
"(",
")",
"{",
"int",
"n",
"=",
"names",
".",
"length",
";",
"if",
"(",
"n",
"==",
"0",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
... | Return whether this X500Name is empty. An X500Name is not empty
if it has at least one RDN containing at least one AVA. | [
"Return",
"whether",
"this",
"X500Name",
"is",
"empty",
".",
"An",
"X500Name",
"is",
"not",
"empty",
"if",
"it",
"has",
"at",
"least",
"one",
"RDN",
"containing",
"at",
"least",
"one",
"AVA",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L369-L380 |
33,292 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
for (int i = 0; i < names.length; i++) {
names[i].encode(tmp);
}
out.write(DerValue.tag_Sequence, tmp);
} | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tmp = new DerOutputStream();
for (int i = 0; i < names.length; i++) {
names[i].encode(tmp);
}
out.write(DerValue.tag_Sequence, tmp);
} | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"names",
".",
"length",
";",
"i",
"++... | Encodes the name in DER-encoded form.
@param out where to put the DER-encoded X.500 name | [
"Encodes",
"the",
"name",
"in",
"DER",
"-",
"encoded",
"form",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L828-L834 |
33,293 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.getEncodedInternal | public byte[] getEncodedInternal() throws IOException {
if (encoded == null) {
DerOutputStream out = new DerOutputStream();
DerOutputStream tmp = new DerOutputStream();
for (int i = 0; i < names.length; i++) {
names[i].encode(tmp);
}
... | java | public byte[] getEncodedInternal() throws IOException {
if (encoded == null) {
DerOutputStream out = new DerOutputStream();
DerOutputStream tmp = new DerOutputStream();
for (int i = 0; i < names.length; i++) {
names[i].encode(tmp);
}
... | [
"public",
"byte",
"[",
"]",
"getEncodedInternal",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"encoded",
"==",
"null",
")",
"{",
"DerOutputStream",
"out",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputSt... | Returned the encoding as an uncloned byte array. Callers must
guarantee that they neither modify it not expose it to untrusted
code. | [
"Returned",
"the",
"encoding",
"as",
"an",
"uncloned",
"byte",
"array",
".",
"Callers",
"must",
"guarantee",
"that",
"they",
"neither",
"modify",
"it",
"not",
"expose",
"it",
"to",
"untrusted",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L841-L852 |
33,294 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.checkNoNewLinesNorTabsAtBeginningOfDN | private void checkNoNewLinesNorTabsAtBeginningOfDN(String input) {
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (c != ' ') {
if (c == '\t' || c == '\n') {
throw new IllegalArgumentException("DN cannot start with newline nor t... | java | private void checkNoNewLinesNorTabsAtBeginningOfDN(String input) {
for (int i = 0; i < input.length(); i++) {
char c = input.charAt(i);
if (c != ' ') {
if (c == '\t' || c == '\n') {
throw new IllegalArgumentException("DN cannot start with newline nor t... | [
"private",
"void",
"checkNoNewLinesNorTabsAtBeginningOfDN",
"(",
"String",
"input",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"input",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"char",
"c",
"=",
"input",
".",
"charAt",
"(",
... | Disallow new lines and tabs at the beginning of DN.
@throws java.lang.IllegalArgumentException if the DN starts with new line or tab. | [
"Disallow",
"new",
"lines",
"and",
"tabs",
"at",
"the",
"beginning",
"of",
"DN",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L956-L966 |
33,295 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.isWithinSubtree | private boolean isWithinSubtree(X500Name other) {
if (this == other) {
return true;
}
if (other == null) {
return false;
}
if (other.names.length == 0) {
return true;
}
if (this.names.length == 0) {
return false;
... | java | private boolean isWithinSubtree(X500Name other) {
if (this == other) {
return true;
}
if (other == null) {
return false;
}
if (other.names.length == 0) {
return true;
}
if (this.names.length == 0) {
return false;
... | [
"private",
"boolean",
"isWithinSubtree",
"(",
"X500Name",
"other",
")",
"{",
"if",
"(",
"this",
"==",
"other",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"other",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"if",
"(",
"other",
".",
"... | Compares this name with another and determines if
it is within the subtree of the other. Useful for
checking against the name constraints extension.
@return true iff this name is within the subtree of other. | [
"Compares",
"this",
"name",
"with",
"another",
"and",
"determines",
"if",
"it",
"is",
"within",
"the",
"subtree",
"of",
"the",
"other",
".",
"Useful",
"for",
"checking",
"against",
"the",
"name",
"constraints",
"extension",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L1312-L1334 |
33,296 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.commonAncestor | public X500Name commonAncestor(X500Name other) {
if (other == null) {
return null;
}
int otherLen = other.names.length;
int thisLen = this.names.length;
if (thisLen == 0 || otherLen == 0) {
return null;
}
int minLen = (thisLen < otherLen) ... | java | public X500Name commonAncestor(X500Name other) {
if (other == null) {
return null;
}
int otherLen = other.names.length;
int thisLen = this.names.length;
if (thisLen == 0 || otherLen == 0) {
return null;
}
int minLen = (thisLen < otherLen) ... | [
"public",
"X500Name",
"commonAncestor",
"(",
"X500Name",
"other",
")",
"{",
"if",
"(",
"other",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"int",
"otherLen",
"=",
"other",
".",
"names",
".",
"length",
";",
"int",
"thisLen",
"=",
"this",
".",
... | Return lowest common ancestor of this name and other name
@param other another X500Name
@return X500Name of lowest common ancestor; null if none | [
"Return",
"lowest",
"common",
"ancestor",
"of",
"this",
"name",
"and",
"other",
"name"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L1354-L1392 |
33,297 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.asX500Principal | public X500Principal asX500Principal() {
if (x500Principal == null) {
try {
Object[] args = new Object[] {this};
x500Principal =
(X500Principal)principalConstructor.newInstance(args);
} catch (Exception e) {
throw ne... | java | public X500Principal asX500Principal() {
if (x500Principal == null) {
try {
Object[] args = new Object[] {this};
x500Principal =
(X500Principal)principalConstructor.newInstance(args);
} catch (Exception e) {
throw ne... | [
"public",
"X500Principal",
"asX500Principal",
"(",
")",
"{",
"if",
"(",
"x500Principal",
"==",
"null",
")",
"{",
"try",
"{",
"Object",
"[",
"]",
"args",
"=",
"new",
"Object",
"[",
"]",
"{",
"this",
"}",
";",
"x500Principal",
"=",
"(",
"X500Principal",
... | Get an X500Principal backed by this X500Name.
Note that we are using privileged reflection to access the hidden
package private constructor in X500Principal. | [
"Get",
"an",
"X500Principal",
"backed",
"by",
"this",
"X500Name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L1437-L1448 |
33,298 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java | X500Name.asX500Name | public static X500Name asX500Name(X500Principal p) {
try {
X500Name name = (X500Name)principalField.get(p);
name.x500Principal = p;
return name;
} catch (Exception e) {
throw new RuntimeException("Unexpected exception", e);
}
} | java | public static X500Name asX500Name(X500Principal p) {
try {
X500Name name = (X500Name)principalField.get(p);
name.x500Principal = p;
return name;
} catch (Exception e) {
throw new RuntimeException("Unexpected exception", e);
}
} | [
"public",
"static",
"X500Name",
"asX500Name",
"(",
"X500Principal",
"p",
")",
"{",
"try",
"{",
"X500Name",
"name",
"=",
"(",
"X500Name",
")",
"principalField",
".",
"get",
"(",
"p",
")",
";",
"name",
".",
"x500Principal",
"=",
"p",
";",
"return",
"name",... | Get the X500Name contained in the given X500Principal.
Note that the X500Name is retrieved using reflection. | [
"Get",
"the",
"X500Name",
"contained",
"in",
"the",
"given",
"X500Principal",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X500Name.java#L1455-L1463 |
33,299 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java | AtomicIntegerFieldUpdater.updateAndGet | public final int updateAndGet(T obj, IntUnaryOperator updateFunction) {
int prev, next;
do {
prev = get(obj);
next = updateFunction.applyAsInt(prev);
} while (!compareAndSet(obj, prev, next));
return next;
} | java | public final int updateAndGet(T obj, IntUnaryOperator updateFunction) {
int prev, next;
do {
prev = get(obj);
next = updateFunction.applyAsInt(prev);
} while (!compareAndSet(obj, prev, next));
return next;
} | [
"public",
"final",
"int",
"updateAndGet",
"(",
"T",
"obj",
",",
"IntUnaryOperator",
"updateFunction",
")",
"{",
"int",
"prev",
",",
"next",
";",
"do",
"{",
"prev",
"=",
"get",
"(",
"obj",
")",
";",
"next",
"=",
"updateFunction",
".",
"applyAsInt",
"(",
... | Atomically updates the field of the given object managed by this updater
with the results of applying the given function, returning the updated
value. The function should be side-effect-free, since it may be
re-applied when attempted updates fail due to contention among threads.
@param obj An object whose field to get... | [
"Atomically",
"updates",
"the",
"field",
"of",
"the",
"given",
"object",
"managed",
"by",
"this",
"updater",
"with",
"the",
"results",
"of",
"applying",
"the",
"given",
"function",
"returning",
"the",
"updated",
"value",
".",
"The",
"function",
"should",
"be",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java#L305-L312 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.