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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35,100 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java | CountersTable.putElemNumber | Vector putElemNumber(ElemNumber numberElem)
{
Vector counters = new Vector();
this.put(numberElem, counters);
return counters;
} | java | Vector putElemNumber(ElemNumber numberElem)
{
Vector counters = new Vector();
this.put(numberElem, counters);
return counters;
} | [
"Vector",
"putElemNumber",
"(",
"ElemNumber",
"numberElem",
")",
"{",
"Vector",
"counters",
"=",
"new",
"Vector",
"(",
")",
";",
"this",
".",
"put",
"(",
"numberElem",
",",
"counters",
")",
";",
"return",
"counters",
";",
"}"
] | Put a counter into the table and create an empty
vector as it's value.
@param numberElem the given xsl:number element.
@return an empty vector to be used to store counts
for this number element. | [
"Put",
"a",
"counter",
"into",
"the",
"table",
"and",
"create",
"an",
"empty",
"vector",
"as",
"it",
"s",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java#L75-L83 |
35,101 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java | CountersTable.appendBtoFList | void appendBtoFList(NodeSetDTM flist, NodeSetDTM blist)
{
int n = blist.size();
for (int i = (n - 1); i >= 0; i--)
{
flist.addElement(blist.item(i));
}
} | java | void appendBtoFList(NodeSetDTM flist, NodeSetDTM blist)
{
int n = blist.size();
for (int i = (n - 1); i >= 0; i--)
{
flist.addElement(blist.item(i));
}
} | [
"void",
"appendBtoFList",
"(",
"NodeSetDTM",
"flist",
",",
"NodeSetDTM",
"blist",
")",
"{",
"int",
"n",
"=",
"blist",
".",
"size",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"(",
"n",
"-",
"1",
")",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
... | Add a list of counted nodes that were built in backwards document
order, or a list of counted nodes that are in forwards document
order.
@param flist Vector of nodes built in forwards document order
@param blist Vector of nodes built in backwards document order | [
"Add",
"a",
"list",
"of",
"counted",
"nodes",
"that",
"were",
"built",
"in",
"backwards",
"document",
"order",
"or",
"a",
"list",
"of",
"counted",
"nodes",
"that",
"are",
"in",
"forwards",
"document",
"order",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java#L98-L107 |
35,102 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java | CountersTable.countNode | public int countNode(XPathContext support, ElemNumber numberElem, int node)
throws TransformerException
{
int count = 0;
Vector counters = getCounters(numberElem);
int nCounters = counters.size();
// XPath countMatchPattern = numberElem.getCountMatchPattern(support, node);
// XPath fro... | java | public int countNode(XPathContext support, ElemNumber numberElem, int node)
throws TransformerException
{
int count = 0;
Vector counters = getCounters(numberElem);
int nCounters = counters.size();
// XPath countMatchPattern = numberElem.getCountMatchPattern(support, node);
// XPath fro... | [
"public",
"int",
"countNode",
"(",
"XPathContext",
"support",
",",
"ElemNumber",
"numberElem",
",",
"int",
"node",
")",
"throws",
"TransformerException",
"{",
"int",
"count",
"=",
"0",
";",
"Vector",
"counters",
"=",
"getCounters",
"(",
"numberElem",
")",
";",... | Count forward until the given node is found, or until
we have looked to the given amount.
@param support The XPath context to use
@param numberElem The given xsl:number element.
@param node The node to count.
@return The node count, or 0 if not found.
@throws TransformerException | [
"Count",
"forward",
"until",
"the",
"given",
"node",
"is",
"found",
"or",
"until",
"we",
"have",
"looked",
"to",
"the",
"given",
"amount",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/CountersTable.java#L126-L207 |
35,103 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetRecog_2022.java | CharsetRecog_2022.match | int match(byte [] text, int textLen, byte [][] escapeSequences) {
int i, j;
int escN;
int hits = 0;
int misses = 0;
int shifts = 0;
int quality;
scanInput:
for (i=0; i<textLen; i++) {
if (text[i] == 0x1b) {
... | java | int match(byte [] text, int textLen, byte [][] escapeSequences) {
int i, j;
int escN;
int hits = 0;
int misses = 0;
int shifts = 0;
int quality;
scanInput:
for (i=0; i<textLen; i++) {
if (text[i] == 0x1b) {
... | [
"int",
"match",
"(",
"byte",
"[",
"]",
"text",
",",
"int",
"textLen",
",",
"byte",
"[",
"]",
"[",
"]",
"escapeSequences",
")",
"{",
"int",
"i",
",",
"j",
";",
"int",
"escN",
";",
"int",
"hits",
"=",
"0",
";",
"int",
"misses",
"=",
"0",
";",
"... | Matching function shared among the 2022 detectors JP, CN and KR
Counts up the number of legal an unrecognized escape sequences in
the sample of text, and computes a score based on the total number &
the proportion that fit the encoding.
@param text the byte buffer containing text to analyse
@param textLen the size o... | [
"Matching",
"function",
"shared",
"among",
"the",
"2022",
"detectors",
"JP",
"CN",
"and",
"KR",
"Counts",
"up",
"the",
"number",
"of",
"legal",
"an",
"unrecognized",
"escape",
"sequences",
"in",
"the",
"sample",
"of",
"text",
"and",
"computes",
"a",
"score",... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetRecog_2022.java#L35-L96 |
35,104 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormatSymbols.java | DateFormatSymbols.getCachedInstance | private static DateFormatSymbols getCachedInstance(Locale locale) {
SoftReference<DateFormatSymbols> ref = cachedInstances.get(locale);
DateFormatSymbols dfs = null;
if (ref == null || (dfs = ref.get()) == null) {
dfs = new DateFormatSymbols(locale);
ref = new SoftReferen... | java | private static DateFormatSymbols getCachedInstance(Locale locale) {
SoftReference<DateFormatSymbols> ref = cachedInstances.get(locale);
DateFormatSymbols dfs = null;
if (ref == null || (dfs = ref.get()) == null) {
dfs = new DateFormatSymbols(locale);
ref = new SoftReferen... | [
"private",
"static",
"DateFormatSymbols",
"getCachedInstance",
"(",
"Locale",
"locale",
")",
"{",
"SoftReference",
"<",
"DateFormatSymbols",
">",
"ref",
"=",
"cachedInstances",
".",
"get",
"(",
"locale",
")",
";",
"DateFormatSymbols",
"dfs",
"=",
"null",
";",
"i... | Returns a cached DateFormatSymbols if it's found in the
cache. Otherwise, this method returns a newly cached instance
for the given locale. | [
"Returns",
"a",
"cached",
"DateFormatSymbols",
"if",
"it",
"s",
"found",
"in",
"the",
"cache",
".",
"Otherwise",
"this",
"method",
"returns",
"a",
"newly",
"cached",
"instance",
"for",
"the",
"given",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormatSymbols.java#L456-L474 |
35,105 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormatSymbols.java | DateFormatSymbols.copyMembers | private final void copyMembers(DateFormatSymbols src, DateFormatSymbols dst)
{
dst.eras = Arrays.copyOf(src.eras, src.eras.length);
dst.months = Arrays.copyOf(src.months, src.months.length);
dst.shortMonths = Arrays.copyOf(src.shortMonths, src.shortMonths.length);
dst.weekdays = Arra... | java | private final void copyMembers(DateFormatSymbols src, DateFormatSymbols dst)
{
dst.eras = Arrays.copyOf(src.eras, src.eras.length);
dst.months = Arrays.copyOf(src.months, src.months.length);
dst.shortMonths = Arrays.copyOf(src.shortMonths, src.shortMonths.length);
dst.weekdays = Arra... | [
"private",
"final",
"void",
"copyMembers",
"(",
"DateFormatSymbols",
"src",
",",
"DateFormatSymbols",
"dst",
")",
"{",
"dst",
".",
"eras",
"=",
"Arrays",
".",
"copyOf",
"(",
"src",
".",
"eras",
",",
"src",
".",
"eras",
".",
"length",
")",
";",
"dst",
"... | Clones all the data members from the source DateFormatSymbols to
the target DateFormatSymbols. This is only for subclasses.
@param src the source DateFormatSymbols.
@param dst the target DateFormatSymbols. | [
"Clones",
"all",
"the",
"data",
"members",
"from",
"the",
"source",
"DateFormatSymbols",
"to",
"the",
"target",
"DateFormatSymbols",
".",
"This",
"is",
"only",
"for",
"subclasses",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/DateFormatSymbols.java#L926-L951 |
35,106 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/TrustAnchor.java | TrustAnchor.setNameConstraints | private void setNameConstraints(byte[] bytes) {
if (bytes == null) {
ncBytes = null;
nc = null;
} else {
ncBytes = bytes.clone();
// validate DER encoding
try {
nc = new NameConstraintsExtension(Boolean.FALSE, bytes);
... | java | private void setNameConstraints(byte[] bytes) {
if (bytes == null) {
ncBytes = null;
nc = null;
} else {
ncBytes = bytes.clone();
// validate DER encoding
try {
nc = new NameConstraintsExtension(Boolean.FALSE, bytes);
... | [
"private",
"void",
"setNameConstraints",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"ncBytes",
"=",
"null",
";",
"nc",
"=",
"null",
";",
"}",
"else",
"{",
"ncBytes",
"=",
"bytes",
".",
"clone",
"(",
")",
... | Decode the name constraints and clone them if not null. | [
"Decode",
"the",
"name",
"constraints",
"and",
"clone",
"them",
"if",
"not",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/cert/TrustAnchor.java#L272-L288 |
35,107 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java | SynchronousQueue.put | public void put(E e) throws InterruptedException {
if (e == null) throw new NullPointerException();
if (transferer.transfer(e, false, 0) == null) {
Thread.interrupted();
throw new InterruptedException();
}
} | java | public void put(E e) throws InterruptedException {
if (e == null) throw new NullPointerException();
if (transferer.transfer(e, false, 0) == null) {
Thread.interrupted();
throw new InterruptedException();
}
} | [
"public",
"void",
"put",
"(",
"E",
"e",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"e",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"if",
"(",
"transferer",
".",
"transfer",
"(",
"e",
",",
"false",
",",
"0",
... | Adds the specified element to this queue, waiting if necessary for
another thread to receive it.
@throws InterruptedException {@inheritDoc}
@throws NullPointerException {@inheritDoc} | [
"Adds",
"the",
"specified",
"element",
"to",
"this",
"queue",
"waiting",
"if",
"necessary",
"for",
"another",
"thread",
"to",
"receive",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java#L878-L884 |
35,108 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java | SynchronousQueue.offer | public boolean offer(E e, long timeout, TimeUnit unit)
throws InterruptedException {
if (e == null) throw new NullPointerException();
if (transferer.transfer(e, true, unit.toNanos(timeout)) != null)
return true;
if (!Thread.interrupted())
return false;
thr... | java | public boolean offer(E e, long timeout, TimeUnit unit)
throws InterruptedException {
if (e == null) throw new NullPointerException();
if (transferer.transfer(e, true, unit.toNanos(timeout)) != null)
return true;
if (!Thread.interrupted())
return false;
thr... | [
"public",
"boolean",
"offer",
"(",
"E",
"e",
",",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"e",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"if",
"(",
"transferer",
"... | Inserts the specified element into this queue, waiting if necessary
up to the specified wait time for another thread to receive it.
@return {@code true} if successful, or {@code false} if the
specified waiting time elapses before a consumer appears
@throws InterruptedException {@inheritDoc}
@throws NullPointerExceptio... | [
"Inserts",
"the",
"specified",
"element",
"into",
"this",
"queue",
"waiting",
"if",
"necessary",
"up",
"to",
"the",
"specified",
"wait",
"time",
"for",
"another",
"thread",
"to",
"receive",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java#L895-L903 |
35,109 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java | SynchronousQueue.offer | public boolean offer(E e) {
if (e == null) throw new NullPointerException();
return transferer.transfer(e, true, 0) != null;
} | java | public boolean offer(E e) {
if (e == null) throw new NullPointerException();
return transferer.transfer(e, true, 0) != null;
} | [
"public",
"boolean",
"offer",
"(",
"E",
"e",
")",
"{",
"if",
"(",
"e",
"==",
"null",
")",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"return",
"transferer",
".",
"transfer",
"(",
"e",
",",
"true",
",",
"0",
")",
"!=",
"null",
";",
"}"
] | Inserts the specified element into this queue, if another thread is
waiting to receive it.
@param e the element to add
@return {@code true} if the element was added to this queue, else
{@code false}
@throws NullPointerException if the specified element is null | [
"Inserts",
"the",
"specified",
"element",
"into",
"this",
"queue",
"if",
"another",
"thread",
"is",
"waiting",
"to",
"receive",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java#L914-L917 |
35,110 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java | SynchronousQueue.take | public E take() throws InterruptedException {
E e = transferer.transfer(null, false, 0);
if (e != null)
return e;
Thread.interrupted();
throw new InterruptedException();
} | java | public E take() throws InterruptedException {
E e = transferer.transfer(null, false, 0);
if (e != null)
return e;
Thread.interrupted();
throw new InterruptedException();
} | [
"public",
"E",
"take",
"(",
")",
"throws",
"InterruptedException",
"{",
"E",
"e",
"=",
"transferer",
".",
"transfer",
"(",
"null",
",",
"false",
",",
"0",
")",
";",
"if",
"(",
"e",
"!=",
"null",
")",
"return",
"e",
";",
"Thread",
".",
"interrupted",
... | Retrieves and removes the head of this queue, waiting if necessary
for another thread to insert it.
@return the head of this queue
@throws InterruptedException {@inheritDoc} | [
"Retrieves",
"and",
"removes",
"the",
"head",
"of",
"this",
"queue",
"waiting",
"if",
"necessary",
"for",
"another",
"thread",
"to",
"insert",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java#L926-L932 |
35,111 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java | SynchronousQueue.poll | public E poll(long timeout, TimeUnit unit) throws InterruptedException {
E e = transferer.transfer(null, true, unit.toNanos(timeout));
if (e != null || !Thread.interrupted())
return e;
throw new InterruptedException();
} | java | public E poll(long timeout, TimeUnit unit) throws InterruptedException {
E e = transferer.transfer(null, true, unit.toNanos(timeout));
if (e != null || !Thread.interrupted())
return e;
throw new InterruptedException();
} | [
"public",
"E",
"poll",
"(",
"long",
"timeout",
",",
"TimeUnit",
"unit",
")",
"throws",
"InterruptedException",
"{",
"E",
"e",
"=",
"transferer",
".",
"transfer",
"(",
"null",
",",
"true",
",",
"unit",
".",
"toNanos",
"(",
"timeout",
")",
")",
";",
"if"... | Retrieves and removes the head of this queue, waiting
if necessary up to the specified wait time, for another thread
to insert it.
@return the head of this queue, or {@code null} if the
specified waiting time elapses before an element is present
@throws InterruptedException {@inheritDoc} | [
"Retrieves",
"and",
"removes",
"the",
"head",
"of",
"this",
"queue",
"waiting",
"if",
"necessary",
"up",
"to",
"the",
"specified",
"wait",
"time",
"for",
"another",
"thread",
"to",
"insert",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/SynchronousQueue.java#L943-L948 |
35,112 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java | Security.insertProviderAt | public static synchronized int insertProviderAt(Provider provider,
int position) {
String providerName = provider.getName();
check("insertProvider." + providerName);
ProviderList list = Providers.getFullProviderList();
ProviderList newList = ProviderList.insertAt(list, provid... | java | public static synchronized int insertProviderAt(Provider provider,
int position) {
String providerName = provider.getName();
check("insertProvider." + providerName);
ProviderList list = Providers.getFullProviderList();
ProviderList newList = ProviderList.insertAt(list, provid... | [
"public",
"static",
"synchronized",
"int",
"insertProviderAt",
"(",
"Provider",
"provider",
",",
"int",
"position",
")",
"{",
"String",
"providerName",
"=",
"provider",
".",
"getName",
"(",
")",
";",
"check",
"(",
"\"insertProvider.\"",
"+",
"providerName",
")",... | Adds a new provider, at a specified position. The position is
the preference order in which providers are searched for
requested algorithms. The position is 1-based, that is,
1 is most preferred, followed by 2, and so on.
<p>If the given provider is installed at the requested position,
the provider that used to be at... | [
"Adds",
"a",
"new",
"provider",
"at",
"a",
"specified",
"position",
".",
"The",
"position",
"is",
"the",
"preference",
"order",
"in",
"which",
"providers",
"are",
"searched",
"for",
"requested",
"algorithms",
".",
"The",
"position",
"is",
"1",
"-",
"based",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java#L234-L246 |
35,113 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java | Security.removeProvider | public static synchronized void removeProvider(String name) {
check("removeProvider." + name);
ProviderList list = Providers.getFullProviderList();
ProviderList newList = ProviderList.remove(list, name);
Providers.setProviderList(newList);
increaseVersion();
} | java | public static synchronized void removeProvider(String name) {
check("removeProvider." + name);
ProviderList list = Providers.getFullProviderList();
ProviderList newList = ProviderList.remove(list, name);
Providers.setProviderList(newList);
increaseVersion();
} | [
"public",
"static",
"synchronized",
"void",
"removeProvider",
"(",
"String",
"name",
")",
"{",
"check",
"(",
"\"removeProvider.\"",
"+",
"name",
")",
";",
"ProviderList",
"list",
"=",
"Providers",
".",
"getFullProviderList",
"(",
")",
";",
"ProviderList",
"newLi... | Removes the provider with the specified name.
<p>When the specified provider is removed, all providers located
at a position greater than where the specified provider was are shifted
down one position (towards the head of the list of installed
providers).
<p>This method returns silently if the provider is not install... | [
"Removes",
"the",
"provider",
"with",
"the",
"specified",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java#L321-L327 |
35,114 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java | Security.getProperty | public static String getProperty(String key) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SecurityPermission("getProperty."+
key));
}
String name = props.getProperty(key);
... | java | public static String getProperty(String key) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SecurityPermission("getProperty."+
key));
}
String name = props.getProperty(key);
... | [
"public",
"static",
"String",
"getProperty",
"(",
"String",
"key",
")",
"{",
"SecurityManager",
"sm",
"=",
"System",
".",
"getSecurityManager",
"(",
")",
";",
"if",
"(",
"sm",
"!=",
"null",
")",
"{",
"sm",
".",
"checkPermission",
"(",
"new",
"SecurityPermi... | Gets a security property value.
<p>First, if there is a security manager, its
<code>checkPermission</code> method is called with a
<code>java.security.SecurityPermission("getProperty."+key)</code>
permission to see if it's ok to retrieve the specified
security property value..
@param key the key of the property bein... | [
"Gets",
"a",
"security",
"property",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java#L636-L646 |
35,115 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java | Security.setProperty | public static void setProperty(String key, String datum) {
check("setProperty."+key);
props.put(key, datum);
increaseVersion();
invalidateSMCache(key); /* See below. */
} | java | public static void setProperty(String key, String datum) {
check("setProperty."+key);
props.put(key, datum);
increaseVersion();
invalidateSMCache(key); /* See below. */
} | [
"public",
"static",
"void",
"setProperty",
"(",
"String",
"key",
",",
"String",
"datum",
")",
"{",
"check",
"(",
"\"setProperty.\"",
"+",
"key",
")",
";",
"props",
".",
"put",
"(",
"key",
",",
"datum",
")",
";",
"increaseVersion",
"(",
")",
";",
"inval... | Sets a security property value.
<p>First, if there is a security manager, its
<code>checkPermission</code> method is called with a
<code>java.security.SecurityPermission("setProperty."+key)</code>
permission to see if it's ok to set the specified
security property value.
@param key the name of the property to be set.... | [
"Sets",
"a",
"security",
"property",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/security/Security.java#L670-L675 |
35,116 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipCoder.java | ZipCoder.getBytesUTF8 | byte[] getBytesUTF8(String s) {
if (isUTF8)
return getBytes(s);
if (utf8 == null)
utf8 = new ZipCoder(StandardCharsets.UTF_8);
return utf8.getBytes(s);
} | java | byte[] getBytesUTF8(String s) {
if (isUTF8)
return getBytes(s);
if (utf8 == null)
utf8 = new ZipCoder(StandardCharsets.UTF_8);
return utf8.getBytes(s);
} | [
"byte",
"[",
"]",
"getBytesUTF8",
"(",
"String",
"s",
")",
"{",
"if",
"(",
"isUTF8",
")",
"return",
"getBytes",
"(",
"s",
")",
";",
"if",
"(",
"utf8",
"==",
"null",
")",
"utf8",
"=",
"new",
"ZipCoder",
"(",
"StandardCharsets",
".",
"UTF_8",
")",
";... | assume invoked only if "this" is not utf8 | [
"assume",
"invoked",
"only",
"if",
"this",
"is",
"not",
"utf8"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipCoder.java#L109-L115 |
35,117 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Period.java | Period.validateChrono | private void validateChrono(TemporalAccessor temporal) {
Objects.requireNonNull(temporal, "temporal");
Chronology temporalChrono = temporal.query(TemporalQueries.chronology());
if (temporalChrono != null && IsoChronology.INSTANCE.equals(temporalChrono) == false) {
throw new DateTimeE... | java | private void validateChrono(TemporalAccessor temporal) {
Objects.requireNonNull(temporal, "temporal");
Chronology temporalChrono = temporal.query(TemporalQueries.chronology());
if (temporalChrono != null && IsoChronology.INSTANCE.equals(temporalChrono) == false) {
throw new DateTimeE... | [
"private",
"void",
"validateChrono",
"(",
"TemporalAccessor",
"temporal",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"temporal",
",",
"\"temporal\"",
")",
";",
"Chronology",
"temporalChrono",
"=",
"temporal",
".",
"query",
"(",
"TemporalQueries",
".",
"chron... | Validates that the temporal has the correct chronology. | [
"Validates",
"that",
"the",
"temporal",
"has",
"the",
"correct",
"chronology",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Period.java#L961-L967 |
35,118 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java | SimpleDateFormat.format | private StringBuffer format(Date date, StringBuffer toAppendTo,
FieldDelegate delegate) {
// Convert input date to time field list
calendar.setTime(date);
boolean useDateFormatSymbols = useDateFormatSymbols();
for (int i = 0; i < compiledPattern.length; ... | java | private StringBuffer format(Date date, StringBuffer toAppendTo,
FieldDelegate delegate) {
// Convert input date to time field list
calendar.setTime(date);
boolean useDateFormatSymbols = useDateFormatSymbols();
for (int i = 0; i < compiledPattern.length; ... | [
"private",
"StringBuffer",
"format",
"(",
"Date",
"date",
",",
"StringBuffer",
"toAppendTo",
",",
"FieldDelegate",
"delegate",
")",
"{",
"// Convert input date to time field list",
"calendar",
".",
"setTime",
"(",
"date",
")",
";",
"boolean",
"useDateFormatSymbols",
"... | Called from Format after creating a FieldDelegate | [
"Called",
"from",
"Format",
"after",
"creating",
"a",
"FieldDelegate"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java#L951-L982 |
35,119 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java | SimpleDateFormat.matchString | private int matchString(String text, int start, int field, String[] data, CalendarBuilder calb)
{
int i = 0;
int count = data.length;
if (field == Calendar.DAY_OF_WEEK) i = 1;
// There may be multiple strings in the data[] array which begin with
// the same prefix (e.g., Ce... | java | private int matchString(String text, int start, int field, String[] data, CalendarBuilder calb)
{
int i = 0;
int count = data.length;
if (field == Calendar.DAY_OF_WEEK) i = 1;
// There may be multiple strings in the data[] array which begin with
// the same prefix (e.g., Ce... | [
"private",
"int",
"matchString",
"(",
"String",
"text",
",",
"int",
"start",
",",
"int",
"field",
",",
"String",
"[",
"]",
"data",
",",
"CalendarBuilder",
"calb",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"count",
"=",
"data",
".",
"length",
";",
... | Private code-size reduction function used by subParse.
@param text the time text being parsed.
@param start where to start parsing.
@param field the date field being parsed.
@param data the string array to parsed.
@return the new start position if matching succeeded; a negative number
indicating matching failure, other... | [
"Private",
"code",
"-",
"size",
"reduction",
"function",
"used",
"by",
"subParse",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java#L1581-L1620 |
35,120 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java | SimpleDateFormat.subParseZoneString | private int subParseZoneString(String text, int start, CalendarBuilder calb) {
boolean useSameName = false; // true if standard and daylight time use the same abbreviation.
TimeZone currentTimeZone = getTimeZone();
// At this point, check for named time zones by looking through
// the l... | java | private int subParseZoneString(String text, int start, CalendarBuilder calb) {
boolean useSameName = false; // true if standard and daylight time use the same abbreviation.
TimeZone currentTimeZone = getTimeZone();
// At this point, check for named time zones by looking through
// the l... | [
"private",
"int",
"subParseZoneString",
"(",
"String",
"text",
",",
"int",
"start",
",",
"CalendarBuilder",
"calb",
")",
"{",
"boolean",
"useSameName",
"=",
"false",
";",
"// true if standard and daylight time use the same abbreviation.",
"TimeZone",
"currentTimeZone",
"=... | find time zone 'text' matched zoneStrings and set to internal
calendar. | [
"find",
"time",
"zone",
"text",
"matched",
"zoneStrings",
"and",
"set",
"to",
"internal",
"calendar",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java#L1677-L1742 |
35,121 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java | SimpleDateFormat.applyLocalizedPattern | public void applyLocalizedPattern(String pattern) {
String p = translatePattern(pattern,
formatData.getLocalPatternChars(),
DateFormatSymbols.patternChars);
compiledPattern = compile(p);
this.pattern = p;
} | java | public void applyLocalizedPattern(String pattern) {
String p = translatePattern(pattern,
formatData.getLocalPatternChars(),
DateFormatSymbols.patternChars);
compiledPattern = compile(p);
this.pattern = p;
} | [
"public",
"void",
"applyLocalizedPattern",
"(",
"String",
"pattern",
")",
"{",
"String",
"p",
"=",
"translatePattern",
"(",
"pattern",
",",
"formatData",
".",
"getLocalPatternChars",
"(",
")",
",",
"DateFormatSymbols",
".",
"patternChars",
")",
";",
"compiledPatte... | Applies the given localized pattern string to this date format.
@param pattern a String to be mapped to the new date and time format
pattern for this format
@exception NullPointerException if the given pattern is null
@exception IllegalArgumentException if the given pattern is invalid | [
"Applies",
"the",
"given",
"localized",
"pattern",
"string",
"to",
"this",
"date",
"format",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/text/SimpleDateFormat.java#L2363-L2369 |
35,122 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/DataEnqueuedOutputStream.java | DataEnqueuedOutputStream.offerData | @Override
public void offerData(OutputStream stream) {
byte[] next = null;
try {
next = queue.poll(timeoutMillis, TimeUnit.MILLISECONDS);
} catch (InterruptedException ignored) {
// If this ever times out (unlikely given our assumption), next stays null.
}
try {
// Only if next ... | java | @Override
public void offerData(OutputStream stream) {
byte[] next = null;
try {
next = queue.poll(timeoutMillis, TimeUnit.MILLISECONDS);
} catch (InterruptedException ignored) {
// If this ever times out (unlikely given our assumption), next stays null.
}
try {
// Only if next ... | [
"@",
"Override",
"public",
"void",
"offerData",
"(",
"OutputStream",
"stream",
")",
"{",
"byte",
"[",
"]",
"next",
"=",
"null",
";",
"try",
"{",
"next",
"=",
"queue",
".",
"poll",
"(",
"timeoutMillis",
",",
"TimeUnit",
".",
"MILLISECONDS",
")",
";",
"}... | Offers data from the queue to the OutputStream piped to the adapted NSInputStream. | [
"Offers",
"data",
"from",
"the",
"queue",
"to",
"the",
"OutputStream",
"piped",
"to",
"the",
"adapted",
"NSInputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/DataEnqueuedOutputStream.java#L128-L153 |
35,123 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java | DeadCodeEliminator.eliminateDeadCode | private void eliminateDeadCode(TypeElement type, AbstractTypeDeclaration node) {
List<BodyDeclaration> decls = node.getBodyDeclarations();
String clazz = elementUtil.getBinaryName(type);
if (deadCodeMap.containsClass(clazz)) {
stripClass(node);
} else {
removeDeadMethods(clazz, decls);
... | java | private void eliminateDeadCode(TypeElement type, AbstractTypeDeclaration node) {
List<BodyDeclaration> decls = node.getBodyDeclarations();
String clazz = elementUtil.getBinaryName(type);
if (deadCodeMap.containsClass(clazz)) {
stripClass(node);
} else {
removeDeadMethods(clazz, decls);
... | [
"private",
"void",
"eliminateDeadCode",
"(",
"TypeElement",
"type",
",",
"AbstractTypeDeclaration",
"node",
")",
"{",
"List",
"<",
"BodyDeclaration",
">",
"decls",
"=",
"node",
".",
"getBodyDeclarations",
"(",
")",
";",
"String",
"clazz",
"=",
"elementUtil",
"."... | Remove dead members from a type. | [
"Remove",
"dead",
"members",
"from",
"a",
"type",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java#L86-L95 |
35,124 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java | DeadCodeEliminator.removeDeadMethods | private void removeDeadMethods(String clazz, List<BodyDeclaration> declarations) {
Iterator<BodyDeclaration> declarationsIter = declarations.iterator();
while (declarationsIter.hasNext()) {
BodyDeclaration declaration = declarationsIter.next();
if (declaration instanceof MethodDeclaration) {
... | java | private void removeDeadMethods(String clazz, List<BodyDeclaration> declarations) {
Iterator<BodyDeclaration> declarationsIter = declarations.iterator();
while (declarationsIter.hasNext()) {
BodyDeclaration declaration = declarationsIter.next();
if (declaration instanceof MethodDeclaration) {
... | [
"private",
"void",
"removeDeadMethods",
"(",
"String",
"clazz",
",",
"List",
"<",
"BodyDeclaration",
">",
"declarations",
")",
"{",
"Iterator",
"<",
"BodyDeclaration",
">",
"declarationsIter",
"=",
"declarations",
".",
"iterator",
"(",
")",
";",
"while",
"(",
... | Remove dead methods from a type's body declarations. | [
"Remove",
"dead",
"methods",
"from",
"a",
"type",
"s",
"body",
"declarations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java#L160-L180 |
35,125 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java | DeadCodeEliminator.removeMethodOCNI | private void removeMethodOCNI(MethodDeclaration method) {
int methodStart = method.getStartPosition();
String src = unit.getSource().substring(methodStart, methodStart + method.getLength());
if (src.contains("/*-[")) {
int ocniStart = methodStart + src.indexOf("/*-[");
Iterator<Comment> comments... | java | private void removeMethodOCNI(MethodDeclaration method) {
int methodStart = method.getStartPosition();
String src = unit.getSource().substring(methodStart, methodStart + method.getLength());
if (src.contains("/*-[")) {
int ocniStart = methodStart + src.indexOf("/*-[");
Iterator<Comment> comments... | [
"private",
"void",
"removeMethodOCNI",
"(",
"MethodDeclaration",
"method",
")",
"{",
"int",
"methodStart",
"=",
"method",
".",
"getStartPosition",
"(",
")",
";",
"String",
"src",
"=",
"unit",
".",
"getSource",
"(",
")",
".",
"substring",
"(",
"methodStart",
... | Remove the OCNI comment associated with a native method, if it exists. | [
"Remove",
"the",
"OCNI",
"comment",
"associated",
"with",
"a",
"native",
"method",
"if",
"it",
"exists",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java#L185-L199 |
35,126 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java | DeadCodeEliminator.removeDeadFields | private void removeDeadFields(String clazz, List<BodyDeclaration> declarations) {
Iterator<BodyDeclaration> declarationsIter = declarations.iterator();
while (declarationsIter.hasNext()) {
BodyDeclaration declaration = declarationsIter.next();
if (declaration instanceof FieldDeclaration) {
F... | java | private void removeDeadFields(String clazz, List<BodyDeclaration> declarations) {
Iterator<BodyDeclaration> declarationsIter = declarations.iterator();
while (declarationsIter.hasNext()) {
BodyDeclaration declaration = declarationsIter.next();
if (declaration instanceof FieldDeclaration) {
F... | [
"private",
"void",
"removeDeadFields",
"(",
"String",
"clazz",
",",
"List",
"<",
"BodyDeclaration",
">",
"declarations",
")",
"{",
"Iterator",
"<",
"BodyDeclaration",
">",
"declarationsIter",
"=",
"declarations",
".",
"iterator",
"(",
")",
";",
"while",
"(",
"... | Deletes non-constant dead fields from a type's body declarations list. | [
"Deletes",
"non",
"-",
"constant",
"dead",
"fields",
"from",
"a",
"type",
"s",
"body",
"declarations",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java#L204-L227 |
35,127 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java | DeadCodeEliminator.removeDeadClasses | public static void removeDeadClasses(CompilationUnit unit, CodeReferenceMap deadCodeMap) {
ElementUtil elementUtil = unit.getEnv().elementUtil();
Iterator<AbstractTypeDeclaration> iter = unit.getTypes().iterator();
while (iter.hasNext()) {
AbstractTypeDeclaration type = iter.next();
TypeElement ... | java | public static void removeDeadClasses(CompilationUnit unit, CodeReferenceMap deadCodeMap) {
ElementUtil elementUtil = unit.getEnv().elementUtil();
Iterator<AbstractTypeDeclaration> iter = unit.getTypes().iterator();
while (iter.hasNext()) {
AbstractTypeDeclaration type = iter.next();
TypeElement ... | [
"public",
"static",
"void",
"removeDeadClasses",
"(",
"CompilationUnit",
"unit",
",",
"CodeReferenceMap",
"deadCodeMap",
")",
"{",
"ElementUtil",
"elementUtil",
"=",
"unit",
".",
"getEnv",
"(",
")",
".",
"elementUtil",
"(",
")",
";",
"Iterator",
"<",
"AbstractTy... | Remove empty classes marked as dead. This needs to be done after translation
to avoid inner class references in the AST returned by DeadCodeEliminator. | [
"Remove",
"empty",
"classes",
"marked",
"as",
"dead",
".",
"This",
"needs",
"to",
"be",
"done",
"after",
"translation",
"to",
"avoid",
"inner",
"class",
"references",
"in",
"the",
"AST",
"returned",
"by",
"DeadCodeEliminator",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java#L233-L258 |
35,128 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java | TreeUtil.moveList | public static <T> void moveList(List<T> fromList, List<T> toList) {
for (Iterator<T> iter = fromList.iterator(); iter.hasNext(); ) {
T elem = iter.next();
iter.remove();
toList.add(elem);
}
} | java | public static <T> void moveList(List<T> fromList, List<T> toList) {
for (Iterator<T> iter = fromList.iterator(); iter.hasNext(); ) {
T elem = iter.next();
iter.remove();
toList.add(elem);
}
} | [
"public",
"static",
"<",
"T",
">",
"void",
"moveList",
"(",
"List",
"<",
"T",
">",
"fromList",
",",
"List",
"<",
"T",
">",
"toList",
")",
"{",
"for",
"(",
"Iterator",
"<",
"T",
">",
"iter",
"=",
"fromList",
".",
"iterator",
"(",
")",
";",
"iter",... | Moves nodes from one list to another, ensuring that they are not
double-parented in the process. | [
"Moves",
"nodes",
"from",
"one",
"list",
"to",
"another",
"ensuring",
"that",
"they",
"are",
"not",
"double",
"-",
"parented",
"in",
"the",
"process",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java#L64-L70 |
35,129 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java | TreeUtil.trimParentheses | public static Expression trimParentheses(Expression node) {
while (node instanceof ParenthesizedExpression) {
node = ((ParenthesizedExpression) node).getExpression();
}
return node;
} | java | public static Expression trimParentheses(Expression node) {
while (node instanceof ParenthesizedExpression) {
node = ((ParenthesizedExpression) node).getExpression();
}
return node;
} | [
"public",
"static",
"Expression",
"trimParentheses",
"(",
"Expression",
"node",
")",
"{",
"while",
"(",
"node",
"instanceof",
"ParenthesizedExpression",
")",
"{",
"node",
"=",
"(",
"(",
"ParenthesizedExpression",
")",
"node",
")",
".",
"getExpression",
"(",
")",... | Returns the first descendant of the given node that is not a ParenthesizedExpression. | [
"Returns",
"the",
"first",
"descendant",
"of",
"the",
"given",
"node",
"that",
"is",
"not",
"a",
"ParenthesizedExpression",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java#L126-L131 |
35,130 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java | TreeUtil.getDeclaredElement | public static Element getDeclaredElement(TreeNode node) {
if (node instanceof AbstractTypeDeclaration) {
return ((AbstractTypeDeclaration) node).getTypeElement();
} else if (node instanceof MethodDeclaration) {
return ((MethodDeclaration) node).getExecutableElement();
} else if (node instanceof ... | java | public static Element getDeclaredElement(TreeNode node) {
if (node instanceof AbstractTypeDeclaration) {
return ((AbstractTypeDeclaration) node).getTypeElement();
} else if (node instanceof MethodDeclaration) {
return ((MethodDeclaration) node).getExecutableElement();
} else if (node instanceof ... | [
"public",
"static",
"Element",
"getDeclaredElement",
"(",
"TreeNode",
"node",
")",
"{",
"if",
"(",
"node",
"instanceof",
"AbstractTypeDeclaration",
")",
"{",
"return",
"(",
"(",
"AbstractTypeDeclaration",
")",
"node",
")",
".",
"getTypeElement",
"(",
")",
";",
... | Gets the element that is declared by this node. | [
"Gets",
"the",
"element",
"that",
"is",
"declared",
"by",
"this",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java#L228-L237 |
35,131 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java | TreeUtil.getVariableElement | public static VariableElement getVariableElement(Expression node) {
node = trimParentheses(node);
switch (node.getKind()) {
case FIELD_ACCESS:
return ((FieldAccess) node).getVariableElement();
case SUPER_FIELD_ACCESS:
return ((SuperFieldAccess) node).getVariableElement();
case ... | java | public static VariableElement getVariableElement(Expression node) {
node = trimParentheses(node);
switch (node.getKind()) {
case FIELD_ACCESS:
return ((FieldAccess) node).getVariableElement();
case SUPER_FIELD_ACCESS:
return ((SuperFieldAccess) node).getVariableElement();
case ... | [
"public",
"static",
"VariableElement",
"getVariableElement",
"(",
"Expression",
"node",
")",
"{",
"node",
"=",
"trimParentheses",
"(",
"node",
")",
";",
"switch",
"(",
"node",
".",
"getKind",
"(",
")",
")",
"{",
"case",
"FIELD_ACCESS",
":",
"return",
"(",
... | Gets a variable element for the given expression if the expression
represents a variable. Returns null otherwise. | [
"Gets",
"a",
"variable",
"element",
"for",
"the",
"given",
"expression",
"if",
"the",
"expression",
"represents",
"a",
"variable",
".",
"Returns",
"null",
"otherwise",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java#L243-L256 |
35,132 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java | TreeUtil.getQualifiedMainTypeName | public static String getQualifiedMainTypeName(CompilationUnit unit) {
PackageDeclaration pkg = unit.getPackage();
if (pkg.isDefaultPackage()) {
return unit.getMainTypeName();
} else {
return pkg.getName().getFullyQualifiedName() + '.' + unit.getMainTypeName();
}
} | java | public static String getQualifiedMainTypeName(CompilationUnit unit) {
PackageDeclaration pkg = unit.getPackage();
if (pkg.isDefaultPackage()) {
return unit.getMainTypeName();
} else {
return pkg.getName().getFullyQualifiedName() + '.' + unit.getMainTypeName();
}
} | [
"public",
"static",
"String",
"getQualifiedMainTypeName",
"(",
"CompilationUnit",
"unit",
")",
"{",
"PackageDeclaration",
"pkg",
"=",
"unit",
".",
"getPackage",
"(",
")",
";",
"if",
"(",
"pkg",
".",
"isDefaultPackage",
"(",
")",
")",
"{",
"return",
"unit",
"... | Gets the fully qualified name of the main type in this compilation unit. | [
"Gets",
"the",
"fully",
"qualified",
"name",
"of",
"the",
"main",
"type",
"in",
"this",
"compilation",
"unit",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java#L299-L306 |
35,133 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java | TreeUtil.asStatementList | public static List<Statement> asStatementList(Statement node) {
if (node instanceof Block) {
return ((Block) node).getStatements();
}
TreeNode parent = node.getParent();
if (parent instanceof Block) {
List<Statement> stmts = ((Block) parent).getStatements();
for (int i = 0; i < stmts.s... | java | public static List<Statement> asStatementList(Statement node) {
if (node instanceof Block) {
return ((Block) node).getStatements();
}
TreeNode parent = node.getParent();
if (parent instanceof Block) {
List<Statement> stmts = ((Block) parent).getStatements();
for (int i = 0; i < stmts.s... | [
"public",
"static",
"List",
"<",
"Statement",
">",
"asStatementList",
"(",
"Statement",
"node",
")",
"{",
"if",
"(",
"node",
"instanceof",
"Block",
")",
"{",
"return",
"(",
"(",
"Block",
")",
"node",
")",
".",
"getStatements",
"(",
")",
";",
"}",
"Tree... | Returns the given statement as a list of statements that can be added to.
If node is a Block, then returns it's statement list. If node is the direct
child of a Block, returns the sublist containing node as the only element.
Otherwise, creates a new Block node in the place of node and returns its
list of statements. | [
"Returns",
"the",
"given",
"statement",
"as",
"a",
"list",
"of",
"statements",
"that",
"can",
"be",
"added",
"to",
".",
"If",
"node",
"is",
"a",
"Block",
"then",
"returns",
"it",
"s",
"statement",
"list",
".",
"If",
"node",
"is",
"the",
"direct",
"chil... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/TreeUtil.java#L323-L337 |
35,134 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java | DOMErrorHandlerImpl.handleError | public boolean handleError(DOMError error) {
boolean fail = true;
String severity = null;
if (error.getSeverity() == DOMError.SEVERITY_WARNING) {
fail = false;
severity = "[Warning]";
} else if (error.getSeverity() == DOMError.SEVERITY_ERROR) {
severit... | java | public boolean handleError(DOMError error) {
boolean fail = true;
String severity = null;
if (error.getSeverity() == DOMError.SEVERITY_WARNING) {
fail = false;
severity = "[Warning]";
} else if (error.getSeverity() == DOMError.SEVERITY_ERROR) {
severit... | [
"public",
"boolean",
"handleError",
"(",
"DOMError",
"error",
")",
"{",
"boolean",
"fail",
"=",
"true",
";",
"String",
"severity",
"=",
"null",
";",
"if",
"(",
"error",
".",
"getSeverity",
"(",
")",
"==",
"DOMError",
".",
"SEVERITY_WARNING",
")",
"{",
"f... | Implementation of DOMErrorHandler.handleError that
adds copy of error to list for later retrieval. | [
"Implementation",
"of",
"DOMErrorHandler",
".",
"handleError",
"that",
"adds",
"copy",
"of",
"error",
"to",
"list",
"for",
"later",
"retrieval",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java#L47-L65 |
35,135 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/VersionInfo.java | VersionInfo.main | public static void main(String[] args) {
String icuApiVer;
if (ICU_VERSION.getMajor() <= 4) {
if (ICU_VERSION.getMinor() % 2 != 0) {
// Development mile stone
int major = ICU_VERSION.getMajor();
int minor = ICU_VERSION.getMinor() + 1;
... | java | public static void main(String[] args) {
String icuApiVer;
if (ICU_VERSION.getMajor() <= 4) {
if (ICU_VERSION.getMinor() % 2 != 0) {
// Development mile stone
int major = ICU_VERSION.getMajor();
int minor = ICU_VERSION.getMinor() + 1;
... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"String",
"icuApiVer",
";",
"if",
"(",
"ICU_VERSION",
".",
"getMajor",
"(",
")",
"<=",
"4",
")",
"{",
"if",
"(",
"ICU_VERSION",
".",
"getMinor",
"(",
")",
"%",
"2",
"!="... | Main method prints out ICU version information
@param args arguments (currently not used)
@hide unsupported on Android | [
"Main",
"method",
"prints",
"out",
"ICU",
"version",
"information"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/VersionInfo.java#L562-L595 |
35,136 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NumberingSystem.java | NumberingSystem.getInstance | public static NumberingSystem getInstance(ULocale locale) {
// Check for @numbers
boolean nsResolved = true;
String numbersKeyword = locale.getKeywordValue("numbers");
if (numbersKeyword != null ) {
for ( String keyword : OTHER_NS_KEYWORDS ) {
if ( numbersKeyw... | java | public static NumberingSystem getInstance(ULocale locale) {
// Check for @numbers
boolean nsResolved = true;
String numbersKeyword = locale.getKeywordValue("numbers");
if (numbersKeyword != null ) {
for ( String keyword : OTHER_NS_KEYWORDS ) {
if ( numbersKeyw... | [
"public",
"static",
"NumberingSystem",
"getInstance",
"(",
"ULocale",
"locale",
")",
"{",
"// Check for @numbers",
"boolean",
"nsResolved",
"=",
"true",
";",
"String",
"numbersKeyword",
"=",
"locale",
".",
"getKeywordValue",
"(",
"\"numbers\"",
")",
";",
"if",
"("... | Returns the default numbering system for the specified ULocale. | [
"Returns",
"the",
"default",
"numbering",
"system",
"for",
"the",
"specified",
"ULocale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NumberingSystem.java#L110-L145 |
35,137 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NumberingSystem.java | NumberingSystem.getAvailableNames | public static String [] getAvailableNames() {
UResourceBundle numberingSystemsInfo = UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, "numberingSystems");
UResourceBundle nsCurrent = numberingSystemsInfo.get("numberingSystems");
UResourceBundle temp;
String nsNa... | java | public static String [] getAvailableNames() {
UResourceBundle numberingSystemsInfo = UResourceBundle.getBundleInstance(ICUData.ICU_BASE_NAME, "numberingSystems");
UResourceBundle nsCurrent = numberingSystemsInfo.get("numberingSystems");
UResourceBundle temp;
String nsNa... | [
"public",
"static",
"String",
"[",
"]",
"getAvailableNames",
"(",
")",
"{",
"UResourceBundle",
"numberingSystemsInfo",
"=",
"UResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_BASE_NAME",
",",
"\"numberingSystems\"",
")",
";",
"UResourceBundle",
"ns... | Returns a string array containing a list of the names of numbering systems
currently known to ICU. | [
"Returns",
"a",
"string",
"array",
"containing",
"a",
"list",
"of",
"the",
"names",
"of",
"numbering",
"systems",
"currently",
"known",
"to",
"ICU",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NumberingSystem.java#L245-L260 |
35,138 | google/j2objc | jre_emul/android/platform/libcore/json/src/main/java/org/json/JSONTokener.java | JSONTokener.readLiteral | private Object readLiteral() throws JSONException {
String literal = nextToInternal("{}[]/\\:,=;# \t\f");
if (literal.length() == 0) {
throw syntaxError("Expected literal value");
} else if ("null".equalsIgnoreCase(literal)) {
return JSONObject.NULL;
} else if ("... | java | private Object readLiteral() throws JSONException {
String literal = nextToInternal("{}[]/\\:,=;# \t\f");
if (literal.length() == 0) {
throw syntaxError("Expected literal value");
} else if ("null".equalsIgnoreCase(literal)) {
return JSONObject.NULL;
} else if ("... | [
"private",
"Object",
"readLiteral",
"(",
")",
"throws",
"JSONException",
"{",
"String",
"literal",
"=",
"nextToInternal",
"(",
"\"{}[]/\\\\:,=;# \\t\\f\"",
")",
";",
"if",
"(",
"literal",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"syntaxError",
... | Reads a null, boolean, numeric or unquoted string literal value. Numeric
values will be returned as an Integer, Long, or Double, in that order of
preference. | [
"Reads",
"a",
"null",
"boolean",
"numeric",
"or",
"unquoted",
"string",
"literal",
"value",
".",
"Numeric",
"values",
"will",
"be",
"returned",
"as",
"an",
"Integer",
"Long",
"or",
"Double",
"in",
"that",
"order",
"of",
"preference",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/json/src/main/java/org/json/JSONTokener.java#L281-L329 |
35,139 | google/j2objc | jre_emul/android/platform/libcore/json/src/main/java/org/json/JSONTokener.java | JSONTokener.nextToInternal | private String nextToInternal(String excluded) {
int start = pos;
for (; pos < in.length(); pos++) {
char c = in.charAt(pos);
if (c == '\r' || c == '\n' || excluded.indexOf(c) != -1) {
return in.substring(start, pos);
}
}
return in.subs... | java | private String nextToInternal(String excluded) {
int start = pos;
for (; pos < in.length(); pos++) {
char c = in.charAt(pos);
if (c == '\r' || c == '\n' || excluded.indexOf(c) != -1) {
return in.substring(start, pos);
}
}
return in.subs... | [
"private",
"String",
"nextToInternal",
"(",
"String",
"excluded",
")",
"{",
"int",
"start",
"=",
"pos",
";",
"for",
"(",
";",
"pos",
"<",
"in",
".",
"length",
"(",
")",
";",
"pos",
"++",
")",
"{",
"char",
"c",
"=",
"in",
".",
"charAt",
"(",
"pos"... | Returns the string up to but not including any of the given characters or
a newline character. This does not consume the excluded character. | [
"Returns",
"the",
"string",
"up",
"to",
"but",
"not",
"including",
"any",
"of",
"the",
"given",
"characters",
"or",
"a",
"newline",
"character",
".",
"This",
"does",
"not",
"consume",
"the",
"excluded",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/json/src/main/java/org/json/JSONTokener.java#L335-L344 |
35,140 | google/j2objc | jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/AsyncTimeout.java | AsyncTimeout.cancelScheduledTimeout | private static synchronized boolean cancelScheduledTimeout(AsyncTimeout node) {
// Remove the node from the linked list.
for (AsyncTimeout prev = head; prev != null; prev = prev.next) {
if (prev.next == node) {
prev.next = node.next;
node.next = null;
return false;
}
}
... | java | private static synchronized boolean cancelScheduledTimeout(AsyncTimeout node) {
// Remove the node from the linked list.
for (AsyncTimeout prev = head; prev != null; prev = prev.next) {
if (prev.next == node) {
prev.next = node.next;
node.next = null;
return false;
}
}
... | [
"private",
"static",
"synchronized",
"boolean",
"cancelScheduledTimeout",
"(",
"AsyncTimeout",
"node",
")",
"{",
"// Remove the node from the linked list.",
"for",
"(",
"AsyncTimeout",
"prev",
"=",
"head",
";",
"prev",
"!=",
"null",
";",
"prev",
"=",
"prev",
".",
... | Returns true if the timeout occurred. | [
"Returns",
"true",
"if",
"the",
"timeout",
"occurred",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/okhttp/okio/okio/src/main/java/okio/AsyncTimeout.java#L115-L127 |
35,141 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/DataEnqueuedInputStream.java | DataEnqueuedInputStream.offerData | void offerData(byte[] chunk) {
if (chunk == null || chunk.length == 0) {
throw new IllegalArgumentException("chunk must have at least one byte of data");
}
if (closed) {
return;
}
// Since this is an unbounded queue, offer() always succeeds. In addition, we don't make a copy
// of ... | java | void offerData(byte[] chunk) {
if (chunk == null || chunk.length == 0) {
throw new IllegalArgumentException("chunk must have at least one byte of data");
}
if (closed) {
return;
}
// Since this is an unbounded queue, offer() always succeeds. In addition, we don't make a copy
// of ... | [
"void",
"offerData",
"(",
"byte",
"[",
"]",
"chunk",
")",
"{",
"if",
"(",
"chunk",
"==",
"null",
"||",
"chunk",
".",
"length",
"==",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"chunk must have at least one byte of data\"",
")",
";",
"}... | Offers a chunk of data to the queue. | [
"Offers",
"a",
"chunk",
"of",
"data",
"to",
"the",
"queue",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/DataEnqueuedInputStream.java#L69-L82 |
35,142 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/DataEnqueuedInputStream.java | DataEnqueuedInputStream.endOffering | void endOffering(IOException exception) {
if (closed) {
return;
}
// closed should never be set by this method--only the polling side should do it, as it means
// that the CLOSED marker has been encountered.
if (this.exception == null) {
this.exception = exception;
}
// Since ... | java | void endOffering(IOException exception) {
if (closed) {
return;
}
// closed should never be set by this method--only the polling side should do it, as it means
// that the CLOSED marker has been encountered.
if (this.exception == null) {
this.exception = exception;
}
// Since ... | [
"void",
"endOffering",
"(",
"IOException",
"exception",
")",
"{",
"if",
"(",
"closed",
")",
"{",
"return",
";",
"}",
"// closed should never be set by this method--only the polling side should do it, as it means",
"// that the CLOSED marker has been encountered.",
"if",
"(",
"t... | Signals that no more data is available and an exception should be thrown. | [
"Signals",
"that",
"no",
"more",
"data",
"is",
"available",
"and",
"an",
"exception",
"should",
"be",
"thrown",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/DataEnqueuedInputStream.java#L92-L106 |
35,143 | google/j2objc | jre_emul/Classes/com/google/j2objc/net/DataEnqueuedInputStream.java | DataEnqueuedInputStream.read | @Override
public synchronized int read(byte[] buf, int offset, int length) throws IOException {
if (buf == null) {
throw new IllegalArgumentException("buf must not be null");
}
if (!(offset >= 0 && length > 0 && offset < buf.length && length <= (buf.length - offset))) {
throw new IllegalArgum... | java | @Override
public synchronized int read(byte[] buf, int offset, int length) throws IOException {
if (buf == null) {
throw new IllegalArgumentException("buf must not be null");
}
if (!(offset >= 0 && length > 0 && offset < buf.length && length <= (buf.length - offset))) {
throw new IllegalArgum... | [
"@",
"Override",
"public",
"synchronized",
"int",
"read",
"(",
"byte",
"[",
"]",
"buf",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"if",
"(",
"buf",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"... | Reads from the current chunk or polls a next chunk from the queue. This is synchronized to
allow reads to be used on different thread while still guaranteeing their sequentiality. | [
"Reads",
"from",
"the",
"current",
"chunk",
"or",
"polls",
"a",
"next",
"chunk",
"from",
"the",
"queue",
".",
"This",
"is",
"synchronized",
"to",
"allow",
"reads",
"to",
"be",
"used",
"on",
"different",
"thread",
"while",
"still",
"guaranteeing",
"their",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/Classes/com/google/j2objc/net/DataEnqueuedInputStream.java#L137-L212 |
35,144 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/YearMonth.java | YearMonth.with | private YearMonth with(int newYear, int newMonth) {
if (year == newYear && month == newMonth) {
return this;
}
return new YearMonth(newYear, newMonth);
} | java | private YearMonth with(int newYear, int newMonth) {
if (year == newYear && month == newMonth) {
return this;
}
return new YearMonth(newYear, newMonth);
} | [
"private",
"YearMonth",
"with",
"(",
"int",
"newYear",
",",
"int",
"newMonth",
")",
"{",
"if",
"(",
"year",
"==",
"newYear",
"&&",
"month",
"==",
"newMonth",
")",
"{",
"return",
"this",
";",
"}",
"return",
"new",
"YearMonth",
"(",
"newYear",
",",
"newM... | Returns a copy of this year-month with the new year and month, checking
to see if a new object is in fact required.
@param newYear the year to represent, validated from MIN_YEAR to MAX_YEAR
@param newMonth the month-of-year to represent, validated not null
@return the year-month, not null | [
"Returns",
"a",
"copy",
"of",
"this",
"year",
"-",
"month",
"with",
"the",
"new",
"year",
"and",
"month",
"checking",
"to",
"see",
"if",
"a",
"new",
"object",
"is",
"in",
"fact",
"required",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/YearMonth.java#L312-L317 |
35,145 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Quantifier.java | Quantifier.matches | public int matches(Replaceable text,
int[] offset,
int limit,
boolean incremental) {
int start = offset[0];
int count = 0;
while (count < maxCount) {
int pos = offset[0];
int m = matcher.matches(text, of... | java | public int matches(Replaceable text,
int[] offset,
int limit,
boolean incremental) {
int start = offset[0];
int count = 0;
while (count < maxCount) {
int pos = offset[0];
int m = matcher.matches(text, of... | [
"public",
"int",
"matches",
"(",
"Replaceable",
"text",
",",
"int",
"[",
"]",
"offset",
",",
"int",
"limit",
",",
"boolean",
"incremental",
")",
"{",
"int",
"start",
"=",
"offset",
"[",
"0",
"]",
";",
"int",
"count",
"=",
"0",
";",
"while",
"(",
"c... | Implement UnicodeMatcher API. | [
"Implement",
"UnicodeMatcher",
"API",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Quantifier.java#L39-L69 |
35,146 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Quantifier.java | Quantifier.toPattern | public String toPattern(boolean escapeUnprintable) {
StringBuilder result = new StringBuilder();
result.append(matcher.toPattern(escapeUnprintable));
if (minCount == 0) {
if (maxCount == 1) {
return result.append('?').toString();
} else if (maxCount == MAX... | java | public String toPattern(boolean escapeUnprintable) {
StringBuilder result = new StringBuilder();
result.append(matcher.toPattern(escapeUnprintable));
if (minCount == 0) {
if (maxCount == 1) {
return result.append('?').toString();
} else if (maxCount == MAX... | [
"public",
"String",
"toPattern",
"(",
"boolean",
"escapeUnprintable",
")",
"{",
"StringBuilder",
"result",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"result",
".",
"append",
"(",
"matcher",
".",
"toPattern",
"(",
"escapeUnprintable",
")",
")",
";",
"if",
"... | Implement UnicodeMatcher API | [
"Implement",
"UnicodeMatcher",
"API"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Quantifier.java#L74-L95 |
35,147 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/DistributionPointName.java | DistributionPointName.encode | public void encode(DerOutputStream out) throws IOException {
DerOutputStream theChoice = new DerOutputStream();
if (fullName != null) {
fullName.encode(theChoice);
out.writeImplicit(
DerValue.createTag(DerValue.TAG_CONTEXT, true, TAG_FULL_NAME),
... | java | public void encode(DerOutputStream out) throws IOException {
DerOutputStream theChoice = new DerOutputStream();
if (fullName != null) {
fullName.encode(theChoice);
out.writeImplicit(
DerValue.createTag(DerValue.TAG_CONTEXT, true, TAG_FULL_NAME),
... | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerOutputStream",
"theChoice",
"=",
"new",
"DerOutputStream",
"(",
")",
";",
"if",
"(",
"fullName",
"!=",
"null",
")",
"{",
"fullName",
".",
"encode",
"(",
"theCho... | Encodes the distribution point name and writes it to the DerOutputStream.
@param out the output stream.
@exception IOException on encoding error. | [
"Encodes",
"the",
"distribution",
"point",
"name",
"and",
"writes",
"it",
"to",
"the",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/DistributionPointName.java#L170-L187 |
35,148 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java | CDATASectionImpl.split | public void split() {
if (!needsSplitting()) {
return;
}
Node parent = getParentNode();
String[] parts = getData().split("\\]\\]>");
parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this);
for (int p = 1; p < parts.length - 1; p++) {
... | java | public void split() {
if (!needsSplitting()) {
return;
}
Node parent = getParentNode();
String[] parts = getData().split("\\]\\]>");
parent.insertBefore(new CDATASectionImpl(document, parts[0] + "]]"), this);
for (int p = 1; p < parts.length - 1; p++) {
... | [
"public",
"void",
"split",
"(",
")",
"{",
"if",
"(",
"!",
"needsSplitting",
"(",
")",
")",
"{",
"return",
";",
"}",
"Node",
"parent",
"=",
"getParentNode",
"(",
")",
";",
"String",
"[",
"]",
"parts",
"=",
"getData",
"(",
")",
".",
"split",
"(",
"... | Splits this CDATA node into parts that do not contain a "]]>" sequence.
Any newly created nodes will be inserted before this node. | [
"Splits",
"this",
"CDATA",
"node",
"into",
"parts",
"that",
"do",
"not",
"contain",
"a",
"]]",
">",
"sequence",
".",
"Any",
"newly",
"created",
"nodes",
"will",
"be",
"inserted",
"before",
"this",
"node",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java#L52-L64 |
35,149 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java | CDATASectionImpl.replaceWithText | public TextImpl replaceWithText() {
TextImpl replacement = new TextImpl(document, getData());
parent.insertBefore(replacement, this);
parent.removeChild(this);
return replacement;
} | java | public TextImpl replaceWithText() {
TextImpl replacement = new TextImpl(document, getData());
parent.insertBefore(replacement, this);
parent.removeChild(this);
return replacement;
} | [
"public",
"TextImpl",
"replaceWithText",
"(",
")",
"{",
"TextImpl",
"replacement",
"=",
"new",
"TextImpl",
"(",
"document",
",",
"getData",
"(",
")",
")",
";",
"parent",
".",
"insertBefore",
"(",
"replacement",
",",
"this",
")",
";",
"parent",
".",
"remove... | Replaces this node with a semantically equivalent text node. This node
will be removed from the DOM tree and the new node inserted in its place.
@return the replacement node. | [
"Replaces",
"this",
"node",
"with",
"a",
"semantically",
"equivalent",
"text",
"node",
".",
"This",
"node",
"will",
"be",
"removed",
"from",
"the",
"DOM",
"tree",
"and",
"the",
"new",
"node",
"inserted",
"in",
"its",
"place",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/org/apache/harmony/xml/dom/CDATASectionImpl.java#L81-L86 |
35,150 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/UnionPattern.java | UnionPattern.fixupVariables | public void fixupVariables(java.util.Vector vars, int globalsSize)
{
for (int i = 0; i < m_patterns.length; i++)
{
m_patterns[i].fixupVariables(vars, globalsSize);
}
} | java | public void fixupVariables(java.util.Vector vars, int globalsSize)
{
for (int i = 0; i < m_patterns.length; i++)
{
m_patterns[i].fixupVariables(vars, globalsSize);
}
} | [
"public",
"void",
"fixupVariables",
"(",
"java",
".",
"util",
".",
"Vector",
"vars",
",",
"int",
"globalsSize",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"m_patterns",
".",
"length",
";",
"i",
"++",
")",
"{",
"m_patterns",
"[",
"i"... | No arguments to process, so this does nothing. | [
"No",
"arguments",
"to",
"process",
"so",
"this",
"does",
"nothing",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/UnionPattern.java#L45-L51 |
35,151 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/UnionPattern.java | UnionPattern.setPatterns | public void setPatterns(StepPattern[] patterns)
{
m_patterns = patterns;
if(null != patterns)
{
for(int i = 0; i < patterns.length; i++)
{
patterns[i].exprSetParent(this);
}
}
} | java | public void setPatterns(StepPattern[] patterns)
{
m_patterns = patterns;
if(null != patterns)
{
for(int i = 0; i < patterns.length; i++)
{
patterns[i].exprSetParent(this);
}
}
} | [
"public",
"void",
"setPatterns",
"(",
"StepPattern",
"[",
"]",
"patterns",
")",
"{",
"m_patterns",
"=",
"patterns",
";",
"if",
"(",
"null",
"!=",
"patterns",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"patterns",
".",
"length",
";",
... | Set the contained step patterns to be tested.
@param patterns the contained step patterns to be tested. | [
"Set",
"the",
"contained",
"step",
"patterns",
"to",
"be",
"tested",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/UnionPattern.java#L80-L91 |
35,152 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/UnionPattern.java | UnionPattern.execute | public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
{
XObject bestScore = null;
int n = m_patterns.length;
for (int i = 0; i < n; i++)
{
XObject score = m_patterns[i].execute(xctxt);
if (score != NodeTest.SCORE_NONE)
{
if (null == bes... | java | public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
{
XObject bestScore = null;
int n = m_patterns.length;
for (int i = 0; i < n; i++)
{
XObject score = m_patterns[i].execute(xctxt);
if (score != NodeTest.SCORE_NONE)
{
if (null == bes... | [
"public",
"XObject",
"execute",
"(",
"XPathContext",
"xctxt",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"XObject",
"bestScore",
"=",
"null",
";",
"int",
"n",
"=",
"m_patterns",
".",
"length",
";",
"for",
"(",
"... | Test a node to see if it matches any of the patterns in the union.
@param xctxt XPath runtime context.
@return {@link org.apache.xpath.patterns.NodeTest#SCORE_NODETEST},
{@link org.apache.xpath.patterns.NodeTest#SCORE_NONE},
{@link org.apache.xpath.patterns.NodeTest#SCORE_NSWILD},
{@link org.apache.xpath.patterns.Nod... | [
"Test",
"a",
"node",
"to",
"see",
"if",
"it",
"matches",
"any",
"of",
"the",
"patterns",
"in",
"the",
"union",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/UnionPattern.java#L117-L142 |
35,153 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/gen/GenerationUnit.java | GenerationUnit.addPackageJavadoc | private void addPackageJavadoc(CompilationUnit unit, String qualifiedMainType) {
Javadoc javadoc = unit.getPackage().getJavadoc();
if (javadoc == null) {
return;
}
SourceBuilder builder = new SourceBuilder(false);
JavadocGenerator.printDocComment(builder, javadoc);
javadocBlocks.put(qualif... | java | private void addPackageJavadoc(CompilationUnit unit, String qualifiedMainType) {
Javadoc javadoc = unit.getPackage().getJavadoc();
if (javadoc == null) {
return;
}
SourceBuilder builder = new SourceBuilder(false);
JavadocGenerator.printDocComment(builder, javadoc);
javadocBlocks.put(qualif... | [
"private",
"void",
"addPackageJavadoc",
"(",
"CompilationUnit",
"unit",
",",
"String",
"qualifiedMainType",
")",
"{",
"Javadoc",
"javadoc",
"=",
"unit",
".",
"getPackage",
"(",
")",
".",
"getJavadoc",
"(",
")",
";",
"if",
"(",
"javadoc",
"==",
"null",
")",
... | Collect javadoc from the package declarations to display in the header. | [
"Collect",
"javadoc",
"from",
"the",
"package",
"declarations",
"to",
"display",
"in",
"the",
"header",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/gen/GenerationUnit.java#L186-L194 |
35,154 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java | AtomicReferenceFieldUpdater.newUpdater | @CallerSensitive
public static <U,W> AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass,
Class<W> vclass,
String fieldName) {
return new AtomicReferenceFieldUpdate... | java | @CallerSensitive
public static <U,W> AtomicReferenceFieldUpdater<U,W> newUpdater(Class<U> tclass,
Class<W> vclass,
String fieldName) {
return new AtomicReferenceFieldUpdate... | [
"@",
"CallerSensitive",
"public",
"static",
"<",
"U",
",",
"W",
">",
"AtomicReferenceFieldUpdater",
"<",
"U",
",",
"W",
">",
"newUpdater",
"(",
"Class",
"<",
"U",
">",
"tclass",
",",
"Class",
"<",
"W",
">",
"vclass",
",",
"String",
"fieldName",
")",
"{... | Creates and returns an updater for objects with the given field.
The Class arguments are needed to check that reflective types and
generic types match.
@param tclass the class of the objects holding the field
@param vclass the class of the field
@param fieldName the name of the field to be updated
@param <U> the type ... | [
"Creates",
"and",
"returns",
"an",
"updater",
"for",
"objects",
"with",
"the",
"given",
"field",
".",
"The",
"Class",
"arguments",
"are",
"needed",
"to",
"check",
"that",
"reflective",
"types",
"and",
"generic",
"types",
"match",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java#L100-L109 |
35,155 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java | ReplaceableContextIterator.setText | public void setText(Replaceable rep) {
this.rep=rep;
limit=contextLimit=rep.length();
cpStart=cpLimit=index=contextStart=0;
dir=0;
reachedLimit=false;
} | java | public void setText(Replaceable rep) {
this.rep=rep;
limit=contextLimit=rep.length();
cpStart=cpLimit=index=contextStart=0;
dir=0;
reachedLimit=false;
} | [
"public",
"void",
"setText",
"(",
"Replaceable",
"rep",
")",
"{",
"this",
".",
"rep",
"=",
"rep",
";",
"limit",
"=",
"contextLimit",
"=",
"rep",
".",
"length",
"(",
")",
";",
"cpStart",
"=",
"cpLimit",
"=",
"index",
"=",
"contextStart",
"=",
"0",
";"... | Set the text for iteration.
@param rep Iteration text. | [
"Set",
"the",
"text",
"for",
"iteration",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java#L48-L54 |
35,156 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java | ReplaceableContextIterator.nextCaseMapCP | public int nextCaseMapCP() {
int c;
if(cpLimit<limit) {
cpStart=cpLimit;
c=rep.char32At(cpLimit);
cpLimit+=UTF16.getCharCount(c);
return c;
} else {
return -1;
}
} | java | public int nextCaseMapCP() {
int c;
if(cpLimit<limit) {
cpStart=cpLimit;
c=rep.char32At(cpLimit);
cpLimit+=UTF16.getCharCount(c);
return c;
} else {
return -1;
}
} | [
"public",
"int",
"nextCaseMapCP",
"(",
")",
"{",
"int",
"c",
";",
"if",
"(",
"cpLimit",
"<",
"limit",
")",
"{",
"cpStart",
"=",
"cpLimit",
";",
"c",
"=",
"rep",
".",
"char32At",
"(",
"cpLimit",
")",
";",
"cpLimit",
"+=",
"UTF16",
".",
"getCharCount",... | Iterate forward through the string to fetch the next code point
to be case-mapped, and set the context indexes for it.
@return The next code point to be case-mapped, or <0 when the iteration is done. | [
"Iterate",
"forward",
"through",
"the",
"string",
"to",
"fetch",
"the",
"next",
"code",
"point",
"to",
"be",
"case",
"-",
"mapped",
"and",
"set",
"the",
"context",
"indexes",
"for",
"it",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java#L120-L130 |
35,157 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java | ReplaceableContextIterator.replace | public int replace(String text) {
int delta=text.length()-(cpLimit-cpStart);
rep.replace(cpStart, cpLimit, text);
cpLimit+=delta;
limit+=delta;
contextLimit+=delta;
return delta;
} | java | public int replace(String text) {
int delta=text.length()-(cpLimit-cpStart);
rep.replace(cpStart, cpLimit, text);
cpLimit+=delta;
limit+=delta;
contextLimit+=delta;
return delta;
} | [
"public",
"int",
"replace",
"(",
"String",
"text",
")",
"{",
"int",
"delta",
"=",
"text",
".",
"length",
"(",
")",
"-",
"(",
"cpLimit",
"-",
"cpStart",
")",
";",
"rep",
".",
"replace",
"(",
"cpStart",
",",
"cpLimit",
",",
"text",
")",
";",
"cpLimit... | Replace the current code point by its case mapping,
and update the indexes.
@param text Replacement text.
@return The delta for the change of the text length. | [
"Replace",
"the",
"current",
"code",
"point",
"by",
"its",
"case",
"mapping",
"and",
"update",
"the",
"indexes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java#L139-L146 |
35,158 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java | ReplaceableContextIterator.reset | public void reset(int direction) {
if(direction>0) {
/* reset for forward iteration */
this.dir=1;
index=cpLimit;
} else if(direction<0) {
/* reset for backward iteration */
this.dir=-1;
index=cpStart;
} else {
/... | java | public void reset(int direction) {
if(direction>0) {
/* reset for forward iteration */
this.dir=1;
index=cpLimit;
} else if(direction<0) {
/* reset for backward iteration */
this.dir=-1;
index=cpStart;
} else {
/... | [
"public",
"void",
"reset",
"(",
"int",
"direction",
")",
"{",
"if",
"(",
"direction",
">",
"0",
")",
"{",
"/* reset for forward iteration */",
"this",
".",
"dir",
"=",
"1",
";",
"index",
"=",
"cpLimit",
";",
"}",
"else",
"if",
"(",
"direction",
"<",
"0... | implement UCaseProps.ContextIterator | [
"implement",
"UCaseProps",
".",
"ContextIterator"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/ReplaceableContextIterator.java#L157-L172 |
35,159 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java | Character.codePointAtImpl | static int codePointAtImpl(char[] a, int index, int limit) {
char c1 = a[index];
if (isHighSurrogate(c1) && ++index < limit) {
char c2 = a[index];
if (isLowSurrogate(c2)) {
return toCodePoint(c1, c2);
}
}
return c1;
} | java | static int codePointAtImpl(char[] a, int index, int limit) {
char c1 = a[index];
if (isHighSurrogate(c1) && ++index < limit) {
char c2 = a[index];
if (isLowSurrogate(c2)) {
return toCodePoint(c1, c2);
}
}
return c1;
} | [
"static",
"int",
"codePointAtImpl",
"(",
"char",
"[",
"]",
"a",
",",
"int",
"index",
",",
"int",
"limit",
")",
"{",
"char",
"c1",
"=",
"a",
"[",
"index",
"]",
";",
"if",
"(",
"isHighSurrogate",
"(",
"c1",
")",
"&&",
"++",
"index",
"<",
"limit",
"... | throws ArrayIndexOutOfBoundsException if index out of bounds | [
"throws",
"ArrayIndexOutOfBoundsException",
"if",
"index",
"out",
"of",
"bounds"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java#L4995-L5004 |
35,160 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java | Character.codePointBeforeImpl | static int codePointBeforeImpl(char[] a, int index, int start) {
char c2 = a[--index];
if (isLowSurrogate(c2) && index > start) {
char c1 = a[--index];
if (isHighSurrogate(c1)) {
return toCodePoint(c1, c2);
}
}
return c2;
} | java | static int codePointBeforeImpl(char[] a, int index, int start) {
char c2 = a[--index];
if (isLowSurrogate(c2) && index > start) {
char c1 = a[--index];
if (isHighSurrogate(c1)) {
return toCodePoint(c1, c2);
}
}
return c2;
} | [
"static",
"int",
"codePointBeforeImpl",
"(",
"char",
"[",
"]",
"a",
",",
"int",
"index",
",",
"int",
"start",
")",
"{",
"char",
"c2",
"=",
"a",
"[",
"--",
"index",
"]",
";",
"if",
"(",
"isLowSurrogate",
"(",
"c2",
")",
"&&",
"index",
">",
"start",
... | throws ArrayIndexOutOfBoundsException if index-1 out of bounds | [
"throws",
"ArrayIndexOutOfBoundsException",
"if",
"index",
"-",
"1",
"out",
"of",
"bounds"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java#L5098-L5107 |
35,161 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java | Character.getType | public static int getType(int codePoint) {
int type = getTypeImpl(codePoint);
// The type values returned by ICU are not RI-compatible. The RI skips the value 17.
if (type <= Character.FORMAT) {
return type;
}
return (type + 1);
} | java | public static int getType(int codePoint) {
int type = getTypeImpl(codePoint);
// The type values returned by ICU are not RI-compatible. The RI skips the value 17.
if (type <= Character.FORMAT) {
return type;
}
return (type + 1);
} | [
"public",
"static",
"int",
"getType",
"(",
"int",
"codePoint",
")",
"{",
"int",
"type",
"=",
"getTypeImpl",
"(",
"codePoint",
")",
";",
"// The type values returned by ICU are not RI-compatible. The RI skips the value 17.",
"if",
"(",
"type",
"<=",
"Character",
".",
"... | Returns a value indicating a character's general category.
@param codePoint the character (Unicode code point) to be tested.
@return a value of type {@code int} representing the
character's general category.
@see Character#COMBINING_SPACING_MARK COMBINING_SPACING_MARK
@see Character#CONNECTOR_PUNCTUATION CO... | [
"Returns",
"a",
"value",
"indicating",
"a",
"character",
"s",
"general",
"category",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/Character.java#L7154-L7161 |
35,162 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarUtil.java | CalendarUtil.getCalendarType | public static String getCalendarType(ULocale loc) {
String calType = loc.getKeywordValue(CALKEY);
if (calType != null) {
return calType;
}
// Canonicalize, so grandfathered variant will be transformed to keywords
ULocale canonical = ULocale.createCanonical(loc.toStri... | java | public static String getCalendarType(ULocale loc) {
String calType = loc.getKeywordValue(CALKEY);
if (calType != null) {
return calType;
}
// Canonicalize, so grandfathered variant will be transformed to keywords
ULocale canonical = ULocale.createCanonical(loc.toStri... | [
"public",
"static",
"String",
"getCalendarType",
"(",
"ULocale",
"loc",
")",
"{",
"String",
"calType",
"=",
"loc",
".",
"getKeywordValue",
"(",
"CALKEY",
")",
";",
"if",
"(",
"calType",
"!=",
"null",
")",
"{",
"return",
"calType",
";",
"}",
"// Canonicaliz... | Returns a calendar type for the given locale.
When the given locale has calendar keyword, the
value of calendar keyword is returned. Otherwise,
the default calendar type for the locale is returned.
@param loc The locale
@return Calendar type string, such as "gregorian" | [
"Returns",
"a",
"calendar",
"type",
"for",
"the",
"given",
"locale",
".",
"When",
"the",
"given",
"locale",
"has",
"calendar",
"keyword",
"the",
"value",
"of",
"calendar",
"keyword",
"is",
"returned",
".",
"Otherwise",
"the",
"default",
"calendar",
"type",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarUtil.java#L42-L59 |
35,163 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipInputStream.java | ZipInputStream.getNextEntry | public ZipEntry getNextEntry() throws IOException {
ensureOpen();
if (entry != null) {
closeEntry();
}
crc.reset();
inf.reset();
if ((entry = readLOC()) == null) {
return null;
}
// ----- BEGIN android -----
// if (entry.met... | java | public ZipEntry getNextEntry() throws IOException {
ensureOpen();
if (entry != null) {
closeEntry();
}
crc.reset();
inf.reset();
if ((entry = readLOC()) == null) {
return null;
}
// ----- BEGIN android -----
// if (entry.met... | [
"public",
"ZipEntry",
"getNextEntry",
"(",
")",
"throws",
"IOException",
"{",
"ensureOpen",
"(",
")",
";",
"if",
"(",
"entry",
"!=",
"null",
")",
"{",
"closeEntry",
"(",
")",
";",
"}",
"crc",
".",
"reset",
"(",
")",
";",
"inf",
".",
"reset",
"(",
"... | Reads the next ZIP file entry and positions the stream at the
beginning of the entry data.
@return the next ZIP file entry, or null if there are no more entries
@exception ZipException if a ZIP file error has occurred
@exception IOException if an I/O error has occurred | [
"Reads",
"the",
"next",
"ZIP",
"file",
"entry",
"and",
"positions",
"the",
"stream",
"at",
"the",
"beginning",
"of",
"the",
"entry",
"data",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipInputStream.java#L114-L132 |
35,164 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipInputStream.java | ZipInputStream.skip | public long skip(long n) throws IOException {
if (n < 0) {
throw new IllegalArgumentException("negative skip length");
}
ensureOpen();
int max = (int)Math.min(n, Integer.MAX_VALUE);
int total = 0;
while (total < max) {
int len = max - total;
... | java | public long skip(long n) throws IOException {
if (n < 0) {
throw new IllegalArgumentException("negative skip length");
}
ensureOpen();
int max = (int)Math.min(n, Integer.MAX_VALUE);
int total = 0;
while (total < max) {
int len = max - total;
... | [
"public",
"long",
"skip",
"(",
"long",
"n",
")",
"throws",
"IOException",
"{",
"if",
"(",
"n",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"negative skip length\"",
")",
";",
"}",
"ensureOpen",
"(",
")",
";",
"int",
"max",
"=",... | Skips specified number of bytes in the current ZIP entry.
@param n the number of bytes to skip
@return the actual number of bytes skipped
@exception ZipException if a ZIP file error has occurred
@exception IOException if an I/O error has occurred
@exception IllegalArgumentException if n < 0 | [
"Skips",
"specified",
"number",
"of",
"bytes",
"in",
"the",
"current",
"ZIP",
"entry",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/zip/ZipInputStream.java#L245-L265 |
35,165 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemVariable.java | ElemVariable.appendChild | public ElemTemplateElement appendChild(ElemTemplateElement elem)
{
// cannot have content and select
if (m_selectPattern != null)
{
error(XSLTErrorResources.ER_CANT_HAVE_CONTENT_AND_SELECT,
new Object[]{"xsl:" + this.getNodeName()});
return null;
}
return super.appendChild(e... | java | public ElemTemplateElement appendChild(ElemTemplateElement elem)
{
// cannot have content and select
if (m_selectPattern != null)
{
error(XSLTErrorResources.ER_CANT_HAVE_CONTENT_AND_SELECT,
new Object[]{"xsl:" + this.getNodeName()});
return null;
}
return super.appendChild(e... | [
"public",
"ElemTemplateElement",
"appendChild",
"(",
"ElemTemplateElement",
"elem",
")",
"{",
"// cannot have content and select",
"if",
"(",
"m_selectPattern",
"!=",
"null",
")",
"{",
"error",
"(",
"XSLTErrorResources",
".",
"ER_CANT_HAVE_CONTENT_AND_SELECT",
",",
"new",... | Add a child to the child list. If the select attribute
is present, an error will be raised.
@param elem New element to append to this element's children list
@return null if the select attribute was present, otherwise the
child just added to the child list | [
"Add",
"a",
"child",
"to",
"the",
"child",
"list",
".",
"If",
"the",
"select",
"attribute",
"is",
"present",
"an",
"error",
"will",
"be",
"raised",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemVariable.java#L516-L526 |
35,166 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.toPattern | public String toPattern() {
// Return the original, applied pattern string, or else "".
// Note: This does not take into account
// - changes from setFormat() and similar methods, or
// - normalization of apostrophes and arguments, for example,
// whether some date/time/number ... | java | public String toPattern() {
// Return the original, applied pattern string, or else "".
// Note: This does not take into account
// - changes from setFormat() and similar methods, or
// - normalization of apostrophes and arguments, for example,
// whether some date/time/number ... | [
"public",
"String",
"toPattern",
"(",
")",
"{",
"// Return the original, applied pattern string, or else \"\".",
"// Note: This does not take into account",
"// - changes from setFormat() and similar methods, or",
"// - normalization of apostrophes and arguments, for example,",
"// whether som... | Returns the applied pattern string.
@return the pattern string
@throws IllegalStateException after custom Format objects have been set
via setFormat() or similar APIs | [
"Returns",
"the",
"applied",
"pattern",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L500-L517 |
35,167 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.nextTopLevelArgStart | private int nextTopLevelArgStart(int partIndex) {
if (partIndex != 0) {
partIndex = msgPattern.getLimitPartIndex(partIndex);
}
for (;;) {
MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex);
if (type == MessagePattern.Part.Type.ARG_START) {
... | java | private int nextTopLevelArgStart(int partIndex) {
if (partIndex != 0) {
partIndex = msgPattern.getLimitPartIndex(partIndex);
}
for (;;) {
MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex);
if (type == MessagePattern.Part.Type.ARG_START) {
... | [
"private",
"int",
"nextTopLevelArgStart",
"(",
"int",
"partIndex",
")",
"{",
"if",
"(",
"partIndex",
"!=",
"0",
")",
"{",
"partIndex",
"=",
"msgPattern",
".",
"getLimitPartIndex",
"(",
"partIndex",
")",
";",
"}",
"for",
"(",
";",
";",
")",
"{",
"MessageP... | Returns the part index of the next ARG_START after partIndex, or -1 if there is none more.
@param partIndex Part index of the previous ARG_START (initially 0). | [
"Returns",
"the",
"part",
"index",
"of",
"the",
"next",
"ARG_START",
"after",
"partIndex",
"or",
"-",
"1",
"if",
"there",
"is",
"none",
"more",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L523-L536 |
35,168 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.getLiteralStringUntilNextArgument | private String getLiteralStringUntilNextArgument(int from) {
StringBuilder b = new StringBuilder();
String msgString=msgPattern.getPatternString();
int prevIndex=msgPattern.getPart(from).getLimit();
for(int i=from+1;; ++i) {
Part part=msgPattern.getPart(i);
Part.T... | java | private String getLiteralStringUntilNextArgument(int from) {
StringBuilder b = new StringBuilder();
String msgString=msgPattern.getPatternString();
int prevIndex=msgPattern.getPart(from).getLimit();
for(int i=from+1;; ++i) {
Part part=msgPattern.getPart(i);
Part.T... | [
"private",
"String",
"getLiteralStringUntilNextArgument",
"(",
"int",
"from",
")",
"{",
"StringBuilder",
"b",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"String",
"msgString",
"=",
"msgPattern",
".",
"getPatternString",
"(",
")",
";",
"int",
"prevIndex",
"=",
... | Read as much literal string from the pattern string as possible. This stops
as soon as it finds an argument, or it reaches the end of the string.
@param from Index in the pattern string to start from.
@return A substring from the pattern string representing the longest possible
substring with no arguments. | [
"Read",
"as",
"much",
"literal",
"string",
"from",
"the",
"pattern",
"string",
"as",
"possible",
".",
"This",
"stops",
"as",
"soon",
"as",
"it",
"finds",
"an",
"argument",
"or",
"it",
"reaches",
"the",
"end",
"of",
"the",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L1791-L1807 |
35,169 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.findChoiceSubMessage | private static int findChoiceSubMessage(MessagePattern pattern, int partIndex, double number) {
int count=pattern.countParts();
int msgStart;
// Iterate over (ARG_INT|DOUBLE, ARG_SELECTOR, message) tuples
// until ARG_LIMIT or end of choice-only pattern.
// Ignore the first numbe... | java | private static int findChoiceSubMessage(MessagePattern pattern, int partIndex, double number) {
int count=pattern.countParts();
int msgStart;
// Iterate over (ARG_INT|DOUBLE, ARG_SELECTOR, message) tuples
// until ARG_LIMIT or end of choice-only pattern.
// Ignore the first numbe... | [
"private",
"static",
"int",
"findChoiceSubMessage",
"(",
"MessagePattern",
"pattern",
",",
"int",
"partIndex",
",",
"double",
"number",
")",
"{",
"int",
"count",
"=",
"pattern",
".",
"countParts",
"(",
")",
";",
"int",
"msgStart",
";",
"// Iterate over (ARG_INT|... | Finds the ChoiceFormat sub-message for the given number.
@param pattern A MessagePattern.
@param partIndex the index of the first ChoiceFormat argument style part.
@param number a number to be mapped to one of the ChoiceFormat argument's intervals
@return the sub-message start part index. | [
"Finds",
"the",
"ChoiceFormat",
"sub",
"-",
"message",
"for",
"the",
"given",
"number",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L1830-L1868 |
35,170 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.matchStringUntilLimitPart | private static int matchStringUntilLimitPart(
MessagePattern pattern, int partIndex, int limitPartIndex,
String source, int sourceOffset) {
int matchingSourceLength = 0;
String msgString = pattern.getPatternString();
int prevIndex = pattern.getPart(partIndex).getLimit();
... | java | private static int matchStringUntilLimitPart(
MessagePattern pattern, int partIndex, int limitPartIndex,
String source, int sourceOffset) {
int matchingSourceLength = 0;
String msgString = pattern.getPatternString();
int prevIndex = pattern.getPart(partIndex).getLimit();
... | [
"private",
"static",
"int",
"matchStringUntilLimitPart",
"(",
"MessagePattern",
"pattern",
",",
"int",
"partIndex",
",",
"int",
"limitPartIndex",
",",
"String",
"source",
",",
"int",
"sourceOffset",
")",
"{",
"int",
"matchingSourceLength",
"=",
"0",
";",
"String",... | Matches the pattern string from the end of the partIndex to
the beginning of the limitPartIndex,
including all syntax except SKIP_SYNTAX,
against the source string starting at sourceOffset.
If they match, returns the length of the source string match.
Otherwise returns -1. | [
"Matches",
"the",
"pattern",
"string",
"from",
"the",
"end",
"of",
"the",
"partIndex",
"to",
"the",
"beginning",
"of",
"the",
"limitPartIndex",
"including",
"all",
"syntax",
"except",
"SKIP_SYNTAX",
"against",
"the",
"source",
"string",
"starting",
"at",
"source... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L1912-L1933 |
35,171 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.findOtherSubMessage | private int findOtherSubMessage(int partIndex) {
int count=msgPattern.countParts();
MessagePattern.Part part=msgPattern.getPart(partIndex);
if(part.getType().hasNumericValue()) {
++partIndex;
}
// Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples
... | java | private int findOtherSubMessage(int partIndex) {
int count=msgPattern.countParts();
MessagePattern.Part part=msgPattern.getPart(partIndex);
if(part.getType().hasNumericValue()) {
++partIndex;
}
// Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples
... | [
"private",
"int",
"findOtherSubMessage",
"(",
"int",
"partIndex",
")",
"{",
"int",
"count",
"=",
"msgPattern",
".",
"countParts",
"(",
")",
";",
"MessagePattern",
".",
"Part",
"part",
"=",
"msgPattern",
".",
"getPart",
"(",
"partIndex",
")",
";",
"if",
"("... | Finds the "other" sub-message.
@param partIndex the index of the first PluralFormat argument style part.
@return the "other" sub-message start part index. | [
"Finds",
"the",
"other",
"sub",
"-",
"message",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L1940-L1965 |
35,172 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.findFirstPluralNumberArg | private int findFirstPluralNumberArg(int msgStart, String argName) {
for(int i=msgStart+1;; ++i) {
Part part=msgPattern.getPart(i);
Part.Type type=part.getType();
if(type==Part.Type.MSG_LIMIT) {
return 0;
}
if(type==Part.Type.REPLACE_NU... | java | private int findFirstPluralNumberArg(int msgStart, String argName) {
for(int i=msgStart+1;; ++i) {
Part part=msgPattern.getPart(i);
Part.Type type=part.getType();
if(type==Part.Type.MSG_LIMIT) {
return 0;
}
if(type==Part.Type.REPLACE_NU... | [
"private",
"int",
"findFirstPluralNumberArg",
"(",
"int",
"msgStart",
",",
"String",
"argName",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"msgStart",
"+",
"1",
";",
";",
"++",
"i",
")",
"{",
"Part",
"part",
"=",
"msgPattern",
".",
"getPart",
"(",
"i",
"... | Returns the ARG_START index of the first occurrence of the plural number in a sub-message.
Returns -1 if it is a REPLACE_NUMBER.
Returns 0 if there is neither. | [
"Returns",
"the",
"ARG_START",
"index",
"of",
"the",
"first",
"occurrence",
"of",
"the",
"plural",
"number",
"in",
"a",
"sub",
"-",
"message",
".",
"Returns",
"-",
"1",
"if",
"it",
"is",
"a",
"REPLACE_NUMBER",
".",
"Returns",
"0",
"if",
"there",
"is",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L1972-L1993 |
35,173 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.format | private void format(Object[] arguments, Map<String, Object> argsMap,
AppendableWrapper dest, FieldPosition fp) {
if (arguments != null && msgPattern.hasNamedArguments()) {
throw new IllegalArgumentException(
"This method is not available in MessageFormat objec... | java | private void format(Object[] arguments, Map<String, Object> argsMap,
AppendableWrapper dest, FieldPosition fp) {
if (arguments != null && msgPattern.hasNamedArguments()) {
throw new IllegalArgumentException(
"This method is not available in MessageFormat objec... | [
"private",
"void",
"format",
"(",
"Object",
"[",
"]",
"arguments",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"argsMap",
",",
"AppendableWrapper",
"dest",
",",
"FieldPosition",
"fp",
")",
"{",
"if",
"(",
"arguments",
"!=",
"null",
"&&",
"msgPattern",
... | Internal routine used by format.
@throws IllegalArgumentException if an argument in the
<code>arguments</code> map is not of the type
expected by the format element(s) that use it. | [
"Internal",
"routine",
"used",
"by",
"format",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L2096-L2104 |
35,174 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.findKeyword | private static final int findKeyword(String s, String[] list) {
s = PatternProps.trimWhiteSpace(s).toLowerCase(rootLocale);
for (int i = 0; i < list.length; ++i) {
if (s.equals(list[i]))
return i;
}
return -1;
} | java | private static final int findKeyword(String s, String[] list) {
s = PatternProps.trimWhiteSpace(s).toLowerCase(rootLocale);
for (int i = 0; i < list.length; ++i) {
if (s.equals(list[i]))
return i;
}
return -1;
} | [
"private",
"static",
"final",
"int",
"findKeyword",
"(",
"String",
"s",
",",
"String",
"[",
"]",
"list",
")",
"{",
"s",
"=",
"PatternProps",
".",
"trimWhiteSpace",
"(",
"s",
")",
".",
"toLowerCase",
"(",
"rootLocale",
")",
";",
"for",
"(",
"int",
"i",
... | Locale.ROOT only @since 1.6 | [
"Locale",
".",
"ROOT",
"only"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L2271-L2278 |
35,175 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.writeObject | private void writeObject(java.io.ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
// ICU 4.8 custom serialization.
// locale as a BCP 47 language tag
out.writeObject(ulocale.toLanguageTag());
// ApostropheMode
if (msgPattern == null) {
ms... | java | private void writeObject(java.io.ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
// ICU 4.8 custom serialization.
// locale as a BCP 47 language tag
out.writeObject(ulocale.toLanguageTag());
// ApostropheMode
if (msgPattern == null) {
ms... | [
"private",
"void",
"writeObject",
"(",
"java",
".",
"io",
".",
"ObjectOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"out",
".",
"defaultWriteObject",
"(",
")",
";",
"// ICU 4.8 custom serialization.",
"// locale as a BCP 47 language tag",
"out",
".",
"write... | Custom serialization, new in ICU 4.8.
We do not want to use default serialization because we only have a small
amount of persistent state which is better expressed explicitly
rather than via writing field objects.
@param out The output stream.
@serialData Writes the locale as a BCP 47 language tag string,
the MessagePa... | [
"Custom",
"serialization",
"new",
"in",
"ICU",
"4",
".",
"8",
".",
"We",
"do",
"not",
"want",
"to",
"use",
"default",
"serialization",
"because",
"we",
"only",
"have",
"a",
"small",
"amount",
"of",
"persistent",
"state",
"which",
"is",
"better",
"expressed... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L2294-L2322 |
35,176 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java | MessageFormat.setArgStartFormat | private void setArgStartFormat(int argStart, Format formatter) {
if (cachedFormatters == null) {
cachedFormatters = new HashMap<Integer, Format>();
}
cachedFormatters.put(argStart, formatter);
} | java | private void setArgStartFormat(int argStart, Format formatter) {
if (cachedFormatters == null) {
cachedFormatters = new HashMap<Integer, Format>();
}
cachedFormatters.put(argStart, formatter);
} | [
"private",
"void",
"setArgStartFormat",
"(",
"int",
"argStart",
",",
"Format",
"formatter",
")",
"{",
"if",
"(",
"cachedFormatters",
"==",
"null",
")",
"{",
"cachedFormatters",
"=",
"new",
"HashMap",
"<",
"Integer",
",",
"Format",
">",
"(",
")",
";",
"}",
... | Sets a formatter for a MessagePattern ARG_START part index. | [
"Sets",
"a",
"formatter",
"for",
"a",
"MessagePattern",
"ARG_START",
"part",
"index",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessageFormat.java#L2389-L2394 |
35,177 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLSocketFactory.java | SSLSocketFactory.getDefault | public static synchronized SocketFactory getDefault() {
// Android-changed: Use security version instead of propertyChecked.
if (defaultSocketFactory != null && lastVersion == Security.getVersion()) {
return defaultSocketFactory;
}
lastVersion = Security.getVersion();
... | java | public static synchronized SocketFactory getDefault() {
// Android-changed: Use security version instead of propertyChecked.
if (defaultSocketFactory != null && lastVersion == Security.getVersion()) {
return defaultSocketFactory;
}
lastVersion = Security.getVersion();
... | [
"public",
"static",
"synchronized",
"SocketFactory",
"getDefault",
"(",
")",
"{",
"// Android-changed: Use security version instead of propertyChecked.",
"if",
"(",
"defaultSocketFactory",
"!=",
"null",
"&&",
"lastVersion",
"==",
"Security",
".",
"getVersion",
"(",
")",
"... | Returns the default SSL socket factory.
<p>The first time this method is called, the security property
"ssl.SocketFactory.provider" is examined. If it is non-null, a class by
that name is loaded and instantiated. If that is successful and the
object is an instance of SSLSocketFactory, it is made the default SSL
socket... | [
"Returns",
"the",
"default",
"SSL",
"socket",
"factory",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/javax/net/ssl/SSLSocketFactory.java#L88-L151 |
35,178 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.getVisibleIDMap | private Map<String, Factory> getVisibleIDMap() {
synchronized (this) { // or idcache-only lock?
if (idcache == null) {
try {
factoryLock.acquireRead();
Map<String, Factory> mutableMap = new HashMap<String, Factory>();
ListIt... | java | private Map<String, Factory> getVisibleIDMap() {
synchronized (this) { // or idcache-only lock?
if (idcache == null) {
try {
factoryLock.acquireRead();
Map<String, Factory> mutableMap = new HashMap<String, Factory>();
ListIt... | [
"private",
"Map",
"<",
"String",
",",
"Factory",
">",
"getVisibleIDMap",
"(",
")",
"{",
"synchronized",
"(",
"this",
")",
"{",
"// or idcache-only lock?",
"if",
"(",
"idcache",
"==",
"null",
")",
"{",
"try",
"{",
"factoryLock",
".",
"acquireRead",
"(",
")"... | Return a map from visible ids to factories. | [
"Return",
"a",
"map",
"from",
"visible",
"ids",
"to",
"factories",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L586-L604 |
35,179 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.getDisplayName | public String getDisplayName(String id, ULocale locale) {
Map<String, Factory> m = getVisibleIDMap();
Factory f = m.get(id);
if (f != null) {
return f.getDisplayName(id, locale);
}
Key key = createKey(id);
while (key.fallback()) {
f = m.get(key.cu... | java | public String getDisplayName(String id, ULocale locale) {
Map<String, Factory> m = getVisibleIDMap();
Factory f = m.get(id);
if (f != null) {
return f.getDisplayName(id, locale);
}
Key key = createKey(id);
while (key.fallback()) {
f = m.get(key.cu... | [
"public",
"String",
"getDisplayName",
"(",
"String",
"id",
",",
"ULocale",
"locale",
")",
"{",
"Map",
"<",
"String",
",",
"Factory",
">",
"m",
"=",
"getVisibleIDMap",
"(",
")",
";",
"Factory",
"f",
"=",
"m",
".",
"get",
"(",
"id",
")",
";",
"if",
"... | Given a visible id, return the display name in the requested locale.
If there is no directly supported id corresponding to this id, return
null. | [
"Given",
"a",
"visible",
"id",
"return",
"the",
"display",
"name",
"in",
"the",
"requested",
"locale",
".",
"If",
"there",
"is",
"no",
"directly",
"supported",
"id",
"corresponding",
"to",
"this",
"id",
"return",
"null",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L620-L636 |
35,180 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.getDisplayNames | public SortedMap<String, String> getDisplayNames(ULocale locale, Comparator<Object> com, String matchID) {
SortedMap<String, String> dncache = null;
LocaleRef ref = dnref;
if (ref != null) {
dncache = ref.get(locale, com);
}
while (dncache == null) {
syn... | java | public SortedMap<String, String> getDisplayNames(ULocale locale, Comparator<Object> com, String matchID) {
SortedMap<String, String> dncache = null;
LocaleRef ref = dnref;
if (ref != null) {
dncache = ref.get(locale, com);
}
while (dncache == null) {
syn... | [
"public",
"SortedMap",
"<",
"String",
",",
"String",
">",
"getDisplayNames",
"(",
"ULocale",
"locale",
",",
"Comparator",
"<",
"Object",
">",
"com",
",",
"String",
"matchID",
")",
"{",
"SortedMap",
"<",
"String",
",",
"String",
">",
"dncache",
"=",
"null",... | Return a snapshot of the mapping from display names to visible
IDs for this service. This set will not change as factories
are added or removed, but the supported ids will, so there is
no guarantee that all and only the ids in the returned map will
be visible and supported by the service in subsequent calls,
nor is th... | [
"Return",
"a",
"snapshot",
"of",
"the",
"mapping",
"from",
"display",
"names",
"to",
"visible",
"IDs",
"for",
"this",
"service",
".",
"This",
"set",
"will",
"not",
"change",
"as",
"factories",
"are",
"added",
"or",
"removed",
"but",
"the",
"supported",
"id... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L682-L727 |
35,181 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.factories | public final List<Factory> factories() {
try {
factoryLock.acquireRead();
return new ArrayList<Factory>(factories);
}
finally{
factoryLock.releaseRead();
}
} | java | public final List<Factory> factories() {
try {
factoryLock.acquireRead();
return new ArrayList<Factory>(factories);
}
finally{
factoryLock.releaseRead();
}
} | [
"public",
"final",
"List",
"<",
"Factory",
">",
"factories",
"(",
")",
"{",
"try",
"{",
"factoryLock",
".",
"acquireRead",
"(",
")",
";",
"return",
"new",
"ArrayList",
"<",
"Factory",
">",
"(",
"factories",
")",
";",
"}",
"finally",
"{",
"factoryLock",
... | Return a snapshot of the currently registered factories. There
is no guarantee that the list will still match the current
factory list of the service subsequent to this call. | [
"Return",
"a",
"snapshot",
"of",
"the",
"currently",
"registered",
"factories",
".",
"There",
"is",
"no",
"guarantee",
"that",
"the",
"list",
"will",
"still",
"match",
"the",
"current",
"factory",
"list",
"of",
"the",
"service",
"subsequent",
"to",
"this",
"... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L761-L769 |
35,182 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.registerObject | public Factory registerObject(Object obj, String id, boolean visible) {
String canonicalID = createKey(id).canonicalID();
return registerFactory(new SimpleFactory(obj, canonicalID, visible));
} | java | public Factory registerObject(Object obj, String id, boolean visible) {
String canonicalID = createKey(id).canonicalID();
return registerFactory(new SimpleFactory(obj, canonicalID, visible));
} | [
"public",
"Factory",
"registerObject",
"(",
"Object",
"obj",
",",
"String",
"id",
",",
"boolean",
"visible",
")",
"{",
"String",
"canonicalID",
"=",
"createKey",
"(",
"id",
")",
".",
"canonicalID",
"(",
")",
";",
"return",
"registerFactory",
"(",
"new",
"S... | Register an object with the provided id. The id will be
canonicalized. The canonicalized ID will be returned by
getVisibleIDs if visible is true. | [
"Register",
"an",
"object",
"with",
"the",
"provided",
"id",
".",
"The",
"id",
"will",
"be",
"canonicalized",
".",
"The",
"canonicalized",
"ID",
"will",
"be",
"returned",
"by",
"getVisibleIDs",
"if",
"visible",
"is",
"true",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L784-L787 |
35,183 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.registerFactory | public final Factory registerFactory(Factory factory) {
if (factory == null) {
throw new NullPointerException();
}
try {
factoryLock.acquireWrite();
factories.add(0, factory);
clearCaches();
}
finally {
factoryLock.relea... | java | public final Factory registerFactory(Factory factory) {
if (factory == null) {
throw new NullPointerException();
}
try {
factoryLock.acquireWrite();
factories.add(0, factory);
clearCaches();
}
finally {
factoryLock.relea... | [
"public",
"final",
"Factory",
"registerFactory",
"(",
"Factory",
"factory",
")",
"{",
"if",
"(",
"factory",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"try",
"{",
"factoryLock",
".",
"acquireWrite",
"(",
")",
";",
... | Register a Factory. Returns the factory if the service accepts
the factory, otherwise returns null. The default implementation
accepts all factories. | [
"Register",
"a",
"Factory",
".",
"Returns",
"the",
"factory",
"if",
"the",
"service",
"accepts",
"the",
"factory",
"otherwise",
"returns",
"null",
".",
"The",
"default",
"implementation",
"accepts",
"all",
"factories",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L794-L808 |
35,184 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.unregisterFactory | public final boolean unregisterFactory(Factory factory) {
if (factory == null) {
throw new NullPointerException();
}
boolean result = false;
try {
factoryLock.acquireWrite();
if (factories.remove(factory)) {
result = true;
... | java | public final boolean unregisterFactory(Factory factory) {
if (factory == null) {
throw new NullPointerException();
}
boolean result = false;
try {
factoryLock.acquireWrite();
if (factories.remove(factory)) {
result = true;
... | [
"public",
"final",
"boolean",
"unregisterFactory",
"(",
"Factory",
"factory",
")",
"{",
"if",
"(",
"factory",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
")",
";",
"}",
"boolean",
"result",
"=",
"false",
";",
"try",
"{",
"factoryLo... | Unregister a factory. The first matching registered factory will
be removed from the list. Returns true if a matching factory was
removed. | [
"Unregister",
"a",
"factory",
".",
"The",
"first",
"matching",
"registered",
"factory",
"will",
"be",
"removed",
"from",
"the",
"list",
".",
"Returns",
"true",
"if",
"a",
"matching",
"factory",
"was",
"removed",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L815-L836 |
35,185 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java | ICUService.stats | public String stats() {
ICURWLock.Stats stats = factoryLock.resetStats();
if (stats != null) {
return stats.toString();
}
return "no stats";
} | java | public String stats() {
ICURWLock.Stats stats = factoryLock.resetStats();
if (stats != null) {
return stats.toString();
}
return "no stats";
} | [
"public",
"String",
"stats",
"(",
")",
"{",
"ICURWLock",
".",
"Stats",
"stats",
"=",
"factoryLock",
".",
"resetStats",
"(",
")",
";",
"if",
"(",
"stats",
"!=",
"null",
")",
"{",
"return",
"stats",
".",
"toString",
"(",
")",
";",
"}",
"return",
"\"no ... | When the statistics for this service is already enabled,
return the log and resets he statistics.
When the statistics is not enabled, this method enable
the statistics. Used for debugging purposes. | [
"When",
"the",
"statistics",
"for",
"this",
"service",
"is",
"already",
"enabled",
"return",
"the",
"log",
"and",
"resets",
"he",
"statistics",
".",
"When",
"the",
"statistics",
"is",
"not",
"enabled",
"this",
"method",
"enable",
"the",
"statistics",
".",
"U... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUService.java#L952-L958 |
35,186 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java | StepPattern.calcTargetString | public void calcTargetString()
{
int whatToShow = getWhatToShow();
switch (whatToShow)
{
case DTMFilter.SHOW_COMMENT :
m_targetString = PsuedoNames.PSEUDONAME_COMMENT;
break;
case DTMFilter.SHOW_TEXT :
case DTMFilter.SHOW_CDATA_SECTION :
case (DTMFilter.SHOW_TEXT | DTMFilter.... | java | public void calcTargetString()
{
int whatToShow = getWhatToShow();
switch (whatToShow)
{
case DTMFilter.SHOW_COMMENT :
m_targetString = PsuedoNames.PSEUDONAME_COMMENT;
break;
case DTMFilter.SHOW_TEXT :
case DTMFilter.SHOW_CDATA_SECTION :
case (DTMFilter.SHOW_TEXT | DTMFilter.... | [
"public",
"void",
"calcTargetString",
"(",
")",
"{",
"int",
"whatToShow",
"=",
"getWhatToShow",
"(",
")",
";",
"switch",
"(",
"whatToShow",
")",
"{",
"case",
"DTMFilter",
".",
"SHOW_COMMENT",
":",
"m_targetString",
"=",
"PsuedoNames",
".",
"PSEUDONAME_COMMENT",
... | Calculate the local name or psuedo name of the node that this pattern will test,
for hash table lookup optimization.
@see org.apache.xpath.compiler.PsuedoNames | [
"Calculate",
"the",
"local",
"name",
"or",
"psuedo",
"name",
"of",
"the",
"node",
"that",
"this",
"pattern",
"will",
"test",
"for",
"hash",
"table",
"lookup",
"optimization",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L93-L125 |
35,187 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java | StepPattern.setPredicates | public void setPredicates(Expression[] predicates)
{
m_predicates = predicates;
if(null != predicates)
{
for(int i = 0; i < predicates.length; i++)
{
predicates[i].exprSetParent(this);
}
}
calcScore();
} | java | public void setPredicates(Expression[] predicates)
{
m_predicates = predicates;
if(null != predicates)
{
for(int i = 0; i < predicates.length; i++)
{
predicates[i].exprSetParent(this);
}
}
calcScore();
} | [
"public",
"void",
"setPredicates",
"(",
"Expression",
"[",
"]",
"predicates",
")",
"{",
"m_predicates",
"=",
"predicates",
";",
"if",
"(",
"null",
"!=",
"predicates",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"predicates",
".",
"length... | Set the predicates for this match pattern step.
@param predicates An array of expressions that define predicates
for this step. | [
"Set",
"the",
"predicates",
"for",
"this",
"match",
"pattern",
"step",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L283-L296 |
35,188 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java | StepPattern.calcScore | public void calcScore()
{
if ((getPredicateCount() > 0) || (null != m_relativePathPattern))
{
m_score = SCORE_OTHER;
}
else
super.calcScore();
if (null == m_targetString)
calcTargetString();
} | java | public void calcScore()
{
if ((getPredicateCount() > 0) || (null != m_relativePathPattern))
{
m_score = SCORE_OTHER;
}
else
super.calcScore();
if (null == m_targetString)
calcTargetString();
} | [
"public",
"void",
"calcScore",
"(",
")",
"{",
"if",
"(",
"(",
"getPredicateCount",
"(",
")",
">",
"0",
")",
"||",
"(",
"null",
"!=",
"m_relativePathPattern",
")",
")",
"{",
"m_score",
"=",
"SCORE_OTHER",
";",
"}",
"else",
"super",
".",
"calcScore",
"("... | Static calc of match score. | [
"Static",
"calc",
"of",
"match",
"score",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L301-L313 |
35,189 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java | StepPattern.checkProximityPosition | private final boolean checkProximityPosition(XPathContext xctxt,
int predPos, DTM dtm, int context, int pos)
{
try
{
DTMAxisTraverser traverser =
dtm.getAxisTraverser(Axis.PRECEDINGSIBLING);
for (int child = traverser.first(context); DTM.NULL != child;
child = tra... | java | private final boolean checkProximityPosition(XPathContext xctxt,
int predPos, DTM dtm, int context, int pos)
{
try
{
DTMAxisTraverser traverser =
dtm.getAxisTraverser(Axis.PRECEDINGSIBLING);
for (int child = traverser.first(context); DTM.NULL != child;
child = tra... | [
"private",
"final",
"boolean",
"checkProximityPosition",
"(",
"XPathContext",
"xctxt",
",",
"int",
"predPos",
",",
"DTM",
"dtm",
",",
"int",
"context",
",",
"int",
"pos",
")",
"{",
"try",
"{",
"DTMAxisTraverser",
"traverser",
"=",
"dtm",
".",
"getAxisTraverser... | New Method to check whether the current node satisfies a position predicate
@param xctxt The XPath runtime context.
@param predPos Which predicate we're evaluating of foo[1][2][3].
@param dtm The DTM of the current node.
@param context The currentNode.
@param pos The position being requested, i.e. the value returned b... | [
"New",
"Method",
"to",
"check",
"whether",
"the",
"current",
"node",
"satisfies",
"a",
"position",
"predicate"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L428-L509 |
35,190 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java | StepPattern.executePredicates | protected final boolean executePredicates(
XPathContext xctxt, DTM dtm, int currentNode)
throws javax.xml.transform.TransformerException
{
boolean result = true;
boolean positionAlreadySeen = false;
int n = getPredicateCount();
try
{
xctxt.pushSubContextList(this);
... | java | protected final boolean executePredicates(
XPathContext xctxt, DTM dtm, int currentNode)
throws javax.xml.transform.TransformerException
{
boolean result = true;
boolean positionAlreadySeen = false;
int n = getPredicateCount();
try
{
xctxt.pushSubContextList(this);
... | [
"protected",
"final",
"boolean",
"executePredicates",
"(",
"XPathContext",
"xctxt",
",",
"DTM",
"dtm",
",",
"int",
"currentNode",
")",
"throws",
"javax",
".",
"xml",
".",
"transform",
".",
"TransformerException",
"{",
"boolean",
"result",
"=",
"true",
";",
"bo... | Execute the predicates on this step to determine if the current node
should be filtered or accepted.
@param xctxt The XPath runtime context.
@param dtm The DTM of the current node.
@param currentNode The current node context.
@return true if the node should be accepted, false otherwise.
@throws javax.xml.transform.T... | [
"Execute",
"the",
"predicates",
"on",
"this",
"step",
"to",
"determine",
"if",
"the",
"current",
"node",
"should",
"be",
"filtered",
"or",
"accepted",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L708-L778 |
35,191 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java | StepPattern.callSubtreeVisitors | protected void callSubtreeVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predic... | java | protected void callSubtreeVisitors(XPathVisitor visitor)
{
if (null != m_predicates)
{
int n = m_predicates.length;
for (int i = 0; i < n; i++)
{
ExpressionOwner predOwner = new PredOwner(i);
if (visitor.visitPredicate(predOwner, m_predicates[i]))
{
m_predic... | [
"protected",
"void",
"callSubtreeVisitors",
"(",
"XPathVisitor",
"visitor",
")",
"{",
"if",
"(",
"null",
"!=",
"m_predicates",
")",
"{",
"int",
"n",
"=",
"m_predicates",
".",
"length",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",
";",
"... | Call the visitors on the subtree. Factored out from callVisitors
so it may be called by derived classes. | [
"Call",
"the",
"visitors",
"on",
"the",
"subtree",
".",
"Factored",
"out",
"from",
"callVisitors",
"so",
"it",
"may",
"be",
"called",
"by",
"derived",
"classes",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/patterns/StepPattern.java#L979-L997 |
35,192 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/java/nio/NioUtils.java | NioUtils.newFileChannel | public static FileChannel newFileChannel(Closeable ioObject, FileDescriptor fd, int mode) {
ChannelFactory factory = ChannelFactory.INSTANCE;
if (factory == null) {
throw new LibraryNotLinkedError("Channel support", "jre_channels",
"JavaNioChannelFactoryImpl");
}
return facto... | java | public static FileChannel newFileChannel(Closeable ioObject, FileDescriptor fd, int mode) {
ChannelFactory factory = ChannelFactory.INSTANCE;
if (factory == null) {
throw new LibraryNotLinkedError("Channel support", "jre_channels",
"JavaNioChannelFactoryImpl");
}
return facto... | [
"public",
"static",
"FileChannel",
"newFileChannel",
"(",
"Closeable",
"ioObject",
",",
"FileDescriptor",
"fd",
",",
"int",
"mode",
")",
"{",
"ChannelFactory",
"factory",
"=",
"ChannelFactory",
".",
"INSTANCE",
";",
"if",
"(",
"factory",
"==",
"null",
")",
"{"... | Helps bridge between io and nio. | [
"Helps",
"bridge",
"between",
"io",
"and",
"nio",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/java/nio/NioUtils.java#L61-L68 |
35,193 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.recompose | public void recompose() throws TransformerException
{
// Now we make a Vector that is going to hold all of the recomposable elements
Vector recomposableElements = new Vector();
// First, we build the global import tree.
if (null == m_globalImportList)
{
Vector importList = new Vector()... | java | public void recompose() throws TransformerException
{
// Now we make a Vector that is going to hold all of the recomposable elements
Vector recomposableElements = new Vector();
// First, we build the global import tree.
if (null == m_globalImportList)
{
Vector importList = new Vector()... | [
"public",
"void",
"recompose",
"(",
")",
"throws",
"TransformerException",
"{",
"// Now we make a Vector that is going to hold all of the recomposable elements",
"Vector",
"recomposableElements",
"=",
"new",
"Vector",
"(",
")",
";",
"// First, we build the global import tree.",
"... | Recompose the values of all "composed" properties, meaning
properties that need to be combined or calculated from
the combination of imported and included stylesheets. This
method determines the proper import precedence of all imported
stylesheets. It then iterates through all of the elements and
properties in the pr... | [
"Recompose",
"the",
"values",
"of",
"all",
"composed",
"properties",
"meaning",
"properties",
"that",
"need",
"to",
"be",
"combined",
"or",
"calculated",
"from",
"the",
"combination",
"of",
"imported",
"and",
"included",
"stylesheets",
".",
"This",
"method",
"de... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L238-L349 |
35,194 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.composeTemplates | void composeTemplates(ElemTemplateElement templ) throws TransformerException
{
templ.compose(this);
for (ElemTemplateElement child = templ.getFirstChildElem();
child != null; child = child.getNextSiblingElem())
{
composeTemplates(child);
}
templ.endCompose(this);
} | java | void composeTemplates(ElemTemplateElement templ) throws TransformerException
{
templ.compose(this);
for (ElemTemplateElement child = templ.getFirstChildElem();
child != null; child = child.getNextSiblingElem())
{
composeTemplates(child);
}
templ.endCompose(this);
} | [
"void",
"composeTemplates",
"(",
"ElemTemplateElement",
"templ",
")",
"throws",
"TransformerException",
"{",
"templ",
".",
"compose",
"(",
"this",
")",
";",
"for",
"(",
"ElemTemplateElement",
"child",
"=",
"templ",
".",
"getFirstChildElem",
"(",
")",
";",
"child... | Call the compose function for each ElemTemplateElement.
@param templ non-null reference to template element that will have
the composed method called on it, and will have it's children's composed
methods called. | [
"Call",
"the",
"compose",
"function",
"for",
"each",
"ElemTemplateElement",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L358-L370 |
35,195 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.getImportNumber | public int getImportNumber(StylesheetComposed sheet)
{
if (this == sheet)
return 0;
int n = getGlobalImportCount();
for (int i = 0; i < n; i++)
{
if (sheet == getGlobalImport(i))
return i;
}
return -1;
} | java | public int getImportNumber(StylesheetComposed sheet)
{
if (this == sheet)
return 0;
int n = getGlobalImportCount();
for (int i = 0; i < n; i++)
{
if (sheet == getGlobalImport(i))
return i;
}
return -1;
} | [
"public",
"int",
"getImportNumber",
"(",
"StylesheetComposed",
"sheet",
")",
"{",
"if",
"(",
"this",
"==",
"sheet",
")",
"return",
"0",
";",
"int",
"n",
"=",
"getGlobalImportCount",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"n",... | Given a stylesheet, return the number of the stylesheet
in the global import list.
@param sheet The stylesheet which will be located in the
global import list.
@return The index into the global import list of the given stylesheet,
or -1 if it is not found (which should never happen). | [
"Given",
"a",
"stylesheet",
"return",
"the",
"number",
"of",
"the",
"stylesheet",
"in",
"the",
"global",
"import",
"list",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L469-L484 |
35,196 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.recomposeAttributeSets | void recomposeAttributeSets(ElemAttributeSet attrSet)
{
ArrayList attrSetList = (ArrayList) m_attrSets.get(attrSet.getName());
if (null == attrSetList)
{
attrSetList = new ArrayList();
m_attrSets.put(attrSet.getName(), attrSetList);
}
attrSetList.add(attrSet);
} | java | void recomposeAttributeSets(ElemAttributeSet attrSet)
{
ArrayList attrSetList = (ArrayList) m_attrSets.get(attrSet.getName());
if (null == attrSetList)
{
attrSetList = new ArrayList();
m_attrSets.put(attrSet.getName(), attrSetList);
}
attrSetList.add(attrSet);
} | [
"void",
"recomposeAttributeSets",
"(",
"ElemAttributeSet",
"attrSet",
")",
"{",
"ArrayList",
"attrSetList",
"=",
"(",
"ArrayList",
")",
"m_attrSets",
".",
"get",
"(",
"attrSet",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"null",
"==",
"attrSetList",
")",... | Recompose the attribute-set declarations.
@param attrSet An attribute-set to add to the hashtable of attribute sets. | [
"Recompose",
"the",
"attribute",
"-",
"set",
"declarations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L551-L563 |
35,197 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.recomposeDecimalFormats | void recomposeDecimalFormats(DecimalFormatProperties dfp)
{
DecimalFormatSymbols oldDfs =
(DecimalFormatSymbols) m_decimalFormatSymbols.get(dfp.getName());
if (null == oldDfs)
{
m_decimalFormatSymbols.put(dfp.getName(), dfp.getDecimalFormatSymbols());
}
else if (!dfp.getDec... | java | void recomposeDecimalFormats(DecimalFormatProperties dfp)
{
DecimalFormatSymbols oldDfs =
(DecimalFormatSymbols) m_decimalFormatSymbols.get(dfp.getName());
if (null == oldDfs)
{
m_decimalFormatSymbols.put(dfp.getName(), dfp.getDecimalFormatSymbols());
}
else if (!dfp.getDec... | [
"void",
"recomposeDecimalFormats",
"(",
"DecimalFormatProperties",
"dfp",
")",
"{",
"DecimalFormatSymbols",
"oldDfs",
"=",
"(",
"DecimalFormatSymbols",
")",
"m_decimalFormatSymbols",
".",
"get",
"(",
"dfp",
".",
"getName",
"(",
")",
")",
";",
"if",
"(",
"null",
... | Recompose the decimal-format declarations.
@param dfp A DecimalFormatProperties to add to the hashtable of decimal formats. | [
"Recompose",
"the",
"decimal",
"-",
"format",
"declarations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L592-L621 |
35,198 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.recomposeVariables | void recomposeVariables(ElemVariable elemVar)
{
// Don't overide higher priority variable
if (getVariableOrParamComposed(elemVar.getName()) == null)
{
elemVar.setIsTopLevel(true); // Mark as a top-level variable or param
elemVar.setIndex(m_variables.size());
m_variables.ad... | java | void recomposeVariables(ElemVariable elemVar)
{
// Don't overide higher priority variable
if (getVariableOrParamComposed(elemVar.getName()) == null)
{
elemVar.setIsTopLevel(true); // Mark as a top-level variable or param
elemVar.setIndex(m_variables.size());
m_variables.ad... | [
"void",
"recomposeVariables",
"(",
"ElemVariable",
"elemVar",
")",
"{",
"// Don't overide higher priority variable ",
"if",
"(",
"getVariableOrParamComposed",
"(",
"elemVar",
".",
"getName",
"(",
")",
")",
"==",
"null",
")",
"{",
"elemVar",
".",
"setIsTopLevel"... | Recompose the top level variable and parameter declarations.
@param elemVar A top level variable or parameter to be added to the Vector. | [
"Recompose",
"the",
"top",
"level",
"variable",
"and",
"parameter",
"declarations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L827-L836 |
35,199 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java | StylesheetRoot.recomposeWhiteSpaceInfo | void recomposeWhiteSpaceInfo(WhiteSpaceInfo wsi)
{
if (null == m_whiteSpaceInfoList)
m_whiteSpaceInfoList = new TemplateList();
m_whiteSpaceInfoList.setTemplate(wsi);
} | java | void recomposeWhiteSpaceInfo(WhiteSpaceInfo wsi)
{
if (null == m_whiteSpaceInfoList)
m_whiteSpaceInfoList = new TemplateList();
m_whiteSpaceInfoList.setTemplate(wsi);
} | [
"void",
"recomposeWhiteSpaceInfo",
"(",
"WhiteSpaceInfo",
"wsi",
")",
"{",
"if",
"(",
"null",
"==",
"m_whiteSpaceInfoList",
")",
"m_whiteSpaceInfoList",
"=",
"new",
"TemplateList",
"(",
")",
";",
"m_whiteSpaceInfoList",
".",
"setTemplate",
"(",
"wsi",
")",
";",
... | Recompose the strip-space and preserve-space declarations.
@param wsi A WhiteSpaceInfo element to add to the list of WhiteSpaceInfo elements. | [
"Recompose",
"the",
"strip",
"-",
"space",
"and",
"preserve",
"-",
"space",
"declarations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/StylesheetRoot.java#L886-L892 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.