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,100 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java | AttributedString.valuesMatch | private final static boolean valuesMatch(Object value1, Object value2) {
if (value1 == null) {
return value2 == null;
} else {
return value1.equals(value2);
}
} | java | private final static boolean valuesMatch(Object value1, Object value2) {
if (value1 == null) {
return value2 == null;
} else {
return value1.equals(value2);
}
} | [
"private",
"final",
"static",
"boolean",
"valuesMatch",
"(",
"Object",
"value1",
",",
"Object",
"value2",
")",
"{",
"if",
"(",
"value1",
"==",
"null",
")",
"{",
"return",
"value2",
"==",
"null",
";",
"}",
"else",
"{",
"return",
"value1",
".",
"equals",
... | returns whether the two objects are either both null or equal | [
"returns",
"whether",
"the",
"two",
"objects",
"are",
"either",
"both",
"null",
"or",
"equal"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java#L665-L671 |
34,101 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java | AttributedString.appendContents | private final void appendContents(StringBuffer buf,
CharacterIterator iterator) {
int index = iterator.getBeginIndex();
int end = iterator.getEndIndex();
while (index < end) {
iterator.setIndex(index++);
buf.append(iterator.current()... | java | private final void appendContents(StringBuffer buf,
CharacterIterator iterator) {
int index = iterator.getBeginIndex();
int end = iterator.getEndIndex();
while (index < end) {
iterator.setIndex(index++);
buf.append(iterator.current()... | [
"private",
"final",
"void",
"appendContents",
"(",
"StringBuffer",
"buf",
",",
"CharacterIterator",
"iterator",
")",
"{",
"int",
"index",
"=",
"iterator",
".",
"getBeginIndex",
"(",
")",
";",
"int",
"end",
"=",
"iterator",
".",
"getEndIndex",
"(",
")",
";",
... | Appends the contents of the CharacterIterator iterator into the
StringBuffer buf. | [
"Appends",
"the",
"contents",
"of",
"the",
"CharacterIterator",
"iterator",
"into",
"the",
"StringBuffer",
"buf",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java#L677-L686 |
34,102 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java | AttributedString.mapsDiffer | private static boolean mapsDiffer(Map last, Map attrs) {
if (last == null) {
return (attrs != null && attrs.size() > 0);
}
return (!last.equals(attrs));
} | java | private static boolean mapsDiffer(Map last, Map attrs) {
if (last == null) {
return (attrs != null && attrs.size() > 0);
}
return (!last.equals(attrs));
} | [
"private",
"static",
"boolean",
"mapsDiffer",
"(",
"Map",
"last",
",",
"Map",
"attrs",
")",
"{",
"if",
"(",
"last",
"==",
"null",
")",
"{",
"return",
"(",
"attrs",
"!=",
"null",
"&&",
"attrs",
".",
"size",
"(",
")",
">",
"0",
")",
";",
"}",
"retu... | Returns true if the attributes specified in last and attrs differ. | [
"Returns",
"true",
"if",
"the",
"attributes",
"specified",
"in",
"last",
"and",
"attrs",
"differ",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/AttributedString.java#L720-L725 |
34,103 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java | Math.nextAfter | public static double nextAfter(double start, double direction) {
/*
* The cases:
*
* nextAfter(+infinity, 0) == MAX_VALUE
* nextAfter(+infinity, +infinity) == +infinity
* nextAfter(-infinity, 0) == -MAX_VALUE
* nextAfter(-infinity, -infinity) == -infinit... | java | public static double nextAfter(double start, double direction) {
/*
* The cases:
*
* nextAfter(+infinity, 0) == MAX_VALUE
* nextAfter(+infinity, +infinity) == +infinity
* nextAfter(-infinity, 0) == -MAX_VALUE
* nextAfter(-infinity, -infinity) == -infinit... | [
"public",
"static",
"double",
"nextAfter",
"(",
"double",
"start",
",",
"double",
"direction",
")",
"{",
"/*\n * The cases:\n *\n * nextAfter(+infinity, 0) == MAX_VALUE\n * nextAfter(+infinity, +infinity) == +infinity\n * nextAfter(-infinity, 0) == ... | Returns the floating-point number adjacent to the first
argument in the direction of the second argument. If both
arguments compare as equal the second argument is returned.
<p>
Special cases:
<ul>
<li> If either argument is a NaN, then NaN is returned.
<li> If both arguments are signed zeros, {@code direction}
is r... | [
"Returns",
"the",
"floating",
"-",
"point",
"number",
"adjacent",
"to",
"the",
"first",
"argument",
"in",
"the",
"direction",
"of",
"the",
"second",
"argument",
".",
"If",
"both",
"arguments",
"compare",
"as",
"equal",
"the",
"second",
"argument",
"is",
"ret... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L1889-L1947 |
34,104 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java | Math.nextAfter | public static float nextAfter(float start, double direction) {
/*
* The cases:
*
* nextAfter(+infinity, 0) == MAX_VALUE
* nextAfter(+infinity, +infinity) == +infinity
* nextAfter(-infinity, 0) == -MAX_VALUE
* nextAfter(-infinity, -infinity) == -infinity
... | java | public static float nextAfter(float start, double direction) {
/*
* The cases:
*
* nextAfter(+infinity, 0) == MAX_VALUE
* nextAfter(+infinity, +infinity) == +infinity
* nextAfter(-infinity, 0) == -MAX_VALUE
* nextAfter(-infinity, -infinity) == -infinity
... | [
"public",
"static",
"float",
"nextAfter",
"(",
"float",
"start",
",",
"double",
"direction",
")",
"{",
"/*\n * The cases:\n *\n * nextAfter(+infinity, 0) == MAX_VALUE\n * nextAfter(+infinity, +infinity) == +infinity\n * nextAfter(-infinity, 0) == -M... | Returns the floating-point number adjacent to the first
argument in the direction of the second argument. If both
arguments compare as equal a value equivalent to the second argument
is returned.
<p>
Special cases:
<ul>
<li> If either argument is a NaN, then NaN is returned.
<li> If both arguments are signed zeros, ... | [
"Returns",
"the",
"floating",
"-",
"point",
"number",
"adjacent",
"to",
"the",
"first",
"argument",
"in",
"the",
"direction",
"of",
"the",
"second",
"argument",
".",
"If",
"both",
"arguments",
"compare",
"as",
"equal",
"a",
"value",
"equivalent",
"to",
"the"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Math.java#L1988-L2046 |
34,105 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableString.java | ReplaceableString.replace | public void replace(int start, int limit, char[] chars,
int charsStart, int charsLen) {
buf.delete(start, limit);
buf.insert(start, chars, charsStart, charsLen);
} | java | public void replace(int start, int limit, char[] chars,
int charsStart, int charsLen) {
buf.delete(start, limit);
buf.insert(start, chars, charsStart, charsLen);
} | [
"public",
"void",
"replace",
"(",
"int",
"start",
",",
"int",
"limit",
",",
"char",
"[",
"]",
"chars",
",",
"int",
"charsStart",
",",
"int",
"charsLen",
")",
"{",
"buf",
".",
"delete",
"(",
"start",
",",
"limit",
")",
";",
"buf",
".",
"insert",
"("... | Replace a substring of this object with the given text.
@param start the beginning index, inclusive; <code>0 <= start
<= limit</code>.
@param limit the ending index, exclusive; <code>start <= limit
<= length()</code>.
@param chars the text to replace characters <code>start</code>
to <code>limit - 1</code>
@... | [
"Replace",
"a",
"substring",
"of",
"this",
"object",
"with",
"the",
"given",
"text",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableString.java#L152-L156 |
34,106 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeNode.java | TreeNode.validate | public final void validate() {
this.accept(new TreeVisitor() {
@Override
public boolean preVisit(TreeNode node) {
node.validateInner();
return true;
}
});
} | java | public final void validate() {
this.accept(new TreeVisitor() {
@Override
public boolean preVisit(TreeNode node) {
node.validateInner();
return true;
}
});
} | [
"public",
"final",
"void",
"validate",
"(",
")",
"{",
"this",
".",
"accept",
"(",
"new",
"TreeVisitor",
"(",
")",
"{",
"@",
"Override",
"public",
"boolean",
"preVisit",
"(",
"TreeNode",
"node",
")",
"{",
"node",
".",
"validateInner",
"(",
")",
";",
"re... | Validates the tree to preemptively catch errors. | [
"Validates",
"the",
"tree",
"to",
"preemptively",
"catch",
"errors",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeNode.java#L103-L111 |
34,107 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/Collator.java | Collator.compare | public int compare(Object object1, Object object2) {
return compare((String) object1, (String) object2);
} | java | public int compare(Object object1, Object object2) {
return compare((String) object1, (String) object2);
} | [
"public",
"int",
"compare",
"(",
"Object",
"object1",
",",
"Object",
"object2",
")",
"{",
"return",
"compare",
"(",
"(",
"String",
")",
"object1",
",",
"(",
"String",
")",
"object2",
")",
";",
"}"
] | Compares two objects to determine their relative order. The objects must
be strings.
@param object1
the first string to compare.
@param object2
the second string to compare.
@return a negative value if {@code object1} is less than {@code object2},
0 if they are equal, and a positive value if {@code object1} is
greater... | [
"Compares",
"two",
"objects",
"to",
"determine",
"their",
"relative",
"order",
".",
"The",
"objects",
"must",
"be",
"strings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/Collator.java#L160-L162 |
34,108 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/QName.java | QName.getQNameFromString | public static QName getQNameFromString(String name)
{
StringTokenizer tokenizer = new StringTokenizer(name, "{}", false);
QName qname;
String s1 = tokenizer.nextToken();
String s2 = tokenizer.hasMoreTokens() ? tokenizer.nextToken() : null;
if (null == s2)
qname = new QName(null, s1);
e... | java | public static QName getQNameFromString(String name)
{
StringTokenizer tokenizer = new StringTokenizer(name, "{}", false);
QName qname;
String s1 = tokenizer.nextToken();
String s2 = tokenizer.hasMoreTokens() ? tokenizer.nextToken() : null;
if (null == s2)
qname = new QName(null, s1);
e... | [
"public",
"static",
"QName",
"getQNameFromString",
"(",
"String",
"name",
")",
"{",
"StringTokenizer",
"tokenizer",
"=",
"new",
"StringTokenizer",
"(",
"name",
",",
"\"{}\"",
",",
"false",
")",
";",
"QName",
"qname",
";",
"String",
"s1",
"=",
"tokenizer",
".... | Given a string, create and return a QName object
@param name String to use to create QName
@return a QName object | [
"Given",
"a",
"string",
"create",
"and",
"return",
"a",
"QName",
"object"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/QName.java#L632-L646 |
34,109 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/QName.java | QName.getPrefixFromXMLNSDecl | public static String getPrefixFromXMLNSDecl(String attRawName)
{
int index = attRawName.indexOf(':');
return (index >= 0) ? attRawName.substring(index + 1) : "";
} | java | public static String getPrefixFromXMLNSDecl(String attRawName)
{
int index = attRawName.indexOf(':');
return (index >= 0) ? attRawName.substring(index + 1) : "";
} | [
"public",
"static",
"String",
"getPrefixFromXMLNSDecl",
"(",
"String",
"attRawName",
")",
"{",
"int",
"index",
"=",
"attRawName",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"return",
"(",
"index",
">=",
"0",
")",
"?",
"attRawName",
".",
"substring",
"(",
"... | This function tells if a raw attribute name is a
xmlns attribute.
@param attRawName Raw name of attribute
@return Prefix of attribute | [
"This",
"function",
"tells",
"if",
"a",
"raw",
"attribute",
"name",
"is",
"a",
"xmlns",
"attribute",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/QName.java#L672-L678 |
34,110 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DecimalStyle.java | DecimalStyle.convertNumberToI18N | String convertNumberToI18N(String numericText) {
if (zeroDigit == '0') {
return numericText;
}
int diff = zeroDigit - '0';
char[] array = numericText.toCharArray();
for (int i = 0; i < array.length; i++) {
array[i] = (char) (array[i] + diff);
}
... | java | String convertNumberToI18N(String numericText) {
if (zeroDigit == '0') {
return numericText;
}
int diff = zeroDigit - '0';
char[] array = numericText.toCharArray();
for (int i = 0; i < array.length; i++) {
array[i] = (char) (array[i] + diff);
}
... | [
"String",
"convertNumberToI18N",
"(",
"String",
"numericText",
")",
"{",
"if",
"(",
"zeroDigit",
"==",
"'",
"'",
")",
"{",
"return",
"numericText",
";",
"}",
"int",
"diff",
"=",
"zeroDigit",
"-",
"'",
"'",
";",
"char",
"[",
"]",
"array",
"=",
"numericT... | Converts the input numeric text to the internationalized form using the zero character.
@param numericText the text, consisting of digits 0 to 9, to convert, not null
@return the internationalized text, not null | [
"Converts",
"the",
"input",
"numeric",
"text",
"to",
"the",
"internationalized",
"form",
"using",
"the",
"zero",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DecimalStyle.java#L328-L338 |
34,111 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.checkReadPrimitiveTypes | private void checkReadPrimitiveTypes() throws IOException {
// If we still have primitive data, it is ok to read primitive data
if (primitiveData == input || primitiveData.available() > 0) {
return;
}
// If we got here either we had no Stream previously created or
//... | java | private void checkReadPrimitiveTypes() throws IOException {
// If we still have primitive data, it is ok to read primitive data
if (primitiveData == input || primitiveData.available() > 0) {
return;
}
// If we got here either we had no Stream previously created or
//... | [
"private",
"void",
"checkReadPrimitiveTypes",
"(",
")",
"throws",
"IOException",
"{",
"// If we still have primitive data, it is ok to read primitive data",
"if",
"(",
"primitiveData",
"==",
"input",
"||",
"primitiveData",
".",
"available",
"(",
")",
">",
"0",
")",
"{",... | Checks to if it is ok to read primitive types from this stream at
this point. One is not supposed to read primitive types when about to
read an object, for example, so an exception has to be thrown.
@throws IOException
If any IO problem occurred when trying to read primitive type
or if it is illegal to read primitive ... | [
"Checks",
"to",
"if",
"it",
"is",
"ok",
"to",
"read",
"primitive",
"types",
"from",
"this",
"stream",
"at",
"this",
"point",
".",
"One",
"is",
"not",
"supposed",
"to",
"read",
"primitive",
"types",
"when",
"about",
"to",
"read",
"an",
"object",
"for",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L394-L428 |
34,112 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.defaultReadObject | public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
} | java | public void defaultReadObject() throws IOException, ClassNotFoundException,
NotActiveException {
if (currentObject != null || !mustResolve) {
readFieldValues(currentObject, currentClass);
} else {
throw new NotActiveException();
}
} | [
"public",
"void",
"defaultReadObject",
"(",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
",",
"NotActiveException",
"{",
"if",
"(",
"currentObject",
"!=",
"null",
"||",
"!",
"mustResolve",
")",
"{",
"readFieldValues",
"(",
"currentObject",
",",
"cu... | Default method to read objects from this stream. Serializable fields
defined in the object's class and superclasses are read from the source
stream.
@throws ClassNotFoundException
if the object's class cannot be found.
@throws IOException
if an I/O error occurs while reading the object data.
@throws NotActiveException... | [
"Default",
"method",
"to",
"read",
"objects",
"from",
"this",
"stream",
".",
"Serializable",
"fields",
"defined",
"in",
"the",
"object",
"s",
"class",
"and",
"superclasses",
"are",
"read",
"from",
"the",
"source",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L454-L461 |
34,113 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.discardData | private void discardData() throws ClassNotFoundException, IOException {
primitiveData = emptyStream;
boolean resolve = mustResolve;
mustResolve = false;
do {
byte tc = nextTC();
if (tc == TC_ENDBLOCKDATA) {
mustResolve = resolve;
re... | java | private void discardData() throws ClassNotFoundException, IOException {
primitiveData = emptyStream;
boolean resolve = mustResolve;
mustResolve = false;
do {
byte tc = nextTC();
if (tc == TC_ENDBLOCKDATA) {
mustResolve = resolve;
re... | [
"private",
"void",
"discardData",
"(",
")",
"throws",
"ClassNotFoundException",
",",
"IOException",
"{",
"primitiveData",
"=",
"emptyStream",
";",
"boolean",
"resolve",
"=",
"mustResolve",
";",
"mustResolve",
"=",
"false",
";",
"do",
"{",
"byte",
"tc",
"=",
"n... | Reads and discards block data and objects until TC_ENDBLOCKDATA is found.
@throws IOException
If an IO exception happened when reading the optional class
annotation.
@throws ClassNotFoundException
If the class corresponding to the class descriptor could not
be found. | [
"Reads",
"and",
"discards",
"block",
"data",
"and",
"objects",
"until",
"TC_ENDBLOCKDATA",
"is",
"found",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L654-L666 |
34,114 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.readFields | public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return r... | java | public GetField readFields() throws IOException, ClassNotFoundException, NotActiveException {
if (currentObject == null) {
throw new NotActiveException();
}
EmulatedFieldsForLoading result = new EmulatedFieldsForLoading(currentClass);
readFieldValues(result);
return r... | [
"public",
"GetField",
"readFields",
"(",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
",",
"NotActiveException",
"{",
"if",
"(",
"currentObject",
"==",
"null",
")",
"{",
"throw",
"new",
"NotActiveException",
"(",
")",
";",
"}",
"EmulatedFieldsForLo... | Reads the persistent fields of the object that is currently being read
from the source stream. The values read are stored in a GetField object
that provides access to the persistent fields. This GetField object is
then returned.
@return the GetField object from which persistent fields can be accessed
by name.
@throws ... | [
"Reads",
"the",
"persistent",
"fields",
"of",
"the",
"object",
"that",
"is",
"currently",
"being",
"read",
"from",
"the",
"source",
"stream",
".",
"The",
"values",
"read",
"are",
"stored",
"in",
"a",
"GetField",
"object",
"that",
"provides",
"access",
"to",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L992-L999 |
34,115 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.readClassDescriptor | protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException {
ObjectStreamClass newClassDesc = new ObjectStreamClass();
String name = input.readUTF();
if (name.length() == 0) {
throw new IOException("The stream is corrupted");
}
newCla... | java | protected ObjectStreamClass readClassDescriptor() throws IOException, ClassNotFoundException {
ObjectStreamClass newClassDesc = new ObjectStreamClass();
String name = input.readUTF();
if (name.length() == 0) {
throw new IOException("The stream is corrupted");
}
newCla... | [
"protected",
"ObjectStreamClass",
"readClassDescriptor",
"(",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"ObjectStreamClass",
"newClassDesc",
"=",
"new",
"ObjectStreamClass",
"(",
")",
";",
"String",
"name",
"=",
"input",
".",
"readUTF",
"(",
... | Reads a class descriptor from the source stream.
@return the class descriptor read from the source stream.
@throws ClassNotFoundException
if a class for one of the objects cannot be found.
@throws IOException
if an error occurs while reading from the source stream. | [
"Reads",
"a",
"class",
"descriptor",
"from",
"the",
"source",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L1727-L1749 |
34,116 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.readNewLongString | private Object readNewLongString(boolean unshared) throws IOException {
long length = input.readLong();
Object result = input.decodeUTF((int) length);
if (enableResolve) {
result = resolveObject(result);
}
registerObjectRead(result, nextHandle(), unshared);
r... | java | private Object readNewLongString(boolean unshared) throws IOException {
long length = input.readLong();
Object result = input.decodeUTF((int) length);
if (enableResolve) {
result = resolveObject(result);
}
registerObjectRead(result, nextHandle(), unshared);
r... | [
"private",
"Object",
"readNewLongString",
"(",
"boolean",
"unshared",
")",
"throws",
"IOException",
"{",
"long",
"length",
"=",
"input",
".",
"readLong",
"(",
")",
";",
"Object",
"result",
"=",
"input",
".",
"decodeUTF",
"(",
"(",
"int",
")",
"length",
")"... | Read a new String in UTF format from the receiver. Return the string
read.
@param unshared
read the object unshared
@return the string just read.
@throws IOException
If an IO exception happened when reading the String. | [
"Read",
"a",
"new",
"String",
"in",
"UTF",
"format",
"from",
"the",
"receiver",
".",
"Return",
"the",
"string",
"read",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L1938-L1947 |
34,117 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.readStreamHeader | protected void readStreamHeader() throws IOException,
StreamCorruptedException {
if (input.readShort() == STREAM_MAGIC
&& input.readShort() == STREAM_VERSION) {
return;
}
throw new StreamCorruptedException();
} | java | protected void readStreamHeader() throws IOException,
StreamCorruptedException {
if (input.readShort() == STREAM_MAGIC
&& input.readShort() == STREAM_VERSION) {
return;
}
throw new StreamCorruptedException();
} | [
"protected",
"void",
"readStreamHeader",
"(",
")",
"throws",
"IOException",
",",
"StreamCorruptedException",
"{",
"if",
"(",
"input",
".",
"readShort",
"(",
")",
"==",
"STREAM_MAGIC",
"&&",
"input",
".",
"readShort",
"(",
")",
"==",
"STREAM_VERSION",
")",
"{",... | Reads and validates the ObjectInputStream header from the source stream.
@throws IOException
if an error occurs while reading from the source stream.
@throws StreamCorruptedException
if the source stream does not contain readable serialized
objects. | [
"Reads",
"and",
"validates",
"the",
"ObjectInputStream",
"header",
"from",
"the",
"source",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L2096-L2103 |
34,118 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.registeredObjectRead | private Object registeredObjectRead(int handle) throws InvalidObjectException {
Object res = objectsRead.get(handle - ObjectStreamConstants.baseWireHandle);
if (res == UNSHARED_OBJ) {
throw new InvalidObjectException("Cannot read back reference to unshared object");
}
return ... | java | private Object registeredObjectRead(int handle) throws InvalidObjectException {
Object res = objectsRead.get(handle - ObjectStreamConstants.baseWireHandle);
if (res == UNSHARED_OBJ) {
throw new InvalidObjectException("Cannot read back reference to unshared object");
}
return ... | [
"private",
"Object",
"registeredObjectRead",
"(",
"int",
"handle",
")",
"throws",
"InvalidObjectException",
"{",
"Object",
"res",
"=",
"objectsRead",
".",
"get",
"(",
"handle",
"-",
"ObjectStreamConstants",
".",
"baseWireHandle",
")",
";",
"if",
"(",
"res",
"=="... | Returns the previously-read object corresponding to the given serialization handle.
@throws InvalidObjectException
If there is no previously-read object with this handle | [
"Returns",
"the",
"previously",
"-",
"read",
"object",
"corresponding",
"to",
"the",
"given",
"serialization",
"handle",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L2156-L2162 |
34,119 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.registerObjectRead | private void registerObjectRead(Object obj, int handle, boolean unshared) throws IOException {
if (unshared) {
obj = UNSHARED_OBJ;
}
int index = handle - ObjectStreamConstants.baseWireHandle;
int size = objectsRead.size();
// ObjectOutputStream sometimes wastes a hand... | java | private void registerObjectRead(Object obj, int handle, boolean unshared) throws IOException {
if (unshared) {
obj = UNSHARED_OBJ;
}
int index = handle - ObjectStreamConstants.baseWireHandle;
int size = objectsRead.size();
// ObjectOutputStream sometimes wastes a hand... | [
"private",
"void",
"registerObjectRead",
"(",
"Object",
"obj",
",",
"int",
"handle",
",",
"boolean",
"unshared",
")",
"throws",
"IOException",
"{",
"if",
"(",
"unshared",
")",
"{",
"obj",
"=",
"UNSHARED_OBJ",
";",
"}",
"int",
"index",
"=",
"handle",
"-",
... | Associates a read object with the its serialization handle. | [
"Associates",
"a",
"read",
"object",
"with",
"the",
"its",
"serialization",
"handle",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L2167-L2185 |
34,120 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java | ObjectInputStream.checkedSetSuperClassDesc | private static void checkedSetSuperClassDesc(ObjectStreamClass desc,
ObjectStreamClass superDesc) throws StreamCorruptedException {
if (desc.equals(superDesc)) {
throw new StreamCorruptedException();
}
desc.setSuperclass(superDesc);
} | java | private static void checkedSetSuperClassDesc(ObjectStreamClass desc,
ObjectStreamClass superDesc) throws StreamCorruptedException {
if (desc.equals(superDesc)) {
throw new StreamCorruptedException();
}
desc.setSuperclass(superDesc);
} | [
"private",
"static",
"void",
"checkedSetSuperClassDesc",
"(",
"ObjectStreamClass",
"desc",
",",
"ObjectStreamClass",
"superDesc",
")",
"throws",
"StreamCorruptedException",
"{",
"if",
"(",
"desc",
".",
"equals",
"(",
"superDesc",
")",
")",
"{",
"throw",
"new",
"St... | Avoid recursive defining. | [
"Avoid",
"recursive",
"defining",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L2408-L2414 |
34,121 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Encodings.java | Encodings.isRecognizedEncoding | public static boolean isRecognizedEncoding(String encoding)
{
EncodingInfo ei;
String normalizedEncoding = encoding.toUpperCase();
ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding);
if (ei == null)
ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedE... | java | public static boolean isRecognizedEncoding(String encoding)
{
EncodingInfo ei;
String normalizedEncoding = encoding.toUpperCase();
ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding);
if (ei == null)
ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedE... | [
"public",
"static",
"boolean",
"isRecognizedEncoding",
"(",
"String",
"encoding",
")",
"{",
"EncodingInfo",
"ei",
";",
"String",
"normalizedEncoding",
"=",
"encoding",
".",
"toUpperCase",
"(",
")",
";",
"ei",
"=",
"(",
"EncodingInfo",
")",
"_encodingTableKeyJava",... | Determines if the encoding specified was recognized by the
serializer or not.
@param encoding The encoding
@return boolean - true if the encoding was recognized else false | [
"Determines",
"if",
"the",
"encoding",
"specified",
"was",
"recognized",
"by",
"the",
"serializer",
"or",
"not",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Encodings.java#L139-L150 |
34,122 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Encodings.java | Encodings.loadEncodingInfo | private static EncodingInfo[] loadEncodingInfo()
{
try
{
InputStream is;
SecuritySupport ss = SecuritySupport.getInstance();
is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
ENCODINGS_FILE);... | java | private static EncodingInfo[] loadEncodingInfo()
{
try
{
InputStream is;
SecuritySupport ss = SecuritySupport.getInstance();
is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
ENCODINGS_FILE);... | [
"private",
"static",
"EncodingInfo",
"[",
"]",
"loadEncodingInfo",
"(",
")",
"{",
"try",
"{",
"InputStream",
"is",
";",
"SecuritySupport",
"ss",
"=",
"SecuritySupport",
".",
"getInstance",
"(",
")",
";",
"is",
"=",
"ss",
".",
"getResourceAsStream",
"(",
"Obj... | Load a list of all the supported encodings.
System property "encodings" formatted using URL syntax may define an
external encodings list. Thanks to Sergey Ushakov for the code
contribution!
@xsl.usage internal | [
"Load",
"a",
"list",
"of",
"all",
"the",
"supported",
"encodings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Encodings.java#L315-L402 |
34,123 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Encodings.java | Encodings.lengthOfMimeNames | private static int lengthOfMimeNames(String val) {
// look for the space preceding the optional high char
int len = val.indexOf(' ');
// If len is zero it means the optional part is not there, so
// the value must be all Mime names, so set the length appropriately
if (len < 0)
... | java | private static int lengthOfMimeNames(String val) {
// look for the space preceding the optional high char
int len = val.indexOf(' ');
// If len is zero it means the optional part is not there, so
// the value must be all Mime names, so set the length appropriately
if (len < 0)
... | [
"private",
"static",
"int",
"lengthOfMimeNames",
"(",
"String",
"val",
")",
"{",
"// look for the space preceding the optional high char",
"int",
"len",
"=",
"val",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"// If len is zero it means the optional part is not there, so",
"... | Get the length of the Mime names within the property value
@param val The value of the property, which should contain a comma
separated list of Mime names, followed optionally by a space and the
high char value
@return | [
"Get",
"the",
"length",
"of",
"the",
"Mime",
"names",
"within",
"the",
"property",
"value"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/Encodings.java#L411-L420 |
34,124 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNumber.java | XNumber.zeros | static private String zeros(int n)
{
if (n < 1)
return "";
char[] buf = new char[n];
for (int i = 0; i < n; i++)
{
buf[i] = '0';
}
return new String(buf);
} | java | static private String zeros(int n)
{
if (n < 1)
return "";
char[] buf = new char[n];
for (int i = 0; i < n; i++)
{
buf[i] = '0';
}
return new String(buf);
} | [
"static",
"private",
"String",
"zeros",
"(",
"int",
"n",
")",
"{",
"if",
"(",
"n",
"<",
"1",
")",
"return",
"\"\"",
";",
"char",
"[",
"]",
"buf",
"=",
"new",
"char",
"[",
"n",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
... | Return a string of '0' of the given length
@param n Length of the string to be returned
@return a string of '0' with the given length | [
"Return",
"a",
"string",
"of",
"0",
"of",
"the",
"given",
"length"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/objects/XNumber.java#L356-L369 |
34,125 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java | FutureTask.report | @SuppressWarnings("unchecked")
private V report(int s) throws ExecutionException {
Object x = outcome;
if (s == NORMAL)
return (V)x;
if (s >= CANCELLED)
throw new CancellationException();
throw new ExecutionException((Throwable)x);
} | java | @SuppressWarnings("unchecked")
private V report(int s) throws ExecutionException {
Object x = outcome;
if (s == NORMAL)
return (V)x;
if (s >= CANCELLED)
throw new CancellationException();
throw new ExecutionException((Throwable)x);
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"V",
"report",
"(",
"int",
"s",
")",
"throws",
"ExecutionException",
"{",
"Object",
"x",
"=",
"outcome",
";",
"if",
"(",
"s",
"==",
"NORMAL",
")",
"return",
"(",
"V",
")",
"x",
";",
"if",
... | Returns result or throws exception for completed task.
@param s completed state value | [
"Returns",
"result",
"or",
"throws",
"exception",
"for",
"completed",
"task",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java#L119-L127 |
34,126 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java | FutureTask.set | protected void set(V v) {
if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) {
outcome = v;
U.putOrderedInt(this, STATE, NORMAL); // final state
finishCompletion();
}
} | java | protected void set(V v) {
if (U.compareAndSwapInt(this, STATE, NEW, COMPLETING)) {
outcome = v;
U.putOrderedInt(this, STATE, NORMAL); // final state
finishCompletion();
}
} | [
"protected",
"void",
"set",
"(",
"V",
"v",
")",
"{",
"if",
"(",
"U",
".",
"compareAndSwapInt",
"(",
"this",
",",
"STATE",
",",
"NEW",
",",
"COMPLETING",
")",
")",
"{",
"outcome",
"=",
"v",
";",
"U",
".",
"putOrderedInt",
"(",
"this",
",",
"STATE",
... | Sets the result of this future to the given value unless
this future has already been set or has been cancelled.
<p>This method is invoked internally by the {@link #run} method
upon successful completion of the computation.
@param v the value | [
"Sets",
"the",
"result",
"of",
"this",
"future",
"to",
"the",
"given",
"value",
"unless",
"this",
"future",
"has",
"already",
"been",
"set",
"or",
"has",
"been",
"cancelled",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java#L233-L239 |
34,127 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java | FutureTask.awaitDone | private int awaitDone(boolean timed, long nanos)
throws InterruptedException {
// The code below is very delicate, to achieve these goals:
// - call nanoTime exactly once for each call to park
// - if nanos <= 0L, return promptly without allocation or nanoTime
// - if nanos == Lo... | java | private int awaitDone(boolean timed, long nanos)
throws InterruptedException {
// The code below is very delicate, to achieve these goals:
// - call nanoTime exactly once for each call to park
// - if nanos <= 0L, return promptly without allocation or nanoTime
// - if nanos == Lo... | [
"private",
"int",
"awaitDone",
"(",
"boolean",
"timed",
",",
"long",
"nanos",
")",
"throws",
"InterruptedException",
"{",
"// The code below is very delicate, to achieve these goals:",
"// - call nanoTime exactly once for each call to park",
"// - if nanos <= 0L, return promptly withou... | Awaits completion or aborts on interrupt or timeout.
@param timed true if use timed waits
@param nanos time to wait, if timed
@return state upon completion or at timeout | [
"Awaits",
"completion",
"or",
"aborts",
"on",
"interrupt",
"or",
"timeout",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java#L398-L455 |
34,128 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java | FutureTask.removeWaiter | private void removeWaiter(WaitNode node) {
if (node != null) {
node.thread = null;
retry:
for (;;) { // restart on removeWaiter race
for (WaitNode pred = null, q = waiters, s; q != null; q = s) {
s = q.next;
if ... | java | private void removeWaiter(WaitNode node) {
if (node != null) {
node.thread = null;
retry:
for (;;) { // restart on removeWaiter race
for (WaitNode pred = null, q = waiters, s; q != null; q = s) {
s = q.next;
if ... | [
"private",
"void",
"removeWaiter",
"(",
"WaitNode",
"node",
")",
"{",
"if",
"(",
"node",
"!=",
"null",
")",
"{",
"node",
".",
"thread",
"=",
"null",
";",
"retry",
":",
"for",
"(",
";",
";",
")",
"{",
"// restart on removeWaiter race",
"for",
"(",
"Wait... | Tries to unlink a timed-out or interrupted wait node to avoid
accumulating garbage. Internal nodes are simply unspliced
without CAS since it is harmless if they are traversed anyway
by releasers. To avoid effects of unsplicing from already
removed nodes, the list is retraversed in case of an apparent
race. This is s... | [
"Tries",
"to",
"unlink",
"a",
"timed",
"-",
"out",
"or",
"interrupted",
"wait",
"node",
"to",
"avoid",
"accumulating",
"garbage",
".",
"Internal",
"nodes",
"are",
"simply",
"unspliced",
"without",
"CAS",
"since",
"it",
"is",
"harmless",
"if",
"they",
"are",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/FutureTask.java#L467-L487 |
34,129 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SortedOps.java | SortedOps.makeRef | static <T> Stream<T> makeRef(AbstractPipeline<?, T, ?> upstream,
Comparator<? super T> comparator) {
return new OfRef<>(upstream, comparator);
} | java | static <T> Stream<T> makeRef(AbstractPipeline<?, T, ?> upstream,
Comparator<? super T> comparator) {
return new OfRef<>(upstream, comparator);
} | [
"static",
"<",
"T",
">",
"Stream",
"<",
"T",
">",
"makeRef",
"(",
"AbstractPipeline",
"<",
"?",
",",
"T",
",",
"?",
">",
"upstream",
",",
"Comparator",
"<",
"?",
"super",
"T",
">",
"comparator",
")",
"{",
"return",
"new",
"OfRef",
"<>",
"(",
"upstr... | Appends a "sorted" operation to the provided stream.
@param <T> the type of both input and output elements
@param upstream a reference stream with element type T
@param comparator the comparator to order elements by | [
"Appends",
"a",
"sorted",
"operation",
"to",
"the",
"provided",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SortedOps.java#L61-L64 |
34,130 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java | ZipOutputStream.setComment | public void setComment(String comment) {
if (comment != null) {
this.comment = zc.getBytes(comment);
if (this.comment.length > 0xffff)
throw new IllegalArgumentException("ZIP file comment too long.");
}
} | java | public void setComment(String comment) {
if (comment != null) {
this.comment = zc.getBytes(comment);
if (this.comment.length > 0xffff)
throw new IllegalArgumentException("ZIP file comment too long.");
}
} | [
"public",
"void",
"setComment",
"(",
"String",
"comment",
")",
"{",
"if",
"(",
"comment",
"!=",
"null",
")",
"{",
"this",
".",
"comment",
"=",
"zc",
".",
"getBytes",
"(",
"comment",
")",
";",
"if",
"(",
"this",
".",
"comment",
".",
"length",
">",
"... | Sets the ZIP file comment.
@param comment the comment string
@exception IllegalArgumentException if the length of the specified
ZIP file comment is greater than 0xFFFF bytes | [
"Sets",
"the",
"ZIP",
"file",
"comment",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java#L132-L138 |
34,131 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java | ZipOutputStream.putNextEntry | public void putNextEntry(ZipEntry e) throws IOException {
ensureOpen();
if (current != null) {
closeEntry(); // close previous entry
}
if (e.time == -1) {
e.setTime(System.currentTimeMillis());
}
if (e.method == -1) {
e.method = m... | java | public void putNextEntry(ZipEntry e) throws IOException {
ensureOpen();
if (current != null) {
closeEntry(); // close previous entry
}
if (e.time == -1) {
e.setTime(System.currentTimeMillis());
}
if (e.method == -1) {
e.method = m... | [
"public",
"void",
"putNextEntry",
"(",
"ZipEntry",
"e",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"current",
"!=",
"null",
")",
"{",
"closeEntry",
"(",
")",
";",
"// close previous entry",
"}",
"if",
"(",
"e",
".",
"time"... | Begins writing a new ZIP file entry and positions the stream to the
start of the entry data. Closes the current entry if still active.
The default compression method will be used if no compression method
was specified for the entry, and the current time will be used if
the entry has no set modification time.
@param e t... | [
"Begins",
"writing",
"a",
"new",
"ZIP",
"file",
"entry",
"and",
"positions",
"the",
"stream",
"to",
"the",
"start",
"of",
"the",
"entry",
"data",
".",
"Closes",
"the",
"current",
"entry",
"if",
"still",
"active",
".",
"The",
"default",
"compression",
"meth... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java#L175-L223 |
34,132 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java | ZipOutputStream.closeEntry | public void closeEntry() throws IOException {
ensureOpen();
if (current != null) {
ZipEntry e = current.entry;
switch (e.method) {
case DEFLATED:
def.finish();
while (!def.finished()) {
deflate();
}
... | java | public void closeEntry() throws IOException {
ensureOpen();
if (current != null) {
ZipEntry e = current.entry;
switch (e.method) {
case DEFLATED:
def.finish();
while (!def.finished()) {
deflate();
}
... | [
"public",
"void",
"closeEntry",
"(",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"current",
"!=",
"null",
")",
"{",
"ZipEntry",
"e",
"=",
"current",
".",
"entry",
";",
"switch",
"(",
"e",
".",
"method",
")",
"{",
"case"... | Closes the current ZIP entry and positions the stream for writing
the next entry.
@exception ZipException if a ZIP format error has occurred
@exception IOException if an I/O error has occurred | [
"Closes",
"the",
"current",
"ZIP",
"entry",
"and",
"positions",
"the",
"stream",
"for",
"writing",
"the",
"next",
"entry",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java#L231-L288 |
34,133 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java | ZipOutputStream.write | public synchronized void write(byte[] b, int off, int len)
throws IOException
{
ensureOpen();
if (off < 0 || len < 0 || off > b.length - len) {
throw new IndexOutOfBoundsException();
} else if (len == 0) {
return;
}
if (current == null) {
... | java | public synchronized void write(byte[] b, int off, int len)
throws IOException
{
ensureOpen();
if (off < 0 || len < 0 || off > b.length - len) {
throw new IndexOutOfBoundsException();
} else if (len == 0) {
return;
}
if (current == null) {
... | [
"public",
"synchronized",
"void",
"write",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"off",
"<",
"0",
"||",
"len",
"<",
"0",
"||",
"off",
">",
"b",... | Writes an array of bytes to the current ZIP entry data. This method
will block until all the bytes are written.
@param b the data to be written
@param off the start offset in the data
@param len the number of bytes that are written
@exception ZipException if a ZIP file error has occurred
@exception IOException if an I/... | [
"Writes",
"an",
"array",
"of",
"bytes",
"to",
"the",
"current",
"ZIP",
"entry",
"data",
".",
"This",
"method",
"will",
"block",
"until",
"all",
"the",
"bytes",
"are",
"written",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java#L299-L329 |
34,134 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java | ZipOutputStream.finish | public void finish() throws IOException {
ensureOpen();
if (finished) {
return;
}
if (xentries.isEmpty()) {
throw new ZipException("No entries");
}
if (current != null) {
closeEntry();
}
// write central directory
... | java | public void finish() throws IOException {
ensureOpen();
if (finished) {
return;
}
if (xentries.isEmpty()) {
throw new ZipException("No entries");
}
if (current != null) {
closeEntry();
}
// write central directory
... | [
"public",
"void",
"finish",
"(",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"finished",
")",
"{",
"return",
";",
"}",
"if",
"(",
"xentries",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"ZipException",
"(",
"\"N... | Finishes writing the contents of the ZIP output stream without closing
the underlying stream. Use this method when applying multiple filters
in succession to the same output stream.
@exception ZipException if a ZIP file error has occurred
@exception IOException if an I/O exception has occurred | [
"Finishes",
"writing",
"the",
"contents",
"of",
"the",
"ZIP",
"output",
"stream",
"without",
"closing",
"the",
"underlying",
"stream",
".",
"Use",
"this",
"method",
"when",
"applying",
"multiple",
"filters",
"in",
"succession",
"to",
"the",
"same",
"output",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipOutputStream.java#L338-L356 |
34,135 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.getDisplayName | public String getDisplayName(TimeZone tz, GenericNameType type, long date) {
String name = null;
String tzCanonicalID = null;
switch (type) {
case LOCATION:
tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz);
if (tzCanonicalID != null) {
name = getGen... | java | public String getDisplayName(TimeZone tz, GenericNameType type, long date) {
String name = null;
String tzCanonicalID = null;
switch (type) {
case LOCATION:
tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz);
if (tzCanonicalID != null) {
name = getGen... | [
"public",
"String",
"getDisplayName",
"(",
"TimeZone",
"tz",
",",
"GenericNameType",
"type",
",",
"long",
"date",
")",
"{",
"String",
"name",
"=",
"null",
";",
"String",
"tzCanonicalID",
"=",
"null",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"LOCATION"... | Returns the display name of the time zone for the given name type
at the given date, or null if the display name is not available.
@param tz the time zone
@param type the generic name type - see {@link GenericNameType}
@param date the date
@return the display name of the time zone for the given name type
at the given ... | [
"Returns",
"the",
"display",
"name",
"of",
"the",
"time",
"zone",
"for",
"the",
"given",
"name",
"type",
"at",
"the",
"given",
"date",
"or",
"null",
"if",
"the",
"display",
"name",
"is",
"not",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L197-L219 |
34,136 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.getGenericLocationName | public String getGenericLocationName(String canonicalTzID) {
if (canonicalTzID == null || canonicalTzID.length() == 0) {
return null;
}
String name = _genericLocationNamesMap.get(canonicalTzID);
if (name != null) {
if (name.length() == 0) {
// empt... | java | public String getGenericLocationName(String canonicalTzID) {
if (canonicalTzID == null || canonicalTzID.length() == 0) {
return null;
}
String name = _genericLocationNamesMap.get(canonicalTzID);
if (name != null) {
if (name.length() == 0) {
// empt... | [
"public",
"String",
"getGenericLocationName",
"(",
"String",
"canonicalTzID",
")",
"{",
"if",
"(",
"canonicalTzID",
"==",
"null",
"||",
"canonicalTzID",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"null",
";",
"}",
"String",
"name",
"=",
"_gene... | Returns the generic location name for the given canonical time zone ID.
@param canonicalTzID the canonical time zone ID
@return the generic location name for the given canonical time zone ID. | [
"Returns",
"the",
"generic",
"location",
"name",
"for",
"the",
"given",
"canonical",
"time",
"zone",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L227-L274 |
34,137 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.formatPattern | private synchronized String formatPattern(Pattern pat, String... args) {
if (_patternFormatters == null) {
_patternFormatters = new MessageFormat[Pattern.values().length];
}
int idx = pat.ordinal();
if (_patternFormatters[idx] == null) {
String patText;
... | java | private synchronized String formatPattern(Pattern pat, String... args) {
if (_patternFormatters == null) {
_patternFormatters = new MessageFormat[Pattern.values().length];
}
int idx = pat.ordinal();
if (_patternFormatters[idx] == null) {
String patText;
... | [
"private",
"synchronized",
"String",
"formatPattern",
"(",
"Pattern",
"pat",
",",
"String",
"...",
"args",
")",
"{",
"if",
"(",
"_patternFormatters",
"==",
"null",
")",
"{",
"_patternFormatters",
"=",
"new",
"MessageFormat",
"[",
"Pattern",
".",
"values",
"(",... | Private simple pattern formatter used for formatting generic location names
and partial location names. We intentionally use JDK MessageFormat
for performance reason.
@param pat the message pattern enum
@param args the format argument(s)
@return the formatted string | [
"Private",
"simple",
"pattern",
"formatter",
"used",
"for",
"formatting",
"generic",
"location",
"names",
"and",
"partial",
"location",
"names",
".",
"We",
"intentionally",
"use",
"JDK",
"MessageFormat",
"for",
"performance",
"reason",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L443-L462 |
34,138 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.getLocaleDisplayNames | private synchronized LocaleDisplayNames getLocaleDisplayNames() {
LocaleDisplayNames locNames = null;
if (_localeDisplayNamesRef != null) {
locNames = _localeDisplayNamesRef.get();
}
if (locNames == null) {
locNames = LocaleDisplayNames.getInstance(_locale);
... | java | private synchronized LocaleDisplayNames getLocaleDisplayNames() {
LocaleDisplayNames locNames = null;
if (_localeDisplayNamesRef != null) {
locNames = _localeDisplayNamesRef.get();
}
if (locNames == null) {
locNames = LocaleDisplayNames.getInstance(_locale);
... | [
"private",
"synchronized",
"LocaleDisplayNames",
"getLocaleDisplayNames",
"(",
")",
"{",
"LocaleDisplayNames",
"locNames",
"=",
"null",
";",
"if",
"(",
"_localeDisplayNamesRef",
"!=",
"null",
")",
"{",
"locNames",
"=",
"_localeDisplayNamesRef",
".",
"get",
"(",
")",... | Private method returning LocaleDisplayNames instance for the locale of this
instance. Because LocaleDisplayNames is only used for generic
location formant and partial location format, the LocaleDisplayNames
is instantiated lazily.
@return the instance of LocaleDisplayNames for the locale of this object. | [
"Private",
"method",
"returning",
"LocaleDisplayNames",
"instance",
"for",
"the",
"locale",
"of",
"this",
"instance",
".",
"Because",
"LocaleDisplayNames",
"is",
"only",
"used",
"for",
"generic",
"location",
"formant",
"and",
"partial",
"location",
"format",
"the",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L472-L482 |
34,139 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.findBestMatch | public GenericMatchInfo findBestMatch(String text, int start, EnumSet<GenericNameType> genericTypes) {
if (text == null || text.length() == 0 || start < 0 || start >= text.length()) {
throw new IllegalArgumentException("bad input text or range");
}
GenericMatchInfo bestMatch = null;
... | java | public GenericMatchInfo findBestMatch(String text, int start, EnumSet<GenericNameType> genericTypes) {
if (text == null || text.length() == 0 || start < 0 || start >= text.length()) {
throw new IllegalArgumentException("bad input text or range");
}
GenericMatchInfo bestMatch = null;
... | [
"public",
"GenericMatchInfo",
"findBestMatch",
"(",
"String",
"text",
",",
"int",
"start",
",",
"EnumSet",
"<",
"GenericNameType",
">",
"genericTypes",
")",
"{",
"if",
"(",
"text",
"==",
"null",
"||",
"text",
".",
"length",
"(",
")",
"==",
"0",
"||",
"st... | Returns the best match of time zone display name for the specified types in the
given text at the given offset.
@param text the text
@param start the start offset in the text
@param genericTypes the set of name types.
@return the best matching name info. | [
"Returns",
"the",
"best",
"match",
"of",
"time",
"zone",
"display",
"name",
"for",
"the",
"specified",
"types",
"in",
"the",
"given",
"text",
"at",
"the",
"given",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L704-L760 |
34,140 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.find | public Collection<GenericMatchInfo> find(String text, int start, EnumSet<GenericNameType> genericTypes) {
if (text == null || text.length() == 0 || start < 0 || start >= text.length()) {
throw new IllegalArgumentException("bad input text or range");
}
// Find matches in the local tri... | java | public Collection<GenericMatchInfo> find(String text, int start, EnumSet<GenericNameType> genericTypes) {
if (text == null || text.length() == 0 || start < 0 || start >= text.length()) {
throw new IllegalArgumentException("bad input text or range");
}
// Find matches in the local tri... | [
"public",
"Collection",
"<",
"GenericMatchInfo",
">",
"find",
"(",
"String",
"text",
",",
"int",
"start",
",",
"EnumSet",
"<",
"GenericNameType",
">",
"genericTypes",
")",
"{",
"if",
"(",
"text",
"==",
"null",
"||",
"text",
".",
"length",
"(",
")",
"==",... | Returns a collection of time zone display name matches for the specified types in the
given text at the given offset.
@param text the text
@param start the start offset in the text
@param genericTypes the set of name types.
@return A collection of match info. | [
"Returns",
"a",
"collection",
"of",
"time",
"zone",
"display",
"name",
"matches",
"for",
"the",
"specified",
"types",
"in",
"the",
"given",
"text",
"at",
"the",
"given",
"offset",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L770-L789 |
34,141 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java | TimeZoneGenericNames.findTimeZoneNames | private Collection<MatchInfo> findTimeZoneNames(String text, int start, EnumSet<GenericNameType> types) {
Collection<MatchInfo> tznamesMatches = null;
// Check if the target name type is really in the TimeZoneNames
EnumSet<NameType> nameTypes = EnumSet.noneOf(NameType.class);
if (types.... | java | private Collection<MatchInfo> findTimeZoneNames(String text, int start, EnumSet<GenericNameType> types) {
Collection<MatchInfo> tznamesMatches = null;
// Check if the target name type is really in the TimeZoneNames
EnumSet<NameType> nameTypes = EnumSet.noneOf(NameType.class);
if (types.... | [
"private",
"Collection",
"<",
"MatchInfo",
">",
"findTimeZoneNames",
"(",
"String",
"text",
",",
"int",
"start",
",",
"EnumSet",
"<",
"GenericNameType",
">",
"types",
")",
"{",
"Collection",
"<",
"MatchInfo",
">",
"tznamesMatches",
"=",
"null",
";",
"// Check ... | Returns a collection of time zone display name matches for the specified types in the
given text at the given offset. This method only finds matches from the TimeZoneNames
used by this object.
@param text the text
@param start the start offset in the text
@param types the set of name types.
@return A collection of matc... | [
"Returns",
"a",
"collection",
"of",
"time",
"zone",
"display",
"name",
"matches",
"for",
"the",
"specified",
"types",
"in",
"the",
"given",
"text",
"at",
"the",
"given",
"offset",
".",
"This",
"method",
"only",
"finds",
"matches",
"from",
"the",
"TimeZoneNam... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L840-L859 |
34,142 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.applyFilter | protected boolean applyFilter(Node node, int nodeType) {
if (fFilter != null && (fWhatToShowFilter & nodeType) != 0) {
short code = fFilter.acceptNode(node);
switch (code) {
case NodeFilter.FILTER_REJECT :
case NodeFilter.FILTER_SKIP :
... | java | protected boolean applyFilter(Node node, int nodeType) {
if (fFilter != null && (fWhatToShowFilter & nodeType) != 0) {
short code = fFilter.acceptNode(node);
switch (code) {
case NodeFilter.FILTER_REJECT :
case NodeFilter.FILTER_SKIP :
... | [
"protected",
"boolean",
"applyFilter",
"(",
"Node",
"node",
",",
"int",
"nodeType",
")",
"{",
"if",
"(",
"fFilter",
"!=",
"null",
"&&",
"(",
"fWhatToShowFilter",
"&",
"nodeType",
")",
"!=",
"0",
")",
"{",
"short",
"code",
"=",
"fFilter",
".",
"acceptNode... | Applies a filter on the node to serialize
@param node The Node to serialize
@return True if the node is to be serialized else false if the node
is to be rejected or skipped. | [
"Applies",
"a",
"filter",
"on",
"the",
"node",
"to",
"serialize"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L476-L488 |
34,143 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializeDocType | protected void serializeDocType(DocumentType node, boolean bStart)
throws SAXException {
// The DocType and internalSubset can not be modified in DOM and is
// considered to be well-formed as the outcome of successful parsing.
String docTypeName = node.getNodeName();
String publi... | java | protected void serializeDocType(DocumentType node, boolean bStart)
throws SAXException {
// The DocType and internalSubset can not be modified in DOM and is
// considered to be well-formed as the outcome of successful parsing.
String docTypeName = node.getNodeName();
String publi... | [
"protected",
"void",
"serializeDocType",
"(",
"DocumentType",
"node",
",",
"boolean",
"bStart",
")",
"throws",
"SAXException",
"{",
"// The DocType and internalSubset can not be modified in DOM and is",
"// considered to be well-formed as the outcome of successful parsing.",
"String",
... | Serializes a Document Type Node.
@param node The Docuemnt Type Node to serialize
@param bStart Invoked at the start or end of node. Default true. | [
"Serializes",
"a",
"Document",
"Type",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L496-L563 |
34,144 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializeComment | protected void serializeComment(Comment node) throws SAXException {
// comments=true
if ((fFeatures & COMMENTS) != 0) {
String data = node.getData();
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isCommentWellFormed(data);
}
... | java | protected void serializeComment(Comment node) throws SAXException {
// comments=true
if ((fFeatures & COMMENTS) != 0) {
String data = node.getData();
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isCommentWellFormed(data);
}
... | [
"protected",
"void",
"serializeComment",
"(",
"Comment",
"node",
")",
"throws",
"SAXException",
"{",
"// comments=true",
"if",
"(",
"(",
"fFeatures",
"&",
"COMMENTS",
")",
"!=",
"0",
")",
"{",
"String",
"data",
"=",
"node",
".",
"getData",
"(",
")",
";",
... | Serializes a Comment Node.
@param node The Comment Node to serialize | [
"Serializes",
"a",
"Comment",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L570-L590 |
34,145 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializeElement | protected void serializeElement(Element node, boolean bStart)
throws SAXException {
if (bStart) {
fElementDepth++;
// We use the Xalan specific startElement and starPrefixMapping calls
// (and addAttribute and namespaceAfterStartElement) as opposed to
//... | java | protected void serializeElement(Element node, boolean bStart)
throws SAXException {
if (bStart) {
fElementDepth++;
// We use the Xalan specific startElement and starPrefixMapping calls
// (and addAttribute and namespaceAfterStartElement) as opposed to
//... | [
"protected",
"void",
"serializeElement",
"(",
"Element",
"node",
",",
"boolean",
"bStart",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"bStart",
")",
"{",
"fElementDepth",
"++",
";",
"// We use the Xalan specific startElement and starPrefixMapping calls ",
"// (and add... | Serializes an Element Node.
@param node The Element Node to serialize
@param bStart Invoked at the start or end of node. | [
"Serializes",
"an",
"Element",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L598-L656 |
34,146 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializePI | protected void serializePI(ProcessingInstruction node)
throws SAXException {
ProcessingInstruction pi = node;
String name = pi.getNodeName();
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isPIWellFormed(node);
}
// apply the LSSerializer f... | java | protected void serializePI(ProcessingInstruction node)
throws SAXException {
ProcessingInstruction pi = node;
String name = pi.getNodeName();
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isPIWellFormed(node);
}
// apply the LSSerializer f... | [
"protected",
"void",
"serializePI",
"(",
"ProcessingInstruction",
"node",
")",
"throws",
"SAXException",
"{",
"ProcessingInstruction",
"pi",
"=",
"node",
";",
"String",
"name",
"=",
"pi",
".",
"getNodeName",
"(",
")",
";",
"// well-formed=true",
"if",
"(",
"(",
... | Serializes an ProcessingInstruction Node.
@param node The ProcessingInstruction Node to serialize | [
"Serializes",
"an",
"ProcessingInstruction",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L887-L908 |
34,147 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializeCDATASection | protected void serializeCDATASection(CDATASection node)
throws SAXException {
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isCDATASectionWellFormed(node);
}
// cdata-sections = true
if ((fFeatures & CDATA) != 0) {
// split-cdata-secti... | java | protected void serializeCDATASection(CDATASection node)
throws SAXException {
// well-formed=true
if ((fFeatures & WELLFORMED) != 0) {
isCDATASectionWellFormed(node);
}
// cdata-sections = true
if ((fFeatures & CDATA) != 0) {
// split-cdata-secti... | [
"protected",
"void",
"serializeCDATASection",
"(",
"CDATASection",
"node",
")",
"throws",
"SAXException",
"{",
"// well-formed=true",
"if",
"(",
"(",
"fFeatures",
"&",
"WELLFORMED",
")",
"!=",
"0",
")",
"{",
"isCDATASectionWellFormed",
"(",
"node",
")",
";",
"}"... | Serializes an CDATASection Node.
@param node The CDATASection Node to serialize | [
"Serializes",
"an",
"CDATASection",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L915-L991 |
34,148 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializeText | protected void serializeText(Text node) throws SAXException {
if (fNextIsRaw) {
fNextIsRaw = false;
fSerializer.processingInstruction(
javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING,
"");
dispatachChars(node);
fSerializer.pro... | java | protected void serializeText(Text node) throws SAXException {
if (fNextIsRaw) {
fNextIsRaw = false;
fSerializer.processingInstruction(
javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING,
"");
dispatachChars(node);
fSerializer.pro... | [
"protected",
"void",
"serializeText",
"(",
"Text",
"node",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"fNextIsRaw",
")",
"{",
"fNextIsRaw",
"=",
"false",
";",
"fSerializer",
".",
"processingInstruction",
"(",
"javax",
".",
"xml",
".",
"transform",
".",
"... | Serializes an Text Node.
@param node The Text Node to serialize | [
"Serializes",
"an",
"Text",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L998-L1043 |
34,149 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.serializeEntityReference | protected void serializeEntityReference(
EntityReference node,
boolean bStart)
throws SAXException {
if (bStart) {
EntityReference eref = node;
// entities=true
if ((fFeatures & ENTITIES) != 0) {
// perform well-formedn... | java | protected void serializeEntityReference(
EntityReference node,
boolean bStart)
throws SAXException {
if (bStart) {
EntityReference eref = node;
// entities=true
if ((fFeatures & ENTITIES) != 0) {
// perform well-formedn... | [
"protected",
"void",
"serializeEntityReference",
"(",
"EntityReference",
"node",
",",
"boolean",
"bStart",
")",
"throws",
"SAXException",
"{",
"if",
"(",
"bStart",
")",
"{",
"EntityReference",
"eref",
"=",
"node",
";",
"// entities=true",
"if",
"(",
"(",
"fFeatu... | Serializes an EntityReference Node.
@param node The EntityReference Node to serialize
@param bStart Inicates if called from start or endNode | [
"Serializes",
"an",
"EntityReference",
"Node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1051-L1095 |
34,150 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isWFXMLChar | protected boolean isWFXMLChar(String chardata, Character refInvalidChar) {
if (chardata == null || (chardata.length() == 0)) {
return true;
}
char[] dataarray = chardata.toCharArray();
int datalength = dataarray.length;
// version of the document is XML 1.1
... | java | protected boolean isWFXMLChar(String chardata, Character refInvalidChar) {
if (chardata == null || (chardata.length() == 0)) {
return true;
}
char[] dataarray = chardata.toCharArray();
int datalength = dataarray.length;
// version of the document is XML 1.1
... | [
"protected",
"boolean",
"isWFXMLChar",
"(",
"String",
"chardata",
",",
"Character",
"refInvalidChar",
")",
"{",
"if",
"(",
"chardata",
"==",
"null",
"||",
"(",
"chardata",
".",
"length",
"(",
")",
"==",
"0",
")",
")",
"{",
"return",
"true",
";",
"}",
"... | Checks if a XML character is well-formed
@param characters A String of characters to be checked for Well-Formedness
@param refInvalidChar A reference to the character to be returned that was determined invalid. | [
"Checks",
"if",
"a",
"XML",
"character",
"is",
"well",
"-",
"formed"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1157-L1210 |
34,151 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isCommentWellFormed | protected void isCommentWellFormed(String data) {
if (data == null || (data.length() == 0)) {
return;
}
char[] dataarray = data.toCharArray();
int datalength = dataarray.length;
// version of the document is XML 1.1
if (fIsXMLVersion11) {
// we n... | java | protected void isCommentWellFormed(String data) {
if (data == null || (data.length() == 0)) {
return;
}
char[] dataarray = data.toCharArray();
int datalength = dataarray.length;
// version of the document is XML 1.1
if (fIsXMLVersion11) {
// we n... | [
"protected",
"void",
"isCommentWellFormed",
"(",
"String",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
"||",
"(",
"data",
".",
"length",
"(",
")",
"==",
"0",
")",
")",
"{",
"return",
";",
"}",
"char",
"[",
"]",
"dataarray",
"=",
"data",
".",... | Checks if a comment node is well-formed
@param data The contents of the comment node
@return a boolean indiacating if the comment is well-formed or not. | [
"Checks",
"if",
"a",
"comment",
"node",
"is",
"well",
"-",
"formed"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1281-L1389 |
34,152 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isElementWellFormed | protected void isElementWellFormed(Node node) {
boolean isNameWF = false;
if ((fFeatures & NAMESPACES) != 0) {
isNameWF =
isValidQName(
node.getPrefix(),
node.getLocalName(),
fIsXMLVersion11);
} else {
... | java | protected void isElementWellFormed(Node node) {
boolean isNameWF = false;
if ((fFeatures & NAMESPACES) != 0) {
isNameWF =
isValidQName(
node.getPrefix(),
node.getLocalName(),
fIsXMLVersion11);
} else {
... | [
"protected",
"void",
"isElementWellFormed",
"(",
"Node",
"node",
")",
"{",
"boolean",
"isNameWF",
"=",
"false",
";",
"if",
"(",
"(",
"fFeatures",
"&",
"NAMESPACES",
")",
"!=",
"0",
")",
"{",
"isNameWF",
"=",
"isValidQName",
"(",
"node",
".",
"getPrefix",
... | Checks if an element node is well-formed, by checking its Name for well-formedness.
@param data The contents of the comment node
@return a boolean indiacating if the comment is well-formed or not. | [
"Checks",
"if",
"an",
"element",
"node",
"is",
"well",
"-",
"formed",
"by",
"checking",
"its",
"Name",
"for",
"well",
"-",
"formedness",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1397-L1426 |
34,153 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isAttributeWellFormed | protected void isAttributeWellFormed(Node node) {
boolean isNameWF = false;
if ((fFeatures & NAMESPACES) != 0) {
isNameWF =
isValidQName(
node.getPrefix(),
node.getLocalName(),
fIsXMLVersion11);
} else {
... | java | protected void isAttributeWellFormed(Node node) {
boolean isNameWF = false;
if ((fFeatures & NAMESPACES) != 0) {
isNameWF =
isValidQName(
node.getPrefix(),
node.getLocalName(),
fIsXMLVersion11);
} else {
... | [
"protected",
"void",
"isAttributeWellFormed",
"(",
"Node",
"node",
")",
"{",
"boolean",
"isNameWF",
"=",
"false",
";",
"if",
"(",
"(",
"fFeatures",
"&",
"NAMESPACES",
")",
"!=",
"0",
")",
"{",
"isNameWF",
"=",
"isValidQName",
"(",
"node",
".",
"getPrefix",... | Checks if an attr node is well-formed, by checking it's Name and value
for well-formedness.
@param data The contents of the comment node
@return a boolean indiacating if the comment is well-formed or not. | [
"Checks",
"if",
"an",
"attr",
"node",
"is",
"well",
"-",
"formed",
"by",
"checking",
"it",
"s",
"Name",
"and",
"value",
"for",
"well",
"-",
"formedness",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1435-L1522 |
34,154 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isPIWellFormed | protected void isPIWellFormed(ProcessingInstruction node) {
// Is the PI Target a valid XML name
if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
String msg =
Utils.messages.createMessage(
MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
... | java | protected void isPIWellFormed(ProcessingInstruction node) {
// Is the PI Target a valid XML name
if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
String msg =
Utils.messages.createMessage(
MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME,
... | [
"protected",
"void",
"isPIWellFormed",
"(",
"ProcessingInstruction",
"node",
")",
"{",
"// Is the PI Target a valid XML name",
"if",
"(",
"!",
"isXMLName",
"(",
"node",
".",
"getNodeName",
"(",
")",
",",
"fIsXMLVersion11",
")",
")",
"{",
"String",
"msg",
"=",
"U... | Checks if a PI node is well-formed, by checking it's Name and data
for well-formedness.
@param data The contents of the comment node | [
"Checks",
"if",
"a",
"PI",
"node",
"is",
"well",
"-",
"formed",
"by",
"checking",
"it",
"s",
"Name",
"and",
"data",
"for",
"well",
"-",
"formedness",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1530-L1571 |
34,155 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isCDATASectionWellFormed | protected void isCDATASectionWellFormed(CDATASection node) {
// Does the data valid XML character data
Character invalidChar = isWFXMLChar(node.getData());
//if (!isWFXMLChar(node.getData(), invalidChar)) {
if (invalidChar != null) {
String msg =
Utils... | java | protected void isCDATASectionWellFormed(CDATASection node) {
// Does the data valid XML character data
Character invalidChar = isWFXMLChar(node.getData());
//if (!isWFXMLChar(node.getData(), invalidChar)) {
if (invalidChar != null) {
String msg =
Utils... | [
"protected",
"void",
"isCDATASectionWellFormed",
"(",
"CDATASection",
"node",
")",
"{",
"// Does the data valid XML character data ",
"Character",
"invalidChar",
"=",
"isWFXMLChar",
"(",
"node",
".",
"getData",
"(",
")",
")",
";",
"//if (!isWFXMLChar(node.getData(), ... | Checks if an CDATASection node is well-formed, by checking it's data
for well-formedness. Note that the presence of a CDATA termination mark
in the contents of a CDATASection is handled by the parameter
spli-cdata-sections
@param data The contents of the comment node | [
"Checks",
"if",
"an",
"CDATASection",
"node",
"is",
"well",
"-",
"formed",
"by",
"checking",
"it",
"s",
"data",
"for",
"well",
"-",
"formedness",
".",
"Note",
"that",
"the",
"presence",
"of",
"a",
"CDATA",
"termination",
"mark",
"in",
"the",
"contents",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1581-L1602 |
34,156 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isTextWellFormed | protected void isTextWellFormed(Text node) {
// Does the data valid XML character data
Character invalidChar = isWFXMLChar(node.getData());
if (invalidChar != null) {
String msg =
Utils.messages.createMessage(
MsgKey.ER_WF_INVALID_CHARACTER_IN_TE... | java | protected void isTextWellFormed(Text node) {
// Does the data valid XML character data
Character invalidChar = isWFXMLChar(node.getData());
if (invalidChar != null) {
String msg =
Utils.messages.createMessage(
MsgKey.ER_WF_INVALID_CHARACTER_IN_TE... | [
"protected",
"void",
"isTextWellFormed",
"(",
"Text",
"node",
")",
"{",
"// Does the data valid XML character data ",
"Character",
"invalidChar",
"=",
"isWFXMLChar",
"(",
"node",
".",
"getData",
"(",
")",
")",
";",
"if",
"(",
"invalidChar",
"!=",
"null",
")... | Checks if an Text node is well-formed, by checking if it contains invalid
XML characters.
@param data The contents of the comment node | [
"Checks",
"if",
"an",
"Text",
"node",
"is",
"well",
"-",
"formed",
"by",
"checking",
"if",
"it",
"contains",
"invalid",
"XML",
"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/DOM3TreeWalker.java#L1610-L1630 |
34,157 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.isEntityReferneceWellFormed | protected void isEntityReferneceWellFormed(EntityReference node) {
// Is the EntityReference name a valid XML name
if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
String msg =
Utils.messages.createMessage(
MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME... | java | protected void isEntityReferneceWellFormed(EntityReference node) {
// Is the EntityReference name a valid XML name
if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) {
String msg =
Utils.messages.createMessage(
MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME... | [
"protected",
"void",
"isEntityReferneceWellFormed",
"(",
"EntityReference",
"node",
")",
"{",
"// Is the EntityReference name a valid XML name",
"if",
"(",
"!",
"isXMLName",
"(",
"node",
".",
"getNodeName",
"(",
")",
",",
"fIsXMLVersion11",
")",
")",
"{",
"String",
... | Checks if an EntityRefernece node is well-formed, by checking it's node name. Then depending
on whether it is referenced in Element content or in an Attr Node, checks if the EntityReference
references an unparsed entity or a external entity and if so throws raises the
appropriate well-formedness error.
@param data Th... | [
"Checks",
"if",
"an",
"EntityRefernece",
"node",
"is",
"well",
"-",
"formed",
"by",
"checking",
"it",
"s",
"node",
"name",
".",
"Then",
"depending",
"on",
"whether",
"it",
"is",
"referenced",
"in",
"Element",
"content",
"or",
"in",
"an",
"Attr",
"Node",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1641-L1738 |
34,158 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.checkUnboundPrefixInEntRef | protected void checkUnboundPrefixInEntRef(Node node) {
Node child, next;
for (child = node.getFirstChild(); child != null; child = next) {
next = child.getNextSibling();
if (child.getNodeType() == Node.ELEMENT_NODE) {
//If a NamespaceURI is not declared for the ... | java | protected void checkUnboundPrefixInEntRef(Node node) {
Node child, next;
for (child = node.getFirstChild(); child != null; child = next) {
next = child.getNextSibling();
if (child.getNodeType() == Node.ELEMENT_NODE) {
//If a NamespaceURI is not declared for the ... | [
"protected",
"void",
"checkUnboundPrefixInEntRef",
"(",
"Node",
"node",
")",
"{",
"Node",
"child",
",",
"next",
";",
"for",
"(",
"child",
"=",
"node",
".",
"getFirstChild",
"(",
")",
";",
"child",
"!=",
"null",
";",
"child",
"=",
"next",
")",
"{",
"nex... | If the configuration parameter "namespaces" is set to true, this methods
checks if an entity whose replacement text contains unbound namespace
prefixes is referenced in a location where there are no bindings for
the namespace prefixes and if so raises a LSException with the error-type
"unbound-prefix-in-entity-referenc... | [
"If",
"the",
"configuration",
"parameter",
"namespaces",
"is",
"set",
"to",
"true",
"this",
"methods",
"checks",
"if",
"an",
"entity",
"whose",
"replacement",
"text",
"contains",
"unbound",
"namespace",
"prefixes",
"is",
"referenced",
"in",
"a",
"location",
"whe... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1749-L1813 |
34,159 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.recordLocalNSDecl | protected void recordLocalNSDecl(Node node) {
NamedNodeMap atts = ((Element) node).getAttributes();
int length = atts.getLength();
for (int i = 0; i < length; i++) {
Node attr = atts.item(i);
String localName = attr.getLocalName();
String attrPrefix = attr.g... | java | protected void recordLocalNSDecl(Node node) {
NamedNodeMap atts = ((Element) node).getAttributes();
int length = atts.getLength();
for (int i = 0; i < length; i++) {
Node attr = atts.item(i);
String localName = attr.getLocalName();
String attrPrefix = attr.g... | [
"protected",
"void",
"recordLocalNSDecl",
"(",
"Node",
"node",
")",
"{",
"NamedNodeMap",
"atts",
"=",
"(",
"(",
"Element",
")",
"node",
")",
".",
"getAttributes",
"(",
")",
";",
"int",
"length",
"=",
"atts",
".",
"getLength",
"(",
")",
";",
"for",
"(",... | Records local namespace declarations, to be used for normalization later
@param Node, The element node, whose namespace declarations are to be recorded | [
"Records",
"local",
"namespace",
"declarations",
"to",
"be",
"used",
"for",
"normalization",
"later"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1823-L1879 |
34,160 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.fixupElementNS | protected void fixupElementNS(Node node) throws SAXException {
String namespaceURI = ((Element) node).getNamespaceURI();
String prefix = ((Element) node).getPrefix();
String localName = ((Element) node).getLocalName();
if (namespaceURI != null) {
//if ( Element's prefix/name... | java | protected void fixupElementNS(Node node) throws SAXException {
String namespaceURI = ((Element) node).getNamespaceURI();
String prefix = ((Element) node).getPrefix();
String localName = ((Element) node).getLocalName();
if (namespaceURI != null) {
//if ( Element's prefix/name... | [
"protected",
"void",
"fixupElementNS",
"(",
"Node",
"node",
")",
"throws",
"SAXException",
"{",
"String",
"namespaceURI",
"=",
"(",
"(",
"Element",
")",
"node",
")",
".",
"getNamespaceURI",
"(",
")",
";",
"String",
"prefix",
"=",
"(",
"(",
"Element",
")",
... | Fixes an element's namespace
@param Node, The element node, whose namespace is to be fixed | [
"Fixes",
"an",
"element",
"s",
"namespace"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java#L1886-L1949 |
34,161 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java | DOM3TreeWalker.initProperties | protected void initProperties(Properties properties) {
for (Enumeration keys = properties.keys(); keys.hasMoreElements();) {
final String key = (String) keys.nextElement();
// caonical-form
// Other features will be enabled or disabled when this is set to true or false... | java | protected void initProperties(Properties properties) {
for (Enumeration keys = properties.keys(); keys.hasMoreElements();) {
final String key = (String) keys.nextElement();
// caonical-form
// Other features will be enabled or disabled when this is set to true or false... | [
"protected",
"void",
"initProperties",
"(",
"Properties",
"properties",
")",
"{",
"for",
"(",
"Enumeration",
"keys",
"=",
"properties",
".",
"keys",
"(",
")",
";",
"keys",
".",
"hasMoreElements",
"(",
")",
";",
")",
"{",
"final",
"String",
"key",
"=",
"(... | Initializes fFeatures based on the DOMConfiguration Parameters set.
@param properties DOMConfiguraiton properties that were set and which are
to be used while serializing the DOM. | [
"Initializes",
"fFeatures",
"based",
"on",
"the",
"DOMConfiguration",
"Parameters",
"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/DOM3TreeWalker.java#L2049-L2147 |
34,162 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.tryInitialize | private void tryInitialize(boolean checkTermination) {
if (runState == 0) { // bootstrap by locking static field
int p = config & SMASK;
int n = (p > 1) ? p - 1 : 1; // ensure at least 2 slots
n |= n >>> 1; // create workQueues array with size a power of two
n ... | java | private void tryInitialize(boolean checkTermination) {
if (runState == 0) { // bootstrap by locking static field
int p = config & SMASK;
int n = (p > 1) ? p - 1 : 1; // ensure at least 2 slots
n |= n >>> 1; // create workQueues array with size a power of two
n ... | [
"private",
"void",
"tryInitialize",
"(",
"boolean",
"checkTermination",
")",
"{",
"if",
"(",
"runState",
"==",
"0",
")",
"{",
"// bootstrap by locking static field",
"int",
"p",
"=",
"config",
"&",
"SMASK",
";",
"int",
"n",
"=",
"(",
"p",
">",
"1",
")",
... | Instantiates fields upon first submission, or upon shutdown if
no submissions. If checkTermination true, also responds to
termination by external calls submitting tasks. | [
"Instantiates",
"fields",
"upon",
"first",
"submission",
"or",
"upon",
"shutdown",
"if",
"no",
"submissions",
".",
"If",
"checkTermination",
"true",
"also",
"responds",
"to",
"termination",
"by",
"external",
"calls",
"submitting",
"tasks",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1503-L1527 |
34,163 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.createWorker | private boolean createWorker(boolean isSpare) {
ForkJoinWorkerThreadFactory fac = factory;
Throwable ex = null;
ForkJoinWorkerThread wt = null;
WorkQueue q;
try {
if (fac != null && (wt = fac.newThread(this)) != null) {
if (isSpare && (q = wt.workQueue... | java | private boolean createWorker(boolean isSpare) {
ForkJoinWorkerThreadFactory fac = factory;
Throwable ex = null;
ForkJoinWorkerThread wt = null;
WorkQueue q;
try {
if (fac != null && (wt = fac.newThread(this)) != null) {
if (isSpare && (q = wt.workQueue... | [
"private",
"boolean",
"createWorker",
"(",
"boolean",
"isSpare",
")",
"{",
"ForkJoinWorkerThreadFactory",
"fac",
"=",
"factory",
";",
"Throwable",
"ex",
"=",
"null",
";",
"ForkJoinWorkerThread",
"wt",
"=",
"null",
";",
"WorkQueue",
"q",
";",
"try",
"{",
"if",
... | Tries to construct and start one worker. Assumes that total
count has already been incremented as a reservation. Invokes
deregisterWorker on any failure.
@param isSpare true if this is a spare thread
@return true if successful | [
"Tries",
"to",
"construct",
"and",
"start",
"one",
"worker",
".",
"Assumes",
"that",
"total",
"count",
"has",
"already",
"been",
"incremented",
"as",
"a",
"reservation",
".",
"Invokes",
"deregisterWorker",
"on",
"any",
"failure",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1539-L1556 |
34,164 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.tryAddWorker | private void tryAddWorker(long c) {
do {
long nc = ((AC_MASK & (c + AC_UNIT)) |
(TC_MASK & (c + TC_UNIT)));
if (ctl == c && U.compareAndSwapLong(this, CTL, c, nc)) {
createWorker(false);
break;
}
} while (((c = ct... | java | private void tryAddWorker(long c) {
do {
long nc = ((AC_MASK & (c + AC_UNIT)) |
(TC_MASK & (c + TC_UNIT)));
if (ctl == c && U.compareAndSwapLong(this, CTL, c, nc)) {
createWorker(false);
break;
}
} while (((c = ct... | [
"private",
"void",
"tryAddWorker",
"(",
"long",
"c",
")",
"{",
"do",
"{",
"long",
"nc",
"=",
"(",
"(",
"AC_MASK",
"&",
"(",
"c",
"+",
"AC_UNIT",
")",
")",
"|",
"(",
"TC_MASK",
"&",
"(",
"c",
"+",
"TC_UNIT",
")",
")",
")",
";",
"if",
"(",
"ctl... | Tries to add one worker, incrementing ctl counts before doing
so, relying on createWorker to back out on failure.
@param c incoming ctl value, with total count negative and no
idle workers. On CAS failure, c is refreshed and retried if
this holds (otherwise, a new worker is not needed). | [
"Tries",
"to",
"add",
"one",
"worker",
"incrementing",
"ctl",
"counts",
"before",
"doing",
"so",
"relying",
"on",
"createWorker",
"to",
"back",
"out",
"on",
"failure",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1566-L1575 |
34,165 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.deregisterWorker | final void deregisterWorker(ForkJoinWorkerThread wt, Throwable ex) {
WorkQueue w = null;
if (wt != null && (w = wt.workQueue) != null) {
AuxState aux; WorkQueue[] ws; // remove index from array
int idx = w.config & SMASK;
int ns = w.nsteals;
if ((... | java | final void deregisterWorker(ForkJoinWorkerThread wt, Throwable ex) {
WorkQueue w = null;
if (wt != null && (w = wt.workQueue) != null) {
AuxState aux; WorkQueue[] ws; // remove index from array
int idx = w.config & SMASK;
int ns = w.nsteals;
if ((... | [
"final",
"void",
"deregisterWorker",
"(",
"ForkJoinWorkerThread",
"wt",
",",
"Throwable",
"ex",
")",
"{",
"WorkQueue",
"w",
"=",
"null",
";",
"if",
"(",
"wt",
"!=",
"null",
"&&",
"(",
"w",
"=",
"wt",
".",
"workQueue",
")",
"!=",
"null",
")",
"{",
"Au... | Final callback from terminating worker, as well as upon failure
to construct or start a worker. Removes record of worker from
array, and adjusts counts. If pool is shutting down, tries to
complete termination.
@param wt the worker thread, or null if construction failed
@param ex the exception causing failure, or null... | [
"Final",
"callback",
"from",
"terminating",
"worker",
"as",
"well",
"as",
"upon",
"failure",
"to",
"construct",
"or",
"start",
"a",
"worker",
".",
"Removes",
"record",
"of",
"worker",
"from",
"array",
"and",
"adjusts",
"counts",
".",
"If",
"pool",
"is",
"s... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1633-L1683 |
34,166 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.signalWork | final void signalWork() {
for (;;) {
long c; int sp, i; WorkQueue v; WorkQueue[] ws;
if ((c = ctl) >= 0L) // enough workers
break;
else if ((sp = (int)c) == 0) { // no idle workers
if ((c & ADD_WORKER) != 0L) ... | java | final void signalWork() {
for (;;) {
long c; int sp, i; WorkQueue v; WorkQueue[] ws;
if ((c = ctl) >= 0L) // enough workers
break;
else if ((sp = (int)c) == 0) { // no idle workers
if ((c & ADD_WORKER) != 0L) ... | [
"final",
"void",
"signalWork",
"(",
")",
"{",
"for",
"(",
";",
";",
")",
"{",
"long",
"c",
";",
"int",
"sp",
",",
"i",
";",
"WorkQueue",
"v",
";",
"WorkQueue",
"[",
"]",
"ws",
";",
"if",
"(",
"(",
"c",
"=",
"ctl",
")",
">=",
"0L",
")",
"// ... | Tries to create or activate a worker if too few are active. | [
"Tries",
"to",
"create",
"or",
"activate",
"a",
"worker",
"if",
"too",
"few",
"are",
"active",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1690-L1717 |
34,167 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.inactivate | private void inactivate(WorkQueue w, int ss) {
int ns = (ss + SS_SEQ) | UNSIGNALLED;
long lc = ns & SP_MASK, nc, c;
if (w != null) {
w.scanState = ns;
do {
nc = lc | (UC_MASK & ((c = ctl) - AC_UNIT));
w.stackPred = (int)c;
} whi... | java | private void inactivate(WorkQueue w, int ss) {
int ns = (ss + SS_SEQ) | UNSIGNALLED;
long lc = ns & SP_MASK, nc, c;
if (w != null) {
w.scanState = ns;
do {
nc = lc | (UC_MASK & ((c = ctl) - AC_UNIT));
w.stackPred = (int)c;
} whi... | [
"private",
"void",
"inactivate",
"(",
"WorkQueue",
"w",
",",
"int",
"ss",
")",
"{",
"int",
"ns",
"=",
"(",
"ss",
"+",
"SS_SEQ",
")",
"|",
"UNSIGNALLED",
";",
"long",
"lc",
"=",
"ns",
"&",
"SP_MASK",
",",
"nc",
",",
"c",
";",
"if",
"(",
"w",
"!=... | If worker w exists and is active, enqueues and sets status to inactive.
@param w the worker
@param ss current (non-negative) scanState | [
"If",
"worker",
"w",
"exists",
"and",
"is",
"active",
"enqueues",
"and",
"sets",
"status",
"to",
"inactive",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1775-L1785 |
34,168 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.tryDropSpare | private boolean tryDropSpare(WorkQueue w) {
if (w != null && w.isEmpty()) { // no local tasks
long c; int sp, wl; WorkQueue[] ws; WorkQueue v;
while ((short)((c = ctl) >> TC_SHIFT) > 0 &&
((sp = (int)c) != 0 || (int)(c >> AC_SHIFT) > 0) &&
... | java | private boolean tryDropSpare(WorkQueue w) {
if (w != null && w.isEmpty()) { // no local tasks
long c; int sp, wl; WorkQueue[] ws; WorkQueue v;
while ((short)((c = ctl) >> TC_SHIFT) > 0 &&
((sp = (int)c) != 0 || (int)(c >> AC_SHIFT) > 0) &&
... | [
"private",
"boolean",
"tryDropSpare",
"(",
"WorkQueue",
"w",
")",
"{",
"if",
"(",
"w",
"!=",
"null",
"&&",
"w",
".",
"isEmpty",
"(",
")",
")",
"{",
"// no local tasks",
"long",
"c",
";",
"int",
"sp",
",",
"wl",
";",
"WorkQueue",
"[",
"]",
"ws",
";"... | If the given worker is a spare with no queued tasks, and there
are enough existing workers, drops it from ctl counts and sets
its state to terminated.
@param w the calling worker -- must be a spare
@return true if dropped (in which case it must not process more tasks) | [
"If",
"the",
"given",
"worker",
"is",
"a",
"spare",
"with",
"no",
"queued",
"tasks",
"and",
"there",
"are",
"enough",
"existing",
"workers",
"drops",
"it",
"from",
"ctl",
"counts",
"and",
"sets",
"its",
"state",
"to",
"terminated",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L1875-L1921 |
34,169 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.nextTaskFor | final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue()) == null)
return null;
if ((t = q.pollAt(q.base)) != null)
... | java | final ForkJoinTask<?> nextTaskFor(WorkQueue w) {
for (ForkJoinTask<?> t;;) {
WorkQueue q;
if ((t = w.nextLocalTask()) != null)
return t;
if ((q = findNonEmptyStealQueue()) == null)
return null;
if ((t = q.pollAt(q.base)) != null)
... | [
"final",
"ForkJoinTask",
"<",
"?",
">",
"nextTaskFor",
"(",
"WorkQueue",
"w",
")",
"{",
"for",
"(",
"ForkJoinTask",
"<",
"?",
">",
"t",
";",
";",
")",
"{",
"WorkQueue",
"q",
";",
"if",
"(",
"(",
"t",
"=",
"w",
".",
"nextLocalTask",
"(",
")",
")",... | Gets and removes a local or stolen task for the given worker.
@return a task, if available | [
"Gets",
"and",
"removes",
"a",
"local",
"or",
"stolen",
"task",
"for",
"the",
"given",
"worker",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2329-L2339 |
34,170 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.tryCreateExternalQueue | private void tryCreateExternalQueue(int index) {
AuxState aux;
if ((aux = auxState) != null && index >= 0) {
WorkQueue q = new WorkQueue(this, null);
q.config = index;
q.scanState = ~UNSIGNALLED;
q.qlock = 1; // lock queue
boo... | java | private void tryCreateExternalQueue(int index) {
AuxState aux;
if ((aux = auxState) != null && index >= 0) {
WorkQueue q = new WorkQueue(this, null);
q.config = index;
q.scanState = ~UNSIGNALLED;
q.qlock = 1; // lock queue
boo... | [
"private",
"void",
"tryCreateExternalQueue",
"(",
"int",
"index",
")",
"{",
"AuxState",
"aux",
";",
"if",
"(",
"(",
"aux",
"=",
"auxState",
")",
"!=",
"null",
"&&",
"index",
">=",
"0",
")",
"{",
"WorkQueue",
"q",
"=",
"new",
"WorkQueue",
"(",
"this",
... | Constructs and tries to install a new external queue,
failing if the workQueues array already has a queue at
the given index.
@param index the index of the new queue | [
"Constructs",
"and",
"tries",
"to",
"install",
"a",
"new",
"external",
"queue",
"failing",
"if",
"the",
"workQueues",
"array",
"already",
"has",
"a",
"queue",
"at",
"the",
"given",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2487-L2514 |
34,171 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.externalPush | final void externalPush(ForkJoinTask<?> task) {
int r; // initialize caller's probe
if ((r = ThreadLocalRandom.getProbe()) == 0) {
ThreadLocalRandom.localInit();
r = ThreadLocalRandom.getProbe();
}
for (;;) {
WorkQueue q; int... | java | final void externalPush(ForkJoinTask<?> task) {
int r; // initialize caller's probe
if ((r = ThreadLocalRandom.getProbe()) == 0) {
ThreadLocalRandom.localInit();
r = ThreadLocalRandom.getProbe();
}
for (;;) {
WorkQueue q; int... | [
"final",
"void",
"externalPush",
"(",
"ForkJoinTask",
"<",
"?",
">",
"task",
")",
"{",
"int",
"r",
";",
"// initialize caller's probe",
"if",
"(",
"(",
"r",
"=",
"ThreadLocalRandom",
".",
"getProbe",
"(",
")",
")",
"==",
"0",
")",
"{",
"ThreadLocalRandom",... | Adds the given task to a submission queue at submitter's
current queue. Also performs secondary initialization upon the
first submission of the first task to the pool, and detects
first submission by an external thread and creates a new shared
queue if the one at index if empty or contended.
@param task the task. Call... | [
"Adds",
"the",
"given",
"task",
"to",
"a",
"submission",
"queue",
"at",
"submitter",
"s",
"current",
"queue",
".",
"Also",
"performs",
"secondary",
"initialization",
"upon",
"the",
"first",
"submission",
"of",
"the",
"first",
"task",
"to",
"the",
"pool",
"an... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2525-L2548 |
34,172 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.externalSubmit | private <T> ForkJoinTask<T> externalSubmit(ForkJoinTask<T> task) {
Thread t; ForkJoinWorkerThread w; WorkQueue q;
if (task == null)
throw new NullPointerException();
if (((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) &&
(w = (ForkJoinWorkerThread)t).pool =... | java | private <T> ForkJoinTask<T> externalSubmit(ForkJoinTask<T> task) {
Thread t; ForkJoinWorkerThread w; WorkQueue q;
if (task == null)
throw new NullPointerException();
if (((t = Thread.currentThread()) instanceof ForkJoinWorkerThread) &&
(w = (ForkJoinWorkerThread)t).pool =... | [
"private",
"<",
"T",
">",
"ForkJoinTask",
"<",
"T",
">",
"externalSubmit",
"(",
"ForkJoinTask",
"<",
"T",
">",
"task",
")",
"{",
"Thread",
"t",
";",
"ForkJoinWorkerThread",
"w",
";",
"WorkQueue",
"q",
";",
"if",
"(",
"task",
"==",
"null",
")",
"throw",... | Pushes a possibly-external submission. | [
"Pushes",
"a",
"possibly",
"-",
"external",
"submission",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2553-L2564 |
34,173 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.commonSubmitterQueue | static WorkQueue commonSubmitterQueue() {
ForkJoinPool p = common;
int r = ThreadLocalRandom.getProbe();
WorkQueue[] ws; int wl;
return (p != null && (ws = p.workQueues) != null &&
(wl = ws.length) > 0) ?
ws[(wl - 1) & r & SQMASK] : null;
} | java | static WorkQueue commonSubmitterQueue() {
ForkJoinPool p = common;
int r = ThreadLocalRandom.getProbe();
WorkQueue[] ws; int wl;
return (p != null && (ws = p.workQueues) != null &&
(wl = ws.length) > 0) ?
ws[(wl - 1) & r & SQMASK] : null;
} | [
"static",
"WorkQueue",
"commonSubmitterQueue",
"(",
")",
"{",
"ForkJoinPool",
"p",
"=",
"common",
";",
"int",
"r",
"=",
"ThreadLocalRandom",
".",
"getProbe",
"(",
")",
";",
"WorkQueue",
"[",
"]",
"ws",
";",
"int",
"wl",
";",
"return",
"(",
"p",
"!=",
"... | Returns common pool queue for an external thread. | [
"Returns",
"common",
"pool",
"queue",
"for",
"an",
"external",
"thread",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2569-L2576 |
34,174 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.tryExternalUnpush | final boolean tryExternalUnpush(ForkJoinTask<?> task) {
int r = ThreadLocalRandom.getProbe();
WorkQueue[] ws; WorkQueue w; int wl;
return ((ws = workQueues) != null &&
(wl = ws.length) > 0 &&
(w = ws[(wl - 1) & r & SQMASK]) != null &&
w.trySharedUn... | java | final boolean tryExternalUnpush(ForkJoinTask<?> task) {
int r = ThreadLocalRandom.getProbe();
WorkQueue[] ws; WorkQueue w; int wl;
return ((ws = workQueues) != null &&
(wl = ws.length) > 0 &&
(w = ws[(wl - 1) & r & SQMASK]) != null &&
w.trySharedUn... | [
"final",
"boolean",
"tryExternalUnpush",
"(",
"ForkJoinTask",
"<",
"?",
">",
"task",
")",
"{",
"int",
"r",
"=",
"ThreadLocalRandom",
".",
"getProbe",
"(",
")",
";",
"WorkQueue",
"[",
"]",
"ws",
";",
"WorkQueue",
"w",
";",
"int",
"wl",
";",
"return",
"(... | Performs tryUnpush for an external submitter. | [
"Performs",
"tryUnpush",
"for",
"an",
"external",
"submitter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2581-L2588 |
34,175 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java | ForkJoinPool.externalHelpComplete | final int externalHelpComplete(CountedCompleter<?> task, int maxTasks) {
WorkQueue[] ws; int wl;
int r = ThreadLocalRandom.getProbe();
return ((ws = workQueues) != null && (wl = ws.length) > 0) ?
helpComplete(ws[(wl - 1) & r & SQMASK], task, maxTasks) : 0;
} | java | final int externalHelpComplete(CountedCompleter<?> task, int maxTasks) {
WorkQueue[] ws; int wl;
int r = ThreadLocalRandom.getProbe();
return ((ws = workQueues) != null && (wl = ws.length) > 0) ?
helpComplete(ws[(wl - 1) & r & SQMASK], task, maxTasks) : 0;
} | [
"final",
"int",
"externalHelpComplete",
"(",
"CountedCompleter",
"<",
"?",
">",
"task",
",",
"int",
"maxTasks",
")",
"{",
"WorkQueue",
"[",
"]",
"ws",
";",
"int",
"wl",
";",
"int",
"r",
"=",
"ThreadLocalRandom",
".",
"getProbe",
"(",
")",
";",
"return",
... | Performs helpComplete for an external submitter. | [
"Performs",
"helpComplete",
"for",
"an",
"external",
"submitter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ForkJoinPool.java#L2593-L2598 |
34,176 | google/j2objc | jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/StandardBeanInfo.java | StandardBeanInfo.introspectEvents | @SuppressWarnings("unchecked")
private EventSetDescriptor[] introspectEvents() throws IntrospectionException {
// Get descriptors for the public methods
// FIXME: performance
MethodDescriptor[] theMethods = introspectMethods();
if (theMethods == null)
return null;
... | java | @SuppressWarnings("unchecked")
private EventSetDescriptor[] introspectEvents() throws IntrospectionException {
// Get descriptors for the public methods
// FIXME: performance
MethodDescriptor[] theMethods = introspectMethods();
if (theMethods == null)
return null;
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"EventSetDescriptor",
"[",
"]",
"introspectEvents",
"(",
")",
"throws",
"IntrospectionException",
"{",
"// Get descriptors for the public methods",
"// FIXME: performance",
"MethodDescriptor",
"[",
"]",
"theMethod... | Introspects the supplied Bean class and returns a list of the Events of
the class
@return the events
@throws IntrospectionException | [
"Introspects",
"the",
"supplied",
"Bean",
"class",
"and",
"returns",
"a",
"list",
"of",
"the",
"Events",
"of",
"the",
"class"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/StandardBeanInfo.java#L1294-L1341 |
34,177 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/JumboEnumSet.java | JumboEnumSet.remove | public boolean remove(Object e) {
if (e == null)
return false;
Class<?> eClass = e.getClass();
if (eClass != elementType && eClass.getSuperclass() != elementType)
return false;
int eOrdinal = ((Enum<?>)e).ordinal();
int eWordNum = eOrdinal >>> 6;
... | java | public boolean remove(Object e) {
if (e == null)
return false;
Class<?> eClass = e.getClass();
if (eClass != elementType && eClass.getSuperclass() != elementType)
return false;
int eOrdinal = ((Enum<?>)e).ordinal();
int eWordNum = eOrdinal >>> 6;
... | [
"public",
"boolean",
"remove",
"(",
"Object",
"e",
")",
"{",
"if",
"(",
"e",
"==",
"null",
")",
"return",
"false",
";",
"Class",
"<",
"?",
">",
"eClass",
"=",
"e",
".",
"getClass",
"(",
")",
";",
"if",
"(",
"eClass",
"!=",
"elementType",
"&&",
"e... | Removes the specified element from this set if it is present.
@param e element to be removed from this set, if present
@return <tt>true</tt> if the set contained the specified element | [
"Removes",
"the",
"specified",
"element",
"from",
"this",
"set",
"if",
"it",
"is",
"present",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/JumboEnumSet.java#L221-L236 |
34,178 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/JumboEnumSet.java | JumboEnumSet.recalculateSize | private boolean recalculateSize() {
int oldSize = size;
size = 0;
for (long elt : elements)
size += Long.bitCount(elt);
return size != oldSize;
} | java | private boolean recalculateSize() {
int oldSize = size;
size = 0;
for (long elt : elements)
size += Long.bitCount(elt);
return size != oldSize;
} | [
"private",
"boolean",
"recalculateSize",
"(",
")",
"{",
"int",
"oldSize",
"=",
"size",
";",
"size",
"=",
"0",
";",
"for",
"(",
"long",
"elt",
":",
"elements",
")",
"size",
"+=",
"Long",
".",
"bitCount",
"(",
"elt",
")",
";",
"return",
"size",
"!=",
... | Recalculates the size of the set. Returns true if it's changed. | [
"Recalculates",
"the",
"size",
"of",
"the",
"set",
".",
"Returns",
"true",
"if",
"it",
"s",
"changed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/JumboEnumSet.java#L365-L372 |
34,179 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/DatagramPacket.java | DatagramPacket.setData | public synchronized void setData(byte[] buf, int offset, int length) {
/* this will check to see if buf is null */
if (length < 0 || offset < 0 ||
(length + offset) < 0 ||
((length + offset) > buf.length)) {
throw new IllegalArgumentException("illegal length or offset... | java | public synchronized void setData(byte[] buf, int offset, int length) {
/* this will check to see if buf is null */
if (length < 0 || offset < 0 ||
(length + offset) < 0 ||
((length + offset) > buf.length)) {
throw new IllegalArgumentException("illegal length or offset... | [
"public",
"synchronized",
"void",
"setData",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"length",
")",
"{",
"/* this will check to see if buf is null */",
"if",
"(",
"length",
"<",
"0",
"||",
"offset",
"<",
"0",
"||",
"(",
"length",
"+... | Set the data buffer for this packet. This sets the
data, length and offset of the packet.
@param buf the buffer to set for this packet
@param offset the offset into the data
@param length the length of the data
and/or the length of the buffer used to receive data
@exception NullPointerException if the argument is n... | [
"Set",
"the",
"data",
"buffer",
"for",
"this",
"packet",
".",
"This",
"sets",
"the",
"data",
"length",
"and",
"offset",
"of",
"the",
"packet",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/DatagramPacket.java#L261-L272 |
34,180 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/DatagramPacket.java | DatagramPacket.setLength | public synchronized void setLength(int length) {
if ((length + offset) > buf.length || length < 0 ||
(length + offset) < 0) {
throw new IllegalArgumentException("illegal length");
}
this.length = length;
this.bufLength = this.length;
} | java | public synchronized void setLength(int length) {
if ((length + offset) > buf.length || length < 0 ||
(length + offset) < 0) {
throw new IllegalArgumentException("illegal length");
}
this.length = length;
this.bufLength = this.length;
} | [
"public",
"synchronized",
"void",
"setLength",
"(",
"int",
"length",
")",
"{",
"if",
"(",
"(",
"length",
"+",
"offset",
")",
">",
"buf",
".",
"length",
"||",
"length",
"<",
"0",
"||",
"(",
"length",
"+",
"offset",
")",
"<",
"0",
")",
"{",
"throw",
... | Set the length for this packet. The length of the packet is
the number of bytes from the packet's data buffer that will be
sent, or the number of bytes of the packet's data buffer that
will be used for receiving data. The length must be lesser or
equal to the offset plus the length of the packet's buffer.
@param lengt... | [
"Set",
"the",
"length",
"for",
"this",
"packet",
".",
"The",
"length",
"of",
"the",
"packet",
"is",
"the",
"number",
"of",
"bytes",
"from",
"the",
"packet",
"s",
"data",
"buffer",
"that",
"will",
"be",
"sent",
"or",
"the",
"number",
"of",
"bytes",
"of"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/DatagramPacket.java#L384-L391 |
34,181 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Node.casValue | boolean casValue(Object cmp, Object val) {
return U.compareAndSwapObject(this, VALUE, cmp, val);
} | java | boolean casValue(Object cmp, Object val) {
return U.compareAndSwapObject(this, VALUE, cmp, val);
} | [
"boolean",
"casValue",
"(",
"Object",
"cmp",
",",
"Object",
"val",
")",
"{",
"return",
"U",
".",
"compareAndSwapObject",
"(",
"this",
",",
"VALUE",
",",
"cmp",
",",
"val",
")",
";",
"}"
] | compareAndSet value field. | [
"compareAndSet",
"value",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L451-L453 |
34,182 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Node.casNext | boolean casNext(Node<K,V> cmp, Node<K,V> val) {
return U.compareAndSwapObject(this, NEXT, cmp, val);
} | java | boolean casNext(Node<K,V> cmp, Node<K,V> val) {
return U.compareAndSwapObject(this, NEXT, cmp, val);
} | [
"boolean",
"casNext",
"(",
"Node",
"<",
"K",
",",
"V",
">",
"cmp",
",",
"Node",
"<",
"K",
",",
"V",
">",
"val",
")",
"{",
"return",
"U",
".",
"compareAndSwapObject",
"(",
"this",
",",
"NEXT",
",",
"cmp",
",",
"val",
")",
";",
"}"
] | compareAndSet next field. | [
"compareAndSet",
"next",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L458-L460 |
34,183 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Node.appendMarker | boolean appendMarker(Node<K,V> f) {
return casNext(f, new Node<K,V>(f));
} | java | boolean appendMarker(Node<K,V> f) {
return casNext(f, new Node<K,V>(f));
} | [
"boolean",
"appendMarker",
"(",
"Node",
"<",
"K",
",",
"V",
">",
"f",
")",
"{",
"return",
"casNext",
"(",
"f",
",",
"new",
"Node",
"<",
"K",
",",
"V",
">",
"(",
"f",
")",
")",
";",
"}"
] | Tries to append a deletion marker to this node.
@param f the assumed current successor of this node
@return true if successful | [
"Tries",
"to",
"append",
"a",
"deletion",
"marker",
"to",
"this",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L488-L490 |
34,184 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Node.getValidValue | V getValidValue() {
Object v = value;
if (v == sentinel() || v == BASE_HEADER)
return null;
@SuppressWarnings("unchecked") V vv = (V)v;
return vv;
} | java | V getValidValue() {
Object v = value;
if (v == sentinel() || v == BASE_HEADER)
return null;
@SuppressWarnings("unchecked") V vv = (V)v;
return vv;
} | [
"V",
"getValidValue",
"(",
")",
"{",
"Object",
"v",
"=",
"value",
";",
"if",
"(",
"v",
"==",
"sentinel",
"(",
")",
"||",
"v",
"==",
"BASE_HEADER",
")",
"return",
"null",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"V",
"vv",
"=",
"(",
... | Returns value if this node contains a valid key-value pair,
else null.
@return this node's value if it isn't a marker or header or
is deleted, else null | [
"Returns",
"value",
"if",
"this",
"node",
"contains",
"a",
"valid",
"key",
"-",
"value",
"pair",
"else",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L519-L525 |
34,185 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Node.createSnapshot | AbstractMap.SimpleImmutableEntry<K,V> createSnapshot() {
Object v = value;
if (v == null || v == sentinel() || v == BASE_HEADER)
return null;
@SuppressWarnings("unchecked") V vv = (V)v;
return new AbstractMap.SimpleImmutableEntry<K,V>(key, vv);
} | java | AbstractMap.SimpleImmutableEntry<K,V> createSnapshot() {
Object v = value;
if (v == null || v == sentinel() || v == BASE_HEADER)
return null;
@SuppressWarnings("unchecked") V vv = (V)v;
return new AbstractMap.SimpleImmutableEntry<K,V>(key, vv);
} | [
"AbstractMap",
".",
"SimpleImmutableEntry",
"<",
"K",
",",
"V",
">",
"createSnapshot",
"(",
")",
"{",
"Object",
"v",
"=",
"value",
";",
"if",
"(",
"v",
"==",
"null",
"||",
"v",
"==",
"sentinel",
"(",
")",
"||",
"v",
"==",
"BASE_HEADER",
")",
"return"... | Creates and returns a new SimpleImmutableEntry holding current
mapping if this node holds a valid value, else null.
@return new entry or null | [
"Creates",
"and",
"returns",
"a",
"new",
"SimpleImmutableEntry",
"holding",
"current",
"mapping",
"if",
"this",
"node",
"holds",
"a",
"valid",
"value",
"else",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L532-L538 |
34,186 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Index.casRight | final boolean casRight(Index<K,V> cmp, Index<K,V> val) {
return U.compareAndSwapObject(this, RIGHT, cmp, val);
} | java | final boolean casRight(Index<K,V> cmp, Index<K,V> val) {
return U.compareAndSwapObject(this, RIGHT, cmp, val);
} | [
"final",
"boolean",
"casRight",
"(",
"Index",
"<",
"K",
",",
"V",
">",
"cmp",
",",
"Index",
"<",
"K",
",",
"V",
">",
"val",
")",
"{",
"return",
"U",
".",
"compareAndSwapObject",
"(",
"this",
",",
"RIGHT",
",",
"cmp",
",",
"val",
")",
";",
"}"
] | compareAndSet right field. | [
"compareAndSet",
"right",
"field",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L584-L586 |
34,187 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java | Index.link | final boolean link(Index<K,V> succ, Index<K,V> newSucc) {
Node<K,V> n = node;
newSucc.right = succ;
return n.value != null && casRight(succ, newSucc);
} | java | final boolean link(Index<K,V> succ, Index<K,V> newSucc) {
Node<K,V> n = node;
newSucc.right = succ;
return n.value != null && casRight(succ, newSucc);
} | [
"final",
"boolean",
"link",
"(",
"Index",
"<",
"K",
",",
"V",
">",
"succ",
",",
"Index",
"<",
"K",
",",
"V",
">",
"newSucc",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"n",
"=",
"node",
";",
"newSucc",
".",
"right",
"=",
"succ",
";",
"return"... | Tries to CAS newSucc as successor. To minimize races with
unlink that may lose this index node, if the node being
indexed is known to be deleted, it doesn't try to link in.
@param succ the expected current successor
@param newSucc the new successor
@return true if successful | [
"Tries",
"to",
"CAS",
"newSucc",
"as",
"successor",
".",
"To",
"minimize",
"races",
"with",
"unlink",
"that",
"may",
"lose",
"this",
"index",
"node",
"if",
"the",
"node",
"being",
"indexed",
"is",
"known",
"to",
"be",
"deleted",
"it",
"doesn",
"t",
"try"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ConcurrentSkipListMap.java#L604-L608 |
34,188 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/BitSet.java | BitSet.checkInvariants | private void checkInvariants() {
assert(wordsInUse == 0 || words[wordsInUse - 1] != 0);
assert(wordsInUse >= 0 && wordsInUse <= words.length);
assert(wordsInUse == words.length || words[wordsInUse] == 0);
} | java | private void checkInvariants() {
assert(wordsInUse == 0 || words[wordsInUse - 1] != 0);
assert(wordsInUse >= 0 && wordsInUse <= words.length);
assert(wordsInUse == words.length || words[wordsInUse] == 0);
} | [
"private",
"void",
"checkInvariants",
"(",
")",
"{",
"assert",
"(",
"wordsInUse",
"==",
"0",
"||",
"words",
"[",
"wordsInUse",
"-",
"1",
"]",
"!=",
"0",
")",
";",
"assert",
"(",
"wordsInUse",
">=",
"0",
"&&",
"wordsInUse",
"<=",
"words",
".",
"length",... | Every public method must preserve these invariants. | [
"Every",
"public",
"method",
"must",
"preserve",
"these",
"invariants",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/BitSet.java#L118-L122 |
34,189 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/BitSet.java | BitSet.valueOf | public static BitSet valueOf(long[] longs) {
int n;
for (n = longs.length; n > 0 && longs[n - 1] == 0; n--)
;
return new BitSet(Arrays.copyOf(longs, n));
} | java | public static BitSet valueOf(long[] longs) {
int n;
for (n = longs.length; n > 0 && longs[n - 1] == 0; n--)
;
return new BitSet(Arrays.copyOf(longs, n));
} | [
"public",
"static",
"BitSet",
"valueOf",
"(",
"long",
"[",
"]",
"longs",
")",
"{",
"int",
"n",
";",
"for",
"(",
"n",
"=",
"longs",
".",
"length",
";",
"n",
">",
"0",
"&&",
"longs",
"[",
"n",
"-",
"1",
"]",
"==",
"0",
";",
"n",
"--",
")",
";... | Returns a new bit set containing all the bits in the given long array.
<p>More precisely,
<br>{@code BitSet.valueOf(longs).get(n) == ((longs[n/64] & (1L<<(n%64))) != 0)}
<br>for all {@code n < 64 * longs.length}.
<p>This method is equivalent to
{@code BitSet.valueOf(LongBuffer.wrap(longs))}.
@param longs a long arra... | [
"Returns",
"a",
"new",
"bit",
"set",
"containing",
"all",
"the",
"bits",
"in",
"the",
"given",
"long",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/BitSet.java#L195-L200 |
34,190 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/BitSet.java | BitSet.valueOf | public static BitSet valueOf(LongBuffer lb) {
lb = lb.slice();
int n;
for (n = lb.remaining(); n > 0 && lb.get(n - 1) == 0; n--)
;
long[] words = new long[n];
lb.get(words);
return new BitSet(words);
} | java | public static BitSet valueOf(LongBuffer lb) {
lb = lb.slice();
int n;
for (n = lb.remaining(); n > 0 && lb.get(n - 1) == 0; n--)
;
long[] words = new long[n];
lb.get(words);
return new BitSet(words);
} | [
"public",
"static",
"BitSet",
"valueOf",
"(",
"LongBuffer",
"lb",
")",
"{",
"lb",
"=",
"lb",
".",
"slice",
"(",
")",
";",
"int",
"n",
";",
"for",
"(",
"n",
"=",
"lb",
".",
"remaining",
"(",
")",
";",
"n",
">",
"0",
"&&",
"lb",
".",
"get",
"("... | Returns a new bit set containing all the bits in the given long
buffer between its position and limit.
<p>More precisely,
<br>{@code BitSet.valueOf(lb).get(n) == ((lb.get(lb.position()+n/64) & (1L<<(n%64))) != 0)}
<br>for all {@code n < 64 * lb.remaining()}.
<p>The long buffer is not modified by this method, and no
r... | [
"Returns",
"a",
"new",
"bit",
"set",
"containing",
"all",
"the",
"bits",
"in",
"the",
"given",
"long",
"buffer",
"between",
"its",
"position",
"and",
"limit",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/BitSet.java#L220-L228 |
34,191 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVT.java | AVT.getSimpleString | public String getSimpleString()
{
if (null != m_simpleString){
return m_simpleString;
}
else if (null != m_parts){
final FastStringBuffer buf = getBuffer();
String out = null;
int n = m_parts.size();
try{
for (int i = 0; i < n; i++){
AVTPart part = (AVTPart) m_parts... | java | public String getSimpleString()
{
if (null != m_simpleString){
return m_simpleString;
}
else if (null != m_parts){
final FastStringBuffer buf = getBuffer();
String out = null;
int n = m_parts.size();
try{
for (int i = 0; i < n; i++){
AVTPart part = (AVTPart) m_parts... | [
"public",
"String",
"getSimpleString",
"(",
")",
"{",
"if",
"(",
"null",
"!=",
"m_simpleString",
")",
"{",
"return",
"m_simpleString",
";",
"}",
"else",
"if",
"(",
"null",
"!=",
"m_parts",
")",
"{",
"final",
"FastStringBuffer",
"buf",
"=",
"getBuffer",
"("... | Get the AVT as the original string.
@return The AVT as the original string | [
"Get",
"the",
"AVT",
"as",
"the",
"original",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVT.java#L445-L473 |
34,192 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVT.java | AVT.evaluate | public String evaluate(
XPathContext xctxt, int context, org.apache.xml.utils.PrefixResolver nsNode)
throws javax.xml.transform.TransformerException
{
if (null != m_simpleString){
return m_simpleString;
}else if (null != m_parts){
final FastStringBuffer buf =getBuffer();
... | java | public String evaluate(
XPathContext xctxt, int context, org.apache.xml.utils.PrefixResolver nsNode)
throws javax.xml.transform.TransformerException
{
if (null != m_simpleString){
return m_simpleString;
}else if (null != m_parts){
final FastStringBuffer buf =getBuffer();
... | [
"public",
"String",
"evaluate",
"(",
"XPathContext",
"xctxt",
",",
"int",
"context",
",",
"org",
".",
"apache",
".",
"xml",
".",
"utils",
".",
"PrefixResolver",
"nsNode",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",... | Evaluate the AVT and return a String.
@param xctxt Te XPathContext to use to evaluate this.
@param context The current source tree context.
@param nsNode The current namespace context (stylesheet tree context).
@return The AVT evaluated as a string
@throws javax.xml.transform.TransformerException | [
"Evaluate",
"the",
"AVT",
"and",
"return",
"a",
"String",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/AVT.java#L486-L513 |
34,193 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OtherName.java | OtherName.encode | public void encode(DerOutputStream out) throws IOException {
if (gni != null) {
// This OtherName has a supported class
gni.encode(out);
return;
} else {
// This OtherName has no supporting class
DerOutputStream tmp = new DerOutputStream();
... | java | public void encode(DerOutputStream out) throws IOException {
if (gni != null) {
// This OtherName has a supported class
gni.encode(out);
return;
} else {
// This OtherName has no supporting class
DerOutputStream tmp = new DerOutputStream();
... | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"if",
"(",
"gni",
"!=",
"null",
")",
"{",
"// This OtherName has a supported class",
"gni",
".",
"encode",
"(",
"out",
")",
";",
"return",
";",
"}",
"else",
"{",
... | Encode the Other name into the DerOutputStream.
@param out the DER stream to encode the Other-Name to.
@exception IOException on encoding errors. | [
"Encode",
"the",
"Other",
"name",
"into",
"the",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OtherName.java#L152-L164 |
34,194 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/EDIPartyName.java | EDIPartyName.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tagged = new DerOutputStream();
DerOutputStream tmp = new DerOutputStream();
if (assigner != null) {
DerOutputStream tmp2 = new DerOutputStream();
// XXX - shd check is chars fit into PrintableS... | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream tagged = new DerOutputStream();
DerOutputStream tmp = new DerOutputStream();
if (assigner != null) {
DerOutputStream tmp2 = new DerOutputStream();
// XXX - shd check is chars fit into PrintableS... | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"tagged",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"if",
"(",
"assigne... | Encode the EDI party name into the DerOutputStream.
@param out the DER stream to encode the EDIPartyName to.
@exception IOException on encoding errors. | [
"Encode",
"the",
"EDI",
"party",
"name",
"into",
"the",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/EDIPartyName.java#L124-L144 |
34,195 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/ParenthesizedExpression.java | ParenthesizedExpression.parenthesizeAndReplace | public static ParenthesizedExpression parenthesizeAndReplace(Expression expression) {
ParenthesizedExpression newExpr = new ParenthesizedExpression();
expression.replaceWith(newExpr);
newExpr.setExpression(expression);
return newExpr;
} | java | public static ParenthesizedExpression parenthesizeAndReplace(Expression expression) {
ParenthesizedExpression newExpr = new ParenthesizedExpression();
expression.replaceWith(newExpr);
newExpr.setExpression(expression);
return newExpr;
} | [
"public",
"static",
"ParenthesizedExpression",
"parenthesizeAndReplace",
"(",
"Expression",
"expression",
")",
"{",
"ParenthesizedExpression",
"newExpr",
"=",
"new",
"ParenthesizedExpression",
"(",
")",
";",
"expression",
".",
"replaceWith",
"(",
"newExpr",
")",
";",
... | Wraps the given expression with a ParenthesizedExpression and replaces it
in the tree. | [
"Wraps",
"the",
"given",
"expression",
"with",
"a",
"ParenthesizedExpression",
"and",
"replaces",
"it",
"in",
"the",
"tree",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/ParenthesizedExpression.java#L46-L51 |
34,196 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/util/HeaderMap.java | HeaderMap.inferSourceName | private String inferSourceName(TypeElement type) {
if (!ElementUtil.isPublic(type)) {
String srcFile = ElementUtil.getSourceFile(type);
if (srcFile != null && srcFile.endsWith(".java")) {
int lastSlash = Math.max(srcFile.lastIndexOf('/'), srcFile.lastIndexOf('\\'));
String baseName = las... | java | private String inferSourceName(TypeElement type) {
if (!ElementUtil.isPublic(type)) {
String srcFile = ElementUtil.getSourceFile(type);
if (srcFile != null && srcFile.endsWith(".java")) {
int lastSlash = Math.max(srcFile.lastIndexOf('/'), srcFile.lastIndexOf('\\'));
String baseName = las... | [
"private",
"String",
"inferSourceName",
"(",
"TypeElement",
"type",
")",
"{",
"if",
"(",
"!",
"ElementUtil",
".",
"isPublic",
"(",
"type",
")",
")",
"{",
"String",
"srcFile",
"=",
"ElementUtil",
".",
"getSourceFile",
"(",
"type",
")",
";",
"if",
"(",
"sr... | Returns what should be the name of the "main" type associated with this
type. Normally an outer type's name matches from its source file name, but
Java allows additional non-public outer types to be declared in the same
source file. | [
"Returns",
"what",
"should",
"be",
"the",
"name",
"of",
"the",
"main",
"type",
"associated",
"with",
"this",
"type",
".",
"Normally",
"an",
"outer",
"type",
"s",
"name",
"matches",
"from",
"its",
"source",
"file",
"name",
"but",
"Java",
"allows",
"addition... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/HeaderMap.java#L177-L187 |
34,197 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/OneStepIterator.java | OneStepIterator.countProximityPosition | protected void countProximityPosition(int i)
{
if(!isReverseAxes())
super.countProximityPosition(i);
else if (i < m_proximityPositions.length)
m_proximityPositions[i]--;
} | java | protected void countProximityPosition(int i)
{
if(!isReverseAxes())
super.countProximityPosition(i);
else if (i < m_proximityPositions.length)
m_proximityPositions[i]--;
} | [
"protected",
"void",
"countProximityPosition",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"!",
"isReverseAxes",
"(",
")",
")",
"super",
".",
"countProximityPosition",
"(",
"i",
")",
";",
"else",
"if",
"(",
"i",
"<",
"m_proximityPositions",
".",
"length",
")",
... | Count backwards one proximity position.
@param i The predicate index. | [
"Count",
"backwards",
"one",
"proximity",
"position",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/axes/OneStepIterator.java#L300-L306 |
34,198 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java | DerInputBuffer.getBigInteger | BigInteger getBigInteger(int len, boolean makePositive) throws IOException {
if (len > available())
throw new IOException("short read of integer");
if (len == 0) {
throw new IOException("Invalid encoding: zero length Int value");
}
byte[] bytes = new byte[len];
... | java | BigInteger getBigInteger(int len, boolean makePositive) throws IOException {
if (len > available())
throw new IOException("short read of integer");
if (len == 0) {
throw new IOException("Invalid encoding: zero length Int value");
}
byte[] bytes = new byte[len];
... | [
"BigInteger",
"getBigInteger",
"(",
"int",
"len",
",",
"boolean",
"makePositive",
")",
"throws",
"IOException",
"{",
"if",
"(",
"len",
">",
"available",
"(",
")",
")",
"throw",
"new",
"IOException",
"(",
"\"short read of integer\"",
")",
";",
"if",
"(",
"len... | Returns the integer which takes up the specified number
of bytes in this buffer as a BigInteger.
@param len the number of bytes to use.
@param makePositive whether to always return a positive value,
irrespective of actual encoding
@return the integer as a BigInteger. | [
"Returns",
"the",
"integer",
"which",
"takes",
"up",
"the",
"specified",
"number",
"of",
"bytes",
"in",
"this",
"buffer",
"as",
"a",
"BigInteger",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L149-L172 |
34,199 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java | DerInputBuffer.getInteger | public int getInteger(int len) throws IOException {
BigInteger result = getBigInteger(len, false);
if (result.compareTo(BigInteger.valueOf(Integer.MIN_VALUE)) < 0) {
throw new IOException("Integer below minimum valid value");
}
if (result.compareTo(BigInteger.valueOf(Integer... | java | public int getInteger(int len) throws IOException {
BigInteger result = getBigInteger(len, false);
if (result.compareTo(BigInteger.valueOf(Integer.MIN_VALUE)) < 0) {
throw new IOException("Integer below minimum valid value");
}
if (result.compareTo(BigInteger.valueOf(Integer... | [
"public",
"int",
"getInteger",
"(",
"int",
"len",
")",
"throws",
"IOException",
"{",
"BigInteger",
"result",
"=",
"getBigInteger",
"(",
"len",
",",
"false",
")",
";",
"if",
"(",
"result",
".",
"compareTo",
"(",
"BigInteger",
".",
"valueOf",
"(",
"Integer",... | Returns the integer which takes up the specified number
of bytes in this buffer.
@throws IOException if the result is not within the valid
range for integer, i.e. between Integer.MIN_VALUE and
Integer.MAX_VALUE.
@param len the number of bytes to use.
@return the integer. | [
"Returns",
"the",
"integer",
"which",
"takes",
"up",
"the",
"specified",
"number",
"of",
"bytes",
"in",
"this",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/DerInputBuffer.java#L183-L193 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.