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,500 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneAdapter.java | TimeZoneAdapter.wrap | public static java.util.TimeZone wrap(android.icu.util.TimeZone tz) {
return new TimeZoneAdapter(tz);
} | java | public static java.util.TimeZone wrap(android.icu.util.TimeZone tz) {
return new TimeZoneAdapter(tz);
} | [
"public",
"static",
"java",
".",
"util",
".",
"TimeZone",
"wrap",
"(",
"android",
".",
"icu",
".",
"util",
".",
"TimeZone",
"tz",
")",
"{",
"return",
"new",
"TimeZoneAdapter",
"(",
"tz",
")",
";",
"}"
] | Given a java.util.TimeZone, wrap it in the appropriate adapter
subclass of android.icu.util.TimeZone and return the adapter. | [
"Given",
"a",
"java",
".",
"util",
".",
"TimeZone",
"wrap",
"it",
"in",
"the",
"appropriate",
"adapter",
"subclass",
"of",
"android",
".",
"icu",
".",
"util",
".",
"TimeZone",
"and",
"return",
"the",
"adapter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneAdapter.java#L48-L50 |
33,501 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java | DTMDefaultBaseTraversers.getAxisTraverser | public DTMAxisTraverser getAxisTraverser(final int axis)
{
DTMAxisTraverser traverser;
if (null == m_traversers) // Cache of stateless traversers for this DTM
{
m_traversers = new DTMAxisTraverser[Axis.getNamesLength()];
traverser = null;
}
else
{
traverser = m_traversers[... | java | public DTMAxisTraverser getAxisTraverser(final int axis)
{
DTMAxisTraverser traverser;
if (null == m_traversers) // Cache of stateless traversers for this DTM
{
m_traversers = new DTMAxisTraverser[Axis.getNamesLength()];
traverser = null;
}
else
{
traverser = m_traversers[... | [
"public",
"DTMAxisTraverser",
"getAxisTraverser",
"(",
"final",
"int",
"axis",
")",
"{",
"DTMAxisTraverser",
"traverser",
";",
"if",
"(",
"null",
"==",
"m_traversers",
")",
"// Cache of stateless traversers for this DTM",
"{",
"m_traversers",
"=",
"new",
"DTMAxisTravers... | This returns a stateless "traverser", that can navigate
over an XPath axis, though perhaps not in document order.
@param axis One of Axes.ANCESTORORSELF, etc.
@return A DTMAxisTraverser, or null if the given axis isn't supported. | [
"This",
"returns",
"a",
"stateless",
"traverser",
"that",
"can",
"navigate",
"over",
"an",
"XPath",
"axis",
"though",
"perhaps",
"not",
"in",
"document",
"order",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java#L101-L195 |
33,502 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/SocketChannelImpl.java | SocketChannelImpl.translateReadyOps | public boolean translateReadyOps(int ops, int initialOps,
SelectionKeyImpl sk) {
int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
int oldOps = sk.nioReadyOps();
int newOps = initialOps;
if ((ops & PollArrayWrapper.POLLNVAL) != ... | java | public boolean translateReadyOps(int ops, int initialOps,
SelectionKeyImpl sk) {
int intOps = sk.nioInterestOps(); // Do this just once, it synchronizes
int oldOps = sk.nioReadyOps();
int newOps = initialOps;
if ((ops & PollArrayWrapper.POLLNVAL) != ... | [
"public",
"boolean",
"translateReadyOps",
"(",
"int",
"ops",
",",
"int",
"initialOps",
",",
"SelectionKeyImpl",
"sk",
")",
"{",
"int",
"intOps",
"=",
"sk",
".",
"nioInterestOps",
"(",
")",
";",
"// Do this just once, it synchronizes",
"int",
"oldOps",
"=",
"sk",... | Translates native poll revent ops into a ready operation ops | [
"Translates",
"native",
"poll",
"revent",
"ops",
"into",
"a",
"ready",
"operation",
"ops"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/nio/ch/SocketChannelImpl.java#L917-L959 |
33,503 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java | ToTextStream.comment | public void comment(String data) throws org.xml.sax.SAXException
{
final int length = data.length();
if (length > m_charsBuff.length)
{
m_charsBuff = new char[length*2 + 1];
}
data.getChars(0, length, m_charsBuff, 0);
comment(m_charsBuff, 0, length);
} | java | public void comment(String data) throws org.xml.sax.SAXException
{
final int length = data.length();
if (length > m_charsBuff.length)
{
m_charsBuff = new char[length*2 + 1];
}
data.getChars(0, length, m_charsBuff, 0);
comment(m_charsBuff, 0, length);
} | [
"public",
"void",
"comment",
"(",
"String",
"data",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"final",
"int",
"length",
"=",
"data",
".",
"length",
"(",
")",
";",
"if",
"(",
"length",
">",
"m_charsBuff",
".",
"length",
"... | Called when a Comment is to be constructed.
Note that Xalan will normally invoke the other version of this method.
%REVIEW% In fact, is this one ever needed, or was it a mistake?
@param data The comment data.
@throws org.xml.sax.SAXException Any SAX exception, possibly
wrapping another exception. | [
"Called",
"when",
"a",
"Comment",
"is",
"to",
"be",
"constructed",
".",
"Note",
"that",
"Xalan",
"will",
"normally",
"invoke",
"the",
"other",
"version",
"of",
"this",
"method",
".",
"%REVIEW%",
"In",
"fact",
"is",
"this",
"one",
"ever",
"needed",
"or",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToTextStream.java#L470-L479 |
33,504 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java | FileHandler.openFiles | private void openFiles() throws IOException {
LogManager manager = LogManager.getLogManager();
manager.checkPermission();
if (count < 1) {
throw new IllegalArgumentException("file count = " + count);
}
if (limit < 0) {
limit = 0;
}
// We re... | java | private void openFiles() throws IOException {
LogManager manager = LogManager.getLogManager();
manager.checkPermission();
if (count < 1) {
throw new IllegalArgumentException("file count = " + count);
}
if (limit < 0) {
limit = 0;
}
// We re... | [
"private",
"void",
"openFiles",
"(",
")",
"throws",
"IOException",
"{",
"LogManager",
"manager",
"=",
"LogManager",
".",
"getLogManager",
"(",
")",
";",
"manager",
".",
"checkPermission",
"(",
")",
";",
"if",
"(",
"count",
"<",
"1",
")",
"{",
"throw",
"n... | configured instance variables. | [
"configured",
"instance",
"variables",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java#L369-L461 |
33,505 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java | FileHandler.generate | private File generate(String pattern, int generation, int unique) throws IOException {
File file = null;
String word = "";
int ix = 0;
boolean sawg = false;
boolean sawu = false;
while (ix < pattern.length()) {
char ch = pattern.charAt(ix);
ix++;
... | java | private File generate(String pattern, int generation, int unique) throws IOException {
File file = null;
String word = "";
int ix = 0;
boolean sawg = false;
boolean sawu = false;
while (ix < pattern.length()) {
char ch = pattern.charAt(ix);
ix++;
... | [
"private",
"File",
"generate",
"(",
"String",
"pattern",
",",
"int",
"generation",
",",
"int",
"unique",
")",
"throws",
"IOException",
"{",
"File",
"file",
"=",
"null",
";",
"String",
"word",
"=",
"\"\"",
";",
"int",
"ix",
"=",
"0",
";",
"boolean",
"sa... | Generate a filename from a pattern. | [
"Generate",
"a",
"filename",
"from",
"a",
"pattern",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java#L464-L539 |
33,506 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java | FileHandler.rotate | private synchronized void rotate() {
Level oldLevel = getLevel();
setLevel(Level.OFF);
super.close();
for (int i = count-2; i >= 0; i--) {
File f1 = files[i];
File f2 = files[i+1];
if (f1.exists()) {
if (f2.exists()) {
... | java | private synchronized void rotate() {
Level oldLevel = getLevel();
setLevel(Level.OFF);
super.close();
for (int i = count-2; i >= 0; i--) {
File f1 = files[i];
File f2 = files[i+1];
if (f1.exists()) {
if (f2.exists()) {
... | [
"private",
"synchronized",
"void",
"rotate",
"(",
")",
"{",
"Level",
"oldLevel",
"=",
"getLevel",
"(",
")",
";",
"setLevel",
"(",
"Level",
".",
"OFF",
")",
";",
"super",
".",
"close",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"count",
"-",
"2",
... | Rotate the set of output files | [
"Rotate",
"the",
"set",
"of",
"output",
"files"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java#L542-L566 |
33,507 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java | FileHandler.close | public synchronized void close() throws SecurityException {
super.close();
// Unlock any lock file.
if (lockFileName == null) {
return;
}
try {
// Closing the lock file's FileOutputStream will close
// the underlying channel and free any locks.... | java | public synchronized void close() throws SecurityException {
super.close();
// Unlock any lock file.
if (lockFileName == null) {
return;
}
try {
// Closing the lock file's FileOutputStream will close
// the underlying channel and free any locks.... | [
"public",
"synchronized",
"void",
"close",
"(",
")",
"throws",
"SecurityException",
"{",
"super",
".",
"close",
"(",
")",
";",
"// Unlock any lock file.",
"if",
"(",
"lockFileName",
"==",
"null",
")",
"{",
"return",
";",
"}",
"try",
"{",
"// Closing the lock f... | Close all the files.
@exception SecurityException if a security manager exists and if
the caller does not have <tt>LoggingPermission("control")</tt>. | [
"Close",
"all",
"the",
"files",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/logging/FileHandler.java#L604-L623 |
33,508 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/BASE64Decoder.java | BASE64Decoder.decodeAtom | protected void decodeAtom(PushbackInputStream inStream, OutputStream outStream, int rem)
throws java.io.IOException
{
int i;
byte a = -1, b = -1, c = -1, d = -1;
if (rem < 2) {
throw new CEFormatException("BASE64Decoder: Not enough bytes for an atom.");
}
... | java | protected void decodeAtom(PushbackInputStream inStream, OutputStream outStream, int rem)
throws java.io.IOException
{
int i;
byte a = -1, b = -1, c = -1, d = -1;
if (rem < 2) {
throw new CEFormatException("BASE64Decoder: Not enough bytes for an atom.");
}
... | [
"protected",
"void",
"decodeAtom",
"(",
"PushbackInputStream",
"inStream",
",",
"OutputStream",
"outStream",
",",
"int",
"rem",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"int",
"i",
";",
"byte",
"a",
"=",
"-",
"1",
",",
"b",
"=",
"-",
... | Decode one BASE64 atom into 1, 2, or 3 bytes of data. | [
"Decode",
"one",
"BASE64",
"atom",
"into",
"1",
"2",
"or",
"3",
"bytes",
"of",
"data",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/BASE64Decoder.java#L105-L161 |
33,509 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedReader.java | PipedReader.receive | synchronized void receive(int c) throws IOException {
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByWriter || closedByReader) {
throw new IOException("Pipe closed");
} else if (readSide != null && !readSide.isAlive()) {
thro... | java | synchronized void receive(int c) throws IOException {
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByWriter || closedByReader) {
throw new IOException("Pipe closed");
} else if (readSide != null && !readSide.isAlive()) {
thro... | [
"synchronized",
"void",
"receive",
"(",
"int",
"c",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"connected",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Pipe not connected\"",
")",
";",
"}",
"else",
"if",
"(",
"closedByWriter",
"||",
"closedByRea... | Receives a char of data. This method will block if no input is
available. | [
"Receives",
"a",
"char",
"of",
"data",
".",
"This",
"method",
"will",
"block",
"if",
"no",
"input",
"is",
"available",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedReader.java#L168-L198 |
33,510 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedReader.java | PipedReader.ready | public synchronized boolean ready() throws IOException {
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByReader) {
throw new IOException("Pipe closed");
} else if (writeSide != null && !writeSide.isAlive()
&& !closedByW... | java | public synchronized boolean ready() throws IOException {
if (!connected) {
throw new IOException("Pipe not connected");
} else if (closedByReader) {
throw new IOException("Pipe closed");
} else if (writeSide != null && !writeSide.isAlive()
&& !closedByW... | [
"public",
"synchronized",
"boolean",
"ready",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"connected",
")",
"{",
"throw",
"new",
"IOException",
"(",
"\"Pipe not connected\"",
")",
";",
"}",
"else",
"if",
"(",
"closedByReader",
")",
"{",
"throw",
... | Tell whether this stream is ready to be read. A piped character
stream is ready if the circular buffer is not empty.
@exception IOException if the pipe is
<a href=PipedInputStream.html#BROKEN> <code>broken</code></a>,
{@link #connect(java.io.PipedWriter) unconnected}, or closed. | [
"Tell",
"whether",
"this",
"stream",
"is",
"ready",
"to",
"be",
"read",
".",
"A",
"piped",
"character",
"stream",
"is",
"ready",
"if",
"the",
"circular",
"buffer",
"is",
"not",
"empty",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/PipedReader.java#L336-L350 |
33,511 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java | DTMManagerDefault.addDTM | synchronized public void addDTM(DTM dtm, int id, int offset)
{
if(id>=IDENT_MAX_DTMS)
{
// TODO: %REVIEW% Not really the right error message.
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); //"No more DTM IDs are available!");
}
// We used to ju... | java | synchronized public void addDTM(DTM dtm, int id, int offset)
{
if(id>=IDENT_MAX_DTMS)
{
// TODO: %REVIEW% Not really the right error message.
throw new DTMException(XMLMessages.createXMLMessage(XMLErrorResources.ER_NO_DTMIDS_AVAIL, null)); //"No more DTM IDs are available!");
}
// We used to ju... | [
"synchronized",
"public",
"void",
"addDTM",
"(",
"DTM",
"dtm",
",",
"int",
"id",
",",
"int",
"offset",
")",
"{",
"if",
"(",
"id",
">=",
"IDENT_MAX_DTMS",
")",
"{",
"// TODO: %REVIEW% Not really the right error message.",
"throw",
"new",
"DTMException",
"(",
"XML... | Add a DTM to the DTM table.
@param dtm Should be a valid reference to a DTM.
@param id Integer DTM ID to be bound to this DTM.
@param offset Integer addressing offset. The internal DTM Node ID is
obtained by adding this offset to the node-number field of the
public DTM Handle. For the first DTM ID accessing each DTM, ... | [
"Add",
"a",
"DTM",
"to",
"the",
"DTM",
"table",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java#L143-L179 |
33,512 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java | DTMManagerDefault.getFirstFreeDTMID | synchronized public int getFirstFreeDTMID()
{
int n = m_dtms.length;
for (int i = 1; i < n; i++)
{
if(null == m_dtms[i])
{
return i;
}
}
return n; // count on addDTM() to throw exception if out of range
} | java | synchronized public int getFirstFreeDTMID()
{
int n = m_dtms.length;
for (int i = 1; i < n; i++)
{
if(null == m_dtms[i])
{
return i;
}
}
return n; // count on addDTM() to throw exception if out of range
} | [
"synchronized",
"public",
"int",
"getFirstFreeDTMID",
"(",
")",
"{",
"int",
"n",
"=",
"m_dtms",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"1",
";",
"i",
"<",
"n",
";",
"i",
"++",
")",
"{",
"if",
"(",
"null",
"==",
"m_dtms",
"[",
"i",
"]"... | Get the first free DTM ID available. %OPT% Linear search is inefficient! | [
"Get",
"the",
"first",
"free",
"DTM",
"ID",
"available",
".",
"%OPT%",
"Linear",
"search",
"is",
"inefficient!"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java#L184-L195 |
33,513 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java | DTMManagerDefault.getDTM | synchronized public DTM getDTM(int nodeHandle)
{
try
{
// Performance critical function.
return m_dtms[nodeHandle >>> IDENT_DTM_NODE_BITS];
}
catch(java.lang.ArrayIndexOutOfBoundsException e)
{
if(nodeHandle==DTM.NULL)
return null; // Accept as a special case.
else
... | java | synchronized public DTM getDTM(int nodeHandle)
{
try
{
// Performance critical function.
return m_dtms[nodeHandle >>> IDENT_DTM_NODE_BITS];
}
catch(java.lang.ArrayIndexOutOfBoundsException e)
{
if(nodeHandle==DTM.NULL)
return null; // Accept as a special case.
else
... | [
"synchronized",
"public",
"DTM",
"getDTM",
"(",
"int",
"nodeHandle",
")",
"{",
"try",
"{",
"// Performance critical function.",
"return",
"m_dtms",
"[",
"nodeHandle",
">>>",
"IDENT_DTM_NODE_BITS",
"]",
";",
"}",
"catch",
"(",
"java",
".",
"lang",
".",
"ArrayInde... | Return the DTM object containing a representation of this node.
@param nodeHandle DTM Handle indicating which node to retrieve
@return a reference to the DTM object containing this node. | [
"Return",
"the",
"DTM",
"object",
"containing",
"a",
"representation",
"of",
"this",
"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/DTMManagerDefault.java#L643-L657 |
33,514 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java | DTMManagerDefault.getDTMIdentity | synchronized public int getDTMIdentity(DTM dtm)
{
// Shortcut using DTMDefaultBase's extension hooks
// %REVIEW% Should the lookup be part of the basic DTM API?
if(dtm instanceof DTMDefaultBase)
{
DTMDefaultBase dtmdb=(DTMDefaultBase)dtm;
if(dtmdb.getManager()==this)
return dtmdb.getDTMIDs().elementAt(0);
... | java | synchronized public int getDTMIdentity(DTM dtm)
{
// Shortcut using DTMDefaultBase's extension hooks
// %REVIEW% Should the lookup be part of the basic DTM API?
if(dtm instanceof DTMDefaultBase)
{
DTMDefaultBase dtmdb=(DTMDefaultBase)dtm;
if(dtmdb.getManager()==this)
return dtmdb.getDTMIDs().elementAt(0);
... | [
"synchronized",
"public",
"int",
"getDTMIdentity",
"(",
"DTM",
"dtm",
")",
"{",
"// Shortcut using DTMDefaultBase's extension hooks",
"// %REVIEW% Should the lookup be part of the basic DTM API?",
"if",
"(",
"dtm",
"instanceof",
"DTMDefaultBase",
")",
"{",
"DTMDefaultBase",
"dt... | Given a DTM, find the ID number in the DTM tables which addresses
the start of the document. If overflow addressing is in use, other
DTM IDs may also be assigned to this DTM.
@param dtm The DTM which (hopefully) contains this node.
@return The DTM ID (as the high bits of a NodeHandle, not as our
internal index), or -... | [
"Given",
"a",
"DTM",
"find",
"the",
"ID",
"number",
"in",
"the",
"DTM",
"tables",
"which",
"addresses",
"the",
"start",
"of",
"the",
"document",
".",
"If",
"overflow",
"addressing",
"is",
"in",
"use",
"other",
"DTM",
"IDs",
"may",
"also",
"be",
"assigned... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java#L669-L693 |
33,515 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExtensionHandler.java | ExtensionHandler.getClassForName | static Class getClassForName(String className)
throws ClassNotFoundException
{
// Hack for backwards compatibility with XalanJ1 stylesheets
if(className.equals("org.apache.xalan.xslt.extensions.Redirect")) {
className = "org.apache.xalan.lib.Redirect";
}
return ObjectFactory.findProviderC... | java | static Class getClassForName(String className)
throws ClassNotFoundException
{
// Hack for backwards compatibility with XalanJ1 stylesheets
if(className.equals("org.apache.xalan.xslt.extensions.Redirect")) {
className = "org.apache.xalan.lib.Redirect";
}
return ObjectFactory.findProviderC... | [
"static",
"Class",
"getClassForName",
"(",
"String",
"className",
")",
"throws",
"ClassNotFoundException",
"{",
"// Hack for backwards compatibility with XalanJ1 stylesheets",
"if",
"(",
"className",
".",
"equals",
"(",
"\"org.apache.xalan.xslt.extensions.Redirect\"",
")",
")",... | This method loads a class using the context class loader if we're
running under Java2 or higher.
@param className Name of the class to load | [
"This",
"method",
"loads",
"a",
"class",
"using",
"the",
"context",
"class",
"loader",
"if",
"we",
"re",
"running",
"under",
"Java2",
"or",
"higher",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/extensions/ExtensionHandler.java#L57-L67 |
33,516 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/BMPSet.java | BMPSet.set32x64Bits | private static void set32x64Bits(int[] table, int start, int limit) {
assert (64 == table.length);
int lead = start >> 6; // Named for UTF-8 2-byte lead byte with upper 5 bits.
int trail = start & 0x3f; // Named for UTF-8 2-byte trail byte with lower 6 bits.
// Set one bit indicating ... | java | private static void set32x64Bits(int[] table, int start, int limit) {
assert (64 == table.length);
int lead = start >> 6; // Named for UTF-8 2-byte lead byte with upper 5 bits.
int trail = start & 0x3f; // Named for UTF-8 2-byte trail byte with lower 6 bits.
// Set one bit indicating ... | [
"private",
"static",
"void",
"set32x64Bits",
"(",
"int",
"[",
"]",
"table",
",",
"int",
"start",
",",
"int",
"limit",
")",
"{",
"assert",
"(",
"64",
"==",
"table",
".",
"length",
")",
";",
"int",
"lead",
"=",
"start",
">>",
"6",
";",
"// Named for UT... | Set bits in a bit rectangle in "vertical" bit organization. start<limit<=0x800 | [
"Set",
"bits",
"in",
"a",
"bit",
"rectangle",
"in",
"vertical",
"bit",
"organization",
".",
"start<limit<",
"=",
"0x800"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/BMPSet.java#L330-L378 |
33,517 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/Certificate.java | Certificate.writeReplace | protected Object writeReplace() throws java.io.ObjectStreamException {
try {
return new CertificateRep(type, getEncoded());
} catch (CertificateException e) {
throw new java.io.NotSerializableException
("java.security.cert.Certificate: " +
... | java | protected Object writeReplace() throws java.io.ObjectStreamException {
try {
return new CertificateRep(type, getEncoded());
} catch (CertificateException e) {
throw new java.io.NotSerializableException
("java.security.cert.Certificate: " +
... | [
"protected",
"Object",
"writeReplace",
"(",
")",
"throws",
"java",
".",
"io",
".",
"ObjectStreamException",
"{",
"try",
"{",
"return",
"new",
"CertificateRep",
"(",
"type",
",",
"getEncoded",
"(",
")",
")",
";",
"}",
"catch",
"(",
"CertificateException",
"e"... | Replace the Certificate to be serialized.
@return the alternate Certificate object to be serialized
@throws java.io.ObjectStreamException if a new object representing
this Certificate could not be created
@since 1.3 | [
"Replace",
"the",
"Certificate",
"to",
"be",
"serialized",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/Certificate.java#L296-L306 |
33,518 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/libcore/net/url/JarURLConnectionImpl.java | JarURLConnectionImpl.getInputStream | @Override
public InputStream getInputStream() throws IOException {
if (closed) {
throw new IllegalStateException("JarURLConnection InputStream has been closed");
}
connect();
if (jarInput != null) {
return jarInput;
}
if (jarEntry == null) {
... | java | @Override
public InputStream getInputStream() throws IOException {
if (closed) {
throw new IllegalStateException("JarURLConnection InputStream has been closed");
}
connect();
if (jarInput != null) {
return jarInput;
}
if (jarEntry == null) {
... | [
"@",
"Override",
"public",
"InputStream",
"getInputStream",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"closed",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"JarURLConnection InputStream has been closed\"",
")",
";",
"}",
"connect",
"(",
")",
... | Creates an input stream for reading from this URL Connection.
@return the input stream
@throws IOException
if an IO error occurs while connecting to the resource. | [
"Creates",
"an",
"input",
"stream",
"for",
"reading",
"from",
"this",
"URL",
"Connection",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/net/url/JarURLConnectionImpl.java#L210-L224 |
33,519 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RFC822Name.java | RFC822Name.subtreeDepth | public int subtreeDepth() throws UnsupportedOperationException {
String subtree=name;
int i=1;
/* strip off name@ portion */
int atNdx = subtree.lastIndexOf('@');
if (atNdx >= 0) {
i++;
subtree=subtree.substring(atNdx+1);
}
/* count dots ... | java | public int subtreeDepth() throws UnsupportedOperationException {
String subtree=name;
int i=1;
/* strip off name@ portion */
int atNdx = subtree.lastIndexOf('@');
if (atNdx >= 0) {
i++;
subtree=subtree.substring(atNdx+1);
}
/* count dots ... | [
"public",
"int",
"subtreeDepth",
"(",
")",
"throws",
"UnsupportedOperationException",
"{",
"String",
"subtree",
"=",
"name",
";",
"int",
"i",
"=",
"1",
";",
"/* strip off name@ portion */",
"int",
"atNdx",
"=",
"subtree",
".",
"lastIndexOf",
"(",
"'",
"'",
")"... | Return subtree depth of this name for purposes of determining
NameConstraints minimum and maximum bounds.
@returns distance of name from root
@throws UnsupportedOperationException if not supported for this name type | [
"Return",
"subtree",
"depth",
"of",
"this",
"name",
"for",
"purposes",
"of",
"determining",
"NameConstraints",
"minimum",
"and",
"maximum",
"bounds",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/RFC822Name.java#L238-L255 |
33,520 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java | Locale.getISO3Country | public String getISO3Country() throws MissingResourceException {
// Android changed: Use.getIso3Country. Also return "" for missing regions.
final String region = baseLocale.getRegion();
// Note that this will return an UN.M49 region code
if (region.length() == 3) {
return ba... | java | public String getISO3Country() throws MissingResourceException {
// Android changed: Use.getIso3Country. Also return "" for missing regions.
final String region = baseLocale.getRegion();
// Note that this will return an UN.M49 region code
if (region.length() == 3) {
return ba... | [
"public",
"String",
"getISO3Country",
"(",
")",
"throws",
"MissingResourceException",
"{",
"// Android changed: Use.getIso3Country. Also return \"\" for missing regions.",
"final",
"String",
"region",
"=",
"baseLocale",
".",
"getRegion",
"(",
")",
";",
"// Note that this will r... | Returns a three-letter abbreviation for this locale's country.
If the country matches an ISO 3166-1 alpha-2 code, the
corresponding ISO 3166-1 alpha-3 uppercase code is returned.
If the locale doesn't specify a country, this will be the empty
string.
<p>The ISO 3166-1 codes can be found on-line.
@return A three-lette... | [
"Returns",
"a",
"three",
"-",
"letter",
"abbreviation",
"for",
"this",
"locale",
"s",
"country",
".",
"If",
"the",
"country",
"matches",
"an",
"ISO",
"3166",
"-",
"1",
"alpha",
"-",
"2",
"code",
"the",
"corresponding",
"ISO",
"3166",
"-",
"1",
"alpha",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java#L1575-L1592 |
33,521 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java | Locale.isUnM49AreaCode | private static boolean isUnM49AreaCode(String code) {
if (code.length() != 3) {
return false;
}
for (int i = 0; i < 3; ++i) {
final char character = code.charAt(i);
if (!(character >= '0' && character <= '9')) {
return false;
}
... | java | private static boolean isUnM49AreaCode(String code) {
if (code.length() != 3) {
return false;
}
for (int i = 0; i < 3; ++i) {
final char character = code.charAt(i);
if (!(character >= '0' && character <= '9')) {
return false;
}
... | [
"private",
"static",
"boolean",
"isUnM49AreaCode",
"(",
"String",
"code",
")",
"{",
"if",
"(",
"code",
".",
"length",
"(",
")",
"!=",
"3",
")",
"{",
"return",
"false",
";",
"}",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"3",
";",
"++",
"... | A UN M.49 is a 3 digit numeric code. | [
"A",
"UN",
"M",
".",
"49",
"is",
"a",
"3",
"digit",
"numeric",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java#L1786-L1799 |
33,522 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java | Locale.formatList | private static String formatList(String[] stringList, String listPattern, String listCompositionPattern) {
// If we have no list patterns, compose the list in a simple,
// non-localized way.
if (listPattern == null || listCompositionPattern == null) {
StringBuffer result = new String... | java | private static String formatList(String[] stringList, String listPattern, String listCompositionPattern) {
// If we have no list patterns, compose the list in a simple,
// non-localized way.
if (listPattern == null || listCompositionPattern == null) {
StringBuffer result = new String... | [
"private",
"static",
"String",
"formatList",
"(",
"String",
"[",
"]",
"stringList",
",",
"String",
"listPattern",
",",
"String",
"listCompositionPattern",
")",
"{",
"// If we have no list patterns, compose the list in a simple,",
"// non-localized way.",
"if",
"(",
"listPat... | Format a list using given pattern strings.
If either of the patterns is null, then a the list is
formatted by concatenation with the delimiter ','.
@param stringList the list of strings to be formatted.
@param listPattern should create a MessageFormat taking 0-3 arguments
and formatting them into a list.
@param listCom... | [
"Format",
"a",
"list",
"using",
"given",
"pattern",
"strings",
".",
"If",
"either",
"of",
"the",
"patterns",
"is",
"null",
"then",
"a",
"the",
"list",
"is",
"formatted",
"by",
"concatenation",
"with",
"the",
"delimiter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java#L2045-L2071 |
33,523 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java | Locale.composeList | private static String[] composeList(MessageFormat format, String[] list) {
if (list.length <= 3) return list;
// Use the given format to compose the first two elements into one
String[] listItems = { list[0], list[1] };
String newItem = format.format(listItems);
// Form a new l... | java | private static String[] composeList(MessageFormat format, String[] list) {
if (list.length <= 3) return list;
// Use the given format to compose the first two elements into one
String[] listItems = { list[0], list[1] };
String newItem = format.format(listItems);
// Form a new l... | [
"private",
"static",
"String",
"[",
"]",
"composeList",
"(",
"MessageFormat",
"format",
",",
"String",
"[",
"]",
"list",
")",
"{",
"if",
"(",
"list",
".",
"length",
"<=",
"3",
")",
"return",
"list",
";",
"// Use the given format to compose the first two elements... | Given a list of strings, return a list shortened to three elements.
Shorten it by applying the given format to the first two elements
recursively.
@param format a format which takes two arguments
@param list a list of strings
@return if the list is three elements or shorter, the same list;
otherwise, a new list of thre... | [
"Given",
"a",
"list",
"of",
"strings",
"return",
"a",
"list",
"shortened",
"to",
"three",
"elements",
".",
"Shorten",
"it",
"by",
"applying",
"the",
"given",
"format",
"to",
"the",
"first",
"two",
"elements",
"recursively",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Locale.java#L2082-L2096 |
33,524 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/HttpCookie.java | HttpCookie.hasExpired | public boolean hasExpired() {
if (maxAge == 0) return true;
// if not specify max-age, this cookie should be
// discarded when user agent is to be closed, but
// it is not expired.
if (maxAge == MAX_AGE_UNSPECIFIED) return false;
long deltaSecond = (System.currentTimeMi... | java | public boolean hasExpired() {
if (maxAge == 0) return true;
// if not specify max-age, this cookie should be
// discarded when user agent is to be closed, but
// it is not expired.
if (maxAge == MAX_AGE_UNSPECIFIED) return false;
long deltaSecond = (System.currentTimeMi... | [
"public",
"boolean",
"hasExpired",
"(",
")",
"{",
"if",
"(",
"maxAge",
"==",
"0",
")",
"return",
"true",
";",
"// if not specify max-age, this cookie should be",
"// discarded when user agent is to be closed, but",
"// it is not expired.",
"if",
"(",
"maxAge",
"==",
"MAX_... | Reports whether this http cookie has expired or not.
@return <tt>true</tt> to indicate this http cookie has expired;
otherwise, <tt>false</tt> | [
"Reports",
"whether",
"this",
"http",
"cookie",
"has",
"expired",
"or",
"not",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/HttpCookie.java#L280-L293 |
33,525 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java | StringToIntTable.put | public final void put(String key, int value)
{
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
String newMap[] = new String[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
int newValues[] = new int[m_mapSize];
System... | java | public final void put(String key, int value)
{
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
String newMap[] = new String[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
int newValues[] = new int[m_mapSize];
System... | [
"public",
"final",
"void",
"put",
"(",
"String",
"key",
",",
"int",
"value",
")",
"{",
"if",
"(",
"(",
"m_firstFree",
"+",
"1",
")",
">=",
"m_mapSize",
")",
"{",
"m_mapSize",
"+=",
"m_blocksize",
";",
"String",
"newMap",
"[",
"]",
"=",
"new",
"String... | Append a string onto the vector.
@param key String to append
@param value The int value of the string | [
"Append",
"a",
"string",
"onto",
"the",
"vector",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java#L100-L124 |
33,526 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java | StringToIntTable.keys | public final String[] keys()
{
String [] keysArr = new String[m_firstFree];
for (int i = 0; i < m_firstFree; i++)
{
keysArr[i] = m_map[i];
}
return keysArr;
} | java | public final String[] keys()
{
String [] keysArr = new String[m_firstFree];
for (int i = 0; i < m_firstFree; i++)
{
keysArr[i] = m_map[i];
}
return keysArr;
} | [
"public",
"final",
"String",
"[",
"]",
"keys",
"(",
")",
"{",
"String",
"[",
"]",
"keysArr",
"=",
"new",
"String",
"[",
"m_firstFree",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"m_firstFree",
";",
"i",
"++",
")",
"{",
"keysArr",
... | Return array of keys in the table.
@return Array of strings | [
"Return",
"array",
"of",
"keys",
"in",
"the",
"table",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java#L192-L202 |
33,527 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java | PolicyChecker.init | @Override
public void init(boolean forward) throws CertPathValidatorException {
if (forward) {
throw new CertPathValidatorException
("forward checking not supported");
}
certIndex = 1;
explicitPolicy = (expPolicyRequired ? 0 : cert... | java | @Override
public void init(boolean forward) throws CertPathValidatorException {
if (forward) {
throw new CertPathValidatorException
("forward checking not supported");
}
certIndex = 1;
explicitPolicy = (expPolicyRequired ? 0 : cert... | [
"@",
"Override",
"public",
"void",
"init",
"(",
"boolean",
"forward",
")",
"throws",
"CertPathValidatorException",
"{",
"if",
"(",
"forward",
")",
"{",
"throw",
"new",
"CertPathValidatorException",
"(",
"\"forward checking not supported\"",
")",
";",
"}",
"certIndex... | Initializes the internal state of the checker from parameters
specified in the constructor
@param forward a boolean indicating whether this checker should be
initialized capable of building in the forward direction
@throws CertPathValidatorException if user wants to enable forward
checking and forward checking is not ... | [
"Initializes",
"the",
"internal",
"state",
"of",
"the",
"checker",
"from",
"parameters",
"specified",
"in",
"the",
"constructor"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java#L118-L129 |
33,528 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java | PolicyChecker.check | @Override
public void check(Certificate cert, Collection<String> unresCritExts)
throws CertPathValidatorException
{
// now do the policy checks
checkPolicy((X509Certificate) cert);
if (unresCritExts != null && !unresCritExts.isEmpty()) {
unresCritExts.remove(Certific... | java | @Override
public void check(Certificate cert, Collection<String> unresCritExts)
throws CertPathValidatorException
{
// now do the policy checks
checkPolicy((X509Certificate) cert);
if (unresCritExts != null && !unresCritExts.isEmpty()) {
unresCritExts.remove(Certific... | [
"@",
"Override",
"public",
"void",
"check",
"(",
"Certificate",
"cert",
",",
"Collection",
"<",
"String",
">",
"unresCritExts",
")",
"throws",
"CertPathValidatorException",
"{",
"// now do the policy checks",
"checkPolicy",
"(",
"(",
"X509Certificate",
")",
"cert",
... | Performs the policy processing checks on the certificate using its
internal state.
@param cert the Certificate to be processed
@param unresCritExts the unresolved critical extensions
@throws CertPathValidatorException if the certificate does not verify | [
"Performs",
"the",
"policy",
"processing",
"checks",
"on",
"the",
"certificate",
"using",
"its",
"internal",
"state",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java#L175-L188 |
33,529 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java | PolicyChecker.checkPolicy | private void checkPolicy(X509Certificate currCert)
throws CertPathValidatorException
{
String msg = "certificate policies";
if (debug != null) {
debug.println("PolicyChecker.checkPolicy() ---checking " + msg
+ "...");
debug.println("PolicyChecker.check... | java | private void checkPolicy(X509Certificate currCert)
throws CertPathValidatorException
{
String msg = "certificate policies";
if (debug != null) {
debug.println("PolicyChecker.checkPolicy() ---checking " + msg
+ "...");
debug.println("PolicyChecker.check... | [
"private",
"void",
"checkPolicy",
"(",
"X509Certificate",
"currCert",
")",
"throws",
"CertPathValidatorException",
"{",
"String",
"msg",
"=",
"\"certificate policies\"",
";",
"if",
"(",
"debug",
"!=",
"null",
")",
"{",
"debug",
".",
"println",
"(",
"\"PolicyChecke... | Internal method to run through all the checks.
@param currCert the certificate to be processed
@exception CertPathValidatorException Exception thrown if
the certificate does not verify | [
"Internal",
"method",
"to",
"run",
"through",
"all",
"the",
"checks",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java#L197-L250 |
33,530 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java | PolicyChecker.mergeInhibitAnyPolicy | static int mergeInhibitAnyPolicy(int inhibitAnyPolicy,
X509CertImpl currCert) throws CertPathValidatorException
{
if ((inhibitAnyPolicy > 0) && !X509CertImpl.isSelfIssued(currCert)) {
inhibitAnyPolicy--;
}
try {
InhibitAnyPolicyExtension inhAnyPolExt = (Inhib... | java | static int mergeInhibitAnyPolicy(int inhibitAnyPolicy,
X509CertImpl currCert) throws CertPathValidatorException
{
if ((inhibitAnyPolicy > 0) && !X509CertImpl.isSelfIssued(currCert)) {
inhibitAnyPolicy--;
}
try {
InhibitAnyPolicyExtension inhAnyPolExt = (Inhib... | [
"static",
"int",
"mergeInhibitAnyPolicy",
"(",
"int",
"inhibitAnyPolicy",
",",
"X509CertImpl",
"currCert",
")",
"throws",
"CertPathValidatorException",
"{",
"if",
"(",
"(",
"inhibitAnyPolicy",
">",
"0",
")",
"&&",
"!",
"X509CertImpl",
".",
"isSelfIssued",
"(",
"cu... | Merges the specified inhibitAnyPolicy value with the
SkipCerts value of the InhibitAnyPolicy
extension obtained from the certificate.
@param inhibitAnyPolicy an integer which indicates whether
"any-policy" is considered a match
@param currCert the Certificate to be processed
@return returns the new inhibitAnyPolicy va... | [
"Merges",
"the",
"specified",
"inhibitAnyPolicy",
"value",
"with",
"the",
"SkipCerts",
"value",
"of",
"the",
"InhibitAnyPolicy",
"extension",
"obtained",
"from",
"the",
"certificate",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java#L368-L402 |
33,531 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java | PolicyChecker.removeInvalidNodes | private static PolicyNodeImpl removeInvalidNodes(PolicyNodeImpl rootNode,
int certIndex, Set<String> initPolicies,
CertificatePoliciesExtension currCertPolicies)
throws CertPathValidatorException
{
List<PolicyInformation> policyInfo = null;
try {
policyInfo = curr... | java | private static PolicyNodeImpl removeInvalidNodes(PolicyNodeImpl rootNode,
int certIndex, Set<String> initPolicies,
CertificatePoliciesExtension currCertPolicies)
throws CertPathValidatorException
{
List<PolicyInformation> policyInfo = null;
try {
policyInfo = curr... | [
"private",
"static",
"PolicyNodeImpl",
"removeInvalidNodes",
"(",
"PolicyNodeImpl",
"rootNode",
",",
"int",
"certIndex",
",",
"Set",
"<",
"String",
">",
"initPolicies",
",",
"CertificatePoliciesExtension",
"currCertPolicies",
")",
"throws",
"CertPathValidatorException",
"... | Removes those nodes which do not intersect with the initial policies
specified by the user.
@param rootNode the root node of the valid policy tree
@param certIndex the index of the certificate being processed
@param initPolicies the Set of policies required by the user
@param currCertPolicies the CertificatePoliciesEx... | [
"Removes",
"those",
"nodes",
"which",
"do",
"not",
"intersect",
"with",
"the",
"initial",
"policies",
"specified",
"by",
"the",
"user",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java#L855-L905 |
33,532 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java | PolicyChecker.getPolicyTree | PolicyNode getPolicyTree() {
if (rootNode == null)
return null;
else {
PolicyNodeImpl policyTree = rootNode.copyTree();
policyTree.setImmutable();
return policyTree;
}
} | java | PolicyNode getPolicyTree() {
if (rootNode == null)
return null;
else {
PolicyNodeImpl policyTree = rootNode.copyTree();
policyTree.setImmutable();
return policyTree;
}
} | [
"PolicyNode",
"getPolicyTree",
"(",
")",
"{",
"if",
"(",
"rootNode",
"==",
"null",
")",
"return",
"null",
";",
"else",
"{",
"PolicyNodeImpl",
"policyTree",
"=",
"rootNode",
".",
"copyTree",
"(",
")",
";",
"policyTree",
".",
"setImmutable",
"(",
")",
";",
... | Gets the root node of the valid policy tree, or null if the
valid policy tree is null. Marks each node of the returned tree
immutable and thread-safe.
@returns the root node of the valid policy tree, or null if
the valid policy tree is null | [
"Gets",
"the",
"root",
"node",
"of",
"the",
"valid",
"policy",
"tree",
"or",
"null",
"if",
"the",
"valid",
"policy",
"tree",
"is",
"null",
".",
"Marks",
"each",
"node",
"of",
"the",
"returned",
"tree",
"immutable",
"and",
"thread",
"-",
"safe",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/PolicyChecker.java#L915-L923 |
33,533 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Spliterators.java | Spliterators.checkFromToBounds | private static void checkFromToBounds(int arrayLength, int origin, int fence) {
if (origin > fence) {
throw new ArrayIndexOutOfBoundsException(
"origin(" + origin + ") > fence(" + fence + ")");
}
if (origin < 0) {
throw new ArrayIndexOutOfBoundsExcepti... | java | private static void checkFromToBounds(int arrayLength, int origin, int fence) {
if (origin > fence) {
throw new ArrayIndexOutOfBoundsException(
"origin(" + origin + ") > fence(" + fence + ")");
}
if (origin < 0) {
throw new ArrayIndexOutOfBoundsExcepti... | [
"private",
"static",
"void",
"checkFromToBounds",
"(",
"int",
"arrayLength",
",",
"int",
"origin",
",",
"int",
"fence",
")",
"{",
"if",
"(",
"origin",
">",
"fence",
")",
"{",
"throw",
"new",
"ArrayIndexOutOfBoundsException",
"(",
"\"origin(\"",
"+",
"origin",
... | Validate inclusive start index and exclusive end index against the length
of an array.
@param arrayLength The length of the array
@param origin The inclusive start index
@param fence The exclusive end index
@throws ArrayIndexOutOfBoundsException if the start index is greater than
the end index, if the start index is ne... | [
"Validate",
"inclusive",
"start",
"index",
"and",
"exclusive",
"end",
"index",
"against",
"the",
"length",
"of",
"an",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/Spliterators.java#L385-L396 |
33,534 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java | NativeIDN.toASCII | public static String toASCII(String s, int flags) {
String[] parts = SEPARATORS_REGEX.split(s);
for (int i = 0; i < parts.length; i++) {
if (nonASCII(parts[i])) {
parts[i] = PUNYCODE_PREFIX + encode(parts[i]);
}
}
return String.join(".", parts);
} | java | public static String toASCII(String s, int flags) {
String[] parts = SEPARATORS_REGEX.split(s);
for (int i = 0; i < parts.length; i++) {
if (nonASCII(parts[i])) {
parts[i] = PUNYCODE_PREFIX + encode(parts[i]);
}
}
return String.join(".", parts);
} | [
"public",
"static",
"String",
"toASCII",
"(",
"String",
"s",
",",
"int",
"flags",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"SEPARATORS_REGEX",
".",
"split",
"(",
"s",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"parts",
".",
"le... | Convert a Unicode string to IDN. | [
"Convert",
"a",
"Unicode",
"string",
"to",
"IDN",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java#L49-L57 |
33,535 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java | NativeIDN.nonASCII | private static boolean nonASCII(String s) {
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) > 0x7F) {
return true;
}
}
return false;
} | java | private static boolean nonASCII(String s) {
for (int i = 0; i < s.length(); i++) {
if (s.charAt(i) > 0x7F) {
return true;
}
}
return false;
} | [
"private",
"static",
"boolean",
"nonASCII",
"(",
"String",
"s",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"s",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"s",
".",
"charAt",
"(",
"i",
")",
">",
"0x7F",
")... | Returns true if a string contains any non-ASCII characters. | [
"Returns",
"true",
"if",
"a",
"string",
"contains",
"any",
"non",
"-",
"ASCII",
"characters",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java#L62-L69 |
33,536 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java | NativeIDN.encode | private static String encode(String s) {
int n = INITIAL_N;
int delta = 0;
int bias = INITIAL_BIAS;
StringBuffer output = new StringBuffer();
// Copy all basic code points to the output.
int b = 0;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (basicCodePoint(c... | java | private static String encode(String s) {
int n = INITIAL_N;
int delta = 0;
int bias = INITIAL_BIAS;
StringBuffer output = new StringBuffer();
// Copy all basic code points to the output.
int b = 0;
for (int i = 0; i < s.length(); i++) {
char c = s.charAt(i);
if (basicCodePoint(c... | [
"private",
"static",
"String",
"encode",
"(",
"String",
"s",
")",
"{",
"int",
"n",
"=",
"INITIAL_N",
";",
"int",
"delta",
"=",
"0",
";",
"int",
"bias",
"=",
"INITIAL_BIAS",
";",
"StringBuffer",
"output",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"// C... | Encodes a Unicode string to Punycode ASCII. | [
"Encodes",
"a",
"Unicode",
"string",
"to",
"Punycode",
"ASCII",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java#L74-L144 |
33,537 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java | NativeIDN.toUnicode | public static String toUnicode(String s, int flags) {
String[] parts = SEPARATORS_REGEX.split(s);
for (int i = 0; i < parts.length; i++) {
if (parts[i].startsWith(PUNYCODE_PREFIX)) {
parts[i] = decode(parts[i].substring(PUNYCODE_PREFIX.length()));
}
}
return String.join(".", parts);
... | java | public static String toUnicode(String s, int flags) {
String[] parts = SEPARATORS_REGEX.split(s);
for (int i = 0; i < parts.length; i++) {
if (parts[i].startsWith(PUNYCODE_PREFIX)) {
parts[i] = decode(parts[i].substring(PUNYCODE_PREFIX.length()));
}
}
return String.join(".", parts);
... | [
"public",
"static",
"String",
"toUnicode",
"(",
"String",
"s",
",",
"int",
"flags",
")",
"{",
"String",
"[",
"]",
"parts",
"=",
"SEPARATORS_REGEX",
".",
"split",
"(",
"s",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"parts",
".",
"... | Convert an IDN-formatted ASCII string to Unicode. | [
"Convert",
"an",
"IDN",
"-",
"formatted",
"ASCII",
"string",
"to",
"Unicode",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/libcore/icu/NativeIDN.java#L149-L158 |
33,538 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java | CollationElementIterator.next | public int next() {
if (dir_ > 1) {
// Continue forward iteration. Test this first.
if (otherHalf_ != 0) {
int oh = otherHalf_;
otherHalf_ = 0;
return oh;
}
} else if (dir_ == 1) {
// next() after setOffset()... | java | public int next() {
if (dir_ > 1) {
// Continue forward iteration. Test this first.
if (otherHalf_ != 0) {
int oh = otherHalf_;
otherHalf_ = 0;
return oh;
}
} else if (dir_ == 1) {
// next() after setOffset()... | [
"public",
"int",
"next",
"(",
")",
"{",
"if",
"(",
"dir_",
">",
"1",
")",
"{",
"// Continue forward iteration. Test this first.",
"if",
"(",
"otherHalf_",
"!=",
"0",
")",
"{",
"int",
"oh",
"=",
"otherHalf_",
";",
"otherHalf_",
"=",
"0",
";",
"return",
"o... | Get the next collation element in the source string.
<p>This iterator iterates over a sequence of collation elements
that were built from the string. Because there isn't
necessarily a one-to-one mapping from characters to collation
elements, this doesn't mean the same thing as "return the
collation element [or orderin... | [
"Get",
"the",
"next",
"collation",
"element",
"in",
"the",
"source",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java#L311-L345 |
33,539 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java | CollationElementIterator.previous | public int previous() {
if (dir_ < 0) {
// Continue backwards iteration. Test this first.
if (otherHalf_ != 0) {
int oh = otherHalf_;
otherHalf_ = 0;
return oh;
}
} else if (dir_ == 0) {
iter_.resetToOffset(s... | java | public int previous() {
if (dir_ < 0) {
// Continue backwards iteration. Test this first.
if (otherHalf_ != 0) {
int oh = otherHalf_;
otherHalf_ = 0;
return oh;
}
} else if (dir_ == 0) {
iter_.resetToOffset(s... | [
"public",
"int",
"previous",
"(",
")",
"{",
"if",
"(",
"dir_",
"<",
"0",
")",
"{",
"// Continue backwards iteration. Test this first.",
"if",
"(",
"otherHalf_",
"!=",
"0",
")",
"{",
"int",
"oh",
"=",
"otherHalf_",
";",
"otherHalf_",
"=",
"0",
";",
"return"... | Get the previous collation element in the source string.
<p>This iterator iterates over a sequence of collation elements
that were built from the string. Because there isn't
necessarily a one-to-one mapping from characters to collation
elements, this doesn't mean the same thing as "return the
collation element [or ord... | [
"Get",
"the",
"previous",
"collation",
"element",
"in",
"the",
"source",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java#L365-L412 |
33,540 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java | CollationElementIterator.setText | public void setText(String source) {
string_ = source; // TODO: do we need to remember the source string in a field?
CollationIterator newIter;
boolean numeric = rbc_.settings.readOnly().isNumeric();
if (rbc_.settings.readOnly().dontCheckFCD()) {
newIter = new UTF16CollationI... | java | public void setText(String source) {
string_ = source; // TODO: do we need to remember the source string in a field?
CollationIterator newIter;
boolean numeric = rbc_.settings.readOnly().isNumeric();
if (rbc_.settings.readOnly().dontCheckFCD()) {
newIter = new UTF16CollationI... | [
"public",
"void",
"setText",
"(",
"String",
"source",
")",
"{",
"string_",
"=",
"source",
";",
"// TODO: do we need to remember the source string in a field?",
"CollationIterator",
"newIter",
";",
"boolean",
"numeric",
"=",
"rbc_",
".",
"settings",
".",
"readOnly",
"(... | Set a new source string for iteration, and reset the offset
to the beginning of the text.
@param source the new source string for iteration. | [
"Set",
"a",
"new",
"source",
"string",
"for",
"iteration",
"and",
"reset",
"the",
"offset",
"to",
"the",
"beginning",
"of",
"the",
"text",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java#L492-L504 |
33,541 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java | CollationElementIterator.setText | public void setText(UCharacterIterator source) {
string_ = source.getText(); // TODO: do we need to remember the source string in a field?
// Note: In C++, we just setText(source.getText()).
// In Java, we actually operate on a character iterator.
// (The old code apparently did so only ... | java | public void setText(UCharacterIterator source) {
string_ = source.getText(); // TODO: do we need to remember the source string in a field?
// Note: In C++, we just setText(source.getText()).
// In Java, we actually operate on a character iterator.
// (The old code apparently did so only ... | [
"public",
"void",
"setText",
"(",
"UCharacterIterator",
"source",
")",
"{",
"string_",
"=",
"source",
".",
"getText",
"(",
")",
";",
"// TODO: do we need to remember the source string in a field?",
"// Note: In C++, we just setText(source.getText()).",
"// In Java, we actually op... | Set a new source string iterator for iteration, and reset the
offset to the beginning of the text.
<p>The source iterator's integrity will be preserved since a new copy
will be created for use.
@param source the new source string iterator for iteration. | [
"Set",
"a",
"new",
"source",
"string",
"iterator",
"for",
"iteration",
"and",
"reset",
"the",
"offset",
"to",
"the",
"beginning",
"of",
"the",
"text",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CollationElementIterator.java#L514-L541 |
33,542 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/MsgMgr.java | MsgMgr.message | public void message(SourceLocator srcLctr, String msg, boolean terminate) throws TransformerException
{
ErrorListener errHandler = m_transformer.getErrorListener();
if (null != errHandler)
{
errHandler.warning(new TransformerException(msg, srcLctr));
}
else
{
if (terminate)
... | java | public void message(SourceLocator srcLctr, String msg, boolean terminate) throws TransformerException
{
ErrorListener errHandler = m_transformer.getErrorListener();
if (null != errHandler)
{
errHandler.warning(new TransformerException(msg, srcLctr));
}
else
{
if (terminate)
... | [
"public",
"void",
"message",
"(",
"SourceLocator",
"srcLctr",
",",
"String",
"msg",
",",
"boolean",
"terminate",
")",
"throws",
"TransformerException",
"{",
"ErrorListener",
"errHandler",
"=",
"m_transformer",
".",
"getErrorListener",
"(",
")",
";",
"if",
"(",
"... | Warn the user of a problem.
This is public for access by extensions.
@param msg The message text to issue
@param terminate Flag indicating whether to terminate this process
@throws XSLProcessorException thrown if the active ProblemListener and XPathContext decide
the error condition is severe enough to halt processing... | [
"Warn",
"the",
"user",
"of",
"a",
"problem",
".",
"This",
"is",
"public",
"for",
"access",
"by",
"extensions",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/MsgMgr.java#L62-L78 |
33,543 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/ReverseState.java | ReverseState.updateState | public void updateState(TrustAnchor anchor, BuilderParams buildParams)
throws CertificateException, IOException, CertPathValidatorException
{
trustAnchor = anchor;
X509Certificate trustedCert = anchor.getTrustedCert();
if (trustedCert != null) {
updateState(trustedCert);
... | java | public void updateState(TrustAnchor anchor, BuilderParams buildParams)
throws CertificateException, IOException, CertPathValidatorException
{
trustAnchor = anchor;
X509Certificate trustedCert = anchor.getTrustedCert();
if (trustedCert != null) {
updateState(trustedCert);
... | [
"public",
"void",
"updateState",
"(",
"TrustAnchor",
"anchor",
",",
"BuilderParams",
"buildParams",
")",
"throws",
"CertificateException",
",",
"IOException",
",",
"CertPathValidatorException",
"{",
"trustAnchor",
"=",
"anchor",
";",
"X509Certificate",
"trustedCert",
"=... | Update the state with the specified trust anchor.
@param anchor the most-trusted CA
@param buildParams builder parameters | [
"Update",
"the",
"state",
"with",
"the",
"specified",
"trust",
"anchor",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/ReverseState.java#L221-L261 |
33,544 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java | NodeSetDTM.addNode | public void addNode(int n)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");
this.addElement(n);
} | java | public void addNode(int n)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");
this.addElement(n);
} | [
"public",
"void",
"addNode",
"(",
"int",
"n",
")",
"{",
"if",
"(",
"!",
"m_mutable",
")",
"throw",
"new",
"RuntimeException",
"(",
"XSLMessages",
".",
"createXPATHMessage",
"(",
"XPATHErrorResources",
".",
"ER_NODESETDTM_NOT_MUTABLE",
",",
"null",
")",
")",
";... | Add a node to the NodeSetDTM. Not all types of NodeSetDTMs support this
operation
@param n Node to be added
@throws RuntimeException thrown if this NodeSetDTM is not of
a mutable type. | [
"Add",
"a",
"node",
"to",
"the",
"NodeSetDTM",
".",
"Not",
"all",
"types",
"of",
"NodeSetDTMs",
"support",
"this",
"operation"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java#L535-L542 |
33,545 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java | NodeSetDTM.setItem | public void setItem(int node, int index)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");
super.setElementAt(node, index);
} | java | public void setItem(int node, int index)
{
if (!m_mutable)
throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!");
super.setElementAt(node, index);
} | [
"public",
"void",
"setItem",
"(",
"int",
"node",
",",
"int",
"index",
")",
"{",
"if",
"(",
"!",
"m_mutable",
")",
"throw",
"new",
"RuntimeException",
"(",
"XSLMessages",
".",
"createXPATHMessage",
"(",
"XPATHErrorResources",
".",
"ER_NODESETDTM_NOT_MUTABLE",
","... | Same as setElementAt.
@param node The node to be set.
@param index The index of the node to be replaced.
@throws RuntimeException thrown if this NodeSetDTM is not of
a mutable type. | [
"Same",
"as",
"setElementAt",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSetDTM.java#L1025-L1032 |
33,546 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterProperty.java | UCharacterProperty.getEuropeanDigit | public static int getEuropeanDigit(int ch) {
if ((ch > 0x7a && ch < 0xff21)
|| ch < 0x41 || (ch > 0x5a && ch < 0x61)
|| ch > 0xff5a || (ch > 0xff3a && ch < 0xff41)) {
return -1;
}
if (ch <= 0x7a) {
// ch >= 0x41 or ch < 0x61
return ch +... | java | public static int getEuropeanDigit(int ch) {
if ((ch > 0x7a && ch < 0xff21)
|| ch < 0x41 || (ch > 0x5a && ch < 0x61)
|| ch > 0xff5a || (ch > 0xff3a && ch < 0xff41)) {
return -1;
}
if (ch <= 0x7a) {
// ch >= 0x41 or ch < 0x61
return ch +... | [
"public",
"static",
"int",
"getEuropeanDigit",
"(",
"int",
"ch",
")",
"{",
"if",
"(",
"(",
"ch",
">",
"0x7a",
"&&",
"ch",
"<",
"0xff21",
")",
"||",
"ch",
"<",
"0x41",
"||",
"(",
"ch",
">",
"0x5a",
"&&",
"ch",
"<",
"0x61",
")",
"||",
"ch",
">",
... | Returns the digit values of characters like 'A' - 'Z', normal,
half-width and full-width. This method assumes that the other digit
characters are checked by the calling method.
@param ch character to test
@return -1 if ch is not a character of the form 'A' - 'Z', otherwise
its corresponding digit will be returned. | [
"Returns",
"the",
"digit",
"values",
"of",
"characters",
"like",
"A",
"-",
"Z",
"normal",
"half",
"-",
"width",
"and",
"full",
"-",
"width",
".",
"This",
"method",
"assumes",
"that",
"the",
"other",
"digit",
"characters",
"are",
"checked",
"by",
"the",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UCharacterProperty.java#L822-L838 |
33,547 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.encode | public void encode(DerOutputStream outStrm) throws CRLException {
try {
if (revokedCert == null) {
DerOutputStream tmp = new DerOutputStream();
// sequence { serialNumber, revocationDate, extensions }
serialNumber.encode(tmp);
if (revo... | java | public void encode(DerOutputStream outStrm) throws CRLException {
try {
if (revokedCert == null) {
DerOutputStream tmp = new DerOutputStream();
// sequence { serialNumber, revocationDate, extensions }
serialNumber.encode(tmp);
if (revo... | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"outStrm",
")",
"throws",
"CRLException",
"{",
"try",
"{",
"if",
"(",
"revokedCert",
"==",
"null",
")",
"{",
"DerOutputStream",
"tmp",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"// sequence { serialNumber, ... | Encodes the revoked certificate to an output stream.
@param outStrm an output stream to which the encoded revoked
certificate is written.
@exception CRLException on encoding errors. | [
"Encodes",
"the",
"revoked",
"certificate",
"to",
"an",
"output",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L158-L183 |
33,548 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.getRevocationReason | @Override
public CRLReason getRevocationReason() {
Extension ext = getExtension(PKIXExtensions.ReasonCode_Id);
if (ext == null) {
return null;
}
CRLReasonCodeExtension rcExt = (CRLReasonCodeExtension) ext;
return rcExt.getReasonCode();
} | java | @Override
public CRLReason getRevocationReason() {
Extension ext = getExtension(PKIXExtensions.ReasonCode_Id);
if (ext == null) {
return null;
}
CRLReasonCodeExtension rcExt = (CRLReasonCodeExtension) ext;
return rcExt.getReasonCode();
} | [
"@",
"Override",
"public",
"CRLReason",
"getRevocationReason",
"(",
")",
"{",
"Extension",
"ext",
"=",
"getExtension",
"(",
"PKIXExtensions",
".",
"ReasonCode_Id",
")",
";",
"if",
"(",
"ext",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"CRLReasonCode... | This method is the overridden implementation of the getRevocationReason
method in X509CRLEntry. It is better performance-wise since it returns
cached values. | [
"This",
"method",
"is",
"the",
"overridden",
"implementation",
"of",
"the",
"getRevocationReason",
"method",
"in",
"X509CRLEntry",
".",
"It",
"is",
"better",
"performance",
"-",
"wise",
"since",
"it",
"returns",
"cached",
"values",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L240-L248 |
33,549 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.getRevocationReason | public static CRLReason getRevocationReason(X509CRLEntry crlEntry) {
try {
byte[] ext = crlEntry.getExtensionValue("2.5.29.21");
if (ext == null) {
return null;
}
DerValue val = new DerValue(ext);
byte[] data = val.getOctetString();
... | java | public static CRLReason getRevocationReason(X509CRLEntry crlEntry) {
try {
byte[] ext = crlEntry.getExtensionValue("2.5.29.21");
if (ext == null) {
return null;
}
DerValue val = new DerValue(ext);
byte[] data = val.getOctetString();
... | [
"public",
"static",
"CRLReason",
"getRevocationReason",
"(",
"X509CRLEntry",
"crlEntry",
")",
"{",
"try",
"{",
"byte",
"[",
"]",
"ext",
"=",
"crlEntry",
".",
"getExtensionValue",
"(",
"\"2.5.29.21\"",
")",
";",
"if",
"(",
"ext",
"==",
"null",
")",
"{",
"re... | This static method is the default implementation of the
getRevocationReason method in X509CRLEntry. | [
"This",
"static",
"method",
"is",
"the",
"default",
"implementation",
"of",
"the",
"getRevocationReason",
"method",
"in",
"X509CRLEntry",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L254-L269 |
33,550 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.getReasonCode | public Integer getReasonCode() throws IOException {
Object obj = getExtension(PKIXExtensions.ReasonCode_Id);
if (obj == null)
return null;
CRLReasonCodeExtension reasonCode = (CRLReasonCodeExtension)obj;
return reasonCode.get(CRLReasonCodeExtension.REASON);
} | java | public Integer getReasonCode() throws IOException {
Object obj = getExtension(PKIXExtensions.ReasonCode_Id);
if (obj == null)
return null;
CRLReasonCodeExtension reasonCode = (CRLReasonCodeExtension)obj;
return reasonCode.get(CRLReasonCodeExtension.REASON);
} | [
"public",
"Integer",
"getReasonCode",
"(",
")",
"throws",
"IOException",
"{",
"Object",
"obj",
"=",
"getExtension",
"(",
"PKIXExtensions",
".",
"ReasonCode_Id",
")",
";",
"if",
"(",
"obj",
"==",
"null",
")",
"return",
"null",
";",
"CRLReasonCodeExtension",
"re... | get Reason Code from CRL entry.
@returns Integer or null, if no such extension
@throws IOException on error | [
"get",
"Reason",
"Code",
"from",
"CRL",
"entry",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L277-L283 |
33,551 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.getExtension | public Extension getExtension(ObjectIdentifier oid) {
if (extensions == null)
return null;
// following returns null if no such OID in map
//XXX consider cloning this
return extensions.get(OIDMap.getName(oid));
} | java | public Extension getExtension(ObjectIdentifier oid) {
if (extensions == null)
return null;
// following returns null if no such OID in map
//XXX consider cloning this
return extensions.get(OIDMap.getName(oid));
} | [
"public",
"Extension",
"getExtension",
"(",
"ObjectIdentifier",
"oid",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"return",
"null",
";",
"// following returns null if no such OID in map",
"//XXX consider cloning this",
"return",
"extensions",
".",
"get",
"(",... | get an extension
@param oid ObjectIdentifier of extension desired
@returns Extension of type <extension> or null, if not found | [
"get",
"an",
"extension"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L437-L444 |
33,552 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.toImpl | public static X509CRLEntryImpl toImpl(X509CRLEntry entry)
throws CRLException {
if (entry instanceof X509CRLEntryImpl) {
return (X509CRLEntryImpl)entry;
} else {
return new X509CRLEntryImpl(entry.getEncoded());
}
} | java | public static X509CRLEntryImpl toImpl(X509CRLEntry entry)
throws CRLException {
if (entry instanceof X509CRLEntryImpl) {
return (X509CRLEntryImpl)entry;
} else {
return new X509CRLEntryImpl(entry.getEncoded());
}
} | [
"public",
"static",
"X509CRLEntryImpl",
"toImpl",
"(",
"X509CRLEntry",
"entry",
")",
"throws",
"CRLException",
"{",
"if",
"(",
"entry",
"instanceof",
"X509CRLEntryImpl",
")",
"{",
"return",
"(",
"X509CRLEntryImpl",
")",
"entry",
";",
"}",
"else",
"{",
"return",
... | Utility method to convert an arbitrary instance of X509CRLEntry
to a X509CRLEntryImpl. Does a cast if possible, otherwise reparses
the encoding. | [
"Utility",
"method",
"to",
"convert",
"an",
"arbitrary",
"instance",
"of",
"X509CRLEntry",
"to",
"a",
"X509CRLEntryImpl",
".",
"Does",
"a",
"cast",
"if",
"possible",
"otherwise",
"reparses",
"the",
"encoding",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L483-L490 |
33,553 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java | X509CRLEntryImpl.getExtensions | public Map<String, java.security.cert.Extension> getExtensions() {
if (extensions == null) {
return Collections.emptyMap();
}
Collection<Extension> exts = extensions.getAllExtensions();
Map<String, java.security.cert.Extension> map = new TreeMap<>();
for (Extension ex... | java | public Map<String, java.security.cert.Extension> getExtensions() {
if (extensions == null) {
return Collections.emptyMap();
}
Collection<Extension> exts = extensions.getAllExtensions();
Map<String, java.security.cert.Extension> map = new TreeMap<>();
for (Extension ex... | [
"public",
"Map",
"<",
"String",
",",
"java",
".",
"security",
".",
"cert",
".",
"Extension",
">",
"getExtensions",
"(",
")",
"{",
"if",
"(",
"extensions",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyMap",
"(",
")",
";",
"}",
"Collection... | Returns all extensions for this entry in a map
@return the extension map, can be empty, but not null | [
"Returns",
"all",
"extensions",
"for",
"this",
"entry",
"in",
"a",
"map"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X509CRLEntryImpl.java#L506-L516 |
33,554 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/ExemptionMechanism.java | ExemptionMechanism.isCryptoAllowed | public final boolean isCryptoAllowed(Key key)
throws ExemptionMechanismException {
boolean ret = false;
if (done && (key != null)) {
// Check if the key passed in is the same as the one
// this exemption mechanism used.
ret = keyStored.equals(key);
... | java | public final boolean isCryptoAllowed(Key key)
throws ExemptionMechanismException {
boolean ret = false;
if (done && (key != null)) {
// Check if the key passed in is the same as the one
// this exemption mechanism used.
ret = keyStored.equals(key);
... | [
"public",
"final",
"boolean",
"isCryptoAllowed",
"(",
"Key",
"key",
")",
"throws",
"ExemptionMechanismException",
"{",
"boolean",
"ret",
"=",
"false",
";",
"if",
"(",
"done",
"&&",
"(",
"key",
"!=",
"null",
")",
")",
"{",
"// Check if the key passed in is the sa... | Returns whether the result blob has been generated successfully by this
exemption mechanism.
<p>The method also makes sure that the key passed in is the same as
the one this exemption mechanism used in initializing and generating
phases.
@param key the key the crypto is going to use.
@return whether the result blob ... | [
"Returns",
"whether",
"the",
"result",
"blob",
"has",
"been",
"generated",
"successfully",
"by",
"this",
"exemption",
"mechanism",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/ExemptionMechanism.java#L257-L266 |
33,555 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/ExemptionMechanism.java | ExemptionMechanism.init | public final void init(Key key)
throws InvalidKeyException, ExemptionMechanismException {
done = false;
initialized = false;
keyStored = key;
exmechSpi.engineInit(key);
initialized = true;
} | java | public final void init(Key key)
throws InvalidKeyException, ExemptionMechanismException {
done = false;
initialized = false;
keyStored = key;
exmechSpi.engineInit(key);
initialized = true;
} | [
"public",
"final",
"void",
"init",
"(",
"Key",
"key",
")",
"throws",
"InvalidKeyException",
",",
"ExemptionMechanismException",
"{",
"done",
"=",
"false",
";",
"initialized",
"=",
"false",
";",
"keyStored",
"=",
"key",
";",
"exmechSpi",
".",
"engineInit",
"(",... | Initializes this exemption mechanism with a key.
<p>If this exemption mechanism requires any algorithm parameters
that cannot be derived from the given <code>key</code>, the
underlying exemption mechanism implementation is supposed to
generate the required parameters itself (using provider-specific
default values); in... | [
"Initializes",
"this",
"exemption",
"mechanism",
"with",
"a",
"key",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/ExemptionMechanism.java#L314-L322 |
33,556 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/ExemptionMechanism.java | ExemptionMechanism.genExemptionBlob | public final byte[] genExemptionBlob() throws IllegalStateException,
ExemptionMechanismException {
if (!initialized) {
throw new IllegalStateException(
"ExemptionMechanism not initialized");
}
byte[] blob = exmechSpi.engineGenExemptionBlob();
done ... | java | public final byte[] genExemptionBlob() throws IllegalStateException,
ExemptionMechanismException {
if (!initialized) {
throw new IllegalStateException(
"ExemptionMechanism not initialized");
}
byte[] blob = exmechSpi.engineGenExemptionBlob();
done ... | [
"public",
"final",
"byte",
"[",
"]",
"genExemptionBlob",
"(",
")",
"throws",
"IllegalStateException",
",",
"ExemptionMechanismException",
"{",
"if",
"(",
"!",
"initialized",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"ExemptionMechanism not initialized\""... | Generates the exemption mechanism key blob.
@return the new buffer with the result key blob.
@exception IllegalStateException if this exemption mechanism is in
a wrong state (e.g., has not been initialized).
@exception ExemptionMechanismException if problem(s) encountered in the
process of generating. | [
"Generates",
"the",
"exemption",
"mechanism",
"key",
"blob",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/crypto/ExemptionMechanism.java#L398-L407 |
33,557 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/DoubleSummaryStatistics.java | DoubleSummaryStatistics.accept | @Override
public void accept(double value) {
++count;
simpleSum += value;
sumWithCompensation(value);
min = Math.min(min, value);
max = Math.max(max, value);
} | java | @Override
public void accept(double value) {
++count;
simpleSum += value;
sumWithCompensation(value);
min = Math.min(min, value);
max = Math.max(max, value);
} | [
"@",
"Override",
"public",
"void",
"accept",
"(",
"double",
"value",
")",
"{",
"++",
"count",
";",
"simpleSum",
"+=",
"value",
";",
"sumWithCompensation",
"(",
"value",
")",
";",
"min",
"=",
"Math",
".",
"min",
"(",
"min",
",",
"value",
")",
";",
"ma... | Records another value into the summary information.
@param value the input value | [
"Records",
"another",
"value",
"into",
"the",
"summary",
"information",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/DoubleSummaryStatistics.java#L82-L89 |
33,558 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ServerSocket.java | ServerSocket.createImpl | void createImpl() throws SocketException {
if (impl == null)
setImpl();
try {
impl.create(true);
created = true;
} catch (IOException e) {
throw new SocketException(e.getMessage());
}
} | java | void createImpl() throws SocketException {
if (impl == null)
setImpl();
try {
impl.create(true);
created = true;
} catch (IOException e) {
throw new SocketException(e.getMessage());
}
} | [
"void",
"createImpl",
"(",
")",
"throws",
"SocketException",
"{",
"if",
"(",
"impl",
"==",
"null",
")",
"setImpl",
"(",
")",
";",
"try",
"{",
"impl",
".",
"create",
"(",
"true",
")",
";",
"created",
"=",
"true",
";",
"}",
"catch",
"(",
"IOException",... | Creates the socket implementation.
@throws IOException if creation fails
@since 1.4 | [
"Creates",
"the",
"socket",
"implementation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ServerSocket.java#L304-L313 |
33,559 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ServerSocket.java | ServerSocket.accept | public Socket accept() throws IOException {
if (isClosed())
throw new SocketException("Socket is closed");
if (!isBound())
throw new SocketException("Socket is not bound yet");
Socket s = new Socket((SocketImpl) null);
implAccept(s);
return s;
} | java | public Socket accept() throws IOException {
if (isClosed())
throw new SocketException("Socket is closed");
if (!isBound())
throw new SocketException("Socket is not bound yet");
Socket s = new Socket((SocketImpl) null);
implAccept(s);
return s;
} | [
"public",
"Socket",
"accept",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"isClosed",
"(",
")",
")",
"throw",
"new",
"SocketException",
"(",
"\"Socket is closed\"",
")",
";",
"if",
"(",
"!",
"isBound",
"(",
")",
")",
"throw",
"new",
"SocketException... | Listens for a connection to be made to this socket and accepts
it. The method blocks until a connection is made.
<p>A new Socket <code>s</code> is created and, if there
is a security manager,
the security manager's <code>checkAccept</code> method is called
with <code>s.getInetAddress().getHostAddress()</code> and
<cod... | [
"Listens",
"for",
"a",
"connection",
"to",
"be",
"made",
"to",
"this",
"socket",
"and",
"accepts",
"it",
".",
"The",
"method",
"blocks",
"until",
"a",
"connection",
"is",
"made",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ServerSocket.java#L495-L503 |
33,560 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ServerSocket.java | ServerSocket.getReuseAddress | public boolean getReuseAddress() throws SocketException {
if (isClosed())
throw new SocketException("Socket is closed");
return ((Boolean) (getImpl().getOption(SocketOptions.SO_REUSEADDR))).booleanValue();
} | java | public boolean getReuseAddress() throws SocketException {
if (isClosed())
throw new SocketException("Socket is closed");
return ((Boolean) (getImpl().getOption(SocketOptions.SO_REUSEADDR))).booleanValue();
} | [
"public",
"boolean",
"getReuseAddress",
"(",
")",
"throws",
"SocketException",
"{",
"if",
"(",
"isClosed",
"(",
")",
")",
"throw",
"new",
"SocketException",
"(",
"\"Socket is closed\"",
")",
";",
"return",
"(",
"(",
"Boolean",
")",
"(",
"getImpl",
"(",
")",
... | Tests if SO_REUSEADDR is enabled.
@return a <code>boolean</code> indicating whether or not SO_REUSEADDR is enabled.
@exception SocketException if there is an error
in the underlying protocol, such as a TCP error.
@since 1.4
@see #setReuseAddress(boolean) | [
"Tests",
"if",
"SO_REUSEADDR",
"is",
"enabled",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/ServerSocket.java#L714-L718 |
33,561 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.tableSizeFor | static final int tableSizeFor(int cap) {
int n = cap - 1;
n |= n >>> 1;
n |= n >>> 2;
n |= n >>> 4;
n |= n >>> 8;
n |= n >>> 16;
return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1;
} | java | static final int tableSizeFor(int cap) {
int n = cap - 1;
n |= n >>> 1;
n |= n >>> 2;
n |= n >>> 4;
n |= n >>> 8;
n |= n >>> 16;
return (n < 0) ? 1 : (n >= MAXIMUM_CAPACITY) ? MAXIMUM_CAPACITY : n + 1;
} | [
"static",
"final",
"int",
"tableSizeFor",
"(",
"int",
"cap",
")",
"{",
"int",
"n",
"=",
"cap",
"-",
"1",
";",
"n",
"|=",
"n",
">>>",
"1",
";",
"n",
"|=",
"n",
">>>",
"2",
";",
"n",
"|=",
"n",
">>>",
"4",
";",
"n",
"|=",
"n",
">>>",
"8",
"... | Returns a power of two size for the given target capacity. | [
"Returns",
"a",
"power",
"of",
"two",
"size",
"for",
"the",
"given",
"target",
"capacity",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L383-L391 |
33,562 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.putMapEntries | final void putMapEntries(Map<? extends K, ? extends V> m, boolean evict) {
int s = m.size();
if (s > 0) {
if (table == null) { // pre-size
float ft = ((float)s / loadFactor) + 1.0F;
int t = ((ft < (float)MAXIMUM_CAPACITY) ?
(int)ft : M... | java | final void putMapEntries(Map<? extends K, ? extends V> m, boolean evict) {
int s = m.size();
if (s > 0) {
if (table == null) { // pre-size
float ft = ((float)s / loadFactor) + 1.0F;
int t = ((ft < (float)MAXIMUM_CAPACITY) ?
(int)ft : M... | [
"final",
"void",
"putMapEntries",
"(",
"Map",
"<",
"?",
"extends",
"K",
",",
"?",
"extends",
"V",
">",
"m",
",",
"boolean",
"evict",
")",
"{",
"int",
"s",
"=",
"m",
".",
"size",
"(",
")",
";",
"if",
"(",
"s",
">",
"0",
")",
"{",
"if",
"(",
... | Implements Map.putAll and Map constructor
@param m the map
@param evict false when initially constructing this map, else
true (relayed to method afterNodeInsertion). | [
"Implements",
"Map",
".",
"putAll",
"and",
"Map",
"constructor"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L505-L523 |
33,563 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.getNode | final Node<K,V> getNode(int hash, Object key) {
Node<K,V>[] tab; Node<K,V> first, e; int n; K k;
if ((tab = table) != null && (n = tab.length) > 0 &&
(first = tab[(n - 1) & hash]) != null) {
if (first.hash == hash && // always check first node
((k = first.key) == ... | java | final Node<K,V> getNode(int hash, Object key) {
Node<K,V>[] tab; Node<K,V> first, e; int n; K k;
if ((tab = table) != null && (n = tab.length) > 0 &&
(first = tab[(n - 1) & hash]) != null) {
if (first.hash == hash && // always check first node
((k = first.key) == ... | [
"final",
"Node",
"<",
"K",
",",
"V",
">",
"getNode",
"(",
"int",
"hash",
",",
"Object",
"key",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
";",
"Node",
"<",
"K",
",",
"V",
">",
"first",
",",
"e",
";",
"int",
"n",
";",
"K",... | Implements Map.get and related methods
@param hash hash for key
@param key the key
@return the node, or null if none | [
"Implements",
"Map",
".",
"get",
"and",
"related",
"methods"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L572-L590 |
33,564 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.putVal | final V putVal(int hash, K key, V value, boolean onlyIfAbsent,
boolean evict) {
Node<K,V>[] tab; Node<K,V> p; int n, i;
if ((tab = table) == null || (n = tab.length) == 0)
n = (tab = resize()).length;
if ((p = tab[i = (n - 1) & hash]) == null)
tab[i] = ... | java | final V putVal(int hash, K key, V value, boolean onlyIfAbsent,
boolean evict) {
Node<K,V>[] tab; Node<K,V> p; int n, i;
if ((tab = table) == null || (n = tab.length) == 0)
n = (tab = resize()).length;
if ((p = tab[i = (n - 1) & hash]) == null)
tab[i] = ... | [
"final",
"V",
"putVal",
"(",
"int",
"hash",
",",
"K",
"key",
",",
"V",
"value",
",",
"boolean",
"onlyIfAbsent",
",",
"boolean",
"evict",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
";",
"Node",
"<",
"K",
",",
"V",
">",
"p",
";... | Implements Map.put and related methods
@param hash hash for key
@param key the key
@param value the value to put
@param onlyIfAbsent if true, don't change existing value
@param evict if false, the table is in creation mode.
@return previous value, or null if none | [
"Implements",
"Map",
".",
"put",
"and",
"related",
"methods"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L630-L671 |
33,565 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.resize | final Node<K,V>[] resize() {
Node<K,V>[] oldTab = table;
int oldCap = (oldTab == null) ? 0 : oldTab.length;
int oldThr = threshold;
int newCap, newThr = 0;
if (oldCap > 0) {
if (oldCap >= MAXIMUM_CAPACITY) {
threshold = Integer.MAX_VALUE;
... | java | final Node<K,V>[] resize() {
Node<K,V>[] oldTab = table;
int oldCap = (oldTab == null) ? 0 : oldTab.length;
int oldThr = threshold;
int newCap, newThr = 0;
if (oldCap > 0) {
if (oldCap >= MAXIMUM_CAPACITY) {
threshold = Integer.MAX_VALUE;
... | [
"final",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"resize",
"(",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"oldTab",
"=",
"table",
";",
"int",
"oldCap",
"=",
"(",
"oldTab",
"==",
"null",
")",
"?",
"0",
":",
"oldTab",
".",
"leng... | Initializes or doubles table size. If null, allocates in
accord with initial capacity target held in field threshold.
Otherwise, because we are using power-of-two expansion, the
elements from each bin must either stay at same index, or move
with a power of two offset in the new table.
@return the table | [
"Initializes",
"or",
"doubles",
"table",
"size",
".",
"If",
"null",
"allocates",
"in",
"accord",
"with",
"initial",
"capacity",
"target",
"held",
"in",
"field",
"threshold",
".",
"Otherwise",
"because",
"we",
"are",
"using",
"power",
"-",
"of",
"-",
"two",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L682-L754 |
33,566 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.treeifyBin | final void treeifyBin(Node<K,V>[] tab, int hash) {
int n, index; Node<K,V> e;
if (tab == null || (n = tab.length) < MIN_TREEIFY_CAPACITY)
resize();
else if ((e = tab[index = (n - 1) & hash]) != null) {
TreeNode<K,V> hd = null, tl = null;
do {
T... | java | final void treeifyBin(Node<K,V>[] tab, int hash) {
int n, index; Node<K,V> e;
if (tab == null || (n = tab.length) < MIN_TREEIFY_CAPACITY)
resize();
else if ((e = tab[index = (n - 1) & hash]) != null) {
TreeNode<K,V> hd = null, tl = null;
do {
T... | [
"final",
"void",
"treeifyBin",
"(",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
",",
"int",
"hash",
")",
"{",
"int",
"n",
",",
"index",
";",
"Node",
"<",
"K",
",",
"V",
">",
"e",
";",
"if",
"(",
"tab",
"==",
"null",
"||",
"(",
"n",
... | Replaces all linked nodes in bin at index for given hash unless
table is too small, in which case resizes instead. | [
"Replaces",
"all",
"linked",
"nodes",
"in",
"bin",
"at",
"index",
"for",
"given",
"hash",
"unless",
"table",
"is",
"too",
"small",
"in",
"which",
"case",
"resizes",
"instead",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L760-L779 |
33,567 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java | HashMap.removeNode | final Node<K,V> removeNode(int hash, Object key, Object value,
boolean matchValue, boolean movable) {
Node<K,V>[] tab; Node<K,V> p; int n, index;
if ((tab = table) != null && (n = tab.length) > 0 &&
(p = tab[index = (n - 1) & hash]) != null) {
Node<... | java | final Node<K,V> removeNode(int hash, Object key, Object value,
boolean matchValue, boolean movable) {
Node<K,V>[] tab; Node<K,V> p; int n, index;
if ((tab = table) != null && (n = tab.length) > 0 &&
(p = tab[index = (n - 1) & hash]) != null) {
Node<... | [
"final",
"Node",
"<",
"K",
",",
"V",
">",
"removeNode",
"(",
"int",
"hash",
",",
"Object",
"key",
",",
"Object",
"value",
",",
"boolean",
"matchValue",
",",
"boolean",
"movable",
")",
"{",
"Node",
"<",
"K",
",",
"V",
">",
"[",
"]",
"tab",
";",
"N... | Implements Map.remove and related methods
@param hash hash for key
@param key the key
@param value the value to match if matchValue, else ignored
@param matchValue if true only remove if value is equal
@param movable if false do not move other nodes while removing
@return the node, or null if none | [
"Implements",
"Map",
".",
"remove",
"and",
"related",
"methods"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L818-L857 |
33,568 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java | OIDMap.addInternal | private static void addInternal(String name, ObjectIdentifier oid,
Class clazz) {
OIDInfo info = new OIDInfo(name, oid, clazz);
oidMap.put(oid, info);
nameMap.put(name, info);
} | java | private static void addInternal(String name, ObjectIdentifier oid,
Class clazz) {
OIDInfo info = new OIDInfo(name, oid, clazz);
oidMap.put(oid, info);
nameMap.put(name, info);
} | [
"private",
"static",
"void",
"addInternal",
"(",
"String",
"name",
",",
"ObjectIdentifier",
"oid",
",",
"Class",
"clazz",
")",
"{",
"OIDInfo",
"info",
"=",
"new",
"OIDInfo",
"(",
"name",
",",
"oid",
",",
"clazz",
")",
";",
"oidMap",
".",
"put",
"(",
"o... | Add attributes to the table. For internal use in the static
initializer. | [
"Add",
"attributes",
"to",
"the",
"table",
".",
"For",
"internal",
"use",
"in",
"the",
"static",
"initializer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L174-L179 |
33,569 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java | OIDMap.addAttribute | public static void addAttribute(String name, String oid, Class<?> clazz)
throws CertificateException {
ObjectIdentifier objId;
try {
objId = new ObjectIdentifier(oid);
} catch (IOException ioe) {
throw new CertificateException
(... | java | public static void addAttribute(String name, String oid, Class<?> clazz)
throws CertificateException {
ObjectIdentifier objId;
try {
objId = new ObjectIdentifier(oid);
} catch (IOException ioe) {
throw new CertificateException
(... | [
"public",
"static",
"void",
"addAttribute",
"(",
"String",
"name",
",",
"String",
"oid",
",",
"Class",
"<",
"?",
">",
"clazz",
")",
"throws",
"CertificateException",
"{",
"ObjectIdentifier",
"objId",
";",
"try",
"{",
"objId",
"=",
"new",
"ObjectIdentifier",
... | Add a name to lookup table.
@param name the name of the attr
@param oid the string representation of the object identifier for
the class.
@param clazz the Class object associated with this attribute
@exception CertificateException on errors. | [
"Add",
"a",
"name",
"to",
"lookup",
"table",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L213-L230 |
33,570 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java | OIDMap.getName | public static String getName(ObjectIdentifier oid) {
OIDInfo info = oidMap.get(oid);
return (info == null) ? null : info.name;
} | java | public static String getName(ObjectIdentifier oid) {
OIDInfo info = oidMap.get(oid);
return (info == null) ? null : info.name;
} | [
"public",
"static",
"String",
"getName",
"(",
"ObjectIdentifier",
"oid",
")",
"{",
"OIDInfo",
"info",
"=",
"oidMap",
".",
"get",
"(",
"oid",
")",
";",
"return",
"(",
"info",
"==",
"null",
")",
"?",
"null",
":",
"info",
".",
"name",
";",
"}"
] | Return user friendly name associated with the OID.
@param oid the name of the object identifier to be returned.
@return the user friendly name or null if no name
is registered for this oid. | [
"Return",
"user",
"friendly",
"name",
"associated",
"with",
"the",
"OID",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L239-L242 |
33,571 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java | OIDMap.getOID | public static ObjectIdentifier getOID(String name) {
OIDInfo info = nameMap.get(name);
return (info == null) ? null : info.oid;
} | java | public static ObjectIdentifier getOID(String name) {
OIDInfo info = nameMap.get(name);
return (info == null) ? null : info.oid;
} | [
"public",
"static",
"ObjectIdentifier",
"getOID",
"(",
"String",
"name",
")",
"{",
"OIDInfo",
"info",
"=",
"nameMap",
".",
"get",
"(",
"name",
")",
";",
"return",
"(",
"info",
"==",
"null",
")",
"?",
"null",
":",
"info",
".",
"oid",
";",
"}"
] | Return Object identifier for user friendly name.
@param name the user friendly name.
@return the Object Identifier or null if no oid
is registered for this name. | [
"Return",
"Object",
"identifier",
"for",
"user",
"friendly",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L251-L254 |
33,572 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java | OIDMap.getClass | public static Class<?> getClass(String name) throws CertificateException {
OIDInfo info = nameMap.get(name);
return (info == null) ? null : info.getClazz();
} | java | public static Class<?> getClass(String name) throws CertificateException {
OIDInfo info = nameMap.get(name);
return (info == null) ? null : info.getClazz();
} | [
"public",
"static",
"Class",
"<",
"?",
">",
"getClass",
"(",
"String",
"name",
")",
"throws",
"CertificateException",
"{",
"OIDInfo",
"info",
"=",
"nameMap",
".",
"get",
"(",
"name",
")",
";",
"return",
"(",
"info",
"==",
"null",
")",
"?",
"null",
":",... | Return the java class object associated with the user friendly name.
@param name the user friendly name.
@exception CertificateException if class cannot be instantiated. | [
"Return",
"the",
"java",
"class",
"object",
"associated",
"with",
"the",
"user",
"friendly",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L262-L265 |
33,573 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java | OIDMap.getClass | public static Class<?> getClass(ObjectIdentifier oid)
throws CertificateException {
OIDInfo info = oidMap.get(oid);
return (info == null) ? null : info.getClazz();
} | java | public static Class<?> getClass(ObjectIdentifier oid)
throws CertificateException {
OIDInfo info = oidMap.get(oid);
return (info == null) ? null : info.getClazz();
} | [
"public",
"static",
"Class",
"<",
"?",
">",
"getClass",
"(",
"ObjectIdentifier",
"oid",
")",
"throws",
"CertificateException",
"{",
"OIDInfo",
"info",
"=",
"oidMap",
".",
"get",
"(",
"oid",
")",
";",
"return",
"(",
"info",
"==",
"null",
")",
"?",
"null",... | Return the java class object associated with the object identifier.
@param oid the name of the object identifier to be returned.
@exception CertificateException if class cannot be instatiated. | [
"Return",
"the",
"java",
"class",
"object",
"associated",
"with",
"the",
"object",
"identifier",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/OIDMap.java#L273-L277 |
33,574 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java | OffsetTime.toEpochNano | private long toEpochNano() {
long nod = time.toNanoOfDay();
long offsetNanos = offset.getTotalSeconds() * NANOS_PER_SECOND;
return nod - offsetNanos;
} | java | private long toEpochNano() {
long nod = time.toNanoOfDay();
long offsetNanos = offset.getTotalSeconds() * NANOS_PER_SECOND;
return nod - offsetNanos;
} | [
"private",
"long",
"toEpochNano",
"(",
")",
"{",
"long",
"nod",
"=",
"time",
".",
"toNanoOfDay",
"(",
")",
";",
"long",
"offsetNanos",
"=",
"offset",
".",
"getTotalSeconds",
"(",
")",
"*",
"NANOS_PER_SECOND",
";",
"return",
"nod",
"-",
"offsetNanos",
";",
... | Converts this time to epoch nanos based on 1970-01-01Z.
@return the epoch nanos value | [
"Converts",
"this",
"time",
"to",
"epoch",
"nanos",
"based",
"on",
"1970",
"-",
"01",
"-",
"01Z",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/OffsetTime.java#L1223-L1227 |
33,575 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/ArrayRewriter.java | ArrayRewriter.visit | @Override
public boolean visit(Assignment node) {
Expression lhs = node.getLeftHandSide();
TypeMirror lhsType = lhs.getTypeMirror();
if (lhs instanceof ArrayAccess && !lhsType.getKind().isPrimitive()) {
FunctionInvocation newAssignment = newArrayAssignment(node, (ArrayAccess) lhs, lhsType);
no... | java | @Override
public boolean visit(Assignment node) {
Expression lhs = node.getLeftHandSide();
TypeMirror lhsType = lhs.getTypeMirror();
if (lhs instanceof ArrayAccess && !lhsType.getKind().isPrimitive()) {
FunctionInvocation newAssignment = newArrayAssignment(node, (ArrayAccess) lhs, lhsType);
no... | [
"@",
"Override",
"public",
"boolean",
"visit",
"(",
"Assignment",
"node",
")",
"{",
"Expression",
"lhs",
"=",
"node",
".",
"getLeftHandSide",
"(",
")",
";",
"TypeMirror",
"lhsType",
"=",
"lhs",
".",
"getTypeMirror",
"(",
")",
";",
"if",
"(",
"lhs",
"inst... | rhs is an array creation, we can optimize with "SetAndConsume". | [
"rhs",
"is",
"an",
"array",
"creation",
"we",
"can",
"optimize",
"with",
"SetAndConsume",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/ArrayRewriter.java#L235-L246 |
33,576 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.findCodeFromLocale | private static int[] findCodeFromLocale(ULocale locale) {
int[] result = getCodesFromLocale(locale);
if(result != null) {
return result;
}
ULocale likely = ULocale.addLikelySubtags(locale);
return getCodesFromLocale(likely);
} | java | private static int[] findCodeFromLocale(ULocale locale) {
int[] result = getCodesFromLocale(locale);
if(result != null) {
return result;
}
ULocale likely = ULocale.addLikelySubtags(locale);
return getCodesFromLocale(likely);
} | [
"private",
"static",
"int",
"[",
"]",
"findCodeFromLocale",
"(",
"ULocale",
"locale",
")",
"{",
"int",
"[",
"]",
"result",
"=",
"getCodesFromLocale",
"(",
"locale",
")",
";",
"if",
"(",
"result",
"!=",
"null",
")",
"{",
"return",
"result",
";",
"}",
"U... | Helper function to find the code from locale.
@param locale The locale. | [
"Helper",
"function",
"to",
"find",
"the",
"code",
"from",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L860-L867 |
33,577 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.getCode | public static final int[] getCode(String nameOrAbbrOrLocale) {
boolean triedCode = false;
if (nameOrAbbrOrLocale.indexOf('_') < 0 && nameOrAbbrOrLocale.indexOf('-') < 0) {
int propNum = UCharacter.getPropertyValueEnumNoThrow(UProperty.SCRIPT, nameOrAbbrOrLocale);
if (propNum != U... | java | public static final int[] getCode(String nameOrAbbrOrLocale) {
boolean triedCode = false;
if (nameOrAbbrOrLocale.indexOf('_') < 0 && nameOrAbbrOrLocale.indexOf('-') < 0) {
int propNum = UCharacter.getPropertyValueEnumNoThrow(UProperty.SCRIPT, nameOrAbbrOrLocale);
if (propNum != U... | [
"public",
"static",
"final",
"int",
"[",
"]",
"getCode",
"(",
"String",
"nameOrAbbrOrLocale",
")",
"{",
"boolean",
"triedCode",
"=",
"false",
";",
"if",
"(",
"nameOrAbbrOrLocale",
".",
"indexOf",
"(",
"'",
"'",
")",
"<",
"0",
"&&",
"nameOrAbbrOrLocale",
".... | Gets the script codes associated with the given locale or ISO 15924 abbreviation or name.
Returns MALAYAM given "Malayam" OR "Mlym".
Returns LATIN given "en" OR "en_US"
<p>Note: To search by short or long script alias only, use
{@link #getCodeFromName(String)} instead.
That does a fast lookup with no access of the loc... | [
"Gets",
"the",
"script",
"codes",
"associated",
"with",
"the",
"given",
"locale",
"or",
"ISO",
"15924",
"abbreviation",
"or",
"name",
".",
"Returns",
"MALAYAM",
"given",
"Malayam",
"OR",
"Mlym",
".",
"Returns",
"LATIN",
"given",
"en",
"OR",
"en_US"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L901-L921 |
33,578 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.getScript | public static final int getScript(int codepoint){
if (codepoint >= UCharacter.MIN_VALUE & codepoint <= UCharacter.MAX_VALUE) {
int scriptX=UCharacterProperty.INSTANCE.getAdditional(codepoint, 0)&UCharacterProperty.SCRIPT_X_MASK;
if(scriptX<UCharacterProperty.SCRIPT_X_WITH_COMMON) {
... | java | public static final int getScript(int codepoint){
if (codepoint >= UCharacter.MIN_VALUE & codepoint <= UCharacter.MAX_VALUE) {
int scriptX=UCharacterProperty.INSTANCE.getAdditional(codepoint, 0)&UCharacterProperty.SCRIPT_X_MASK;
if(scriptX<UCharacterProperty.SCRIPT_X_WITH_COMMON) {
... | [
"public",
"static",
"final",
"int",
"getScript",
"(",
"int",
"codepoint",
")",
"{",
"if",
"(",
"codepoint",
">=",
"UCharacter",
".",
"MIN_VALUE",
"&",
"codepoint",
"<=",
"UCharacter",
".",
"MAX_VALUE",
")",
"{",
"int",
"scriptX",
"=",
"UCharacterProperty",
"... | Gets the script code associated with the given codepoint.
Returns UScript.MALAYAM given 0x0D02
@param codepoint UChar32 codepoint
@return The script code | [
"Gets",
"the",
"script",
"code",
"associated",
"with",
"the",
"given",
"codepoint",
".",
"Returns",
"UScript",
".",
"MALAYAM",
"given",
"0x0D02"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L943-L958 |
33,579 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.hasScript | public static final boolean hasScript(int c, int sc) {
int scriptX=UCharacterProperty.INSTANCE.getAdditional(c, 0)&UCharacterProperty.SCRIPT_X_MASK;
if(scriptX<UCharacterProperty.SCRIPT_X_WITH_COMMON) {
return sc==scriptX;
}
char[] scriptExtensions=UCharacterProperty.INSTANC... | java | public static final boolean hasScript(int c, int sc) {
int scriptX=UCharacterProperty.INSTANCE.getAdditional(c, 0)&UCharacterProperty.SCRIPT_X_MASK;
if(scriptX<UCharacterProperty.SCRIPT_X_WITH_COMMON) {
return sc==scriptX;
}
char[] scriptExtensions=UCharacterProperty.INSTANC... | [
"public",
"static",
"final",
"boolean",
"hasScript",
"(",
"int",
"c",
",",
"int",
"sc",
")",
"{",
"int",
"scriptX",
"=",
"UCharacterProperty",
".",
"INSTANCE",
".",
"getAdditional",
"(",
"c",
",",
"0",
")",
"&",
"UCharacterProperty",
".",
"SCRIPT_X_MASK",
... | Do the Script_Extensions of code point c contain script sc?
If c does not have explicit Script_Extensions, then this tests whether
c has the Script property value sc.
<p>Some characters are commonly used in multiple scripts.
For more information, see UAX #24: http://www.unicode.org/reports/tr24/.
@param c code point
... | [
"Do",
"the",
"Script_Extensions",
"of",
"code",
"point",
"c",
"contain",
"script",
"sc?",
"If",
"c",
"does",
"not",
"have",
"explicit",
"Script_Extensions",
"then",
"this",
"tests",
"whether",
"c",
"has",
"the",
"Script",
"property",
"value",
"sc",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L972-L992 |
33,580 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.getName | public static final String getName(int scriptCode){
return UCharacter.getPropertyValueName(UProperty.SCRIPT,
scriptCode,
UProperty.NameChoice.LONG);
} | java | public static final String getName(int scriptCode){
return UCharacter.getPropertyValueName(UProperty.SCRIPT,
scriptCode,
UProperty.NameChoice.LONG);
} | [
"public",
"static",
"final",
"String",
"getName",
"(",
"int",
"scriptCode",
")",
"{",
"return",
"UCharacter",
".",
"getPropertyValueName",
"(",
"UProperty",
".",
"SCRIPT",
",",
"scriptCode",
",",
"UProperty",
".",
"NameChoice",
".",
"LONG",
")",
";",
"}"
] | Returns the long Unicode script name, if there is one.
Otherwise returns the 4-letter ISO 15924 script code.
Returns "Malayam" given MALAYALAM.
@param scriptCode int script code
@return long script name as given in PropertyValueAliases.txt, or the 4-letter code
@throws IllegalArgumentException if the script code is no... | [
"Returns",
"the",
"long",
"Unicode",
"script",
"name",
"if",
"there",
"is",
"one",
".",
"Otherwise",
"returns",
"the",
"4",
"-",
"letter",
"ISO",
"15924",
"script",
"code",
".",
"Returns",
"Malayam",
"given",
"MALAYALAM",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L1052-L1056 |
33,581 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.getShortName | public static final String getShortName(int scriptCode){
return UCharacter.getPropertyValueName(UProperty.SCRIPT,
scriptCode,
UProperty.NameChoice.SHORT);
} | java | public static final String getShortName(int scriptCode){
return UCharacter.getPropertyValueName(UProperty.SCRIPT,
scriptCode,
UProperty.NameChoice.SHORT);
} | [
"public",
"static",
"final",
"String",
"getShortName",
"(",
"int",
"scriptCode",
")",
"{",
"return",
"UCharacter",
".",
"getPropertyValueName",
"(",
"UProperty",
".",
"SCRIPT",
",",
"scriptCode",
",",
"UProperty",
".",
"NameChoice",
".",
"SHORT",
")",
";",
"}"... | Returns the 4-letter ISO 15924 script code,
which is the same as the short Unicode script name if Unicode has names for the script.
Returns "Mlym" given MALAYALAM.
@param scriptCode int script code
@return short script name (4-letter code)
@throws IllegalArgumentException if the script code is not valid | [
"Returns",
"the",
"4",
"-",
"letter",
"ISO",
"15924",
"script",
"code",
"which",
"is",
"the",
"same",
"as",
"the",
"short",
"Unicode",
"script",
"name",
"if",
"Unicode",
"has",
"names",
"for",
"the",
"script",
".",
"Returns",
"Mlym",
"given",
"MALAYALAM",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L1067-L1071 |
33,582 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java | UScript.getSampleString | public static final String getSampleString(int script) {
int sampleChar = ScriptMetadata.getScriptProps(script) & 0x1fffff;
if(sampleChar != 0) {
return new StringBuilder().appendCodePoint(sampleChar).toString();
}
return "";
} | java | public static final String getSampleString(int script) {
int sampleChar = ScriptMetadata.getScriptProps(script) & 0x1fffff;
if(sampleChar != 0) {
return new StringBuilder().appendCodePoint(sampleChar).toString();
}
return "";
} | [
"public",
"static",
"final",
"String",
"getSampleString",
"(",
"int",
"script",
")",
"{",
"int",
"sampleChar",
"=",
"ScriptMetadata",
".",
"getScriptProps",
"(",
"script",
")",
"&",
"0x1fffff",
";",
"if",
"(",
"sampleChar",
"!=",
"0",
")",
"{",
"return",
"... | Returns the script sample character string.
This string normally consists of one code point but might be longer.
The string is empty if the script is not encoded.
@param script script code
@return the sample character string | [
"Returns",
"the",
"script",
"sample",
"character",
"string",
".",
"This",
"string",
"normally",
"consists",
"of",
"one",
"code",
"point",
"but",
"might",
"be",
"longer",
".",
"The",
"string",
"is",
"empty",
"if",
"the",
"script",
"is",
"not",
"encoded",
".... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/UScript.java#L1325-L1331 |
33,583 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/TextAttribute.java | TextAttribute.readResolve | protected Object readResolve() throws InvalidObjectException {
if (this.getClass() != TextAttribute.class) {
throw new InvalidObjectException(
"subclass didn't correctly implement readResolve");
}
TextAttribute instance = (TextAttribute) instanceMap.get(getName());
... | java | protected Object readResolve() throws InvalidObjectException {
if (this.getClass() != TextAttribute.class) {
throw new InvalidObjectException(
"subclass didn't correctly implement readResolve");
}
TextAttribute instance = (TextAttribute) instanceMap.get(getName());
... | [
"protected",
"Object",
"readResolve",
"(",
")",
"throws",
"InvalidObjectException",
"{",
"if",
"(",
"this",
".",
"getClass",
"(",
")",
"!=",
"TextAttribute",
".",
"class",
")",
"{",
"throw",
"new",
"InvalidObjectException",
"(",
"\"subclass didn't correctly implemen... | Resolves instances being deserialized to the predefined constants. | [
"Resolves",
"instances",
"being",
"deserialized",
"to",
"the",
"predefined",
"constants",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/awt/font/TextAttribute.java#L281-L293 |
33,584 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java | JarVerifier.beginEntry | public void beginEntry(JarEntry je, ManifestEntryVerifier mev)
throws IOException
{
if (je == null)
return;
if (debug != null) {
debug.println("beginEntry "+je.getName());
}
String name = je.getName();
/*
* Assumptions:
* 1... | java | public void beginEntry(JarEntry je, ManifestEntryVerifier mev)
throws IOException
{
if (je == null)
return;
if (debug != null) {
debug.println("beginEntry "+je.getName());
}
String name = je.getName();
/*
* Assumptions:
* 1... | [
"public",
"void",
"beginEntry",
"(",
"JarEntry",
"je",
",",
"ManifestEntryVerifier",
"mev",
")",
"throws",
"IOException",
"{",
"if",
"(",
"je",
"==",
"null",
")",
"return",
";",
"if",
"(",
"debug",
"!=",
"null",
")",
"{",
"debug",
".",
"println",
"(",
... | This method scans to see which entry we're parsing and
keeps various state information depending on what type of
file is being parsed. | [
"This",
"method",
"scans",
"to",
"see",
"which",
"entry",
"we",
"re",
"parsing",
"and",
"keeps",
"various",
"state",
"information",
"depending",
"on",
"what",
"type",
"of",
"file",
"is",
"being",
"parsed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java#L111-L182 |
33,585 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java | JarVerifier.update | public void update(int b, ManifestEntryVerifier mev)
throws IOException
{
if (b != -1) {
if (parsingBlockOrSF) {
baos.write(b);
} else {
mev.update((byte)b);
}
} else {
processEntry(mev);
}
} | java | public void update(int b, ManifestEntryVerifier mev)
throws IOException
{
if (b != -1) {
if (parsingBlockOrSF) {
baos.write(b);
} else {
mev.update((byte)b);
}
} else {
processEntry(mev);
}
} | [
"public",
"void",
"update",
"(",
"int",
"b",
",",
"ManifestEntryVerifier",
"mev",
")",
"throws",
"IOException",
"{",
"if",
"(",
"b",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"parsingBlockOrSF",
")",
"{",
"baos",
".",
"write",
"(",
"b",
")",
";",
"}",
"... | update a single byte. | [
"update",
"a",
"single",
"byte",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java#L188-L200 |
33,586 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java | JarVerifier.update | public void update(int n, byte[] b, int off, int len,
ManifestEntryVerifier mev)
throws IOException
{
if (n != -1) {
if (parsingBlockOrSF) {
baos.write(b, off, n);
} else {
mev.update(b, off, n);
}
} e... | java | public void update(int n, byte[] b, int off, int len,
ManifestEntryVerifier mev)
throws IOException
{
if (n != -1) {
if (parsingBlockOrSF) {
baos.write(b, off, n);
} else {
mev.update(b, off, n);
}
} e... | [
"public",
"void",
"update",
"(",
"int",
"n",
",",
"byte",
"[",
"]",
"b",
",",
"int",
"off",
",",
"int",
"len",
",",
"ManifestEntryVerifier",
"mev",
")",
"throws",
"IOException",
"{",
"if",
"(",
"n",
"!=",
"-",
"1",
")",
"{",
"if",
"(",
"parsingBloc... | update an array of bytes. | [
"update",
"an",
"array",
"of",
"bytes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java#L206-L219 |
33,587 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java | JarVerifier.getCerts | @Deprecated // Android-changed added "Deprecated."
public java.security.cert.Certificate[] getCerts(String name)
{
return mapSignersToCertArray(getCodeSigners(name));
} | java | @Deprecated // Android-changed added "Deprecated."
public java.security.cert.Certificate[] getCerts(String name)
{
return mapSignersToCertArray(getCodeSigners(name));
} | [
"@",
"Deprecated",
"// Android-changed added \"Deprecated.\"",
"public",
"java",
".",
"security",
".",
"cert",
".",
"Certificate",
"[",
"]",
"getCerts",
"(",
"String",
"name",
")",
"{",
"return",
"mapSignersToCertArray",
"(",
"getCodeSigners",
"(",
"name",
")",
")... | Return an array of java.security.cert.Certificate objects for
the given file in the jar.
@deprecated Deprecated. | [
"Return",
"an",
"array",
"of",
"java",
".",
"security",
".",
"cert",
".",
"Certificate",
"objects",
"for",
"the",
"given",
"file",
"in",
"the",
"jar",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java#L330-L334 |
33,588 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java | JarVerifier.doneWithMeta | void doneWithMeta()
{
parsingMeta = false;
anyToVerify = !sigFileSigners.isEmpty();
baos = null;
sigFileData = null;
pendingBlocks = null;
signerCache = null;
manDig = null;
// MANIFEST.MF is always treated as signed and verified,
// move its s... | java | void doneWithMeta()
{
parsingMeta = false;
anyToVerify = !sigFileSigners.isEmpty();
baos = null;
sigFileData = null;
pendingBlocks = null;
signerCache = null;
manDig = null;
// MANIFEST.MF is always treated as signed and verified,
// move its s... | [
"void",
"doneWithMeta",
"(",
")",
"{",
"parsingMeta",
"=",
"false",
";",
"anyToVerify",
"=",
"!",
"sigFileSigners",
".",
"isEmpty",
"(",
")",
";",
"baos",
"=",
"null",
";",
"sigFileData",
"=",
"null",
";",
"pendingBlocks",
"=",
"null",
";",
"signerCache",
... | called to let us know we have processed all the
META-INF entries, and if we re-read one of them, don't
re-process it. Also gets rid of any data structures
we needed when parsing META-INF entries. | [
"called",
"to",
"let",
"us",
"know",
"we",
"have",
"processed",
"all",
"the",
"META",
"-",
"INF",
"entries",
"and",
"if",
"we",
"re",
"-",
"read",
"one",
"of",
"them",
"don",
"t",
"re",
"-",
"process",
"it",
".",
"Also",
"gets",
"rid",
"of",
"any",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java#L411-L426 |
33,589 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java | JarVerifier.isSigningRelated | static boolean isSigningRelated(String name) {
name = name.toUpperCase(Locale.ENGLISH);
if (!name.startsWith("META-INF/")) {
return false;
}
name = name.substring(9);
if (name.indexOf('/') != -1) {
return false;
}
if (name.endsWith(".DSA")
... | java | static boolean isSigningRelated(String name) {
name = name.toUpperCase(Locale.ENGLISH);
if (!name.startsWith("META-INF/")) {
return false;
}
name = name.substring(9);
if (name.indexOf('/') != -1) {
return false;
}
if (name.endsWith(".DSA")
... | [
"static",
"boolean",
"isSigningRelated",
"(",
"String",
"name",
")",
"{",
"name",
"=",
"name",
".",
"toUpperCase",
"(",
"Locale",
".",
"ENGLISH",
")",
";",
"if",
"(",
"!",
"name",
".",
"startsWith",
"(",
"\"META-INF/\"",
")",
")",
"{",
"return",
"false",... | true if file is part of the signature mechanism itself | [
"true",
"if",
"file",
"is",
"part",
"of",
"the",
"signature",
"mechanism",
"itself"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarVerifier.java#L801-L819 |
33,590 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java | FastStringBuffer.charAt | public char charAt(int pos)
{
int startChunk = pos >>> m_chunkBits;
if (startChunk == 0 && m_innerFSB != null)
return m_innerFSB.charAt(pos & m_chunkMask);
else
return m_array[startChunk][pos & m_chunkMask];
} | java | public char charAt(int pos)
{
int startChunk = pos >>> m_chunkBits;
if (startChunk == 0 && m_innerFSB != null)
return m_innerFSB.charAt(pos & m_chunkMask);
else
return m_array[startChunk][pos & m_chunkMask];
} | [
"public",
"char",
"charAt",
"(",
"int",
"pos",
")",
"{",
"int",
"startChunk",
"=",
"pos",
">>>",
"m_chunkBits",
";",
"if",
"(",
"startChunk",
"==",
"0",
"&&",
"m_innerFSB",
"!=",
"null",
")",
"return",
"m_innerFSB",
".",
"charAt",
"(",
"pos",
"&",
"m_c... | Get a single character from the string buffer.
@param pos character position requested.
@return A character from the requested position. | [
"Get",
"a",
"single",
"character",
"from",
"the",
"string",
"buffer",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java#L948-L956 |
33,591 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java | FastStringBuffer.sendNormalizedSAXcharacters | static int sendNormalizedSAXcharacters(char ch[],
int start, int length,
org.xml.sax.ContentHandler handler,
int edgeTreatmentFlags)
throws org.xml.sax.SAXException
{
boolean processingLeadingWhitespace =
((edgeTreatmentFlags & SUPPRESS_LEADING_... | java | static int sendNormalizedSAXcharacters(char ch[],
int start, int length,
org.xml.sax.ContentHandler handler,
int edgeTreatmentFlags)
throws org.xml.sax.SAXException
{
boolean processingLeadingWhitespace =
((edgeTreatmentFlags & SUPPRESS_LEADING_... | [
"static",
"int",
"sendNormalizedSAXcharacters",
"(",
"char",
"ch",
"[",
"]",
",",
"int",
"start",
",",
"int",
"length",
",",
"org",
".",
"xml",
".",
"sax",
".",
"ContentHandler",
"handler",
",",
"int",
"edgeTreatmentFlags",
")",
"throws",
"org",
".",
"xml"... | Internal method to directly normalize and dispatch the character array.
This version is aware of the fact that it may be called several times
in succession if the data is made up of multiple "chunks", and thus
must actively manage the handling of leading and trailing whitespace.
Note: The recursion is due to the possi... | [
"Internal",
"method",
"to",
"directly",
"normalize",
"and",
"dispatch",
"the",
"character",
"array",
".",
"This",
"version",
"is",
"aware",
"of",
"the",
"fact",
"that",
"it",
"may",
"be",
"called",
"several",
"times",
"in",
"succession",
"if",
"the",
"data",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java#L1127-L1186 |
33,592 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java | FastStringBuffer.sendNormalizedSAXcharacters | public static void sendNormalizedSAXcharacters(char ch[],
int start, int length,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
{
sendNormalizedSAXcharacters(ch, start, length,
handler, SUPPRESS_BOTH);
} | java | public static void sendNormalizedSAXcharacters(char ch[],
int start, int length,
org.xml.sax.ContentHandler handler)
throws org.xml.sax.SAXException
{
sendNormalizedSAXcharacters(ch, start, length,
handler, SUPPRESS_BOTH);
} | [
"public",
"static",
"void",
"sendNormalizedSAXcharacters",
"(",
"char",
"ch",
"[",
"]",
",",
"int",
"start",
",",
"int",
"length",
",",
"org",
".",
"xml",
".",
"sax",
".",
"ContentHandler",
"handler",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
... | Directly normalize and dispatch the character array.
@param ch The characters from the XML document.
@param start The start position in the array.
@param length The number of characters to read from the array.
@param handler SAX ContentHandler object to receive the event.
@exception org.xml.sax.SAXException Any SAX ex... | [
"Directly",
"normalize",
"and",
"dispatch",
"the",
"character",
"array",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/FastStringBuffer.java#L1198-L1205 |
33,593 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java | AbstractPipeline.evaluate | final <R> R evaluate(TerminalOp<E_OUT, R> terminalOp) {
assert getOutputShape() == terminalOp.inputShape();
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
return isParallel()
? terminalOp.evaluateParallel(thi... | java | final <R> R evaluate(TerminalOp<E_OUT, R> terminalOp) {
assert getOutputShape() == terminalOp.inputShape();
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
return isParallel()
? terminalOp.evaluateParallel(thi... | [
"final",
"<",
"R",
">",
"R",
"evaluate",
"(",
"TerminalOp",
"<",
"E_OUT",
",",
"R",
">",
"terminalOp",
")",
"{",
"assert",
"getOutputShape",
"(",
")",
"==",
"terminalOp",
".",
"inputShape",
"(",
")",
";",
"if",
"(",
"linkedOrConsumed",
")",
"throw",
"n... | Evaluate the pipeline with a terminal operation to produce a result.
@param <R> the type of result
@param terminalOp the terminal operation to be applied to the pipeline.
@return the result | [
"Evaluate",
"the",
"pipeline",
"with",
"a",
"terminal",
"operation",
"to",
"produce",
"a",
"result",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L230-L239 |
33,594 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java | AbstractPipeline.evaluateToArrayNode | @SuppressWarnings("unchecked")
public final Node<E_OUT> evaluateToArrayNode(IntFunction<E_OUT[]> generator) {
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
// If the last intermediate operation is stateful then
// eval... | java | @SuppressWarnings("unchecked")
public final Node<E_OUT> evaluateToArrayNode(IntFunction<E_OUT[]> generator) {
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
// If the last intermediate operation is stateful then
// eval... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"final",
"Node",
"<",
"E_OUT",
">",
"evaluateToArrayNode",
"(",
"IntFunction",
"<",
"E_OUT",
"[",
"]",
">",
"generator",
")",
"{",
"if",
"(",
"linkedOrConsumed",
")",
"throw",
"new",
"IllegalStateEx... | Collect the elements output from the pipeline stage.
@param generator the array generator to be used to create array instances
@return a flat array-backed Node that holds the collected output elements | [
"Collect",
"the",
"elements",
"output",
"from",
"the",
"pipeline",
"stage",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L247-L266 |
33,595 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java | AbstractPipeline.sourceStageSpliterator | @SuppressWarnings("unchecked")
final Spliterator<E_OUT> sourceStageSpliterator() {
if (this != sourceStage)
throw new IllegalStateException();
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
if (sourceStage.... | java | @SuppressWarnings("unchecked")
final Spliterator<E_OUT> sourceStageSpliterator() {
if (this != sourceStage)
throw new IllegalStateException();
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
if (sourceStage.... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"final",
"Spliterator",
"<",
"E_OUT",
">",
"sourceStageSpliterator",
"(",
")",
"{",
"if",
"(",
"this",
"!=",
"sourceStage",
")",
"throw",
"new",
"IllegalStateException",
"(",
")",
";",
"if",
"(",
"linkedOrCon... | Gets the source stage spliterator if this pipeline stage is the source
stage. The pipeline is consumed after this method is called and
returns successfully.
@return the source stage spliterator
@throws IllegalStateException if this pipeline stage is not the source
stage. | [
"Gets",
"the",
"source",
"stage",
"spliterator",
"if",
"this",
"pipeline",
"stage",
"is",
"the",
"source",
"stage",
".",
"The",
"pipeline",
"is",
"consumed",
"after",
"this",
"method",
"is",
"called",
"and",
"returns",
"successfully",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L277-L301 |
33,596 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java | AbstractPipeline.spliterator | @Override
@SuppressWarnings("unchecked")
public Spliterator<E_OUT> spliterator() {
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
if (this == sourceStage) {
if (sourceStage.sourceSpliterator != null) {
... | java | @Override
@SuppressWarnings("unchecked")
public Spliterator<E_OUT> spliterator() {
if (linkedOrConsumed)
throw new IllegalStateException(MSG_STREAM_LINKED);
linkedOrConsumed = true;
if (this == sourceStage) {
if (sourceStage.sourceSpliterator != null) {
... | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"Spliterator",
"<",
"E_OUT",
">",
"spliterator",
"(",
")",
"{",
"if",
"(",
"linkedOrConsumed",
")",
"throw",
"new",
"IllegalStateException",
"(",
"MSG_STREAM_LINKED",
")",
";",
"linke... | Primitive specialization use co-variant overrides, hence is not final | [
"Primitive",
"specialization",
"use",
"co",
"-",
"variant",
"overrides",
"hence",
"is",
"not",
"final"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L343-L370 |
33,597 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java | AbstractPipeline.sourceSpliterator | @SuppressWarnings("unchecked")
private Spliterator<?> sourceSpliterator(int terminalFlags) {
// Get the source spliterator of the pipeline
Spliterator<?> spliterator = null;
if (sourceStage.sourceSpliterator != null) {
spliterator = sourceStage.sourceSpliterator;
sour... | java | @SuppressWarnings("unchecked")
private Spliterator<?> sourceSpliterator(int terminalFlags) {
// Get the source spliterator of the pipeline
Spliterator<?> spliterator = null;
if (sourceStage.sourceSpliterator != null) {
spliterator = sourceStage.sourceSpliterator;
sour... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"Spliterator",
"<",
"?",
">",
"sourceSpliterator",
"(",
"int",
"terminalFlags",
")",
"{",
"// Get the source spliterator of the pipeline",
"Spliterator",
"<",
"?",
">",
"spliterator",
"=",
"null",
";",
"... | Get the source spliterator for this pipeline stage. For a sequential or
stateless parallel pipeline, this is the source spliterator. For a
stateful parallel pipeline, this is a spliterator describing the results
of all computations up to and including the most recent stateful
operation. | [
"Get",
"the",
"source",
"spliterator",
"for",
"this",
"pipeline",
"stage",
".",
"For",
"a",
"sequential",
"or",
"stateless",
"parallel",
"pipeline",
"this",
"is",
"the",
"source",
"spliterator",
".",
"For",
"a",
"stateful",
"parallel",
"pipeline",
"this",
"is"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/AbstractPipeline.java#L397-L454 |
33,598 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Variable.java | Variable.isPsuedoVarRef | public boolean isPsuedoVarRef()
{
java.lang.String ns = m_qname.getNamespaceURI();
if((null != ns) && ns.equals(PSUEDOVARNAMESPACE))
{
if(m_qname.getLocalName().startsWith("#"))
return true;
}
return false;
} | java | public boolean isPsuedoVarRef()
{
java.lang.String ns = m_qname.getNamespaceURI();
if((null != ns) && ns.equals(PSUEDOVARNAMESPACE))
{
if(m_qname.getLocalName().startsWith("#"))
return true;
}
return false;
} | [
"public",
"boolean",
"isPsuedoVarRef",
"(",
")",
"{",
"java",
".",
"lang",
".",
"String",
"ns",
"=",
"m_qname",
".",
"getNamespaceURI",
"(",
")",
";",
"if",
"(",
"(",
"null",
"!=",
"ns",
")",
"&&",
"ns",
".",
"equals",
"(",
"PSUEDOVARNAMESPACE",
")",
... | Tell if this is a psuedo variable reference, declared by Xalan instead
of by the user. | [
"Tell",
"if",
"this",
"is",
"a",
"psuedo",
"variable",
"reference",
"declared",
"by",
"Xalan",
"instead",
"of",
"by",
"the",
"user",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/operations/Variable.java#L375-L384 |
33,599 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FormattedFloatingDecimal.java | FormattedFloatingDecimal.checkExponent | private int checkExponent(int length) {
if (length >= nDigits || length < 0)
return decExponent;
for (int i = 0; i < length; i++)
if (digits[i] != '9')
// a '9' anywhere in digits will absorb the round
return decExponent;
return decExponen... | java | private int checkExponent(int length) {
if (length >= nDigits || length < 0)
return decExponent;
for (int i = 0; i < length; i++)
if (digits[i] != '9')
// a '9' anywhere in digits will absorb the round
return decExponent;
return decExponen... | [
"private",
"int",
"checkExponent",
"(",
"int",
"length",
")",
"{",
"if",
"(",
"length",
">=",
"nDigits",
"||",
"length",
"<",
"0",
")",
"return",
"decExponent",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"length",
";",
"i",
"++",
")",
... | Given the desired number of digits predict the result's exponent. | [
"Given",
"the",
"desired",
"number",
"of",
"digits",
"predict",
"the",
"result",
"s",
"exponent",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/misc/FormattedFloatingDecimal.java#L411-L420 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.