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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
130,900 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java | QueuedExecutions.fetchHead | public Pair<ExecutionReference, ExecutableFlow> fetchHead()
throws InterruptedException {
final Pair<ExecutionReference, ExecutableFlow> pair = this.queuedFlowList.take();
if (pair != null && pair.getFirst() != null) {
this.queuedFlowMap.remove(pair.getFirst().getExecId());
}
return pair;
... | java | public Pair<ExecutionReference, ExecutableFlow> fetchHead()
throws InterruptedException {
final Pair<ExecutionReference, ExecutableFlow> pair = this.queuedFlowList.take();
if (pair != null && pair.getFirst() != null) {
this.queuedFlowMap.remove(pair.getFirst().getExecId());
}
return pair;
... | [
"public",
"Pair",
"<",
"ExecutionReference",
",",
"ExecutableFlow",
">",
"fetchHead",
"(",
")",
"throws",
"InterruptedException",
"{",
"final",
"Pair",
"<",
"ExecutionReference",
",",
"ExecutableFlow",
">",
"pair",
"=",
"this",
".",
"queuedFlowList",
".",
"take",
... | Wraps BoundedQueue Take method to have a corresponding update in queuedFlowMap lookup table | [
"Wraps",
"BoundedQueue",
"Take",
"method",
"to",
"have",
"a",
"corresponding",
"update",
"in",
"queuedFlowMap",
"lookup",
"table"
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java#L39-L46 |
130,901 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java | QueuedExecutions.dequeue | public void dequeue(final int executionId) {
if (this.queuedFlowMap.containsKey(executionId)) {
this.queuedFlowList.remove(this.queuedFlowMap.get(executionId));
this.queuedFlowMap.remove(executionId);
}
} | java | public void dequeue(final int executionId) {
if (this.queuedFlowMap.containsKey(executionId)) {
this.queuedFlowList.remove(this.queuedFlowMap.get(executionId));
this.queuedFlowMap.remove(executionId);
}
} | [
"public",
"void",
"dequeue",
"(",
"final",
"int",
"executionId",
")",
"{",
"if",
"(",
"this",
".",
"queuedFlowMap",
".",
"containsKey",
"(",
"executionId",
")",
")",
"{",
"this",
".",
"queuedFlowList",
".",
"remove",
"(",
"this",
".",
"queuedFlowMap",
".",... | Helper method to have a single point of deletion in the queued flows | [
"Helper",
"method",
"to",
"have",
"a",
"single",
"point",
"of",
"deletion",
"in",
"the",
"queued",
"flows"
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java#L51-L56 |
130,902 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java | QueuedExecutions.getFlow | public ExecutableFlow getFlow(final int executionId) {
if (hasExecution(executionId)) {
return this.queuedFlowMap.get(executionId).getSecond();
}
return null;
} | java | public ExecutableFlow getFlow(final int executionId) {
if (hasExecution(executionId)) {
return this.queuedFlowMap.get(executionId).getSecond();
}
return null;
} | [
"public",
"ExecutableFlow",
"getFlow",
"(",
"final",
"int",
"executionId",
")",
"{",
"if",
"(",
"hasExecution",
"(",
"executionId",
")",
")",
"{",
"return",
"this",
".",
"queuedFlowMap",
".",
"get",
"(",
"executionId",
")",
".",
"getSecond",
"(",
")",
";",... | Fetch flow for an execution. Returns null, if execution not in queue | [
"Fetch",
"flow",
"for",
"an",
"execution",
".",
"Returns",
"null",
"if",
"execution",
"not",
"in",
"queue"
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java#L130-L135 |
130,903 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java | QueuedExecutions.getReference | public ExecutionReference getReference(final int executionId) {
if (hasExecution(executionId)) {
return this.queuedFlowMap.get(executionId).getFirst();
}
return null;
} | java | public ExecutionReference getReference(final int executionId) {
if (hasExecution(executionId)) {
return this.queuedFlowMap.get(executionId).getFirst();
}
return null;
} | [
"public",
"ExecutionReference",
"getReference",
"(",
"final",
"int",
"executionId",
")",
"{",
"if",
"(",
"hasExecution",
"(",
"executionId",
")",
")",
"{",
"return",
"this",
".",
"queuedFlowMap",
".",
"get",
"(",
"executionId",
")",
".",
"getFirst",
"(",
")"... | Fetch Activereference for an execution. Returns null, if execution not in queue | [
"Fetch",
"Activereference",
"for",
"an",
"execution",
".",
"Returns",
"null",
"if",
"execution",
"not",
"in",
"queue"
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java#L140-L145 |
130,904 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java | QueuedExecutions.clear | public void clear() {
for (final Pair<ExecutionReference, ExecutableFlow> pair : this.queuedFlowMap.values()) {
dequeue(pair.getFirst().getExecId());
}
} | java | public void clear() {
for (final Pair<ExecutionReference, ExecutableFlow> pair : this.queuedFlowMap.values()) {
dequeue(pair.getFirst().getExecId());
}
} | [
"public",
"void",
"clear",
"(",
")",
"{",
"for",
"(",
"final",
"Pair",
"<",
"ExecutionReference",
",",
"ExecutableFlow",
">",
"pair",
":",
"this",
".",
"queuedFlowMap",
".",
"values",
"(",
")",
")",
"{",
"dequeue",
"(",
"pair",
".",
"getFirst",
"(",
")... | Empties queue by dequeuing all the elements | [
"Empties",
"queue",
"by",
"dequeuing",
"all",
"the",
"elements"
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/QueuedExecutions.java#L171-L175 |
130,905 | azkaban/azkaban | azkaban-web-server/src/main/java/azkaban/scheduler/AbstractQuartzJob.java | AbstractQuartzJob.asT | protected static <T extends Serializable> T asT(final Object service, final Class<T> type) {
return type.cast(service);
} | java | protected static <T extends Serializable> T asT(final Object service, final Class<T> type) {
return type.cast(service);
} | [
"protected",
"static",
"<",
"T",
"extends",
"Serializable",
">",
"T",
"asT",
"(",
"final",
"Object",
"service",
",",
"final",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"type",
".",
"cast",
"(",
"service",
")",
";",
"}"
] | Cast the object to the original one with the type. The object must extend Serializable. | [
"Cast",
"the",
"object",
"to",
"the",
"original",
"one",
"with",
"the",
"type",
".",
"The",
"object",
"must",
"extend",
"Serializable",
"."
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-web-server/src/main/java/azkaban/scheduler/AbstractQuartzJob.java#L28-L30 |
130,906 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java | JdbcProjectImpl.createNewProject | @Override
public synchronized Project createNewProject(final String name, final String description,
final User creator)
throws ProjectManagerException {
final ProjectResultHandler handler = new ProjectResultHandler();
// Check if the same project name exists.
try {
final List<Project> p... | java | @Override
public synchronized Project createNewProject(final String name, final String description,
final User creator)
throws ProjectManagerException {
final ProjectResultHandler handler = new ProjectResultHandler();
// Check if the same project name exists.
try {
final List<Project> p... | [
"@",
"Override",
"public",
"synchronized",
"Project",
"createNewProject",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"description",
",",
"final",
"User",
"creator",
")",
"throws",
"ProjectManagerException",
"{",
"final",
"ProjectResultHandler",
"handler",... | Creates a Project in the db.
It will throw an exception if it finds an active project of the same name, or the SQL fails | [
"Creates",
"a",
"Project",
"in",
"the",
"db",
"."
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java#L203-L243 |
130,907 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java | JdbcProjectImpl.addProjectToProjectVersions | private void addProjectToProjectVersions(
final DatabaseTransOperator transOperator,
final int projectId,
final int version,
final File localFile,
final String uploader,
final byte[] md5,
final String resourceId) throws ProjectManagerException {
final long updateTime = Syst... | java | private void addProjectToProjectVersions(
final DatabaseTransOperator transOperator,
final int projectId,
final int version,
final File localFile,
final String uploader,
final byte[] md5,
final String resourceId) throws ProjectManagerException {
final long updateTime = Syst... | [
"private",
"void",
"addProjectToProjectVersions",
"(",
"final",
"DatabaseTransOperator",
"transOperator",
",",
"final",
"int",
"projectId",
",",
"final",
"int",
"version",
",",
"final",
"File",
"localFile",
",",
"final",
"String",
"uploader",
",",
"final",
"byte",
... | Insert a new version record to TABLE project_versions before uploading files.
The reason for this operation: When error chunking happens in remote mysql server, incomplete
file data remains in DB, and an SQL exception is thrown. If we don't have this operation before
uploading file, the SQL exception prevents AZ from ... | [
"Insert",
"a",
"new",
"version",
"record",
"to",
"TABLE",
"project_versions",
"before",
"uploading",
"files",
"."
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java#L344-L370 |
130,908 | azkaban/azkaban | azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java | JdbcProjectImpl.updateChunksInProjectVersions | private void updateChunksInProjectVersions(final DatabaseTransOperator transOperator,
final int projectId, final int version, final int chunk)
throws ProjectManagerException {
final String UPDATE_PROJECT_NUM_CHUNKS =
"UPDATE project_versions SET num_chunks=? WHERE project_id=? AND version=?";
... | java | private void updateChunksInProjectVersions(final DatabaseTransOperator transOperator,
final int projectId, final int version, final int chunk)
throws ProjectManagerException {
final String UPDATE_PROJECT_NUM_CHUNKS =
"UPDATE project_versions SET num_chunks=? WHERE project_id=? AND version=?";
... | [
"private",
"void",
"updateChunksInProjectVersions",
"(",
"final",
"DatabaseTransOperator",
"transOperator",
",",
"final",
"int",
"projectId",
",",
"final",
"int",
"version",
",",
"final",
"int",
"chunk",
")",
"throws",
"ProjectManagerException",
"{",
"final",
"String"... | we update num_chunks's actual number to db here. | [
"we",
"update",
"num_chunks",
"s",
"actual",
"number",
"to",
"db",
"here",
"."
] | d258ea7d6e66807c6eff79c5325d6d3443618dff | https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/project/JdbcProjectImpl.java#L426-L440 |
130,909 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java | OtpErlangList.elements | public OtpErlangObject[] elements() {
if (arity() == 0) {
return NO_ELEMENTS;
}
final OtpErlangObject[] res = new OtpErlangObject[arity()];
System.arraycopy(elems, 0, res, 0, res.length);
return res;
} | java | public OtpErlangObject[] elements() {
if (arity() == 0) {
return NO_ELEMENTS;
}
final OtpErlangObject[] res = new OtpErlangObject[arity()];
System.arraycopy(elems, 0, res, 0, res.length);
return res;
} | [
"public",
"OtpErlangObject",
"[",
"]",
"elements",
"(",
")",
"{",
"if",
"(",
"arity",
"(",
")",
"==",
"0",
")",
"{",
"return",
"NO_ELEMENTS",
";",
"}",
"final",
"OtpErlangObject",
"[",
"]",
"res",
"=",
"new",
"OtpErlangObject",
"[",
"arity",
"(",
")",
... | Get all the elements from the list as an array.
@return an array containing all of the list's elements. | [
"Get",
"all",
"the",
"elements",
"from",
"the",
"list",
"as",
"an",
"array",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java#L187-L194 |
130,910 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java | OtpErlangList.stringValue | public String stringValue() throws OtpErlangException {
if (!isProper()) {
throw new OtpErlangException("Non-proper list: " + this);
}
final int[] values = new int[arity()];
for (int i = 0; i < values.length; ++i) {
final OtpErlangObject o = elementAt(i);
... | java | public String stringValue() throws OtpErlangException {
if (!isProper()) {
throw new OtpErlangException("Non-proper list: " + this);
}
final int[] values = new int[arity()];
for (int i = 0; i < values.length; ++i) {
final OtpErlangObject o = elementAt(i);
... | [
"public",
"String",
"stringValue",
"(",
")",
"throws",
"OtpErlangException",
"{",
"if",
"(",
"!",
"isProper",
"(",
")",
")",
"{",
"throw",
"new",
"OtpErlangException",
"(",
"\"Non-proper list: \"",
"+",
"this",
")",
";",
"}",
"final",
"int",
"[",
"]",
"val... | Convert a list of integers into a Unicode string, interpreting each
integer as a Unicode code point value.
@return A java.lang.String object created through its constructor
String(int[], int, int).
@exception OtpErlangException
for non-proper and non-integer lists.
@exception OtpErlangRangeException
if any integer d... | [
"Convert",
"a",
"list",
"of",
"integers",
"into",
"a",
"Unicode",
"string",
"interpreting",
"each",
"integer",
"as",
"a",
"Unicode",
"code",
"point",
"value",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java#L437-L451 |
130,911 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java | GenericQueue.put | public synchronized void put(final Object o) {
final Bucket b = new Bucket(o);
if (tail != null) {
tail.setNext(b);
tail = b;
} else {
// queue was empty but has one element now
head = tail = b;
}
count++;
// notify any wa... | java | public synchronized void put(final Object o) {
final Bucket b = new Bucket(o);
if (tail != null) {
tail.setNext(b);
tail = b;
} else {
// queue was empty but has one element now
head = tail = b;
}
count++;
// notify any wa... | [
"public",
"synchronized",
"void",
"put",
"(",
"final",
"Object",
"o",
")",
"{",
"final",
"Bucket",
"b",
"=",
"new",
"Bucket",
"(",
"o",
")",
";",
"if",
"(",
"tail",
"!=",
"null",
")",
"{",
"tail",
".",
"setNext",
"(",
"b",
")",
";",
"tail",
"=",
... | Add an object to the tail of the queue.
@param o
Object to insert in the queue | [
"Add",
"an",
"object",
"to",
"the",
"tail",
"of",
"the",
"queue",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java#L64-L78 |
130,912 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java | GenericQueue.get | public synchronized Object get() {
Object o = null;
while ((o = tryGet()) == null) {
try {
this.wait();
} catch (final InterruptedException e) {
}
}
return o;
} | java | public synchronized Object get() {
Object o = null;
while ((o = tryGet()) == null) {
try {
this.wait();
} catch (final InterruptedException e) {
}
}
return o;
} | [
"public",
"synchronized",
"Object",
"get",
"(",
")",
"{",
"Object",
"o",
"=",
"null",
";",
"while",
"(",
"(",
"o",
"=",
"tryGet",
"(",
")",
")",
"==",
"null",
")",
"{",
"try",
"{",
"this",
".",
"wait",
"(",
")",
";",
"}",
"catch",
"(",
"final",... | Retrieve an object from the head of the queue, or block until one
arrives.
@return The object at the head of the queue. | [
"Retrieve",
"an",
"object",
"from",
"the",
"head",
"of",
"the",
"queue",
"or",
"block",
"until",
"one",
"arrives",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java#L86-L96 |
130,913 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java | GenericQueue.get | public synchronized Object get(final long timeout)
throws InterruptedException {
if (status == closed) {
return null;
}
long currentTime = System.currentTimeMillis();
final long stopTime = currentTime + timeout;
Object o = null;
while (true) {
... | java | public synchronized Object get(final long timeout)
throws InterruptedException {
if (status == closed) {
return null;
}
long currentTime = System.currentTimeMillis();
final long stopTime = currentTime + timeout;
Object o = null;
while (true) {
... | [
"public",
"synchronized",
"Object",
"get",
"(",
"final",
"long",
"timeout",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"status",
"==",
"closed",
")",
"{",
"return",
"null",
";",
"}",
"long",
"currentTime",
"=",
"System",
".",
"currentTimeMillis",
... | Retrieve an object from the head of the queue, blocking until one arrives
or until timeout occurs.
@param timeout
Maximum time to block on queue, in ms. Use 0 to poll the
queue.
@exception InterruptedException
if the operation times out.
@return The object at the head of the queue, or null if none arrived in
time. | [
"Retrieve",
"an",
"object",
"from",
"the",
"head",
"of",
"the",
"queue",
"blocking",
"until",
"one",
"arrives",
"or",
"until",
"timeout",
"occurs",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java#L112-L138 |
130,914 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java | GenericQueue.tryGet | public Object tryGet() {
Object o = null;
if (head != null) {
o = head.getContents();
head = head.getNext();
count--;
if (head == null) {
tail = null;
count = 0;
}
}
return o;
} | java | public Object tryGet() {
Object o = null;
if (head != null) {
o = head.getContents();
head = head.getNext();
count--;
if (head == null) {
tail = null;
count = 0;
}
}
return o;
} | [
"public",
"Object",
"tryGet",
"(",
")",
"{",
"Object",
"o",
"=",
"null",
";",
"if",
"(",
"head",
"!=",
"null",
")",
"{",
"o",
"=",
"head",
".",
"getContents",
"(",
")",
";",
"head",
"=",
"head",
".",
"getNext",
"(",
")",
";",
"count",
"--",
";"... | attempt to retrieve message from queue head | [
"attempt",
"to",
"retrieve",
"message",
"from",
"queue",
"head"
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/GenericQueue.java#L141-L156 |
130,915 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java | OtpErlangBitstr.size | public int size() {
if (pad_bits == 0) {
return bin.length;
}
if (bin.length == 0) {
throw new java.lang.IllegalStateException("Impossible length");
}
return bin.length - 1;
} | java | public int size() {
if (pad_bits == 0) {
return bin.length;
}
if (bin.length == 0) {
throw new java.lang.IllegalStateException("Impossible length");
}
return bin.length - 1;
} | [
"public",
"int",
"size",
"(",
")",
"{",
"if",
"(",
"pad_bits",
"==",
"0",
")",
"{",
"return",
"bin",
".",
"length",
";",
"}",
"if",
"(",
"bin",
".",
"length",
"==",
"0",
")",
"{",
"throw",
"new",
"java",
".",
"lang",
".",
"IllegalStateException",
... | Get the size in whole bytes of the bitstr, rest bits in the last byte not
counted.
@return the number of bytes contained in the bintstr. | [
"Get",
"the",
"size",
"in",
"whole",
"bytes",
"of",
"the",
"bitstr",
"rest",
"bits",
"in",
"the",
"last",
"byte",
"not",
"counted",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangBitstr.java#L170-L178 |
130,916 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpSelf.java | OtpSelf.unPublishPort | public void unPublishPort() {
// unregister with epmd
OtpEpmd.unPublishPort(this);
// close the local descriptor (if we have one)
try {
if (super.epmd != null) {
super.epmd.close();
}
} catch (final IOException e) {/* ignore close errors *... | java | public void unPublishPort() {
// unregister with epmd
OtpEpmd.unPublishPort(this);
// close the local descriptor (if we have one)
try {
if (super.epmd != null) {
super.epmd.close();
}
} catch (final IOException e) {/* ignore close errors *... | [
"public",
"void",
"unPublishPort",
"(",
")",
"{",
"// unregister with epmd",
"OtpEpmd",
".",
"unPublishPort",
"(",
"this",
")",
";",
"// close the local descriptor (if we have one)",
"try",
"{",
"if",
"(",
"super",
".",
"epmd",
"!=",
"null",
")",
"{",
"super",
"... | Unregister the server node's name and port number from the Erlang port
mapper, thus preventing any new connections from remote nodes. | [
"Unregister",
"the",
"server",
"node",
"s",
"name",
"and",
"port",
"number",
"from",
"the",
"Erlang",
"port",
"mapper",
"thus",
"preventing",
"any",
"new",
"connections",
"from",
"remote",
"nodes",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpSelf.java#L259-L271 |
130,917 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpSelf.java | OtpSelf.accept | public OtpConnection accept() throws IOException, OtpAuthException {
OtpTransport newsock = null;
while (true) {
try {
newsock = sock.accept();
return new OtpConnection(this, newsock);
} catch (final IOException e) {
try {
... | java | public OtpConnection accept() throws IOException, OtpAuthException {
OtpTransport newsock = null;
while (true) {
try {
newsock = sock.accept();
return new OtpConnection(this, newsock);
} catch (final IOException e) {
try {
... | [
"public",
"OtpConnection",
"accept",
"(",
")",
"throws",
"IOException",
",",
"OtpAuthException",
"{",
"OtpTransport",
"newsock",
"=",
"null",
";",
"while",
"(",
"true",
")",
"{",
"try",
"{",
"newsock",
"=",
"sock",
".",
"accept",
"(",
")",
";",
"return",
... | Accept an incoming connection from a remote node. A call to this method
will block until an incoming connection is at least attempted.
@return a connection to a remote node.
@exception java.io.IOException
if a remote node attempted to connect but no common
protocol was found.
@exception OtpAuthException
if a remote ... | [
"Accept",
"an",
"incoming",
"connection",
"from",
"a",
"remote",
"node",
".",
"A",
"call",
"to",
"this",
"method",
"will",
"block",
"until",
"an",
"incoming",
"connection",
"is",
"at",
"least",
"attempted",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpSelf.java#L287-L304 |
130,918 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpPeer.java | OtpPeer.connect | @Deprecated
public OtpConnection connect(final OtpSelf self) throws IOException,
UnknownHostException, OtpAuthException {
return new OtpConnection(self, this);
} | java | @Deprecated
public OtpConnection connect(final OtpSelf self) throws IOException,
UnknownHostException, OtpAuthException {
return new OtpConnection(self, this);
} | [
"@",
"Deprecated",
"public",
"OtpConnection",
"connect",
"(",
"final",
"OtpSelf",
"self",
")",
"throws",
"IOException",
",",
"UnknownHostException",
",",
"OtpAuthException",
"{",
"return",
"new",
"OtpConnection",
"(",
"self",
",",
"this",
")",
";",
"}"
] | Create a connection to a remote node.
@param self
the local node from which you wish to connect.
@return a connection to the remote node.
@exception java.net.UnknownHostException
if the remote host could not be found.
@exception java.io.IOException
if it was not possible to connect to the remote node.
@exception O... | [
"Create",
"a",
"connection",
"to",
"a",
"remote",
"node",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpPeer.java#L82-L86 |
130,919 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write4BE | public void write4BE(final long n) {
write((byte) ((n & 0xff000000) >> 24));
write((byte) ((n & 0xff0000) >> 16));
write((byte) ((n & 0xff00) >> 8));
write((byte) (n & 0xff));
} | java | public void write4BE(final long n) {
write((byte) ((n & 0xff000000) >> 24));
write((byte) ((n & 0xff0000) >> 16));
write((byte) ((n & 0xff00) >> 8));
write((byte) (n & 0xff));
} | [
"public",
"void",
"write4BE",
"(",
"final",
"long",
"n",
")",
"{",
"write",
"(",
"(",
"byte",
")",
"(",
"(",
"n",
"&",
"0xff000000",
")",
">>",
"24",
")",
")",
";",
"write",
"(",
"(",
"byte",
")",
"(",
"(",
"n",
"&",
"0xff0000",
")",
">>",
"1... | Write the low four bytes of a value to the stream in big endian order.
@param n
the value to use. | [
"Write",
"the",
"low",
"four",
"bytes",
"of",
"a",
"value",
"to",
"the",
"stream",
"in",
"big",
"endian",
"order",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L281-L286 |
130,920 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.writeLE | public void writeLE(final long n, final int b) {
long v = n;
for (int i = 0; i < b; i++) {
write((byte) (v & 0xff));
v >>= 8;
}
} | java | public void writeLE(final long n, final int b) {
long v = n;
for (int i = 0; i < b; i++) {
write((byte) (v & 0xff));
v >>= 8;
}
} | [
"public",
"void",
"writeLE",
"(",
"final",
"long",
"n",
",",
"final",
"int",
"b",
")",
"{",
"long",
"v",
"=",
"n",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"b",
";",
"i",
"++",
")",
"{",
"write",
"(",
"(",
"byte",
")",
"(",
"... | Write any number of bytes in little endian format.
@param n
the value to use.
@param b
the number of bytes to write from the little end. | [
"Write",
"any",
"number",
"of",
"bytes",
"in",
"little",
"endian",
"format",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L314-L320 |
130,921 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write4LE | public void write4LE(final long n) {
write((byte) (n & 0xff));
write((byte) ((n & 0xff00) >> 8));
write((byte) ((n & 0xff0000) >> 16));
write((byte) ((n & 0xff000000) >> 24));
} | java | public void write4LE(final long n) {
write((byte) (n & 0xff));
write((byte) ((n & 0xff00) >> 8));
write((byte) ((n & 0xff0000) >> 16));
write((byte) ((n & 0xff000000) >> 24));
} | [
"public",
"void",
"write4LE",
"(",
"final",
"long",
"n",
")",
"{",
"write",
"(",
"(",
"byte",
")",
"(",
"n",
"&",
"0xff",
")",
")",
";",
"write",
"(",
"(",
"byte",
")",
"(",
"(",
"n",
"&",
"0xff00",
")",
">>",
"8",
")",
")",
";",
"write",
"... | Write the low four bytes of a value to the stream in little endian order.
@param n
the value to use. | [
"Write",
"the",
"low",
"four",
"bytes",
"of",
"a",
"value",
"to",
"the",
"stream",
"in",
"little",
"endian",
"order",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L339-L344 |
130,922 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write8LE | public void write8LE(final long n) {
write((byte) (n & 0xff));
write((byte) (n >> 8 & 0xff));
write((byte) (n >> 16 & 0xff));
write((byte) (n >> 24 & 0xff));
write((byte) (n >> 32 & 0xff));
write((byte) (n >> 40 & 0xff));
write((byte) (n >> 48 & 0xff));
wr... | java | public void write8LE(final long n) {
write((byte) (n & 0xff));
write((byte) (n >> 8 & 0xff));
write((byte) (n >> 16 & 0xff));
write((byte) (n >> 24 & 0xff));
write((byte) (n >> 32 & 0xff));
write((byte) (n >> 40 & 0xff));
write((byte) (n >> 48 & 0xff));
wr... | [
"public",
"void",
"write8LE",
"(",
"final",
"long",
"n",
")",
"{",
"write",
"(",
"(",
"byte",
")",
"(",
"n",
"&",
"0xff",
")",
")",
";",
"write",
"(",
"(",
"byte",
")",
"(",
"n",
">>",
"8",
"&",
"0xff",
")",
")",
";",
"write",
"(",
"(",
"by... | Write the low eight bytes of a value to the stream in little endian
order.
@param n
the value to use. | [
"Write",
"the",
"low",
"eight",
"bytes",
"of",
"a",
"value",
"to",
"the",
"stream",
"in",
"little",
"endian",
"order",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L353-L362 |
130,923 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.poke4BE | public void poke4BE(final int offset, final long n) {
if (offset < super.count) {
buf[offset + 0] = (byte) ((n & 0xff000000) >> 24);
buf[offset + 1] = (byte) ((n & 0xff0000) >> 16);
buf[offset + 2] = (byte) ((n & 0xff00) >> 8);
buf[offset + 3] = (byte) (n & 0xff);... | java | public void poke4BE(final int offset, final long n) {
if (offset < super.count) {
buf[offset + 0] = (byte) ((n & 0xff000000) >> 24);
buf[offset + 1] = (byte) ((n & 0xff0000) >> 16);
buf[offset + 2] = (byte) ((n & 0xff00) >> 8);
buf[offset + 3] = (byte) (n & 0xff);... | [
"public",
"void",
"poke4BE",
"(",
"final",
"int",
"offset",
",",
"final",
"long",
"n",
")",
"{",
"if",
"(",
"offset",
"<",
"super",
".",
"count",
")",
"{",
"buf",
"[",
"offset",
"+",
"0",
"]",
"=",
"(",
"byte",
")",
"(",
"(",
"n",
"&",
"0xff000... | Write the low four bytes of a value to the stream in bif endian order, at
the specified position. If the position specified is beyond the end of
the stream, this method will have no effect.
Normally this method should be used in conjunction with {@link #size()
size()}, when is is necessary to insert data into the stre... | [
"Write",
"the",
"low",
"four",
"bytes",
"of",
"a",
"value",
"to",
"the",
"stream",
"in",
"bif",
"endian",
"order",
"at",
"the",
"specified",
"position",
".",
"If",
"the",
"position",
"specified",
"is",
"beyond",
"the",
"end",
"of",
"the",
"stream",
"this... | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L388-L395 |
130,924 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_atom | public void write_atom(final String atom) {
String enc_atom;
byte[] bytes;
if (atom.codePointCount(0, atom.length()) <= OtpExternal.maxAtomLength) {
enc_atom = atom;
} else {
/*
* Throwing an exception would be better I think, but truncation
... | java | public void write_atom(final String atom) {
String enc_atom;
byte[] bytes;
if (atom.codePointCount(0, atom.length()) <= OtpExternal.maxAtomLength) {
enc_atom = atom;
} else {
/*
* Throwing an exception would be better I think, but truncation
... | [
"public",
"void",
"write_atom",
"(",
"final",
"String",
"atom",
")",
"{",
"String",
"enc_atom",
";",
"byte",
"[",
"]",
"bytes",
";",
"if",
"(",
"atom",
".",
"codePointCount",
"(",
"0",
",",
"atom",
".",
"length",
"(",
")",
")",
"<=",
"OtpExternal",
"... | Write a string to the stream as an Erlang atom.
@param atom
the string to write. | [
"Write",
"a",
"string",
"to",
"the",
"stream",
"as",
"an",
"Erlang",
"atom",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L403-L440 |
130,925 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_binary | public void write_binary(final byte[] bin) {
write1(OtpExternal.binTag);
write4BE(bin.length);
writeN(bin);
} | java | public void write_binary(final byte[] bin) {
write1(OtpExternal.binTag);
write4BE(bin.length);
writeN(bin);
} | [
"public",
"void",
"write_binary",
"(",
"final",
"byte",
"[",
"]",
"bin",
")",
"{",
"write1",
"(",
"OtpExternal",
".",
"binTag",
")",
";",
"write4BE",
"(",
"bin",
".",
"length",
")",
";",
"writeN",
"(",
"bin",
")",
";",
"}"
] | Write an array of bytes to the stream as an Erlang binary.
@param bin
the array of bytes to write. | [
"Write",
"an",
"array",
"of",
"bytes",
"to",
"the",
"stream",
"as",
"an",
"Erlang",
"binary",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L448-L452 |
130,926 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_bitstr | public void write_bitstr(final byte[] bin, final int pad_bits) {
if (pad_bits == 0) {
write_binary(bin);
return;
}
write1(OtpExternal.bitBinTag);
write4BE(bin.length);
write1(8 - pad_bits);
writeN(bin);
} | java | public void write_bitstr(final byte[] bin, final int pad_bits) {
if (pad_bits == 0) {
write_binary(bin);
return;
}
write1(OtpExternal.bitBinTag);
write4BE(bin.length);
write1(8 - pad_bits);
writeN(bin);
} | [
"public",
"void",
"write_bitstr",
"(",
"final",
"byte",
"[",
"]",
"bin",
",",
"final",
"int",
"pad_bits",
")",
"{",
"if",
"(",
"pad_bits",
"==",
"0",
")",
"{",
"write_binary",
"(",
"bin",
")",
";",
"return",
";",
"}",
"write1",
"(",
"OtpExternal",
".... | Write an array of bytes to the stream as an Erlang bitstr.
@param bin
the array of bytes to write.
@param pad_bits
the number of zero pad bits at the low end of the last byte | [
"Write",
"an",
"array",
"of",
"bytes",
"to",
"the",
"stream",
"as",
"an",
"Erlang",
"bitstr",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L462-L471 |
130,927 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_tuple_head | public void write_tuple_head(final int arity) {
if (arity < 0xff) {
write1(OtpExternal.smallTupleTag);
write1(arity);
} else {
write1(OtpExternal.largeTupleTag);
write4BE(arity);
}
} | java | public void write_tuple_head(final int arity) {
if (arity < 0xff) {
write1(OtpExternal.smallTupleTag);
write1(arity);
} else {
write1(OtpExternal.largeTupleTag);
write4BE(arity);
}
} | [
"public",
"void",
"write_tuple_head",
"(",
"final",
"int",
"arity",
")",
"{",
"if",
"(",
"arity",
"<",
"0xff",
")",
"{",
"write1",
"(",
"OtpExternal",
".",
"smallTupleTag",
")",
";",
"write1",
"(",
"arity",
")",
";",
"}",
"else",
"{",
"write1",
"(",
... | Write an Erlang tuple header to the stream. After calling this method,
you must write 'arity' elements to the stream or it will not be possible
to decode it later.
@param arity
the number of elements in the tuple. | [
"Write",
"an",
"Erlang",
"tuple",
"header",
"to",
"the",
"stream",
".",
"After",
"calling",
"this",
"method",
"you",
"must",
"write",
"arity",
"elements",
"to",
"the",
"stream",
"or",
"it",
"will",
"not",
"be",
"possible",
"to",
"decode",
"it",
"later",
... | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L686-L694 |
130,928 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_ref | public void write_ref(final String node, final int id, final int creation) {
/* Always encode as an extended reference; all
participating parties are now expected to be
able to decode extended references. */
int ids[] = new int[1];
ids[0] = id;
write_ref(node, ids, creation);
} | java | public void write_ref(final String node, final int id, final int creation) {
/* Always encode as an extended reference; all
participating parties are now expected to be
able to decode extended references. */
int ids[] = new int[1];
ids[0] = id;
write_ref(node, ids, creation);
} | [
"public",
"void",
"write_ref",
"(",
"final",
"String",
"node",
",",
"final",
"int",
"id",
",",
"final",
"int",
"creation",
")",
"{",
"/* Always encode as an extended reference; all\n\t participating parties are now expected to be\n\t able to decode extended references. */",
"... | Write an old style Erlang ref to the stream.
@param node
the nodename.
@param id
an arbitrary number. Only the low order 18 bits will be used.
@param creation
another arbitrary number. | [
"Write",
"an",
"old",
"style",
"Erlang",
"ref",
"to",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L802-L809 |
130,929 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_string | public void write_string(final String s) {
final int len = s.length();
switch (len) {
case 0:
write_nil();
break;
default:
if (len <= 65535 && is8bitString(s)) { // 8-bit string
try {
final byte[] bytebuf = s.getByt... | java | public void write_string(final String s) {
final int len = s.length();
switch (len) {
case 0:
write_nil();
break;
default:
if (len <= 65535 && is8bitString(s)) { // 8-bit string
try {
final byte[] bytebuf = s.getByt... | [
"public",
"void",
"write_string",
"(",
"final",
"String",
"s",
")",
"{",
"final",
"int",
"len",
"=",
"s",
".",
"length",
"(",
")",
";",
"switch",
"(",
"len",
")",
"{",
"case",
"0",
":",
"write_nil",
"(",
")",
";",
"break",
";",
"default",
":",
"i... | Write a string to the stream.
@param s
the string to write. | [
"Write",
"a",
"string",
"to",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L888-L914 |
130,930 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java | OtpOutputStream.write_compressed | public void write_compressed(final OtpErlangObject o, final int level) {
@SuppressWarnings("resource")
final OtpOutputStream oos = new OtpOutputStream(o);
/*
* similar to erts_term_to_binary() in external.c: We don't want to
* compress if compression actually increases the size... | java | public void write_compressed(final OtpErlangObject o, final int level) {
@SuppressWarnings("resource")
final OtpOutputStream oos = new OtpOutputStream(o);
/*
* similar to erts_term_to_binary() in external.c: We don't want to
* compress if compression actually increases the size... | [
"public",
"void",
"write_compressed",
"(",
"final",
"OtpErlangObject",
"o",
",",
"final",
"int",
"level",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"resource\"",
")",
"final",
"OtpOutputStream",
"oos",
"=",
"new",
"OtpOutputStream",
"(",
"o",
")",
";",
"/*\n ... | Write an arbitrary Erlang term to the stream in compressed format.
@param o
the Erlang term to write.
@param level
the compression level (<tt>0..9</tt>) | [
"Write",
"an",
"arbitrary",
"Erlang",
"term",
"to",
"the",
"stream",
"in",
"compressed",
"format",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java#L944-L1015 |
130,931 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java | AbstractNode.setCookie | public String setCookie(final String cookie) {
final String prev = this.cookie;
this.cookie = cookie;
return prev;
} | java | public String setCookie(final String cookie) {
final String prev = this.cookie;
this.cookie = cookie;
return prev;
} | [
"public",
"String",
"setCookie",
"(",
"final",
"String",
"cookie",
")",
"{",
"final",
"String",
"prev",
"=",
"this",
".",
"cookie",
";",
"this",
".",
"cookie",
"=",
"cookie",
";",
"return",
"prev",
";",
"}"
] | Set the authorization cookie used by this node.
@return the previous authorization cookie used by this node. | [
"Set",
"the",
"authorization",
"cookie",
"used",
"by",
"this",
"node",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java#L276-L280 |
130,932 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java | OtpErlangRef.doHashCode | @Override
protected int doHashCode() {
final OtpErlangObject.Hash hash = new OtpErlangObject.Hash(7);
hash.combine(creation, ids[0]);
if (isNewRef()) {
hash.combine(ids[1], ids[2]);
}
return hash.valueOf();
} | java | @Override
protected int doHashCode() {
final OtpErlangObject.Hash hash = new OtpErlangObject.Hash(7);
hash.combine(creation, ids[0]);
if (isNewRef()) {
hash.combine(ids[1], ids[2]);
}
return hash.valueOf();
} | [
"@",
"Override",
"protected",
"int",
"doHashCode",
"(",
")",
"{",
"final",
"OtpErlangObject",
".",
"Hash",
"hash",
"=",
"new",
"OtpErlangObject",
".",
"Hash",
"(",
"7",
")",
";",
"hash",
".",
"combine",
"(",
"creation",
",",
"ids",
"[",
"0",
"]",
")",
... | Compute the hashCode value for a given ref. This function is compatible
with equal.
@return the hashCode of the node. | [
"Compute",
"the",
"hashCode",
"value",
"for",
"a",
"given",
"ref",
".",
"This",
"function",
"is",
"compatible",
"with",
"equal",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangRef.java#L282-L290 |
130,933 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java | OtpConnection.receive | public OtpErlangObject receive() throws IOException, OtpErlangExit,
OtpAuthException {
try {
return receiveMsg().getMsg();
} catch (final OtpErlangDecodeException e) {
close();
throw new IOException(e.getMessage());
}
} | java | public OtpErlangObject receive() throws IOException, OtpErlangExit,
OtpAuthException {
try {
return receiveMsg().getMsg();
} catch (final OtpErlangDecodeException e) {
close();
throw new IOException(e.getMessage());
}
} | [
"public",
"OtpErlangObject",
"receive",
"(",
")",
"throws",
"IOException",
",",
"OtpErlangExit",
",",
"OtpAuthException",
"{",
"try",
"{",
"return",
"receiveMsg",
"(",
")",
".",
"getMsg",
"(",
")",
";",
"}",
"catch",
"(",
"final",
"OtpErlangDecodeException",
"... | Receive a message from a remote process. This method blocks until a valid
message is received or an exception is raised.
<p>
If the remote node sends a message that cannot be decoded properly, the
connection is closed and the method throws an exception.
@return an object containing a single Erlang term.
@exception j... | [
"Receive",
"a",
"message",
"from",
"a",
"remote",
"process",
".",
"This",
"method",
"blocks",
"until",
"a",
"valid",
"message",
"is",
"received",
"or",
"an",
"exception",
"is",
"raised",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java#L150-L158 |
130,934 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java | OtpConnection.receiveMsg | public OtpMsg receiveMsg() throws IOException, OtpErlangExit,
OtpAuthException {
final Object o = queue.get();
if (o instanceof OtpMsg) {
return (OtpMsg) o;
} else if (o instanceof IOException) {
throw (IOException) o;
} else if (o instanceof OtpErlan... | java | public OtpMsg receiveMsg() throws IOException, OtpErlangExit,
OtpAuthException {
final Object o = queue.get();
if (o instanceof OtpMsg) {
return (OtpMsg) o;
} else if (o instanceof IOException) {
throw (IOException) o;
} else if (o instanceof OtpErlan... | [
"public",
"OtpMsg",
"receiveMsg",
"(",
")",
"throws",
"IOException",
",",
"OtpErlangExit",
",",
"OtpAuthException",
"{",
"final",
"Object",
"o",
"=",
"queue",
".",
"get",
"(",
")",
";",
"if",
"(",
"o",
"instanceof",
"OtpMsg",
")",
"{",
"return",
"(",
"Ot... | Receive a messge complete with sender and recipient information.
@return an {@link OtpMsg OtpMsg} containing the header information about
the sender and recipient, as well as the actual message contents.
@exception java.io.IOException
if the connection is not active or a communication error
occurs.
@exception OtpErl... | [
"Receive",
"a",
"messge",
"complete",
"with",
"sender",
"and",
"recipient",
"information",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java#L284-L299 |
130,935 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java | OtpConnection.send | @SuppressWarnings("resource")
public void send(final OtpErlangPid dest, final OtpErlangObject msg)
throws IOException {
// encode and send the message
super.sendBuf(self.pid(), dest, new OtpOutputStream(msg));
} | java | @SuppressWarnings("resource")
public void send(final OtpErlangPid dest, final OtpErlangObject msg)
throws IOException {
// encode and send the message
super.sendBuf(self.pid(), dest, new OtpOutputStream(msg));
} | [
"@",
"SuppressWarnings",
"(",
"\"resource\"",
")",
"public",
"void",
"send",
"(",
"final",
"OtpErlangPid",
"dest",
",",
"final",
"OtpErlangObject",
"msg",
")",
"throws",
"IOException",
"{",
"// encode and send the message",
"super",
".",
"sendBuf",
"(",
"self",
".... | Send a message to a process on a remote node.
@param dest
the Erlang PID of the remote process.
@param msg
the message to send.
@exception java.io.IOException
if the connection is not active or a communication error
occurs. | [
"Send",
"a",
"message",
"to",
"a",
"process",
"on",
"a",
"remote",
"node",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java#L357-L362 |
130,936 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java | OtpConnection.sendBuf | public void sendBuf(final OtpErlangPid dest, final OtpOutputStream payload)
throws IOException {
super.sendBuf(self.pid(), dest, payload);
} | java | public void sendBuf(final OtpErlangPid dest, final OtpOutputStream payload)
throws IOException {
super.sendBuf(self.pid(), dest, payload);
} | [
"public",
"void",
"sendBuf",
"(",
"final",
"OtpErlangPid",
"dest",
",",
"final",
"OtpOutputStream",
"payload",
")",
"throws",
"IOException",
"{",
"super",
".",
"sendBuf",
"(",
"self",
".",
"pid",
"(",
")",
",",
"dest",
",",
"payload",
")",
";",
"}"
] | Send a pre-encoded message to a process on a remote node.
@param dest
the Erlang PID of the remote process.
@param payload
the encoded message to send.
@exception java.io.IOException
if the connection is not active or a communication error
occurs. | [
"Send",
"a",
"pre",
"-",
"encoded",
"message",
"to",
"a",
"process",
"on",
"a",
"remote",
"node",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpConnection.java#L412-L415 |
130,937 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.bitLength | public int bitLength() {
if (bigVal != null) {
return bigVal.bitLength();
}
if (val == 0 || val == -1) {
return 0;
}
// Binary search for bit length
int i = 32; // mask length
long m = (1L << i) - 1; // AND mask with ones in little end
... | java | public int bitLength() {
if (bigVal != null) {
return bigVal.bitLength();
}
if (val == 0 || val == -1) {
return 0;
}
// Binary search for bit length
int i = 32; // mask length
long m = (1L << i) - 1; // AND mask with ones in little end
... | [
"public",
"int",
"bitLength",
"(",
")",
"{",
"if",
"(",
"bigVal",
"!=",
"null",
")",
"{",
"return",
"bigVal",
".",
"bitLength",
"(",
")",
";",
"}",
"if",
"(",
"val",
"==",
"0",
"||",
"val",
"==",
"-",
"1",
")",
"{",
"return",
"0",
";",
"}",
"... | Returns the number of bits in the minimal two's-complement representation
of this BigInteger, excluding a sign bit.
@return number of bits in the minimal two's-complement representation of
this BigInteger, excluding a sign bit. | [
"Returns",
"the",
"number",
"of",
"bits",
"in",
"the",
"minimal",
"two",
"s",
"-",
"complement",
"representation",
"of",
"this",
"BigInteger",
"excluding",
"a",
"sign",
"bit",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L153-L192 |
130,938 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.intValue | public int intValue() throws OtpErlangRangeException {
final long l = longValue();
final int i = (int) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for int: " + val);
}
return i;
} | java | public int intValue() throws OtpErlangRangeException {
final long l = longValue();
final int i = (int) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for int: " + val);
}
return i;
} | [
"public",
"int",
"intValue",
"(",
")",
"throws",
"OtpErlangRangeException",
"{",
"final",
"long",
"l",
"=",
"longValue",
"(",
")",
";",
"final",
"int",
"i",
"=",
"(",
"int",
")",
"l",
";",
"if",
"(",
"i",
"!=",
"l",
")",
"{",
"throw",
"new",
"OtpEr... | Get this number as an int.
@return the value of this number, as an int.
@exception OtpErlangRangeException
if the value is too large to be represented as an int. | [
"Get",
"this",
"number",
"as",
"an",
"int",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L214-L223 |
130,939 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.uIntValue | public int uIntValue() throws OtpErlangRangeException {
final long l = longValue();
final int i = (int) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for int: " + val);
} else if (i < 0) {
throw new OtpErlangRangeException("Value not positiv... | java | public int uIntValue() throws OtpErlangRangeException {
final long l = longValue();
final int i = (int) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for int: " + val);
} else if (i < 0) {
throw new OtpErlangRangeException("Value not positiv... | [
"public",
"int",
"uIntValue",
"(",
")",
"throws",
"OtpErlangRangeException",
"{",
"final",
"long",
"l",
"=",
"longValue",
"(",
")",
";",
"final",
"int",
"i",
"=",
"(",
"int",
")",
"l",
";",
"if",
"(",
"i",
"!=",
"l",
")",
"{",
"throw",
"new",
"OtpE... | Get this number as a non-negative int.
@return the value of this number, as an int.
@exception OtpErlangRangeException
if the value is too large to be represented as an int, or
if the value is negative. | [
"Get",
"this",
"number",
"as",
"a",
"non",
"-",
"negative",
"int",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L234-L245 |
130,940 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.shortValue | public short shortValue() throws OtpErlangRangeException {
final long l = longValue();
final short i = (short) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for short: "
+ val);
}
return i;
} | java | public short shortValue() throws OtpErlangRangeException {
final long l = longValue();
final short i = (short) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for short: "
+ val);
}
return i;
} | [
"public",
"short",
"shortValue",
"(",
")",
"throws",
"OtpErlangRangeException",
"{",
"final",
"long",
"l",
"=",
"longValue",
"(",
")",
";",
"final",
"short",
"i",
"=",
"(",
"short",
")",
"l",
";",
"if",
"(",
"i",
"!=",
"l",
")",
"{",
"throw",
"new",
... | Get this number as a short.
@return the value of this number, as a short.
@exception OtpErlangRangeException
if the value is too large to be represented as a short. | [
"Get",
"this",
"number",
"as",
"a",
"short",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L255-L265 |
130,941 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.uShortValue | public short uShortValue() throws OtpErlangRangeException {
final long l = longValue();
final short i = (short) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for short: "
+ val);
} else if (i < 0) {
throw new OtpErlangRan... | java | public short uShortValue() throws OtpErlangRangeException {
final long l = longValue();
final short i = (short) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for short: "
+ val);
} else if (i < 0) {
throw new OtpErlangRan... | [
"public",
"short",
"uShortValue",
"(",
")",
"throws",
"OtpErlangRangeException",
"{",
"final",
"long",
"l",
"=",
"longValue",
"(",
")",
";",
"final",
"short",
"i",
"=",
"(",
"short",
")",
"l",
";",
"if",
"(",
"i",
"!=",
"l",
")",
"{",
"throw",
"new",... | Get this number as a non-negative short.
@return the value of this number, as a short.
@exception OtpErlangRangeException
if the value is too large to be represented as a short, or
if the value is negative. | [
"Get",
"this",
"number",
"as",
"a",
"non",
"-",
"negative",
"short",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L276-L288 |
130,942 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.charValue | public char charValue() throws OtpErlangRangeException {
final long l = longValue();
final char i = (char) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for char: "
+ val);
}
return i;
} | java | public char charValue() throws OtpErlangRangeException {
final long l = longValue();
final char i = (char) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for char: "
+ val);
}
return i;
} | [
"public",
"char",
"charValue",
"(",
")",
"throws",
"OtpErlangRangeException",
"{",
"final",
"long",
"l",
"=",
"longValue",
"(",
")",
";",
"final",
"char",
"i",
"=",
"(",
"char",
")",
"l",
";",
"if",
"(",
"i",
"!=",
"l",
")",
"{",
"throw",
"new",
"O... | Get this number as a char.
@return the char value of this number.
@exception OtpErlangRangeException
if the value is too large to be represented as a char. | [
"Get",
"this",
"number",
"as",
"a",
"char",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L298-L308 |
130,943 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.byteValue | public byte byteValue() throws OtpErlangRangeException {
final long l = longValue();
final byte i = (byte) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for byte: "
+ val);
}
return i;
} | java | public byte byteValue() throws OtpErlangRangeException {
final long l = longValue();
final byte i = (byte) l;
if (i != l) {
throw new OtpErlangRangeException("Value too large for byte: "
+ val);
}
return i;
} | [
"public",
"byte",
"byteValue",
"(",
")",
"throws",
"OtpErlangRangeException",
"{",
"final",
"long",
"l",
"=",
"longValue",
"(",
")",
";",
"final",
"byte",
"i",
"=",
"(",
"byte",
")",
"l",
";",
"if",
"(",
"i",
"!=",
"l",
")",
"{",
"throw",
"new",
"O... | Get this number as a byte.
@return the byte value of this number.
@exception OtpErlangRangeException
if the value is too large to be represented as a byte. | [
"Get",
"this",
"number",
"as",
"a",
"byte",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L318-L328 |
130,944 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java | OtpErlangLong.encode | @Override
public void encode(final OtpOutputStream buf) {
if (bigVal != null) {
buf.write_big_integer(bigVal);
} else {
buf.write_long(val);
}
} | java | @Override
public void encode(final OtpOutputStream buf) {
if (bigVal != null) {
buf.write_big_integer(bigVal);
} else {
buf.write_long(val);
}
} | [
"@",
"Override",
"public",
"void",
"encode",
"(",
"final",
"OtpOutputStream",
"buf",
")",
"{",
"if",
"(",
"bigVal",
"!=",
"null",
")",
"{",
"buf",
".",
"write_big_integer",
"(",
"bigVal",
")",
";",
"}",
"else",
"{",
"buf",
".",
"write_long",
"(",
"val"... | Convert this number to the equivalent Erlang external representation.
@param buf
an output stream to which the encoded number should be
written. | [
"Convert",
"this",
"number",
"to",
"the",
"equivalent",
"Erlang",
"external",
"representation",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangLong.java#L350-L357 |
130,945 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java | OtpNode.closeMbox | public void closeMbox(final OtpMbox mbox, final OtpErlangObject reason) {
if (mbox != null) {
mboxes.remove(mbox);
mbox.name = null;
mbox.breakLinks(reason);
}
} | java | public void closeMbox(final OtpMbox mbox, final OtpErlangObject reason) {
if (mbox != null) {
mboxes.remove(mbox);
mbox.name = null;
mbox.breakLinks(reason);
}
} | [
"public",
"void",
"closeMbox",
"(",
"final",
"OtpMbox",
"mbox",
",",
"final",
"OtpErlangObject",
"reason",
")",
"{",
"if",
"(",
"mbox",
"!=",
"null",
")",
"{",
"mboxes",
".",
"remove",
"(",
"mbox",
")",
";",
"mbox",
".",
"name",
"=",
"null",
";",
"mb... | Close the specified mailbox with the given reason.
@param mbox
the mailbox to close.
@param reason
an Erlang term describing the reason for the termination.
<p>
After this operation, the mailbox will no longer be able to
receive messages. Any delivered but as yet unretrieved
messages can still be retrieved however.
<... | [
"Close",
"the",
"specified",
"mailbox",
"with",
"the",
"given",
"reason",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java#L320-L326 |
130,946 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java | OtpErlangAtom.atomNeedsQuoting | private boolean atomNeedsQuoting(final String s) {
char c;
if (s.length() == 0) {
return true;
}
if (!isErlangLower(s.charAt(0))) {
return true;
}
final int len = s.length();
for (int i = 1; i < len; i++) {
c = s.charAt(i);
... | java | private boolean atomNeedsQuoting(final String s) {
char c;
if (s.length() == 0) {
return true;
}
if (!isErlangLower(s.charAt(0))) {
return true;
}
final int len = s.length();
for (int i = 1; i < len; i++) {
c = s.charAt(i);
... | [
"private",
"boolean",
"atomNeedsQuoting",
"(",
"final",
"String",
"s",
")",
"{",
"char",
"c",
";",
"if",
"(",
"s",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"return",
"true",
";",
"}",
"if",
"(",
"!",
"isErlangLower",
"(",
"s",
".",
"charAt",
... | true if the atom should be displayed with quotation marks | [
"true",
"if",
"the",
"atom",
"should",
"be",
"displayed",
"with",
"quotation",
"marks"
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangAtom.java#L176-L195 |
130,947 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java | OtpErlangTuple.encode | @Override
public void encode(final OtpOutputStream buf) {
final int arity = elems.length;
buf.write_tuple_head(arity);
for (int i = 0; i < arity; i++) {
buf.write_any(elems[i]);
}
} | java | @Override
public void encode(final OtpOutputStream buf) {
final int arity = elems.length;
buf.write_tuple_head(arity);
for (int i = 0; i < arity; i++) {
buf.write_any(elems[i]);
}
} | [
"@",
"Override",
"public",
"void",
"encode",
"(",
"final",
"OtpOutputStream",
"buf",
")",
"{",
"final",
"int",
"arity",
"=",
"elems",
".",
"length",
";",
"buf",
".",
"write_tuple_head",
"(",
"arity",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"... | Convert this tuple to the equivalent Erlang external representation.
@param buf
an output stream to which the encoded tuple should be written. | [
"Convert",
"this",
"tuple",
"to",
"the",
"equivalent",
"Erlang",
"external",
"representation",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java#L196-L205 |
130,948 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java | OtpErlangString.stringToCodePoints | public static int[] stringToCodePoints(final String s) {
final int m = s.codePointCount(0, s.length());
final int[] codePoints = new int[m];
int j = 0;
for (int offset = 0; offset < s.length();) {
final int codepoint = s.codePointAt(offset);
codePoints[j++] = code... | java | public static int[] stringToCodePoints(final String s) {
final int m = s.codePointCount(0, s.length());
final int[] codePoints = new int[m];
int j = 0;
for (int offset = 0; offset < s.length();) {
final int codepoint = s.codePointAt(offset);
codePoints[j++] = code... | [
"public",
"static",
"int",
"[",
"]",
"stringToCodePoints",
"(",
"final",
"String",
"s",
")",
"{",
"final",
"int",
"m",
"=",
"s",
".",
"codePointCount",
"(",
"0",
",",
"s",
".",
"length",
"(",
")",
")",
";",
"final",
"int",
"[",
"]",
"codePoints",
"... | Create Unicode code points from a String.
@param s
a String to convert to an Unicode code point array
@return the corresponding array of integers representing Unicode code
points | [
"Create",
"Unicode",
"code",
"points",
"from",
"a",
"String",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangString.java#L153-L163 |
130,949 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java | OtpErlangMap.encode | @Override
public void encode(final OtpOutputStream buf) {
final int arity = arity();
buf.write_map_head(arity);
for (final Map.Entry<OtpErlangObject, OtpErlangObject> e : entrySet()) {
buf.write_any(e.getKey());
buf.write_any(e.getValue());
}
} | java | @Override
public void encode(final OtpOutputStream buf) {
final int arity = arity();
buf.write_map_head(arity);
for (final Map.Entry<OtpErlangObject, OtpErlangObject> e : entrySet()) {
buf.write_any(e.getKey());
buf.write_any(e.getValue());
}
} | [
"@",
"Override",
"public",
"void",
"encode",
"(",
"final",
"OtpOutputStream",
"buf",
")",
"{",
"final",
"int",
"arity",
"=",
"arity",
"(",
")",
";",
"buf",
".",
"write_map_head",
"(",
"arity",
")",
";",
"for",
"(",
"final",
"Map",
".",
"Entry",
"<",
... | Convert this map to the equivalent Erlang external representation.
@param buf
an output stream to which the encoded map should be written. | [
"Convert",
"this",
"map",
"to",
"the",
"equivalent",
"Erlang",
"external",
"representation",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java#L257-L267 |
130,950 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java | AbstractConnection.close | public void close() {
done = true;
connected = false;
synchronized (this) {
try {
if (socket != null) {
if (traceLevel >= ctrlThreshold) {
System.out.println("-> CLOSE");
}
socket.clos... | java | public void close() {
done = true;
connected = false;
synchronized (this) {
try {
if (socket != null) {
if (traceLevel >= ctrlThreshold) {
System.out.println("-> CLOSE");
}
socket.clos... | [
"public",
"void",
"close",
"(",
")",
"{",
"done",
"=",
"true",
";",
"connected",
"=",
"false",
";",
"synchronized",
"(",
"this",
")",
"{",
"try",
"{",
"if",
"(",
"socket",
"!=",
"null",
")",
"{",
"if",
"(",
"traceLevel",
">=",
"ctrlThreshold",
")",
... | Close the connection to the remote node. | [
"Close",
"the",
"connection",
"to",
"the",
"remote",
"node",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java#L786-L802 |
130,951 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java | AbstractConnection.do_send | protected synchronized void do_send(final OtpOutputStream header)
throws IOException {
try {
if (traceLevel >= ctrlThreshold) {
try {
final OtpErlangObject h = header.getOtpInputStream(5)
.read_any();
Sys... | java | protected synchronized void do_send(final OtpOutputStream header)
throws IOException {
try {
if (traceLevel >= ctrlThreshold) {
try {
final OtpErlangObject h = header.getOtpInputStream(5)
.read_any();
Sys... | [
"protected",
"synchronized",
"void",
"do_send",
"(",
"final",
"OtpOutputStream",
"header",
")",
"throws",
"IOException",
"{",
"try",
"{",
"if",
"(",
"traceLevel",
">=",
"ctrlThreshold",
")",
"{",
"try",
"{",
"final",
"OtpErlangObject",
"h",
"=",
"header",
".",... | used by the other message types | [
"used",
"by",
"the",
"other",
"message",
"types"
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java#L854-L872 |
130,952 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java | AbstractConnection.hex0 | static String hex0(final byte x) {
final char tab[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f' };
int uint;
if (x < 0) {
uint = x & 0x7F;
uint |= 1 << 7;
} else {
uint = x;
}
retur... | java | static String hex0(final byte x) {
final char tab[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'a', 'b', 'c', 'd', 'e', 'f' };
int uint;
if (x < 0) {
uint = x & 0x7F;
uint |= 1 << 7;
} else {
uint = x;
}
retur... | [
"static",
"String",
"hex0",
"(",
"final",
"byte",
"x",
")",
"{",
"final",
"char",
"tab",
"[",
"]",
"=",
"{",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
",",
"'",
... | Used to debug print a message digest | [
"Used",
"to",
"debug",
"print",
"a",
"message",
"digest"
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java#L1024-L1035 |
130,953 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java | AbstractConnection.digests_equals | private boolean digests_equals(final byte[] a, final byte[] b) {
int i;
for (i = 0; i < 16; ++i) {
if (a[i] != b[i]) {
return false;
}
}
return true;
} | java | private boolean digests_equals(final byte[] a, final byte[] b) {
int i;
for (i = 0; i < 16; ++i) {
if (a[i] != b[i]) {
return false;
}
}
return true;
} | [
"private",
"boolean",
"digests_equals",
"(",
"final",
"byte",
"[",
"]",
"a",
",",
"final",
"byte",
"[",
"]",
"b",
")",
"{",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"0",
";",
"i",
"<",
"16",
";",
"++",
"i",
")",
"{",
"if",
"(",
"a",
"[",
"i",... | Would use Array.equals in newer JDK... | [
"Would",
"use",
"Array",
".",
"equals",
"in",
"newer",
"JDK",
"..."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractConnection.java#L1250-L1258 |
130,954 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.setPos | public int setPos(final int pos) {
final int oldpos = super.pos;
int apos = pos;
if (pos > super.count) {
apos = super.count;
} else if (pos < 0) {
apos = 0;
}
super.pos = apos;
return oldpos;
} | java | public int setPos(final int pos) {
final int oldpos = super.pos;
int apos = pos;
if (pos > super.count) {
apos = super.count;
} else if (pos < 0) {
apos = 0;
}
super.pos = apos;
return oldpos;
} | [
"public",
"int",
"setPos",
"(",
"final",
"int",
"pos",
")",
"{",
"final",
"int",
"oldpos",
"=",
"super",
".",
"pos",
";",
"int",
"apos",
"=",
"pos",
";",
"if",
"(",
"pos",
">",
"super",
".",
"count",
")",
"{",
"apos",
"=",
"super",
".",
"count",
... | Set the current position in the stream.
@param pos
the position to move to in the stream. If pos indicates a
position beyond the end of the stream, the position is move to
the end of the stream instead. If pos is negative, the
position is moved to the beginning of the stream instead.
@return the previous position in ... | [
"Set",
"the",
"current",
"position",
"in",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L89-L102 |
130,955 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.readN | public int readN(final byte[] abuf, final int off, final int len)
throws OtpErlangDecodeException {
if (len == 0 && available() == 0) {
return 0;
}
final int i = super.read(abuf, off, len);
if (i < 0) {
throw new OtpErlangDecodeException("Cannot read f... | java | public int readN(final byte[] abuf, final int off, final int len)
throws OtpErlangDecodeException {
if (len == 0 && available() == 0) {
return 0;
}
final int i = super.read(abuf, off, len);
if (i < 0) {
throw new OtpErlangDecodeException("Cannot read f... | [
"public",
"int",
"readN",
"(",
"final",
"byte",
"[",
"]",
"abuf",
",",
"final",
"int",
"off",
",",
"final",
"int",
"len",
")",
"throws",
"OtpErlangDecodeException",
"{",
"if",
"(",
"len",
"==",
"0",
"&&",
"available",
"(",
")",
"==",
"0",
")",
"{",
... | Read an array of bytes from the stream. The method reads at most len
bytes from the input stream into offset off of the buffer.
@return the number of bytes read.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"an",
"array",
"of",
"bytes",
"from",
"the",
"stream",
".",
"The",
"method",
"reads",
"at",
"most",
"len",
"bytes",
"from",
"the",
"input",
"stream",
"into",
"offset",
"off",
"of",
"the",
"buffer",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L126-L136 |
130,956 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.peek1 | public int peek1() throws OtpErlangDecodeException {
int i;
try {
i = super.buf[super.pos];
if (i < 0) {
i += 256;
}
return i;
} catch (final Exception e) {
throw new OtpErlangDecodeException("Cannot read from input str... | java | public int peek1() throws OtpErlangDecodeException {
int i;
try {
i = super.buf[super.pos];
if (i < 0) {
i += 256;
}
return i;
} catch (final Exception e) {
throw new OtpErlangDecodeException("Cannot read from input str... | [
"public",
"int",
"peek1",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"i",
";",
"try",
"{",
"i",
"=",
"super",
".",
"buf",
"[",
"super",
".",
"pos",
"]",
";",
"if",
"(",
"i",
"<",
"0",
")",
"{",
"i",
"+=",
"256",
";",
"}",
"retu... | Look ahead one position in the stream without consuming the byte found
there.
@return the next byte in the stream, as an integer.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Look",
"ahead",
"one",
"position",
"in",
"the",
"stream",
"without",
"consuming",
"the",
"byte",
"found",
"there",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L154-L166 |
130,957 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read2BE | public int read2BE() throws OtpErlangDecodeException {
final byte[] b = new byte[2];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[0] << 8 & 0xff00) + (b[1] & 0xff);
... | java | public int read2BE() throws OtpErlangDecodeException {
final byte[] b = new byte[2];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[0] << 8 & 0xff00) + (b[1] & 0xff);
... | [
"public",
"int",
"read2BE",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"byte",
"[",
"]",
"b",
"=",
"new",
"byte",
"[",
"2",
"]",
";",
"try",
"{",
"super",
".",
"read",
"(",
"b",
")",
";",
"}",
"catch",
"(",
"final",
"IOException",
... | Read a two byte big endian integer from the stream.
@return the bytes read, converted from big endian to an integer.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"a",
"two",
"byte",
"big",
"endian",
"integer",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L212-L220 |
130,958 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read4BE | public int read4BE() throws OtpErlangDecodeException {
final byte[] b = new byte[4];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[0] << 24 & 0xff000000) + (b[1] << 16 ... | java | public int read4BE() throws OtpErlangDecodeException {
final byte[] b = new byte[4];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[0] << 24 & 0xff000000) + (b[1] << 16 ... | [
"public",
"int",
"read4BE",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"byte",
"[",
"]",
"b",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"try",
"{",
"super",
".",
"read",
"(",
"b",
")",
";",
"}",
"catch",
"(",
"final",
"IOException",
... | Read a four byte big endian integer from the stream.
@return the bytes read, converted from big endian to an integer.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"a",
"four",
"byte",
"big",
"endian",
"integer",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L230-L239 |
130,959 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read2LE | public int read2LE() throws OtpErlangDecodeException {
final byte[] b = new byte[2];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[1] << 8 & 0xff00) + (b[0] & 0xff);
... | java | public int read2LE() throws OtpErlangDecodeException {
final byte[] b = new byte[2];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[1] << 8 & 0xff00) + (b[0] & 0xff);
... | [
"public",
"int",
"read2LE",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"byte",
"[",
"]",
"b",
"=",
"new",
"byte",
"[",
"2",
"]",
";",
"try",
"{",
"super",
".",
"read",
"(",
"b",
")",
";",
"}",
"catch",
"(",
"final",
"IOException",
... | Read a two byte little endian integer from the stream.
@return the bytes read, converted from little endian to an integer.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"a",
"two",
"byte",
"little",
"endian",
"integer",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L249-L257 |
130,960 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read4LE | public int read4LE() throws OtpErlangDecodeException {
final byte[] b = new byte[4];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[3] << 24 & 0xff000000) + (b[2] << 16 ... | java | public int read4LE() throws OtpErlangDecodeException {
final byte[] b = new byte[4];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
return (b[3] << 24 & 0xff000000) + (b[2] << 16 ... | [
"public",
"int",
"read4LE",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"byte",
"[",
"]",
"b",
"=",
"new",
"byte",
"[",
"4",
"]",
";",
"try",
"{",
"super",
".",
"read",
"(",
"b",
")",
";",
"}",
"catch",
"(",
"final",
"IOException",
... | Read a four byte little endian integer from the stream.
@return the bytes read, converted from little endian to an integer.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"a",
"four",
"byte",
"little",
"endian",
"integer",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L267-L276 |
130,961 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.readLE | public long readLE(final int n) throws OtpErlangDecodeException {
final byte[] b = new byte[n];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
long v = 0;
int i = n;
... | java | public long readLE(final int n) throws OtpErlangDecodeException {
final byte[] b = new byte[n];
try {
super.read(b);
} catch (final IOException e) {
throw new OtpErlangDecodeException("Cannot read from input stream");
}
long v = 0;
int i = n;
... | [
"public",
"long",
"readLE",
"(",
"final",
"int",
"n",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"byte",
"[",
"]",
"b",
"=",
"new",
"byte",
"[",
"n",
"]",
";",
"try",
"{",
"super",
".",
"read",
"(",
"b",
")",
";",
"}",
"catch",
"(",
... | Read a little endian integer from the stream.
@param n
the number of bytes to read
@return the bytes read, converted from little endian to an integer.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"a",
"little",
"endian",
"integer",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L289-L302 |
130,962 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_atom | @SuppressWarnings("fallthrough")
public String read_atom() throws OtpErlangDecodeException {
int tag;
int len = -1;
byte[] strbuf;
String atom;
tag = read1skip_version();
switch (tag) {
case OtpExternal.atomTag:
len = read2BE();
strb... | java | @SuppressWarnings("fallthrough")
public String read_atom() throws OtpErlangDecodeException {
int tag;
int len = -1;
byte[] strbuf;
String atom;
tag = read1skip_version();
switch (tag) {
case OtpExternal.atomTag:
len = read2BE();
strb... | [
"@",
"SuppressWarnings",
"(",
"\"fallthrough\"",
")",
"public",
"String",
"read_atom",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"tag",
";",
"int",
"len",
"=",
"-",
"1",
";",
"byte",
"[",
"]",
"strbuf",
";",
"String",
"atom",
";",
"tag",
... | Read an Erlang atom from the stream.
@return a String containing the value of the atom.
@exception OtpErlangDecodeException
if the next term in the stream is not an atom. | [
"Read",
"an",
"Erlang",
"atom",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L350-L413 |
130,963 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_binary | public byte[] read_binary() throws OtpErlangDecodeException {
int tag;
int len;
byte[] bin;
tag = read1skip_version();
if (tag != OtpExternal.binTag) {
throw new OtpErlangDecodeException(
"Wrong tag encountered, expected " + OtpExternal.binTag
... | java | public byte[] read_binary() throws OtpErlangDecodeException {
int tag;
int len;
byte[] bin;
tag = read1skip_version();
if (tag != OtpExternal.binTag) {
throw new OtpErlangDecodeException(
"Wrong tag encountered, expected " + OtpExternal.binTag
... | [
"public",
"byte",
"[",
"]",
"read_binary",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"tag",
";",
"int",
"len",
";",
"byte",
"[",
"]",
"bin",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"if",
"(",
"tag",
"!=",
"OtpExternal",
"... | Read an Erlang binary from the stream.
@return a byte array containing the value of the binary.
@exception OtpErlangDecodeException
if the next term in the stream is not a binary. | [
"Read",
"an",
"Erlang",
"binary",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L423-L442 |
130,964 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_bitstr | public byte[] read_bitstr(final int pad_bits[])
throws OtpErlangDecodeException {
int tag;
int len;
byte[] bin;
tag = read1skip_version();
if (tag != OtpExternal.bitBinTag) {
throw new OtpErlangDecodeException(
"Wrong tag encountered,... | java | public byte[] read_bitstr(final int pad_bits[])
throws OtpErlangDecodeException {
int tag;
int len;
byte[] bin;
tag = read1skip_version();
if (tag != OtpExternal.bitBinTag) {
throw new OtpErlangDecodeException(
"Wrong tag encountered,... | [
"public",
"byte",
"[",
"]",
"read_bitstr",
"(",
"final",
"int",
"pad_bits",
"[",
"]",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"tag",
";",
"int",
"len",
";",
"byte",
"[",
"]",
"bin",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"i... | Read an Erlang bitstr from the stream.
@param pad_bits
an int array whose first element will be set to the number of
pad bits in the last byte.
@return a byte array containing the value of the bitstr.
@exception OtpErlangDecodeException
if the next term in the stream is not a bitstr. | [
"Read",
"an",
"Erlang",
"bitstr",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L456-L485 |
130,965 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_double | public double read_double() throws OtpErlangDecodeException {
int tag;
// parse the stream
tag = read1skip_version();
switch (tag) {
case OtpExternal.newFloatTag: {
return Double.longBitsToDouble(readBE(8));
}
case OtpExternal.floatTag: {
... | java | public double read_double() throws OtpErlangDecodeException {
int tag;
// parse the stream
tag = read1skip_version();
switch (tag) {
case OtpExternal.newFloatTag: {
return Double.longBitsToDouble(readBE(8));
}
case OtpExternal.floatTag: {
... | [
"public",
"double",
"read_double",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"tag",
";",
"// parse the stream",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"OtpExternal",
".",
"newFloatTag",
":",
"{... | Read an Erlang float from the stream.
@return the float value, as a double.
@exception OtpErlangDecodeException
if the next term in the stream is not a float. | [
"Read",
"an",
"Erlang",
"float",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L508-L555 |
130,966 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_byte | public byte read_byte() throws OtpErlangDecodeException {
final long l = this.read_long(false);
final byte i = (byte) l;
if (l != i) {
throw new OtpErlangDecodeException("Value does not fit in byte: "
+ l);
}
return i;
} | java | public byte read_byte() throws OtpErlangDecodeException {
final long l = this.read_long(false);
final byte i = (byte) l;
if (l != i) {
throw new OtpErlangDecodeException("Value does not fit in byte: "
+ l);
}
return i;
} | [
"public",
"byte",
"read_byte",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"long",
"l",
"=",
"this",
".",
"read_long",
"(",
"false",
")",
";",
"final",
"byte",
"i",
"=",
"(",
"byte",
")",
"l",
";",
"if",
"(",
"l",
"!=",
"i",
")",
... | Read one byte from the stream.
@return the byte read.
@exception OtpErlangDecodeException
if the next byte cannot be read. | [
"Read",
"one",
"byte",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L565-L575 |
130,967 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_char | public char read_char() throws OtpErlangDecodeException {
final long l = this.read_long(true);
final char i = (char) l;
if (l != (i & 0xffffL)) {
throw new OtpErlangDecodeException("Value does not fit in char: "
+ l);
}
return i;
} | java | public char read_char() throws OtpErlangDecodeException {
final long l = this.read_long(true);
final char i = (char) l;
if (l != (i & 0xffffL)) {
throw new OtpErlangDecodeException("Value does not fit in char: "
+ l);
}
return i;
} | [
"public",
"char",
"read_char",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"long",
"l",
"=",
"this",
".",
"read_long",
"(",
"true",
")",
";",
"final",
"char",
"i",
"=",
"(",
"char",
")",
"l",
";",
"if",
"(",
"l",
"!=",
"(",
"i",
"... | Read a character from the stream.
@return the character value.
@exception OtpErlangDecodeException
if the next term in the stream is not an integer that can
be represented as a char. | [
"Read",
"a",
"character",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L586-L596 |
130,968 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_uint | public int read_uint() throws OtpErlangDecodeException {
final long l = this.read_long(true);
final int i = (int) l;
if (l != (i & 0xFFFFffffL)) {
throw new OtpErlangDecodeException("Value does not fit in uint: "
+ l);
}
return i;
} | java | public int read_uint() throws OtpErlangDecodeException {
final long l = this.read_long(true);
final int i = (int) l;
if (l != (i & 0xFFFFffffL)) {
throw new OtpErlangDecodeException("Value does not fit in uint: "
+ l);
}
return i;
} | [
"public",
"int",
"read_uint",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"long",
"l",
"=",
"this",
".",
"read_long",
"(",
"true",
")",
";",
"final",
"int",
"i",
"=",
"(",
"int",
")",
"l",
";",
"if",
"(",
"l",
"!=",
"(",
"i",
"&",... | Read an unsigned integer from the stream.
@return the integer value.
@exception OtpErlangDecodeException
if the next term in the stream cannot be represented as a
positive integer. | [
"Read",
"an",
"unsigned",
"integer",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L607-L617 |
130,969 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_ushort | public short read_ushort() throws OtpErlangDecodeException {
final long l = this.read_long(true);
final short i = (short) l;
if (l != (i & 0xffffL)) {
throw new OtpErlangDecodeException("Value does not fit in ushort: "
+ l);
}
return i;
} | java | public short read_ushort() throws OtpErlangDecodeException {
final long l = this.read_long(true);
final short i = (short) l;
if (l != (i & 0xffffL)) {
throw new OtpErlangDecodeException("Value does not fit in ushort: "
+ l);
}
return i;
} | [
"public",
"short",
"read_ushort",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"long",
"l",
"=",
"this",
".",
"read_long",
"(",
"true",
")",
";",
"final",
"short",
"i",
"=",
"(",
"short",
")",
"l",
";",
"if",
"(",
"l",
"!=",
"(",
"i"... | Read an unsigned short from the stream.
@return the short value.
@exception OtpErlangDecodeException
if the next term in the stream cannot be represented as a
positive short. | [
"Read",
"an",
"unsigned",
"short",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L649-L659 |
130,970 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_short | public short read_short() throws OtpErlangDecodeException {
final long l = this.read_long(false);
final short i = (short) l;
if (l != i) {
throw new OtpErlangDecodeException("Value does not fit in short: "
+ l);
}
return i;
} | java | public short read_short() throws OtpErlangDecodeException {
final long l = this.read_long(false);
final short i = (short) l;
if (l != i) {
throw new OtpErlangDecodeException("Value does not fit in short: "
+ l);
}
return i;
} | [
"public",
"short",
"read_short",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"long",
"l",
"=",
"this",
".",
"read_long",
"(",
"false",
")",
";",
"final",
"short",
"i",
"=",
"(",
"short",
")",
"l",
";",
"if",
"(",
"l",
"!=",
"i",
")"... | Read a short from the stream.
@return the short value.
@exception OtpErlangDecodeException
if the next term in the stream cannot be represented as a
short. | [
"Read",
"a",
"short",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L670-L680 |
130,971 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_list_head | public int read_list_head() throws OtpErlangDecodeException {
int arity = 0;
final int tag = read1skip_version();
switch (tag) {
case OtpExternal.nilTag:
arity = 0;
break;
case OtpExternal.stringTag:
arity = read2BE();
break;
... | java | public int read_list_head() throws OtpErlangDecodeException {
int arity = 0;
final int tag = read1skip_version();
switch (tag) {
case OtpExternal.nilTag:
arity = 0;
break;
case OtpExternal.stringTag:
arity = read2BE();
break;
... | [
"public",
"int",
"read_list_head",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"arity",
"=",
"0",
";",
"final",
"int",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"OtpExternal",
".",
"nilTag",
":"... | Read a list header from the stream.
@return the arity of the list.
@exception OtpErlangDecodeException
if the next term in the stream is not a list. | [
"Read",
"a",
"list",
"header",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L863-L885 |
130,972 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_tuple_head | public int read_tuple_head() throws OtpErlangDecodeException {
int arity = 0;
final int tag = read1skip_version();
// decode the tuple header and get arity
switch (tag) {
case OtpExternal.smallTupleTag:
arity = read1();
break;
case OtpExternal.la... | java | public int read_tuple_head() throws OtpErlangDecodeException {
int arity = 0;
final int tag = read1skip_version();
// decode the tuple header and get arity
switch (tag) {
case OtpExternal.smallTupleTag:
arity = read1();
break;
case OtpExternal.la... | [
"public",
"int",
"read_tuple_head",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"arity",
"=",
"0",
";",
"final",
"int",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"// decode the tuple header and get arity",
"switch",
"(",
"tag",
")",
"{",
"c... | Read a tuple header from the stream.
@return the arity of the tuple.
@exception OtpErlangDecodeException
if the next term in the stream is not a tuple. | [
"Read",
"a",
"tuple",
"header",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L895-L914 |
130,973 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_nil | public int read_nil() throws OtpErlangDecodeException {
int arity = 0;
final int tag = read1skip_version();
switch (tag) {
case OtpExternal.nilTag:
arity = 0;
break;
default:
throw new OtpErlangDecodeException("Not valid nil tag: " + tag);
... | java | public int read_nil() throws OtpErlangDecodeException {
int arity = 0;
final int tag = read1skip_version();
switch (tag) {
case OtpExternal.nilTag:
arity = 0;
break;
default:
throw new OtpErlangDecodeException("Not valid nil tag: " + tag);
... | [
"public",
"int",
"read_nil",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"arity",
"=",
"0",
";",
"final",
"int",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"OtpExternal",
".",
"nilTag",
":",
"a... | Read an empty list from the stream.
@return zero (the arity of the list).
@exception OtpErlangDecodeException
if the next term in the stream is not an empty list. | [
"Read",
"an",
"empty",
"list",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L924-L938 |
130,974 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_pid | public OtpErlangPid read_pid() throws OtpErlangDecodeException {
String node;
int id;
int serial;
int creation;
int tag;
tag = read1skip_version();
if (tag != OtpExternal.pidTag &&
tag != OtpExternal.newPidTag) {
throw new OtpErlangDecodeExcepti... | java | public OtpErlangPid read_pid() throws OtpErlangDecodeException {
String node;
int id;
int serial;
int creation;
int tag;
tag = read1skip_version();
if (tag != OtpExternal.pidTag &&
tag != OtpExternal.newPidTag) {
throw new OtpErlangDecodeExcepti... | [
"public",
"OtpErlangPid",
"read_pid",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"String",
"node",
";",
"int",
"id",
";",
"int",
"serial",
";",
"int",
"creation",
";",
"int",
"tag",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"if",
"(",
... | Read an Erlang PID from the stream.
@return the value of the PID.
@exception OtpErlangDecodeException
if the next term in the stream is not an Erlang PID. | [
"Read",
"an",
"Erlang",
"PID",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L948-L974 |
130,975 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_port | public OtpErlangPort read_port() throws OtpErlangDecodeException {
String node;
int id;
int creation;
int tag;
tag = read1skip_version();
if (tag != OtpExternal.portTag &&
tag != OtpExternal.newPortTag) {
throw new OtpErlangDecodeException(
... | java | public OtpErlangPort read_port() throws OtpErlangDecodeException {
String node;
int id;
int creation;
int tag;
tag = read1skip_version();
if (tag != OtpExternal.portTag &&
tag != OtpExternal.newPortTag) {
throw new OtpErlangDecodeException(
... | [
"public",
"OtpErlangPort",
"read_port",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"String",
"node",
";",
"int",
"id",
";",
"int",
"creation",
";",
"int",
"tag",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"if",
"(",
"tag",
"!=",
"OtpExt... | Read an Erlang port from the stream.
@return the value of the port.
@exception OtpErlangDecodeException
if the next term in the stream is not an Erlang port. | [
"Read",
"an",
"Erlang",
"port",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L984-L1008 |
130,976 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_ref | public OtpErlangRef read_ref() throws OtpErlangDecodeException {
String node;
int id;
int creation;
int tag;
tag = read1skip_version();
switch (tag) {
case OtpExternal.refTag:
node = read_atom();
id = read4BE() & 0x3ffff; // 18 bits
... | java | public OtpErlangRef read_ref() throws OtpErlangDecodeException {
String node;
int id;
int creation;
int tag;
tag = read1skip_version();
switch (tag) {
case OtpExternal.refTag:
node = read_atom();
id = read4BE() & 0x3ffff; // 18 bits
... | [
"public",
"OtpErlangRef",
"read_ref",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"String",
"node",
";",
"int",
"id",
";",
"int",
"creation",
";",
"int",
"tag",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"switch",
"(",
"tag",
")",
"{",
... | Read an Erlang reference from the stream.
@return the value of the reference
@exception OtpErlangDecodeException
if the next term in the stream is not an Erlang reference. | [
"Read",
"an",
"Erlang",
"reference",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L1018-L1056 |
130,977 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_string | public String read_string() throws OtpErlangDecodeException {
int tag;
int len;
byte[] strbuf;
int[] intbuf;
tag = read1skip_version();
switch (tag) {
case OtpExternal.stringTag:
len = read2BE();
strbuf = new byte[len];
this.rea... | java | public String read_string() throws OtpErlangDecodeException {
int tag;
int len;
byte[] strbuf;
int[] intbuf;
tag = read1skip_version();
switch (tag) {
case OtpExternal.stringTag:
len = read2BE();
strbuf = new byte[len];
this.rea... | [
"public",
"String",
"read_string",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"int",
"tag",
";",
"int",
"len",
";",
"byte",
"[",
"]",
"strbuf",
";",
"int",
"[",
"]",
"intbuf",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"switch",
"(",
... | Read a string from the stream.
@return the value of the string.
@exception OtpErlangDecodeException
if the next term in the stream is not a string. | [
"Read",
"a",
"string",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L1115-L1146 |
130,978 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_compressed | public OtpErlangObject read_compressed() throws OtpErlangDecodeException {
final int tag = read1skip_version();
if (tag != OtpExternal.compressedTag) {
throw new OtpErlangDecodeException(
"Wrong tag encountered, expected "
+ OtpExternal.compre... | java | public OtpErlangObject read_compressed() throws OtpErlangDecodeException {
final int tag = read1skip_version();
if (tag != OtpExternal.compressedTag) {
throw new OtpErlangDecodeException(
"Wrong tag encountered, expected "
+ OtpExternal.compre... | [
"public",
"OtpErlangObject",
"read_compressed",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"final",
"int",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"if",
"(",
"tag",
"!=",
"OtpExternal",
".",
"compressedTag",
")",
"{",
"throw",
"new",
"OtpErlang... | Read a compressed term from the stream
@return the resulting uncompressed term.
@exception OtpErlangDecodeException
if the next term in the stream is not a compressed term. | [
"Read",
"a",
"compressed",
"term",
"from",
"the",
"stream"
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L1156-L1187 |
130,979 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_any | public OtpErlangObject read_any() throws OtpErlangDecodeException {
// calls one of the above functions, depending on o
final int tag = peek1skip_version();
switch (tag) {
case OtpExternal.smallIntTag:
case OtpExternal.intTag:
case OtpExternal.smallBigTag:
case O... | java | public OtpErlangObject read_any() throws OtpErlangDecodeException {
// calls one of the above functions, depending on o
final int tag = peek1skip_version();
switch (tag) {
case OtpExternal.smallIntTag:
case OtpExternal.intTag:
case OtpExternal.smallBigTag:
case O... | [
"public",
"OtpErlangObject",
"read_any",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"// calls one of the above functions, depending on o",
"final",
"int",
"tag",
"=",
"peek1skip_version",
"(",
")",
";",
"switch",
"(",
"tag",
")",
"{",
"case",
"OtpExternal",
... | Read an arbitrary Erlang term from the stream.
@return the Erlang term.
@exception OtpErlangDecodeException
if the stream does not contain a known Erlang type at the
next position. | [
"Read",
"an",
"arbitrary",
"Erlang",
"term",
"from",
"the",
"stream",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L1198-L1272 |
130,980 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java | OtpEpmd.publishPort | public static boolean publishPort(final OtpLocalNode node)
throws IOException {
OtpTransport s = null;
s = r4_publish(node);
node.setEpmd(s);
return s != null;
} | java | public static boolean publishPort(final OtpLocalNode node)
throws IOException {
OtpTransport s = null;
s = r4_publish(node);
node.setEpmd(s);
return s != null;
} | [
"public",
"static",
"boolean",
"publishPort",
"(",
"final",
"OtpLocalNode",
"node",
")",
"throws",
"IOException",
"{",
"OtpTransport",
"s",
"=",
"null",
";",
"s",
"=",
"r4_publish",
"(",
"node",
")",
";",
"node",
".",
"setEpmd",
"(",
"s",
")",
";",
"retu... | Register with Epmd, so that other nodes are able to find and connect to
it.
@param node
the server node that should be registered with Epmd.
@return true if the operation was successful. False if the node was
already registered.
@exception java.io.IOException
if there was no response from the name server. | [
"Register",
"with",
"Epmd",
"so",
"that",
"other",
"nodes",
"are",
"able",
"to",
"find",
"and",
"connect",
"to",
"it",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java#L137-L146 |
130,981 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java | OtpEpmd.unPublishPort | public static void unPublishPort(final OtpLocalNode node) {
OtpTransport s = null;
try {
s = node.createTransport((String) null, EpmdPort.get());
@SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(node.alive().... | java | public static void unPublishPort(final OtpLocalNode node) {
OtpTransport s = null;
try {
s = node.createTransport((String) null, EpmdPort.get());
@SuppressWarnings("resource")
final OtpOutputStream obuf = new OtpOutputStream();
obuf.write2BE(node.alive().... | [
"public",
"static",
"void",
"unPublishPort",
"(",
"final",
"OtpLocalNode",
"node",
")",
"{",
"OtpTransport",
"s",
"=",
"null",
";",
"try",
"{",
"s",
"=",
"node",
".",
"createTransport",
"(",
"(",
"String",
")",
"null",
",",
"EpmdPort",
".",
"get",
"(",
... | Unregister from Epmd. Other nodes wishing to connect will no longer be
able to.
<p>
This method does not report any failures. | [
"Unregister",
"from",
"Epmd",
".",
"Other",
"nodes",
"wishing",
"to",
"connect",
"will",
"no",
"longer",
"be",
"able",
"to",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java#L158-L185 |
130,982 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java | OtpMbox.send | public void send(final String aname, final OtpErlangObject msg) {
home.deliver(new OtpMsg(self, aname, (OtpErlangObject) msg.clone()));
} | java | public void send(final String aname, final OtpErlangObject msg) {
home.deliver(new OtpMsg(self, aname, (OtpErlangObject) msg.clone()));
} | [
"public",
"void",
"send",
"(",
"final",
"String",
"aname",
",",
"final",
"OtpErlangObject",
"msg",
")",
"{",
"home",
".",
"deliver",
"(",
"new",
"OtpMsg",
"(",
"self",
",",
"aname",
",",
"(",
"OtpErlangObject",
")",
"msg",
".",
"clone",
"(",
")",
")",
... | Send a message to a named mailbox created from the same node as this
mailbox.
@param aname
the registered name of recipient mailbox.
@param msg
the body of the message to send. | [
"Send",
"a",
"message",
"to",
"a",
"named",
"mailbox",
"created",
"from",
"the",
"same",
"node",
"as",
"this",
"mailbox",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java#L361-L363 |
130,983 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java | OtpMbox.send | public void send(final String aname, final String node,
final OtpErlangObject msg) {
try {
final String currentNode = home.node();
if (node.equals(currentNode)) {
send(aname, msg);
} else if (node.indexOf('@', 0) < 0
&& node.equ... | java | public void send(final String aname, final String node,
final OtpErlangObject msg) {
try {
final String currentNode = home.node();
if (node.equals(currentNode)) {
send(aname, msg);
} else if (node.indexOf('@', 0) < 0
&& node.equ... | [
"public",
"void",
"send",
"(",
"final",
"String",
"aname",
",",
"final",
"String",
"node",
",",
"final",
"OtpErlangObject",
"msg",
")",
"{",
"try",
"{",
"final",
"String",
"currentNode",
"=",
"home",
".",
"node",
"(",
")",
";",
"if",
"(",
"node",
".",
... | Send a message to a named mailbox created from another node.
@param aname
the registered name of recipient mailbox.
@param node
the name of the remote node where the recipient mailbox is
registered.
@param msg
the body of the message to send. | [
"Send",
"a",
"message",
"to",
"a",
"named",
"mailbox",
"created",
"from",
"another",
"node",
"."
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java#L379-L399 |
130,984 | erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java | OtpMbox.breakLinks | void breakLinks(final OtpErlangObject reason) {
final Link[] l = links.clearLinks();
if (l != null) {
final int len = l.length;
for (int i = 0; i < len; i++) {
exit(1, l[i].remote(), reason);
}
}
} | java | void breakLinks(final OtpErlangObject reason) {
final Link[] l = links.clearLinks();
if (l != null) {
final int len = l.length;
for (int i = 0; i < len; i++) {
exit(1, l[i].remote(), reason);
}
}
} | [
"void",
"breakLinks",
"(",
"final",
"OtpErlangObject",
"reason",
")",
"{",
"final",
"Link",
"[",
"]",
"l",
"=",
"links",
".",
"clearLinks",
"(",
")",
";",
"if",
"(",
"l",
"!=",
"null",
")",
"{",
"final",
"int",
"len",
"=",
"l",
".",
"length",
";",
... | used to break all known links to this mbox | [
"used",
"to",
"break",
"all",
"known",
"links",
"to",
"this",
"mbox"
] | ac6084fd83240355f72e94adbf303e57832d1fab | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java#L717-L727 |
130,985 | h2oai/h2o-3 | h2o-core/src/main/java/hex/Model.java | Parameters.read_lock_frames | public void read_lock_frames(Job job) {
Frame tr = train();
if (tr != null)
tr.read_lock(job._key);
if (_valid != null && !_train.equals(_valid))
_valid.get().read_lock(job._key);
} | java | public void read_lock_frames(Job job) {
Frame tr = train();
if (tr != null)
tr.read_lock(job._key);
if (_valid != null && !_train.equals(_valid))
_valid.get().read_lock(job._key);
} | [
"public",
"void",
"read_lock_frames",
"(",
"Job",
"job",
")",
"{",
"Frame",
"tr",
"=",
"train",
"(",
")",
";",
"if",
"(",
"tr",
"!=",
"null",
")",
"tr",
".",
"read_lock",
"(",
"job",
".",
"_key",
")",
";",
"if",
"(",
"_valid",
"!=",
"null",
"&&",... | Read-Lock both training and validation User frames. | [
"Read",
"-",
"Lock",
"both",
"training",
"and",
"validation",
"User",
"frames",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Model.java#L336-L342 |
130,986 | h2oai/h2o-3 | h2o-core/src/main/java/hex/Model.java | Parameters.read_unlock_frames | public void read_unlock_frames(Job job) {
Frame tr = train();
if( tr != null ) tr.unlock(job._key,false);
if( _valid != null && !_train.equals(_valid) )
valid().unlock(job._key,false);
} | java | public void read_unlock_frames(Job job) {
Frame tr = train();
if( tr != null ) tr.unlock(job._key,false);
if( _valid != null && !_train.equals(_valid) )
valid().unlock(job._key,false);
} | [
"public",
"void",
"read_unlock_frames",
"(",
"Job",
"job",
")",
"{",
"Frame",
"tr",
"=",
"train",
"(",
")",
";",
"if",
"(",
"tr",
"!=",
"null",
")",
"tr",
".",
"unlock",
"(",
"job",
".",
"_key",
",",
"false",
")",
";",
"if",
"(",
"_valid",
"!=",
... | Read-UnLock both training and validation User frames. This method is
called on crashing cleanup pathes, so handles the case where the frames
are not actually locked. | [
"Read",
"-",
"UnLock",
"both",
"training",
"and",
"validation",
"User",
"frames",
".",
"This",
"method",
"is",
"called",
"on",
"crashing",
"cleanup",
"pathes",
"so",
"handles",
"the",
"case",
"where",
"the",
"frames",
"are",
"not",
"actually",
"locked",
"."
... | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Model.java#L347-L352 |
130,987 | h2oai/h2o-3 | h2o-core/src/main/java/hex/Model.java | InteractionSpec.reorderColumns | public Frame reorderColumns(Frame f) {
if ((_interactionsOnly == null) || (f == null))
return f;
Vec[] interOnlyVecs = f.vecs(_interactionsOnly);
f.remove(_interactionsOnly);
for (int i = 0; i < _interactionsOnly.length; i++) {
if (isUsed(_interactionsOnly[i])) {
f.add(... | java | public Frame reorderColumns(Frame f) {
if ((_interactionsOnly == null) || (f == null))
return f;
Vec[] interOnlyVecs = f.vecs(_interactionsOnly);
f.remove(_interactionsOnly);
for (int i = 0; i < _interactionsOnly.length; i++) {
if (isUsed(_interactionsOnly[i])) {
f.add(... | [
"public",
"Frame",
"reorderColumns",
"(",
"Frame",
"f",
")",
"{",
"if",
"(",
"(",
"_interactionsOnly",
"==",
"null",
")",
"||",
"(",
"f",
"==",
"null",
")",
")",
"return",
"f",
";",
"Vec",
"[",
"]",
"interOnlyVecs",
"=",
"f",
".",
"vecs",
"(",
"_in... | Reorders columns of a Frame so that columns that only used to make interactions
are at the end of the Frame. Only Vecs that will actually be used are kept in the frame.
@param f frame to adjust
@return reordered frame | [
"Reorders",
"columns",
"of",
"a",
"Frame",
"so",
"that",
"columns",
"that",
"only",
"used",
"to",
"make",
"interactions",
"are",
"at",
"the",
"end",
"of",
"the",
"Frame",
".",
"Only",
"Vecs",
"that",
"will",
"actually",
"be",
"used",
"are",
"kept",
"in",... | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Model.java#L527-L541 |
130,988 | h2oai/h2o-3 | h2o-core/src/main/java/hex/Model.java | Output.classNames | public String[] classNames() {
if (_domains == null || _domains.length == 0 || !isSupervised()) return null;
return _domains[_domains.length - 1];
} | java | public String[] classNames() {
if (_domains == null || _domains.length == 0 || !isSupervised()) return null;
return _domains[_domains.length - 1];
} | [
"public",
"String",
"[",
"]",
"classNames",
"(",
")",
"{",
"if",
"(",
"_domains",
"==",
"null",
"||",
"_domains",
".",
"length",
"==",
"0",
"||",
"!",
"isSupervised",
"(",
")",
")",
"return",
"null",
";",
"return",
"_domains",
"[",
"_domains",
".",
"... | Names of levels for a categorical response column. | [
"Names",
"of",
"levels",
"for",
"a",
"categorical",
"response",
"column",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/Model.java#L790-L793 |
130,989 | h2oai/h2o-3 | h2o-persist-s3/src/main/java/water/persist/PersistS3Handler.java | PersistS3Handler.validateS3Credentials | private void validateS3Credentials(final PersistS3CredentialsV3 s3Credentials){
Objects.requireNonNull(s3Credentials);
if(s3Credentials.secret_key_id == null) throw new IllegalArgumentException("The field 'S3_SECRET_KEY_ID' may not be null.");
if(s3Credentials.secret_access_key == null)... | java | private void validateS3Credentials(final PersistS3CredentialsV3 s3Credentials){
Objects.requireNonNull(s3Credentials);
if(s3Credentials.secret_key_id == null) throw new IllegalArgumentException("The field 'S3_SECRET_KEY_ID' may not be null.");
if(s3Credentials.secret_access_key == null)... | [
"private",
"void",
"validateS3Credentials",
"(",
"final",
"PersistS3CredentialsV3",
"s3Credentials",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"s3Credentials",
")",
";",
"if",
"(",
"s3Credentials",
".",
"secret_key_id",
"==",
"null",
")",
"throw",
"new",
"I... | Checks for basic mistakes users might make when providing S3 credentials.
@param s3Credentials S3 credentials provided by the user | [
"Checks",
"for",
"basic",
"mistakes",
"users",
"might",
"make",
"when",
"providing",
"S3",
"credentials",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-persist-s3/src/main/java/water/persist/PersistS3Handler.java#L24-L36 |
130,990 | h2oai/h2o-3 | h2o-core/src/main/java/hex/FrameSplitter.java | FrameSplitter.makeTemplates | private Vec[][] makeTemplates(Frame dataset, double[] ratios) {
Vec anyVec = dataset.anyVec();
final long[][] espcPerSplit = computeEspcPerSplit(anyVec.espc(), anyVec.length(), ratios);
final int num = dataset.numCols(); // number of columns in input frame
final int nsplits = espcPerSplit.length; // num... | java | private Vec[][] makeTemplates(Frame dataset, double[] ratios) {
Vec anyVec = dataset.anyVec();
final long[][] espcPerSplit = computeEspcPerSplit(anyVec.espc(), anyVec.length(), ratios);
final int num = dataset.numCols(); // number of columns in input frame
final int nsplits = espcPerSplit.length; // num... | [
"private",
"Vec",
"[",
"]",
"[",
"]",
"makeTemplates",
"(",
"Frame",
"dataset",
",",
"double",
"[",
"]",
"ratios",
")",
"{",
"Vec",
"anyVec",
"=",
"dataset",
".",
"anyVec",
"(",
")",
";",
"final",
"long",
"[",
"]",
"[",
"]",
"espcPerSplit",
"=",
"c... | Make vector templates for all output frame vectors | [
"Make",
"vector",
"templates",
"for",
"all",
"output",
"frame",
"vectors"
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/FrameSplitter.java#L108-L126 |
130,991 | h2oai/h2o-3 | h2o-core/src/main/java/hex/FrameSplitter.java | FrameSplitter.computeEspcPerSplit | static long[/*nsplits*/][/*nchunks*/] computeEspcPerSplit(long[] espc, long len, double[] ratios) {
assert espc.length>0 && espc[0] == 0;
assert espc[espc.length-1] == len;
long[] partSizes = partitione(len, ratios); // Split of whole vector
int nparts = ratios.length+1;
long[][] r = new long[nparts... | java | static long[/*nsplits*/][/*nchunks*/] computeEspcPerSplit(long[] espc, long len, double[] ratios) {
assert espc.length>0 && espc[0] == 0;
assert espc[espc.length-1] == len;
long[] partSizes = partitione(len, ratios); // Split of whole vector
int nparts = ratios.length+1;
long[][] r = new long[nparts... | [
"static",
"long",
"[",
"/*nsplits*/",
"]",
"[",
"/*nchunks*/",
"]",
"computeEspcPerSplit",
"(",
"long",
"[",
"]",
"espc",
",",
"long",
"len",
",",
"double",
"[",
"]",
"ratios",
")",
"{",
"assert",
"espc",
".",
"length",
">",
"0",
"&&",
"espc",
"[",
"... | The task computes ESPC per split | [
"The",
"task",
"computes",
"ESPC",
"per",
"split"
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/hex/FrameSplitter.java#L129-L147 |
130,992 | h2oai/h2o-3 | h2o-core/src/main/java/water/parser/ParseSetup.java | ParseSetup.parser | protected Parser parser(Key jobKey) {
ParserProvider pp = ParserService.INSTANCE.getByInfo(_parse_type);
if (pp != null) {
return pp.createParser(this, jobKey);
}
throw new H2OIllegalArgumentException("Unknown file type. Parse cannot be completed.",
"Attempted to invoke a parser for Pa... | java | protected Parser parser(Key jobKey) {
ParserProvider pp = ParserService.INSTANCE.getByInfo(_parse_type);
if (pp != null) {
return pp.createParser(this, jobKey);
}
throw new H2OIllegalArgumentException("Unknown file type. Parse cannot be completed.",
"Attempted to invoke a parser for Pa... | [
"protected",
"Parser",
"parser",
"(",
"Key",
"jobKey",
")",
"{",
"ParserProvider",
"pp",
"=",
"ParserService",
".",
"INSTANCE",
".",
"getByInfo",
"(",
"_parse_type",
")",
";",
"if",
"(",
"pp",
"!=",
"null",
")",
"{",
"return",
"pp",
".",
"createParser",
... | This is a single entry-point to create a parser.
Should be override in subclasses. | [
"This",
"is",
"a",
"single",
"entry",
"-",
"point",
"to",
"create",
"a",
"parser",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParseSetup.java#L249-L257 |
130,993 | h2oai/h2o-3 | h2o-core/src/main/java/water/parser/ParseSetup.java | ParseSetup.getFinalSetup | public final ParseSetup getFinalSetup(Key[] inputKeys, ParseSetup demandedSetup) {
ParserProvider pp = ParserService.INSTANCE.getByInfo(_parse_type);
if (pp != null) {
ParseSetup ps = pp.createParserSetup(inputKeys, demandedSetup);
if (demandedSetup._decrypt_tool != null)
ps._decrypt_tool = ... | java | public final ParseSetup getFinalSetup(Key[] inputKeys, ParseSetup demandedSetup) {
ParserProvider pp = ParserService.INSTANCE.getByInfo(_parse_type);
if (pp != null) {
ParseSetup ps = pp.createParserSetup(inputKeys, demandedSetup);
if (demandedSetup._decrypt_tool != null)
ps._decrypt_tool = ... | [
"public",
"final",
"ParseSetup",
"getFinalSetup",
"(",
"Key",
"[",
"]",
"inputKeys",
",",
"ParseSetup",
"demandedSetup",
")",
"{",
"ParserProvider",
"pp",
"=",
"ParserService",
".",
"INSTANCE",
".",
"getByInfo",
"(",
"_parse_type",
")",
";",
"if",
"(",
"pp",
... | Return create a final parser-specific setup
for this configuration.
@param inputKeys inputs
@param demandedSetup setup demanded by a user
@return a parser specific setup based on demanded setup | [
"Return",
"create",
"a",
"final",
"parser",
"-",
"specific",
"setup",
"for",
"this",
"configuration",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParseSetup.java#L267-L279 |
130,994 | h2oai/h2o-3 | h2o-core/src/main/java/water/parser/ParseSetup.java | ParseSetup.checkDupColumnNames | HashSet<String> checkDupColumnNames() {
HashSet<String> conflictingNames = new HashSet<>();
if( null==_column_names ) return conflictingNames;
HashSet<String> uniqueNames = new HashSet<>();
for( String n : _column_names)
if( !uniqueNames.add(n) ) conflictingNames.add(n);
return conflictingName... | java | HashSet<String> checkDupColumnNames() {
HashSet<String> conflictingNames = new HashSet<>();
if( null==_column_names ) return conflictingNames;
HashSet<String> uniqueNames = new HashSet<>();
for( String n : _column_names)
if( !uniqueNames.add(n) ) conflictingNames.add(n);
return conflictingName... | [
"HashSet",
"<",
"String",
">",
"checkDupColumnNames",
"(",
")",
"{",
"HashSet",
"<",
"String",
">",
"conflictingNames",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"if",
"(",
"null",
"==",
"_column_names",
")",
"return",
"conflictingNames",
";",
"HashSet",
... | Set of duplicated column names | [
"Set",
"of",
"duplicated",
"column",
"names"
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParseSetup.java#L295-L302 |
130,995 | h2oai/h2o-3 | h2o-core/src/main/java/water/parser/ParseSetup.java | ParseSetup.guessSetup | public static ParseSetup guessSetup(Key[] fkeys, boolean singleQuote, int checkHeader) {
return guessSetup(fkeys, new ParseSetup(GUESS_INFO, GUESS_SEP, singleQuote, checkHeader, GUESS_COL_CNT, null, new ParseWriter.ParseErr[0]));
} | java | public static ParseSetup guessSetup(Key[] fkeys, boolean singleQuote, int checkHeader) {
return guessSetup(fkeys, new ParseSetup(GUESS_INFO, GUESS_SEP, singleQuote, checkHeader, GUESS_COL_CNT, null, new ParseWriter.ParseErr[0]));
} | [
"public",
"static",
"ParseSetup",
"guessSetup",
"(",
"Key",
"[",
"]",
"fkeys",
",",
"boolean",
"singleQuote",
",",
"int",
"checkHeader",
")",
"{",
"return",
"guessSetup",
"(",
"fkeys",
",",
"new",
"ParseSetup",
"(",
"GUESS_INFO",
",",
"GUESS_SEP",
",",
"sing... | Used by test harnesses for simple parsing of test data. Presumes
auto-detection for file and separator types.
@param fkeys Keys to input vectors to be parsed
@param singleQuote single quotes quote fields
@param checkHeader check for a header
@return ParseSetup settings from looking at all files | [
"Used",
"by",
"test",
"harnesses",
"for",
"simple",
"parsing",
"of",
"test",
"data",
".",
"Presumes",
"auto",
"-",
"detection",
"for",
"file",
"and",
"separator",
"types",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParseSetup.java#L336-L338 |
130,996 | h2oai/h2o-3 | h2o-core/src/main/java/water/parser/ParseSetup.java | ParseSetup.guessSetup | public static ParseSetup guessSetup( Key[] fkeys, ParseSetup userSetup ) {
//Guess setup of each file and collect results
GuessSetupTsk t = new GuessSetupTsk(userSetup);
t.doAll(fkeys).getResult();
//Calc chunk-size
// FIXME: should be a parser specific - or at least parser should be able to overr... | java | public static ParseSetup guessSetup( Key[] fkeys, ParseSetup userSetup ) {
//Guess setup of each file and collect results
GuessSetupTsk t = new GuessSetupTsk(userSetup);
t.doAll(fkeys).getResult();
//Calc chunk-size
// FIXME: should be a parser specific - or at least parser should be able to overr... | [
"public",
"static",
"ParseSetup",
"guessSetup",
"(",
"Key",
"[",
"]",
"fkeys",
",",
"ParseSetup",
"userSetup",
")",
"{",
"//Guess setup of each file and collect results",
"GuessSetupTsk",
"t",
"=",
"new",
"GuessSetupTsk",
"(",
"userSetup",
")",
";",
"t",
".",
"doA... | Discover the parse setup needed to correctly parse all files.
This takes a ParseSetup as guidance. Each file is examined
individually and then results merged. If a conflict exists
between any results all files are re-examined using the
best guess from the first examination.
@param fkeys Keys to input vectors to be p... | [
"Discover",
"the",
"parse",
"setup",
"needed",
"to",
"correctly",
"parse",
"all",
"files",
".",
"This",
"takes",
"a",
"ParseSetup",
"as",
"guidance",
".",
"Each",
"file",
"is",
"examined",
"individually",
"and",
"then",
"results",
"merged",
".",
"If",
"a",
... | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/ParseSetup.java#L351-L368 |
130,997 | h2oai/h2o-3 | h2o-genmodel/src/main/java/hex/genmodel/algos/ensemble/StackedEnsembleMojoReader.java | StackedEnsembleMojoReader.createMapping | private static int[] createMapping(final MojoModel model, final String[] reference, final String modelName) {
int[] mapping = new int[reference.length];
if (model._names.length != reference.length) {
throw new IllegalStateException(String.format("Model '%s' is expected to have has non-standa... | java | private static int[] createMapping(final MojoModel model, final String[] reference, final String modelName) {
int[] mapping = new int[reference.length];
if (model._names.length != reference.length) {
throw new IllegalStateException(String.format("Model '%s' is expected to have has non-standa... | [
"private",
"static",
"int",
"[",
"]",
"createMapping",
"(",
"final",
"MojoModel",
"model",
",",
"final",
"String",
"[",
"]",
"reference",
",",
"final",
"String",
"modelName",
")",
"{",
"int",
"[",
"]",
"mapping",
"=",
"new",
"int",
"[",
"reference",
".",... | Creates an array of integers with mapping of referential column name space into model-specific column name space.
@param model Model to create column mapping for
@param reference Column mapping servig as a reference
@param modelName Name of the model for various error reports
@return An array of integers with mapp... | [
"Creates",
"an",
"array",
"of",
"integers",
"with",
"mapping",
"of",
"referential",
"column",
"name",
"space",
"into",
"model",
"-",
"specific",
"column",
"name",
"space",
"."
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/algos/ensemble/StackedEnsembleMojoReader.java#L38-L58 |
130,998 | h2oai/h2o-3 | h2o-algos/src/main/java/hex/deepwater/DeepWaterModelInfo.java | DeepWaterModelInfo.size | public long size() {
long res = 0;
if (_network!=null) res+=_network.length;
if (_modelparams!=null) res+=_modelparams.length;
return res;
} | java | public long size() {
long res = 0;
if (_network!=null) res+=_network.length;
if (_modelparams!=null) res+=_modelparams.length;
return res;
} | [
"public",
"long",
"size",
"(",
")",
"{",
"long",
"res",
"=",
"0",
";",
"if",
"(",
"_network",
"!=",
"null",
")",
"res",
"+=",
"_network",
".",
"length",
";",
"if",
"(",
"_modelparams",
"!=",
"null",
")",
"res",
"+=",
"_modelparams",
".",
"length",
... | momenta are not counted here, but they are needed for model building | [
"momenta",
"are",
"not",
"counted",
"here",
"but",
"they",
"are",
"needed",
"for",
"model",
"building"
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/deepwater/DeepWaterModelInfo.java#L96-L101 |
130,999 | h2oai/h2o-3 | h2o-algos/src/main/java/hex/deepwater/DeepWaterModelInfo.java | DeepWaterModelInfo.javaToNative | private void javaToNative(byte[] network, byte[] parameters) {
long now = System.currentTimeMillis();
//existing state is fine
if (_backend !=null
// either not overwriting with user-given (new) state, or we already are in sync
&& (network == null || Arrays.equals(network,_network))
... | java | private void javaToNative(byte[] network, byte[] parameters) {
long now = System.currentTimeMillis();
//existing state is fine
if (_backend !=null
// either not overwriting with user-given (new) state, or we already are in sync
&& (network == null || Arrays.equals(network,_network))
... | [
"private",
"void",
"javaToNative",
"(",
"byte",
"[",
"]",
"network",
",",
"byte",
"[",
"]",
"parameters",
")",
"{",
"long",
"now",
"=",
"System",
".",
"currentTimeMillis",
"(",
")",
";",
"//existing state is fine",
"if",
"(",
"_backend",
"!=",
"null",
"// ... | Internal helper to create a native backend, and fill its state
@param network user-given network topology
@param parameters user-given network state (weights/biases) | [
"Internal",
"helper",
"to",
"create",
"a",
"native",
"backend",
"and",
"fill",
"its",
"state"
] | 845eb49dfeaadf638b6e2f779d82fac996391fad | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-algos/src/main/java/hex/deepwater/DeepWaterModelInfo.java#L337-L360 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.