id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
34,300 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/SunCertPathBuilder.java | SunCertPathBuilder.anchorIsTarget | private static boolean anchorIsTarget(TrustAnchor anchor,
CertSelector sel)
{
X509Certificate anchorCert = anchor.getTrustedCert();
if (anchorCert != null) {
return sel.match(anchorCert);
}
return false;
} | java | private static boolean anchorIsTarget(TrustAnchor anchor,
CertSelector sel)
{
X509Certificate anchorCert = anchor.getTrustedCert();
if (anchorCert != null) {
return sel.match(anchorCert);
}
return false;
} | [
"private",
"static",
"boolean",
"anchorIsTarget",
"(",
"TrustAnchor",
"anchor",
",",
"CertSelector",
"sel",
")",
"{",
"X509Certificate",
"anchorCert",
"=",
"anchor",
".",
"getTrustedCert",
"(",
")",
";",
"if",
"(",
"anchorCert",
"!=",
"null",
")",
"{",
"return... | Returns true if trust anchor certificate matches specified
certificate constraints. | [
"Returns",
"true",
"if",
"trust",
"anchor",
"certificate",
"matches",
"specified",
"certificate",
"constraints",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/SunCertPathBuilder.java#L795-L803 |
34,301 | google/j2objc | tree_shaker/src/main/java/com/google/devtools/treeshaker/ElementReferenceMapper.java | ElementReferenceMapper.endVisit | @Override
public void endVisit(VariableDeclarationFragment fragment) {
//TODO(malvania): Add field to elementReferenceMap when field detection is enabled and the
// ElementUtil.getBinaryName() method doesn't break when called on a static block's
// ExecutableElement.
//String fieldID = stitchFieldId... | java | @Override
public void endVisit(VariableDeclarationFragment fragment) {
//TODO(malvania): Add field to elementReferenceMap when field detection is enabled and the
// ElementUtil.getBinaryName() method doesn't break when called on a static block's
// ExecutableElement.
//String fieldID = stitchFieldId... | [
"@",
"Override",
"public",
"void",
"endVisit",
"(",
"VariableDeclarationFragment",
"fragment",
")",
"{",
"//TODO(malvania): Add field to elementReferenceMap when field detection is enabled and the",
"// ElementUtil.getBinaryName() method doesn't break when called on a static block's",
"// ... | and resolve the type by its name using a resolve method in the parser environment. | [
"and",
"resolve",
"the",
"type",
"by",
"its",
"name",
"using",
"a",
"resolve",
"method",
"in",
"the",
"parser",
"environment",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/tree_shaker/src/main/java/com/google/devtools/treeshaker/ElementReferenceMapper.java#L182-L203 |
34,302 | google/j2objc | tree_shaker/src/main/java/com/google/devtools/treeshaker/ElementReferenceMapper.java | ElementReferenceMapper.handleChildMethod | private void handleChildMethod(ExecutableElement methodElement) {
String methodIdentifier = stitchMethodIdentifier(methodElement);
MethodReferenceNode node = (MethodReferenceNode) elementReferenceMap.get(methodIdentifier);
if (node == null) {
node = new MethodReferenceNode(methodElement);
}
no... | java | private void handleChildMethod(ExecutableElement methodElement) {
String methodIdentifier = stitchMethodIdentifier(methodElement);
MethodReferenceNode node = (MethodReferenceNode) elementReferenceMap.get(methodIdentifier);
if (node == null) {
node = new MethodReferenceNode(methodElement);
}
no... | [
"private",
"void",
"handleChildMethod",
"(",
"ExecutableElement",
"methodElement",
")",
"{",
"String",
"methodIdentifier",
"=",
"stitchMethodIdentifier",
"(",
"methodElement",
")",
";",
"MethodReferenceNode",
"node",
"=",
"(",
"MethodReferenceNode",
")",
"elementReference... | Adds a node for the child in the elementReferenceMap if it doesn't exist, marks it as declared,
and adds this method to the override map.
@param methodElement | [
"Adds",
"a",
"node",
"for",
"the",
"child",
"in",
"the",
"elementReferenceMap",
"if",
"it",
"doesn",
"t",
"exist",
"marks",
"it",
"as",
"declared",
"and",
"adds",
"this",
"method",
"to",
"the",
"override",
"map",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/tree_shaker/src/main/java/com/google/devtools/treeshaker/ElementReferenceMapper.java#L210-L219 |
34,303 | google/j2objc | tree_shaker/src/main/java/com/google/devtools/treeshaker/ElementReferenceMapper.java | ElementReferenceMapper.handleParentMethod | private void handleParentMethod(ExecutableElement parentMethodElement, ExecutableElement
childMethodElement) {
MethodReferenceNode parentMethodNode = (MethodReferenceNode) elementReferenceMap
.get(stitchMethodIdentifier(parentMethodElement));
if (parentMethodNode == null) {
parentMethodNode ... | java | private void handleParentMethod(ExecutableElement parentMethodElement, ExecutableElement
childMethodElement) {
MethodReferenceNode parentMethodNode = (MethodReferenceNode) elementReferenceMap
.get(stitchMethodIdentifier(parentMethodElement));
if (parentMethodNode == null) {
parentMethodNode ... | [
"private",
"void",
"handleParentMethod",
"(",
"ExecutableElement",
"parentMethodElement",
",",
"ExecutableElement",
"childMethodElement",
")",
"{",
"MethodReferenceNode",
"parentMethodNode",
"=",
"(",
"MethodReferenceNode",
")",
"elementReferenceMap",
".",
"get",
"(",
"stit... | Adds a node for the parent in the elementReferenceMap if it doesn't exist, adds the method to
the override map, and links the child method in the invokedMethods set.
@param parentMethodElement
@param childMethodElement | [
"Adds",
"a",
"node",
"for",
"the",
"parent",
"in",
"the",
"elementReferenceMap",
"if",
"it",
"doesn",
"t",
"exist",
"adds",
"the",
"method",
"to",
"the",
"override",
"map",
"and",
"links",
"the",
"child",
"method",
"in",
"the",
"invokedMethods",
"set",
"."... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/tree_shaker/src/main/java/com/google/devtools/treeshaker/ElementReferenceMapper.java#L227-L237 |
34,304 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/KeyTable.java | KeyTable.addValueInRefsTable | private void addValueInRefsTable(XPathContext xctxt, XMLString ref, int node) {
XNodeSet nodes = (XNodeSet) m_refsTable.get(ref);
if (nodes == null)
{
nodes = new XNodeSet(node, xctxt.getDTMManager());
nodes.nextNode();
m_refsTable.put(ref, nodes);
}
else
{
// Nodes ... | java | private void addValueInRefsTable(XPathContext xctxt, XMLString ref, int node) {
XNodeSet nodes = (XNodeSet) m_refsTable.get(ref);
if (nodes == null)
{
nodes = new XNodeSet(node, xctxt.getDTMManager());
nodes.nextNode();
m_refsTable.put(ref, nodes);
}
else
{
// Nodes ... | [
"private",
"void",
"addValueInRefsTable",
"(",
"XPathContext",
"xctxt",
",",
"XMLString",
"ref",
",",
"int",
"node",
")",
"{",
"XNodeSet",
"nodes",
"=",
"(",
"XNodeSet",
")",
"m_refsTable",
".",
"get",
"(",
"ref",
")",
";",
"if",
"(",
"nodes",
"==",
"nul... | Add an association between a ref and a node in the m_refsTable.
Requires that m_refsTable != null
@param xctxt XPath context
@param ref the value of the use clause of the current key for the given node
@param node the node to reference | [
"Add",
"an",
"association",
"between",
"a",
"ref",
"and",
"a",
"node",
"in",
"the",
"m_refsTable",
".",
"Requires",
"that",
"m_refsTable",
"!",
"=",
"null"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/KeyTable.java#L239-L259 |
34,305 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetMatch.java | CharsetMatch.getString | public String getString(int maxLength) throws java.io.IOException {
String result = null;
if (fInputStream != null) {
StringBuilder sb = new StringBuilder();
char[] buffer = new char[1024];
Reader reader = getReader();
int max = maxLength < 0? Integer.MAX_... | java | public String getString(int maxLength) throws java.io.IOException {
String result = null;
if (fInputStream != null) {
StringBuilder sb = new StringBuilder();
char[] buffer = new char[1024];
Reader reader = getReader();
int max = maxLength < 0? Integer.MAX_... | [
"public",
"String",
"getString",
"(",
"int",
"maxLength",
")",
"throws",
"java",
".",
"io",
".",
"IOException",
"{",
"String",
"result",
"=",
"null",
";",
"if",
"(",
"fInputStream",
"!=",
"null",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder"... | Create a Java String from Unicode character data corresponding
to the original byte data supplied to the Charset detect operation.
The length of the returned string is limited to the specified size;
the string will be trunctated to this length if necessary. A limit value of
zero or less is ignored, and treated as no l... | [
"Create",
"a",
"Java",
"String",
"from",
"Unicode",
"character",
"data",
"corresponding",
"to",
"the",
"original",
"byte",
"data",
"supplied",
"to",
"the",
"Charset",
"detect",
"operation",
".",
"The",
"length",
"of",
"the",
"returned",
"string",
"is",
"limite... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/CharsetMatch.java#L84-L116 |
34,306 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/pipeline/BuildClosureQueue.java | BuildClosureQueue.getNextFile | public InputFile getNextFile() {
for (Iterator<String> iter = queuedNames.iterator(); iter.hasNext(); ) {
String name = iter.next();
iter.remove();
processedNames.add(name);
InputFile file = getFileForName(name);
if (file != null) {
return file;
}
}
return null;
... | java | public InputFile getNextFile() {
for (Iterator<String> iter = queuedNames.iterator(); iter.hasNext(); ) {
String name = iter.next();
iter.remove();
processedNames.add(name);
InputFile file = getFileForName(name);
if (file != null) {
return file;
}
}
return null;
... | [
"public",
"InputFile",
"getNextFile",
"(",
")",
"{",
"for",
"(",
"Iterator",
"<",
"String",
">",
"iter",
"=",
"queuedNames",
".",
"iterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"String",
"name",
"=",
"iter",
".",
"next",
... | Returns the next Java source file to be processed. Returns null if the
queue is empty. | [
"Returns",
"the",
"next",
"Java",
"source",
"file",
"to",
"be",
"processed",
".",
"Returns",
"null",
"if",
"the",
"queue",
"is",
"empty",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/pipeline/BuildClosureQueue.java#L48-L59 |
34,307 | google/j2objc | examples/protobuf/ListPeople.java | ListPeople.Print | static void Print(AddressBook addressBook) {
for (Person person: addressBook.getPeopleList()) {
System.out.println("Person ID: " + person.getId());
System.out.println(" Name: " + person.getName());
if (!person.getEmail().isEmpty()) {
System.out.println(" E-mail address: " + person.getEma... | java | static void Print(AddressBook addressBook) {
for (Person person: addressBook.getPeopleList()) {
System.out.println("Person ID: " + person.getId());
System.out.println(" Name: " + person.getName());
if (!person.getEmail().isEmpty()) {
System.out.println(" E-mail address: " + person.getEma... | [
"static",
"void",
"Print",
"(",
"AddressBook",
"addressBook",
")",
"{",
"for",
"(",
"Person",
"person",
":",
"addressBook",
".",
"getPeopleList",
"(",
")",
")",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\"Person ID: \"",
"+",
"person",
".",
"getId",... | Iterates though all people in the AddressBook and prints info about them. | [
"Iterates",
"though",
"all",
"people",
"in",
"the",
"AddressBook",
"and",
"prints",
"info",
"about",
"them",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/examples/protobuf/ListPeople.java#L11-L34 |
34,308 | google/j2objc | examples/protobuf/ListPeople.java | ListPeople.main | public static void main(String[] args) throws Exception {
if (args.length != 1) {
System.err.println("Usage: ListPeople ADDRESS_BOOK_FILE");
System.exit(-1);
}
// Read the existing address book.
AddressBook addressBook =
AddressBook.parseFrom(new FileInputStream(args[0]));
Print... | java | public static void main(String[] args) throws Exception {
if (args.length != 1) {
System.err.println("Usage: ListPeople ADDRESS_BOOK_FILE");
System.exit(-1);
}
// Read the existing address book.
AddressBook addressBook =
AddressBook.parseFrom(new FileInputStream(args[0]));
Print... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"Exception",
"{",
"if",
"(",
"args",
".",
"length",
"!=",
"1",
")",
"{",
"System",
".",
"err",
".",
"println",
"(",
"\"Usage: ListPeople ADDRESS_BOOK_FILE\"",
")",
";",
... | the information inside. | [
"the",
"information",
"inside",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/examples/protobuf/ListPeople.java#L38-L49 |
34,309 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/IntStack.java | IntStack.push | public int push(int i)
{
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
int newMap[] = new int[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
m_map[m_firstFree] = i;
m_firstFree++;
return i;
} | java | public int push(int i)
{
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
int newMap[] = new int[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
m_map[m_firstFree] = i;
m_firstFree++;
return i;
} | [
"public",
"int",
"push",
"(",
"int",
"i",
")",
"{",
"if",
"(",
"(",
"m_firstFree",
"+",
"1",
")",
">=",
"m_mapSize",
")",
"{",
"m_mapSize",
"+=",
"m_blocksize",
";",
"int",
"newMap",
"[",
"]",
"=",
"new",
"int",
"[",
"m_mapSize",
"]",
";",
"System"... | Pushes an item onto the top of this stack.
@param i the int to be pushed onto this stack.
@return the <code>item</code> argument. | [
"Pushes",
"an",
"item",
"onto",
"the",
"top",
"of",
"this",
"stack",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/IntStack.java#L72-L91 |
34,310 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X400Address.java | X400Address.encode | public void encode(DerOutputStream out) throws IOException {
DerValue derValue = new DerValue(nameValue);
out.putDerValue(derValue);
} | java | public void encode(DerOutputStream out) throws IOException {
DerValue derValue = new DerValue(nameValue);
out.putDerValue(derValue);
} | [
"public",
"void",
"encode",
"(",
"DerOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"DerValue",
"derValue",
"=",
"new",
"DerValue",
"(",
"nameValue",
")",
";",
"out",
".",
"putDerValue",
"(",
"derValue",
")",
";",
"}"
] | Encode the X400 name into the DerOutputStream.
@param out the DER stream to encode the X400Address to.
@exception IOException on encoding errors. | [
"Encode",
"the",
"X400",
"name",
"into",
"the",
"DerOutputStream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/X400Address.java#L372-L375 |
34,311 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/ObjectVector.java | ObjectVector.addElement | public final void addElement(Object value)
{
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
Object newMap[] = new Object[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
m_map[m_firstFree] = value;
m_firstFree++;
... | java | public final void addElement(Object value)
{
if ((m_firstFree + 1) >= m_mapSize)
{
m_mapSize += m_blocksize;
Object newMap[] = new Object[m_mapSize];
System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1);
m_map = newMap;
}
m_map[m_firstFree] = value;
m_firstFree++;
... | [
"public",
"final",
"void",
"addElement",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"(",
"m_firstFree",
"+",
"1",
")",
">=",
"m_mapSize",
")",
"{",
"m_mapSize",
"+=",
"m_blocksize",
";",
"Object",
"newMap",
"[",
"]",
"=",
"new",
"Object",
"[",
"m_map... | Append an object onto the vector.
@param value Object to add to the list | [
"Append",
"an",
"object",
"onto",
"the",
"vector",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/ObjectVector.java#L126-L143 |
34,312 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/ObjectVector.java | ObjectVector.contains | public final boolean contains(Object s)
{
for (int i = 0; i < m_firstFree; i++)
{
if (m_map[i] == s)
return true;
}
return false;
} | java | public final boolean contains(Object s)
{
for (int i = 0; i < m_firstFree; i++)
{
if (m_map[i] == s)
return true;
}
return false;
} | [
"public",
"final",
"boolean",
"contains",
"(",
"Object",
"s",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"m_firstFree",
";",
"i",
"++",
")",
"{",
"if",
"(",
"m_map",
"[",
"i",
"]",
"==",
"s",
")",
"return",
"true",
";",
"}",
"... | Tell if the table contains the given Object.
@param s object to look for
@return true if the object is in the list | [
"Tell",
"if",
"the",
"table",
"contains",
"the",
"given",
"Object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/ObjectVector.java#L326-L336 |
34,313 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/DebugASTDump.java | DebugASTDump.dumpUnit | public static void dumpUnit(CompilationUnit unit) {
String relativeOutputPath = unit.getMainTypeName().replace('.', '/') + ".ast";
File outputFile = new File(
unit.getEnv().options().fileUtil().getOutputDirectory(), relativeOutputPath);
outputFile.getParentFile().mkdirs();
try (FileOutputStream... | java | public static void dumpUnit(CompilationUnit unit) {
String relativeOutputPath = unit.getMainTypeName().replace('.', '/') + ".ast";
File outputFile = new File(
unit.getEnv().options().fileUtil().getOutputDirectory(), relativeOutputPath);
outputFile.getParentFile().mkdirs();
try (FileOutputStream... | [
"public",
"static",
"void",
"dumpUnit",
"(",
"CompilationUnit",
"unit",
")",
"{",
"String",
"relativeOutputPath",
"=",
"unit",
".",
"getMainTypeName",
"(",
")",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
")",
"+",
"\".ast\"",
";",
"File",
"outputFile",
... | Dumps a compilation unit to a file. The output file's path is the
same as where translated files get written, but with an "ast" suffix. | [
"Dumps",
"a",
"compilation",
"unit",
"to",
"a",
"file",
".",
"The",
"output",
"file",
"s",
"path",
"is",
"the",
"same",
"as",
"where",
"translated",
"files",
"get",
"written",
"but",
"with",
"an",
"ast",
"suffix",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/DebugASTDump.java#L43-L55 |
34,314 | google/j2objc | translator/src/main/java/com/google/devtools/j2objc/ast/DebugASTDump.java | DebugASTDump.dump | public static String dump(TreeNode node) {
DebugASTDump dumper = new DebugASTDump();
node.accept(dumper);
dumper.sb.newline();
return dumper.toString();
} | java | public static String dump(TreeNode node) {
DebugASTDump dumper = new DebugASTDump();
node.accept(dumper);
dumper.sb.newline();
return dumper.toString();
} | [
"public",
"static",
"String",
"dump",
"(",
"TreeNode",
"node",
")",
"{",
"DebugASTDump",
"dumper",
"=",
"new",
"DebugASTDump",
"(",
")",
";",
"node",
".",
"accept",
"(",
"dumper",
")",
";",
"dumper",
".",
"sb",
".",
"newline",
"(",
")",
";",
"return",
... | Dumps an AST node as a string. | [
"Dumps",
"an",
"AST",
"node",
"as",
"a",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/ast/DebugASTDump.java#L60-L65 |
34,315 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java | BigDecimal.compareMagnitude | private int compareMagnitude(BigDecimal val) {
// Match scales, avoid unnecessary inflation
long ys = val.intCompact;
long xs = this.intCompact;
if (xs == 0)
return (ys == 0) ? 0 : -1;
if (ys == 0)
return 1;
long sdiff = (long)this.scale - val.sca... | java | private int compareMagnitude(BigDecimal val) {
// Match scales, avoid unnecessary inflation
long ys = val.intCompact;
long xs = this.intCompact;
if (xs == 0)
return (ys == 0) ? 0 : -1;
if (ys == 0)
return 1;
long sdiff = (long)this.scale - val.sca... | [
"private",
"int",
"compareMagnitude",
"(",
"BigDecimal",
"val",
")",
"{",
"// Match scales, avoid unnecessary inflation",
"long",
"ys",
"=",
"val",
".",
"intCompact",
";",
"long",
"xs",
"=",
"this",
".",
"intCompact",
";",
"if",
"(",
"xs",
"==",
"0",
")",
"r... | Version of compareTo that ignores sign. | [
"Version",
"of",
"compareTo",
"that",
"ignores",
"sign",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L2646-L2691 |
34,316 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java | BigDecimal.bigDigitLength | private static int bigDigitLength(BigInteger b) {
/*
* Same idea as the long version, but we need a better
* approximation of log10(2). Using 646456993/2^31
* is accurate up to max possible reported bitLength.
*/
if (b.signum == 0)
return 1;
int r ... | java | private static int bigDigitLength(BigInteger b) {
/*
* Same idea as the long version, but we need a better
* approximation of log10(2). Using 646456993/2^31
* is accurate up to max possible reported bitLength.
*/
if (b.signum == 0)
return 1;
int r ... | [
"private",
"static",
"int",
"bigDigitLength",
"(",
"BigInteger",
"b",
")",
"{",
"/*\n * Same idea as the long version, but we need a better\n * approximation of log10(2). Using 646456993/2^31\n * is accurate up to max possible reported bitLength.\n */",
"if",
"(... | Returns the length of the absolute value of a BigInteger, in
decimal digits.
@param b the BigInteger
@return the length of the unscaled value, in decimal digits | [
"Returns",
"the",
"length",
"of",
"the",
"absolute",
"value",
"of",
"a",
"BigInteger",
"in",
"decimal",
"digits",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L3813-L3823 |
34,317 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java | BigDecimal.checkScale | private int checkScale(long val) {
int asInt = (int)val;
if (asInt != val) {
asInt = val>Integer.MAX_VALUE ? Integer.MAX_VALUE : Integer.MIN_VALUE;
BigInteger b;
if (intCompact != 0 &&
((b = intVal) == null || b.signum() != 0))
throw ne... | java | private int checkScale(long val) {
int asInt = (int)val;
if (asInt != val) {
asInt = val>Integer.MAX_VALUE ? Integer.MAX_VALUE : Integer.MIN_VALUE;
BigInteger b;
if (intCompact != 0 &&
((b = intVal) == null || b.signum() != 0))
throw ne... | [
"private",
"int",
"checkScale",
"(",
"long",
"val",
")",
"{",
"int",
"asInt",
"=",
"(",
"int",
")",
"val",
";",
"if",
"(",
"asInt",
"!=",
"val",
")",
"{",
"asInt",
"=",
"val",
">",
"Integer",
".",
"MAX_VALUE",
"?",
"Integer",
".",
"MAX_VALUE",
":",... | Check a scale for Underflow or Overflow. If this BigDecimal is
nonzero, throw an exception if the scale is outof range. If this
is zero, saturate the scale to the extreme value of the right
sign if the scale is out of range.
@param val The new scale.
@throws ArithmeticException (overflow or underflow) if the new
scal... | [
"Check",
"a",
"scale",
"for",
"Underflow",
"or",
"Overflow",
".",
"If",
"this",
"BigDecimal",
"is",
"nonzero",
"throw",
"an",
"exception",
"if",
"the",
"scale",
"is",
"outof",
"range",
".",
"If",
"this",
"is",
"zero",
"saturate",
"the",
"scale",
"to",
"t... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L3836-L3846 |
34,318 | google/j2objc | jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java | BigDecimal.commonNeedIncrement | private static boolean commonNeedIncrement(int roundingMode, int qsign,
int cmpFracHalf, boolean oddQuot) {
switch(roundingMode) {
case ROUND_UNNECESSARY:
throw new ArithmeticException("Rounding necessary");
case ROUND_UP: // Away from zero
... | java | private static boolean commonNeedIncrement(int roundingMode, int qsign,
int cmpFracHalf, boolean oddQuot) {
switch(roundingMode) {
case ROUND_UNNECESSARY:
throw new ArithmeticException("Rounding necessary");
case ROUND_UP: // Away from zero
... | [
"private",
"static",
"boolean",
"commonNeedIncrement",
"(",
"int",
"roundingMode",
",",
"int",
"qsign",
",",
"int",
"cmpFracHalf",
",",
"boolean",
"oddQuot",
")",
"{",
"switch",
"(",
"roundingMode",
")",
"{",
"case",
"ROUND_UNNECESSARY",
":",
"throw",
"new",
"... | Shared logic of need increment computation. | [
"Shared",
"logic",
"of",
"need",
"increment",
"computation",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L4146-L4190 |
34,319 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/HebrewCalendar.java | HebrewCalendar.yearType | private final int yearType(int year)
{
int yearLength = handleGetYearLength(year);
if (yearLength > 380) {
yearLength -= 30; // Subtract length of leap month.
}
int type = 0;
switch (yearLength) {
case 353:
type = 0; break;
... | java | private final int yearType(int year)
{
int yearLength = handleGetYearLength(year);
if (yearLength > 380) {
yearLength -= 30; // Subtract length of leap month.
}
int type = 0;
switch (yearLength) {
case 353:
type = 0; break;
... | [
"private",
"final",
"int",
"yearType",
"(",
"int",
"year",
")",
"{",
"int",
"yearLength",
"=",
"handleGetYearLength",
"(",
"year",
")",
";",
"if",
"(",
"yearLength",
">",
"380",
")",
"{",
"yearLength",
"-=",
"30",
";",
"// Subtract length of leap month.",
"}... | Returns the the type of a given year.
0 "Deficient" year with 353 or 383 days
1 "Normal" year with 354 or 384 days
2 "Complete" year with 355 or 385 days | [
"Returns",
"the",
"the",
"type",
"of",
"a",
"given",
"year",
".",
"0",
"Deficient",
"year",
"with",
"353",
"or",
"383",
"days",
"1",
"Normal",
"year",
"with",
"354",
"or",
"384",
"days",
"2",
"Complete",
"year",
"with",
"355",
"or",
"385",
"days"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/HebrewCalendar.java#L635-L657 |
34,320 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/HebrewCalendar.java | HebrewCalendar.handleGetMonthLength | protected int handleGetMonthLength(int extendedYear, int month) {
// Resolve out-of-range months. This is necessary in order to
// obtain the correct year. We correct to
// a 12- or 13-month year (add/subtract 12 or 13, depending
// on the year) but since we _always_ number from 0..12,... | java | protected int handleGetMonthLength(int extendedYear, int month) {
// Resolve out-of-range months. This is necessary in order to
// obtain the correct year. We correct to
// a 12- or 13-month year (add/subtract 12 or 13, depending
// on the year) but since we _always_ number from 0..12,... | [
"protected",
"int",
"handleGetMonthLength",
"(",
"int",
"extendedYear",
",",
"int",
"month",
")",
"{",
"// Resolve out-of-range months. This is necessary in order to",
"// obtain the correct year. We correct to",
"// a 12- or 13-month year (add/subtract 12 or 13, depending",
"// on the... | Returns the length of the given month in the given year | [
"Returns",
"the",
"length",
"of",
"the",
"given",
"month",
"in",
"the",
"given",
"year"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/HebrewCalendar.java#L692-L717 |
34,321 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.getEnvironmentHash | public Hashtable getEnvironmentHash()
{
// Setup a hash to store various environment information in
Hashtable hash = new Hashtable();
// Call various worker methods to fill in the hash
// These are explicitly separate for maintenance and so
// advanced users could call them standalone
chec... | java | public Hashtable getEnvironmentHash()
{
// Setup a hash to store various environment information in
Hashtable hash = new Hashtable();
// Call various worker methods to fill in the hash
// These are explicitly separate for maintenance and so
// advanced users could call them standalone
chec... | [
"public",
"Hashtable",
"getEnvironmentHash",
"(",
")",
"{",
"// Setup a hash to store various environment information in",
"Hashtable",
"hash",
"=",
"new",
"Hashtable",
"(",
")",
";",
"// Call various worker methods to fill in the hash",
"// These are explicitly separate for mainten... | Fill a hash with basic environment settings that affect Xalan.
<p>Worker method called from various places.</p>
<p>Various system and CLASSPATH, etc. properties are put into
the hash as keys with a brief description of the current state
of that item as the value. Any serious problems will be put in
with a key that is... | [
"Fill",
"a",
"hash",
"with",
"basic",
"environment",
"settings",
"that",
"affect",
"Xalan",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L215-L232 |
34,322 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.writeEnvironmentReport | protected boolean writeEnvironmentReport(Hashtable h)
{
if (null == h)
{
logMsg("# ERROR: writeEnvironmentReport called with null Hashtable");
return false;
}
boolean errors = false;
logMsg(
"#---- BEGIN writeEnvironmentReport($Revision: 468646 $): Useful stuff found: ----");
... | java | protected boolean writeEnvironmentReport(Hashtable h)
{
if (null == h)
{
logMsg("# ERROR: writeEnvironmentReport called with null Hashtable");
return false;
}
boolean errors = false;
logMsg(
"#---- BEGIN writeEnvironmentReport($Revision: 468646 $): Useful stuff found: ----");
... | [
"protected",
"boolean",
"writeEnvironmentReport",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"{",
"logMsg",
"(",
"\"# ERROR: writeEnvironmentReport called with null Hashtable\"",
")",
";",
"return",
"false",
";",
"}",
"boolean",
"errors",
... | Dump a basic Xalan environment report to outWriter.
<p>This dumps a simple header and then each of the entries in
the Hashtable to our PrintWriter; it does special processing
for entries that are .jars found in the classpath.</p>
@param h Hashtable of items to report on; presumably
filled in by our various check*() m... | [
"Dump",
"a",
"basic",
"Xalan",
"environment",
"report",
"to",
"outWriter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L248-L302 |
34,323 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkSystemProperties | protected void checkSystemProperties(Hashtable h)
{
if (null == h)
h = new Hashtable();
// Grab java version for later use
try
{
String javaVersion = System.getProperty("java.version");
h.put("java.version", javaVersion);
}
catch (SecurityException se)
{
// For ... | java | protected void checkSystemProperties(Hashtable h)
{
if (null == h)
h = new Hashtable();
// Grab java version for later use
try
{
String javaVersion = System.getProperty("java.version");
h.put("java.version", javaVersion);
}
catch (SecurityException se)
{
// For ... | [
"protected",
"void",
"checkSystemProperties",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"// Grab java version for later use",
"try",
"{",
"String",
"javaVersion",
"=",
"System",
".",
"get... | Fillin hash with info about SystemProperties.
Logs java.class.path and other likely paths; then attempts
to search those paths for .jar files with Xalan-related classes.
//@todo NOTE: We don't actually search java.ext.dirs for
// *.jar files therein! This should be updated
@param h Hashtable to put information in
@... | [
"Fillin",
"hash",
"with",
"info",
"about",
"SystemProperties",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L562-L637 |
34,324 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkPathForJars | protected Vector checkPathForJars(String cp, String[] jars)
{
if ((null == cp) || (null == jars) || (0 == cp.length())
|| (0 == jars.length))
return null;
Vector v = new Vector();
StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
while (st.hasMoreTokens())
{
... | java | protected Vector checkPathForJars(String cp, String[] jars)
{
if ((null == cp) || (null == jars) || (0 == cp.length())
|| (0 == jars.length))
return null;
Vector v = new Vector();
StringTokenizer st = new StringTokenizer(cp, File.pathSeparator);
while (st.hasMoreTokens())
{
... | [
"protected",
"Vector",
"checkPathForJars",
"(",
"String",
"cp",
",",
"String",
"[",
"]",
"jars",
")",
"{",
"if",
"(",
"(",
"null",
"==",
"cp",
")",
"||",
"(",
"null",
"==",
"jars",
")",
"||",
"(",
"0",
"==",
"cp",
".",
"length",
"(",
")",
")",
... | Cheap-o listing of specified .jars found in the classpath.
cp should be separated by the usual File.pathSeparator. We
then do a simplistic search of the path for any requested
.jar filenames, and return a listing of their names and
where (apparently) they came from.
@param cp classpath to search
@param jars array of... | [
"Cheap",
"-",
"o",
"listing",
"of",
"specified",
".",
"jars",
"found",
"in",
"the",
"classpath",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L656-L720 |
34,325 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.getApparentVersion | protected String getApparentVersion(String jarName, long jarSize)
{
// If we found a matching size and it's for our
// jar, then return it's description
// Lookup in static jarVersions Hashtable
String foundSize = (String) jarVersions.get(new Long(jarSize));
if ((null != foundSize) && (foundSiz... | java | protected String getApparentVersion(String jarName, long jarSize)
{
// If we found a matching size and it's for our
// jar, then return it's description
// Lookup in static jarVersions Hashtable
String foundSize = (String) jarVersions.get(new Long(jarSize));
if ((null != foundSize) && (foundSiz... | [
"protected",
"String",
"getApparentVersion",
"(",
"String",
"jarName",
",",
"long",
"jarSize",
")",
"{",
"// If we found a matching size and it's for our ",
"// jar, then return it's description",
"// Lookup in static jarVersions Hashtable",
"String",
"foundSize",
"=",
"(",
"Str... | Cheap-o method to determine the product version of a .jar.
Currently does a lookup into a local table of some recent
shipped Xalan builds to determine where the .jar probably
came from. Note that if you recompile Xalan or Xerces
yourself this will likely report a potential error, since
we can't certify builds other t... | [
"Cheap",
"-",
"o",
"method",
"to",
"determine",
"the",
"product",
"version",
"of",
"a",
".",
"jar",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L740-L770 |
34,326 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkJAXPVersion | protected void checkJAXPVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
final Class noArgs[] = new Class[0];
Class clazz = null;
try
{
final String JAXP1_CLASS = "javax.xml.parsers.DocumentBuilder";
final String JAXP11_METHOD = "getDOMImplementation";
clazz =... | java | protected void checkJAXPVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
final Class noArgs[] = new Class[0];
Class clazz = null;
try
{
final String JAXP1_CLASS = "javax.xml.parsers.DocumentBuilder";
final String JAXP11_METHOD = "getDOMImplementation";
clazz =... | [
"protected",
"void",
"checkJAXPVersion",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"final",
"Class",
"noArgs",
"[",
"]",
"=",
"new",
"Class",
"[",
"0",
"]",
";",
"Class",
"clazz... | Report version information about JAXP interfaces.
Currently distinguishes between JAXP 1.0.1 and JAXP 1.1,
and not found; only tests the interfaces, and does not
check for reference implementation versions.
@param h Hashtable to put information in | [
"Report",
"version",
"information",
"about",
"JAXP",
"interfaces",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L781-L822 |
34,327 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkProcessorVersion | protected void checkProcessorVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
try
{
final String XALAN1_VERSION_CLASS =
"org.apache.xalan.xslt.XSLProcessorVersion";
Class clazz = ObjectFactory.findProviderClass(
XALAN1_VERSION_CLASS, ObjectFactory.findClassLo... | java | protected void checkProcessorVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
try
{
final String XALAN1_VERSION_CLASS =
"org.apache.xalan.xslt.XSLProcessorVersion";
Class clazz = ObjectFactory.findProviderClass(
XALAN1_VERSION_CLASS, ObjectFactory.findClassLo... | [
"protected",
"void",
"checkProcessorVersion",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"try",
"{",
"final",
"String",
"XALAN1_VERSION_CLASS",
"=",
"\"org.apache.xalan.xslt.XSLProcessorVersio... | Report product version information from Xalan-J.
Looks for version info in xalan.jar from Xalan-J products.
@param h Hashtable to put information in | [
"Report",
"product",
"version",
"information",
"from",
"Xalan",
"-",
"J",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L831-L909 |
34,328 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkParserVersion | protected void checkParserVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
try
{
final String XERCES1_VERSION_CLASS = "org.apache.xerces.framework.Version";
Class clazz = ObjectFactory.findProviderClass(
XERCES1_VERSION_CLASS, ObjectFactory.findClassLoader(), true);
... | java | protected void checkParserVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
try
{
final String XERCES1_VERSION_CLASS = "org.apache.xerces.framework.Version";
Class clazz = ObjectFactory.findProviderClass(
XERCES1_VERSION_CLASS, ObjectFactory.findClassLoader(), true);
... | [
"protected",
"void",
"checkParserVersion",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"try",
"{",
"final",
"String",
"XERCES1_VERSION_CLASS",
"=",
"\"org.apache.xerces.framework.Version\"",
... | Report product version information from common parsers.
Looks for version info in xerces.jar/xercesImpl.jar/crimson.jar.
//@todo actually look up version info in crimson manifest
@param h Hashtable to put information in | [
"Report",
"product",
"version",
"information",
"from",
"common",
"parsers",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L920-L977 |
34,329 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkAntVersion | protected void checkAntVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
try
{
final String ANT_VERSION_CLASS = "org.apache.tools.ant.Main";
final String ANT_VERSION_METHOD = "getAntVersion"; // noArgs
final Class noArgs[] = new Class[0];
Class clazz = ObjectFacto... | java | protected void checkAntVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
try
{
final String ANT_VERSION_CLASS = "org.apache.tools.ant.Main";
final String ANT_VERSION_METHOD = "getAntVersion"; // noArgs
final Class noArgs[] = new Class[0];
Class clazz = ObjectFacto... | [
"protected",
"void",
"checkAntVersion",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"try",
"{",
"final",
"String",
"ANT_VERSION_CLASS",
"=",
"\"org.apache.tools.ant.Main\"",
";",
"final",
... | Report product version information from Ant.
@param h Hashtable to put information in | [
"Report",
"product",
"version",
"information",
"from",
"Ant",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L984-L1008 |
34,330 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkDOMVersion | protected void checkDOMVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
final String DOM_LEVEL2_CLASS = "org.w3c.dom.Document";
final String DOM_LEVEL2_METHOD = "createElementNS"; // String, String
final String DOM_LEVEL2WD_CLASS = "org.w3c.dom.Node";
final String DOM_LEVEL2WD_M... | java | protected void checkDOMVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
final String DOM_LEVEL2_CLASS = "org.w3c.dom.Document";
final String DOM_LEVEL2_METHOD = "createElementNS"; // String, String
final String DOM_LEVEL2WD_CLASS = "org.w3c.dom.Node";
final String DOM_LEVEL2WD_M... | [
"protected",
"void",
"checkDOMVersion",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"final",
"String",
"DOM_LEVEL2_CLASS",
"=",
"\"org.w3c.dom.Document\"",
";",
"final",
"String",
"DOM_LEVE... | Report version info from DOM interfaces.
Currently distinguishes between pre-DOM level 2, the DOM
level 2 working draft, the DOM level 2 final draft,
and not found.
@param h Hashtable to put information in | [
"Report",
"version",
"info",
"from",
"DOM",
"interfaces",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L1019-L1087 |
34,331 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java | EnvironmentCheck.checkSAXVersion | protected void checkSAXVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
final String SAX_VERSION1_CLASS = "org.xml.sax.Parser";
final String SAX_VERSION1_METHOD = "parse"; // String
final String SAX_VERSION2_CLASS = "org.xml.sax.XMLReader";
final String SAX_VERSION2_METHOD = "pa... | java | protected void checkSAXVersion(Hashtable h)
{
if (null == h)
h = new Hashtable();
final String SAX_VERSION1_CLASS = "org.xml.sax.Parser";
final String SAX_VERSION1_METHOD = "parse"; // String
final String SAX_VERSION2_CLASS = "org.xml.sax.XMLReader";
final String SAX_VERSION2_METHOD = "pa... | [
"protected",
"void",
"checkSAXVersion",
"(",
"Hashtable",
"h",
")",
"{",
"if",
"(",
"null",
"==",
"h",
")",
"h",
"=",
"new",
"Hashtable",
"(",
")",
";",
"final",
"String",
"SAX_VERSION1_CLASS",
"=",
"\"org.xml.sax.Parser\"",
";",
"final",
"String",
"SAX_VERS... | Report version info from SAX interfaces.
Currently distinguishes between SAX 2, SAX 2.0beta2,
SAX1, and not found.
@param h Hashtable to put information in | [
"Report",
"version",
"info",
"from",
"SAX",
"interfaces",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java#L1097-L1174 |
34,332 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/SocksSocketImpl.java | SocksSocketImpl.authenticate | private boolean authenticate(byte method, InputStream in,
BufferedOutputStream out) throws IOException {
return authenticate(method, in, out, 0L);
} | java | private boolean authenticate(byte method, InputStream in,
BufferedOutputStream out) throws IOException {
return authenticate(method, in, out, 0L);
} | [
"private",
"boolean",
"authenticate",
"(",
"byte",
"method",
",",
"InputStream",
"in",
",",
"BufferedOutputStream",
"out",
")",
"throws",
"IOException",
"{",
"return",
"authenticate",
"(",
"method",
",",
"in",
",",
"out",
",",
"0L",
")",
";",
"}"
] | Provides the authentication machanism required by the proxy. | [
"Provides",
"the",
"authentication",
"machanism",
"required",
"by",
"the",
"proxy",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/SocksSocketImpl.java#L139-L142 |
34,333 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUDataVersion.java | ICUDataVersion.getDataVersion | public static VersionInfo getDataVersion() {
UResourceBundle icudatares = null;
try {
icudatares = UResourceBundle.getBundleInstance(
ICUData.ICU_BASE_NAME,
ICUDataVersion.U_ICU_VERSION_BUNDLE,
ICUResourceBundle.ICU_DATA_CLASS_LOADE... | java | public static VersionInfo getDataVersion() {
UResourceBundle icudatares = null;
try {
icudatares = UResourceBundle.getBundleInstance(
ICUData.ICU_BASE_NAME,
ICUDataVersion.U_ICU_VERSION_BUNDLE,
ICUResourceBundle.ICU_DATA_CLASS_LOADE... | [
"public",
"static",
"VersionInfo",
"getDataVersion",
"(",
")",
"{",
"UResourceBundle",
"icudatares",
"=",
"null",
";",
"try",
"{",
"icudatares",
"=",
"UResourceBundle",
".",
"getBundleInstance",
"(",
"ICUData",
".",
"ICU_BASE_NAME",
",",
"ICUDataVersion",
".",
"U_... | This function retrieves the data version from icuver and returns a VersionInfo object with that version information.
@return Current icu data version | [
"This",
"function",
"retrieves",
"the",
"data",
"version",
"from",
"icuver",
"and",
"returns",
"a",
"VersionInfo",
"object",
"with",
"that",
"version",
"information",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUDataVersion.java#L31-L44 |
34,334 | google/j2objc | jre_emul/android/platform/libcore/luni/src/objc/java/libcore/icu/TimeZoneNames.java | TimeZoneNames.getDisplayName | public static String getDisplayName(String[][] zoneStrings, String id, boolean daylight, int style) {
String[] needle = new String[] { id };
int index = Arrays.binarySearch(zoneStrings, needle, ZONE_STRINGS_COMPARATOR);
if (index >= 0) {
String[] row = zoneStrings[index];
... | java | public static String getDisplayName(String[][] zoneStrings, String id, boolean daylight, int style) {
String[] needle = new String[] { id };
int index = Arrays.binarySearch(zoneStrings, needle, ZONE_STRINGS_COMPARATOR);
if (index >= 0) {
String[] row = zoneStrings[index];
... | [
"public",
"static",
"String",
"getDisplayName",
"(",
"String",
"[",
"]",
"[",
"]",
"zoneStrings",
",",
"String",
"id",
",",
"boolean",
"daylight",
",",
"int",
"style",
")",
"{",
"String",
"[",
"]",
"needle",
"=",
"new",
"String",
"[",
"]",
"{",
"id",
... | Returns the appropriate string from 'zoneStrings'. Used with getZoneStrings. | [
"Returns",
"the",
"appropriate",
"string",
"from",
"zoneStrings",
".",
"Used",
"with",
"getZoneStrings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/objc/java/libcore/icu/TimeZoneNames.java#L114-L126 |
34,335 | google/j2objc | jre_emul/android/platform/libcore/luni/src/objc/java/libcore/icu/TimeZoneNames.java | TimeZoneNames.getZoneStrings | public static String[][] getZoneStrings(Locale locale) {
if (locale == null) {
locale = Locale.getDefault();
}
return cachedZoneStrings.get(locale);
} | java | public static String[][] getZoneStrings(Locale locale) {
if (locale == null) {
locale = Locale.getDefault();
}
return cachedZoneStrings.get(locale);
} | [
"public",
"static",
"String",
"[",
"]",
"[",
"]",
"getZoneStrings",
"(",
"Locale",
"locale",
")",
"{",
"if",
"(",
"locale",
"==",
"null",
")",
"{",
"locale",
"=",
"Locale",
".",
"getDefault",
"(",
")",
";",
"}",
"return",
"cachedZoneStrings",
".",
"get... | Returns an array of time zone strings, as used by DateFormatSymbols.getZoneStrings. | [
"Returns",
"an",
"array",
"of",
"time",
"zone",
"strings",
"as",
"used",
"by",
"DateFormatSymbols",
".",
"getZoneStrings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/objc/java/libcore/icu/TimeZoneNames.java#L131-L136 |
34,336 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/ProgressSource.java | ProgressSource.updateProgress | public void updateProgress(long latestProgress, long expectedProgress) {
lastProgress = progress;
progress = latestProgress;
expected = expectedProgress;
if (connected() == false)
state = State.CONNECTED;
else
state = State.UPDATE;
// The thresho... | java | public void updateProgress(long latestProgress, long expectedProgress) {
lastProgress = progress;
progress = latestProgress;
expected = expectedProgress;
if (connected() == false)
state = State.CONNECTED;
else
state = State.UPDATE;
// The thresho... | [
"public",
"void",
"updateProgress",
"(",
"long",
"latestProgress",
",",
"long",
"expectedProgress",
")",
"{",
"lastProgress",
"=",
"progress",
";",
"progress",
"=",
"latestProgress",
";",
"expected",
"=",
"expectedProgress",
";",
"if",
"(",
"connected",
"(",
")"... | Update progress. | [
"Update",
"progress",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/net/ProgressSource.java#L161-L200 |
34,337 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/ProcessorCharacters.java | ProcessorCharacters.startNonText | public void startNonText(StylesheetHandler handler) throws org.xml.sax.SAXException
{
if (this == handler.getCurrentProcessor())
{
handler.popProcessor();
}
int nChars = m_accumulator.length();
if ((nChars > 0)
&& ((null != m_xslTextElement)
||!XMLCharacterRecog... | java | public void startNonText(StylesheetHandler handler) throws org.xml.sax.SAXException
{
if (this == handler.getCurrentProcessor())
{
handler.popProcessor();
}
int nChars = m_accumulator.length();
if ((nChars > 0)
&& ((null != m_xslTextElement)
||!XMLCharacterRecog... | [
"public",
"void",
"startNonText",
"(",
"StylesheetHandler",
"handler",
")",
"throws",
"org",
".",
"xml",
".",
"sax",
".",
"SAXException",
"{",
"if",
"(",
"this",
"==",
"handler",
".",
"getCurrentProcessor",
"(",
")",
")",
"{",
"handler",
".",
"popProcessor",... | Receive notification of the start of the non-text event. This
is sent to the current processor when any non-text event occurs.
@param handler non-null reference to current StylesheetHandler that is constructing the Templates. | [
"Receive",
"notification",
"of",
"the",
"start",
"of",
"the",
"non",
"-",
"text",
"event",
".",
"This",
"is",
"sent",
"to",
"the",
"current",
"processor",
"when",
"any",
"non",
"-",
"text",
"event",
"occurs",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/processor/ProcessorCharacters.java#L47-L92 |
34,338 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java | LocaleMatcher.match | public double match(ULocale desired, ULocale desiredMax, ULocale supported, ULocale supportedMax) {
return matcherData.match(desired, desiredMax, supported, supportedMax);
} | java | public double match(ULocale desired, ULocale desiredMax, ULocale supported, ULocale supportedMax) {
return matcherData.match(desired, desiredMax, supported, supportedMax);
} | [
"public",
"double",
"match",
"(",
"ULocale",
"desired",
",",
"ULocale",
"desiredMax",
",",
"ULocale",
"supported",
",",
"ULocale",
"supportedMax",
")",
"{",
"return",
"matcherData",
".",
"match",
"(",
"desired",
",",
"desiredMax",
",",
"supported",
",",
"suppo... | Returns a fraction between 0 and 1, where 1 means that the languages are a
perfect match, and 0 means that they are completely different. Note that
the precise values may change over time; no code should be made dependent
on the values remaining constant.
@param desired Desired locale
@param desiredMax Maximized locale... | [
"Returns",
"a",
"fraction",
"between",
"0",
"and",
"1",
"where",
"1",
"means",
"that",
"the",
"languages",
"are",
"a",
"perfect",
"match",
"and",
"0",
"means",
"that",
"they",
"are",
"completely",
"different",
".",
"Note",
"that",
"the",
"precise",
"values... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java#L147-L149 |
34,339 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java | LocaleMatcher.getBestMatch | public ULocale getBestMatch(LocalePriorityList languageList) {
double bestWeight = 0;
ULocale bestTableMatch = null;
double penalty = 0;
OutputDouble matchWeight = new OutputDouble();
for (final ULocale language : languageList) {
final ULocale matchLocale = getBestMat... | java | public ULocale getBestMatch(LocalePriorityList languageList) {
double bestWeight = 0;
ULocale bestTableMatch = null;
double penalty = 0;
OutputDouble matchWeight = new OutputDouble();
for (final ULocale language : languageList) {
final ULocale matchLocale = getBestMat... | [
"public",
"ULocale",
"getBestMatch",
"(",
"LocalePriorityList",
"languageList",
")",
"{",
"double",
"bestWeight",
"=",
"0",
";",
"ULocale",
"bestTableMatch",
"=",
"null",
";",
"double",
"penalty",
"=",
"0",
";",
"OutputDouble",
"matchWeight",
"=",
"new",
"Output... | Get the best match for a LanguagePriorityList
@param languageList list to match
@return best matching language code | [
"Get",
"the",
"best",
"match",
"for",
"a",
"LanguagePriorityList"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java#L183-L201 |
34,340 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java | LocaleMatcher.getBestMatchInternal | private ULocale getBestMatchInternal(ULocale languageCode, OutputDouble outputWeight) {
languageCode = canonicalize(languageCode);
final ULocale maximized = addLikelySubtags(languageCode);
if (DEBUG) {
System.out.println("\ngetBestMatchInternal: " + languageCode + ";\t" + maximized);... | java | private ULocale getBestMatchInternal(ULocale languageCode, OutputDouble outputWeight) {
languageCode = canonicalize(languageCode);
final ULocale maximized = addLikelySubtags(languageCode);
if (DEBUG) {
System.out.println("\ngetBestMatchInternal: " + languageCode + ";\t" + maximized);... | [
"private",
"ULocale",
"getBestMatchInternal",
"(",
"ULocale",
"languageCode",
",",
"OutputDouble",
"outputWeight",
")",
"{",
"languageCode",
"=",
"canonicalize",
"(",
"languageCode",
")",
";",
"final",
"ULocale",
"maximized",
"=",
"addLikelySubtags",
"(",
"languageCod... | Get the best match for an individual language code.
@param languageCode
@return best matching language code and weight (as per
{@link #match(ULocale, ULocale)}) | [
"Get",
"the",
"best",
"match",
"for",
"an",
"individual",
"language",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java#L249-L286 |
34,341 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java | LocaleMatcher.processMapping | private void processMapping() {
for (Entry<String, Set<String>> desiredToMatchingLanguages : matcherData.matchingLanguages().keyValuesSet()) {
String desired = desiredToMatchingLanguages.getKey();
Set<String> supported = desiredToMatchingLanguages.getValue();
for (R3<ULocale,... | java | private void processMapping() {
for (Entry<String, Set<String>> desiredToMatchingLanguages : matcherData.matchingLanguages().keyValuesSet()) {
String desired = desiredToMatchingLanguages.getKey();
Set<String> supported = desiredToMatchingLanguages.getValue();
for (R3<ULocale,... | [
"private",
"void",
"processMapping",
"(",
")",
"{",
"for",
"(",
"Entry",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"desiredToMatchingLanguages",
":",
"matcherData",
".",
"matchingLanguages",
"(",
")",
".",
"keyValuesSet",
"(",
")",
")",
"{",
"Str... | We preprocess the data to get just the possible matches for each desired base language. | [
"We",
"preprocess",
"the",
"data",
"to",
"get",
"just",
"the",
"possible",
"matches",
"for",
"each",
"desired",
"base",
"language",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java#L307-L325 |
34,342 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java | LocaleMatcher.addLikelySubtags | private ULocale addLikelySubtags(ULocale languageCode) {
// max("und") = "en_Latn_US", and since matching is based on maximized tags, the undefined
// language would normally match English. But that would produce the counterintuitive results
// that getBestMatch("und", LocaleMatcher("it,en")) w... | java | private ULocale addLikelySubtags(ULocale languageCode) {
// max("und") = "en_Latn_US", and since matching is based on maximized tags, the undefined
// language would normally match English. But that would produce the counterintuitive results
// that getBestMatch("und", LocaleMatcher("it,en")) w... | [
"private",
"ULocale",
"addLikelySubtags",
"(",
"ULocale",
"languageCode",
")",
"{",
"// max(\"und\") = \"en_Latn_US\", and since matching is based on maximized tags, the undefined",
"// language would normally match English. But that would produce the counterintuitive results",
"// that getBest... | We need to add another method to addLikelySubtags that doesn't return
null, but instead substitutes Zzzz and ZZ if unknown. There are also
a few cases where addLikelySubtags needs to have expanded data, to handle
all deprecated codes.
@param languageCode
@return "fixed" addLikelySubtags | [
"We",
"need",
"to",
"add",
"another",
"method",
"to",
"addLikelySubtags",
"that",
"doesn",
"t",
"return",
"null",
"but",
"instead",
"substitutes",
"Zzzz",
"and",
"ZZ",
"if",
"unknown",
".",
"There",
"are",
"also",
"a",
"few",
"cases",
"where",
"addLikelySubt... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/LocaleMatcher.java#L352-L377 |
34,343 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SliceOps.java | SliceOps.calcSize | private static long calcSize(long size, long skip, long limit) {
return size >= 0 ? Math.max(-1, Math.min(size - skip, limit)) : -1;
} | java | private static long calcSize(long size, long skip, long limit) {
return size >= 0 ? Math.max(-1, Math.min(size - skip, limit)) : -1;
} | [
"private",
"static",
"long",
"calcSize",
"(",
"long",
"size",
",",
"long",
"skip",
",",
"long",
"limit",
")",
"{",
"return",
"size",
">=",
"0",
"?",
"Math",
".",
"max",
"(",
"-",
"1",
",",
"Math",
".",
"min",
"(",
"size",
"-",
"skip",
",",
"limit... | Calculates the sliced size given the current size, number of elements
skip, and the number of elements to limit.
@param size the current size
@param skip the number of elements to skip, assumed to be >= 0
@param limit the number of elements to limit, assumed to be >= 0, with
a value of {@code Long.MAX_VALUE} if there ... | [
"Calculates",
"the",
"sliced",
"size",
"given",
"the",
"current",
"size",
"number",
"of",
"elements",
"skip",
"and",
"the",
"number",
"of",
"elements",
"to",
"limit",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SliceOps.java#L52-L54 |
34,344 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SliceOps.java | SliceOps.calcSliceFence | private static long calcSliceFence(long skip, long limit) {
long sliceFence = limit >= 0 ? skip + limit : Long.MAX_VALUE;
// Check for overflow
return (sliceFence >= 0) ? sliceFence : Long.MAX_VALUE;
} | java | private static long calcSliceFence(long skip, long limit) {
long sliceFence = limit >= 0 ? skip + limit : Long.MAX_VALUE;
// Check for overflow
return (sliceFence >= 0) ? sliceFence : Long.MAX_VALUE;
} | [
"private",
"static",
"long",
"calcSliceFence",
"(",
"long",
"skip",
",",
"long",
"limit",
")",
"{",
"long",
"sliceFence",
"=",
"limit",
">=",
"0",
"?",
"skip",
"+",
"limit",
":",
"Long",
".",
"MAX_VALUE",
";",
"// Check for overflow",
"return",
"(",
"slice... | Calculates the slice fence, which is one past the index of the slice
range
@param skip the number of elements to skip, assumed to be >= 0
@param limit the number of elements to limit, assumed to be >= 0, with
a value of {@code Long.MAX_VALUE} if there is no limit
@return the slice fence. | [
"Calculates",
"the",
"slice",
"fence",
"which",
"is",
"one",
"past",
"the",
"index",
"of",
"the",
"slice",
"range"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SliceOps.java#L64-L68 |
34,345 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SliceOps.java | SliceOps.sliceSpliterator | @SuppressWarnings("unchecked")
private static <P_IN> Spliterator<P_IN> sliceSpliterator(StreamShape shape,
Spliterator<P_IN> s,
long skip, long limit) {
assert s.hasCharacteristics(Split... | java | @SuppressWarnings("unchecked")
private static <P_IN> Spliterator<P_IN> sliceSpliterator(StreamShape shape,
Spliterator<P_IN> s,
long skip, long limit) {
assert s.hasCharacteristics(Split... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"static",
"<",
"P_IN",
">",
"Spliterator",
"<",
"P_IN",
">",
"sliceSpliterator",
"(",
"StreamShape",
"shape",
",",
"Spliterator",
"<",
"P_IN",
">",
"s",
",",
"long",
"skip",
",",
"long",
"limit",... | Creates a slice spliterator given a stream shape governing the
spliterator type. Requires that the underlying Spliterator
be SUBSIZED. | [
"Creates",
"a",
"slice",
"spliterator",
"given",
"a",
"stream",
"shape",
"governing",
"the",
"spliterator",
"type",
".",
"Requires",
"that",
"the",
"underlying",
"Spliterator",
"be",
"SUBSIZED",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/stream/SliceOps.java#L75-L97 |
34,346 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundleIterator.java | UResourceBundleIterator.nextString | public String nextString()throws NoSuchElementException, UResourceTypeMismatchException{
if(index<size){
return bundle.getString(index++);
}
throw new NoSuchElementException();
} | java | public String nextString()throws NoSuchElementException, UResourceTypeMismatchException{
if(index<size){
return bundle.getString(index++);
}
throw new NoSuchElementException();
} | [
"public",
"String",
"nextString",
"(",
")",
"throws",
"NoSuchElementException",
",",
"UResourceTypeMismatchException",
"{",
"if",
"(",
"index",
"<",
"size",
")",
"{",
"return",
"bundle",
".",
"getString",
"(",
"index",
"++",
")",
";",
"}",
"throw",
"new",
"N... | Returns the next String of this iterator if this iterator object has at least one more element to provide
@return the UResourceBundle object
@throws NoSuchElementException If there does not exist such an element.
@throws UResourceTypeMismatchException If resource has a type mismatch. | [
"Returns",
"the",
"next",
"String",
"of",
"this",
"iterator",
"if",
"this",
"iterator",
"object",
"has",
"at",
"least",
"one",
"more",
"element",
"to",
"provide"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/UResourceBundleIterator.java#L71-L76 |
34,347 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.parse | public MessagePattern parse(String pattern) {
preParse(pattern);
parseMessage(0, 0, 0, ArgType.NONE);
postParse();
return this;
} | java | public MessagePattern parse(String pattern) {
preParse(pattern);
parseMessage(0, 0, 0, ArgType.NONE);
postParse();
return this;
} | [
"public",
"MessagePattern",
"parse",
"(",
"String",
"pattern",
")",
"{",
"preParse",
"(",
"pattern",
")",
";",
"parseMessage",
"(",
"0",
",",
"0",
",",
"0",
",",
"ArgType",
".",
"NONE",
")",
";",
"postParse",
"(",
")",
";",
"return",
"this",
";",
"}"... | Parses a MessageFormat pattern string.
@param pattern a MessageFormat pattern string
@return this
@throws IllegalArgumentException for syntax errors in the pattern string
@throws IndexOutOfBoundsException if certain limits are exceeded
(e.g., argument number too high, argument name too long, etc.)
@throws NumberFormatE... | [
"Parses",
"a",
"MessageFormat",
"pattern",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L177-L182 |
34,348 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.parsePluralStyle | public MessagePattern parsePluralStyle(String pattern) {
preParse(pattern);
parsePluralOrSelectStyle(ArgType.PLURAL, 0, 0);
postParse();
return this;
} | java | public MessagePattern parsePluralStyle(String pattern) {
preParse(pattern);
parsePluralOrSelectStyle(ArgType.PLURAL, 0, 0);
postParse();
return this;
} | [
"public",
"MessagePattern",
"parsePluralStyle",
"(",
"String",
"pattern",
")",
"{",
"preParse",
"(",
"pattern",
")",
";",
"parsePluralOrSelectStyle",
"(",
"ArgType",
".",
"PLURAL",
",",
"0",
",",
"0",
")",
";",
"postParse",
"(",
")",
";",
"return",
"this",
... | Parses a PluralFormat pattern string.
@param pattern a PluralFormat pattern string
@return this
@throws IllegalArgumentException for syntax errors in the pattern string
@throws IndexOutOfBoundsException if certain limits are exceeded
(e.g., argument number too high, argument name too long, etc.)
@throws NumberFormatExc... | [
"Parses",
"a",
"PluralFormat",
"pattern",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L209-L214 |
34,349 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.parseSelectStyle | public MessagePattern parseSelectStyle(String pattern) {
preParse(pattern);
parsePluralOrSelectStyle(ArgType.SELECT, 0, 0);
postParse();
return this;
} | java | public MessagePattern parseSelectStyle(String pattern) {
preParse(pattern);
parsePluralOrSelectStyle(ArgType.SELECT, 0, 0);
postParse();
return this;
} | [
"public",
"MessagePattern",
"parseSelectStyle",
"(",
"String",
"pattern",
")",
"{",
"preParse",
"(",
"pattern",
")",
";",
"parsePluralOrSelectStyle",
"(",
"ArgType",
".",
"SELECT",
",",
"0",
",",
"0",
")",
";",
"postParse",
"(",
")",
";",
"return",
"this",
... | Parses a SelectFormat pattern string.
@param pattern a SelectFormat pattern string
@return this
@throws IllegalArgumentException for syntax errors in the pattern string
@throws IndexOutOfBoundsException if certain limits are exceeded
(e.g., argument number too high, argument name too long, etc.)
@throws NumberFormatExc... | [
"Parses",
"a",
"SelectFormat",
"pattern",
"string",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L225-L230 |
34,350 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.validateArgumentName | public static int validateArgumentName(String name) {
if(!PatternProps.isIdentifier(name)) {
return ARG_NAME_NOT_VALID;
}
return parseArgNumber(name, 0, name.length());
} | java | public static int validateArgumentName(String name) {
if(!PatternProps.isIdentifier(name)) {
return ARG_NAME_NOT_VALID;
}
return parseArgNumber(name, 0, name.length());
} | [
"public",
"static",
"int",
"validateArgumentName",
"(",
"String",
"name",
")",
"{",
"if",
"(",
"!",
"PatternProps",
".",
"isIdentifier",
"(",
"name",
")",
")",
"{",
"return",
"ARG_NAME_NOT_VALID",
";",
"}",
"return",
"parseArgNumber",
"(",
"name",
",",
"0",
... | Validates and parses an argument name or argument number string.
An argument name must be a "pattern identifier", that is, it must contain
no Unicode Pattern_Syntax or Pattern_White_Space characters.
If it only contains ASCII digits, then it must be a small integer with no leading zero.
@param name Input string.
@retur... | [
"Validates",
"and",
"parses",
"an",
"argument",
"name",
"or",
"argument",
"number",
"string",
".",
"An",
"argument",
"name",
"must",
"be",
"a",
"pattern",
"identifier",
"that",
"is",
"it",
"must",
"contain",
"no",
"Unicode",
"Pattern_Syntax",
"or",
"Pattern_Wh... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L345-L350 |
34,351 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.partSubstringMatches | public boolean partSubstringMatches(Part part, String s) {
return part.length == s.length() && msg.regionMatches(part.index, s, 0, part.length);
} | java | public boolean partSubstringMatches(Part part, String s) {
return part.length == s.length() && msg.regionMatches(part.index, s, 0, part.length);
} | [
"public",
"boolean",
"partSubstringMatches",
"(",
"Part",
"part",
",",
"String",
"s",
")",
"{",
"return",
"part",
".",
"length",
"==",
"s",
".",
"length",
"(",
")",
"&&",
"msg",
".",
"regionMatches",
"(",
"part",
".",
"index",
",",
"s",
",",
"0",
","... | Compares the part's substring with the input string s.
@param part a part of this MessagePattern.
@param s a string.
@return true if getSubstring(part).equals(s). | [
"Compares",
"the",
"part",
"s",
"substring",
"with",
"the",
"input",
"string",
"s",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L456-L458 |
34,352 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.getNumericValue | public double getNumericValue(Part part) {
Part.Type type=part.type;
if(type==Part.Type.ARG_INT) {
return part.value;
} else if(type==Part.Type.ARG_DOUBLE) {
return numericValues.get(part.value);
} else {
return NO_NUMERIC_VALUE;
}
} | java | public double getNumericValue(Part part) {
Part.Type type=part.type;
if(type==Part.Type.ARG_INT) {
return part.value;
} else if(type==Part.Type.ARG_DOUBLE) {
return numericValues.get(part.value);
} else {
return NO_NUMERIC_VALUE;
}
} | [
"public",
"double",
"getNumericValue",
"(",
"Part",
"part",
")",
"{",
"Part",
".",
"Type",
"type",
"=",
"part",
".",
"type",
";",
"if",
"(",
"type",
"==",
"Part",
".",
"Type",
".",
"ARG_INT",
")",
"{",
"return",
"part",
".",
"value",
";",
"}",
"els... | Returns the numeric value associated with an ARG_INT or ARG_DOUBLE.
@param part a part of this MessagePattern.
@return the part's numeric value, or NO_NUMERIC_VALUE if this is not a numeric part. | [
"Returns",
"the",
"numeric",
"value",
"associated",
"with",
"an",
"ARG_INT",
"or",
"ARG_DOUBLE",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L465-L474 |
34,353 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.getLimitPartIndex | public int getLimitPartIndex(int start) {
int limit=parts.get(start).limitPartIndex;
if(limit<start) {
return start;
}
return limit;
} | java | public int getLimitPartIndex(int start) {
int limit=parts.get(start).limitPartIndex;
if(limit<start) {
return start;
}
return limit;
} | [
"public",
"int",
"getLimitPartIndex",
"(",
"int",
"start",
")",
"{",
"int",
"limit",
"=",
"parts",
".",
"get",
"(",
"start",
")",
".",
"limitPartIndex",
";",
"if",
"(",
"limit",
"<",
"start",
")",
"{",
"return",
"start",
";",
"}",
"return",
"limit",
... | Returns the index of the ARG|MSG_LIMIT part corresponding to the ARG|MSG_START at start.
@param start The index of some Part data (0..countParts()-1);
this Part should be of Type ARG_START or MSG_START.
@return The first i>start where getPart(i).getType()==ARG|MSG_LIMIT at the same nesting level,
or start itself if ... | [
"Returns",
"the",
"index",
"of",
"the",
"ARG|MSG_LIMIT",
"part",
"corresponding",
"to",
"the",
"ARG|MSG_START",
"at",
"start",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L506-L512 |
34,354 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.cloneAsThawed | @Override
@SuppressWarnings("unchecked")
public MessagePattern cloneAsThawed() {
MessagePattern newMsg;
try {
newMsg=(MessagePattern)super.clone();
} catch (CloneNotSupportedException e) {
throw new ICUCloneNotSupportedException(e);
}
newMsg.parts=... | java | @Override
@SuppressWarnings("unchecked")
public MessagePattern cloneAsThawed() {
MessagePattern newMsg;
try {
newMsg=(MessagePattern)super.clone();
} catch (CloneNotSupportedException e) {
throw new ICUCloneNotSupportedException(e);
}
newMsg.parts=... | [
"@",
"Override",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"MessagePattern",
"cloneAsThawed",
"(",
")",
"{",
"MessagePattern",
"newMsg",
";",
"try",
"{",
"newMsg",
"=",
"(",
"MessagePattern",
")",
"super",
".",
"clone",
"(",
")",
";",
"}"... | Creates and returns an unfrozen copy of this object.
@return a copy of this object. | [
"Creates",
"and",
"returns",
"an",
"unfrozen",
"copy",
"of",
"this",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L808-L823 |
34,355 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.parseArgNumber | private static int parseArgNumber(CharSequence s, int start, int limit) {
// If the identifier contains only ASCII digits, then it is an argument _number_
// and must not have leading zeros (except "0" itself).
// Otherwise it is an argument _name_.
if(start>=limit) {
return ... | java | private static int parseArgNumber(CharSequence s, int start, int limit) {
// If the identifier contains only ASCII digits, then it is an argument _number_
// and must not have leading zeros (except "0" itself).
// Otherwise it is an argument _name_.
if(start>=limit) {
return ... | [
"private",
"static",
"int",
"parseArgNumber",
"(",
"CharSequence",
"s",
",",
"int",
"start",
",",
"int",
"limit",
")",
"{",
"// If the identifier contains only ASCII digits, then it is an argument _number_",
"// and must not have leading zeros (except \"0\" itself).",
"// Otherwise... | Validates and parses an argument name or argument number string.
This internal method assumes that the input substring is a "pattern identifier".
@return >=0 if the name is a valid number,
ARG_NAME_NOT_NUMBER (-1) if it is a "pattern identifier" but not all ASCII digits,
ARG_NAME_NOT_VALID (-2) if it is neither.
@se... | [
"Validates",
"and",
"parses",
"an",
"argument",
"name",
"or",
"argument",
"number",
"string",
".",
"This",
"internal",
"method",
"assumes",
"that",
"the",
"input",
"substring",
"is",
"a",
"pattern",
"identifier",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L1245-L1286 |
34,356 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.parseDouble | private void parseDouble(int start, int limit, boolean allowInfinity) {
assert start<limit;
// fake loop for easy exit and single throw statement
for(;;) {
// fast path for small integers and infinity
int value=0;
int isNegative=0; // not boolean so that we c... | java | private void parseDouble(int start, int limit, boolean allowInfinity) {
assert start<limit;
// fake loop for easy exit and single throw statement
for(;;) {
// fast path for small integers and infinity
int value=0;
int isNegative=0; // not boolean so that we c... | [
"private",
"void",
"parseDouble",
"(",
"int",
"start",
",",
"int",
"limit",
",",
"boolean",
"allowInfinity",
")",
"{",
"assert",
"start",
"<",
"limit",
";",
"// fake loop for easy exit and single throw statement",
"for",
"(",
";",
";",
")",
"{",
"// fast path for ... | Parses a number from the specified message substring.
@param start start index into the message string
@param limit limit index into the message string, must be start<limit
@param allowInfinity true if U+221E is allowed (for ChoiceFormat) | [
"Parses",
"a",
"number",
"from",
"the",
"specified",
"message",
"substring",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L1298-L1348 |
34,357 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java | MessagePattern.skipDouble | private int skipDouble(int index) {
while(index<msg.length()) {
char c=msg.charAt(index);
// U+221E: Allow the infinity symbol, for ChoiceFormat patterns.
if((c<'0' && "+-.".indexOf(c)<0) || (c>'9' && c!='e' && c!='E' && c!=0x221e)) {
break;
}
... | java | private int skipDouble(int index) {
while(index<msg.length()) {
char c=msg.charAt(index);
// U+221E: Allow the infinity symbol, for ChoiceFormat patterns.
if((c<'0' && "+-.".indexOf(c)<0) || (c>'9' && c!='e' && c!='E' && c!=0x221e)) {
break;
}
... | [
"private",
"int",
"skipDouble",
"(",
"int",
"index",
")",
"{",
"while",
"(",
"index",
"<",
"msg",
".",
"length",
"(",
")",
")",
"{",
"char",
"c",
"=",
"msg",
".",
"charAt",
"(",
"index",
")",
";",
"// U+221E: Allow the infinity symbol, for ChoiceFormat patte... | Skips a sequence of characters that could occur in a double value.
Does not fully parse or validate the value. | [
"Skips",
"a",
"sequence",
"of",
"characters",
"that",
"could",
"occur",
"in",
"a",
"double",
"value",
".",
"Does",
"not",
"fully",
"parse",
"or",
"validate",
"the",
"value",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/MessagePattern.java#L1389-L1399 |
34,358 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Norm2AllModes.java | Norm2AllModes.getN2WithImpl | public static Normalizer2WithImpl getN2WithImpl(int index) {
switch(index) {
case 0: return getNFCInstance().decomp; // NFD
case 1: return getNFKCInstance().decomp; // NFKD
case 2: return getNFCInstance().comp; // NFC
case 3: return getNFKCInstance().comp; // NFKC
d... | java | public static Normalizer2WithImpl getN2WithImpl(int index) {
switch(index) {
case 0: return getNFCInstance().decomp; // NFD
case 1: return getNFKCInstance().decomp; // NFKD
case 2: return getNFCInstance().comp; // NFC
case 3: return getNFKCInstance().comp; // NFKC
d... | [
"public",
"static",
"Normalizer2WithImpl",
"getN2WithImpl",
"(",
"int",
"index",
")",
"{",
"switch",
"(",
"index",
")",
"{",
"case",
"0",
":",
"return",
"getNFCInstance",
"(",
")",
".",
"decomp",
";",
"// NFD",
"case",
"1",
":",
"return",
"getNFKCInstance",
... | For use in properties APIs. | [
"For",
"use",
"in",
"properties",
"APIs",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Norm2AllModes.java#L317-L325 |
34,359 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/Parsed.java | Parsed.copy | Parsed copy() {
// only copy fields used in parsing stage
Parsed cloned = new Parsed();
cloned.fieldValues.putAll(this.fieldValues);
cloned.zone = this.zone;
cloned.chrono = this.chrono;
cloned.leapSecond = this.leapSecond;
return cloned;
} | java | Parsed copy() {
// only copy fields used in parsing stage
Parsed cloned = new Parsed();
cloned.fieldValues.putAll(this.fieldValues);
cloned.zone = this.zone;
cloned.chrono = this.chrono;
cloned.leapSecond = this.leapSecond;
return cloned;
} | [
"Parsed",
"copy",
"(",
")",
"{",
"// only copy fields used in parsing stage",
"Parsed",
"cloned",
"=",
"new",
"Parsed",
"(",
")",
";",
"cloned",
".",
"fieldValues",
".",
"putAll",
"(",
"this",
".",
"fieldValues",
")",
";",
"cloned",
".",
"zone",
"=",
"this",... | Creates a copy. | [
"Creates",
"a",
"copy",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/Parsed.java#L168-L176 |
34,360 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/Parsed.java | Parsed.resolve | TemporalAccessor resolve(ResolverStyle resolverStyle, Set<TemporalField> resolverFields) {
if (resolverFields != null) {
fieldValues.keySet().retainAll(resolverFields);
}
this.resolverStyle = resolverStyle;
resolveFields();
resolveTimeLenient();
crossCheck();
... | java | TemporalAccessor resolve(ResolverStyle resolverStyle, Set<TemporalField> resolverFields) {
if (resolverFields != null) {
fieldValues.keySet().retainAll(resolverFields);
}
this.resolverStyle = resolverStyle;
resolveFields();
resolveTimeLenient();
crossCheck();
... | [
"TemporalAccessor",
"resolve",
"(",
"ResolverStyle",
"resolverStyle",
",",
"Set",
"<",
"TemporalField",
">",
"resolverFields",
")",
"{",
"if",
"(",
"resolverFields",
"!=",
"null",
")",
"{",
"fieldValues",
".",
"keySet",
"(",
")",
".",
"retainAll",
"(",
"resolv... | Resolves the fields in this context.
@param resolverStyle the resolver style, not null
@param resolverFields the fields to use for resolving, null for all fields
@return this, for method chaining
@throws DateTimeException if resolving one field results in a value for
another field that is in conflict | [
"Resolves",
"the",
"fields",
"in",
"this",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/format/Parsed.java#L239-L251 |
34,361 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.getValue | public int getValue(int ch)
{
// valid, uncompacted trie and valid c?
if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
return 0;
}
int block = m_index_[ch >> SHIFT_];
return m_data_[Math.abs(block) + (ch & MASK_)];
} | java | public int getValue(int ch)
{
// valid, uncompacted trie and valid c?
if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
return 0;
}
int block = m_index_[ch >> SHIFT_];
return m_data_[Math.abs(block) + (ch & MASK_)];
} | [
"public",
"int",
"getValue",
"(",
"int",
"ch",
")",
"{",
"// valid, uncompacted trie and valid c?",
"if",
"(",
"m_isCompacted_",
"||",
"ch",
">",
"UCharacter",
".",
"MAX_VALUE",
"||",
"ch",
"<",
"0",
")",
"{",
"return",
"0",
";",
"}",
"int",
"block",
"=",
... | Gets a 32 bit data from the table data
@param ch codepoint which data is to be retrieved
@return the 32 bit data | [
"Gets",
"a",
"32",
"bit",
"data",
"from",
"the",
"table",
"data"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L172-L181 |
34,362 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.getValue | public int getValue(int ch, boolean [] inBlockZero)
{
// valid, uncompacted trie and valid c?
if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
if (inBlockZero != null) {
inBlockZero[0] = true;
}
return 0;
}
int blo... | java | public int getValue(int ch, boolean [] inBlockZero)
{
// valid, uncompacted trie and valid c?
if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
if (inBlockZero != null) {
inBlockZero[0] = true;
}
return 0;
}
int blo... | [
"public",
"int",
"getValue",
"(",
"int",
"ch",
",",
"boolean",
"[",
"]",
"inBlockZero",
")",
"{",
"// valid, uncompacted trie and valid c?",
"if",
"(",
"m_isCompacted_",
"||",
"ch",
">",
"UCharacter",
".",
"MAX_VALUE",
"||",
"ch",
"<",
"0",
")",
"{",
"if",
... | Get a 32 bit data from the table data
@param ch code point for which data is to be retrieved.
@param inBlockZero Output parameter, inBlockZero[0] returns true if the
char maps into block zero, otherwise false.
@return the 32 bit data value. | [
"Get",
"a",
"32",
"bit",
"data",
"from",
"the",
"table",
"data"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L190-L205 |
34,363 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.setValue | public boolean setValue(int ch, int value)
{
// valid, uncompacted trie and valid c?
if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
return false;
}
int block = getDataBlock(ch);
if (block < 0) {
return false;
}
... | java | public boolean setValue(int ch, int value)
{
// valid, uncompacted trie and valid c?
if (m_isCompacted_ || ch > UCharacter.MAX_VALUE || ch < 0) {
return false;
}
int block = getDataBlock(ch);
if (block < 0) {
return false;
}
... | [
"public",
"boolean",
"setValue",
"(",
"int",
"ch",
",",
"int",
"value",
")",
"{",
"// valid, uncompacted trie and valid c? ",
"if",
"(",
"m_isCompacted_",
"||",
"ch",
">",
"UCharacter",
".",
"MAX_VALUE",
"||",
"ch",
"<",
"0",
")",
"{",
"return",
"false",
";"... | Sets a 32 bit data in the table data
@param ch codepoint which data is to be set
@param value to set
@return true if the set is successful, otherwise
if the table has been compacted return false | [
"Sets",
"a",
"32",
"bit",
"data",
"in",
"the",
"table",
"data"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L215-L229 |
34,364 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.serialize | public IntTrie serialize(TrieBuilder.DataManipulate datamanipulate,
Trie.DataManipulate triedatamanipulate)
{
if (datamanipulate == null) {
throw new IllegalArgumentException("Parameters can not be null");
}
// fold and compact if necessary, also che... | java | public IntTrie serialize(TrieBuilder.DataManipulate datamanipulate,
Trie.DataManipulate triedatamanipulate)
{
if (datamanipulate == null) {
throw new IllegalArgumentException("Parameters can not be null");
}
// fold and compact if necessary, also che... | [
"public",
"IntTrie",
"serialize",
"(",
"TrieBuilder",
".",
"DataManipulate",
"datamanipulate",
",",
"Trie",
".",
"DataManipulate",
"triedatamanipulate",
")",
"{",
"if",
"(",
"datamanipulate",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
... | Serializes the build table with 32 bit data
@param datamanipulate builder raw fold method implementation
@param triedatamanipulate result trie fold method
@return a new trie | [
"Serializes",
"the",
"build",
"table",
"with",
"32",
"bit",
"data"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L237-L276 |
34,365 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.serialize | public int serialize(OutputStream os, boolean reduceTo16Bits,
TrieBuilder.DataManipulate datamanipulate) throws IOException {
if (datamanipulate == null) {
throw new IllegalArgumentException("Parameters can not be null");
}
// fold and compact if necessary, also che... | java | public int serialize(OutputStream os, boolean reduceTo16Bits,
TrieBuilder.DataManipulate datamanipulate) throws IOException {
if (datamanipulate == null) {
throw new IllegalArgumentException("Parameters can not be null");
}
// fold and compact if necessary, also che... | [
"public",
"int",
"serialize",
"(",
"OutputStream",
"os",
",",
"boolean",
"reduceTo16Bits",
",",
"TrieBuilder",
".",
"DataManipulate",
"datamanipulate",
")",
"throws",
"IOException",
"{",
"if",
"(",
"datamanipulate",
"==",
"null",
")",
"{",
"throw",
"new",
"Illeg... | Serializes the build table to an output stream.
Compacts the build-time trie after all values are set, and then
writes the serialized form onto an output stream.
After this, this build-time Trie can only be serialized again and/or closed;
no further values can be added.
This function is the rough equivalent of utrie... | [
"Serializes",
"the",
"build",
"table",
"to",
"an",
"output",
"stream",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L297-L386 |
34,366 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.findSameDataBlock | private static final int findSameDataBlock(int data[], int dataLength,
int otherBlock, int step)
{
// ensure that we do not even partially get past dataLength
dataLength -= DATA_BLOCK_LENGTH;
for (int block = 0; block <= dataLength; block += s... | java | private static final int findSameDataBlock(int data[], int dataLength,
int otherBlock, int step)
{
// ensure that we do not even partially get past dataLength
dataLength -= DATA_BLOCK_LENGTH;
for (int block = 0; block <= dataLength; block += s... | [
"private",
"static",
"final",
"int",
"findSameDataBlock",
"(",
"int",
"data",
"[",
"]",
",",
"int",
"dataLength",
",",
"int",
"otherBlock",
",",
"int",
"step",
")",
"{",
"// ensure that we do not even partially get past dataLength",
"dataLength",
"-=",
"DATA_BLOCK_LEN... | Find the same data block
@param data array
@param dataLength
@param otherBlock
@param step | [
"Find",
"the",
"same",
"data",
"block"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L647-L659 |
34,367 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java | IntTrieBuilder.fold | private final void fold(DataManipulate manipulate)
{
int leadIndexes[] = new int[SURROGATE_BLOCK_COUNT_];
int index[] = m_index_;
// copy the lead surrogate indexes into a temporary array
System.arraycopy(index, 0xd800 >> SHIFT_, leadIndexes, 0,
SURROGATE_B... | java | private final void fold(DataManipulate manipulate)
{
int leadIndexes[] = new int[SURROGATE_BLOCK_COUNT_];
int index[] = m_index_;
// copy the lead surrogate indexes into a temporary array
System.arraycopy(index, 0xd800 >> SHIFT_, leadIndexes, 0,
SURROGATE_B... | [
"private",
"final",
"void",
"fold",
"(",
"DataManipulate",
"manipulate",
")",
"{",
"int",
"leadIndexes",
"[",
"]",
"=",
"new",
"int",
"[",
"SURROGATE_BLOCK_COUNT_",
"]",
";",
"int",
"index",
"[",
"]",
"=",
"m_index_",
";",
"// copy the lead surrogate indexes int... | Fold the normalization data for supplementary code points into
a compact area on top of the BMP-part of the trie index,
with the lead surrogates indexing this compact area.
Duplicate the index values for lead surrogates:
From inside the BMP area, where some may be overridden with folded values,
to just after the BMP a... | [
"Fold",
"the",
"normalization",
"data",
"for",
"supplementary",
"code",
"points",
"into",
"a",
"compact",
"area",
"on",
"top",
"of",
"the",
"BMP",
"-",
"part",
"of",
"the",
"trie",
"index",
"with",
"the",
"lead",
"surrogates",
"indexing",
"this",
"compact",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/IntTrieBuilder.java#L672-L771 |
34,368 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java | Inet6Address.readObject | private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
scope_ifname = null;
scope_ifname_set = false;
if (getClass().getClassLoader() != Class.class.getClassLoader()) {
throw new SecurityException ("invalid address type");
}
... | java | private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException {
scope_ifname = null;
scope_ifname_set = false;
if (getClass().getClassLoader() != Class.class.getClassLoader()) {
throw new SecurityException ("invalid address type");
}
... | [
"private",
"void",
"readObject",
"(",
"ObjectInputStream",
"s",
")",
"throws",
"IOException",
",",
"ClassNotFoundException",
"{",
"scope_ifname",
"=",
"null",
";",
"scope_ifname_set",
"=",
"false",
";",
"if",
"(",
"getClass",
"(",
")",
".",
"getClassLoader",
"("... | restore the state of this object from stream
including the scope information, only if the
scoped interface name is valid on this system | [
"restore",
"the",
"state",
"of",
"this",
"object",
"from",
"stream",
"including",
"the",
"scope",
"information",
"only",
"if",
"the",
"scoped",
"interface",
"name",
"is",
"valid",
"on",
"this",
"system"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java#L431-L476 |
34,369 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java | Inet6Address.isAnyLocalAddress | @Override
public boolean isAnyLocalAddress() {
byte test = 0x00;
for (int i = 0; i < INADDRSZ; i++) {
test |= ipaddress[i];
}
return (test == 0x00);
} | java | @Override
public boolean isAnyLocalAddress() {
byte test = 0x00;
for (int i = 0; i < INADDRSZ; i++) {
test |= ipaddress[i];
}
return (test == 0x00);
} | [
"@",
"Override",
"public",
"boolean",
"isAnyLocalAddress",
"(",
")",
"{",
"byte",
"test",
"=",
"0x00",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"INADDRSZ",
";",
"i",
"++",
")",
"{",
"test",
"|=",
"ipaddress",
"[",
"i",
"]",
";",
"}",... | Utility routine to check if the InetAddress in a wildcard address.
@return a <code>boolean</code> indicating if the Inetaddress is
a wildcard address.
@since 1.4 | [
"Utility",
"routine",
"to",
"check",
"if",
"the",
"InetAddress",
"in",
"a",
"wildcard",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java#L498-L505 |
34,370 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java | Inet6Address.isLoopbackAddress | @Override
public boolean isLoopbackAddress() {
byte test = 0x00;
for (int i = 0; i < 15; i++) {
test |= ipaddress[i];
}
return (test == 0x00) && (ipaddress[15] == 0x01);
} | java | @Override
public boolean isLoopbackAddress() {
byte test = 0x00;
for (int i = 0; i < 15; i++) {
test |= ipaddress[i];
}
return (test == 0x00) && (ipaddress[15] == 0x01);
} | [
"@",
"Override",
"public",
"boolean",
"isLoopbackAddress",
"(",
")",
"{",
"byte",
"test",
"=",
"0x00",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"15",
";",
"i",
"++",
")",
"{",
"test",
"|=",
"ipaddress",
"[",
"i",
"]",
";",
"}",
"re... | Utility routine to check if the InetAddress is a loopback address.
@return a <code>boolean</code> indicating if the InetAddress is
a loopback address; or false otherwise.
@since 1.4 | [
"Utility",
"routine",
"to",
"check",
"if",
"the",
"InetAddress",
"is",
"a",
"loopback",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java#L514-L521 |
34,371 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java | Inet6Address.isIPv4CompatibleAddress | public boolean isIPv4CompatibleAddress() {
if ((ipaddress[0] == 0x00) && (ipaddress[1] == 0x00) &&
(ipaddress[2] == 0x00) && (ipaddress[3] == 0x00) &&
(ipaddress[4] == 0x00) && (ipaddress[5] == 0x00) &&
(ipaddress[6] == 0x00) && (ipaddress[7] == 0x00) &&
(ipaddres... | java | public boolean isIPv4CompatibleAddress() {
if ((ipaddress[0] == 0x00) && (ipaddress[1] == 0x00) &&
(ipaddress[2] == 0x00) && (ipaddress[3] == 0x00) &&
(ipaddress[4] == 0x00) && (ipaddress[5] == 0x00) &&
(ipaddress[6] == 0x00) && (ipaddress[7] == 0x00) &&
(ipaddres... | [
"public",
"boolean",
"isIPv4CompatibleAddress",
"(",
")",
"{",
"if",
"(",
"(",
"ipaddress",
"[",
"0",
"]",
"==",
"0x00",
")",
"&&",
"(",
"ipaddress",
"[",
"1",
"]",
"==",
"0x00",
")",
"&&",
"(",
"ipaddress",
"[",
"2",
"]",
"==",
"0x00",
")",
"&&",
... | Utility routine to check if the InetAddress is an
IPv4 compatible IPv6 address.
@return a <code>boolean</code> indicating if the InetAddress is
an IPv4 compatible IPv6 address; or false if address is IPv4 address.
@since 1.4 | [
"Utility",
"routine",
"to",
"check",
"if",
"the",
"InetAddress",
"is",
"an",
"IPv4",
"compatible",
"IPv6",
"address",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java#L747-L757 |
34,372 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java | Inet6Address.writeObject | private synchronized void writeObject(java.io.ObjectOutputStream s)
throws IOException
{
if (scope_ifname_set) {
ifname = scope_ifname.getName();
}
s.defaultWriteObject();
} | java | private synchronized void writeObject(java.io.ObjectOutputStream s)
throws IOException
{
if (scope_ifname_set) {
ifname = scope_ifname.getName();
}
s.defaultWriteObject();
} | [
"private",
"synchronized",
"void",
"writeObject",
"(",
"java",
".",
"io",
".",
"ObjectOutputStream",
"s",
")",
"throws",
"IOException",
"{",
"if",
"(",
"scope_ifname_set",
")",
"{",
"ifname",
"=",
"scope_ifname",
".",
"getName",
"(",
")",
";",
"}",
"s",
".... | default behavior is overridden in order to write the
scope_ifname field as a String, rather than a NetworkInterface
which is not serializable | [
"default",
"behavior",
"is",
"overridden",
"in",
"order",
"to",
"write",
"the",
"scope_ifname",
"field",
"as",
"a",
"String",
"rather",
"than",
"a",
"NetworkInterface",
"which",
"is",
"not",
"serializable"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/Inet6Address.java#L793-L800 |
34,373 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | NamespaceSupport2.pushContext | public void pushContext ()
{
// JJK: Context has a parent pointer.
// That means we don't need a stack to pop.
// We may want to retain for reuse, but that can be done via
// a child pointer.
Context2 parentContext=currentContext;
currentContext = parentContext.getCh... | java | public void pushContext ()
{
// JJK: Context has a parent pointer.
// That means we don't need a stack to pop.
// We may want to retain for reuse, but that can be done via
// a child pointer.
Context2 parentContext=currentContext;
currentContext = parentContext.getCh... | [
"public",
"void",
"pushContext",
"(",
")",
"{",
"// JJK: Context has a parent pointer.",
"// That means we don't need a stack to pop.",
"// We may want to retain for reuse, but that can be done via",
"// a child pointer.",
"Context2",
"parentContext",
"=",
"currentContext",
";",
"curre... | Start a new Namespace context.
<p>Normally, you should push a new context at the beginning
of each XML element: the new context will automatically inherit
the declarations of its parent context, but it will also keep
track of which declarations were made within this context.</p>
<p>The Namespace support object always... | [
"Start",
"a",
"new",
"Namespace",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L118-L135 |
34,374 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | NamespaceSupport2.processName | public String [] processName (String qName, String[] parts,
boolean isAttribute)
{
String[] name=currentContext.processName(qName, isAttribute);
if(name==null)
return null;
// JJK: This recopying is required because processName may return
... | java | public String [] processName (String qName, String[] parts,
boolean isAttribute)
{
String[] name=currentContext.processName(qName, isAttribute);
if(name==null)
return null;
// JJK: This recopying is required because processName may return
... | [
"public",
"String",
"[",
"]",
"processName",
"(",
"String",
"qName",
",",
"String",
"[",
"]",
"parts",
",",
"boolean",
"isAttribute",
")",
"{",
"String",
"[",
"]",
"name",
"=",
"currentContext",
".",
"processName",
"(",
"qName",
",",
"isAttribute",
")",
... | Process a raw XML 1.0 name.
<p>This method processes a raw XML 1.0 name in the current
context by removing the prefix and looking it up among the
prefixes currently declared. The return value will be the
array supplied by the caller, filled in as follows:</p>
<dl>
<dt>parts[0]</dt>
<dd>The Namespace URI, or an empty... | [
"Process",
"a",
"raw",
"XML",
"1",
".",
"0",
"name",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L244-L255 |
34,375 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | Context2.declarePrefix | void declarePrefix (String prefix, String uri)
{
// Lazy processing...
if (!tablesDirty) {
copyTables();
}
if (declarations == null) {
declarations = new Vector();
}
prefix = prefix.intern();
uri = u... | java | void declarePrefix (String prefix, String uri)
{
// Lazy processing...
if (!tablesDirty) {
copyTables();
}
if (declarations == null) {
declarations = new Vector();
}
prefix = prefix.intern();
uri = u... | [
"void",
"declarePrefix",
"(",
"String",
"prefix",
",",
"String",
"uri",
")",
"{",
"// Lazy processing...",
"if",
"(",
"!",
"tablesDirty",
")",
"{",
"copyTables",
"(",
")",
";",
"}",
"if",
"(",
"declarations",
"==",
"null",
")",
"{",
"declarations",
"=",
... | Declare a Namespace prefix for this context.
@param prefix The prefix to declare.
@param uri The associated Namespace URI.
@see org.xml.sax.helpers.NamespaceSupport2#declarePrefix | [
"Declare",
"a",
"Namespace",
"prefix",
"for",
"this",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L535-L558 |
34,376 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | Context2.processName | String [] processName (String qName, boolean isAttribute)
{
String name[];
Hashtable table;
// Select the appropriate table.
if (isAttribute) {
if(elementNameTable==null)
elementNameTable=new Hashtable();
ta... | java | String [] processName (String qName, boolean isAttribute)
{
String name[];
Hashtable table;
// Select the appropriate table.
if (isAttribute) {
if(elementNameTable==null)
elementNameTable=new Hashtable();
ta... | [
"String",
"[",
"]",
"processName",
"(",
"String",
"qName",
",",
"boolean",
"isAttribute",
")",
"{",
"String",
"name",
"[",
"]",
";",
"Hashtable",
"table",
";",
"// Select the appropriate table.",
"if",
"(",
"isAttribute",
")",
"{",
"if",
"(",
"elementNameTable... | Process a raw XML 1.0 name in this context.
@param qName The raw XML 1.0 name.
@param isAttribute true if this is an attribute name.
@return An array of three strings containing the
URI part (or empty string), the local part,
and the raw name, all internalized, or null
if there is an undeclared prefix.
@see org.xml.sa... | [
"Process",
"a",
"raw",
"XML",
"1",
".",
"0",
"name",
"in",
"this",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L572-L635 |
34,377 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | Context2.getURI | String getURI (String prefix)
{
if ("".equals(prefix)) {
return defaultNS;
} else if (prefixTable == null) {
return null;
} else {
return (String)prefixTable.get(prefix);
}
} | java | String getURI (String prefix)
{
if ("".equals(prefix)) {
return defaultNS;
} else if (prefixTable == null) {
return null;
} else {
return (String)prefixTable.get(prefix);
}
} | [
"String",
"getURI",
"(",
"String",
"prefix",
")",
"{",
"if",
"(",
"\"\"",
".",
"equals",
"(",
"prefix",
")",
")",
"{",
"return",
"defaultNS",
";",
"}",
"else",
"if",
"(",
"prefixTable",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{... | Look up the URI associated with a prefix in this context.
@param prefix The prefix to look up.
@return The associated Namespace URI, or null if none is
declared.
@see org.xml.sax.helpers.NamespaceSupport2#getURI | [
"Look",
"up",
"the",
"URI",
"associated",
"with",
"a",
"prefix",
"in",
"this",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L646-L655 |
34,378 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | Context2.getPrefix | String getPrefix (String uri)
{
if (uriTable == null) {
return null;
} else {
return (String)uriTable.get(uri);
}
} | java | String getPrefix (String uri)
{
if (uriTable == null) {
return null;
} else {
return (String)uriTable.get(uri);
}
} | [
"String",
"getPrefix",
"(",
"String",
"uri",
")",
"{",
"if",
"(",
"uriTable",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"else",
"{",
"return",
"(",
"String",
")",
"uriTable",
".",
"get",
"(",
"uri",
")",
";",
"}",
"}"
] | Look up one of the prefixes associated with a URI in this context.
<p>Since many prefixes may be mapped to the same URI,
the return value may be unreliable.</p>
@param uri The URI to look up.
@return The associated prefix, or null if none is declared.
@see org.xml.sax.helpers.NamespaceSupport2#getPrefix | [
"Look",
"up",
"one",
"of",
"the",
"prefixes",
"associated",
"with",
"a",
"URI",
"in",
"this",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L668-L675 |
34,379 | google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java | Context2.copyTables | private void copyTables ()
{
// Start by copying our parent's bindings
prefixTable = (Hashtable)prefixTable.clone();
uriTable = (Hashtable)uriTable.clone();
// Replace the caches with empty ones, rather than
// trying to determine which bindings should be flushed.
//... | java | private void copyTables ()
{
// Start by copying our parent's bindings
prefixTable = (Hashtable)prefixTable.clone();
uriTable = (Hashtable)uriTable.clone();
// Replace the caches with empty ones, rather than
// trying to determine which bindings should be flushed.
//... | [
"private",
"void",
"copyTables",
"(",
")",
"{",
"// Start by copying our parent's bindings",
"prefixTable",
"=",
"(",
"Hashtable",
")",
"prefixTable",
".",
"clone",
"(",
")",
";",
"uriTable",
"=",
"(",
"Hashtable",
")",
"uriTable",
".",
"clone",
"(",
")",
";",... | Copy on write for the internal tables in this context.
<p>This class is optimized for the normal case where most
elements do not contain Namespace declarations. In that case,
the Context2 will share data structures with its parent.
New tables are obtained only when new declarations are issued,
so they can be popped of... | [
"Copy",
"on",
"write",
"for",
"the",
"internal",
"tables",
"in",
"this",
"context",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/NamespaceSupport2.java#L728-L744 |
34,380 | google/j2objc | jre_emul/android/platform/libcore/luni/src/main/java/android/system/ErrnoException.java | ErrnoException.getMessage | @Override public String getMessage() {
String errnoName = OsConstants.errnoName(errno);
if (errnoName == null) {
errnoName = "errno " + errno;
}
String description = Libcore.os.strerror(errno);
return functionName + " failed: " + errnoName + " (" + description + ")";
} | java | @Override public String getMessage() {
String errnoName = OsConstants.errnoName(errno);
if (errnoName == null) {
errnoName = "errno " + errno;
}
String description = Libcore.os.strerror(errno);
return functionName + " failed: " + errnoName + " (" + description + ")";
} | [
"@",
"Override",
"public",
"String",
"getMessage",
"(",
")",
"{",
"String",
"errnoName",
"=",
"OsConstants",
".",
"errnoName",
"(",
"errno",
")",
";",
"if",
"(",
"errnoName",
"==",
"null",
")",
"{",
"errnoName",
"=",
"\"errno \"",
"+",
"errno",
";",
"}",... | Converts the stashed function name and errno value to a human-readable string.
We do this here rather than in the constructor so that callers only pay for
this if they need it. | [
"Converts",
"the",
"stashed",
"function",
"name",
"and",
"errno",
"value",
"to",
"a",
"human",
"-",
"readable",
"string",
".",
"We",
"do",
"this",
"here",
"rather",
"than",
"in",
"the",
"constructor",
"so",
"that",
"callers",
"only",
"pay",
"for",
"this",
... | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/luni/src/main/java/android/system/ErrnoException.java#L59-L66 |
34,381 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java | DistributionPointFetcher.getCRLs | private static Collection<X509CRL> getCRLs(X509CRLSelector selector,
X509CertImpl certImpl, DistributionPoint point, boolean[] reasonsMask,
boolean signFlag, PublicKey prevKey, X509Certificate prevCert,
String provider, List<CertStore> certStores,
Set<TrustAnchor> trustAnchors, Date vali... | java | private static Collection<X509CRL> getCRLs(X509CRLSelector selector,
X509CertImpl certImpl, DistributionPoint point, boolean[] reasonsMask,
boolean signFlag, PublicKey prevKey, X509Certificate prevCert,
String provider, List<CertStore> certStores,
Set<TrustAnchor> trustAnchors, Date vali... | [
"private",
"static",
"Collection",
"<",
"X509CRL",
">",
"getCRLs",
"(",
"X509CRLSelector",
"selector",
",",
"X509CertImpl",
"certImpl",
",",
"DistributionPoint",
"point",
",",
"boolean",
"[",
"]",
"reasonsMask",
",",
"boolean",
"signFlag",
",",
"PublicKey",
"prevK... | Download CRLs from the given distribution point, verify and return them.
See the top of the class for current limitations.
@throws CertStoreException if there is an error retrieving the CRLs
from one of the GeneralNames and no other CRLs are retrieved from
the other GeneralNames. If more than one GeneralName throws an... | [
"Download",
"CRLs",
"from",
"the",
"given",
"distribution",
"point",
"verify",
"and",
"return",
"them",
".",
"See",
"the",
"top",
"of",
"the",
"class",
"for",
"current",
"limitations",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java#L145-L224 |
34,382 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java | DistributionPointFetcher.getCRL | private static X509CRL getCRL(URIName name) throws CertStoreException {
URI uri = name.getURI();
if (debug != null) {
debug.println("Trying to fetch CRL from DP " + uri);
}
CertStore ucs = null;
try {
ucs = URICertStore.getInstance
(new URI... | java | private static X509CRL getCRL(URIName name) throws CertStoreException {
URI uri = name.getURI();
if (debug != null) {
debug.println("Trying to fetch CRL from DP " + uri);
}
CertStore ucs = null;
try {
ucs = URICertStore.getInstance
(new URI... | [
"private",
"static",
"X509CRL",
"getCRL",
"(",
"URIName",
"name",
")",
"throws",
"CertStoreException",
"{",
"URI",
"uri",
"=",
"name",
".",
"getURI",
"(",
")",
";",
"if",
"(",
"debug",
"!=",
"null",
")",
"{",
"debug",
".",
"println",
"(",
"\"Trying to fe... | Download CRL from given URI. | [
"Download",
"CRL",
"from",
"given",
"URI",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java#L229-L252 |
34,383 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java | DistributionPointFetcher.getCRLs | private static Collection<X509CRL> getCRLs(X500Name name,
X500Principal certIssuer,
List<CertStore> certStores)
throws CertStoreException
{
if (debug != null) {
debug.println("Trying to fetch CR... | java | private static Collection<X509CRL> getCRLs(X500Name name,
X500Principal certIssuer,
List<CertStore> certStores)
throws CertStoreException
{
if (debug != null) {
debug.println("Trying to fetch CR... | [
"private",
"static",
"Collection",
"<",
"X509CRL",
">",
"getCRLs",
"(",
"X500Name",
"name",
",",
"X500Principal",
"certIssuer",
",",
"List",
"<",
"CertStore",
">",
"certStores",
")",
"throws",
"CertStoreException",
"{",
"if",
"(",
"debug",
"!=",
"null",
")",
... | Fetch CRLs from certStores.
@throws CertStoreException if there is an error retrieving the CRLs from
one of the CertStores and no other CRLs are retrieved from
the other CertStores. If more than one CertStore throws an
exception then the one from the last CertStore is thrown. | [
"Fetch",
"CRLs",
"from",
"certStores",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java#L262-L295 |
34,384 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java | DistributionPointFetcher.getFullNames | private static GeneralNames getFullNames(X500Name issuer, RDN rdn)
throws IOException
{
List<RDN> rdns = new ArrayList<>(issuer.rdns());
rdns.add(rdn);
X500Name fullName = new X500Name(rdns.toArray(new RDN[0]));
GeneralNames fullNames = new GeneralNames();
fullNames.a... | java | private static GeneralNames getFullNames(X500Name issuer, RDN rdn)
throws IOException
{
List<RDN> rdns = new ArrayList<>(issuer.rdns());
rdns.add(rdn);
X500Name fullName = new X500Name(rdns.toArray(new RDN[0]));
GeneralNames fullNames = new GeneralNames();
fullNames.a... | [
"private",
"static",
"GeneralNames",
"getFullNames",
"(",
"X500Name",
"issuer",
",",
"RDN",
"rdn",
")",
"throws",
"IOException",
"{",
"List",
"<",
"RDN",
">",
"rdns",
"=",
"new",
"ArrayList",
"<>",
"(",
"issuer",
".",
"rdns",
"(",
")",
")",
";",
"rdns",
... | Append relative name to the issuer name and return a new
GeneralNames object. | [
"Append",
"relative",
"name",
"to",
"the",
"issuer",
"name",
"and",
"return",
"a",
"new",
"GeneralNames",
"object",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java#L708-L717 |
34,385 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java | DistributionPointFetcher.issues | private static boolean issues(X509CertImpl cert, X509CRLImpl crl,
String provider) throws IOException
{
boolean matched = false;
AdaptableX509CertSelector issuerSelector =
new AdaptableX509CertSelector();
// check certif... | java | private static boolean issues(X509CertImpl cert, X509CRLImpl crl,
String provider) throws IOException
{
boolean matched = false;
AdaptableX509CertSelector issuerSelector =
new AdaptableX509CertSelector();
// check certif... | [
"private",
"static",
"boolean",
"issues",
"(",
"X509CertImpl",
"cert",
",",
"X509CRLImpl",
"crl",
",",
"String",
"provider",
")",
"throws",
"IOException",
"{",
"boolean",
"matched",
"=",
"false",
";",
"AdaptableX509CertSelector",
"issuerSelector",
"=",
"new",
"Ada... | Verifies whether a CRL is issued by a certain certificate
@param cert the certificate
@param crl the CRL to be verified
@param provider the name of the signature provider | [
"Verifies",
"whether",
"a",
"CRL",
"is",
"issued",
"by",
"a",
"certain",
"certificate"
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/provider/certpath/DistributionPointFetcher.java#L726-L772 |
34,386 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Edits.java | Edits.addUnchanged | public void addUnchanged(int unchangedLength) {
if(unchangedLength < 0) {
throw new IllegalArgumentException(
"addUnchanged(" + unchangedLength + "): length must not be negative");
}
// Merge into previous unchanged-text record, if any.
int last = lastUnit... | java | public void addUnchanged(int unchangedLength) {
if(unchangedLength < 0) {
throw new IllegalArgumentException(
"addUnchanged(" + unchangedLength + "): length must not be negative");
}
// Merge into previous unchanged-text record, if any.
int last = lastUnit... | [
"public",
"void",
"addUnchanged",
"(",
"int",
"unchangedLength",
")",
"{",
"if",
"(",
"unchangedLength",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"addUnchanged(\"",
"+",
"unchangedLength",
"+",
"\"): length must not be negative\"",
")",
... | Adds a record for an unchanged segment of text.
Normally called from inside ICU string transformation functions, not user code.
@hide draft / provisional / internal are hidden on Android | [
"Adds",
"a",
"record",
"for",
"an",
"unchanged",
"segment",
"of",
"text",
".",
"Normally",
"called",
"from",
"inside",
"ICU",
"string",
"transformation",
"functions",
"not",
"user",
"code",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/Edits.java#L69-L94 |
34,387 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java | PatternProps.skipWhiteSpace | public static int skipWhiteSpace(CharSequence s, int i) {
while(i<s.length() && isWhiteSpace(s.charAt(i))) {
++i;
}
return i;
} | java | public static int skipWhiteSpace(CharSequence s, int i) {
while(i<s.length() && isWhiteSpace(s.charAt(i))) {
++i;
}
return i;
} | [
"public",
"static",
"int",
"skipWhiteSpace",
"(",
"CharSequence",
"s",
",",
"int",
"i",
")",
"{",
"while",
"(",
"i",
"<",
"s",
".",
"length",
"(",
")",
"&&",
"isWhiteSpace",
"(",
"s",
".",
"charAt",
"(",
"i",
")",
")",
")",
"{",
"++",
"i",
";",
... | Skips over Pattern_White_Space starting at index i of the CharSequence.
@return The smallest index at or after i with a non-white space character. | [
"Skips",
"over",
"Pattern_White_Space",
"starting",
"at",
"index",
"i",
"of",
"the",
"CharSequence",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java#L95-L100 |
34,388 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java | PatternProps.isIdentifier | public static boolean isIdentifier(CharSequence s) {
int limit=s.length();
if(limit==0) {
return false;
}
int start=0;
do {
if(isSyntaxOrWhiteSpace(s.charAt(start++))) {
return false;
}
} while(start<limit);
retu... | java | public static boolean isIdentifier(CharSequence s) {
int limit=s.length();
if(limit==0) {
return false;
}
int start=0;
do {
if(isSyntaxOrWhiteSpace(s.charAt(start++))) {
return false;
}
} while(start<limit);
retu... | [
"public",
"static",
"boolean",
"isIdentifier",
"(",
"CharSequence",
"s",
")",
"{",
"int",
"limit",
"=",
"s",
".",
"length",
"(",
")",
";",
"if",
"(",
"limit",
"==",
"0",
")",
"{",
"return",
"false",
";",
"}",
"int",
"start",
"=",
"0",
";",
"do",
... | Tests whether the CharSequence contains a "pattern identifier", that is,
whether it contains only non-Pattern_White_Space, non-Pattern_Syntax characters.
@return true if there are no Pattern_White_Space or Pattern_Syntax characters in s. | [
"Tests",
"whether",
"the",
"CharSequence",
"contains",
"a",
"pattern",
"identifier",
"that",
"is",
"whether",
"it",
"contains",
"only",
"non",
"-",
"Pattern_White_Space",
"non",
"-",
"Pattern_Syntax",
"characters",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java#L129-L141 |
34,389 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java | PatternProps.skipIdentifier | public static int skipIdentifier(CharSequence s, int i) {
while(i<s.length() && !isSyntaxOrWhiteSpace(s.charAt(i))) {
++i;
}
return i;
} | java | public static int skipIdentifier(CharSequence s, int i) {
while(i<s.length() && !isSyntaxOrWhiteSpace(s.charAt(i))) {
++i;
}
return i;
} | [
"public",
"static",
"int",
"skipIdentifier",
"(",
"CharSequence",
"s",
",",
"int",
"i",
")",
"{",
"while",
"(",
"i",
"<",
"s",
".",
"length",
"(",
")",
"&&",
"!",
"isSyntaxOrWhiteSpace",
"(",
"s",
".",
"charAt",
"(",
"i",
")",
")",
")",
"{",
"++",
... | Skips over a "pattern identifier" starting at index i of the CharSequence.
@return The smallest index at or after i with
a Pattern_White_Space or Pattern_Syntax character. | [
"Skips",
"over",
"a",
"pattern",
"identifier",
"starting",
"at",
"index",
"i",
"of",
"the",
"CharSequence",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/PatternProps.java#L166-L171 |
34,390 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.setPeriodFormatter | @Override
public DurationFormatterFactory setPeriodFormatter(
PeriodFormatter formatter) {
if (formatter != this.formatter) {
this.formatter = formatter;
reset();
}
return this;
} | java | @Override
public DurationFormatterFactory setPeriodFormatter(
PeriodFormatter formatter) {
if (formatter != this.formatter) {
this.formatter = formatter;
reset();
}
return this;
} | [
"@",
"Override",
"public",
"DurationFormatterFactory",
"setPeriodFormatter",
"(",
"PeriodFormatter",
"formatter",
")",
"{",
"if",
"(",
"formatter",
"!=",
"this",
".",
"formatter",
")",
"{",
"this",
".",
"formatter",
"=",
"formatter",
";",
"reset",
"(",
")",
";... | Set the period formatter used by the factory. New formatters created
with this factory will use the given period formatter.
@return this BasicDurationFormatterFactory | [
"Set",
"the",
"period",
"formatter",
"used",
"by",
"the",
"factory",
".",
"New",
"formatters",
"created",
"with",
"this",
"factory",
"will",
"use",
"the",
"given",
"period",
"formatter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L51-L59 |
34,391 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.setPeriodBuilder | @Override
public DurationFormatterFactory setPeriodBuilder(PeriodBuilder builder) {
if (builder != this.builder) {
this.builder = builder;
reset();
}
return this;
} | java | @Override
public DurationFormatterFactory setPeriodBuilder(PeriodBuilder builder) {
if (builder != this.builder) {
this.builder = builder;
reset();
}
return this;
} | [
"@",
"Override",
"public",
"DurationFormatterFactory",
"setPeriodBuilder",
"(",
"PeriodBuilder",
"builder",
")",
"{",
"if",
"(",
"builder",
"!=",
"this",
".",
"builder",
")",
"{",
"this",
".",
"builder",
"=",
"builder",
";",
"reset",
"(",
")",
";",
"}",
"r... | Set the builder used by the factory. New formatters created
with this factory will use the given locale.
@param builder the builder to use
@return this BasicDurationFormatterFactory | [
"Set",
"the",
"builder",
"used",
"by",
"the",
"factory",
".",
"New",
"formatters",
"created",
"with",
"this",
"factory",
"will",
"use",
"the",
"given",
"locale",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L68-L75 |
34,392 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.setFallback | @Override
public DurationFormatterFactory setFallback(DateFormatter fallback) {
boolean doReset = fallback == null
? this.fallback != null
: !fallback.equals(this.fallback);
if (doReset) {
this.fallback = fallback;
reset();
}
return this;
} | java | @Override
public DurationFormatterFactory setFallback(DateFormatter fallback) {
boolean doReset = fallback == null
? this.fallback != null
: !fallback.equals(this.fallback);
if (doReset) {
this.fallback = fallback;
reset();
}
return this;
} | [
"@",
"Override",
"public",
"DurationFormatterFactory",
"setFallback",
"(",
"DateFormatter",
"fallback",
")",
"{",
"boolean",
"doReset",
"=",
"fallback",
"==",
"null",
"?",
"this",
".",
"fallback",
"!=",
"null",
":",
"!",
"fallback",
".",
"equals",
"(",
"this",... | Set a fallback formatter for durations over a given limit.
@param fallback the fallback formatter to use, or null
@return this BasicDurationFormatterFactory | [
"Set",
"a",
"fallback",
"formatter",
"for",
"durations",
"over",
"a",
"given",
"limit",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L83-L93 |
34,393 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.setFallbackLimit | @Override
public DurationFormatterFactory setFallbackLimit(long fallbackLimit) {
if (fallbackLimit < 0) {
fallbackLimit = 0;
}
if (fallbackLimit != this.fallbackLimit) {
this.fallbackLimit = fallbackLimit;
reset();
}
return this;
} | java | @Override
public DurationFormatterFactory setFallbackLimit(long fallbackLimit) {
if (fallbackLimit < 0) {
fallbackLimit = 0;
}
if (fallbackLimit != this.fallbackLimit) {
this.fallbackLimit = fallbackLimit;
reset();
}
return this;
} | [
"@",
"Override",
"public",
"DurationFormatterFactory",
"setFallbackLimit",
"(",
"long",
"fallbackLimit",
")",
"{",
"if",
"(",
"fallbackLimit",
"<",
"0",
")",
"{",
"fallbackLimit",
"=",
"0",
";",
"}",
"if",
"(",
"fallbackLimit",
"!=",
"this",
".",
"fallbackLimi... | Set a fallback limit for durations over a given limit.
@param fallbackLimit the fallback limit to use, or 0 if none is desired.
@return this BasicDurationFormatterFactory | [
"Set",
"a",
"fallback",
"limit",
"for",
"durations",
"over",
"a",
"given",
"limit",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L101-L111 |
34,394 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.getFormatter | @Override
public DurationFormatter getFormatter() {
if (f == null) {
if (fallback != null) {
fallback = fallback.withLocale(localeName).withTimeZone(timeZone);
}
formatter = getPeriodFormatter();
builder = getPeriodBuilder();
f = createFormatter();
}
return f;
} | java | @Override
public DurationFormatter getFormatter() {
if (f == null) {
if (fallback != null) {
fallback = fallback.withLocale(localeName).withTimeZone(timeZone);
}
formatter = getPeriodFormatter();
builder = getPeriodBuilder();
f = createFormatter();
}
return f;
} | [
"@",
"Override",
"public",
"DurationFormatter",
"getFormatter",
"(",
")",
"{",
"if",
"(",
"f",
"==",
"null",
")",
"{",
"if",
"(",
"fallback",
"!=",
"null",
")",
"{",
"fallback",
"=",
"fallback",
".",
"withLocale",
"(",
"localeName",
")",
".",
"withTimeZo... | Return a formatter based on this factory's current settings.
@return a BasicDurationFormatter | [
"Return",
"a",
"formatter",
"based",
"on",
"this",
"factory",
"s",
"current",
"settings",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L159-L171 |
34,395 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.getPeriodFormatter | public PeriodFormatter getPeriodFormatter() {
if (formatter == null) {
formatter = ps.newPeriodFormatterFactory()
.setLocale(localeName)
.getFormatter();
}
return formatter;
} | java | public PeriodFormatter getPeriodFormatter() {
if (formatter == null) {
formatter = ps.newPeriodFormatterFactory()
.setLocale(localeName)
.getFormatter();
}
return formatter;
} | [
"public",
"PeriodFormatter",
"getPeriodFormatter",
"(",
")",
"{",
"if",
"(",
"formatter",
"==",
"null",
")",
"{",
"formatter",
"=",
"ps",
".",
"newPeriodFormatterFactory",
"(",
")",
".",
"setLocale",
"(",
"localeName",
")",
".",
"getFormatter",
"(",
")",
";"... | Return the current period formatter.
@return the current period formatter | [
"Return",
"the",
"current",
"period",
"formatter",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L178-L185 |
34,396 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java | BasicDurationFormatterFactory.getPeriodBuilder | public PeriodBuilder getPeriodBuilder() {
if (builder == null) {
builder = ps.newPeriodBuilderFactory()
.setLocale(localeName)
.setTimeZone(timeZone)
.getSingleUnitBuilder();
}
return builder;
} | java | public PeriodBuilder getPeriodBuilder() {
if (builder == null) {
builder = ps.newPeriodBuilderFactory()
.setLocale(localeName)
.setTimeZone(timeZone)
.getSingleUnitBuilder();
}
return builder;
} | [
"public",
"PeriodBuilder",
"getPeriodBuilder",
"(",
")",
"{",
"if",
"(",
"builder",
"==",
"null",
")",
"{",
"builder",
"=",
"ps",
".",
"newPeriodBuilderFactory",
"(",
")",
".",
"setLocale",
"(",
"localeName",
")",
".",
"setTimeZone",
"(",
"timeZone",
")",
... | Return the current builder.
@return the current builder | [
"Return",
"the",
"current",
"builder",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/duration/BasicDurationFormatterFactory.java#L192-L200 |
34,397 | google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NetscapeCertTypeExtension.java | NetscapeCertTypeExtension.getKeyUsageMappedBits | public boolean[] getKeyUsageMappedBits() {
KeyUsageExtension keyUsage = new KeyUsageExtension();
Boolean val = Boolean.TRUE;
try {
if (isSet(getPosition(SSL_CLIENT)) ||
isSet(getPosition(S_MIME)) ||
isSet(getPosition(OBJECT_SIGNING)))
... | java | public boolean[] getKeyUsageMappedBits() {
KeyUsageExtension keyUsage = new KeyUsageExtension();
Boolean val = Boolean.TRUE;
try {
if (isSet(getPosition(SSL_CLIENT)) ||
isSet(getPosition(S_MIME)) ||
isSet(getPosition(OBJECT_SIGNING)))
... | [
"public",
"boolean",
"[",
"]",
"getKeyUsageMappedBits",
"(",
")",
"{",
"KeyUsageExtension",
"keyUsage",
"=",
"new",
"KeyUsageExtension",
"(",
")",
";",
"Boolean",
"val",
"=",
"Boolean",
".",
"TRUE",
";",
"try",
"{",
"if",
"(",
"isSet",
"(",
"getPosition",
... | Get a boolean array representing the bits of this extension,
as it maps to the KeyUsage extension.
@return the bit values of this extension mapped to the bit values
of the KeyUsage extension as an array of booleans. | [
"Get",
"a",
"boolean",
"array",
"representing",
"the",
"bits",
"of",
"this",
"extension",
"as",
"it",
"maps",
"to",
"the",
"KeyUsage",
"extension",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/x509/NetscapeCertTypeExtension.java#L309-L328 |
34,398 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RuleCharacterIterator.java | RuleCharacterIterator.next | public int next(int options) {
int c = DONE;
isEscaped = false;
for (;;) {
c = _current();
_advance(UTF16.getCharCount(c));
if (c == SymbolTable.SYMBOL_REF && buf == null &&
(options & PARSE_VARIABLES) != 0 && sym != null) {
S... | java | public int next(int options) {
int c = DONE;
isEscaped = false;
for (;;) {
c = _current();
_advance(UTF16.getCharCount(c));
if (c == SymbolTable.SYMBOL_REF && buf == null &&
(options & PARSE_VARIABLES) != 0 && sym != null) {
S... | [
"public",
"int",
"next",
"(",
"int",
"options",
")",
"{",
"int",
"c",
"=",
"DONE",
";",
"isEscaped",
"=",
"false",
";",
"for",
"(",
";",
";",
")",
"{",
"c",
"=",
"_current",
"(",
")",
";",
"_advance",
"(",
"UTF16",
".",
"getCharCount",
"(",
"c",
... | Returns the next character using the given options, or DONE if there
are no more characters, and advance the position to the next
character.
@param options one or more of the following options, bitwise-OR-ed
together: PARSE_VARIABLES, PARSE_ESCAPES, SKIP_WHITESPACE.
@return the current 32-bit code point, or DONE | [
"Returns",
"the",
"next",
"character",
"using",
"the",
"given",
"options",
"or",
"DONE",
"if",
"there",
"are",
"no",
"more",
"characters",
"and",
"advance",
"the",
"position",
"to",
"the",
"next",
"character",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RuleCharacterIterator.java#L131-L179 |
34,399 | google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RuleCharacterIterator.java | RuleCharacterIterator._current | private int _current() {
if (buf != null) {
return UTF16.charAt(buf, 0, buf.length, bufPos);
} else {
int i = pos.getIndex();
return (i < text.length()) ? UTF16.charAt(text, i) : DONE;
}
} | java | private int _current() {
if (buf != null) {
return UTF16.charAt(buf, 0, buf.length, bufPos);
} else {
int i = pos.getIndex();
return (i < text.length()) ? UTF16.charAt(text, i) : DONE;
}
} | [
"private",
"int",
"_current",
"(",
")",
"{",
"if",
"(",
"buf",
"!=",
"null",
")",
"{",
"return",
"UTF16",
".",
"charAt",
"(",
"buf",
",",
"0",
",",
"buf",
".",
"length",
",",
"bufPos",
")",
";",
"}",
"else",
"{",
"int",
"i",
"=",
"pos",
".",
... | Returns the current 32-bit code point without parsing escapes, parsing
variables, or skipping whitespace.
@return the current 32-bit code point | [
"Returns",
"the",
"current",
"32",
"-",
"bit",
"code",
"point",
"without",
"parsing",
"escapes",
"parsing",
"variables",
"or",
"skipping",
"whitespace",
"."
] | 471504a735b48d5d4ace51afa1542cc4790a921a | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/RuleCharacterIterator.java#L323-L330 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.