id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
33,900 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.declareNamespaceInContext | protected void declareNamespaceInContext(int elementNodeIndex,int namespaceNodeIndex)
{
SuballocatedIntVector nsList=null;
if(m_namespaceDeclSets==null)
{
// First
m_namespaceDeclSetElements=new SuballocatedIntVector(32);
m_namespaceDeclSetElements.addElement(elementNodeIndex);
... | java | protected void declareNamespaceInContext(int elementNodeIndex,int namespaceNodeIndex)
{
SuballocatedIntVector nsList=null;
if(m_namespaceDeclSets==null)
{
// First
m_namespaceDeclSetElements=new SuballocatedIntVector(32);
m_namespaceDeclSetElements.addElement(elementNodeIndex);
... | [
"protected",
"void",
"declareNamespaceInContext",
"(",
"int",
"elementNodeIndex",
",",
"int",
"namespaceNodeIndex",
")",
"{",
"SuballocatedIntVector",
"nsList",
"=",
"null",
";",
"if",
"(",
"m_namespaceDeclSets",
"==",
"null",
")",
"{",
"// First",
"m_namespaceDeclSet... | Build table of namespace declaration
locations during DTM construction. Table is a Vector of
SuballocatedIntVectors containing the namespace node HANDLES declared at
that ID, plus an SuballocatedIntVector of the element node INDEXES at which
these declarations appeared.
NOTE: Since this occurs during model build, node... | [
"Build",
"table",
"of",
"namespace",
"declaration",
"locations",
"during",
"DTM",
"construction",
".",
"Table",
"is",
"a",
"Vector",
"of",
"SuballocatedIntVectors",
"containing",
"the",
"namespace",
"node",
"HANDLES",
"declared",
"at",
"that",
"ID",
"plus",
"an",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1262-L1330 |
33,901 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.findNamespaceContext | protected SuballocatedIntVector findNamespaceContext(int elementNodeIndex)
{
if (null!=m_namespaceDeclSetElements)
{
// %OPT% Is binary-search really saving us a lot versus linear?
// (... It may be, in large docs with many NS decls.)
int wouldBeAt=findInSortedSuballocatedIntVector(m... | java | protected SuballocatedIntVector findNamespaceContext(int elementNodeIndex)
{
if (null!=m_namespaceDeclSetElements)
{
// %OPT% Is binary-search really saving us a lot versus linear?
// (... It may be, in large docs with many NS decls.)
int wouldBeAt=findInSortedSuballocatedIntVector(m... | [
"protected",
"SuballocatedIntVector",
"findNamespaceContext",
"(",
"int",
"elementNodeIndex",
")",
"{",
"if",
"(",
"null",
"!=",
"m_namespaceDeclSetElements",
")",
"{",
"// %OPT% Is binary-search really saving us a lot versus linear?",
"// (... It may be, in large docs with many NS d... | Retrieve list of namespace declaration locations
active at this node. List is an SuballocatedIntVector whose
entries are the namespace node HANDLES declared at that ID.
%REVIEW% Directly managed arrays rather than vectors?
%REVIEW% Handles or IDs? Given usage, I think handles. | [
"Retrieve",
"list",
"of",
"namespace",
"declaration",
"locations",
"active",
"at",
"this",
"node",
".",
"List",
"is",
"an",
"SuballocatedIntVector",
"whose",
"entries",
"are",
"the",
"namespace",
"node",
"HANDLES",
"declared",
"at",
"that",
"ID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1339-L1400 |
33,902 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.getFirstNamespaceNode | public int getFirstNamespaceNode(int nodeHandle, boolean inScope)
{
if(inScope)
{
int identity = makeNodeIdentity(nodeHandle);
if (_type(identity) == DTM.ELEMENT_NODE)
{
SuballocatedIntVector nsContext=findNamespaceContext(identity);
if(n... | java | public int getFirstNamespaceNode(int nodeHandle, boolean inScope)
{
if(inScope)
{
int identity = makeNodeIdentity(nodeHandle);
if (_type(identity) == DTM.ELEMENT_NODE)
{
SuballocatedIntVector nsContext=findNamespaceContext(identity);
if(n... | [
"public",
"int",
"getFirstNamespaceNode",
"(",
"int",
"nodeHandle",
",",
"boolean",
"inScope",
")",
"{",
"if",
"(",
"inScope",
")",
"{",
"int",
"identity",
"=",
"makeNodeIdentity",
"(",
"nodeHandle",
")",
";",
"if",
"(",
"_type",
"(",
"identity",
")",
"=="... | Given a node handle, get the index of the node's first child.
If not yet resolved, waits for more nodes to be added to the document and
tries again
@param nodeHandle handle to node, which should probably be an element
node, but need not be.
@param inScope true if all namespaces in scope should be returned,
false i... | [
"Given",
"a",
"node",
"handle",
"get",
"the",
"index",
"of",
"the",
"node",
"s",
"first",
"child",
".",
"If",
"not",
"yet",
"resolved",
"waits",
"for",
"more",
"nodes",
"to",
"be",
"added",
"to",
"the",
"document",
"and",
"tries",
"again"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1459-L1499 |
33,903 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.getNextNamespaceNode | public int getNextNamespaceNode(int baseHandle, int nodeHandle,
boolean inScope)
{
if(inScope)
{
//Since we've been given the base, try direct lookup
//(could look from nodeHandle but this is at least one
//comparison/get-parent f... | java | public int getNextNamespaceNode(int baseHandle, int nodeHandle,
boolean inScope)
{
if(inScope)
{
//Since we've been given the base, try direct lookup
//(could look from nodeHandle but this is at least one
//comparison/get-parent f... | [
"public",
"int",
"getNextNamespaceNode",
"(",
"int",
"baseHandle",
",",
"int",
"nodeHandle",
",",
"boolean",
"inScope",
")",
"{",
"if",
"(",
"inScope",
")",
"{",
"//Since we've been given the base, try direct lookup",
"//(could look from nodeHandle but this is at least one",
... | Given a namespace handle, advance to the next namespace.
@param baseHandle handle to original node from where the first namespace
was relative to (needed to return nodes in document order).
@param nodeHandle A namespace handle for which we will find the next node.
@param inScope true if all namespaces that are in scop... | [
"Given",
"a",
"namespace",
"handle",
"advance",
"to",
"the",
"next",
"namespace",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1511-L1549 |
33,904 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.getParent | public int getParent(int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
if (identity > 0)
return makeNodeHandle(_parent(identity));
else
return DTM.NULL;
} | java | public int getParent(int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
if (identity > 0)
return makeNodeHandle(_parent(identity));
else
return DTM.NULL;
} | [
"public",
"int",
"getParent",
"(",
"int",
"nodeHandle",
")",
"{",
"int",
"identity",
"=",
"makeNodeIdentity",
"(",
"nodeHandle",
")",
";",
"if",
"(",
"identity",
">",
"0",
")",
"return",
"makeNodeHandle",
"(",
"_parent",
"(",
"identity",
")",
")",
";",
"... | Given a node handle, find its parent node.
@param nodeHandle the id of the node.
@return int Node-number of parent,
or DTM.NULL to indicate none exists. | [
"Given",
"a",
"node",
"handle",
"find",
"its",
"parent",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1558-L1567 |
33,905 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.getOwnerDocument | public int getOwnerDocument(int nodeHandle)
{
if (DTM.DOCUMENT_NODE == getNodeType(nodeHandle))
return DTM.NULL;
return getDocumentRoot(nodeHandle);
} | java | public int getOwnerDocument(int nodeHandle)
{
if (DTM.DOCUMENT_NODE == getNodeType(nodeHandle))
return DTM.NULL;
return getDocumentRoot(nodeHandle);
} | [
"public",
"int",
"getOwnerDocument",
"(",
"int",
"nodeHandle",
")",
"{",
"if",
"(",
"DTM",
".",
"DOCUMENT_NODE",
"==",
"getNodeType",
"(",
"nodeHandle",
")",
")",
"return",
"DTM",
".",
"NULL",
";",
"return",
"getDocumentRoot",
"(",
"nodeHandle",
")",
";",
... | Given a node handle, find the owning document node. This has the exact
same semantics as the DOM Document method of the same name, in that if
the nodeHandle is a document node, it will return NULL.
<p>%REVIEW% Since this is DOM-specific, it may belong at the DOM
binding layer. Included here as a convenience function ... | [
"Given",
"a",
"node",
"handle",
"find",
"the",
"owning",
"document",
"node",
".",
"This",
"has",
"the",
"exact",
"same",
"semantics",
"as",
"the",
"DOM",
"Document",
"method",
"of",
"the",
"same",
"name",
"in",
"that",
"if",
"the",
"nodeHandle",
"is",
"a... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1594-L1601 |
33,906 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.getNamespaceType | public int getNamespaceType(final int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
int expandedNameID = _exptype(identity);
return m_expandedNameTable.getNamespaceID(expandedNameID);
} | java | public int getNamespaceType(final int nodeHandle)
{
int identity = makeNodeIdentity(nodeHandle);
int expandedNameID = _exptype(identity);
return m_expandedNameTable.getNamespaceID(expandedNameID);
} | [
"public",
"int",
"getNamespaceType",
"(",
"final",
"int",
"nodeHandle",
")",
"{",
"int",
"identity",
"=",
"makeNodeIdentity",
"(",
"nodeHandle",
")",
";",
"int",
"expandedNameID",
"=",
"_exptype",
"(",
"identity",
")",
";",
"return",
"m_expandedNameTable",
".",
... | Returns the namespace type of a specific node
@param nodeHandle the id of the node.
@return the ID of the namespace. | [
"Returns",
"the",
"namespace",
"type",
"of",
"a",
"specific",
"node"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L1740-L1747 |
33,907 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.appendChild | public void appendChild(int newChild, boolean clone, boolean cloneDepth)
{
error(XMLMessages.createXMLMessage(XMLErrorResources.ER_METHOD_NOT_SUPPORTED, null));//"appendChild not yet supported!");
} | java | public void appendChild(int newChild, boolean clone, boolean cloneDepth)
{
error(XMLMessages.createXMLMessage(XMLErrorResources.ER_METHOD_NOT_SUPPORTED, null));//"appendChild not yet supported!");
} | [
"public",
"void",
"appendChild",
"(",
"int",
"newChild",
",",
"boolean",
"clone",
",",
"boolean",
"cloneDepth",
")",
"{",
"error",
"(",
"XMLMessages",
".",
"createXMLMessage",
"(",
"XMLErrorResources",
".",
"ER_METHOD_NOT_SUPPORTED",
",",
"null",
")",
")",
";",
... | Append a child to the end of the document. Please note that the node
is always cloned if it is owned by another document.
<p>%REVIEW% "End of the document" needs to be defined more clearly.
Does it become the last child of the Document? Of the root element?</p>
@param newChild Must be a valid new node handle.
@param ... | [
"Append",
"a",
"child",
"to",
"the",
"end",
"of",
"the",
"document",
".",
"Please",
"note",
"that",
"the",
"node",
"is",
"always",
"cloned",
"if",
"it",
"is",
"owned",
"by",
"another",
"document",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L2235-L2238 |
33,908 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java | DTMDefaultBase.migrateTo | public void migrateTo(DTMManager mgr)
{
m_mgr = mgr;
if(mgr instanceof DTMManagerDefault)
m_mgrDefault=(DTMManagerDefault)mgr;
} | java | public void migrateTo(DTMManager mgr)
{
m_mgr = mgr;
if(mgr instanceof DTMManagerDefault)
m_mgrDefault=(DTMManagerDefault)mgr;
} | [
"public",
"void",
"migrateTo",
"(",
"DTMManager",
"mgr",
")",
"{",
"m_mgr",
"=",
"mgr",
";",
"if",
"(",
"mgr",
"instanceof",
"DTMManagerDefault",
")",
"m_mgrDefault",
"=",
"(",
"DTMManagerDefault",
")",
"mgr",
";",
"}"
] | Migrate a DTM built with an old DTMManager to a new DTMManager.
After the migration, the new DTMManager will treat the DTM as
one that is built by itself.
This is used to support DTM sharing between multiple transformations.
@param mgr the DTMManager | [
"Migrate",
"a",
"DTM",
"built",
"with",
"an",
"old",
"DTMManager",
"to",
"a",
"new",
"DTMManager",
".",
"After",
"the",
"migration",
"the",
"new",
"DTMManager",
"will",
"treat",
"the",
"DTM",
"as",
"one",
"that",
"is",
"built",
"by",
"itself",
".",
"This... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L2342-L2347 |
33,909 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/CharArrayReader.java | CharArrayReader.skip | public long skip(long n) throws IOException {
synchronized (lock) {
ensureOpen();
long avail = count - pos;
if (n > avail) {
n = avail;
}
if (n < 0) {
return 0;
}
pos += n;
return n;
... | java | public long skip(long n) throws IOException {
synchronized (lock) {
ensureOpen();
long avail = count - pos;
if (n > avail) {
n = avail;
}
if (n < 0) {
return 0;
}
pos += n;
return n;
... | [
"public",
"long",
"skip",
"(",
"long",
"n",
")",
"throws",
"IOException",
"{",
"synchronized",
"(",
"lock",
")",
"{",
"ensureOpen",
"(",
")",
";",
"long",
"avail",
"=",
"count",
"-",
"pos",
";",
"if",
"(",
"n",
">",
"avail",
")",
"{",
"n",
"=",
"... | Skips characters. Returns the number of characters that were skipped.
<p>The <code>n</code> parameter may be negative, even though the
<code>skip</code> method of the {@link Reader} superclass throws
an exception in this case. If <code>n</code> is negative, then
this method does nothing and returns <code>0</code>.
@... | [
"Skips",
"characters",
".",
"Returns",
"the",
"number",
"of",
"characters",
"that",
"were",
"skipped",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/CharArrayReader.java#L159-L173 |
33,910 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/TextImpl.java | TextImpl.firstTextNodeInCurrentRun | private TextImpl firstTextNodeInCurrentRun() {
TextImpl firstTextInCurrentRun = this;
for (Node p = getPreviousSibling(); p != null; p = p.getPreviousSibling()) {
short nodeType = p.getNodeType();
if (nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE) {
... | java | private TextImpl firstTextNodeInCurrentRun() {
TextImpl firstTextInCurrentRun = this;
for (Node p = getPreviousSibling(); p != null; p = p.getPreviousSibling()) {
short nodeType = p.getNodeType();
if (nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE) {
... | [
"private",
"TextImpl",
"firstTextNodeInCurrentRun",
"(",
")",
"{",
"TextImpl",
"firstTextInCurrentRun",
"=",
"this",
";",
"for",
"(",
"Node",
"p",
"=",
"getPreviousSibling",
"(",
")",
";",
"p",
"!=",
"null",
";",
"p",
"=",
"p",
".",
"getPreviousSibling",
"("... | Returns the first text or CDATA node in the current sequence of text and
CDATA nodes. | [
"Returns",
"the",
"first",
"text",
"or",
"CDATA",
"node",
"in",
"the",
"current",
"sequence",
"of",
"text",
"and",
"CDATA",
"nodes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/TextImpl.java#L115-L126 |
33,911 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/TextImpl.java | TextImpl.nextTextNode | private TextImpl nextTextNode() {
Node nextSibling = getNextSibling();
if (nextSibling == null) {
return null;
}
short nodeType = nextSibling.getNodeType();
return nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE
? (TextImpl) nextSibl... | java | private TextImpl nextTextNode() {
Node nextSibling = getNextSibling();
if (nextSibling == null) {
return null;
}
short nodeType = nextSibling.getNodeType();
return nodeType == Node.TEXT_NODE || nodeType == Node.CDATA_SECTION_NODE
? (TextImpl) nextSibl... | [
"private",
"TextImpl",
"nextTextNode",
"(",
")",
"{",
"Node",
"nextSibling",
"=",
"getNextSibling",
"(",
")",
";",
"if",
"(",
"nextSibling",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"short",
"nodeType",
"=",
"nextSibling",
".",
"getNodeType",
"(... | Returns the next sibling node if it exists and it is text or CDATA.
Otherwise returns null. | [
"Returns",
"the",
"next",
"sibling",
"node",
"if",
"it",
"exists",
"and",
"it",
"is",
"text",
"or",
"CDATA",
".",
"Otherwise",
"returns",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/TextImpl.java#L132-L142 |
33,912 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/TextImpl.java | TextImpl.minimize | public final TextImpl minimize() {
if (getLength() == 0) {
parent.removeChild(this);
return null;
}
Node previous = getPreviousSibling();
if (previous == null || previous.getNodeType() != Node.TEXT_NODE) {
return this;
}
TextImpl prev... | java | public final TextImpl minimize() {
if (getLength() == 0) {
parent.removeChild(this);
return null;
}
Node previous = getPreviousSibling();
if (previous == null || previous.getNodeType() != Node.TEXT_NODE) {
return this;
}
TextImpl prev... | [
"public",
"final",
"TextImpl",
"minimize",
"(",
")",
"{",
"if",
"(",
"getLength",
"(",
")",
"==",
"0",
")",
"{",
"parent",
".",
"removeChild",
"(",
"this",
")",
";",
"return",
"null",
";",
"}",
"Node",
"previous",
"=",
"getPreviousSibling",
"(",
")",
... | Tries to remove this node using itself and the previous node as context.
If this node's text is empty, this node is removed and null is returned.
If the previous node exists and is a text node, this node's text will be
appended to that node's text and this node will be removed.
<p>Although this method alters the struc... | [
"Tries",
"to",
"remove",
"this",
"node",
"using",
"itself",
"and",
"the",
"previous",
"node",
"as",
"context",
".",
"If",
"this",
"node",
"s",
"text",
"is",
"empty",
"this",
"node",
"is",
"removed",
"and",
"null",
"is",
"returned",
".",
"If",
"the",
"p... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/TextImpl.java#L156-L171 |
33,913 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/regex/PatternSyntaxException.java | PatternSyntaxException.getMessage | public String getMessage() {
StringBuffer sb = new StringBuffer();
sb.append(desc);
if (index >= 0) {
sb.append(" near index ");
sb.append(index);
}
sb.append(nl);
sb.append(pattern);
if (index >= 0) {
sb.append(nl);
... | java | public String getMessage() {
StringBuffer sb = new StringBuffer();
sb.append(desc);
if (index >= 0) {
sb.append(" near index ");
sb.append(index);
}
sb.append(nl);
sb.append(pattern);
if (index >= 0) {
sb.append(nl);
... | [
"public",
"String",
"getMessage",
"(",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"sb",
".",
"append",
"(",
"desc",
")",
";",
"if",
"(",
"index",
">=",
"0",
")",
"{",
"sb",
".",
"append",
"(",
"\" near index \"",
")",
... | Returns a multi-line string containing the description of the syntax
error and its index, the erroneous regular-expression pattern, and a
visual indication of the error index within the pattern.
@return The full detail message | [
"Returns",
"a",
"multi",
"-",
"line",
"string",
"containing",
"the",
"description",
"of",
"the",
"syntax",
"error",
"and",
"its",
"index",
"the",
"erroneous",
"regular",
"-",
"expression",
"pattern",
"and",
"a",
"visual",
"indication",
"of",
"the",
"error",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/regex/PatternSyntaxException.java#L112-L127 |
33,914 | google/j2objc | jre_emul/android/frameworks/base/core/java/com/android/internal/util/ArrayUtils.java | ArrayUtils.appendElement | @SuppressWarnings("unchecked")
public static <T> T[] appendElement(Class<T> kind, T[] array, T element) {
final T[] result;
final int end;
if (array != null) {
end = array.length;
result = (T[])Array.newInstance(kind, end + 1);
System.arraycopy(array, 0, r... | java | @SuppressWarnings("unchecked")
public static <T> T[] appendElement(Class<T> kind, T[] array, T element) {
final T[] result;
final int end;
if (array != null) {
end = array.length;
result = (T[])Array.newInstance(kind, end + 1);
System.arraycopy(array, 0, r... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"appendElement",
"(",
"Class",
"<",
"T",
">",
"kind",
",",
"T",
"[",
"]",
"array",
",",
"T",
"element",
")",
"{",
"final",
"T",
"[",
"]",
"result"... | Appends an element to a copy of the array and returns the copy.
@param array The original array, or null to represent an empty array.
@param element The element to add.
@return A new array that contains all of the elements of the original array
with the specified element added at the end. | [
"Appends",
"an",
"element",
"to",
"a",
"copy",
"of",
"the",
"array",
"and",
"returns",
"the",
"copy",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/com/android/internal/util/ArrayUtils.java#L184-L198 |
33,915 | google/j2objc | jre_emul/android/frameworks/base/core/java/com/android/internal/util/ArrayUtils.java | ArrayUtils.removeElement | @SuppressWarnings("unchecked")
public static <T> T[] removeElement(Class<T> kind, T[] array, T element) {
if (array != null) {
final int length = array.length;
for (int i = 0; i < length; i++) {
if (array[i] == element) {
if (length == 1) {
... | java | @SuppressWarnings("unchecked")
public static <T> T[] removeElement(Class<T> kind, T[] array, T element) {
if (array != null) {
final int length = array.length;
for (int i = 0; i < length; i++) {
if (array[i] == element) {
if (length == 1) {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"removeElement",
"(",
"Class",
"<",
"T",
">",
"kind",
",",
"T",
"[",
"]",
"array",
",",
"T",
"element",
")",
"{",
"if",
"(",
"array",
"!=",
"null"... | Removes an element from a copy of the array and returns the copy.
If the element is not present, then the original array is returned unmodified.
@param array The original array, or null to represent an empty array.
@param element The element to remove.
@return A new array that contains all of the elements of the origin... | [
"Removes",
"an",
"element",
"from",
"a",
"copy",
"of",
"the",
"array",
"and",
"returns",
"the",
"copy",
".",
"If",
"the",
"element",
"is",
"not",
"present",
"then",
"the",
"original",
"array",
"is",
"returned",
"unmodified",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/com/android/internal/util/ArrayUtils.java#L210-L227 |
33,916 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/DeflaterInputStream.java | DeflaterInputStream.close | public void close() throws IOException {
if (in != null) {
try {
// Clean up
if (usesDefaultDeflater) {
def.end();
}
in.close();
} finally {
in = null;
}
}
} | java | public void close() throws IOException {
if (in != null) {
try {
// Clean up
if (usesDefaultDeflater) {
def.end();
}
in.close();
} finally {
in = null;
}
}
} | [
"public",
"void",
"close",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"in",
"!=",
"null",
")",
"{",
"try",
"{",
"// Clean up",
"if",
"(",
"usesDefaultDeflater",
")",
"{",
"def",
".",
"end",
"(",
")",
";",
"}",
"in",
".",
"close",
"(",
")",
... | Closes this input stream and its underlying input stream, discarding
any pending uncompressed data.
@throws IOException if an I/O error occurs | [
"Closes",
"this",
"input",
"stream",
"and",
"its",
"underlying",
"input",
"stream",
"discarding",
"any",
"pending",
"uncompressed",
"data",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/DeflaterInputStream.java#L126-L139 |
33,917 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/DeflaterInputStream.java | DeflaterInputStream.read | public int read(byte[] b, int off, int len) throws IOException {
// Sanity checks
ensureOpen();
if (b == null) {
throw new NullPointerException("Null buffer for read");
} else if (off < 0 || len < 0 || len > b.length - off) {
throw new IndexOutOfBoundsException();... | java | public int read(byte[] b, int off, int len) throws IOException {
// Sanity checks
ensureOpen();
if (b == null) {
throw new NullPointerException("Null buffer for read");
} else if (off < 0 || len < 0 || len > b.length - off) {
throw new IndexOutOfBoundsException();... | [
"public",
"int",
"read",
"(",
"byte",
"[",
"]",
"b",
",",
"int",
"off",
",",
"int",
"len",
")",
"throws",
"IOException",
"{",
"// Sanity checks",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"b",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException... | Reads compressed data into a byte array.
This method will block until some input can be read and compressed.
@param b buffer into which the data is read
@param off starting offset of the data within {@code b}
@param len maximum number of compressed bytes to read into {@code b}
@return the actual number of bytes read, ... | [
"Reads",
"compressed",
"data",
"into",
"a",
"byte",
"array",
".",
"This",
"method",
"will",
"block",
"until",
"some",
"input",
"can",
"be",
"read",
"and",
"compressed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/DeflaterInputStream.java#L171-L214 |
33,918 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/NetworkInterface.java | NetworkInterface.getByName | public static NetworkInterface getByName(String name) throws SocketException {
if (name == null)
throw new NullPointerException();
return getByName0(name);
} | java | public static NetworkInterface getByName(String name) throws SocketException {
if (name == null)
throw new NullPointerException();
return getByName0(name);
} | [
"public",
"static",
"NetworkInterface",
"getByName",
"(",
"String",
"name",
")",
"throws",
"SocketException",
"{",
"if",
"(",
"name",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"return",
"getByName0",
"(",
"name",
")",
";",
"}"... | Searches for the network interface with the specified name.
@param name
The name of the network interface.
@return A <tt>NetworkInterface</tt> with the specified name,
or <tt>null</tt> if there is no network interface
with the specified name.
@throws SocketException
If an I/O error occurs.
@throws NullPointerE... | [
"Searches",
"for",
"the",
"network",
"interface",
"with",
"the",
"specified",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/NetworkInterface.java#L267-L271 |
33,919 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/NetworkInterface.java | NetworkInterface.getNetworkInterfaces | public static Enumeration<NetworkInterface> getNetworkInterfaces()
throws SocketException {
final NetworkInterface[] netifs = getAll();
// specified to return null if no network interfaces
if (netifs == null)
return null;
return new Enumeration<NetworkInterface>() {... | java | public static Enumeration<NetworkInterface> getNetworkInterfaces()
throws SocketException {
final NetworkInterface[] netifs = getAll();
// specified to return null if no network interfaces
if (netifs == null)
return null;
return new Enumeration<NetworkInterface>() {... | [
"public",
"static",
"Enumeration",
"<",
"NetworkInterface",
">",
"getNetworkInterfaces",
"(",
")",
"throws",
"SocketException",
"{",
"final",
"NetworkInterface",
"[",
"]",
"netifs",
"=",
"getAll",
"(",
")",
";",
"// specified to return null if no network interfaces",
"i... | Returns all the interfaces on this machine. Returns null if no
network interfaces could be found on this machine.
NOTE: can use getNetworkInterfaces()+getInetAddresses()
to obtain all IP addresses for this node
@return an Enumeration of NetworkInterfaces found on this machine
@exception SocketException if an I/O er... | [
"Returns",
"all",
"the",
"interfaces",
"on",
"this",
"machine",
".",
"Returns",
"null",
"if",
"no",
"network",
"interfaces",
"could",
"be",
"found",
"on",
"this",
"machine",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/NetworkInterface.java#L333-L356 |
33,920 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java | GregorianCalendar.getYearOffsetInMillis | private long getYearOffsetInMillis() {
long t = (internalGet(DAY_OF_YEAR) - 1) * 24;
t += internalGet(HOUR_OF_DAY);
t *= 60;
t += internalGet(MINUTE);
t *= 60;
t += internalGet(SECOND);
t *= 1000;
return t + internalGet(MILLISECOND) -
(internal... | java | private long getYearOffsetInMillis() {
long t = (internalGet(DAY_OF_YEAR) - 1) * 24;
t += internalGet(HOUR_OF_DAY);
t *= 60;
t += internalGet(MINUTE);
t *= 60;
t += internalGet(SECOND);
t *= 1000;
return t + internalGet(MILLISECOND) -
(internal... | [
"private",
"long",
"getYearOffsetInMillis",
"(",
")",
"{",
"long",
"t",
"=",
"(",
"internalGet",
"(",
"DAY_OF_YEAR",
")",
"-",
"1",
")",
"*",
"24",
";",
"t",
"+=",
"internalGet",
"(",
"HOUR_OF_DAY",
")",
";",
"t",
"*=",
"60",
";",
"t",
"+=",
"interna... | Returns the millisecond offset from the beginning of this
year. This Calendar object must have been normalized. | [
"Returns",
"the",
"millisecond",
"offset",
"from",
"the",
"beginning",
"of",
"this",
"year",
".",
"This",
"Calendar",
"object",
"must",
"have",
"been",
"normalized",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L1975-L1985 |
33,921 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java | GregorianCalendar.getWeekNumber | private int getWeekNumber(long fixedDay1, long fixedDate) {
// We can always use `gcal' since Julian and Gregorian are the
// same thing for this calculation.
long fixedDay1st = Gregorian.getDayOfWeekDateOnOrBefore(fixedDay1 + 6,
ge... | java | private int getWeekNumber(long fixedDay1, long fixedDate) {
// We can always use `gcal' since Julian and Gregorian are the
// same thing for this calculation.
long fixedDay1st = Gregorian.getDayOfWeekDateOnOrBefore(fixedDay1 + 6,
ge... | [
"private",
"int",
"getWeekNumber",
"(",
"long",
"fixedDay1",
",",
"long",
"fixedDate",
")",
"{",
"// We can always use `gcal' since Julian and Gregorian are the",
"// same thing for this calculation.",
"long",
"fixedDay1st",
"=",
"Gregorian",
".",
"getDayOfWeekDateOnOrBefore",
... | Returns the number of weeks in a period between fixedDay1 and
fixedDate. The getFirstDayOfWeek-getMinimalDaysInFirstWeek rule
is applied to calculate the number of weeks.
@param fixedDay1 the fixed date of the first day of the period
@param fixedDate the fixed date of the last day of the period
@return the number of w... | [
"Returns",
"the",
"number",
"of",
"weeks",
"in",
"a",
"period",
"between",
"fixedDay1",
"and",
"fixedDate",
".",
"The",
"getFirstDayOfWeek",
"-",
"getMinimalDaysInFirstWeek",
"rule",
"is",
"applied",
"to",
"calculate",
"the",
"number",
"of",
"weeks",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L2598-L2613 |
33,922 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java | GregorianCalendar.getCalendarDate | private BaseCalendar.Date getCalendarDate(long fd) {
BaseCalendar cal = (fd >= gregorianCutoverDate) ? gcal : getJulianCalendarSystem();
BaseCalendar.Date d = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.NO_TIMEZONE);
cal.getCalendarDateFromFixedDate(d, fd);
return d;
} | java | private BaseCalendar.Date getCalendarDate(long fd) {
BaseCalendar cal = (fd >= gregorianCutoverDate) ? gcal : getJulianCalendarSystem();
BaseCalendar.Date d = (BaseCalendar.Date) cal.newCalendarDate(TimeZone.NO_TIMEZONE);
cal.getCalendarDateFromFixedDate(d, fd);
return d;
} | [
"private",
"BaseCalendar",
".",
"Date",
"getCalendarDate",
"(",
"long",
"fd",
")",
"{",
"BaseCalendar",
"cal",
"=",
"(",
"fd",
">=",
"gregorianCutoverDate",
")",
"?",
"gcal",
":",
"getJulianCalendarSystem",
"(",
")",
";",
"BaseCalendar",
".",
"Date",
"d",
"=... | Returns a CalendarDate produced from the specified fixed date.
@param fd the fixed date | [
"Returns",
"a",
"CalendarDate",
"produced",
"from",
"the",
"specified",
"fixed",
"date",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L3231-L3236 |
33,923 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java | GregorianCalendar.getRolledValue | private static int getRolledValue(int value, int amount, int min, int max) {
assert value >= min && value <= max;
int range = max - min + 1;
amount %= range;
int n = value + amount;
if (n > max) {
n -= range;
} else if (n < min) {
n += range;
... | java | private static int getRolledValue(int value, int amount, int min, int max) {
assert value >= min && value <= max;
int range = max - min + 1;
amount %= range;
int n = value + amount;
if (n > max) {
n -= range;
} else if (n < min) {
n += range;
... | [
"private",
"static",
"int",
"getRolledValue",
"(",
"int",
"value",
",",
"int",
"amount",
",",
"int",
"min",
",",
"int",
"max",
")",
"{",
"assert",
"value",
">=",
"min",
"&&",
"value",
"<=",
"max",
";",
"int",
"range",
"=",
"max",
"-",
"min",
"+",
"... | Returns the new value after 'roll'ing the specified value and amount. | [
"Returns",
"the",
"new",
"value",
"after",
"roll",
"ing",
"the",
"specified",
"value",
"and",
"amount",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L3350-L3362 |
33,924 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java | GregorianCalendar.readObject | private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
if (gdate == null) {
gdate = (BaseCalendar.Date) gcal.newCalendarDate(getZone());
cachedFixedDate = Long.MIN_VALUE;
}
setGregoria... | java | private void readObject(ObjectInputStream stream)
throws IOException, ClassNotFoundException {
stream.defaultReadObject();
if (gdate == null) {
gdate = (BaseCalendar.Date) gcal.newCalendarDate(getZone());
cachedFixedDate = Long.MIN_VALUE;
}
setGregoria... | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"stream",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"stream",
".",
"defaultReadObject",
"(",
")",
";",
"if",
"(",
"gdate",
"==",
"null",
")",
"{",
"gdate",
"=",
"(",
"BaseCalend... | Updates internal state. | [
"Updates",
"internal",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/GregorianCalendar.java#L3375-L3383 |
33,925 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java | CompactCharArray.elementAt | @Deprecated
public char elementAt(char index)
{
int ix = (indices[index >> BLOCKSHIFT] & 0xFFFF)
+ (index & BLOCKMASK);
return ix >= values.length ? defaultValue : values[ix];
} | java | @Deprecated
public char elementAt(char index)
{
int ix = (indices[index >> BLOCKSHIFT] & 0xFFFF)
+ (index & BLOCKMASK);
return ix >= values.length ? defaultValue : values[ix];
} | [
"@",
"Deprecated",
"public",
"char",
"elementAt",
"(",
"char",
"index",
")",
"{",
"int",
"ix",
"=",
"(",
"indices",
"[",
"index",
">>",
"BLOCKSHIFT",
"]",
"&",
"0xFFFF",
")",
"+",
"(",
"index",
"&",
"BLOCKMASK",
")",
";",
"return",
"ix",
">=",
"value... | Get the mapped value of a Unicode character.
@param index the character to get the mapped value with
@return the mapped value of the given character
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Get",
"the",
"mapped",
"value",
"of",
"a",
"Unicode",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java#L136-L142 |
33,926 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java | CompactCharArray.setElementAt | @Deprecated
public void setElementAt(char index, char value)
{
if (isCompact)
expand();
values[index] = value;
touchBlock(index >> BLOCKSHIFT, value);
} | java | @Deprecated
public void setElementAt(char index, char value)
{
if (isCompact)
expand();
values[index] = value;
touchBlock(index >> BLOCKSHIFT, value);
} | [
"@",
"Deprecated",
"public",
"void",
"setElementAt",
"(",
"char",
"index",
",",
"char",
"value",
")",
"{",
"if",
"(",
"isCompact",
")",
"expand",
"(",
")",
";",
"values",
"[",
"index",
"]",
"=",
"value",
";",
"touchBlock",
"(",
"index",
">>",
"BLOCKSHI... | Set a new value for a Unicode character.
Set automatically expands the array if it is compacted.
@param index the character to set the mapped value with
@param value the new mapped value
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Set",
"a",
"new",
"value",
"for",
"a",
"Unicode",
"character",
".",
"Set",
"automatically",
"expands",
"the",
"array",
"if",
"it",
"is",
"compacted",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java#L152-L159 |
33,927 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java | CompactCharArray.setElementAt | @Deprecated
public void setElementAt(char start, char end, char value)
{
int i;
if (isCompact) {
expand();
}
for (i = start; i <= end; ++i) {
values[i] = value;
touchBlock(i >> BLOCKSHIFT, value);
}
} | java | @Deprecated
public void setElementAt(char start, char end, char value)
{
int i;
if (isCompact) {
expand();
}
for (i = start; i <= end; ++i) {
values[i] = value;
touchBlock(i >> BLOCKSHIFT, value);
}
} | [
"@",
"Deprecated",
"public",
"void",
"setElementAt",
"(",
"char",
"start",
",",
"char",
"end",
",",
"char",
"value",
")",
"{",
"int",
"i",
";",
"if",
"(",
"isCompact",
")",
"{",
"expand",
"(",
")",
";",
"}",
"for",
"(",
"i",
"=",
"start",
";",
"i... | Set new values for a range of Unicode character.
@param start the starting offset of the range
@param end the ending offset of the range
@param value the new mapped value
@deprecated This API is ICU internal only.
@hide draft / provisional / internal are hidden on Android | [
"Set",
"new",
"values",
"for",
"a",
"range",
"of",
"Unicode",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java#L170-L181 |
33,928 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java | CompactCharArray.arrayRegionMatches | final static boolean arrayRegionMatches(char[] source, int sourceStart,
char[] target, int targetStart,
int len)
{
int sourceEnd = sourceStart + len;
int delta = targetStart - sourceStart;
for (int i = so... | java | final static boolean arrayRegionMatches(char[] source, int sourceStart,
char[] target, int targetStart,
int len)
{
int sourceEnd = sourceStart + len;
int delta = targetStart - sourceStart;
for (int i = so... | [
"final",
"static",
"boolean",
"arrayRegionMatches",
"(",
"char",
"[",
"]",
"source",
",",
"int",
"sourceStart",
",",
"char",
"[",
"]",
"target",
",",
"int",
"targetStart",
",",
"int",
"len",
")",
"{",
"int",
"sourceEnd",
"=",
"sourceStart",
"+",
"len",
"... | Convenience utility to compare two arrays of doubles.
@param len the length to compare.
The start indices and start+len must be valid. | [
"Convenience",
"utility",
"to",
"compare",
"two",
"arrays",
"of",
"doubles",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/CompactCharArray.java#L278-L289 |
33,929 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFieldsForDumping.java | EmulatedFieldsForDumping.write | @Override
@Deprecated
public void write(ObjectOutput output) throws IOException {
if (!output.equals(oos)) {
throw new IllegalArgumentException("Attempting to write to a different stream than the one that created this PutField");
}
for (EmulatedFields.ObjectSlot slot : emulat... | java | @Override
@Deprecated
public void write(ObjectOutput output) throws IOException {
if (!output.equals(oos)) {
throw new IllegalArgumentException("Attempting to write to a different stream than the one that created this PutField");
}
for (EmulatedFields.ObjectSlot slot : emulat... | [
"@",
"Override",
"@",
"Deprecated",
"public",
"void",
"write",
"(",
"ObjectOutput",
"output",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"output",
".",
"equals",
"(",
"oos",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Attemptin... | Write the field values to the specified ObjectOutput.
@param output
the ObjectOutput
@throws IOException
If an IO exception happened when writing the field values. | [
"Write",
"the",
"field",
"values",
"to",
"the",
"specified",
"ObjectOutput",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/EmulatedFieldsForDumping.java#L194-L224 |
33,930 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java | AbstractQueuedLongSynchronizer.setHeadAndPropagate | private void setHeadAndPropagate(Node node, long propagate) {
Node h = head; // Record old head for check below
setHead(node);
/*
* Try to signal next queued node if:
* Propagation was indicated by caller,
* or was recorded (as h.waitStatus either before
... | java | private void setHeadAndPropagate(Node node, long propagate) {
Node h = head; // Record old head for check below
setHead(node);
/*
* Try to signal next queued node if:
* Propagation was indicated by caller,
* or was recorded (as h.waitStatus either before
... | [
"private",
"void",
"setHeadAndPropagate",
"(",
"Node",
"node",
",",
"long",
"propagate",
")",
"{",
"Node",
"h",
"=",
"head",
";",
"// Record old head for check below",
"setHead",
"(",
"node",
")",
";",
"/*\n * Try to signal next queued node if:\n * Propa... | Sets head of queue, and checks if successor may be waiting
in shared mode, if so propagating if either propagate > 0 or
PROPAGATE status was set.
@param node the node
@param propagate the return value from a tryAcquireShared | [
"Sets",
"head",
"of",
"queue",
"and",
"checks",
"if",
"successor",
"may",
"be",
"waiting",
"in",
"shared",
"mode",
"if",
"so",
"propagating",
"if",
"either",
"propagate",
">",
"0",
"or",
"PROPAGATE",
"status",
"was",
"set",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java#L277-L302 |
33,931 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java | AbstractQueuedLongSynchronizer.doAcquireInterruptibly | private void doAcquireInterruptibly(long arg)
throws InterruptedException {
final Node node = addWaiter(Node.EXCLUSIVE);
try {
for (;;) {
final Node p = node.predecessor();
if (p == head && tryAcquire(arg)) {
setHead(node);
... | java | private void doAcquireInterruptibly(long arg)
throws InterruptedException {
final Node node = addWaiter(Node.EXCLUSIVE);
try {
for (;;) {
final Node p = node.predecessor();
if (p == head && tryAcquire(arg)) {
setHead(node);
... | [
"private",
"void",
"doAcquireInterruptibly",
"(",
"long",
"arg",
")",
"throws",
"InterruptedException",
"{",
"final",
"Node",
"node",
"=",
"addWaiter",
"(",
"Node",
".",
"EXCLUSIVE",
")",
";",
"try",
"{",
"for",
"(",
";",
";",
")",
"{",
"final",
"Node",
... | Acquires in exclusive interruptible mode.
@param arg the acquire argument | [
"Acquires",
"in",
"exclusive",
"interruptible",
"mode",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java#L450-L469 |
33,932 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java | AbstractQueuedLongSynchronizer.doAcquireNanos | private boolean doAcquireNanos(long arg, long nanosTimeout)
throws InterruptedException {
if (nanosTimeout <= 0L)
return false;
final long deadline = System.nanoTime() + nanosTimeout;
final Node node = addWaiter(Node.EXCLUSIVE);
try {
for (;;) {
... | java | private boolean doAcquireNanos(long arg, long nanosTimeout)
throws InterruptedException {
if (nanosTimeout <= 0L)
return false;
final long deadline = System.nanoTime() + nanosTimeout;
final Node node = addWaiter(Node.EXCLUSIVE);
try {
for (;;) {
... | [
"private",
"boolean",
"doAcquireNanos",
"(",
"long",
"arg",
",",
"long",
"nanosTimeout",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"nanosTimeout",
"<=",
"0L",
")",
"return",
"false",
";",
"final",
"long",
"deadline",
"=",
"System",
".",
"nanoTime"... | Acquires in exclusive timed mode.
@param arg the acquire argument
@param nanosTimeout max wait time
@return {@code true} if acquired | [
"Acquires",
"in",
"exclusive",
"timed",
"mode",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java#L478-L507 |
33,933 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java | AbstractQueuedLongSynchronizer.doAcquireShared | private void doAcquireShared(long arg) {
final Node node = addWaiter(Node.SHARED);
try {
boolean interrupted = false;
for (;;) {
final Node p = node.predecessor();
if (p == head) {
long r = tryAcquireShared(arg);
... | java | private void doAcquireShared(long arg) {
final Node node = addWaiter(Node.SHARED);
try {
boolean interrupted = false;
for (;;) {
final Node p = node.predecessor();
if (p == head) {
long r = tryAcquireShared(arg);
... | [
"private",
"void",
"doAcquireShared",
"(",
"long",
"arg",
")",
"{",
"final",
"Node",
"node",
"=",
"addWaiter",
"(",
"Node",
".",
"SHARED",
")",
";",
"try",
"{",
"boolean",
"interrupted",
"=",
"false",
";",
"for",
"(",
";",
";",
")",
"{",
"final",
"No... | Acquires in shared uninterruptible mode.
@param arg the acquire argument | [
"Acquires",
"in",
"shared",
"uninterruptible",
"mode",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java#L513-L537 |
33,934 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java | AbstractQueuedLongSynchronizer.fullyRelease | final long fullyRelease(Node node) {
try {
long savedState = getState();
if (release(savedState))
return savedState;
throw new IllegalMonitorStateException();
} catch (Throwable t) {
node.waitStatus = Node.CANCELLED;
throw t;
... | java | final long fullyRelease(Node node) {
try {
long savedState = getState();
if (release(savedState))
return savedState;
throw new IllegalMonitorStateException();
} catch (Throwable t) {
node.waitStatus = Node.CANCELLED;
throw t;
... | [
"final",
"long",
"fullyRelease",
"(",
"Node",
"node",
")",
"{",
"try",
"{",
"long",
"savedState",
"=",
"getState",
"(",
")",
";",
"if",
"(",
"release",
"(",
"savedState",
")",
")",
"return",
"savedState",
";",
"throw",
"new",
"IllegalMonitorStateException",
... | Invokes release with current state value; returns saved state.
Cancels node and throws exception on failure.
@param node the condition node for this wait
@return previous sync state | [
"Invokes",
"release",
"with",
"current",
"state",
"value",
";",
"returns",
"saved",
"state",
".",
"Cancels",
"node",
"and",
"throws",
"exception",
"on",
"failure",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/locks/AbstractQueuedLongSynchronizer.java#L1278-L1288 |
33,935 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet4Address.java | Inet4Address.writeReplace | private Object writeReplace() throws ObjectStreamException {
// will replace the to be serialized 'this' object
InetAddress inet = new InetAddress();
inet.holder().hostName = holder().getHostName();
inet.holder().address = holder().getAddress();
/**
* Prior to 1.4 an In... | java | private Object writeReplace() throws ObjectStreamException {
// will replace the to be serialized 'this' object
InetAddress inet = new InetAddress();
inet.holder().hostName = holder().getHostName();
inet.holder().address = holder().getAddress();
/**
* Prior to 1.4 an In... | [
"private",
"Object",
"writeReplace",
"(",
")",
"throws",
"ObjectStreamException",
"{",
"// will replace the to be serialized 'this' object",
"InetAddress",
"inet",
"=",
"new",
"InetAddress",
"(",
")",
";",
"inet",
".",
"holder",
"(",
")",
".",
"hostName",
"=",
"hold... | Replaces the object to be serialized with an InetAddress object.
@return the alternate object to be serialized.
@throws ObjectStreamException if a new object replacing this
object could not be created | [
"Replaces",
"the",
"object",
"to",
"be",
"serialized",
"with",
"an",
"InetAddress",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet4Address.java#L143-L158 |
33,936 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeDecompressor.java | UnicodeDecompressor.decompress | public static String decompress(byte [] buffer){
char [] buf = decompress(buffer, 0, buffer.length);
return new String(buf);
} | java | public static String decompress(byte [] buffer){
char [] buf = decompress(buffer, 0, buffer.length);
return new String(buf);
} | [
"public",
"static",
"String",
"decompress",
"(",
"byte",
"[",
"]",
"buffer",
")",
"{",
"char",
"[",
"]",
"buf",
"=",
"decompress",
"(",
"buffer",
",",
"0",
",",
"buffer",
".",
"length",
")",
";",
"return",
"new",
"String",
"(",
"buf",
")",
";",
"}"... | Decompress a byte array into a String.
@param buffer The byte array to decompress.
@return A String containing the decompressed characters.
@see #decompress(byte [], int, int) | [
"Decompress",
"a",
"byte",
"array",
"into",
"a",
"String",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeDecompressor.java#L115-L118 |
33,937 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeDecompressor.java | UnicodeDecompressor.reset | public void reset()
{
// reset dynamic windows
fOffsets[0] = 0x0080; // Latin-1
fOffsets[1] = 0x00C0; // Latin-1 Supplement + Latin Extended-A
fOffsets[2] = 0x0400; // Cyrillic
fOffsets[3] = 0x0600; // Arabic
fOffsets[4] = 0x0900; // Devanagari
... | java | public void reset()
{
// reset dynamic windows
fOffsets[0] = 0x0080; // Latin-1
fOffsets[1] = 0x00C0; // Latin-1 Supplement + Latin Extended-A
fOffsets[2] = 0x0400; // Cyrillic
fOffsets[3] = 0x0600; // Arabic
fOffsets[4] = 0x0900; // Devanagari
... | [
"public",
"void",
"reset",
"(",
")",
"{",
"// reset dynamic windows",
"fOffsets",
"[",
"0",
"]",
"=",
"0x0080",
";",
"// Latin-1",
"fOffsets",
"[",
"1",
"]",
"=",
"0x00C0",
";",
"// Latin-1 Supplement + Latin Extended-A",
"fOffsets",
"[",
"2",
"]",
"=",
"0x040... | Reset the decompressor to its initial state. | [
"Reset",
"the",
"decompressor",
"to",
"its",
"initial",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UnicodeDecompressor.java#L538-L554 |
33,938 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java | Vector.elementAt | public synchronized E elementAt(int index) {
if (index >= elementCount) {
throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount);
}
return elementData(index);
} | java | public synchronized E elementAt(int index) {
if (index >= elementCount) {
throw new ArrayIndexOutOfBoundsException(index + " >= " + elementCount);
}
return elementData(index);
} | [
"public",
"synchronized",
"E",
"elementAt",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"index",
">=",
"elementCount",
")",
"{",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"index",
"+",
"\" >= \"",
"+",
"elementCount",
")",
";",
"}",
"return",
"ele... | Returns the component at the specified index.
<p>This method is identical in functionality to the {@link #get(int)}
method (which is part of the {@link List} interface).
@param index an index into this vector
@return the component at the specified index
@throws ArrayIndexOutOfBoundsException if the index i... | [
"Returns",
"the",
"component",
"at",
"the",
"specified",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L472-L478 |
33,939 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java | Vector.removeAllElements | public synchronized void removeAllElements() {
modCount++;
// Let gc do its work
for (int i = 0; i < elementCount; i++)
elementData[i] = null;
elementCount = 0;
} | java | public synchronized void removeAllElements() {
modCount++;
// Let gc do its work
for (int i = 0; i < elementCount; i++)
elementData[i] = null;
elementCount = 0;
} | [
"public",
"synchronized",
"void",
"removeAllElements",
"(",
")",
"{",
"modCount",
"++",
";",
"// Let gc do its work",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"elementCount",
";",
"i",
"++",
")",
"elementData",
"[",
"i",
"]",
"=",
"null",
";",
... | Removes all components from this vector and sets its size to zero.
<p>This method is identical in functionality to the {@link #clear}
method (which is part of the {@link List} interface). | [
"Removes",
"all",
"components",
"from",
"this",
"vector",
"and",
"sets",
"its",
"size",
"to",
"zero",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L655-L662 |
33,940 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java | Vector.toArray | @SuppressWarnings("unchecked")
public synchronized <T> T[] toArray(T[] a) {
if (a.length < elementCount)
return (T[]) Arrays.copyOf(elementData, elementCount, a.getClass());
System.arraycopy(elementData, 0, a, 0, elementCount);
if (a.length > elementCount)
a[element... | java | @SuppressWarnings("unchecked")
public synchronized <T> T[] toArray(T[] a) {
if (a.length < elementCount)
return (T[]) Arrays.copyOf(elementData, elementCount, a.getClass());
System.arraycopy(elementData, 0, a, 0, elementCount);
if (a.length > elementCount)
a[element... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"synchronized",
"<",
"T",
">",
"T",
"[",
"]",
"toArray",
"(",
"T",
"[",
"]",
"a",
")",
"{",
"if",
"(",
"a",
".",
"length",
"<",
"elementCount",
")",
"return",
"(",
"T",
"[",
"]",
")",
... | Returns an array containing all of the elements in this Vector in the
correct order; the runtime type of the returned array is that of the
specified array. If the Vector fits in the specified array, it is
returned therein. Otherwise, a new array is allocated with the runtime
type of the specified array and the size o... | [
"Returns",
"an",
"array",
"containing",
"all",
"of",
"the",
"elements",
"in",
"this",
"Vector",
"in",
"the",
"correct",
"order",
";",
"the",
"runtime",
"type",
"of",
"the",
"returned",
"array",
"is",
"that",
"of",
"the",
"specified",
"array",
".",
"If",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L717-L728 |
33,941 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java | Vector.add | public synchronized boolean add(E e) {
modCount++;
ensureCapacityHelper(elementCount + 1);
elementData[elementCount++] = e;
return true;
} | java | public synchronized boolean add(E e) {
modCount++;
ensureCapacityHelper(elementCount + 1);
elementData[elementCount++] = e;
return true;
} | [
"public",
"synchronized",
"boolean",
"add",
"(",
"E",
"e",
")",
"{",
"modCount",
"++",
";",
"ensureCapacityHelper",
"(",
"elementCount",
"+",
"1",
")",
";",
"elementData",
"[",
"elementCount",
"++",
"]",
"=",
"e",
";",
"return",
"true",
";",
"}"
] | Appends the specified element to the end of this Vector.
@param e element to be appended to this Vector
@return {@code true} (as specified by {@link Collection#add})
@since 1.2 | [
"Appends",
"the",
"specified",
"element",
"to",
"the",
"end",
"of",
"this",
"Vector",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Vector.java#L780-L785 |
33,942 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java | BuildStep.getIssuerName | public String getIssuerName(String defaultName) {
return (cert == null ? defaultName
: cert.getIssuerX500Principal().toString());
} | java | public String getIssuerName(String defaultName) {
return (cert == null ? defaultName
: cert.getIssuerX500Principal().toString());
} | [
"public",
"String",
"getIssuerName",
"(",
"String",
"defaultName",
")",
"{",
"return",
"(",
"cert",
"==",
"null",
"?",
"defaultName",
":",
"cert",
".",
"getIssuerX500Principal",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"}"
] | return string form of issuer name from certificate associated with this
build step, or a default name if no certificate associated with this
build step, or if issuer name could not be obtained from the certificate.
@param defaultName name to use as default if unable to return an issuer
name from the certificate, or if... | [
"return",
"string",
"form",
"of",
"issuer",
"name",
"from",
"certificate",
"associated",
"with",
"this",
"build",
"step",
"or",
"a",
"default",
"name",
"if",
"no",
"certificate",
"associated",
"with",
"this",
"build",
"step",
"or",
"if",
"issuer",
"name",
"c... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java#L131-L134 |
33,943 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java | BuildStep.getSubjectName | public String getSubjectName(String defaultName) {
return (cert == null ? defaultName
: cert.getSubjectX500Principal().toString());
} | java | public String getSubjectName(String defaultName) {
return (cert == null ? defaultName
: cert.getSubjectX500Principal().toString());
} | [
"public",
"String",
"getSubjectName",
"(",
"String",
"defaultName",
")",
"{",
"return",
"(",
"cert",
"==",
"null",
"?",
"defaultName",
":",
"cert",
".",
"getSubjectX500Principal",
"(",
")",
".",
"toString",
"(",
")",
")",
";",
"}"
] | return string form of subject name from certificate associated with this
build step, or a default name if no certificate associated with this
build step, or if subject name could not be obtained from the
certificate.
@param defaultName name to use as default if unable to return a subject
name from the certificate, or ... | [
"return",
"string",
"form",
"of",
"subject",
"name",
"from",
"certificate",
"associated",
"with",
"this",
"build",
"step",
"or",
"a",
"default",
"name",
"if",
"no",
"certificate",
"associated",
"with",
"this",
"build",
"step",
"or",
"if",
"subject",
"name",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java#L158-L161 |
33,944 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java | BuildStep.resultToString | public String resultToString(int res) {
String resultString = "";
switch (res) {
case POSSIBLE:
resultString = "Certificate to be tried.\n";
break;
case BACK:
resultString = "Certificate backed out since path does not "
... | java | public String resultToString(int res) {
String resultString = "";
switch (res) {
case POSSIBLE:
resultString = "Certificate to be tried.\n";
break;
case BACK:
resultString = "Certificate backed out since path does not "
... | [
"public",
"String",
"resultToString",
"(",
"int",
"res",
")",
"{",
"String",
"resultString",
"=",
"\"\"",
";",
"switch",
"(",
"res",
")",
"{",
"case",
"POSSIBLE",
":",
"resultString",
"=",
"\"Certificate to be tried.\\n\"",
";",
"break",
";",
"case",
"BACK",
... | return a string representing the meaning of the result code associated
with this build step.
@param res result code
@returns String string representing meaning of the result code | [
"return",
"a",
"string",
"representing",
"the",
"meaning",
"of",
"the",
"result",
"code",
"associated",
"with",
"this",
"build",
"step",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java#L189-L213 |
33,945 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java | BuildStep.verboseToString | public String verboseToString() {
String out = resultToString(getResult());
switch (result) {
case BACK:
case FAIL:
out = out + vertex.throwableToString();
break;
case FOLLOW:
case SUCCEED:
out = out + vertex.moreToString();
... | java | public String verboseToString() {
String out = resultToString(getResult());
switch (result) {
case BACK:
case FAIL:
out = out + vertex.throwableToString();
break;
case FOLLOW:
case SUCCEED:
out = out + vertex.moreToString();
... | [
"public",
"String",
"verboseToString",
"(",
")",
"{",
"String",
"out",
"=",
"resultToString",
"(",
"getResult",
"(",
")",
")",
";",
"switch",
"(",
"result",
")",
"{",
"case",
"BACK",
":",
"case",
"FAIL",
":",
"out",
"=",
"out",
"+",
"vertex",
".",
"t... | return a string representation of this build step, showing all detail of
the vertex state appropriate to the result of this build step, and the
certificate contents.
@returns String | [
"return",
"a",
"string",
"representation",
"of",
"this",
"build",
"step",
"showing",
"all",
"detail",
"of",
"the",
"vertex",
"state",
"appropriate",
"to",
"the",
"result",
"of",
"this",
"build",
"step",
"and",
"the",
"certificate",
"contents",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/BuildStep.java#L248-L266 |
33,946 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.getMagnitudeArray | private int[] getMagnitudeArray() {
if (offset > 0 || value.length != intLen)
return Arrays.copyOfRange(value, offset, offset + intLen);
return value;
} | java | private int[] getMagnitudeArray() {
if (offset > 0 || value.length != intLen)
return Arrays.copyOfRange(value, offset, offset + intLen);
return value;
} | [
"private",
"int",
"[",
"]",
"getMagnitudeArray",
"(",
")",
"{",
"if",
"(",
"offset",
">",
"0",
"||",
"value",
".",
"length",
"!=",
"intLen",
")",
"return",
"Arrays",
".",
"copyOfRange",
"(",
"value",
",",
"offset",
",",
"offset",
"+",
"intLen",
")",
... | Internal helper method to return the magnitude array. The caller is not
supposed to modify the returned array. | [
"Internal",
"helper",
"method",
"to",
"return",
"the",
"magnitude",
"array",
".",
"The",
"caller",
"is",
"not",
"supposed",
"to",
"modify",
"the",
"returned",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L162-L166 |
33,947 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.toLong | private long toLong() {
assert (intLen <= 2) : "this MutableBigInteger exceeds the range of long";
if (intLen == 0)
return 0;
long d = value[offset] & LONG_MASK;
return (intLen == 2) ? d << 32 | (value[offset + 1] & LONG_MASK) : d;
} | java | private long toLong() {
assert (intLen <= 2) : "this MutableBigInteger exceeds the range of long";
if (intLen == 0)
return 0;
long d = value[offset] & LONG_MASK;
return (intLen == 2) ? d << 32 | (value[offset + 1] & LONG_MASK) : d;
} | [
"private",
"long",
"toLong",
"(",
")",
"{",
"assert",
"(",
"intLen",
"<=",
"2",
")",
":",
"\"this MutableBigInteger exceeds the range of long\"",
";",
"if",
"(",
"intLen",
"==",
"0",
")",
"return",
"0",
";",
"long",
"d",
"=",
"value",
"[",
"offset",
"]",
... | Convert this MutableBigInteger to a long value. The caller has to make
sure this MutableBigInteger can be fit into long. | [
"Convert",
"this",
"MutableBigInteger",
"to",
"a",
"long",
"value",
".",
"The",
"caller",
"has",
"to",
"make",
"sure",
"this",
"MutableBigInteger",
"can",
"be",
"fit",
"into",
"long",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L172-L178 |
33,948 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.toBigInteger | BigInteger toBigInteger(int sign) {
if (intLen == 0 || sign == 0)
return BigInteger.ZERO;
return new BigInteger(getMagnitudeArray(), sign);
} | java | BigInteger toBigInteger(int sign) {
if (intLen == 0 || sign == 0)
return BigInteger.ZERO;
return new BigInteger(getMagnitudeArray(), sign);
} | [
"BigInteger",
"toBigInteger",
"(",
"int",
"sign",
")",
"{",
"if",
"(",
"intLen",
"==",
"0",
"||",
"sign",
"==",
"0",
")",
"return",
"BigInteger",
".",
"ZERO",
";",
"return",
"new",
"BigInteger",
"(",
"getMagnitudeArray",
"(",
")",
",",
"sign",
")",
";"... | Convert this MutableBigInteger to a BigInteger object. | [
"Convert",
"this",
"MutableBigInteger",
"to",
"a",
"BigInteger",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L183-L187 |
33,949 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.toBigDecimal | BigDecimal toBigDecimal(int sign, int scale) {
if (intLen == 0 || sign == 0)
return BigDecimal.zeroValueOf(scale);
int[] mag = getMagnitudeArray();
int len = mag.length;
int d = mag[0];
// If this MutableBigInteger can't be fit into long, we need to
// make a ... | java | BigDecimal toBigDecimal(int sign, int scale) {
if (intLen == 0 || sign == 0)
return BigDecimal.zeroValueOf(scale);
int[] mag = getMagnitudeArray();
int len = mag.length;
int d = mag[0];
// If this MutableBigInteger can't be fit into long, we need to
// make a ... | [
"BigDecimal",
"toBigDecimal",
"(",
"int",
"sign",
",",
"int",
"scale",
")",
"{",
"if",
"(",
"intLen",
"==",
"0",
"||",
"sign",
"==",
"0",
")",
"return",
"BigDecimal",
".",
"zeroValueOf",
"(",
"scale",
")",
";",
"int",
"[",
"]",
"mag",
"=",
"getMagnit... | Convert this MutableBigInteger to BigDecimal object with the specified sign
and scale. | [
"Convert",
"this",
"MutableBigInteger",
"to",
"BigDecimal",
"object",
"with",
"the",
"specified",
"sign",
"and",
"scale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L201-L215 |
33,950 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.toCompactValue | long toCompactValue(int sign) {
if (intLen == 0 || sign == 0)
return 0L;
int[] mag = getMagnitudeArray();
int len = mag.length;
int d = mag[0];
// If this MutableBigInteger can not be fitted into long, we need to
// make a BigInteger object for the resultant B... | java | long toCompactValue(int sign) {
if (intLen == 0 || sign == 0)
return 0L;
int[] mag = getMagnitudeArray();
int len = mag.length;
int d = mag[0];
// If this MutableBigInteger can not be fitted into long, we need to
// make a BigInteger object for the resultant B... | [
"long",
"toCompactValue",
"(",
"int",
"sign",
")",
"{",
"if",
"(",
"intLen",
"==",
"0",
"||",
"sign",
"==",
"0",
")",
"return",
"0L",
";",
"int",
"[",
"]",
"mag",
"=",
"getMagnitudeArray",
"(",
")",
";",
"int",
"len",
"=",
"mag",
".",
"length",
"... | This is for internal use in converting from a MutableBigInteger
object into a long value given a specified sign.
returns INFLATED if value is not fit into long | [
"This",
"is",
"for",
"internal",
"use",
"in",
"converting",
"from",
"a",
"MutableBigInteger",
"object",
"into",
"a",
"long",
"value",
"given",
"a",
"specified",
"sign",
".",
"returns",
"INFLATED",
"if",
"value",
"is",
"not",
"fit",
"into",
"long"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L222-L236 |
33,951 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.clear | void clear() {
offset = intLen = 0;
for (int index=0, n=value.length; index < n; index++)
value[index] = 0;
} | java | void clear() {
offset = intLen = 0;
for (int index=0, n=value.length; index < n; index++)
value[index] = 0;
} | [
"void",
"clear",
"(",
")",
"{",
"offset",
"=",
"intLen",
"=",
"0",
";",
"for",
"(",
"int",
"index",
"=",
"0",
",",
"n",
"=",
"value",
".",
"length",
";",
"index",
"<",
"n",
";",
"index",
"++",
")",
"value",
"[",
"index",
"]",
"=",
"0",
";",
... | Clear out a MutableBigInteger for reuse. | [
"Clear",
"out",
"a",
"MutableBigInteger",
"for",
"reuse",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L241-L245 |
33,952 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.getLowestSetBit | private final int getLowestSetBit() {
if (intLen == 0)
return -1;
int j, b;
for (j=intLen-1; (j > 0) && (value[j+offset] == 0); j--)
;
b = value[j+offset];
if (b == 0)
return -1;
return ((intLen-1-j)<<5) + Integer.numberOfTrailingZeros(... | java | private final int getLowestSetBit() {
if (intLen == 0)
return -1;
int j, b;
for (j=intLen-1; (j > 0) && (value[j+offset] == 0); j--)
;
b = value[j+offset];
if (b == 0)
return -1;
return ((intLen-1-j)<<5) + Integer.numberOfTrailingZeros(... | [
"private",
"final",
"int",
"getLowestSetBit",
"(",
")",
"{",
"if",
"(",
"intLen",
"==",
"0",
")",
"return",
"-",
"1",
";",
"int",
"j",
",",
"b",
";",
"for",
"(",
"j",
"=",
"intLen",
"-",
"1",
";",
"(",
"j",
">",
"0",
")",
"&&",
"(",
"value",
... | Return the index of the lowest set bit in this MutableBigInteger. If the
magnitude of this MutableBigInteger is zero, -1 is returned. | [
"Return",
"the",
"index",
"of",
"the",
"lowest",
"set",
"bit",
"in",
"this",
"MutableBigInteger",
".",
"If",
"the",
"magnitude",
"of",
"this",
"MutableBigInteger",
"is",
"zero",
"-",
"1",
"is",
"returned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L350-L360 |
33,953 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.normalize | final void normalize() {
if (intLen == 0) {
offset = 0;
return;
}
int index = offset;
if (value[index] != 0)
return;
int indexBound = index+intLen;
do {
index++;
} while(index < indexBound && value[index] == 0);
... | java | final void normalize() {
if (intLen == 0) {
offset = 0;
return;
}
int index = offset;
if (value[index] != 0)
return;
int indexBound = index+intLen;
do {
index++;
} while(index < indexBound && value[index] == 0);
... | [
"final",
"void",
"normalize",
"(",
")",
"{",
"if",
"(",
"intLen",
"==",
"0",
")",
"{",
"offset",
"=",
"0",
";",
"return",
";",
"}",
"int",
"index",
"=",
"offset",
";",
"if",
"(",
"value",
"[",
"index",
"]",
"!=",
"0",
")",
"return",
";",
"int",... | Ensure that the MutableBigInteger is in normal form, specifically
making sure that there are no leading zeros, and that if the
magnitude is zero, then intLen is zero. | [
"Ensure",
"that",
"the",
"MutableBigInteger",
"is",
"in",
"normal",
"form",
"specifically",
"making",
"sure",
"that",
"there",
"are",
"no",
"leading",
"zeros",
"and",
"that",
"if",
"the",
"magnitude",
"is",
"zero",
"then",
"intLen",
"is",
"zero",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L385-L403 |
33,954 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.ensureCapacity | private final void ensureCapacity(int len) {
if (value.length < len) {
value = new int[len];
offset = 0;
intLen = len;
}
} | java | private final void ensureCapacity(int len) {
if (value.length < len) {
value = new int[len];
offset = 0;
intLen = len;
}
} | [
"private",
"final",
"void",
"ensureCapacity",
"(",
"int",
"len",
")",
"{",
"if",
"(",
"value",
".",
"length",
"<",
"len",
")",
"{",
"value",
"=",
"new",
"int",
"[",
"len",
"]",
";",
"offset",
"=",
"0",
";",
"intLen",
"=",
"len",
";",
"}",
"}"
] | If this MutableBigInteger cannot hold len words, increase the size
of the value array to len words. | [
"If",
"this",
"MutableBigInteger",
"cannot",
"hold",
"len",
"words",
"increase",
"the",
"size",
"of",
"the",
"value",
"array",
"to",
"len",
"words",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L409-L415 |
33,955 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.toIntArray | int[] toIntArray() {
int[] result = new int[intLen];
for(int i=0; i < intLen; i++)
result[i] = value[offset+i];
return result;
} | java | int[] toIntArray() {
int[] result = new int[intLen];
for(int i=0; i < intLen; i++)
result[i] = value[offset+i];
return result;
} | [
"int",
"[",
"]",
"toIntArray",
"(",
")",
"{",
"int",
"[",
"]",
"result",
"=",
"new",
"int",
"[",
"intLen",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"intLen",
";",
"i",
"++",
")",
"result",
"[",
"i",
"]",
"=",
"value",
"[",... | Convert this MutableBigInteger into an int array with no leading
zeros, of a length that is equal to this MutableBigInteger's intLen. | [
"Convert",
"this",
"MutableBigInteger",
"into",
"an",
"int",
"array",
"with",
"no",
"leading",
"zeros",
"of",
"a",
"length",
"that",
"is",
"equal",
"to",
"this",
"MutableBigInteger",
"s",
"intLen",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L421-L426 |
33,956 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.copyValue | void copyValue(MutableBigInteger src) {
int len = src.intLen;
if (value.length < len)
value = new int[len];
System.arraycopy(src.value, src.offset, value, 0, len);
intLen = len;
offset = 0;
} | java | void copyValue(MutableBigInteger src) {
int len = src.intLen;
if (value.length < len)
value = new int[len];
System.arraycopy(src.value, src.offset, value, 0, len);
intLen = len;
offset = 0;
} | [
"void",
"copyValue",
"(",
"MutableBigInteger",
"src",
")",
"{",
"int",
"len",
"=",
"src",
".",
"intLen",
";",
"if",
"(",
"value",
".",
"length",
"<",
"len",
")",
"value",
"=",
"new",
"int",
"[",
"len",
"]",
";",
"System",
".",
"arraycopy",
"(",
"sr... | Sets this MutableBigInteger's value array to a copy of the specified
array. The intLen is set to the length of the new array. | [
"Sets",
"this",
"MutableBigInteger",
"s",
"value",
"array",
"to",
"a",
"copy",
"of",
"the",
"specified",
"array",
".",
"The",
"intLen",
"is",
"set",
"to",
"the",
"length",
"of",
"the",
"new",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L451-L458 |
33,957 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.copyValue | void copyValue(int[] val) {
int len = val.length;
if (value.length < len)
value = new int[len];
System.arraycopy(val, 0, value, 0, len);
intLen = len;
offset = 0;
} | java | void copyValue(int[] val) {
int len = val.length;
if (value.length < len)
value = new int[len];
System.arraycopy(val, 0, value, 0, len);
intLen = len;
offset = 0;
} | [
"void",
"copyValue",
"(",
"int",
"[",
"]",
"val",
")",
"{",
"int",
"len",
"=",
"val",
".",
"length",
";",
"if",
"(",
"value",
".",
"length",
"<",
"len",
")",
"value",
"=",
"new",
"int",
"[",
"len",
"]",
";",
"System",
".",
"arraycopy",
"(",
"va... | Sets this MutableBigInteger's value array to a copy of the specified
array. The intLen is set to the length of the specified array. | [
"Sets",
"this",
"MutableBigInteger",
"s",
"value",
"array",
"to",
"a",
"copy",
"of",
"the",
"specified",
"array",
".",
"The",
"intLen",
"is",
"set",
"to",
"the",
"length",
"of",
"the",
"specified",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L464-L471 |
33,958 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.isNormal | boolean isNormal() {
if (intLen + offset > value.length)
return false;
if (intLen == 0)
return true;
return (value[offset] != 0);
} | java | boolean isNormal() {
if (intLen + offset > value.length)
return false;
if (intLen == 0)
return true;
return (value[offset] != 0);
} | [
"boolean",
"isNormal",
"(",
")",
"{",
"if",
"(",
"intLen",
"+",
"offset",
">",
"value",
".",
"length",
")",
"return",
"false",
";",
"if",
"(",
"intLen",
"==",
"0",
")",
"return",
"true",
";",
"return",
"(",
"value",
"[",
"offset",
"]",
"!=",
"0",
... | Returns true iff this MutableBigInteger is in normal form. A
MutableBigInteger is in normal form if it has no leading zeros
after the offset, and intLen + offset <= value.length. | [
"Returns",
"true",
"iff",
"this",
"MutableBigInteger",
"is",
"in",
"normal",
"form",
".",
"A",
"MutableBigInteger",
"is",
"in",
"normal",
"form",
"if",
"it",
"has",
"no",
"leading",
"zeros",
"after",
"the",
"offset",
"and",
"intLen",
"+",
"offset",
"<",
"=... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L506-L512 |
33,959 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.rightShift | void rightShift(int n) {
if (intLen == 0)
return;
int nInts = n >>> 5;
int nBits = n & 0x1F;
this.intLen -= nInts;
if (nBits == 0)
return;
int bitsInHighWord = BigInteger.bitLengthForInt(value[offset]);
if (nBits >= bitsInHighWord) {
... | java | void rightShift(int n) {
if (intLen == 0)
return;
int nInts = n >>> 5;
int nBits = n & 0x1F;
this.intLen -= nInts;
if (nBits == 0)
return;
int bitsInHighWord = BigInteger.bitLengthForInt(value[offset]);
if (nBits >= bitsInHighWord) {
... | [
"void",
"rightShift",
"(",
"int",
"n",
")",
"{",
"if",
"(",
"intLen",
"==",
"0",
")",
"return",
";",
"int",
"nInts",
"=",
"n",
">>>",
"5",
";",
"int",
"nBits",
"=",
"n",
"&",
"0x1F",
";",
"this",
".",
"intLen",
"-=",
"nInts",
";",
"if",
"(",
... | Right shift this MutableBigInteger n bits. The MutableBigInteger is left
in normal form. | [
"Right",
"shift",
"this",
"MutableBigInteger",
"n",
"bits",
".",
"The",
"MutableBigInteger",
"is",
"left",
"in",
"normal",
"form",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L537-L552 |
33,960 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.leftShift | void leftShift(int n) {
/*
* If there is enough storage space in this MutableBigInteger already
* the available space will be used. Space to the right of the used
* ints in the value array is faster to utilize, so the extra space
* will be taken from the right if possible.
... | java | void leftShift(int n) {
/*
* If there is enough storage space in this MutableBigInteger already
* the available space will be used. Space to the right of the used
* ints in the value array is faster to utilize, so the extra space
* will be taken from the right if possible.
... | [
"void",
"leftShift",
"(",
"int",
"n",
")",
"{",
"/*\n * If there is enough storage space in this MutableBigInteger already\n * the available space will be used. Space to the right of the used\n * ints in the value array is faster to utilize, so the extra space\n * will ... | Left shift this MutableBigInteger n bits. | [
"Left",
"shift",
"this",
"MutableBigInteger",
"n",
"bits",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L566-L613 |
33,961 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.divadd | private int divadd(int[] a, int[] result, int offset) {
long carry = 0;
for (int j=a.length-1; j >= 0; j--) {
long sum = (a[j] & LONG_MASK) +
(result[j+offset] & LONG_MASK) + carry;
result[j+offset] = (int)sum;
carry = sum >>> 32;
}
... | java | private int divadd(int[] a, int[] result, int offset) {
long carry = 0;
for (int j=a.length-1; j >= 0; j--) {
long sum = (a[j] & LONG_MASK) +
(result[j+offset] & LONG_MASK) + carry;
result[j+offset] = (int)sum;
carry = sum >>> 32;
}
... | [
"private",
"int",
"divadd",
"(",
"int",
"[",
"]",
"a",
",",
"int",
"[",
"]",
"result",
",",
"int",
"offset",
")",
"{",
"long",
"carry",
"=",
"0",
";",
"for",
"(",
"int",
"j",
"=",
"a",
".",
"length",
"-",
"1",
";",
"j",
">=",
"0",
";",
"j",... | A primitive used for division. This method adds in one multiple of the
divisor a back to the dividend result at a specified offset. It is used
when qhat was estimated too large, and must be adjusted. | [
"A",
"primitive",
"used",
"for",
"division",
".",
"This",
"method",
"adds",
"in",
"one",
"multiple",
"of",
"the",
"divisor",
"a",
"back",
"to",
"the",
"dividend",
"result",
"at",
"a",
"specified",
"offset",
".",
"It",
"is",
"used",
"when",
"qhat",
"was",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L620-L630 |
33,962 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.primitiveRightShift | private final void primitiveRightShift(int n) {
int[] val = value;
int n2 = 32 - n;
for (int i=offset+intLen-1, c=val[i]; i > offset; i--) {
int b = c;
c = val[i-1];
val[i] = (c << n2) | (b >>> n);
}
val[offset] >>>= n;
} | java | private final void primitiveRightShift(int n) {
int[] val = value;
int n2 = 32 - n;
for (int i=offset+intLen-1, c=val[i]; i > offset; i--) {
int b = c;
c = val[i-1];
val[i] = (c << n2) | (b >>> n);
}
val[offset] >>>= n;
} | [
"private",
"final",
"void",
"primitiveRightShift",
"(",
"int",
"n",
")",
"{",
"int",
"[",
"]",
"val",
"=",
"value",
";",
"int",
"n2",
"=",
"32",
"-",
"n",
";",
"for",
"(",
"int",
"i",
"=",
"offset",
"+",
"intLen",
"-",
"1",
",",
"c",
"=",
"val"... | Right shift this MutableBigInteger n bits, where n is
less than 32.
Assumes that intLen > 0, n > 0 for speed | [
"Right",
"shift",
"this",
"MutableBigInteger",
"n",
"bits",
"where",
"n",
"is",
"less",
"than",
"32",
".",
"Assumes",
"that",
"intLen",
">",
"0",
"n",
">",
"0",
"for",
"speed"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L676-L685 |
33,963 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.primitiveLeftShift | private final void primitiveLeftShift(int n) {
int[] val = value;
int n2 = 32 - n;
for (int i=offset, c=val[i], m=i+intLen-1; i < m; i++) {
int b = c;
c = val[i+1];
val[i] = (b << n) | (c >>> n2);
}
val[offset+intLen-1] <<= n;
} | java | private final void primitiveLeftShift(int n) {
int[] val = value;
int n2 = 32 - n;
for (int i=offset, c=val[i], m=i+intLen-1; i < m; i++) {
int b = c;
c = val[i+1];
val[i] = (b << n) | (c >>> n2);
}
val[offset+intLen-1] <<= n;
} | [
"private",
"final",
"void",
"primitiveLeftShift",
"(",
"int",
"n",
")",
"{",
"int",
"[",
"]",
"val",
"=",
"value",
";",
"int",
"n2",
"=",
"32",
"-",
"n",
";",
"for",
"(",
"int",
"i",
"=",
"offset",
",",
"c",
"=",
"val",
"[",
"i",
"]",
",",
"m... | Left shift this MutableBigInteger n bits, where n is
less than 32.
Assumes that intLen > 0, n > 0 for speed | [
"Left",
"shift",
"this",
"MutableBigInteger",
"n",
"bits",
"where",
"n",
"is",
"less",
"than",
"32",
".",
"Assumes",
"that",
"intLen",
">",
"0",
"n",
">",
"0",
"for",
"speed"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L692-L701 |
33,964 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.add | void add(MutableBigInteger addend) {
int x = intLen;
int y = addend.intLen;
int resultLen = (intLen > addend.intLen ? intLen : addend.intLen);
int[] result = (value.length < resultLen ? new int[resultLen] : value);
int rstart = result.length-1;
long sum;
long car... | java | void add(MutableBigInteger addend) {
int x = intLen;
int y = addend.intLen;
int resultLen = (intLen > addend.intLen ? intLen : addend.intLen);
int[] result = (value.length < resultLen ? new int[resultLen] : value);
int rstart = result.length-1;
long sum;
long car... | [
"void",
"add",
"(",
"MutableBigInteger",
"addend",
")",
"{",
"int",
"x",
"=",
"intLen",
";",
"int",
"y",
"=",
"addend",
".",
"intLen",
";",
"int",
"resultLen",
"=",
"(",
"intLen",
">",
"addend",
".",
"intLen",
"?",
"intLen",
":",
"addend",
".",
"intL... | Adds the contents of two MutableBigInteger objects.The result
is placed within this MutableBigInteger.
The contents of the addend are not changed. | [
"Adds",
"the",
"contents",
"of",
"two",
"MutableBigInteger",
"objects",
".",
"The",
"result",
"is",
"placed",
"within",
"this",
"MutableBigInteger",
".",
"The",
"contents",
"of",
"the",
"addend",
"are",
"not",
"changed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L737-L789 |
33,965 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.subtract | int subtract(MutableBigInteger b) {
MutableBigInteger a = this;
int[] result = value;
int sign = a.compare(b);
if (sign == 0) {
reset();
return 0;
}
if (sign < 0) {
MutableBigInteger tmp = a;
a = b;
b = tmp;
... | java | int subtract(MutableBigInteger b) {
MutableBigInteger a = this;
int[] result = value;
int sign = a.compare(b);
if (sign == 0) {
reset();
return 0;
}
if (sign < 0) {
MutableBigInteger tmp = a;
a = b;
b = tmp;
... | [
"int",
"subtract",
"(",
"MutableBigInteger",
"b",
")",
"{",
"MutableBigInteger",
"a",
"=",
"this",
";",
"int",
"[",
"]",
"result",
"=",
"value",
";",
"int",
"sign",
"=",
"a",
".",
"compare",
"(",
"b",
")",
";",
"if",
"(",
"sign",
"==",
"0",
")",
... | Subtracts the smaller of this and b from the larger and places the
result into this MutableBigInteger. | [
"Subtracts",
"the",
"smaller",
"of",
"this",
"and",
"b",
"from",
"the",
"larger",
"and",
"places",
"the",
"result",
"into",
"this",
"MutableBigInteger",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L913-L958 |
33,966 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.difference | private int difference(MutableBigInteger b) {
MutableBigInteger a = this;
int sign = a.compare(b);
if (sign == 0)
return 0;
if (sign < 0) {
MutableBigInteger tmp = a;
a = b;
b = tmp;
}
long diff = 0;
int x = a.intLe... | java | private int difference(MutableBigInteger b) {
MutableBigInteger a = this;
int sign = a.compare(b);
if (sign == 0)
return 0;
if (sign < 0) {
MutableBigInteger tmp = a;
a = b;
b = tmp;
}
long diff = 0;
int x = a.intLe... | [
"private",
"int",
"difference",
"(",
"MutableBigInteger",
"b",
")",
"{",
"MutableBigInteger",
"a",
"=",
"this",
";",
"int",
"sign",
"=",
"a",
".",
"compare",
"(",
"b",
")",
";",
"if",
"(",
"sign",
"==",
"0",
")",
"return",
"0",
";",
"if",
"(",
"sig... | Subtracts the smaller of a and b from the larger and places the result
into the larger. Returns 1 if the answer is in a, -1 if in b, 0 if no
operation was performed. | [
"Subtracts",
"the",
"smaller",
"of",
"a",
"and",
"b",
"from",
"the",
"larger",
"and",
"places",
"the",
"result",
"into",
"the",
"larger",
".",
"Returns",
"1",
"if",
"the",
"answer",
"is",
"in",
"a",
"-",
"1",
"if",
"in",
"b",
"0",
"if",
"no",
"oper... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L965-L996 |
33,967 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.multiply | void multiply(MutableBigInteger y, MutableBigInteger z) {
int xLen = intLen;
int yLen = y.intLen;
int newLen = xLen + yLen;
// Put z into an appropriate state to receive product
if (z.value.length < newLen)
z.value = new int[newLen];
z.offset = 0;
z.i... | java | void multiply(MutableBigInteger y, MutableBigInteger z) {
int xLen = intLen;
int yLen = y.intLen;
int newLen = xLen + yLen;
// Put z into an appropriate state to receive product
if (z.value.length < newLen)
z.value = new int[newLen];
z.offset = 0;
z.i... | [
"void",
"multiply",
"(",
"MutableBigInteger",
"y",
",",
"MutableBigInteger",
"z",
")",
"{",
"int",
"xLen",
"=",
"intLen",
";",
"int",
"yLen",
"=",
"y",
".",
"intLen",
";",
"int",
"newLen",
"=",
"xLen",
"+",
"yLen",
";",
"// Put z into an appropriate state to... | Multiply the contents of two MutableBigInteger objects. The result is
placed into MutableBigInteger z. The contents of y are not changed. | [
"Multiply",
"the",
"contents",
"of",
"two",
"MutableBigInteger",
"objects",
".",
"The",
"result",
"is",
"placed",
"into",
"MutableBigInteger",
"z",
".",
"The",
"contents",
"of",
"y",
"are",
"not",
"changed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1002-L1038 |
33,968 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.mul | void mul(int y, MutableBigInteger z) {
if (y == 1) {
z.copyValue(this);
return;
}
if (y == 0) {
z.clear();
return;
}
// Perform the multiplication word by word
long ylong = y & LONG_MASK;
int[] zval = (z.value.leng... | java | void mul(int y, MutableBigInteger z) {
if (y == 1) {
z.copyValue(this);
return;
}
if (y == 0) {
z.clear();
return;
}
// Perform the multiplication word by word
long ylong = y & LONG_MASK;
int[] zval = (z.value.leng... | [
"void",
"mul",
"(",
"int",
"y",
",",
"MutableBigInteger",
"z",
")",
"{",
"if",
"(",
"y",
"==",
"1",
")",
"{",
"z",
".",
"copyValue",
"(",
"this",
")",
";",
"return",
";",
"}",
"if",
"(",
"y",
"==",
"0",
")",
"{",
"z",
".",
"clear",
"(",
")"... | Multiply the contents of this MutableBigInteger by the word y. The
result is placed into z. | [
"Multiply",
"the",
"contents",
"of",
"this",
"MutableBigInteger",
"by",
"the",
"word",
"y",
".",
"The",
"result",
"is",
"placed",
"into",
"z",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1044-L1075 |
33,969 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.divideOneWord | int divideOneWord(int divisor, MutableBigInteger quotient) {
long divisorLong = divisor & LONG_MASK;
// Special case of one word dividend
if (intLen == 1) {
long dividendValue = value[offset] & LONG_MASK;
int q = (int) (dividendValue / divisorLong);
int r = (... | java | int divideOneWord(int divisor, MutableBigInteger quotient) {
long divisorLong = divisor & LONG_MASK;
// Special case of one word dividend
if (intLen == 1) {
long dividendValue = value[offset] & LONG_MASK;
int q = (int) (dividendValue / divisorLong);
int r = (... | [
"int",
"divideOneWord",
"(",
"int",
"divisor",
",",
"MutableBigInteger",
"quotient",
")",
"{",
"long",
"divisorLong",
"=",
"divisor",
"&",
"LONG_MASK",
";",
"// Special case of one word dividend",
"if",
"(",
"intLen",
"==",
"1",
")",
"{",
"long",
"dividendValue",
... | This method is used for division of an n word dividend by a one word
divisor. The quotient is placed into quotient. The one word divisor is
specified by divisor.
@return the remainder of the division is returned. | [
"This",
"method",
"is",
"used",
"for",
"division",
"of",
"an",
"n",
"word",
"dividend",
"by",
"a",
"one",
"word",
"divisor",
".",
"The",
"quotient",
"is",
"placed",
"into",
"quotient",
".",
"The",
"one",
"word",
"divisor",
"is",
"specified",
"by",
"divis... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1085-L1139 |
33,970 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.divide | long divide(long v, MutableBigInteger quotient) {
if (v == 0)
throw new ArithmeticException("BigInteger divide by zero");
// Dividend is zero
if (intLen == 0) {
quotient.intLen = quotient.offset = 0;
return 0;
}
if (v < 0)
v = -v;
... | java | long divide(long v, MutableBigInteger quotient) {
if (v == 0)
throw new ArithmeticException("BigInteger divide by zero");
// Dividend is zero
if (intLen == 0) {
quotient.intLen = quotient.offset = 0;
return 0;
}
if (v < 0)
v = -v;
... | [
"long",
"divide",
"(",
"long",
"v",
",",
"MutableBigInteger",
"quotient",
")",
"{",
"if",
"(",
"v",
"==",
"0",
")",
"throw",
"new",
"ArithmeticException",
"(",
"\"BigInteger divide by zero\"",
")",
";",
"// Dividend is zero",
"if",
"(",
"intLen",
"==",
"0",
... | Internally used to calculate the quotient of this div v and places the
quotient in the provided MutableBigInteger object and the remainder is
returned.
@return the remainder of the division will be returned. | [
"Internally",
"used",
"to",
"calculate",
"the",
"quotient",
"of",
"this",
"div",
"v",
"and",
"places",
"the",
"quotient",
"in",
"the",
"provided",
"MutableBigInteger",
"object",
"and",
"the",
"remainder",
"is",
"returned",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1437-L1457 |
33,971 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.divaddLong | private int divaddLong(int dh, int dl, int[] result, int offset) {
long carry = 0;
long sum = (dl & LONG_MASK) + (result[1+offset] & LONG_MASK);
result[1+offset] = (int)sum;
sum = (dh & LONG_MASK) + (result[offset] & LONG_MASK) + carry;
result[offset] = (int)sum;
carry ... | java | private int divaddLong(int dh, int dl, int[] result, int offset) {
long carry = 0;
long sum = (dl & LONG_MASK) + (result[1+offset] & LONG_MASK);
result[1+offset] = (int)sum;
sum = (dh & LONG_MASK) + (result[offset] & LONG_MASK) + carry;
result[offset] = (int)sum;
carry ... | [
"private",
"int",
"divaddLong",
"(",
"int",
"dh",
",",
"int",
"dl",
",",
"int",
"[",
"]",
"result",
",",
"int",
"offset",
")",
"{",
"long",
"carry",
"=",
"0",
";",
"long",
"sum",
"=",
"(",
"dl",
"&",
"LONG_MASK",
")",
"+",
"(",
"result",
"[",
"... | A primitive used for division by long.
Specialized version of the method divadd.
dh is a high part of the divisor, dl is a low part | [
"A",
"primitive",
"used",
"for",
"division",
"by",
"long",
".",
"Specialized",
"version",
"of",
"the",
"method",
"divadd",
".",
"dh",
"is",
"a",
"high",
"part",
"of",
"the",
"divisor",
"dl",
"is",
"a",
"low",
"part"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1791-L1801 |
33,972 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.mulsubLong | private int mulsubLong(int[] q, int dh, int dl, int x, int offset) {
long xLong = x & LONG_MASK;
offset += 2;
long product = (dl & LONG_MASK) * xLong;
long difference = q[offset] - product;
q[offset--] = (int)difference;
long carry = (product >>> 32)
+ ((... | java | private int mulsubLong(int[] q, int dh, int dl, int x, int offset) {
long xLong = x & LONG_MASK;
offset += 2;
long product = (dl & LONG_MASK) * xLong;
long difference = q[offset] - product;
q[offset--] = (int)difference;
long carry = (product >>> 32)
+ ((... | [
"private",
"int",
"mulsubLong",
"(",
"int",
"[",
"]",
"q",
",",
"int",
"dh",
",",
"int",
"dl",
",",
"int",
"x",
",",
"int",
"offset",
")",
"{",
"long",
"xLong",
"=",
"x",
"&",
"LONG_MASK",
";",
"offset",
"+=",
"2",
";",
"long",
"product",
"=",
... | This method is used for division by long.
Specialized version of the method sulsub.
dh is a high part of the divisor, dl is a low part | [
"This",
"method",
"is",
"used",
"for",
"division",
"by",
"long",
".",
"Specialized",
"version",
"of",
"the",
"method",
"sulsub",
".",
"dh",
"is",
"a",
"high",
"part",
"of",
"the",
"divisor",
"dl",
"is",
"a",
"low",
"part"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1808-L1824 |
33,973 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.hybridGCD | MutableBigInteger hybridGCD(MutableBigInteger b) {
// Use Euclid's algorithm until the numbers are approximately the
// same length, then use the binary GCD algorithm to find the GCD.
MutableBigInteger a = this;
MutableBigInteger q = new MutableBigInteger();
while (b.intLen != 0... | java | MutableBigInteger hybridGCD(MutableBigInteger b) {
// Use Euclid's algorithm until the numbers are approximately the
// same length, then use the binary GCD algorithm to find the GCD.
MutableBigInteger a = this;
MutableBigInteger q = new MutableBigInteger();
while (b.intLen != 0... | [
"MutableBigInteger",
"hybridGCD",
"(",
"MutableBigInteger",
"b",
")",
"{",
"// Use Euclid's algorithm until the numbers are approximately the",
"// same length, then use the binary GCD algorithm to find the GCD.",
"MutableBigInteger",
"a",
"=",
"this",
";",
"MutableBigInteger",
"q",
... | Calculate GCD of this and b. This and b are changed by the computation. | [
"Calculate",
"GCD",
"of",
"this",
"and",
"b",
".",
"This",
"and",
"b",
"are",
"changed",
"by",
"the",
"computation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1871-L1886 |
33,974 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.binaryGCD | private MutableBigInteger binaryGCD(MutableBigInteger v) {
// Algorithm B from Knuth section 4.5.2
MutableBigInteger u = this;
MutableBigInteger r = new MutableBigInteger();
// step B1
int s1 = u.getLowestSetBit();
int s2 = v.getLowestSetBit();
int k = (s1 < s2) ... | java | private MutableBigInteger binaryGCD(MutableBigInteger v) {
// Algorithm B from Knuth section 4.5.2
MutableBigInteger u = this;
MutableBigInteger r = new MutableBigInteger();
// step B1
int s1 = u.getLowestSetBit();
int s2 = v.getLowestSetBit();
int k = (s1 < s2) ... | [
"private",
"MutableBigInteger",
"binaryGCD",
"(",
"MutableBigInteger",
"v",
")",
"{",
"// Algorithm B from Knuth section 4.5.2",
"MutableBigInteger",
"u",
"=",
"this",
";",
"MutableBigInteger",
"r",
"=",
"new",
"MutableBigInteger",
"(",
")",
";",
"// step B1",
"int",
... | Calculate GCD of this and v.
Assumes that this and v are not zero. | [
"Calculate",
"GCD",
"of",
"this",
"and",
"v",
".",
"Assumes",
"that",
"this",
"and",
"v",
"are",
"not",
"zero",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1892-L1943 |
33,975 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.binaryGcd | static int binaryGcd(int a, int b) {
if (b == 0)
return a;
if (a == 0)
return b;
// Right shift a & b till their last bits equal to 1.
int aZeros = Integer.numberOfTrailingZeros(a);
int bZeros = Integer.numberOfTrailingZeros(b);
a >>>= aZeros;
... | java | static int binaryGcd(int a, int b) {
if (b == 0)
return a;
if (a == 0)
return b;
// Right shift a & b till their last bits equal to 1.
int aZeros = Integer.numberOfTrailingZeros(a);
int bZeros = Integer.numberOfTrailingZeros(b);
a >>>= aZeros;
... | [
"static",
"int",
"binaryGcd",
"(",
"int",
"a",
",",
"int",
"b",
")",
"{",
"if",
"(",
"b",
"==",
"0",
")",
"return",
"a",
";",
"if",
"(",
"a",
"==",
"0",
")",
"return",
"b",
";",
"// Right shift a & b till their last bits equal to 1.",
"int",
"aZeros",
... | Calculate GCD of a and b interpreted as unsigned integers. | [
"Calculate",
"GCD",
"of",
"a",
"and",
"b",
"interpreted",
"as",
"unsigned",
"integers",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1948-L1972 |
33,976 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.mutableModInverse | MutableBigInteger mutableModInverse(MutableBigInteger p) {
// Modulus is odd, use Schroeppel's algorithm
if (p.isOdd())
return modInverse(p);
// Base and modulus are even, throw exception
if (isEven())
throw new ArithmeticException("BigInteger not invertible.");
... | java | MutableBigInteger mutableModInverse(MutableBigInteger p) {
// Modulus is odd, use Schroeppel's algorithm
if (p.isOdd())
return modInverse(p);
// Base and modulus are even, throw exception
if (isEven())
throw new ArithmeticException("BigInteger not invertible.");
... | [
"MutableBigInteger",
"mutableModInverse",
"(",
"MutableBigInteger",
"p",
")",
"{",
"// Modulus is odd, use Schroeppel's algorithm",
"if",
"(",
"p",
".",
"isOdd",
"(",
")",
")",
"return",
"modInverse",
"(",
"p",
")",
";",
"// Base and modulus are even, throw exception",
... | Returns the modInverse of this mod p. This and p are not affected by
the operation. | [
"Returns",
"the",
"modInverse",
"of",
"this",
"mod",
"p",
".",
"This",
"and",
"p",
"are",
"not",
"affected",
"by",
"the",
"operation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L1978-L2019 |
33,977 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.inverseMod32 | static int inverseMod32(int val) {
// Newton's iteration!
int t = val;
t *= 2 - val*t;
t *= 2 - val*t;
t *= 2 - val*t;
t *= 2 - val*t;
return t;
} | java | static int inverseMod32(int val) {
// Newton's iteration!
int t = val;
t *= 2 - val*t;
t *= 2 - val*t;
t *= 2 - val*t;
t *= 2 - val*t;
return t;
} | [
"static",
"int",
"inverseMod32",
"(",
"int",
"val",
")",
"{",
"// Newton's iteration!",
"int",
"t",
"=",
"val",
";",
"t",
"*=",
"2",
"-",
"val",
"*",
"t",
";",
"t",
"*=",
"2",
"-",
"val",
"*",
"t",
";",
"t",
"*=",
"2",
"-",
"val",
"*",
"t",
"... | Returns the multiplicative inverse of val mod 2^32. Assumes val is odd. | [
"Returns",
"the",
"multiplicative",
"inverse",
"of",
"val",
"mod",
"2^32",
".",
"Assumes",
"val",
"is",
"odd",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L2056-L2064 |
33,978 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.modInverseBP2 | static MutableBigInteger modInverseBP2(MutableBigInteger mod, int k) {
// Copy the mod to protect original
return fixup(new MutableBigInteger(1), new MutableBigInteger(mod), k);
} | java | static MutableBigInteger modInverseBP2(MutableBigInteger mod, int k) {
// Copy the mod to protect original
return fixup(new MutableBigInteger(1), new MutableBigInteger(mod), k);
} | [
"static",
"MutableBigInteger",
"modInverseBP2",
"(",
"MutableBigInteger",
"mod",
",",
"int",
"k",
")",
"{",
"// Copy the mod to protect original",
"return",
"fixup",
"(",
"new",
"MutableBigInteger",
"(",
"1",
")",
",",
"new",
"MutableBigInteger",
"(",
"mod",
")",
... | Calculate the multiplicative inverse of 2^k mod mod, where mod is odd. | [
"Calculate",
"the",
"multiplicative",
"inverse",
"of",
"2^k",
"mod",
"mod",
"where",
"mod",
"is",
"odd",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L2069-L2072 |
33,979 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.modInverse | private MutableBigInteger modInverse(MutableBigInteger mod) {
MutableBigInteger p = new MutableBigInteger(mod);
MutableBigInteger f = new MutableBigInteger(this);
MutableBigInteger g = new MutableBigInteger(p);
SignedMutableBigInteger c = new SignedMutableBigInteger(1);
SignedMut... | java | private MutableBigInteger modInverse(MutableBigInteger mod) {
MutableBigInteger p = new MutableBigInteger(mod);
MutableBigInteger f = new MutableBigInteger(this);
MutableBigInteger g = new MutableBigInteger(p);
SignedMutableBigInteger c = new SignedMutableBigInteger(1);
SignedMut... | [
"private",
"MutableBigInteger",
"modInverse",
"(",
"MutableBigInteger",
"mod",
")",
"{",
"MutableBigInteger",
"p",
"=",
"new",
"MutableBigInteger",
"(",
"mod",
")",
";",
"MutableBigInteger",
"f",
"=",
"new",
"MutableBigInteger",
"(",
"this",
")",
";",
"MutableBigI... | Calculate the multiplicative inverse of this mod mod, where mod is odd.
This and mod are not changed by the calculation.
This method implements an algorithm due to Richard Schroeppel, that uses
the same intermediate representation as Montgomery Reduction
("Montgomery Form"). The algorithm is described in an unpublish... | [
"Calculate",
"the",
"multiplicative",
"inverse",
"of",
"this",
"mod",
"mod",
"where",
"mod",
"is",
"odd",
".",
"This",
"and",
"mod",
"are",
"not",
"changed",
"by",
"the",
"calculation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L2083-L2134 |
33,980 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java | MutableBigInteger.euclidModInverse | MutableBigInteger euclidModInverse(int k) {
MutableBigInteger b = new MutableBigInteger(1);
b.leftShift(k);
MutableBigInteger mod = new MutableBigInteger(b);
MutableBigInteger a = new MutableBigInteger(this);
MutableBigInteger q = new MutableBigInteger();
MutableBigInteg... | java | MutableBigInteger euclidModInverse(int k) {
MutableBigInteger b = new MutableBigInteger(1);
b.leftShift(k);
MutableBigInteger mod = new MutableBigInteger(b);
MutableBigInteger a = new MutableBigInteger(this);
MutableBigInteger q = new MutableBigInteger();
MutableBigInteg... | [
"MutableBigInteger",
"euclidModInverse",
"(",
"int",
"k",
")",
"{",
"MutableBigInteger",
"b",
"=",
"new",
"MutableBigInteger",
"(",
"1",
")",
";",
"b",
".",
"leftShift",
"(",
"k",
")",
";",
"MutableBigInteger",
"mod",
"=",
"new",
"MutableBigInteger",
"(",
"b... | Uses the extended Euclidean algorithm to compute the modInverse of base
mod a modulus that is a power of 2. The modulus is 2^k. | [
"Uses",
"the",
"extended",
"Euclidean",
"algorithm",
"to",
"compute",
"the",
"modInverse",
"of",
"base",
"mod",
"a",
"modulus",
"that",
"is",
"a",
"power",
"of",
"2",
".",
"The",
"modulus",
"is",
"2^k",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/MutableBigInteger.java#L2179-L2236 |
33,981 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimePrintContext.java | DateTimePrintContext.getValue | <R> R getValue(TemporalQuery<R> query) {
R result = temporal.query(query);
if (result == null && optional == 0) {
throw new DateTimeException("Unable to extract value: " + temporal.getClass());
}
return result;
} | java | <R> R getValue(TemporalQuery<R> query) {
R result = temporal.query(query);
if (result == null && optional == 0) {
throw new DateTimeException("Unable to extract value: " + temporal.getClass());
}
return result;
} | [
"<",
"R",
">",
"R",
"getValue",
"(",
"TemporalQuery",
"<",
"R",
">",
"query",
")",
"{",
"R",
"result",
"=",
"temporal",
".",
"query",
"(",
"query",
")",
";",
"if",
"(",
"result",
"==",
"null",
"&&",
"optional",
"==",
"0",
")",
"{",
"throw",
"new"... | Gets a value using a query.
@param query the query to use, not null
@return the result, null if not found and optional is true
@throws DateTimeException if the type is not available and the section is not optional | [
"Gets",
"a",
"value",
"using",
"a",
"query",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/DateTimePrintContext.java#L279-L285 |
33,982 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Date.java | Date.compareTo | public int compareTo(Date anotherDate) {
long thisTime = getMillisOf(this);
long anotherTime = getMillisOf(anotherDate);
return (thisTime<anotherTime ? -1 : (thisTime==anotherTime ? 0 : 1));
} | java | public int compareTo(Date anotherDate) {
long thisTime = getMillisOf(this);
long anotherTime = getMillisOf(anotherDate);
return (thisTime<anotherTime ? -1 : (thisTime==anotherTime ? 0 : 1));
} | [
"public",
"int",
"compareTo",
"(",
"Date",
"anotherDate",
")",
"{",
"long",
"thisTime",
"=",
"getMillisOf",
"(",
"this",
")",
";",
"long",
"anotherTime",
"=",
"getMillisOf",
"(",
"anotherDate",
")",
";",
"return",
"(",
"thisTime",
"<",
"anotherTime",
"?",
... | Compares two Dates for ordering.
@param anotherDate the <code>Date</code> to be compared.
@return the value <code>0</code> if the argument Date is equal to
this Date; a value less than <code>0</code> if this Date
is before the Date argument; and a value greater than
<code>0</code> if this Date is after the Date a... | [
"Compares",
"two",
"Dates",
"for",
"ordering",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Date.java#L995-L999 |
33,983 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Date.java | Date.normalize | private final BaseCalendar.Date normalize(BaseCalendar.Date date) {
int y = date.getNormalizedYear();
int m = date.getMonth();
int d = date.getDayOfMonth();
int hh = date.getHours();
int mm = date.getMinutes();
int ss = date.getSeconds();
int ms = date.getMillis()... | java | private final BaseCalendar.Date normalize(BaseCalendar.Date date) {
int y = date.getNormalizedYear();
int m = date.getMonth();
int d = date.getDayOfMonth();
int hh = date.getHours();
int mm = date.getMinutes();
int ss = date.getSeconds();
int ms = date.getMillis()... | [
"private",
"final",
"BaseCalendar",
".",
"Date",
"normalize",
"(",
"BaseCalendar",
".",
"Date",
"date",
")",
"{",
"int",
"y",
"=",
"date",
".",
"getNormalizedYear",
"(",
")",
";",
"int",
"m",
"=",
"date",
".",
"getMonth",
"(",
")",
";",
"int",
"d",
"... | fastTime and the returned data are in sync upon return. | [
"fastTime",
"and",
"the",
"returned",
"data",
"are",
"in",
"sync",
"upon",
"return",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Date.java#L1235-L1284 |
33,984 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRules.java | ZoneRules.of | public static ZoneRules of(ZoneOffset baseStandardOffset,
ZoneOffset baseWallOffset,
List<ZoneOffsetTransition> standardOffsetTransitionList,
List<ZoneOffsetTransition> transitionList,
List<ZoneOf... | java | public static ZoneRules of(ZoneOffset baseStandardOffset,
ZoneOffset baseWallOffset,
List<ZoneOffsetTransition> standardOffsetTransitionList,
List<ZoneOffsetTransition> transitionList,
List<ZoneOf... | [
"public",
"static",
"ZoneRules",
"of",
"(",
"ZoneOffset",
"baseStandardOffset",
",",
"ZoneOffset",
"baseWallOffset",
",",
"List",
"<",
"ZoneOffsetTransition",
">",
"standardOffsetTransitionList",
",",
"List",
"<",
"ZoneOffsetTransition",
">",
"transitionList",
",",
"Lis... | Obtains an instance of a ZoneRules.
@param baseStandardOffset the standard offset to use before legal rules were set, not null
@param baseWallOffset the wall offset to use before legal rules were set, not null
@param standardOffsetTransitionList the list of changes to the standard offset, not null
@param transition... | [
"Obtains",
"an",
"instance",
"of",
"a",
"ZoneRules",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRules.java#L176-L188 |
33,985 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRules.java | ZoneRules.findOffsetInfo | private Object findOffsetInfo(LocalDateTime dt, ZoneOffsetTransition trans) {
LocalDateTime localTransition = trans.getDateTimeBefore();
if (trans.isGap()) {
if (dt.isBefore(localTransition)) {
return trans.getOffsetBefore();
}
if (dt.isBefore(trans.ge... | java | private Object findOffsetInfo(LocalDateTime dt, ZoneOffsetTransition trans) {
LocalDateTime localTransition = trans.getDateTimeBefore();
if (trans.isGap()) {
if (dt.isBefore(localTransition)) {
return trans.getOffsetBefore();
}
if (dt.isBefore(trans.ge... | [
"private",
"Object",
"findOffsetInfo",
"(",
"LocalDateTime",
"dt",
",",
"ZoneOffsetTransition",
"trans",
")",
"{",
"LocalDateTime",
"localTransition",
"=",
"trans",
".",
"getDateTimeBefore",
"(",
")",
";",
"if",
"(",
"trans",
".",
"isGap",
"(",
")",
")",
"{",
... | Finds the offset info for a local date-time and transition.
@param dt the date-time, not null
@param trans the transition, not null
@return the offset info, not null | [
"Finds",
"the",
"offset",
"info",
"for",
"a",
"local",
"date",
"-",
"time",
"and",
"transition",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRules.java#L692-L713 |
33,986 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRules.java | ZoneRules.findTransitionArray | private ZoneOffsetTransition[] findTransitionArray(int year) {
Integer yearObj = year; // should use Year class, but this saves a class load
ZoneOffsetTransition[] transArray = lastRulesCache.get(yearObj);
if (transArray != null) {
return transArray;
}
ZoneOffsetTran... | java | private ZoneOffsetTransition[] findTransitionArray(int year) {
Integer yearObj = year; // should use Year class, but this saves a class load
ZoneOffsetTransition[] transArray = lastRulesCache.get(yearObj);
if (transArray != null) {
return transArray;
}
ZoneOffsetTran... | [
"private",
"ZoneOffsetTransition",
"[",
"]",
"findTransitionArray",
"(",
"int",
"year",
")",
"{",
"Integer",
"yearObj",
"=",
"year",
";",
"// should use Year class, but this saves a class load",
"ZoneOffsetTransition",
"[",
"]",
"transArray",
"=",
"lastRulesCache",
".",
... | Finds the appropriate transition array for the given year.
@param year the year, not null
@return the transition array, not null | [
"Finds",
"the",
"appropriate",
"transition",
"array",
"for",
"the",
"given",
"year",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/zone/ZoneRules.java#L721-L736 |
33,987 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java | SourceTreeManager.getNode | public int getNode(Source source)
{
// if (source instanceof DOMSource)
// return ((DOMSource) source).getNode();
// TODO: Not sure if the BaseID is really the same thing as the ID.
String url = source.getSystemId();
if (null == url)
return DTM.NULL;
int n = m_sourceTree.size();
... | java | public int getNode(Source source)
{
// if (source instanceof DOMSource)
// return ((DOMSource) source).getNode();
// TODO: Not sure if the BaseID is really the same thing as the ID.
String url = source.getSystemId();
if (null == url)
return DTM.NULL;
int n = m_sourceTree.size();
... | [
"public",
"int",
"getNode",
"(",
"Source",
"source",
")",
"{",
"// if (source instanceof DOMSource)",
"// return ((DOMSource) source).getNode();",
"// TODO: Not sure if the BaseID is really the same thing as the ID.",
"String",
"url",
"=",
"source",
".",
"getSystemId",
"(",... | Given a Source object, find the node associated with it.
@param source The Source object to act as the key.
@return The node that is associated with the Source, or null if not found. | [
"Given",
"a",
"Source",
"object",
"find",
"the",
"node",
"associated",
"with",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L196-L223 |
33,988 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java | SourceTreeManager.getSourceTree | public int getSourceTree(
String base, String urlString, SourceLocator locator, XPathContext xctxt)
throws TransformerException
{
// System.out.println("getSourceTree");
try
{
Source source = this.resolveURI(base, urlString, locator);
// System.out.println("getSourceTre... | java | public int getSourceTree(
String base, String urlString, SourceLocator locator, XPathContext xctxt)
throws TransformerException
{
// System.out.println("getSourceTree");
try
{
Source source = this.resolveURI(base, urlString, locator);
// System.out.println("getSourceTre... | [
"public",
"int",
"getSourceTree",
"(",
"String",
"base",
",",
"String",
"urlString",
",",
"SourceLocator",
"locator",
",",
"XPathContext",
"xctxt",
")",
"throws",
"TransformerException",
"{",
"// System.out.println(\"getSourceTree\");",
"try",
"{",
"Source",
"source",
... | Get the source tree from the a base URL and a URL string.
@param base The base URI to use if the urlString is relative.
@param urlString An absolute or relative URL string.
@param locator The location of the caller, for diagnostic purposes.
@return should be a non-null reference to the node identified by the
base and... | [
"Get",
"the",
"source",
"tree",
"from",
"the",
"a",
"base",
"URL",
"and",
"a",
"URL",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L237-L259 |
33,989 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java | SourceTreeManager.getSourceTree | public int getSourceTree(Source source, SourceLocator locator, XPathContext xctxt)
throws TransformerException
{
int n = getNode(source);
if (DTM.NULL != n)
return n;
n = parseToNode(source, locator, xctxt);
if (DTM.NULL != n)
putDocumentInCache(n, source);
return n;
} | java | public int getSourceTree(Source source, SourceLocator locator, XPathContext xctxt)
throws TransformerException
{
int n = getNode(source);
if (DTM.NULL != n)
return n;
n = parseToNode(source, locator, xctxt);
if (DTM.NULL != n)
putDocumentInCache(n, source);
return n;
} | [
"public",
"int",
"getSourceTree",
"(",
"Source",
"source",
",",
"SourceLocator",
"locator",
",",
"XPathContext",
"xctxt",
")",
"throws",
"TransformerException",
"{",
"int",
"n",
"=",
"getNode",
"(",
"source",
")",
";",
"if",
"(",
"DTM",
".",
"NULL",
"!=",
... | Get the source tree from the input source.
@param source The Source object that should identify the desired node.
@param locator The location of the caller, for diagnostic purposes.
@return non-null reference to a node.
@throws TransformerException if the Source argument can't be resolved to
a node. | [
"Get",
"the",
"source",
"tree",
"from",
"the",
"input",
"source",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L272-L287 |
33,990 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java | SourceTreeManager.parseToNode | public int parseToNode(Source source, SourceLocator locator, XPathContext xctxt)
throws TransformerException
{
try
{
Object xowner = xctxt.getOwnerObject();
DTM dtm;
if(null != xowner && xowner instanceof org.apache.xml.dtm.DTMWSFilter)
{
dtm = xctxt.getDTM(sou... | java | public int parseToNode(Source source, SourceLocator locator, XPathContext xctxt)
throws TransformerException
{
try
{
Object xowner = xctxt.getOwnerObject();
DTM dtm;
if(null != xowner && xowner instanceof org.apache.xml.dtm.DTMWSFilter)
{
dtm = xctxt.getDTM(sou... | [
"public",
"int",
"parseToNode",
"(",
"Source",
"source",
",",
"SourceLocator",
"locator",
",",
"XPathContext",
"xctxt",
")",
"throws",
"TransformerException",
"{",
"try",
"{",
"Object",
"xowner",
"=",
"xctxt",
".",
"getOwnerObject",
"(",
")",
";",
"DTM",
"dtm"... | Try to create a DOM source tree from the input source.
@param source The Source object that identifies the source node.
@param locator The location of the caller, for diagnostic purposes.
@return non-null reference to node identified by the source argument.
@throws TransformerException if the source argument can not... | [
"Try",
"to",
"create",
"a",
"DOM",
"source",
"tree",
"from",
"the",
"input",
"source",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/SourceTreeManager.java#L300-L325 |
33,991 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java | UCaseProps.addCaseClosure | public final void addCaseClosure(int c, UnicodeSet set) {
/*
* Hardcode the case closure of i and its relatives and ignore the
* data file data for these characters.
* The Turkic dotless i and dotted I with their case mapping conditions
* and case folding option make the rela... | java | public final void addCaseClosure(int c, UnicodeSet set) {
/*
* Hardcode the case closure of i and its relatives and ignore the
* data file data for these characters.
* The Turkic dotless i and dotted I with their case mapping conditions
* and case folding option make the rela... | [
"public",
"final",
"void",
"addCaseClosure",
"(",
"int",
"c",
",",
"UnicodeSet",
"set",
")",
"{",
"/*\n * Hardcode the case closure of i and its relatives and ignore the\n * data file data for these characters.\n * The Turkic dotless i and dotted I with their case map... | Adds all simple case mappings and the full case folding for c to sa,
and also adds special case closure mappings.
c itself is not added.
For example, the mappings
- for s include long s
- for sharp s include ss
- for k include the Kelvin sign | [
"Adds",
"all",
"simple",
"case",
"mappings",
"and",
"the",
"full",
"case",
"folding",
"for",
"c",
"to",
"sa",
"and",
"also",
"adds",
"special",
"case",
"closure",
"mappings",
".",
"c",
"itself",
"is",
"not",
"added",
".",
"For",
"example",
"the",
"mappin... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java#L254-L362 |
33,992 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java | UCaseProps.addStringCaseClosure | public final boolean addStringCaseClosure(String s, UnicodeSet set) {
int i, length, start, limit, result, unfoldOffset, unfoldRows, unfoldRowWidth, unfoldStringWidth;
if(unfold==null || s==null) {
return false; /* no reverse case folding data, or no string */
}
length=s.len... | java | public final boolean addStringCaseClosure(String s, UnicodeSet set) {
int i, length, start, limit, result, unfoldOffset, unfoldRows, unfoldRowWidth, unfoldStringWidth;
if(unfold==null || s==null) {
return false; /* no reverse case folding data, or no string */
}
length=s.len... | [
"public",
"final",
"boolean",
"addStringCaseClosure",
"(",
"String",
"s",
",",
"UnicodeSet",
"set",
")",
"{",
"int",
"i",
",",
"length",
",",
"start",
",",
"limit",
",",
"result",
",",
"unfoldOffset",
",",
"unfoldRows",
",",
"unfoldRowWidth",
",",
"unfoldStr... | Maps the string to single code points and adds the associated case closure
mappings.
The string is mapped to code points if it is their full case folding string.
In other words, this performs a reverse full case folding and then
adds the case closure items of the resulting code points.
If the string is found and its cl... | [
"Maps",
"the",
"string",
"to",
"single",
"code",
"points",
"and",
"adds",
"the",
"associated",
"case",
"closure",
"mappings",
".",
"The",
"string",
"is",
"mapped",
"to",
"code",
"points",
"if",
"it",
"is",
"their",
"full",
"case",
"folding",
"string",
".",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java#L405-L459 |
33,993 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java | UCaseProps.getCaseLocale | private static final int getCaseLocale(String language) {
// Check the subtag length to reduce the number of comparisons
// for locales without special behavior.
// Fastpath for English "en" which is often used for default (=root locale) case mappings,
// and for Chinese "zh": Very commo... | java | private static final int getCaseLocale(String language) {
// Check the subtag length to reduce the number of comparisons
// for locales without special behavior.
// Fastpath for English "en" which is often used for default (=root locale) case mappings,
// and for Chinese "zh": Very commo... | [
"private",
"static",
"final",
"int",
"getCaseLocale",
"(",
"String",
"language",
")",
"{",
"// Check the subtag length to reduce the number of comparisons",
"// for locales without special behavior.",
"// Fastpath for English \"en\" which is often used for default (=root locale) case mapping... | Accepts both 2- and 3-letter language subtags. | [
"Accepts",
"both",
"2",
"-",
"and",
"3",
"-",
"letter",
"language",
"subtags",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java#L628-L657 |
33,994 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java | UCaseProps.toFullLower | public final int toFullLower(int c, ContextIterator iter, Appendable out, int caseLocale) {
int result, props;
result=c;
props=trie.get(c);
if(!propsHasException(props)) {
if(getTypeFromProps(props)>=UPPER) {
result=c+getDelta(props);
}
} ... | java | public final int toFullLower(int c, ContextIterator iter, Appendable out, int caseLocale) {
int result, props;
result=c;
props=trie.get(c);
if(!propsHasException(props)) {
if(getTypeFromProps(props)>=UPPER) {
result=c+getDelta(props);
}
} ... | [
"public",
"final",
"int",
"toFullLower",
"(",
"int",
"c",
",",
"ContextIterator",
"iter",
",",
"Appendable",
"out",
",",
"int",
"caseLocale",
")",
"{",
"int",
"result",
",",
"props",
";",
"result",
"=",
"c",
";",
"props",
"=",
"trie",
".",
"get",
"(",
... | Get the full lowercase mapping for c.
@param c Character to be mapped.
@param iter Character iterator, used for context-sensitive mappings.
See ContextIterator for details.
If iter==null then a context-independent result is returned.
@param out If the mapping result is a string, then it is appended to out.
@param case... | [
"Get",
"the",
"full",
"lowercase",
"mapping",
"for",
"c",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCaseProps.java#L824-L975 |
33,995 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java | TransliteratorRegistry.put | public void put(String ID,
Class<? extends Transliterator> transliteratorSubclass,
boolean visible) {
registerEntry(ID, transliteratorSubclass, visible);
} | java | public void put(String ID,
Class<? extends Transliterator> transliteratorSubclass,
boolean visible) {
registerEntry(ID, transliteratorSubclass, visible);
} | [
"public",
"void",
"put",
"(",
"String",
"ID",
",",
"Class",
"<",
"?",
"extends",
"Transliterator",
">",
"transliteratorSubclass",
",",
"boolean",
"visible",
")",
"{",
"registerEntry",
"(",
"ID",
",",
"transliteratorSubclass",
",",
"visible",
")",
";",
"}"
] | Register a class. This adds an entry to the
dynamic store, or replaces an existing entry. Any entry in the
underlying static locale resource store is masked. | [
"Register",
"a",
"class",
".",
"This",
"adds",
"an",
"entry",
"to",
"the",
"dynamic",
"store",
"or",
"replaces",
"an",
"existing",
"entry",
".",
"Any",
"entry",
"in",
"the",
"underlying",
"static",
"locale",
"resource",
"store",
"is",
"masked",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java#L322-L326 |
33,996 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java | TransliteratorRegistry.put | public void put(String ID,
Transliterator.Factory factory,
boolean visible) {
registerEntry(ID, factory, visible);
} | java | public void put(String ID,
Transliterator.Factory factory,
boolean visible) {
registerEntry(ID, factory, visible);
} | [
"public",
"void",
"put",
"(",
"String",
"ID",
",",
"Transliterator",
".",
"Factory",
"factory",
",",
"boolean",
"visible",
")",
"{",
"registerEntry",
"(",
"ID",
",",
"factory",
",",
"visible",
")",
";",
"}"
] | Register an ID and a factory function pointer. This adds an
entry to the dynamic store, or replaces an existing entry. Any
entry in the underlying static locale resource store is masked. | [
"Register",
"an",
"ID",
"and",
"a",
"factory",
"function",
"pointer",
".",
"This",
"adds",
"an",
"entry",
"to",
"the",
"dynamic",
"store",
"or",
"replaces",
"an",
"existing",
"entry",
".",
"Any",
"entry",
"in",
"the",
"underlying",
"static",
"locale",
"res... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java#L333-L337 |
33,997 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java | TransliteratorRegistry.put | public void put(String ID,
String resourceName,
int dir,
boolean visible) {
registerEntry(ID, new ResourceEntry(resourceName, dir), visible);
} | java | public void put(String ID,
String resourceName,
int dir,
boolean visible) {
registerEntry(ID, new ResourceEntry(resourceName, dir), visible);
} | [
"public",
"void",
"put",
"(",
"String",
"ID",
",",
"String",
"resourceName",
",",
"int",
"dir",
",",
"boolean",
"visible",
")",
"{",
"registerEntry",
"(",
"ID",
",",
"new",
"ResourceEntry",
"(",
"resourceName",
",",
"dir",
")",
",",
"visible",
")",
";",
... | Register an ID and a resource name. This adds an entry to the
dynamic store, or replaces an existing entry. Any entry in the
underlying static locale resource store is masked. | [
"Register",
"an",
"ID",
"and",
"a",
"resource",
"name",
".",
"This",
"adds",
"an",
"entry",
"to",
"the",
"dynamic",
"store",
"or",
"replaces",
"an",
"existing",
"entry",
".",
"Any",
"entry",
"in",
"the",
"underlying",
"static",
"locale",
"resource",
"store... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java#L344-L349 |
33,998 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java | TransliteratorRegistry.put | public void put(String ID,
String alias,
boolean visible) {
registerEntry(ID, new AliasEntry(alias), visible);
} | java | public void put(String ID,
String alias,
boolean visible) {
registerEntry(ID, new AliasEntry(alias), visible);
} | [
"public",
"void",
"put",
"(",
"String",
"ID",
",",
"String",
"alias",
",",
"boolean",
"visible",
")",
"{",
"registerEntry",
"(",
"ID",
",",
"new",
"AliasEntry",
"(",
"alias",
")",
",",
"visible",
")",
";",
"}"
] | Register an ID and an alias ID. This adds an entry to the
dynamic store, or replaces an existing entry. Any entry in the
underlying static locale resource store is masked. | [
"Register",
"an",
"ID",
"and",
"an",
"alias",
"ID",
".",
"This",
"adds",
"an",
"entry",
"to",
"the",
"dynamic",
"store",
"or",
"replaces",
"an",
"existing",
"entry",
".",
"Any",
"entry",
"in",
"the",
"underlying",
"static",
"locale",
"resource",
"store",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java#L356-L360 |
33,999 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java | TransliteratorRegistry.put | public void put(String ID,
Transliterator trans,
boolean visible) {
registerEntry(ID, trans, visible);
} | java | public void put(String ID,
Transliterator trans,
boolean visible) {
registerEntry(ID, trans, visible);
} | [
"public",
"void",
"put",
"(",
"String",
"ID",
",",
"Transliterator",
"trans",
",",
"boolean",
"visible",
")",
"{",
"registerEntry",
"(",
"ID",
",",
"trans",
",",
"visible",
")",
";",
"}"
] | Register an ID and a Transliterator object. This adds an entry
to the dynamic store, or replaces an existing entry. Any entry
in the underlying static locale resource store is masked. | [
"Register",
"an",
"ID",
"and",
"a",
"Transliterator",
"object",
".",
"This",
"adds",
"an",
"entry",
"to",
"the",
"dynamic",
"store",
"or",
"replaces",
"an",
"existing",
"entry",
".",
"Any",
"entry",
"in",
"the",
"underlying",
"static",
"locale",
"resource",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/TransliteratorRegistry.java#L367-L371 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.