id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,900 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.inet6AsByteArray | static byte[] inet6AsByteArray(InetAddress ia) {
if (ia instanceof Inet6Address) {
return ia.getAddress();
}
// need to construct IPv4-mapped address
if (ia instanceof Inet4Address) {
byte[] ip4address = ia.getAddress();
byte[] address = new byte[16];... | java | static byte[] inet6AsByteArray(InetAddress ia) {
if (ia instanceof Inet6Address) {
return ia.getAddress();
}
// need to construct IPv4-mapped address
if (ia instanceof Inet4Address) {
byte[] ip4address = ia.getAddress();
byte[] address = new byte[16];... | [
"static",
"byte",
"[",
"]",
"inet6AsByteArray",
"(",
"InetAddress",
"ia",
")",
"{",
"if",
"(",
"ia",
"instanceof",
"Inet6Address",
")",
"{",
"return",
"ia",
".",
"getAddress",
"(",
")",
";",
"}",
"// need to construct IPv4-mapped address",
"if",
"(",
"ia",
"... | Returns an IPv6 address as a byte array | [
"Returns",
"an",
"IPv6",
"address",
"as",
"a",
"byte",
"array"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L308-L327 |
34,901 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.join4 | static int join4(FileDescriptor fd, int group, int interf, int source)
throws IOException
{
return joinOrDrop4(true, fd, group, interf, source);
} | java | static int join4(FileDescriptor fd, int group, int interf, int source)
throws IOException
{
return joinOrDrop4(true, fd, group, interf, source);
} | [
"static",
"int",
"join4",
"(",
"FileDescriptor",
"fd",
",",
"int",
"group",
",",
"int",
"interf",
",",
"int",
"source",
")",
"throws",
"IOException",
"{",
"return",
"joinOrDrop4",
"(",
"true",
",",
"fd",
",",
"group",
",",
"interf",
",",
"source",
")",
... | Join IPv4 multicast group | [
"Join",
"IPv4",
"multicast",
"group"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L533-L537 |
34,902 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.drop4 | static void drop4(FileDescriptor fd, int group, int interf, int source)
throws IOException
{
joinOrDrop4(false, fd, group, interf, source);
} | java | static void drop4(FileDescriptor fd, int group, int interf, int source)
throws IOException
{
joinOrDrop4(false, fd, group, interf, source);
} | [
"static",
"void",
"drop4",
"(",
"FileDescriptor",
"fd",
",",
"int",
"group",
",",
"int",
"interf",
",",
"int",
"source",
")",
"throws",
"IOException",
"{",
"joinOrDrop4",
"(",
"false",
",",
"fd",
",",
"group",
",",
"interf",
",",
"source",
")",
";",
"}... | Drop membership of IPv4 multicast group | [
"Drop",
"membership",
"of",
"IPv4",
"multicast",
"group"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L542-L546 |
34,903 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.block4 | static int block4(FileDescriptor fd, int group, int interf, int source)
throws IOException
{
return blockOrUnblock4(true, fd, group, interf, source);
} | java | static int block4(FileDescriptor fd, int group, int interf, int source)
throws IOException
{
return blockOrUnblock4(true, fd, group, interf, source);
} | [
"static",
"int",
"block4",
"(",
"FileDescriptor",
"fd",
",",
"int",
"group",
",",
"int",
"interf",
",",
"int",
"source",
")",
"throws",
"IOException",
"{",
"return",
"blockOrUnblock4",
"(",
"true",
",",
"fd",
",",
"group",
",",
"interf",
",",
"source",
"... | Block IPv4 source | [
"Block",
"IPv4",
"source"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L554-L558 |
34,904 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.join6 | static int join6(FileDescriptor fd, byte[] group, int index, byte[] source)
throws IOException
{
return joinOrDrop6(true, fd, group, index, source);
} | java | static int join6(FileDescriptor fd, byte[] group, int index, byte[] source)
throws IOException
{
return joinOrDrop6(true, fd, group, index, source);
} | [
"static",
"int",
"join6",
"(",
"FileDescriptor",
"fd",
",",
"byte",
"[",
"]",
"group",
",",
"int",
"index",
",",
"byte",
"[",
"]",
"source",
")",
"throws",
"IOException",
"{",
"return",
"joinOrDrop6",
"(",
"true",
",",
"fd",
",",
"group",
",",
"index",... | Join IPv6 multicast group | [
"Join",
"IPv6",
"multicast",
"group"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L576-L580 |
34,905 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.drop6 | static void drop6(FileDescriptor fd, byte[] group, int index, byte[] source)
throws IOException
{
joinOrDrop6(false, fd, group, index, source);
} | java | static void drop6(FileDescriptor fd, byte[] group, int index, byte[] source)
throws IOException
{
joinOrDrop6(false, fd, group, index, source);
} | [
"static",
"void",
"drop6",
"(",
"FileDescriptor",
"fd",
",",
"byte",
"[",
"]",
"group",
",",
"int",
"index",
",",
"byte",
"[",
"]",
"source",
")",
"throws",
"IOException",
"{",
"joinOrDrop6",
"(",
"false",
",",
"fd",
",",
"group",
",",
"index",
",",
... | Drop membership of IPv6 multicast group | [
"Drop",
"membership",
"of",
"IPv6",
"multicast",
"group"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L585-L589 |
34,906 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java | Net.block6 | static int block6(FileDescriptor fd, byte[] group, int index, byte[] source)
throws IOException
{
return blockOrUnblock6(true, fd, group, index, source);
} | java | static int block6(FileDescriptor fd, byte[] group, int index, byte[] source)
throws IOException
{
return blockOrUnblock6(true, fd, group, index, source);
} | [
"static",
"int",
"block6",
"(",
"FileDescriptor",
"fd",
",",
"byte",
"[",
"]",
"group",
",",
"int",
"index",
",",
"byte",
"[",
"]",
"source",
")",
"throws",
"IOException",
"{",
"return",
"blockOrUnblock6",
"(",
"true",
",",
"fd",
",",
"group",
",",
"in... | Block IPv6 source | [
"Block",
"IPv6",
"source"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Net.java#L597-L601 |
34,907 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java | DerIndefLenConverter.writeTag | private void writeTag() {
if (dataPos == dataSize)
return;
int tag = data[dataPos++];
if (isEOC(tag) && (data[dataPos] == 0)) {
dataPos++; // skip length
writeTag();
} else
newData[newDataPos++] = (byte)tag;
} | java | private void writeTag() {
if (dataPos == dataSize)
return;
int tag = data[dataPos++];
if (isEOC(tag) && (data[dataPos] == 0)) {
dataPos++; // skip length
writeTag();
} else
newData[newDataPos++] = (byte)tag;
} | [
"private",
"void",
"writeTag",
"(",
")",
"{",
"if",
"(",
"dataPos",
"==",
"dataSize",
")",
"return",
";",
"int",
"tag",
"=",
"data",
"[",
"dataPos",
"++",
"]",
";",
"if",
"(",
"isEOC",
"(",
"tag",
")",
"&&",
"(",
"data",
"[",
"dataPos",
"]",
"=="... | Write the tag and if it is an end-of-contents tag
then skip the tag and its 1 byte length of zero. | [
"Write",
"the",
"tag",
"and",
"if",
"it",
"is",
"an",
"end",
"-",
"of",
"-",
"contents",
"tag",
"then",
"skip",
"the",
"tag",
"and",
"its",
"1",
"byte",
"length",
"of",
"zero",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java#L132-L141 |
34,908 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java | DerIndefLenConverter.writeLengthAndValue | private void writeLengthAndValue() throws IOException {
if (dataPos == dataSize)
return;
int curLen = 0;
int lenByte = data[dataPos++] & 0xff;
if (isIndefinite(lenByte)) {
byte[] lenBytes = (byte[])ndefsList.get(index++);
System.arraycopy(lenBytes, 0, n... | java | private void writeLengthAndValue() throws IOException {
if (dataPos == dataSize)
return;
int curLen = 0;
int lenByte = data[dataPos++] & 0xff;
if (isIndefinite(lenByte)) {
byte[] lenBytes = (byte[])ndefsList.get(index++);
System.arraycopy(lenBytes, 0, n... | [
"private",
"void",
"writeLengthAndValue",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"dataPos",
"==",
"dataSize",
")",
"return",
";",
"int",
"curLen",
"=",
"0",
";",
"int",
"lenByte",
"=",
"data",
"[",
"dataPos",
"++",
"]",
"&",
"0xff",
";",
"i... | Write the length and if it is an indefinite length
then calculate the definite length from the positions
of the indefinite length and its matching EOC terminator.
Then, write the value. | [
"Write",
"the",
"length",
"and",
"if",
"it",
"is",
"an",
"indefinite",
"length",
"then",
"calculate",
"the",
"definite",
"length",
"from",
"the",
"positions",
"of",
"the",
"indefinite",
"length",
"and",
"its",
"matching",
"EOC",
"terminator",
".",
"Then",
"w... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java#L183-L208 |
34,909 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java | DerIndefLenConverter.getNumOfLenBytes | private int getNumOfLenBytes(int len) {
int numOfLenBytes = 0;
if (len < 128) {
numOfLenBytes = 1;
} else if (len < (1 << 8)) {
numOfLenBytes = 2;
} else if (len < (1 << 16)) {
numOfLenBytes = 3;
} else if (len < (1 << 24)) {
numOf... | java | private int getNumOfLenBytes(int len) {
int numOfLenBytes = 0;
if (len < 128) {
numOfLenBytes = 1;
} else if (len < (1 << 8)) {
numOfLenBytes = 2;
} else if (len < (1 << 16)) {
numOfLenBytes = 3;
} else if (len < (1 << 24)) {
numOf... | [
"private",
"int",
"getNumOfLenBytes",
"(",
"int",
"len",
")",
"{",
"int",
"numOfLenBytes",
"=",
"0",
";",
"if",
"(",
"len",
"<",
"128",
")",
"{",
"numOfLenBytes",
"=",
"1",
";",
"}",
"else",
"if",
"(",
"len",
"<",
"(",
"1",
"<<",
"8",
")",
")",
... | in ASN.1 notation | [
"in",
"ASN",
".",
"1",
"notation"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java#L278-L293 |
34,910 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java | DerIndefLenConverter.writeValue | private void writeValue(int curLen) {
for (int i=0; i < curLen; i++)
newData[newDataPos++] = data[dataPos++];
} | java | private void writeValue(int curLen) {
for (int i=0; i < curLen; i++)
newData[newDataPos++] = data[dataPos++];
} | [
"private",
"void",
"writeValue",
"(",
"int",
"curLen",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"curLen",
";",
"i",
"++",
")",
"newData",
"[",
"newDataPos",
"++",
"]",
"=",
"data",
"[",
"dataPos",
"++",
"]",
";",
"}"
] | Write the value; | [
"Write",
"the",
"value",
";"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java#L305-L308 |
34,911 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java | DerIndefLenConverter.convert | byte[] convert(byte[] indefData) throws IOException {
data = indefData;
dataPos=0; index=0;
dataSize = data.length;
int len=0;
int unused = 0;
// parse and set up the vectors of all the indefinite-lengths
while (dataPos < dataSize) {
parseTag();
... | java | byte[] convert(byte[] indefData) throws IOException {
data = indefData;
dataPos=0; index=0;
dataSize = data.length;
int len=0;
int unused = 0;
// parse and set up the vectors of all the indefinite-lengths
while (dataPos < dataSize) {
parseTag();
... | [
"byte",
"[",
"]",
"convert",
"(",
"byte",
"[",
"]",
"indefData",
")",
"throws",
"IOException",
"{",
"data",
"=",
"indefData",
";",
"dataPos",
"=",
"0",
";",
"index",
"=",
"0",
";",
"dataSize",
"=",
"data",
".",
"length",
";",
"int",
"len",
"=",
"0"... | Converts a indefinite length DER encoded byte array to
a definte length DER encoding.
@param indefData the byte array holding the indefinite
length encoding.
@return the byte array containing the definite length
DER encoding.
@exception IOException on parsing or re-writing errors. | [
"Converts",
"a",
"indefinite",
"length",
"DER",
"encoded",
"byte",
"array",
"to",
"a",
"definte",
"length",
"DER",
"encoding",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerIndefLenConverter.java#L320-L356 |
34,912 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ContentHandler.java | ContentHandler.getContent | @SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
Object obj = getContent(urlc);
for (int i = 0; i < classes.length; i++) {
if (classes[i].isInstance(obj)) {
return obj;
}
}
return nul... | java | @SuppressWarnings("rawtypes")
public Object getContent(URLConnection urlc, Class[] classes) throws IOException {
Object obj = getContent(urlc);
for (int i = 0; i < classes.length; i++) {
if (classes[i].isInstance(obj)) {
return obj;
}
}
return nul... | [
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"public",
"Object",
"getContent",
"(",
"URLConnection",
"urlc",
",",
"Class",
"[",
"]",
"classes",
")",
"throws",
"IOException",
"{",
"Object",
"obj",
"=",
"getContent",
"(",
"urlc",
")",
";",
"for",
"(",
... | Given a URL connect stream positioned at the beginning of the
representation of an object, this method reads that stream and
creates an object that matches one of the types specified.
The default implementation of this method should call getContent()
and screen the return type for a match of the suggested types.
@par... | [
"Given",
"a",
"URL",
"connect",
"stream",
"positioned",
"at",
"the",
"beginning",
"of",
"the",
"representation",
"of",
"an",
"object",
"this",
"method",
"reads",
"that",
"stream",
"and",
"creates",
"an",
"object",
"that",
"matches",
"one",
"of",
"the",
"type... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ContentHandler.java#L99-L109 |
34,913 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneOffset.java | ZoneOffset.parseNumber | private static int parseNumber(CharSequence offsetId, int pos, boolean precededByColon) {
if (precededByColon && offsetId.charAt(pos - 1) != ':') {
throw new DateTimeException("Invalid ID for ZoneOffset, colon not found when expected: " + offsetId);
}
char ch1 = offsetId.charAt(pos);... | java | private static int parseNumber(CharSequence offsetId, int pos, boolean precededByColon) {
if (precededByColon && offsetId.charAt(pos - 1) != ':') {
throw new DateTimeException("Invalid ID for ZoneOffset, colon not found when expected: " + offsetId);
}
char ch1 = offsetId.charAt(pos);... | [
"private",
"static",
"int",
"parseNumber",
"(",
"CharSequence",
"offsetId",
",",
"int",
"pos",
",",
"boolean",
"precededByColon",
")",
"{",
"if",
"(",
"precededByColon",
"&&",
"offsetId",
".",
"charAt",
"(",
"pos",
"-",
"1",
")",
"!=",
"'",
"'",
")",
"{"... | Parse a two digit zero-prefixed number.
@param offsetId the offset ID, not null
@param pos the position to parse, valid
@param precededByColon should this number be prefixed by a precededByColon
@return the parsed number, from 0 to 99 | [
"Parse",
"a",
"two",
"digit",
"zero",
"-",
"prefixed",
"number",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneOffset.java#L256-L266 |
34,914 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneOffset.java | ZoneOffset.validate | private static void validate(int hours, int minutes, int seconds) {
if (hours < -18 || hours > 18) {
throw new DateTimeException("Zone offset hours not in valid range: value " + hours +
" is not in the range -18 to 18");
}
if (hours > 0) {
if (minutes ... | java | private static void validate(int hours, int minutes, int seconds) {
if (hours < -18 || hours > 18) {
throw new DateTimeException("Zone offset hours not in valid range: value " + hours +
" is not in the range -18 to 18");
}
if (hours > 0) {
if (minutes ... | [
"private",
"static",
"void",
"validate",
"(",
"int",
"hours",
",",
"int",
"minutes",
",",
"int",
"seconds",
")",
"{",
"if",
"(",
"hours",
"<",
"-",
"18",
"||",
"hours",
">",
"18",
")",
"{",
"throw",
"new",
"DateTimeException",
"(",
"\"Zone offset hours n... | Validates the offset fields.
@param hours the time-zone offset in hours, from -18 to +18
@param minutes the time-zone offset in minutes, from 0 to ±59
@param seconds the time-zone offset in seconds, from 0 to ±59
@throws DateTimeException if the offset is not in the required range | [
"Validates",
"the",
"offset",
"fields",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneOffset.java#L356-L383 |
34,915 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | ToXMLSAXHandler.namespaceAfterStartElement | public void namespaceAfterStartElement(
final String prefix,
final String uri)
throws SAXException
{
startPrefixMapping(prefix,uri,false);
} | java | public void namespaceAfterStartElement(
final String prefix,
final String uri)
throws SAXException
{
startPrefixMapping(prefix,uri,false);
} | [
"public",
"void",
"namespaceAfterStartElement",
"(",
"final",
"String",
"prefix",
",",
"final",
"String",
"uri",
")",
"throws",
"SAXException",
"{",
"startPrefixMapping",
"(",
"prefix",
",",
"uri",
",",
"false",
")",
";",
"}"
] | Send a namespace declaration in the output document. The namespace
declaration will not be include if the namespace is already in scope
with the same prefix. | [
"Send",
"a",
"namespace",
"declaration",
"in",
"the",
"output",
"document",
".",
"The",
"namespace",
"declaration",
"will",
"not",
"be",
"include",
"if",
"the",
"namespace",
"is",
"already",
"in",
"scope",
"with",
"the",
"same",
"prefix",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java#L564-L570 |
34,916 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java | ToXMLSAXHandler.popNamespace | protected boolean popNamespace(String prefix)
{
try
{
if (m_prefixMap.popNamespace(prefix))
{
m_saxHandler.endPrefixMapping(prefix);
return true;
}
}
catch (SAXException e)
{
// falls through
... | java | protected boolean popNamespace(String prefix)
{
try
{
if (m_prefixMap.popNamespace(prefix))
{
m_saxHandler.endPrefixMapping(prefix);
return true;
}
}
catch (SAXException e)
{
// falls through
... | [
"protected",
"boolean",
"popNamespace",
"(",
"String",
"prefix",
")",
"{",
"try",
"{",
"if",
"(",
"m_prefixMap",
".",
"popNamespace",
"(",
"prefix",
")",
")",
"{",
"m_saxHandler",
".",
"endPrefixMapping",
"(",
"prefix",
")",
";",
"return",
"true",
";",
"}"... | Undeclare the namespace that is currently pointed to by a given
prefix. Inform SAX handler if prefix was previously mapped. | [
"Undeclare",
"the",
"namespace",
"that",
"is",
"currently",
"pointed",
"to",
"by",
"a",
"given",
"prefix",
".",
"Inform",
"SAX",
"handler",
"if",
"prefix",
"was",
"previously",
"mapped",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java#L595-L610 |
34,917 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIterator.java | FilterExprIterator.getNextNode | protected int getNextNode()
{
if (null != m_exprObj)
{
m_lastFetched = m_exprObj.nextNode();
}
else
m_lastFetched = DTM.NULL;
return m_lastFetched;
} | java | protected int getNextNode()
{
if (null != m_exprObj)
{
m_lastFetched = m_exprObj.nextNode();
}
else
m_lastFetched = DTM.NULL;
return m_lastFetched;
} | [
"protected",
"int",
"getNextNode",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"m_exprObj",
")",
"{",
"m_lastFetched",
"=",
"m_exprObj",
".",
"nextNode",
"(",
")",
";",
"}",
"else",
"m_lastFetched",
"=",
"DTM",
".",
"NULL",
";",
"return",
"m_lastFetched",
";... | Get the next node via getNextXXX. Bottlenecked for derived class override.
@return The next node on the axis, or DTM.NULL. | [
"Get",
"the",
"next",
"node",
"via",
"getNextXXX",
".",
"Bottlenecked",
"for",
"derived",
"class",
"override",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/FilterExprIterator.java#L82-L92 |
34,918 | google/j2objc | jre_emul/android/frameworks/base/core/java/android/text/SpanSet.java | SpanSet.hasSpansIntersecting | public boolean hasSpansIntersecting(int start, int end) {
for (int i = 0; i < numberOfSpans; i++) {
// equal test is valid since both intervals are not empty by construction
if (spanStarts[i] >= end || spanEnds[i] <= start) continue;
return true;
}
return fals... | java | public boolean hasSpansIntersecting(int start, int end) {
for (int i = 0; i < numberOfSpans; i++) {
// equal test is valid since both intervals are not empty by construction
if (spanStarts[i] >= end || spanEnds[i] <= start) continue;
return true;
}
return fals... | [
"public",
"boolean",
"hasSpansIntersecting",
"(",
"int",
"start",
",",
"int",
"end",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numberOfSpans",
";",
"i",
"++",
")",
"{",
"// equal test is valid since both intervals are not empty by construction",
... | Returns true if there are spans intersecting the given interval.
@param end must be strictly greater than start | [
"Returns",
"true",
"if",
"there",
"are",
"spans",
"intersecting",
"the",
"given",
"interval",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpanSet.java#L80-L87 |
34,919 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/CookieManager.java | CookieManager.shouldAcceptInternal | private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) {
try {
return policyCallback.shouldAccept(uri, cookie);
} catch (Exception ignored) { // pretect against malicious callback
return false;
}
} | java | private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) {
try {
return policyCallback.shouldAccept(uri, cookie);
} catch (Exception ignored) { // pretect against malicious callback
return false;
}
} | [
"private",
"boolean",
"shouldAcceptInternal",
"(",
"URI",
"uri",
",",
"HttpCookie",
"cookie",
")",
"{",
"try",
"{",
"return",
"policyCallback",
".",
"shouldAccept",
"(",
"uri",
",",
"cookie",
")",
";",
"}",
"catch",
"(",
"Exception",
"ignored",
")",
"{",
"... | to determine whether or not accept this cookie | [
"to",
"determine",
"whether",
"or",
"not",
"accept",
"this",
"cookie"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/CookieManager.java#L356-L362 |
34,920 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/XMLReaderManager.java | XMLReaderManager.releaseXMLReader | public synchronized void releaseXMLReader(XMLReader reader) {
// If the reader that's being released is the cached reader
// for this thread, remove it from the m_isUse list.
if (m_readers.get() == reader && reader != null) {
m_inUse.remove(reader);
}
} | java | public synchronized void releaseXMLReader(XMLReader reader) {
// If the reader that's being released is the cached reader
// for this thread, remove it from the m_isUse list.
if (m_readers.get() == reader && reader != null) {
m_inUse.remove(reader);
}
} | [
"public",
"synchronized",
"void",
"releaseXMLReader",
"(",
"XMLReader",
"reader",
")",
"{",
"// If the reader that's being released is the cached reader",
"// for this thread, remove it from the m_isUse list.",
"if",
"(",
"m_readers",
".",
"get",
"(",
")",
"==",
"reader",
"&&... | Mark the cached XMLReader as available. If the reader was not
actually in the cache, do nothing.
@param reader The XMLReader that's being released. | [
"Mark",
"the",
"cached",
"XMLReader",
"as",
"available",
".",
"If",
"the",
"reader",
"was",
"not",
"actually",
"in",
"the",
"cache",
"do",
"nothing",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/XMLReaderManager.java#L154-L160 |
34,921 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternTokenizer.java | PatternTokenizer.setExtraQuotingCharacters | public PatternTokenizer setExtraQuotingCharacters(UnicodeSet syntaxCharacters) {
this.extraQuotingCharacters = (UnicodeSet) syntaxCharacters.clone();
needingQuoteCharacters = null;
return this;
} | java | public PatternTokenizer setExtraQuotingCharacters(UnicodeSet syntaxCharacters) {
this.extraQuotingCharacters = (UnicodeSet) syntaxCharacters.clone();
needingQuoteCharacters = null;
return this;
} | [
"public",
"PatternTokenizer",
"setExtraQuotingCharacters",
"(",
"UnicodeSet",
"syntaxCharacters",
")",
"{",
"this",
".",
"extraQuotingCharacters",
"=",
"(",
"UnicodeSet",
")",
"syntaxCharacters",
".",
"clone",
"(",
")",
";",
"needingQuoteCharacters",
"=",
"null",
";",... | Sets the extra characters to be quoted in literals
@param syntaxCharacters Characters to be set as extra quoting characters.
@return A PatternTokenizer object in which characters are specified as extra quoting characters. | [
"Sets",
"the",
"extra",
"characters",
"to",
"be",
"quoted",
"in",
"literals"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternTokenizer.java#L77-L81 |
34,922 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternTokenizer.java | PatternTokenizer.quoteLiteral | public String quoteLiteral(String string) {
if (needingQuoteCharacters == null) {
needingQuoteCharacters = new UnicodeSet().addAll(syntaxCharacters).addAll(ignorableCharacters).addAll(extraQuotingCharacters); // .addAll(quoteCharacters)
if (usingSlash) needingQuoteCharacters.add(BACK_SLA... | java | public String quoteLiteral(String string) {
if (needingQuoteCharacters == null) {
needingQuoteCharacters = new UnicodeSet().addAll(syntaxCharacters).addAll(ignorableCharacters).addAll(extraQuotingCharacters); // .addAll(quoteCharacters)
if (usingSlash) needingQuoteCharacters.add(BACK_SLA... | [
"public",
"String",
"quoteLiteral",
"(",
"String",
"string",
")",
"{",
"if",
"(",
"needingQuoteCharacters",
"==",
"null",
")",
"{",
"needingQuoteCharacters",
"=",
"new",
"UnicodeSet",
"(",
")",
".",
"addAll",
"(",
"syntaxCharacters",
")",
".",
"addAll",
"(",
... | Quote a literal string, using the available settings. Thus syntax characters, quote characters, and ignorable characters will be put into quotes.
@param string String passed to quote a literal string.
@return A string using the available settings will place syntax, quote, or ignorable characters into quotes. | [
"Quote",
"a",
"literal",
"string",
"using",
"the",
"available",
"settings",
".",
"Thus",
"syntax",
"characters",
"quote",
"characters",
"and",
"ignorable",
"characters",
"will",
"be",
"put",
"into",
"quotes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternTokenizer.java#L161-L226 |
34,923 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UnicodeRegex.java | UnicodeRegex.appendLines | public static List<String> appendLines(List<String> result, String file, String encoding) throws IOException {
InputStream is = new FileInputStream(file);
try {
return appendLines(result, is, encoding);
} finally {
is.close();
}
} | java | public static List<String> appendLines(List<String> result, String file, String encoding) throws IOException {
InputStream is = new FileInputStream(file);
try {
return appendLines(result, is, encoding);
} finally {
is.close();
}
} | [
"public",
"static",
"List",
"<",
"String",
">",
"appendLines",
"(",
"List",
"<",
"String",
">",
"result",
",",
"String",
"file",
",",
"String",
"encoding",
")",
"throws",
"IOException",
"{",
"InputStream",
"is",
"=",
"new",
"FileInputStream",
"(",
"file",
... | Utility for loading lines from a file.
@param result The result of the appended lines.
@param file The file to have an input stream.
@param encoding if null, then UTF-8
@return filled list
@throws IOException If there were problems opening the file for input stream. | [
"Utility",
"for",
"loading",
"lines",
"from",
"a",
"file",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UnicodeRegex.java#L279-L286 |
34,924 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UnicodeRegex.java | UnicodeRegex.appendLines | public static List<String> appendLines(List<String> result, InputStream inputStream, String encoding)
throws UnsupportedEncodingException, IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, encoding == null ? "UTF-8" : encoding));
while (true) {
... | java | public static List<String> appendLines(List<String> result, InputStream inputStream, String encoding)
throws UnsupportedEncodingException, IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, encoding == null ? "UTF-8" : encoding));
while (true) {
... | [
"public",
"static",
"List",
"<",
"String",
">",
"appendLines",
"(",
"List",
"<",
"String",
">",
"result",
",",
"InputStream",
"inputStream",
",",
"String",
"encoding",
")",
"throws",
"UnsupportedEncodingException",
",",
"IOException",
"{",
"BufferedReader",
"in",
... | Utility for loading lines from a UTF8 file.
@param result The result of the appended lines.
@param inputStream The input stream.
@param encoding if null, then UTF-8
@return filled list
@throws IOException If there were problems opening the input stream for reading. | [
"Utility",
"for",
"loading",
"lines",
"from",
"a",
"UTF8",
"file",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UnicodeRegex.java#L296-L305 |
34,925 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Util.java | Util.getTemporaryDirectBuffer | static ByteBuffer getTemporaryDirectBuffer(int size) {
BufferCache cache = bufferCache.get();
ByteBuffer buf = cache.get(size);
if (buf != null) {
return buf;
} else {
// No suitable buffer in the cache so we need to allocate a new
// one. To avoid the... | java | static ByteBuffer getTemporaryDirectBuffer(int size) {
BufferCache cache = bufferCache.get();
ByteBuffer buf = cache.get(size);
if (buf != null) {
return buf;
} else {
// No suitable buffer in the cache so we need to allocate a new
// one. To avoid the... | [
"static",
"ByteBuffer",
"getTemporaryDirectBuffer",
"(",
"int",
"size",
")",
"{",
"BufferCache",
"cache",
"=",
"bufferCache",
".",
"get",
"(",
")",
";",
"ByteBuffer",
"buf",
"=",
"cache",
".",
"get",
"(",
"size",
")",
";",
"if",
"(",
"buf",
"!=",
"null",... | Returns a temporary buffer of at least the given size | [
"Returns",
"a",
"temporary",
"buffer",
"of",
"at",
"least",
"the",
"given",
"size"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Util.java#L159-L174 |
34,926 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Util.java | Util.offerFirstTemporaryDirectBuffer | static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) {
assert buf != null;
BufferCache cache = bufferCache.get();
if (!cache.offerFirst(buf)) {
// cache is full
free(buf);
}
} | java | static void offerFirstTemporaryDirectBuffer(ByteBuffer buf) {
assert buf != null;
BufferCache cache = bufferCache.get();
if (!cache.offerFirst(buf)) {
// cache is full
free(buf);
}
} | [
"static",
"void",
"offerFirstTemporaryDirectBuffer",
"(",
"ByteBuffer",
"buf",
")",
"{",
"assert",
"buf",
"!=",
"null",
";",
"BufferCache",
"cache",
"=",
"bufferCache",
".",
"get",
"(",
")",
";",
"if",
"(",
"!",
"cache",
".",
"offerFirst",
"(",
"buf",
")",... | Releases a temporary buffer by returning to the cache or freeing it. If
returning to the cache then insert it at the start so that it is
likely to be returned by a subsequent call to getTemporaryDirectBuffer. | [
"Releases",
"a",
"temporary",
"buffer",
"by",
"returning",
"to",
"the",
"cache",
"or",
"freeing",
"it",
".",
"If",
"returning",
"to",
"the",
"cache",
"then",
"insert",
"it",
"at",
"the",
"start",
"so",
"that",
"it",
"is",
"likely",
"to",
"be",
"returned"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Util.java#L188-L195 |
34,927 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Util.java | Util.free | private static void free(ByteBuffer buf) {
Cleaner cleaner = ((DirectBuffer)buf).cleaner();
if (cleaner != null) {
cleaner.clean();
}
} | java | private static void free(ByteBuffer buf) {
Cleaner cleaner = ((DirectBuffer)buf).cleaner();
if (cleaner != null) {
cleaner.clean();
}
} | [
"private",
"static",
"void",
"free",
"(",
"ByteBuffer",
"buf",
")",
"{",
"Cleaner",
"cleaner",
"=",
"(",
"(",
"DirectBuffer",
")",
"buf",
")",
".",
"cleaner",
"(",
")",
";",
"if",
"(",
"cleaner",
"!=",
"null",
")",
"{",
"cleaner",
".",
"clean",
"(",
... | Frees the memory for the given direct buffer | [
"Frees",
"the",
"memory",
"for",
"the",
"given",
"direct",
"buffer"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/Util.java#L215-L220 |
34,928 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java | PeriodFormatterData.appendPrefix | public boolean appendPrefix(int tl, int td, StringBuffer sb) {
if (dr.scopeData != null) {
int ix = tl * 3 + td;
ScopeData sd = dr.scopeData[ix];
if (sd != null) {
String prefix = sd.prefix;
if (prefix != null) {
sb.append(prefix);
return sd.requiresDigitPrefix;... | java | public boolean appendPrefix(int tl, int td, StringBuffer sb) {
if (dr.scopeData != null) {
int ix = tl * 3 + td;
ScopeData sd = dr.scopeData[ix];
if (sd != null) {
String prefix = sd.prefix;
if (prefix != null) {
sb.append(prefix);
return sd.requiresDigitPrefix;... | [
"public",
"boolean",
"appendPrefix",
"(",
"int",
"tl",
",",
"int",
"td",
",",
"StringBuffer",
"sb",
")",
"{",
"if",
"(",
"dr",
".",
"scopeData",
"!=",
"null",
")",
"{",
"int",
"ix",
"=",
"tl",
"*",
"3",
"+",
"td",
";",
"ScopeData",
"sd",
"=",
"dr... | Append the appropriate prefix to the string builder, depending on whether and
how a limit and direction are to be displayed.
@param tl how and whether to display the time limit
@param td how and whether to display the time direction
@param sb the string builder to which to append the text
@return true if a following d... | [
"Append",
"the",
"appropriate",
"prefix",
"to",
"the",
"string",
"builder",
"depending",
"on",
"whether",
"and",
"how",
"a",
"limit",
"and",
"direction",
"are",
"to",
"be",
"displayed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L98-L111 |
34,929 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java | PeriodFormatterData.appendSuffix | public void appendSuffix(int tl, int td, StringBuffer sb) {
if (dr.scopeData != null) {
int ix = tl * 3 + td;
ScopeData sd = dr.scopeData[ix];
if (sd != null) {
String suffix = sd.suffix;
if (suffix != null) {
if (trace) {
System.out.println("appendSuffix '" +... | java | public void appendSuffix(int tl, int td, StringBuffer sb) {
if (dr.scopeData != null) {
int ix = tl * 3 + td;
ScopeData sd = dr.scopeData[ix];
if (sd != null) {
String suffix = sd.suffix;
if (suffix != null) {
if (trace) {
System.out.println("appendSuffix '" +... | [
"public",
"void",
"appendSuffix",
"(",
"int",
"tl",
",",
"int",
"td",
",",
"StringBuffer",
"sb",
")",
"{",
"if",
"(",
"dr",
".",
"scopeData",
"!=",
"null",
")",
"{",
"int",
"ix",
"=",
"tl",
"*",
"3",
"+",
"td",
";",
"ScopeData",
"sd",
"=",
"dr",
... | Append the appropriate suffix to the string builder, depending on whether and
how a limit and direction are to be displayed.
@param tl how and whether to display the time limit
@param td how and whether to display the time direction
@param sb the string builder to which to append the text | [
"Append",
"the",
"appropriate",
"suffix",
"to",
"the",
"string",
"builder",
"depending",
"on",
"whether",
"and",
"how",
"a",
"limit",
"and",
"direction",
"are",
"to",
"be",
"displayed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L121-L135 |
34,930 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java | PeriodFormatterData.appendCountValue | public void appendCountValue(int count, int integralDigits,
int decimalDigits, StringBuffer sb) {
int ival = count / 1000;
if (decimalDigits == 0) {
appendInteger(ival, integralDigits, 10, sb);
return;
}
if (dr.requiresDigitSeparator && sb.length() > 0) {
... | java | public void appendCountValue(int count, int integralDigits,
int decimalDigits, StringBuffer sb) {
int ival = count / 1000;
if (decimalDigits == 0) {
appendInteger(ival, integralDigits, 10, sb);
return;
}
if (dr.requiresDigitSeparator && sb.length() > 0) {
... | [
"public",
"void",
"appendCountValue",
"(",
"int",
"count",
",",
"int",
"integralDigits",
",",
"int",
"decimalDigits",
",",
"StringBuffer",
"sb",
")",
"{",
"int",
"ival",
"=",
"count",
"/",
"1000",
";",
"if",
"(",
"decimalDigits",
"==",
"0",
")",
"{",
"ap... | Append a count value to the builder.
@param count the count
@param integralDigits the number of integer digits to display
@param decimalDigits the number of decimal digits to display, <= 3
@param sb the string builder to which to append the text | [
"Append",
"a",
"count",
"value",
"to",
"the",
"builder",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L390-L413 |
34,931 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java | PeriodFormatterData.appendDigits | public void appendDigits(long num, int mindigits, int maxdigits,
StringBuffer sb) {
char[] buf = new char[maxdigits];
int ix = maxdigits;
while (ix > 0 && num > 0) {
buf[--ix] = (char)(dr.zero + (num % 10));
num /= 10;
}
for (int e = maxdigits - mindigits; ix... | java | public void appendDigits(long num, int mindigits, int maxdigits,
StringBuffer sb) {
char[] buf = new char[maxdigits];
int ix = maxdigits;
while (ix > 0 && num > 0) {
buf[--ix] = (char)(dr.zero + (num % 10));
num /= 10;
}
for (int e = maxdigits - mindigits; ix... | [
"public",
"void",
"appendDigits",
"(",
"long",
"num",
",",
"int",
"mindigits",
",",
"int",
"maxdigits",
",",
"StringBuffer",
"sb",
")",
"{",
"char",
"[",
"]",
"buf",
"=",
"new",
"char",
"[",
"maxdigits",
"]",
";",
"int",
"ix",
"=",
"maxdigits",
";",
... | Append digits to the string builder, using this.zero for '0' etc.
@param num the integer to append
@param mindigits the minimum number of digits to append
@param maxdigits the maximum number of digits to append
@param sb the string builder to which to append the text | [
"Append",
"digits",
"to",
"the",
"string",
"builder",
"using",
"this",
".",
"zero",
"for",
"0",
"etc",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L450-L462 |
34,932 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java | PeriodFormatterData.appendSkippedUnit | public void appendSkippedUnit(StringBuffer sb) {
if (dr.skippedUnitMarker != null) {
sb.append(dr.skippedUnitMarker);
}
} | java | public void appendSkippedUnit(StringBuffer sb) {
if (dr.skippedUnitMarker != null) {
sb.append(dr.skippedUnitMarker);
}
} | [
"public",
"void",
"appendSkippedUnit",
"(",
"StringBuffer",
"sb",
")",
"{",
"if",
"(",
"dr",
".",
"skippedUnitMarker",
"!=",
"null",
")",
"{",
"sb",
".",
"append",
"(",
"dr",
".",
"skippedUnitMarker",
")",
";",
"}",
"}"
] | Append a marker for skipped units internal to a string.
@param sb the string builder to which to append the text | [
"Append",
"a",
"marker",
"for",
"skipped",
"units",
"internal",
"to",
"a",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L468-L472 |
34,933 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java | PeriodFormatterData.appendUnitSeparator | public boolean appendUnitSeparator(TimeUnit unit, boolean longSep,
boolean afterFirst, boolean beforeLast,
StringBuffer sb) {
// long seps
// false, false "...b', '...d"
// false, true "...', and 'c"
// true, false - "a', '...c... | java | public boolean appendUnitSeparator(TimeUnit unit, boolean longSep,
boolean afterFirst, boolean beforeLast,
StringBuffer sb) {
// long seps
// false, false "...b', '...d"
// false, true "...', and 'c"
// true, false - "a', '...c... | [
"public",
"boolean",
"appendUnitSeparator",
"(",
"TimeUnit",
"unit",
",",
"boolean",
"longSep",
",",
"boolean",
"afterFirst",
",",
"boolean",
"beforeLast",
",",
"StringBuffer",
"sb",
")",
"{",
"// long seps",
"// false, false \"...b', '...d\"",
"// false, true \"...', an... | Append the appropriate separator between units
@param unit the unit to which to append the separator
@param afterFirst true if this is the first unit formatted
@param beforeLast true if this is the next-to-last unit to be formatted
@param sb the string builder to which to append the text
@return true if a prefix will ... | [
"Append",
"the",
"appropriate",
"separator",
"between",
"units"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/impl/PeriodFormatterData.java#L483-L500 |
34,934 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/UniqueIdentity.java | UniqueIdentity.encode | public void encode(DerOutputStream out, byte tag) throws IOException {
byte[] bytes = id.toByteArray();
int excessBits = bytes.length*8 - id.length();
out.write(tag);
out.putLength(bytes.length + 1);
out.write(excessBits);
out.write(bytes);
} | java | public void encode(DerOutputStream out, byte tag) throws IOException {
byte[] bytes = id.toByteArray();
int excessBits = bytes.length*8 - id.length();
out.write(tag);
out.putLength(bytes.length + 1);
out.write(excessBits);
out.write(bytes);
} | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
",",
"byte",
"tag",
")",
"throws",
"IOException",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"id",
".",
"toByteArray",
"(",
")",
";",
"int",
"excessBits",
"=",
"bytes",
".",
"length",
"*",
"8",
"-",
... | Encode the UniqueIdentity in DER form to the stream.
@param out the DerOutputStream to marshal the contents to.
@param tag enocode it under the following tag.
@exception IOException on errors. | [
"Encode",
"the",
"UniqueIdentity",
"in",
"DER",
"form",
"to",
"the",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/UniqueIdentity.java#L97-L106 |
34,935 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TreeWalker2Result.java | TreeWalker2Result.startNode | protected void startNode(int node) throws org.xml.sax.SAXException
{
XPathContext xcntxt = m_transformer.getXPathContext();
try
{
if (DTM.ELEMENT_NODE == m_dtm.getNodeType(node))
{
xcntxt.pushCurrentNode(node);
... | java | protected void startNode(int node) throws org.xml.sax.SAXException
{
XPathContext xcntxt = m_transformer.getXPathContext();
try
{
if (DTM.ELEMENT_NODE == m_dtm.getNodeType(node))
{
xcntxt.pushCurrentNode(node);
... | [
"protected",
"void",
"startNode",
"(",
"int",
"node",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"XPathContext",
"xcntxt",
"=",
"m_transformer",
".",
"getXPathContext",
"(",
")",
";",
"try",
"{",
"if",
"(",
"DTM",
".",
"ELEME... | Start traversal of the tree at the given node
@param node Starting node for traversal
@throws TransformerException | [
"Start",
"traversal",
"of",
"the",
"tree",
"at",
"the",
"given",
"node"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TreeWalker2Result.java#L102-L154 |
34,936 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CRLExtensions.java | CRLExtensions.encode | public void encode(OutputStream out, boolean isExplicit)
throws CRLException {
try {
DerOutputStream extOut = new DerOutputStream();
Collection<Extension> allExts = map.values();
Object[] objs = allExts.toArray();
for (int i = 0; i < objs.length; i++) {
... | java | public void encode(OutputStream out, boolean isExplicit)
throws CRLException {
try {
DerOutputStream extOut = new DerOutputStream();
Collection<Extension> allExts = map.values();
Object[] objs = allExts.toArray();
for (int i = 0; i < objs.length; i++) {
... | [
"public",
"void",
"encode",
"(",
"OutputStream",
"out",
",",
"boolean",
"isExplicit",
")",
"throws",
"CRLException",
"{",
"try",
"{",
"DerOutputStream",
"extOut",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"Collection",
"<",
"Extension",
">",
"allExts",
"="... | Encode the extensions in DER form to the stream.
@param out the DerOutputStream to marshal the contents to.
@param isExplicit the tag indicating whether this is an entry
extension (false) or a CRL extension (true).
@exception CRLException on encoding errors. | [
"Encode",
"the",
"extensions",
"in",
"DER",
"form",
"to",
"the",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CRLExtensions.java#L144-L176 |
34,937 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CRLExtensions.java | CRLExtensions.get | public Extension get(String alias) {
X509AttributeName attr = new X509AttributeName(alias);
String name;
String id = attr.getPrefix();
if (id.equalsIgnoreCase(X509CertImpl.NAME)) { // fully qualified
int index = alias.lastIndexOf(".");
name = alias.substring(index... | java | public Extension get(String alias) {
X509AttributeName attr = new X509AttributeName(alias);
String name;
String id = attr.getPrefix();
if (id.equalsIgnoreCase(X509CertImpl.NAME)) { // fully qualified
int index = alias.lastIndexOf(".");
name = alias.substring(index... | [
"public",
"Extension",
"get",
"(",
"String",
"alias",
")",
"{",
"X509AttributeName",
"attr",
"=",
"new",
"X509AttributeName",
"(",
"alias",
")",
";",
"String",
"name",
";",
"String",
"id",
"=",
"attr",
".",
"getPrefix",
"(",
")",
";",
"if",
"(",
"id",
... | Get the extension with this alias.
@param alias the identifier string for the extension to retrieve. | [
"Get",
"the",
"extension",
"with",
"this",
"alias",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CRLExtensions.java#L183-L193 |
34,938 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CRLExtensions.java | CRLExtensions.set | public void set(String alias, Object obj) {
map.put(alias, (Extension)obj);
} | java | public void set(String alias, Object obj) {
map.put(alias, (Extension)obj);
} | [
"public",
"void",
"set",
"(",
"String",
"alias",
",",
"Object",
"obj",
")",
"{",
"map",
".",
"put",
"(",
"alias",
",",
"(",
"Extension",
")",
"obj",
")",
";",
"}"
] | Set the extension value with this alias.
@param alias the identifier string for the extension to set.
@param obj the Object to set the extension identified by the
alias. | [
"Set",
"the",
"extension",
"value",
"with",
"this",
"alias",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/CRLExtensions.java#L202-L204 |
34,939 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/text/RbnfScannerProviderImpl.java | RbnfScannerProviderImpl.get | @Deprecated
public RbnfLenientScanner get(ULocale locale, String extras) {
RbnfLenientScanner result = null;
String key = locale.toString() + "/" + extras;
synchronized(cache) {
result = cache.get(key);
if (result != null) {
return result;
... | java | @Deprecated
public RbnfLenientScanner get(ULocale locale, String extras) {
RbnfLenientScanner result = null;
String key = locale.toString() + "/" + extras;
synchronized(cache) {
result = cache.get(key);
if (result != null) {
return result;
... | [
"@",
"Deprecated",
"public",
"RbnfLenientScanner",
"get",
"(",
"ULocale",
"locale",
",",
"String",
"extras",
")",
"{",
"RbnfLenientScanner",
"result",
"=",
"null",
";",
"String",
"key",
"=",
"locale",
".",
"toString",
"(",
")",
"+",
"\"/\"",
"+",
"extras",
... | Returns a collation-based scanner.
Only primary differences are treated as significant. This means that case
differences, accent differences, alternate spellings of the same letter
(e.g., ae and a-umlaut in German), ignorable characters, etc. are ignored in
matching the text. In many cases, numerals will be accepted... | [
"Returns",
"a",
"collation",
"-",
"based",
"scanner",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/text/RbnfScannerProviderImpl.java#L76-L91 |
34,940 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.compileOperation | private Expression compileOperation(Operation operation, int opPos)
throws TransformerException
{
int leftPos = getFirstChildPos(opPos);
int rightPos = getNextOpPos(leftPos);
operation.setLeftRight(compile(leftPos), compile(rightPos));
return operation;
} | java | private Expression compileOperation(Operation operation, int opPos)
throws TransformerException
{
int leftPos = getFirstChildPos(opPos);
int rightPos = getNextOpPos(leftPos);
operation.setLeftRight(compile(leftPos), compile(rightPos));
return operation;
} | [
"private",
"Expression",
"compileOperation",
"(",
"Operation",
"operation",
",",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"int",
"leftPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"int",
"rightPos",
"=",
"getNextOpPos",
"(",
"leftPos",
... | Bottle-neck compilation of an operation with left and right operands.
@param operation non-null reference to parent operation.
@param opPos The op map position of the parent operation.
@return reference to {@link org.apache.xpath.operations.Operation} instance.
@throws TransformerException if there is a syntax or ot... | [
"Bottle",
"-",
"neck",
"compilation",
"of",
"an",
"operation",
"with",
"left",
"and",
"right",
"operands",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L209-L219 |
34,941 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.compileUnary | private Expression compileUnary(UnaryOperation unary, int opPos)
throws TransformerException
{
int rightPos = getFirstChildPos(opPos);
unary.setRight(compile(rightPos));
return unary;
} | java | private Expression compileUnary(UnaryOperation unary, int opPos)
throws TransformerException
{
int rightPos = getFirstChildPos(opPos);
unary.setRight(compile(rightPos));
return unary;
} | [
"private",
"Expression",
"compileUnary",
"(",
"UnaryOperation",
"unary",
",",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"int",
"rightPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"unary",
".",
"setRight",
"(",
"compile",
"(",
"rightPos... | Bottle-neck compilation of a unary operation.
@param unary The parent unary operation.
@param opPos The position in the op map of the parent operation.
@return The unary argument.
@throws TransformerException if syntax or other error occurs. | [
"Bottle",
"-",
"neck",
"compilation",
"of",
"a",
"unary",
"operation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L231-L240 |
34,942 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.literal | protected Expression literal(int opPos)
{
opPos = getFirstChildPos(opPos);
return (XString) getTokenQueue().elementAt(getOp(opPos));
} | java | protected Expression literal(int opPos)
{
opPos = getFirstChildPos(opPos);
return (XString) getTokenQueue().elementAt(getOp(opPos));
} | [
"protected",
"Expression",
"literal",
"(",
"int",
"opPos",
")",
"{",
"opPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"return",
"(",
"XString",
")",
"getTokenQueue",
"(",
")",
".",
"elementAt",
"(",
"getOp",
"(",
"opPos",
")",
")",
";",
"}"
] | Compile a literal string value.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.objects.XString} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"a",
"literal",
"string",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L503-L509 |
34,943 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.numberlit | protected Expression numberlit(int opPos)
{
opPos = getFirstChildPos(opPos);
return (XNumber) getTokenQueue().elementAt(getOp(opPos));
} | java | protected Expression numberlit(int opPos)
{
opPos = getFirstChildPos(opPos);
return (XNumber) getTokenQueue().elementAt(getOp(opPos));
} | [
"protected",
"Expression",
"numberlit",
"(",
"int",
"opPos",
")",
"{",
"opPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"return",
"(",
"XNumber",
")",
"getTokenQueue",
"(",
")",
".",
"elementAt",
"(",
"getOp",
"(",
"opPos",
")",
")",
";",
"}"
] | Compile a literal number value.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.objects.XNumber} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"a",
"literal",
"number",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L520-L526 |
34,944 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.variable | protected Expression variable(int opPos) throws TransformerException
{
Variable var = new Variable();
opPos = getFirstChildPos(opPos);
int nsPos = getOp(opPos);
java.lang.String namespace
= (OpCodes.EMPTY == nsPos) ? null
: (java.lang.String) getTokenQueue... | java | protected Expression variable(int opPos) throws TransformerException
{
Variable var = new Variable();
opPos = getFirstChildPos(opPos);
int nsPos = getOp(opPos);
java.lang.String namespace
= (OpCodes.EMPTY == nsPos) ? null
: (java.lang.String) getTokenQueue... | [
"protected",
"Expression",
"variable",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"Variable",
"var",
"=",
"new",
"Variable",
"(",
")",
";",
"opPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"int",
"nsPos",
"=",
"getOp",
"(",
"... | Compile a variable reference.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.operations.Variable} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"a",
"variable",
"reference",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L537-L555 |
34,945 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.matchPattern | protected Expression matchPattern(int opPos) throws TransformerException
{
locPathDepth++;
try
{
// First, count...
int nextOpPos = opPos;
int i;
for (i = 0; getOp(nextOpPos) == OpCodes.OP_LOCATIONPATHPATTERN; i++)
{
nextOpPos = getNextOpPos(nextOpPos);
}
... | java | protected Expression matchPattern(int opPos) throws TransformerException
{
locPathDepth++;
try
{
// First, count...
int nextOpPos = opPos;
int i;
for (i = 0; getOp(nextOpPos) == OpCodes.OP_LOCATIONPATHPATTERN; i++)
{
nextOpPos = getNextOpPos(nextOpPos);
}
... | [
"protected",
"Expression",
"matchPattern",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"locPathDepth",
"++",
";",
"try",
"{",
"// First, count...",
"int",
"nextOpPos",
"=",
"opPos",
";",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
... | Compile an entire match pattern expression.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.patterns.UnionPattern} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"an",
"entire",
"match",
"pattern",
"expression",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L678-L713 |
34,946 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.locationPathPattern | public Expression locationPathPattern(int opPos)
throws TransformerException
{
opPos = getFirstChildPos(opPos);
return stepPattern(opPos, 0, null);
} | java | public Expression locationPathPattern(int opPos)
throws TransformerException
{
opPos = getFirstChildPos(opPos);
return stepPattern(opPos, 0, null);
} | [
"public",
"Expression",
"locationPathPattern",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"opPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"return",
"stepPattern",
"(",
"opPos",
",",
"0",
",",
"null",
")",
";",
"}"
] | Compile a location match pattern unit expression.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.patterns.StepPattern} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"a",
"location",
"match",
"pattern",
"unit",
"expression",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L724-L731 |
34,947 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.stepPattern | protected StepPattern stepPattern(
int opPos, int stepCount, StepPattern ancestorPattern)
throws TransformerException
{
int startOpPos = opPos;
int stepType = getOp(opPos);
if (OpCodes.ENDOP == stepType)
{
return null;
}
boolean addMagicSelf = true;
int ... | java | protected StepPattern stepPattern(
int opPos, int stepCount, StepPattern ancestorPattern)
throws TransformerException
{
int startOpPos = opPos;
int stepType = getOp(opPos);
if (OpCodes.ENDOP == stepType)
{
return null;
}
boolean addMagicSelf = true;
int ... | [
"protected",
"StepPattern",
"stepPattern",
"(",
"int",
"opPos",
",",
"int",
"stepCount",
",",
"StepPattern",
"ancestorPattern",
")",
"throws",
"TransformerException",
"{",
"int",
"startOpPos",
"=",
"opPos",
";",
"int",
"stepType",
"=",
"getOp",
"(",
"opPos",
")"... | Compile a step pattern unit expression, used for both location paths
and match patterns.
@param opPos The current position in the m_opMap array.
@param stepCount The number of steps to expect.
@param ancestorPattern The owning StepPattern, which may be null.
@return reference to {@link org.apache.xpath.patterns.StepP... | [
"Compile",
"a",
"step",
"pattern",
"unit",
"expression",
"used",
"for",
"both",
"location",
"paths",
"and",
"match",
"patterns",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L821-L936 |
34,948 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.getCompiledPredicates | public Expression[] getCompiledPredicates(int opPos)
throws TransformerException
{
int count = countPredicates(opPos);
if (count > 0)
{
Expression[] predicates = new Expression[count];
compilePredicates(opPos, predicates);
return predicates;
}
return null;
} | java | public Expression[] getCompiledPredicates(int opPos)
throws TransformerException
{
int count = countPredicates(opPos);
if (count > 0)
{
Expression[] predicates = new Expression[count];
compilePredicates(opPos, predicates);
return predicates;
}
return null;
} | [
"public",
"Expression",
"[",
"]",
"getCompiledPredicates",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"int",
"count",
"=",
"countPredicates",
"(",
"opPos",
")",
";",
"if",
"(",
"count",
">",
"0",
")",
"{",
"Expression",
"[",
"]",
"pre... | Compile a zero or more predicates for a given match pattern.
@param opPos The position of the first predicate the m_opMap array.
@return reference to array of {@link org.apache.xpath.Expression} instances.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"a",
"zero",
"or",
"more",
"predicates",
"for",
"a",
"given",
"match",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L947-L963 |
34,949 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.countPredicates | public int countPredicates(int opPos) throws TransformerException
{
int count = 0;
while (OpCodes.OP_PREDICATE == getOp(opPos))
{
count++;
opPos = getNextOpPos(opPos);
}
return count;
} | java | public int countPredicates(int opPos) throws TransformerException
{
int count = 0;
while (OpCodes.OP_PREDICATE == getOp(opPos))
{
count++;
opPos = getNextOpPos(opPos);
}
return count;
} | [
"public",
"int",
"countPredicates",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"int",
"count",
"=",
"0",
";",
"while",
"(",
"OpCodes",
".",
"OP_PREDICATE",
"==",
"getOp",
"(",
"opPos",
")",
")",
"{",
"count",
"++",
";",
"opPos",
"="... | Count the number of predicates in the step.
@param opPos The position of the first predicate the m_opMap array.
@return The number of predicates for this step.
@throws TransformerException if a error occurs creating the Expression. | [
"Count",
"the",
"number",
"of",
"predicates",
"in",
"the",
"step",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L974-L987 |
34,950 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.compilePredicates | private void compilePredicates(int opPos, Expression[] predicates)
throws TransformerException
{
for (int i = 0; OpCodes.OP_PREDICATE == getOp(opPos); i++)
{
predicates[i] = predicate(opPos);
opPos = getNextOpPos(opPos);
}
} | java | private void compilePredicates(int opPos, Expression[] predicates)
throws TransformerException
{
for (int i = 0; OpCodes.OP_PREDICATE == getOp(opPos); i++)
{
predicates[i] = predicate(opPos);
opPos = getNextOpPos(opPos);
}
} | [
"private",
"void",
"compilePredicates",
"(",
"int",
"opPos",
",",
"Expression",
"[",
"]",
"predicates",
")",
"throws",
"TransformerException",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"OpCodes",
".",
"OP_PREDICATE",
"==",
"getOp",
"(",
"opPos",
")",
";"... | Compiles predicates in the step.
@param opPos The position of the first predicate the m_opMap array.
@param predicates An empty pre-determined array of
{@link org.apache.xpath.Expression}s, that will be filled in.
@throws TransformerException | [
"Compiles",
"predicates",
"in",
"the",
"step",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L998-L1007 |
34,951 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.compileFunction | Expression compileFunction(int opPos) throws TransformerException
{
int endFunc = opPos + getOp(opPos + 1) - 1;
opPos = getFirstChildPos(opPos);
int funcID = getOp(opPos);
opPos++;
if (-1 != funcID)
{
Function func = m_functionTable.getFunction(funcID);
/**
* It ... | java | Expression compileFunction(int opPos) throws TransformerException
{
int endFunc = opPos + getOp(opPos + 1) - 1;
opPos = getFirstChildPos(opPos);
int funcID = getOp(opPos);
opPos++;
if (-1 != funcID)
{
Function func = m_functionTable.getFunction(funcID);
/**
* It ... | [
"Expression",
"compileFunction",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"int",
"endFunc",
"=",
"opPos",
"+",
"getOp",
"(",
"opPos",
"+",
"1",
")",
"-",
"1",
";",
"opPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
";",
"int",
"... | Compile a built-in XPath function.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.functions.Function} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"a",
"built",
"-",
"in",
"XPath",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L1018-L1075 |
34,952 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java | Compiler.compileExtension | private Expression compileExtension(int opPos)
throws TransformerException
{
int endExtFunc = opPos + getOp(opPos + 1) - 1;
opPos = getFirstChildPos(opPos);
java.lang.String ns = (java.lang.String) getTokenQueue().elementAt(getOp(opPos));
opPos++;
java.lang.String funcName =
(... | java | private Expression compileExtension(int opPos)
throws TransformerException
{
int endExtFunc = opPos + getOp(opPos + 1) - 1;
opPos = getFirstChildPos(opPos);
java.lang.String ns = (java.lang.String) getTokenQueue().elementAt(getOp(opPos));
opPos++;
java.lang.String funcName =
(... | [
"private",
"Expression",
"compileExtension",
"(",
"int",
"opPos",
")",
"throws",
"TransformerException",
"{",
"int",
"endExtFunc",
"=",
"opPos",
"+",
"getOp",
"(",
"opPos",
"+",
"1",
")",
"-",
"1",
";",
"opPos",
"=",
"getFirstChildPos",
"(",
"opPos",
")",
... | Compile an extension function.
@param opPos The current position in the m_opMap array.
@return reference to {@link org.apache.xpath.functions.FuncExtFunction} instance.
@throws TransformerException if a error occurs creating the Expression. | [
"Compile",
"an",
"extension",
"function",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/compiler/Compiler.java#L1100-L1144 |
34,953 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Observable.java | Observable.addObserver | public synchronized void addObserver(Observer o) {
if (o == null)
throw new NullPointerException();
if (!observers.contains(o)) {
observers.add(o);
}
} | java | public synchronized void addObserver(Observer o) {
if (o == null)
throw new NullPointerException();
if (!observers.contains(o)) {
observers.add(o);
}
} | [
"public",
"synchronized",
"void",
"addObserver",
"(",
"Observer",
"o",
")",
"{",
"if",
"(",
"o",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"if",
"(",
"!",
"observers",
".",
"contains",
"(",
"o",
")",
")",
"{",
"observers... | Adds an observer to the set of observers for this object, provided
that it is not the same as some observer already in the set.
The order in which notifications will be delivered to multiple
observers is not specified. See the class comment.
@param o an observer to be added.
@throws NullPointerException if the p... | [
"Adds",
"an",
"observer",
"to",
"the",
"set",
"of",
"observers",
"for",
"this",
"object",
"provided",
"that",
"it",
"is",
"not",
"the",
"same",
"as",
"some",
"observer",
"already",
"in",
"the",
"set",
".",
"The",
"order",
"in",
"which",
"notifications",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Observable.java#L81-L87 |
34,954 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java | Collation.incTwoBytePrimaryByOffset | public static long incTwoBytePrimaryByOffset(long basePrimary, boolean isCompressible,
int offset) {
// Extract the second byte, minus the minimum byte value,
// plus the offset, modulo the number of usable byte values, plus the minimum.
// Reserve t... | java | public static long incTwoBytePrimaryByOffset(long basePrimary, boolean isCompressible,
int offset) {
// Extract the second byte, minus the minimum byte value,
// plus the offset, modulo the number of usable byte values, plus the minimum.
// Reserve t... | [
"public",
"static",
"long",
"incTwoBytePrimaryByOffset",
"(",
"long",
"basePrimary",
",",
"boolean",
"isCompressible",
",",
"int",
"offset",
")",
"{",
"// Extract the second byte, minus the minimum byte value,",
"// plus the offset, modulo the number of usable byte values, plus the m... | Increments a 2-byte primary by a code point offset. | [
"Increments",
"a",
"2",
"-",
"byte",
"primary",
"by",
"a",
"code",
"point",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java#L463-L480 |
34,955 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java | Collation.incThreeBytePrimaryByOffset | public static long incThreeBytePrimaryByOffset(long basePrimary, boolean isCompressible,
int offset) {
// Extract the third byte, minus the minimum byte value,
// plus the offset, modulo the number of usable byte values, plus the minimum.
offset +=... | java | public static long incThreeBytePrimaryByOffset(long basePrimary, boolean isCompressible,
int offset) {
// Extract the third byte, minus the minimum byte value,
// plus the offset, modulo the number of usable byte values, plus the minimum.
offset +=... | [
"public",
"static",
"long",
"incThreeBytePrimaryByOffset",
"(",
"long",
"basePrimary",
",",
"boolean",
"isCompressible",
",",
"int",
"offset",
")",
"{",
"// Extract the third byte, minus the minimum byte value,",
"// plus the offset, modulo the number of usable byte values, plus the ... | Increments a 3-byte primary by a code point offset. | [
"Increments",
"a",
"3",
"-",
"byte",
"primary",
"by",
"a",
"code",
"point",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java#L485-L505 |
34,956 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java | Collation.getThreeBytePrimaryForOffsetData | static long getThreeBytePrimaryForOffsetData(int c, long dataCE) {
long p = dataCE >>> 32; // three-byte primary pppppp00
int lower32 = (int)dataCE; // base code point b & step s: bbbbbbss (bit 7: isCompressible)
int offset = (c - (lower32 >> 8)) * (lower32 & 0x7f); // delta * increment
... | java | static long getThreeBytePrimaryForOffsetData(int c, long dataCE) {
long p = dataCE >>> 32; // three-byte primary pppppp00
int lower32 = (int)dataCE; // base code point b & step s: bbbbbbss (bit 7: isCompressible)
int offset = (c - (lower32 >> 8)) * (lower32 & 0x7f); // delta * increment
... | [
"static",
"long",
"getThreeBytePrimaryForOffsetData",
"(",
"int",
"c",
",",
"long",
"dataCE",
")",
"{",
"long",
"p",
"=",
"dataCE",
">>>",
"32",
";",
"// three-byte primary pppppp00",
"int",
"lower32",
"=",
"(",
"int",
")",
"dataCE",
";",
"// base code point b &... | Computes a 3-byte primary for c's OFFSET_TAG data "CE". | [
"Computes",
"a",
"3",
"-",
"byte",
"primary",
"for",
"c",
"s",
"OFFSET_TAG",
"data",
"CE",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java#L564-L570 |
34,957 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java | Collation.unassignedPrimaryFromCodePoint | static long unassignedPrimaryFromCodePoint(int c) {
// Create a gap before U+0000. Use c=-1 for [first unassigned].
++c;
// Fourth byte: 18 values, every 14th byte value (gap of 13).
long primary = 2 + (c % 18) * 14;
c /= 18;
// Third byte: 254 values.
primary |= ... | java | static long unassignedPrimaryFromCodePoint(int c) {
// Create a gap before U+0000. Use c=-1 for [first unassigned].
++c;
// Fourth byte: 18 values, every 14th byte value (gap of 13).
long primary = 2 + (c % 18) * 14;
c /= 18;
// Third byte: 254 values.
primary |= ... | [
"static",
"long",
"unassignedPrimaryFromCodePoint",
"(",
"int",
"c",
")",
"{",
"// Create a gap before U+0000. Use c=-1 for [first unassigned].",
"++",
"c",
";",
"// Fourth byte: 18 values, every 14th byte value (gap of 13).",
"long",
"primary",
"=",
"2",
"+",
"(",
"c",
"%",
... | Returns the unassigned-character implicit primary weight for any valid code point c. | [
"Returns",
"the",
"unassigned",
"-",
"character",
"implicit",
"primary",
"weight",
"for",
"any",
"valid",
"code",
"point",
"c",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/coll/Collation.java#L575-L588 |
34,958 | google/j2objc | examples/protobuf/AddPerson.java | AddPerson.PromptForAddress | static Person PromptForAddress(BufferedReader stdin,
PrintStream stdout) throws IOException {
Person.Builder person = Person.newBuilder();
stdout.print("Enter person ID: ");
person.setId(Integer.valueOf(stdin.readLine()));
stdout.print("Enter name: ");
person.setNa... | java | static Person PromptForAddress(BufferedReader stdin,
PrintStream stdout) throws IOException {
Person.Builder person = Person.newBuilder();
stdout.print("Enter person ID: ");
person.setId(Integer.valueOf(stdin.readLine()));
stdout.print("Enter name: ");
person.setNa... | [
"static",
"Person",
"PromptForAddress",
"(",
"BufferedReader",
"stdin",
",",
"PrintStream",
"stdout",
")",
"throws",
"IOException",
"{",
"Person",
".",
"Builder",
"person",
"=",
"Person",
".",
"newBuilder",
"(",
")",
";",
"stdout",
".",
"print",
"(",
"\"Enter ... | This function fills in a Person message based on user input. | [
"This",
"function",
"fills",
"in",
"a",
"Person",
"message",
"based",
"on",
"user",
"input",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/examples/protobuf/AddPerson.java#L15-L57 |
34,959 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/security/auth/x500/X500Principal.java | X500Principal.writeObject | private void writeObject(java.io.ObjectOutputStream s)
throws IOException {
s.writeObject(thisX500Name.getEncodedInternal());
} | java | private void writeObject(java.io.ObjectOutputStream s)
throws IOException {
s.writeObject(thisX500Name.getEncodedInternal());
} | [
"private",
"void",
"writeObject",
"(",
"java",
".",
"io",
".",
"ObjectOutputStream",
"s",
")",
"throws",
"IOException",
"{",
"s",
".",
"writeObject",
"(",
"thisX500Name",
".",
"getEncodedInternal",
"(",
")",
")",
";",
"}"
] | Save the X500Principal object to a stream.
@serialData this {@code X500Principal} is serialized
by writing out its DER-encoded form
(the value of {@code getEncoded} is serialized). | [
"Save",
"the",
"X500Principal",
"object",
"to",
"a",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/security/auth/x500/X500Principal.java#L499-L502 |
34,960 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/IntVector.java | IntVector.addElements | public final void addElements(int value, int numberOfElements)
{
if ((m_firstFree + numberOfElements) >= m_mapSize)
{
m_mapSize += (m_blocksize+numberOfElements);
int newMap[] = new int[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
f... | java | public final void addElements(int value, int numberOfElements)
{
if ((m_firstFree + numberOfElements) >= m_mapSize)
{
m_mapSize += (m_blocksize+numberOfElements);
int newMap[] = new int[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
f... | [
"public",
"final",
"void",
"addElements",
"(",
"int",
"value",
",",
"int",
"numberOfElements",
")",
"{",
"if",
"(",
"(",
"m_firstFree",
"+",
"numberOfElements",
")",
">=",
"m_mapSize",
")",
"{",
"m_mapSize",
"+=",
"(",
"m_blocksize",
"+",
"numberOfElements",
... | Append several int values onto the vector.
@param value Int to add to the list | [
"Append",
"several",
"int",
"values",
"onto",
"the",
"vector",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/IntVector.java#L150-L169 |
34,961 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Number.java | Number.num | public double num(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
return m_right.num(xctxt);
} | java | public double num(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
return m_right.num(xctxt);
} | [
"public",
"double",
"num",
"(",
"XPathContext",
"xctxt",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"return",
"m_right",
".",
"num",
"(",
"xctxt",
")",
";",
"}"
] | Evaluate this operation directly to a double.
@param xctxt The runtime execution context.
@return The result of the operation as a double.
@throws javax.xml.transform.TransformerException | [
"Evaluate",
"this",
"operation",
"directly",
"to",
"a",
"double",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Number.java#L62-L67 |
34,962 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/PackageInfoLookup.java | PackageInfoLookup.hasAnnotation | private static boolean hasAnnotation(String pkgInfo, String annotation) {
if (!annotation.contains(".")) {
ErrorUtil.warning(annotation + " is not a fully qualified name");
}
if (pkgInfo.contains("@" + annotation)) {
return true;
}
int idx = annotation.lastIndexOf(".");
String annota... | java | private static boolean hasAnnotation(String pkgInfo, String annotation) {
if (!annotation.contains(".")) {
ErrorUtil.warning(annotation + " is not a fully qualified name");
}
if (pkgInfo.contains("@" + annotation)) {
return true;
}
int idx = annotation.lastIndexOf(".");
String annota... | [
"private",
"static",
"boolean",
"hasAnnotation",
"(",
"String",
"pkgInfo",
",",
"String",
"annotation",
")",
"{",
"if",
"(",
"!",
"annotation",
".",
"contains",
"(",
"\".\"",
")",
")",
"{",
"ErrorUtil",
".",
"warning",
"(",
"annotation",
"+",
"\" is not a fu... | Return true if pkgInfo has the specified annotation.
@param pkgInfo package-info source code
@param annotation fully qualified name of the annotation | [
"Return",
"true",
"if",
"pkgInfo",
"has",
"the",
"specified",
"annotation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/PackageInfoLookup.java#L134-L154 |
34,963 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/Buffer.java | Buffer.limit | public final Buffer limit(int newLimit) {
if ((newLimit > capacity) || (newLimit < 0))
throw new IllegalArgumentException();
limit = newLimit;
if (position > limit) position = limit;
if (mark > limit) mark = -1;
return this;
} | java | public final Buffer limit(int newLimit) {
if ((newLimit > capacity) || (newLimit < 0))
throw new IllegalArgumentException();
limit = newLimit;
if (position > limit) position = limit;
if (mark > limit) mark = -1;
return this;
} | [
"public",
"final",
"Buffer",
"limit",
"(",
"int",
"newLimit",
")",
"{",
"if",
"(",
"(",
"newLimit",
">",
"capacity",
")",
"||",
"(",
"newLimit",
"<",
"0",
")",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
")",
";",
"limit",
"=",
"newLimit",
";... | Sets this buffer's limit. If the position is larger than the new limit
then it is set to the new limit. If the mark is defined and larger than
the new limit then it is discarded.
@param newLimit The new limit value; must be non-negative
and no larger than this buffer's capacity
@return This buffer
@throws IllegalArg... | [
"Sets",
"this",
"buffer",
"s",
"limit",
".",
"If",
"the",
"position",
"is",
"larger",
"than",
"the",
"new",
"limit",
"then",
"it",
"is",
"set",
"to",
"the",
"new",
"limit",
".",
"If",
"the",
"mark",
"is",
"defined",
"and",
"larger",
"than",
"the",
"n... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/nio/Buffer.java#L274-L281 |
34,964 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java | DTMNamedNodeMap.getLength | public int getLength()
{
if (m_count == -1)
{
short count = 0;
for (int n = dtm.getFirstAttribute(element); n != -1;
n = dtm.getNextAttribute(n))
{
++count;
}
m_count = count;
}
return (int) m_count;
} | java | public int getLength()
{
if (m_count == -1)
{
short count = 0;
for (int n = dtm.getFirstAttribute(element); n != -1;
n = dtm.getNextAttribute(n))
{
++count;
}
m_count = count;
}
return (int) m_count;
} | [
"public",
"int",
"getLength",
"(",
")",
"{",
"if",
"(",
"m_count",
"==",
"-",
"1",
")",
"{",
"short",
"count",
"=",
"0",
";",
"for",
"(",
"int",
"n",
"=",
"dtm",
".",
"getFirstAttribute",
"(",
"element",
")",
";",
"n",
"!=",
"-",
"1",
";",
"n",... | Return the number of Attributes on this Element
@return The number of nodes in this map. | [
"Return",
"the",
"number",
"of",
"Attributes",
"on",
"this",
"Element"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java#L73-L90 |
34,965 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java | DTMNamedNodeMap.getNamedItem | public Node getNamedItem(String name)
{
for (int n = dtm.getFirstAttribute(element); n != DTM.NULL;
n = dtm.getNextAttribute(n))
{
if (dtm.getNodeName(n).equals(name))
return dtm.getNode(n);
}
return null;
} | java | public Node getNamedItem(String name)
{
for (int n = dtm.getFirstAttribute(element); n != DTM.NULL;
n = dtm.getNextAttribute(n))
{
if (dtm.getNodeName(n).equals(name))
return dtm.getNode(n);
}
return null;
} | [
"public",
"Node",
"getNamedItem",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"n",
"=",
"dtm",
".",
"getFirstAttribute",
"(",
"element",
")",
";",
"n",
"!=",
"DTM",
".",
"NULL",
";",
"n",
"=",
"dtm",
".",
"getNextAttribute",
"(",
"n",
")",
... | Retrieves a node specified by name.
@param name The <code>nodeName</code> of a node to retrieve.
@return A <code>Node</code> (of any type) with the specified
<code>nodeName</code>, or <code>null</code> if it does not identify
any node in this map. | [
"Retrieves",
"a",
"node",
"specified",
"by",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java#L99-L110 |
34,966 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.setTimeInMillis | public void setTimeInMillis(long millis) {
// If we don't need to recalculate the calendar field values,
// do nothing.
// BEGIN Android-changed: Removed ZoneInfo support
// if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet
// && (zone instanceof ZoneInfo) && !((ZoneIn... | java | public void setTimeInMillis(long millis) {
// If we don't need to recalculate the calendar field values,
// do nothing.
// BEGIN Android-changed: Removed ZoneInfo support
// if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet
// && (zone instanceof ZoneInfo) && !((ZoneIn... | [
"public",
"void",
"setTimeInMillis",
"(",
"long",
"millis",
")",
"{",
"// If we don't need to recalculate the calendar field values,",
"// do nothing.",
"// BEGIN Android-changed: Removed ZoneInfo support",
"// if (time == millis && isTimeSet && areFieldsSet && areAllFieldsSet",
"// ... | Sets this Calendar's current time from the given long value.
@param millis the new time in UTC milliseconds from the epoch.
@see #setTime(Date)
@see #getTimeInMillis() | [
"Sets",
"this",
"Calendar",
"s",
"current",
"time",
"from",
"the",
"given",
"long",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L1765-L1781 |
34,967 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.set | public void set(int field, int value)
{
// If the fields are partially normalized, calculate all the
// fields before changing any fields.
if (areFieldsSet && !areAllFieldsSet) {
computeFields();
}
internalSet(field, value);
isTimeSet = false;
areF... | java | public void set(int field, int value)
{
// If the fields are partially normalized, calculate all the
// fields before changing any fields.
if (areFieldsSet && !areAllFieldsSet) {
computeFields();
}
internalSet(field, value);
isTimeSet = false;
areF... | [
"public",
"void",
"set",
"(",
"int",
"field",
",",
"int",
"value",
")",
"{",
"// If the fields are partially normalized, calculate all the",
"// fields before changing any fields.",
"if",
"(",
"areFieldsSet",
"&&",
"!",
"areAllFieldsSet",
")",
"{",
"computeFields",
"(",
... | Sets the given calendar field to the given value. The value is not
interpreted by this method regardless of the leniency mode.
@param field the given calendar field.
@param value the value to be set for the given calendar field.
@throws ArrayIndexOutOfBoundsException if the specified field is out of range
(<code>field... | [
"Sets",
"the",
"given",
"calendar",
"field",
"to",
"the",
"given",
"value",
".",
"The",
"value",
"is",
"not",
"interpreted",
"by",
"this",
"method",
"regardless",
"of",
"the",
"leniency",
"mode",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L1849-L1864 |
34,968 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.aggregateStamp | private static int aggregateStamp(int stamp_a, int stamp_b) {
if (stamp_a == UNSET || stamp_b == UNSET) {
return UNSET;
}
return (stamp_a > stamp_b) ? stamp_a : stamp_b;
} | java | private static int aggregateStamp(int stamp_a, int stamp_b) {
if (stamp_a == UNSET || stamp_b == UNSET) {
return UNSET;
}
return (stamp_a > stamp_b) ? stamp_a : stamp_b;
} | [
"private",
"static",
"int",
"aggregateStamp",
"(",
"int",
"stamp_a",
",",
"int",
"stamp_b",
")",
"{",
"if",
"(",
"stamp_a",
"==",
"UNSET",
"||",
"stamp_b",
"==",
"UNSET",
")",
"{",
"return",
"UNSET",
";",
"}",
"return",
"(",
"stamp_a",
">",
"stamp_b",
... | Returns the pseudo-time-stamp for two fields, given their
individual pseudo-time-stamps. If either of the fields
is unset, then the aggregate is unset. Otherwise, the
aggregate is the later of the two stamps. | [
"Returns",
"the",
"pseudo",
"-",
"time",
"-",
"stamp",
"for",
"two",
"fields",
"given",
"their",
"individual",
"pseudo",
"-",
"time",
"-",
"stamps",
".",
"If",
"either",
"of",
"the",
"fields",
"is",
"unset",
"then",
"the",
"aggregate",
"is",
"unset",
"."... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L2525-L2530 |
34,969 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.setTimeZone | public void setTimeZone(TimeZone value)
{
zone = value;
sharedZone = false;
/* Recompute the fields from the time using the new zone. This also
* works if isTimeSet is false (after a call to set()). In that case
* the time will be computed from the fields using the new zo... | java | public void setTimeZone(TimeZone value)
{
zone = value;
sharedZone = false;
/* Recompute the fields from the time using the new zone. This also
* works if isTimeSet is false (after a call to set()). In that case
* the time will be computed from the fields using the new zo... | [
"public",
"void",
"setTimeZone",
"(",
"TimeZone",
"value",
")",
"{",
"zone",
"=",
"value",
";",
"sharedZone",
"=",
"false",
";",
"/* Recompute the fields from the time using the new zone. This also\n * works if isTimeSet is false (after a call to set()). In that case\n ... | Sets the time zone with the given time zone value.
@param value the given time zone. | [
"Sets",
"the",
"time",
"zone",
"with",
"the",
"given",
"time",
"zone",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L2783-L2797 |
34,970 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.getTimeZone | public TimeZone getTimeZone()
{
// If the TimeZone object is shared by other Calendar instances, then
// create a clone.
if (sharedZone) {
zone = (TimeZone) zone.clone();
sharedZone = false;
}
return zone;
} | java | public TimeZone getTimeZone()
{
// If the TimeZone object is shared by other Calendar instances, then
// create a clone.
if (sharedZone) {
zone = (TimeZone) zone.clone();
sharedZone = false;
}
return zone;
} | [
"public",
"TimeZone",
"getTimeZone",
"(",
")",
"{",
"// If the TimeZone object is shared by other Calendar instances, then",
"// create a clone.",
"if",
"(",
"sharedZone",
")",
"{",
"zone",
"=",
"(",
"TimeZone",
")",
"zone",
".",
"clone",
"(",
")",
";",
"sharedZone",
... | Gets the time zone.
@return the time zone object associated with this calendar. | [
"Gets",
"the",
"time",
"zone",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L2804-L2813 |
34,971 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.setWeekCountData | private void setWeekCountData(Locale desiredLocale)
{
/* try to get the Locale data from the cache */
int[] data = cachedLocaleData.get(desiredLocale);
if (data == null) { /* cache miss */
data = new int[2];
// BEGIN Android-changed: Use ICU4C to get week data.
... | java | private void setWeekCountData(Locale desiredLocale)
{
/* try to get the Locale data from the cache */
int[] data = cachedLocaleData.get(desiredLocale);
if (data == null) { /* cache miss */
data = new int[2];
// BEGIN Android-changed: Use ICU4C to get week data.
... | [
"private",
"void",
"setWeekCountData",
"(",
"Locale",
"desiredLocale",
")",
"{",
"/* try to get the Locale data from the cache */",
"int",
"[",
"]",
"data",
"=",
"cachedLocaleData",
".",
"get",
"(",
"desiredLocale",
")",
";",
"if",
"(",
"data",
"==",
"null",
")",
... | Both firstDayOfWeek and minimalDaysInFirstWeek are locale-dependent.
They are used to figure out the week count for a specific date for
a given locale. These must be set when a Calendar is constructed.
@param desiredLocale the given locale. | [
"Both",
"firstDayOfWeek",
"and",
"minimalDaysInFirstWeek",
"are",
"locale",
"-",
"dependent",
".",
"They",
"are",
"used",
"to",
"figure",
"out",
"the",
"week",
"count",
"for",
"a",
"specific",
"date",
"for",
"a",
"given",
"locale",
".",
"These",
"must",
"be"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L3298-L3315 |
34,972 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java | Calendar.invalidateWeekFields | private void invalidateWeekFields()
{
if (stamp[WEEK_OF_MONTH] != COMPUTED &&
stamp[WEEK_OF_YEAR] != COMPUTED) {
return;
}
// We have to check the new values of these fields after changing
// firstDayOfWeek and/or minimalDaysInFirstWeek. If the field values
... | java | private void invalidateWeekFields()
{
if (stamp[WEEK_OF_MONTH] != COMPUTED &&
stamp[WEEK_OF_YEAR] != COMPUTED) {
return;
}
// We have to check the new values of these fields after changing
// firstDayOfWeek and/or minimalDaysInFirstWeek. If the field values
... | [
"private",
"void",
"invalidateWeekFields",
"(",
")",
"{",
"if",
"(",
"stamp",
"[",
"WEEK_OF_MONTH",
"]",
"!=",
"COMPUTED",
"&&",
"stamp",
"[",
"WEEK_OF_YEAR",
"]",
"!=",
"COMPUTED",
")",
"{",
"return",
";",
"}",
"// We have to check the new values of these fields ... | Sets the WEEK_OF_MONTH and WEEK_OF_YEAR fields to new values with the
new parameter value if they have been calculated internally. | [
"Sets",
"the",
"WEEK_OF_MONTH",
"and",
"WEEK_OF_YEAR",
"fields",
"to",
"new",
"values",
"with",
"the",
"new",
"parameter",
"value",
"if",
"they",
"have",
"been",
"calculated",
"internally",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Calendar.java#L3382-L3410 |
34,973 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java | DOMHelper.isNodeTheSame | public static boolean isNodeTheSame(Node node1, Node node2)
{
if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy)
return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2);
else
return (node1 == node2);
} | java | public static boolean isNodeTheSame(Node node1, Node node2)
{
if (node1 instanceof DTMNodeProxy && node2 instanceof DTMNodeProxy)
return ((DTMNodeProxy)node1).equals((DTMNodeProxy)node2);
else
return (node1 == node2);
} | [
"public",
"static",
"boolean",
"isNodeTheSame",
"(",
"Node",
"node1",
",",
"Node",
"node2",
")",
"{",
"if",
"(",
"node1",
"instanceof",
"DTMNodeProxy",
"&&",
"node2",
"instanceof",
"DTMNodeProxy",
")",
"return",
"(",
"(",
"DTMNodeProxy",
")",
"node1",
")",
"... | Use DTMNodeProxy to determine whether two nodes are the same.
@param node1 The first DOM node to compare.
@param node2 The second DOM node to compare.
@return true if the two nodes are the same. | [
"Use",
"DTMNodeProxy",
"to",
"determine",
"whether",
"two",
"nodes",
"are",
"the",
"same",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java#L339-L345 |
34,974 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java | DOMHelper.getNamespaceForPrefix | public String getNamespaceForPrefix(String prefix, Element namespaceContext)
{
int type;
Node parent = namespaceContext;
String namespace = null;
if (prefix.equals("xml"))
{
namespace = QName.S_XMLNAMESPACEURI; // Hardcoded, per Namespace spec
}
else if(prefix.equals("xmlns"))
... | java | public String getNamespaceForPrefix(String prefix, Element namespaceContext)
{
int type;
Node parent = namespaceContext;
String namespace = null;
if (prefix.equals("xml"))
{
namespace = QName.S_XMLNAMESPACEURI; // Hardcoded, per Namespace spec
}
else if(prefix.equals("xmlns"))
... | [
"public",
"String",
"getNamespaceForPrefix",
"(",
"String",
"prefix",
",",
"Element",
"namespaceContext",
")",
"{",
"int",
"type",
";",
"Node",
"parent",
"=",
"namespaceContext",
";",
"String",
"namespace",
"=",
"null",
";",
"if",
"(",
"prefix",
".",
"equals",... | Given an XML Namespace prefix and a context in which the prefix
is to be evaluated, return the Namespace Name this prefix was
bound to. Note that DOM Level 3 is expected to provide a version of
this which deals with the DOM's "early binding" behavior.
Default handling:
@param prefix String containing namespace prefix... | [
"Given",
"an",
"XML",
"Namespace",
"prefix",
"and",
"a",
"context",
"in",
"which",
"the",
"prefix",
"is",
"to",
"be",
"evaluated",
"return",
"the",
"Namespace",
"Name",
"this",
"prefix",
"was",
"bound",
"to",
".",
"Note",
"that",
"DOM",
"Level",
"3",
"is... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java#L512-L568 |
34,975 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java | DOMHelper.getLocalNameOfNode | public String getLocalNameOfNode(Node n)
{
String qname = n.getNodeName();
int index = qname.indexOf(':');
return (index < 0) ? qname : qname.substring(index + 1);
} | java | public String getLocalNameOfNode(Node n)
{
String qname = n.getNodeName();
int index = qname.indexOf(':');
return (index < 0) ? qname : qname.substring(index + 1);
} | [
"public",
"String",
"getLocalNameOfNode",
"(",
"Node",
"n",
")",
"{",
"String",
"qname",
"=",
"n",
".",
"getNodeName",
"(",
")",
";",
"int",
"index",
"=",
"qname",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"return",
"(",
"index",
"<",
"0",
")",
"?",... | Returns the local name of the given node. If the node's name begins
with a namespace prefix, this is the part after the colon; otherwise
it's the full node name.
@param n the node to be examined.
@return String containing the Local Name | [
"Returns",
"the",
"local",
"name",
"of",
"the",
"given",
"node",
".",
"If",
"the",
"node",
"s",
"name",
"begins",
"with",
"a",
"namespace",
"prefix",
"this",
"is",
"the",
"part",
"after",
"the",
"colon",
";",
"otherwise",
"it",
"s",
"the",
"full",
"nod... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java#L828-L835 |
34,976 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java | DOMHelper.isNamespaceNode | public boolean isNamespaceNode(Node n)
{
if (Node.ATTRIBUTE_NODE == n.getNodeType())
{
String attrName = n.getNodeName();
return (attrName.startsWith("xmlns:") || attrName.equals("xmlns"));
}
return false;
} | java | public boolean isNamespaceNode(Node n)
{
if (Node.ATTRIBUTE_NODE == n.getNodeType())
{
String attrName = n.getNodeName();
return (attrName.startsWith("xmlns:") || attrName.equals("xmlns"));
}
return false;
} | [
"public",
"boolean",
"isNamespaceNode",
"(",
"Node",
"n",
")",
"{",
"if",
"(",
"Node",
".",
"ATTRIBUTE_NODE",
"==",
"n",
".",
"getNodeType",
"(",
")",
")",
"{",
"String",
"attrName",
"=",
"n",
".",
"getNodeName",
"(",
")",
";",
"return",
"(",
"attrName... | Test whether the given node is a namespace decl node. In DOM Level 2
this can be done in a namespace-aware manner, but in Level 1 DOMs
it has to be done by testing the node name.
@param n Node to be examined.
@return boolean -- true iff the node is an Attr whose name is
"xmlns" or has the "xmlns:" prefix. | [
"Test",
"whether",
"the",
"given",
"node",
"is",
"a",
"namespace",
"decl",
"node",
".",
"In",
"DOM",
"Level",
"2",
"this",
"can",
"be",
"done",
"in",
"a",
"namespace",
"-",
"aware",
"manner",
"but",
"in",
"Level",
"1",
"DOMs",
"it",
"has",
"to",
"be"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/DOMHelper.java#L971-L982 |
34,977 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/chrono/IsoChronology.java | IsoChronology.dateYearDay | @Override // override with covariant return type
public LocalDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | java | @Override // override with covariant return type
public LocalDate dateYearDay(Era era, int yearOfEra, int dayOfYear) {
return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear);
} | [
"@",
"Override",
"// override with covariant return type",
"public",
"LocalDate",
"dateYearDay",
"(",
"Era",
"era",
",",
"int",
"yearOfEra",
",",
"int",
"dayOfYear",
")",
"{",
"return",
"dateYearDay",
"(",
"prolepticYear",
"(",
"era",
",",
"yearOfEra",
")",
",",
... | Obtains an ISO local date from the era, year-of-era and day-of-year fields.
@param era the ISO era, not null
@param yearOfEra the ISO year-of-era
@param dayOfYear the ISO day-of-year
@return the ISO local date, not null
@throws DateTimeException if unable to create the date | [
"Obtains",
"an",
"ISO",
"local",
"date",
"from",
"the",
"era",
"year",
"-",
"of",
"-",
"era",
"and",
"day",
"-",
"of",
"-",
"year",
"fields",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/chrono/IsoChronology.java#L217-L220 |
34,978 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/transform/TransformerException.java | TransformerException.getMessageAndLocation | public String getMessageAndLocation() {
StringBuilder sbuffer = new StringBuilder();
String message = super.getMessage();
if (null != message) {
sbuffer.append(message);
}
if (null != locator) {
String systemID = locator.getSystemId();
... | java | public String getMessageAndLocation() {
StringBuilder sbuffer = new StringBuilder();
String message = super.getMessage();
if (null != message) {
sbuffer.append(message);
}
if (null != locator) {
String systemID = locator.getSystemId();
... | [
"public",
"String",
"getMessageAndLocation",
"(",
")",
"{",
"StringBuilder",
"sbuffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"message",
"=",
"super",
".",
"getMessage",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"message",
")",
"{",
"sbuffer"... | Get the error message with location information
appended.
@return A <code>String</code> representing the error message with
location information appended. | [
"Get",
"the",
"error",
"message",
"with",
"location",
"information",
"appended",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/transform/TransformerException.java#L207-L238 |
34,979 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/transform/TransformerException.java | TransformerException.getLocationAsString | public String getLocationAsString() {
if (null != locator) {
StringBuilder sbuffer = new StringBuilder();
String systemID = locator.getSystemId();
int line = locator.getLineNumber();
int column = locator.getColumnNumber();
... | java | public String getLocationAsString() {
if (null != locator) {
StringBuilder sbuffer = new StringBuilder();
String systemID = locator.getSystemId();
int line = locator.getLineNumber();
int column = locator.getColumnNumber();
... | [
"public",
"String",
"getLocationAsString",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"locator",
")",
"{",
"StringBuilder",
"sbuffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"systemID",
"=",
"locator",
".",
"getSystemId",
"(",
")",
";",
"int",
... | Get the location information as a string.
@return A string with location info, or null
if there is no location information. | [
"Get",
"the",
"location",
"information",
"as",
"a",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/javax/xml/transform/TransformerException.java#L246-L273 |
34,980 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java | IncrementalSAXSource_Filter.setXMLReader | public void setXMLReader(XMLReader eventsource)
{
fXMLReader=eventsource;
eventsource.setContentHandler(this);
eventsource.setDTDHandler(this);
eventsource.setErrorHandler(this); // to report fatal errors in filtering mode
// Not supported by all SAX2 filters:
try
{
eventsource.
... | java | public void setXMLReader(XMLReader eventsource)
{
fXMLReader=eventsource;
eventsource.setContentHandler(this);
eventsource.setDTDHandler(this);
eventsource.setErrorHandler(this); // to report fatal errors in filtering mode
// Not supported by all SAX2 filters:
try
{
eventsource.
... | [
"public",
"void",
"setXMLReader",
"(",
"XMLReader",
"eventsource",
")",
"{",
"fXMLReader",
"=",
"eventsource",
";",
"eventsource",
".",
"setContentHandler",
"(",
"this",
")",
";",
"eventsource",
".",
"setDTDHandler",
"(",
"this",
")",
";",
"eventsource",
".",
... | Bind our input streams to an XMLReader.
Just a convenience routine; obviously you can explicitly register
this as a listener with the same effect. | [
"Bind",
"our",
"input",
"streams",
"to",
"an",
"XMLReader",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java#L142-L167 |
34,981 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java | IncrementalSAXSource_Filter.notationDecl | public void notationDecl(String a, String b, String c) throws SAXException
{
if(null!=clientDTDHandler)
clientDTDHandler.notationDecl(a,b,c);
} | java | public void notationDecl(String a, String b, String c) throws SAXException
{
if(null!=clientDTDHandler)
clientDTDHandler.notationDecl(a,b,c);
} | [
"public",
"void",
"notationDecl",
"(",
"String",
"a",
",",
"String",
"b",
",",
"String",
"c",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"null",
"!=",
"clientDTDHandler",
")",
"clientDTDHandler",
".",
"notationDecl",
"(",
"a",
",",
"b",
",",
"c",
")"... | DTDHandler support. | [
"DTDHandler",
"support",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java#L404-L408 |
34,982 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java | IncrementalSAXSource_Filter.co_yield | private void co_yield(boolean moreRemains) throws SAXException
{
// Horrendous kluge to run filter to completion. See below.
if(fNoMoreEvents)
return;
try // Coroutine manager might throw no-such.
{
Object arg=Boolean.FALSE;
if(moreRemains)
{
// Yield control, resume p... | java | private void co_yield(boolean moreRemains) throws SAXException
{
// Horrendous kluge to run filter to completion. See below.
if(fNoMoreEvents)
return;
try // Coroutine manager might throw no-such.
{
Object arg=Boolean.FALSE;
if(moreRemains)
{
// Yield control, resume p... | [
"private",
"void",
"co_yield",
"(",
"boolean",
"moreRemains",
")",
"throws",
"SAXException",
"{",
"// Horrendous kluge to run filter to completion. See below.",
"if",
"(",
"fNoMoreEvents",
")",
"return",
";",
"try",
"// Coroutine manager might throw no-such.",
"{",
"Object",
... | Co_Yield handles coroutine interactions while a parse is in progress.
When moreRemains==true, we are pausing after delivering events, to
ask if more are needed. We will resume the controller thread with
co_resume(Boolean.TRUE, ...)
When control is passed back it may indicate
Boolean.TRUE indication to continue deli... | [
"Co_Yield",
"handles",
"coroutine",
"interactions",
"while",
"a",
"parse",
"is",
"in",
"progress",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java#L550-L588 |
34,983 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.initializeSerializerProps | public void initializeSerializerProps () {
// canonical-form
fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+ DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_DEFAULT_FALSE);
// cdata-sections
fDOMConfigProperties.setProperty(DOMConstants.S_... | java | public void initializeSerializerProps () {
// canonical-form
fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS
+ DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_DEFAULT_FALSE);
// cdata-sections
fDOMConfigProperties.setProperty(DOMConstants.S_... | [
"public",
"void",
"initializeSerializerProps",
"(",
")",
"{",
"// canonical-form",
"fDOMConfigProperties",
".",
"setProperty",
"(",
"DOMConstants",
".",
"S_DOM3_PROPERTIES_NS",
"+",
"DOMConstants",
".",
"DOM_CANONICAL_FORM",
",",
"DOMConstants",
".",
"DOM3_DEFAULT_FALSE",
... | Initializes the underlying serializer's configuration depending on the
default DOMConfiguration parameters. This method must be called before a
node is to be serialized.
@xsl.usage internal | [
"Initializes",
"the",
"underlying",
"serializer",
"s",
"configuration",
"depending",
"on",
"the",
"default",
"DOMConfiguration",
"parameters",
".",
"This",
"method",
"must",
"be",
"called",
"before",
"a",
"node",
"is",
"to",
"be",
"serialized",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L253-L376 |
34,984 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.canSetParameter | public boolean canSetParameter(String name, Object value) {
if (value instanceof Boolean){
if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)
|| name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)
|| name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)
... | java | public boolean canSetParameter(String name, Object value) {
if (value instanceof Boolean){
if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)
|| name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)
|| name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)
... | [
"public",
"boolean",
"canSetParameter",
"(",
"String",
"name",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"instanceof",
"Boolean",
")",
"{",
"if",
"(",
"name",
".",
"equalsIgnoreCase",
"(",
"DOMConstants",
".",
"DOM_CDATA_SECTIONS",
")",
"||",
"na... | Checks if setting a parameter to a specific value is supported.
@see org.w3c.dom.DOMConfiguration#canSetParameter(java.lang.String, java.lang.Object)
@since DOM Level 3
@param name A String containing the DOMConfiguration parameter name.
@param value An Object specifying the value of the corresponding parameter. | [
"Checks",
"if",
"setting",
"a",
"parameter",
"to",
"a",
"specific",
"value",
"is",
"supported",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L390-L427 |
34,985 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.writeToString | public String writeToString(Node nodeArg) throws DOMException, LSException {
// return null is nodeArg is null. Should an Exception be thrown instead?
if (nodeArg == null) {
return null;
}
// Should we reset the serializer configuration before each write operation?
... | java | public String writeToString(Node nodeArg) throws DOMException, LSException {
// return null is nodeArg is null. Should an Exception be thrown instead?
if (nodeArg == null) {
return null;
}
// Should we reset the serializer configuration before each write operation?
... | [
"public",
"String",
"writeToString",
"(",
"Node",
"nodeArg",
")",
"throws",
"DOMException",
",",
"LSException",
"{",
"// return null is nodeArg is null. Should an Exception be thrown instead?",
"if",
"(",
"nodeArg",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
... | Serializes the specified node and returns a String with the serialized
data to the caller.
@see org.w3c.dom.ls.LSSerializer#writeToString(org.w3c.dom.Node)
@since DOM Level 3
@param nodeArg The Node to serialize.
@throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the
LSSerializer was unable to serialize the n... | [
"Serializes",
"the",
"specified",
"node",
"and",
"returns",
"a",
"String",
"with",
"the",
"serialized",
"data",
"to",
"the",
"caller",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L1110-L1195 |
34,986 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.getXMLEncoding | protected String getXMLEncoding(Node nodeArg) {
Document doc = null;
// Determine the XML Encoding of the document
if (nodeArg != null) {
if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
// The Document node is the Node argument
doc = (Docum... | java | protected String getXMLEncoding(Node nodeArg) {
Document doc = null;
// Determine the XML Encoding of the document
if (nodeArg != null) {
if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
// The Document node is the Node argument
doc = (Docum... | [
"protected",
"String",
"getXMLEncoding",
"(",
"Node",
"nodeArg",
")",
"{",
"Document",
"doc",
"=",
"null",
";",
"// Determine the XML Encoding of the document",
"if",
"(",
"nodeArg",
"!=",
"null",
")",
"{",
"if",
"(",
"nodeArg",
".",
"getNodeType",
"(",
")",
"... | Determines the XML Encoding of the Document Node to serialize. If the Document Node
is not a DOM Level 3 Node, then the default encoding "UTF-8" is returned.
@param nodeArg The Node to serialize
@return A String containing the encoding pseudo-attribute of the XMLDecl.
@throws Throwable if the DOM implementation does... | [
"Determines",
"the",
"XML",
"Encoding",
"of",
"the",
"Document",
"Node",
"to",
"serialize",
".",
"If",
"the",
"Document",
"Node",
"is",
"not",
"a",
"DOM",
"Level",
"3",
"Node",
"then",
"the",
"default",
"encoding",
"UTF",
"-",
"8",
"is",
"returned",
"."
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L1401-L1421 |
34,987 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.getInputEncoding | protected String getInputEncoding(Node nodeArg) {
Document doc = null;
// Determine the Input Encoding of the document
if (nodeArg != null) {
if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
// The Document node is the Node argument
doc = (... | java | protected String getInputEncoding(Node nodeArg) {
Document doc = null;
// Determine the Input Encoding of the document
if (nodeArg != null) {
if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) {
// The Document node is the Node argument
doc = (... | [
"protected",
"String",
"getInputEncoding",
"(",
"Node",
"nodeArg",
")",
"{",
"Document",
"doc",
"=",
"null",
";",
"// Determine the Input Encoding of the document",
"if",
"(",
"nodeArg",
"!=",
"null",
")",
"{",
"if",
"(",
"nodeArg",
".",
"getNodeType",
"(",
")",... | Determines the Input Encoding of the Document Node to serialize. If the Document Node
is not a DOM Level 3 Node, then null is returned.
@param nodeArg The Node to serialize
@return A String containing the input encoding. | [
"Determines",
"the",
"Input",
"Encoding",
"of",
"the",
"Document",
"Node",
"to",
"serialize",
".",
"If",
"the",
"Document",
"Node",
"is",
"not",
"a",
"DOM",
"Level",
"3",
"Node",
"then",
"null",
"is",
"returned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L1430-L1450 |
34,988 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.getPathWithoutEscapes | private static String getPathWithoutEscapes(String origPath) {
if (origPath != null && origPath.length() != 0 && origPath.indexOf('%') != -1) {
// Locate the escape characters
StringTokenizer tokenizer = new StringTokenizer(origPath, "%");
StringBuffer result = new StringBuff... | java | private static String getPathWithoutEscapes(String origPath) {
if (origPath != null && origPath.length() != 0 && origPath.indexOf('%') != -1) {
// Locate the escape characters
StringTokenizer tokenizer = new StringTokenizer(origPath, "%");
StringBuffer result = new StringBuff... | [
"private",
"static",
"String",
"getPathWithoutEscapes",
"(",
"String",
"origPath",
")",
"{",
"if",
"(",
"origPath",
"!=",
"null",
"&&",
"origPath",
".",
"length",
"(",
")",
"!=",
"0",
"&&",
"origPath",
".",
"indexOf",
"(",
"'",
"'",
")",
"!=",
"-",
"1"... | Replaces all escape sequences in the given path with their literal characters. | [
"Replaces",
"all",
"escape",
"sequences",
"in",
"the",
"given",
"path",
"with",
"their",
"literal",
"characters",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L1464-L1484 |
34,989 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java | LSSerializerImpl.createLSException | private static LSException createLSException(short code, Throwable cause) {
LSException lse = new LSException(code, cause != null ? cause.getMessage() : null);
if (cause != null && ThrowableMethods.fgThrowableMethodsAvailable) {
try {
ThrowableMethods.fgThrowableInitCauseMeth... | java | private static LSException createLSException(short code, Throwable cause) {
LSException lse = new LSException(code, cause != null ? cause.getMessage() : null);
if (cause != null && ThrowableMethods.fgThrowableMethodsAvailable) {
try {
ThrowableMethods.fgThrowableInitCauseMeth... | [
"private",
"static",
"LSException",
"createLSException",
"(",
"short",
"code",
",",
"Throwable",
"cause",
")",
"{",
"LSException",
"lse",
"=",
"new",
"LSException",
"(",
"code",
",",
"cause",
"!=",
"null",
"?",
"cause",
".",
"getMessage",
"(",
")",
":",
"n... | Creates an LSException. On J2SE 1.4 and above the cause for the exception will be set. | [
"Creates",
"an",
"LSException",
".",
"On",
"J2SE",
"1",
".",
"4",
"and",
"above",
"the",
"cause",
"for",
"the",
"exception",
"will",
"be",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java#L1498-L1508 |
34,990 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NameConstraintsExtension.java | NameConstraintsExtension.calcMinMax | private void calcMinMax() throws IOException {
hasMin = false;
hasMax = false;
if (excluded != null) {
for (int i = 0; i < excluded.size(); i++) {
GeneralSubtree subtree = excluded.get(i);
if (subtree.getMinimum() != 0)
hasMin = tru... | java | private void calcMinMax() throws IOException {
hasMin = false;
hasMax = false;
if (excluded != null) {
for (int i = 0; i < excluded.size(); i++) {
GeneralSubtree subtree = excluded.get(i);
if (subtree.getMinimum() != 0)
hasMin = tru... | [
"private",
"void",
"calcMinMax",
"(",
")",
"throws",
"IOException",
"{",
"hasMin",
"=",
"false",
";",
"hasMax",
"=",
"false",
";",
"if",
"(",
"excluded",
"!=",
"null",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"excluded",
".",
"siz... | Recalculate hasMin and hasMax flags. | [
"Recalculate",
"hasMin",
"and",
"hasMax",
"flags",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NameConstraintsExtension.java#L89-L112 |
34,991 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NameConstraintsExtension.java | NameConstraintsExtension.verify | public boolean verify(GeneralNameInterface name) throws IOException {
if (name == null) {
throw new IOException("name is null");
}
// Verify that the name is consistent with the excluded subtrees
if (excluded != null && excluded.size() > 0) {
for (int i = 0; i <... | java | public boolean verify(GeneralNameInterface name) throws IOException {
if (name == null) {
throw new IOException("name is null");
}
// Verify that the name is consistent with the excluded subtrees
if (excluded != null && excluded.size() > 0) {
for (int i = 0; i <... | [
"public",
"boolean",
"verify",
"(",
"GeneralNameInterface",
"name",
")",
"throws",
"IOException",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"name is null\"",
")",
";",
"}",
"// Verify that the name is consistent with the e... | check whether a name conforms to these NameConstraints.
This involves verifying that the name is consistent with the
permitted and excluded subtrees variables.
@param name GeneralNameInterface name to be verified
@returns true if certificate verifies successfully
@throws IOException on error | [
"check",
"whether",
"a",
"name",
"conforms",
"to",
"these",
"NameConstraints",
".",
"This",
"involves",
"verifying",
"that",
"the",
"name",
"is",
"consistent",
"with",
"the",
"permitted",
"and",
"excluded",
"subtrees",
"variables",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NameConstraintsExtension.java#L490-L560 |
34,992 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NameConstraintsExtension.java | NameConstraintsExtension.verifyRFC822SpecialCase | public boolean verifyRFC822SpecialCase(X500Name subject) throws IOException {
for (AVA ava : subject.allAvas()) {
ObjectIdentifier attrOID = ava.getObjectIdentifier();
if (attrOID.equals((Object)PKCS9Attribute.EMAIL_ADDRESS_OID)) {
String attrValue = ava.getValueString();... | java | public boolean verifyRFC822SpecialCase(X500Name subject) throws IOException {
for (AVA ava : subject.allAvas()) {
ObjectIdentifier attrOID = ava.getObjectIdentifier();
if (attrOID.equals((Object)PKCS9Attribute.EMAIL_ADDRESS_OID)) {
String attrValue = ava.getValueString();... | [
"public",
"boolean",
"verifyRFC822SpecialCase",
"(",
"X500Name",
"subject",
")",
"throws",
"IOException",
"{",
"for",
"(",
"AVA",
"ava",
":",
"subject",
".",
"allAvas",
"(",
")",
")",
"{",
"ObjectIdentifier",
"attrOID",
"=",
"ava",
".",
"getObjectIdentifier",
... | Perform the RFC 822 special case check. We have a certificate
that does not contain any subject alternative names. Check that
any EMAILADDRESS attributes in its subject name conform to these
NameConstraints.
@param subject the certificate's subject name
@returns true if certificate verifies successfully
@throws IOExce... | [
"Perform",
"the",
"RFC",
"822",
"special",
"case",
"check",
".",
"We",
"have",
"a",
"certificate",
"that",
"does",
"not",
"contain",
"any",
"subject",
"alternative",
"names",
".",
"Check",
"that",
"any",
"EMAILADDRESS",
"attributes",
"in",
"its",
"subject",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NameConstraintsExtension.java#L572-L591 |
34,993 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyRep.java | KeyRep.readResolve | protected Object readResolve() throws ObjectStreamException {
try {
if (type == Type.SECRET && RAW.equals(format)) {
return new SecretKeySpec(encoded, algorithm);
} else if (type == Type.PUBLIC && X509.equals(format)) {
KeyFactory f = KeyFactory.getInstanc... | java | protected Object readResolve() throws ObjectStreamException {
try {
if (type == Type.SECRET && RAW.equals(format)) {
return new SecretKeySpec(encoded, algorithm);
} else if (type == Type.PUBLIC && X509.equals(format)) {
KeyFactory f = KeyFactory.getInstanc... | [
"protected",
"Object",
"readResolve",
"(",
")",
"throws",
"ObjectStreamException",
"{",
"try",
"{",
"if",
"(",
"type",
"==",
"Type",
".",
"SECRET",
"&&",
"RAW",
".",
"equals",
"(",
"format",
")",
")",
"{",
"return",
"new",
"SecretKeySpec",
"(",
"encoded",
... | Resolve the Key object.
<p> This method supports three Type/format combinations:
<ul>
<li> Type.SECRET/"RAW" - returns a SecretKeySpec object
constructed using encoded key bytes and algorithm
<li> Type.PUBLIC/"X.509" - gets a KeyFactory instance for
the key algorithm, constructs an X509EncodedKeySpec with the
encoded ... | [
"Resolve",
"the",
"Key",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/KeyRep.java#L169-L195 |
34,994 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterInputStream.java | InflaterInputStream.skip | public long skip(long n) throws IOException {
if (n < 0) {
throw new IllegalArgumentException("negative skip length");
}
ensureOpen();
int max = (int)Math.min(n, Integer.MAX_VALUE);
int total = 0;
while (total < max) {
int len = max - total;
... | java | public long skip(long n) throws IOException {
if (n < 0) {
throw new IllegalArgumentException("negative skip length");
}
ensureOpen();
int max = (int)Math.min(n, Integer.MAX_VALUE);
int total = 0;
while (total < max) {
int len = max - total;
... | [
"public",
"long",
"skip",
"(",
"long",
"n",
")",
"throws",
"IOException",
"{",
"if",
"(",
"n",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"negative skip length\"",
")",
";",
"}",
"ensureOpen",
"(",
")",
";",
"int",
"max",
"=",... | Skips specified number of bytes of uncompressed data.
@param n the number of bytes to skip
@return the actual number of bytes skipped.
@exception IOException if an I/O error has occurred
@exception IllegalArgumentException if {@code n < 0} | [
"Skips",
"specified",
"number",
"of",
"bytes",
"of",
"uncompressed",
"data",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterInputStream.java#L207-L227 |
34,995 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterInputStream.java | InflaterInputStream.fill | protected void fill() throws IOException {
ensureOpen();
len = in.read(buf, 0, buf.length);
if (len == -1) {
throw new EOFException("Unexpected end of ZLIB input stream");
}
inf.setInput(buf, 0, len);
} | java | protected void fill() throws IOException {
ensureOpen();
len = in.read(buf, 0, buf.length);
if (len == -1) {
throw new EOFException("Unexpected end of ZLIB input stream");
}
inf.setInput(buf, 0, len);
} | [
"protected",
"void",
"fill",
"(",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"len",
"=",
"in",
".",
"read",
"(",
"buf",
",",
"0",
",",
"buf",
".",
"length",
")",
";",
"if",
"(",
"len",
"==",
"-",
"1",
")",
"{",
"throw",
"ne... | Fills input buffer with more data to decompress.
@exception IOException if an I/O error has occurred | [
"Fills",
"input",
"buffer",
"with",
"more",
"data",
"to",
"decompress",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/InflaterInputStream.java#L248-L255 |
34,996 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StreamTokenizer.java | StreamTokenizer.parseNumbers | public void parseNumbers() {
for (int i = '0'; i <= '9'; i++) {
tokenTypes[i] |= TOKEN_DIGIT;
}
tokenTypes['.'] |= TOKEN_DIGIT;
tokenTypes['-'] |= TOKEN_DIGIT;
} | java | public void parseNumbers() {
for (int i = '0'; i <= '9'; i++) {
tokenTypes[i] |= TOKEN_DIGIT;
}
tokenTypes['.'] |= TOKEN_DIGIT;
tokenTypes['-'] |= TOKEN_DIGIT;
} | [
"public",
"void",
"parseNumbers",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"'",
"'",
";",
"i",
"<=",
"'",
"'",
";",
"i",
"++",
")",
"{",
"tokenTypes",
"[",
"i",
"]",
"|=",
"TOKEN_DIGIT",
";",
"}",
"tokenTypes",
"[",
"'",
"'",
"]",
"|=",
"T... | Specifies that this tokenizer shall parse numbers. | [
"Specifies",
"that",
"this",
"tokenizer",
"shall",
"parse",
"numbers",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/StreamTokenizer.java#L524-L530 |
34,997 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/ReverseAxesWalker.java | ReverseAxesWalker.getLastPos | public int getLastPos(XPathContext xctxt)
{
int count = 0;
AxesWalker savedWalker = wi().getLastUsedWalker();
try
{
ReverseAxesWalker clone = (ReverseAxesWalker) this.clone();
clone.setRoot(this.getRoot());
clone.setPredicateCount(m_predicateIndex);
clone.setPrevWalker(nul... | java | public int getLastPos(XPathContext xctxt)
{
int count = 0;
AxesWalker savedWalker = wi().getLastUsedWalker();
try
{
ReverseAxesWalker clone = (ReverseAxesWalker) this.clone();
clone.setRoot(this.getRoot());
clone.setPredicateCount(m_predicateIndex);
clone.setPrevWalker(nul... | [
"public",
"int",
"getLastPos",
"(",
"XPathContext",
"xctxt",
")",
"{",
"int",
"count",
"=",
"0",
";",
"AxesWalker",
"savedWalker",
"=",
"wi",
"(",
")",
".",
"getLastUsedWalker",
"(",
")",
";",
"try",
"{",
"ReverseAxesWalker",
"clone",
"=",
"(",
"ReverseAxe... | Get the number of nodes in this node list. The function is probably ill
named?
@param xctxt The XPath runtime context.
@return the number of nodes in this node list. | [
"Get",
"the",
"number",
"of",
"nodes",
"in",
"this",
"node",
"list",
".",
"The",
"function",
"is",
"probably",
"ill",
"named?"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/ReverseAxesWalker.java#L193-L231 |
34,998 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/ConstraintsChecker.java | ConstraintsChecker.check | @Override
public void check(Certificate cert, Collection<String> unresCritExts)
throws CertPathValidatorException
{
X509Certificate currCert = (X509Certificate)cert;
i++;
// MUST run NC check second, since it depends on BC check to
// update remainingCerts
checkB... | java | @Override
public void check(Certificate cert, Collection<String> unresCritExts)
throws CertPathValidatorException
{
X509Certificate currCert = (X509Certificate)cert;
i++;
// MUST run NC check second, since it depends on BC check to
// update remainingCerts
checkB... | [
"@",
"Override",
"public",
"void",
"check",
"(",
"Certificate",
"cert",
",",
"Collection",
"<",
"String",
">",
"unresCritExts",
")",
"throws",
"CertPathValidatorException",
"{",
"X509Certificate",
"currCert",
"=",
"(",
"X509Certificate",
")",
"cert",
";",
"i",
"... | Performs the basic constraints and name constraints
checks on the certificate using its internal state.
@param cert the <code>Certificate</code> to be checked
@param unresCritExts a <code>Collection</code> of OID strings
representing the current set of unresolved critical extensions
@throws CertPathValidatorException ... | [
"Performs",
"the",
"basic",
"constraints",
"and",
"name",
"constraints",
"checks",
"on",
"the",
"certificate",
"using",
"its",
"internal",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/ConstraintsChecker.java#L113-L129 |
34,999 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/ConstraintsChecker.java | ConstraintsChecker.verifyNameConstraints | private void verifyNameConstraints(X509Certificate currCert)
throws CertPathValidatorException
{
String msg = "name constraints";
if (debug != null) {
debug.println("---checking " + msg + "...");
}
// check name constraints only if there is a previous name constr... | java | private void verifyNameConstraints(X509Certificate currCert)
throws CertPathValidatorException
{
String msg = "name constraints";
if (debug != null) {
debug.println("---checking " + msg + "...");
}
// check name constraints only if there is a previous name constr... | [
"private",
"void",
"verifyNameConstraints",
"(",
"X509Certificate",
"currCert",
")",
"throws",
"CertPathValidatorException",
"{",
"String",
"msg",
"=",
"\"name constraints\"",
";",
"if",
"(",
"debug",
"!=",
"null",
")",
"{",
"debug",
".",
"println",
"(",
"\"---che... | Internal method to check the name constraints against a cert | [
"Internal",
"method",
"to",
"check",
"the",
"name",
"constraints",
"against",
"a",
"cert"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/ConstraintsChecker.java#L134-L167 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.