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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
149,100 | kevoree/kevoree-library | mqttServer/src/main/java/org/dna/mqtt/moquette/parser/netty/Utils.java | Utils.numBytesToEncode | static int numBytesToEncode(int len) {
if (0 <= len && len <= 127) return 1;
if (128 <= len && len <= 16383) return 2;
if (16384 <= len && len <= 2097151) return 3;
if (2097152 <= len && len <= 268435455) return 4;
throw new IllegalArgumentException("value shoul be in the range [... | java | static int numBytesToEncode(int len) {
if (0 <= len && len <= 127) return 1;
if (128 <= len && len <= 16383) return 2;
if (16384 <= len && len <= 2097151) return 3;
if (2097152 <= len && len <= 268435455) return 4;
throw new IllegalArgumentException("value shoul be in the range [... | [
"static",
"int",
"numBytesToEncode",
"(",
"int",
"len",
")",
"{",
"if",
"(",
"0",
"<=",
"len",
"&&",
"len",
"<=",
"127",
")",
"return",
"1",
";",
"if",
"(",
"128",
"<=",
"len",
"&&",
"len",
"<=",
"16383",
")",
"return",
"2",
";",
"if",
"(",
"16... | Return the number of bytes to encode the given remaining length value | [
"Return",
"the",
"number",
"of",
"bytes",
"to",
"encode",
"the",
"given",
"remaining",
"length",
"value"
] | 617460e6c5881902ebc488a31ecdea179024d8f1 | https://github.com/kevoree/kevoree-library/blob/617460e6c5881902ebc488a31ecdea179024d8f1/mqttServer/src/main/java/org/dna/mqtt/moquette/parser/netty/Utils.java#L155-L161 |
149,101 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/ClassInfo.java | ClassInfo.checkTypeQueryAnnotation | public void checkTypeQueryAnnotation(String desc) {
if (isEntityBeanAnnotation(desc)) {
throw new NoEnhancementRequiredException("Not enhancing entity bean");
}
if (isTypeQueryBeanAnnotation(desc)) {
typeQueryBean = true;
} else if (isAlreadyEnhancedAnnotation(desc)) {
alreadyEnhanced ... | java | public void checkTypeQueryAnnotation(String desc) {
if (isEntityBeanAnnotation(desc)) {
throw new NoEnhancementRequiredException("Not enhancing entity bean");
}
if (isTypeQueryBeanAnnotation(desc)) {
typeQueryBean = true;
} else if (isAlreadyEnhancedAnnotation(desc)) {
alreadyEnhanced ... | [
"public",
"void",
"checkTypeQueryAnnotation",
"(",
"String",
"desc",
")",
"{",
"if",
"(",
"isEntityBeanAnnotation",
"(",
"desc",
")",
")",
"{",
"throw",
"new",
"NoEnhancementRequiredException",
"(",
"\"Not enhancing entity bean\"",
")",
";",
"}",
"if",
"(",
"isTyp... | Check for the type query bean and type query user annotations. | [
"Check",
"for",
"the",
"type",
"query",
"bean",
"and",
"type",
"query",
"user",
"annotations",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/ClassInfo.java#L89-L98 |
149,102 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/ClassInfo.java | ClassInfo.addField | public void addField(int access, String name, String desc, String signature) {
if (((access & Opcodes.ACC_PUBLIC) != 0)) {
if (fields == null) {
fields = new ArrayList<>();
}
if ((access & Opcodes.ACC_STATIC) == 0) {
fields.add(new FieldInfo(this, name, desc, signature));
}
... | java | public void addField(int access, String name, String desc, String signature) {
if (((access & Opcodes.ACC_PUBLIC) != 0)) {
if (fields == null) {
fields = new ArrayList<>();
}
if ((access & Opcodes.ACC_STATIC) == 0) {
fields.add(new FieldInfo(this, name, desc, signature));
}
... | [
"public",
"void",
"addField",
"(",
"int",
"access",
",",
"String",
"name",
",",
"String",
"desc",
",",
"String",
"signature",
")",
"{",
"if",
"(",
"(",
"(",
"access",
"&",
"Opcodes",
".",
"ACC_PUBLIC",
")",
"!=",
"0",
")",
")",
"{",
"if",
"(",
"fie... | Add the type query bean field. We will create a 'property access' method for each field. | [
"Add",
"the",
"type",
"query",
"bean",
"field",
".",
"We",
"will",
"create",
"a",
"property",
"access",
"method",
"for",
"each",
"field",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/ClassInfo.java#L103-L113 |
149,103 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/ClassInfo.java | ClassInfo.addGetFieldIntercept | public void addGetFieldIntercept(String owner, String name) {
if (isLog(4)) {
log("change getfield " + owner + " name:" + name);
}
typeQueryUser = true;
} | java | public void addGetFieldIntercept(String owner, String name) {
if (isLog(4)) {
log("change getfield " + owner + " name:" + name);
}
typeQueryUser = true;
} | [
"public",
"void",
"addGetFieldIntercept",
"(",
"String",
"owner",
",",
"String",
"name",
")",
"{",
"if",
"(",
"isLog",
"(",
"4",
")",
")",
"{",
"log",
"(",
"\"change getfield \"",
"+",
"owner",
"+",
"\" name:\"",
"+",
"name",
")",
";",
"}",
"typeQueryUse... | Note that a GETFIELD call has been replaced to method call. | [
"Note",
"that",
"a",
"GETFIELD",
"call",
"has",
"been",
"replaced",
"to",
"method",
"call",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/ClassInfo.java#L146-L152 |
149,104 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/ClassInfo.java | ClassInfo.addAssocBeanExtras | public void addAssocBeanExtras(ClassVisitor cv) {
if (isLog(3)) {
String msg = "... add fields";
if (!hasBasicConstructor) {
msg += ", basic constructor";
}
if (!hasMainConstructor) {
msg += ", main constructor";
}
log(msg);
}
if (!hasBasicConstructor) {... | java | public void addAssocBeanExtras(ClassVisitor cv) {
if (isLog(3)) {
String msg = "... add fields";
if (!hasBasicConstructor) {
msg += ", basic constructor";
}
if (!hasMainConstructor) {
msg += ", main constructor";
}
log(msg);
}
if (!hasBasicConstructor) {... | [
"public",
"void",
"addAssocBeanExtras",
"(",
"ClassVisitor",
"cv",
")",
"{",
"if",
"(",
"isLog",
"(",
"3",
")",
")",
"{",
"String",
"msg",
"=",
"\"... add fields\"",
";",
"if",
"(",
"!",
"hasBasicConstructor",
")",
"{",
"msg",
"+=",
"\", basic constructor\""... | Add fields and constructors to assoc type query beans as necessary. | [
"Add",
"fields",
"and",
"constructors",
"to",
"assoc",
"type",
"query",
"beans",
"as",
"necessary",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/ClassInfo.java#L185-L207 |
149,105 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/serializer/XmlObjectSerializer.java | XmlObjectSerializer.useNamespace | public void useNamespace(SerializerContext serializerContext, String namespace)
{
if (namespace != null && namespace.length() > 0)
{
if (serializerContext.knownNamespaces == null)
{
serializerContext.knownNamespaces = new HashSet<String>(8);
}
serializerContext.knownNamespaces.add(namespace);
}
... | java | public void useNamespace(SerializerContext serializerContext, String namespace)
{
if (namespace != null && namespace.length() > 0)
{
if (serializerContext.knownNamespaces == null)
{
serializerContext.knownNamespaces = new HashSet<String>(8);
}
serializerContext.knownNamespaces.add(namespace);
}
... | [
"public",
"void",
"useNamespace",
"(",
"SerializerContext",
"serializerContext",
",",
"String",
"namespace",
")",
"{",
"if",
"(",
"namespace",
"!=",
"null",
"&&",
"namespace",
".",
"length",
"(",
")",
">",
"0",
")",
"{",
"if",
"(",
"serializerContext",
".",
... | Inform the serializer that the given namespace will be used. This allows the serializer to bind a prefix early.
@param namespace
The namespace that will be used. | [
"Inform",
"the",
"serializer",
"that",
"the",
"given",
"namespace",
"will",
"be",
"used",
".",
"This",
"allows",
"the",
"serializer",
"to",
"bind",
"a",
"prefix",
"early",
"."
] | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/serializer/XmlObjectSerializer.java#L245-L255 |
149,106 | dmfs/xmlobjects | src/org/dmfs/xmlobjects/serializer/XmlObjectSerializer.java | XmlObjectSerializer.bindNamespaces | private void bindNamespaces(SerializerContext serializerContext) throws IOException
{
if (serializerContext.knownNamespaces == null)
{
return;
}
StringBuilder nsBuilder = new StringBuilder(8);
int count = 0;
for (String ns : serializerContext.knownNamespaces)
{
int num = count;
do
{
nsB... | java | private void bindNamespaces(SerializerContext serializerContext) throws IOException
{
if (serializerContext.knownNamespaces == null)
{
return;
}
StringBuilder nsBuilder = new StringBuilder(8);
int count = 0;
for (String ns : serializerContext.knownNamespaces)
{
int num = count;
do
{
nsB... | [
"private",
"void",
"bindNamespaces",
"(",
"SerializerContext",
"serializerContext",
")",
"throws",
"IOException",
"{",
"if",
"(",
"serializerContext",
".",
"knownNamespaces",
"==",
"null",
")",
"{",
"return",
";",
"}",
"StringBuilder",
"nsBuilder",
"=",
"new",
"St... | Ensure all known namespaces have been bound to a prefix.
@throws IOException | [
"Ensure",
"all",
"known",
"namespaces",
"have",
"been",
"bound",
"to",
"a",
"prefix",
"."
] | b68ddd0ce994d804fc2ec6da1096bf0d883b37f9 | https://github.com/dmfs/xmlobjects/blob/b68ddd0ce994d804fc2ec6da1096bf0d883b37f9/src/org/dmfs/xmlobjects/serializer/XmlObjectSerializer.java#L307-L330 |
149,107 | openbase/jul | schedule/src/main/java/org/openbase/jul/schedule/AbstractSynchronizationFuture.java | AbstractSynchronizationFuture.init | protected void init() {
// create a synchronisation task which makes sure that the change requested by
// the internal future has at one time been synchronized to the remote
synchronisationFuture = GlobalCachedExecutorService.submit(() -> {
dataProvider.addDataObserver(notifyChangeOb... | java | protected void init() {
// create a synchronisation task which makes sure that the change requested by
// the internal future has at one time been synchronized to the remote
synchronisationFuture = GlobalCachedExecutorService.submit(() -> {
dataProvider.addDataObserver(notifyChangeOb... | [
"protected",
"void",
"init",
"(",
")",
"{",
"// create a synchronisation task which makes sure that the change requested by",
"// the internal future has at one time been synchronized to the remote",
"synchronisationFuture",
"=",
"GlobalCachedExecutorService",
".",
"submit",
"(",
"(",
... | Start the internal synchronization task. | [
"Start",
"the",
"internal",
"synchronization",
"task",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/schedule/src/main/java/org/openbase/jul/schedule/AbstractSynchronizationFuture.java#L92-L108 |
149,108 | jboss/jboss-common-beans | src/main/java/org/jboss/common/beans/property/XMLEditorSupport.java | XMLEditorSupport.getAsText | @Override
public String getAsText() {
if (getValue() == null) {
return null;
}
return DOMWriter.printNode((Node) getValue(), false);
} | java | @Override
public String getAsText() {
if (getValue() == null) {
return null;
}
return DOMWriter.printNode((Node) getValue(), false);
} | [
"@",
"Override",
"public",
"String",
"getAsText",
"(",
")",
"{",
"if",
"(",
"getValue",
"(",
")",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"DOMWriter",
".",
"printNode",
"(",
"(",
"Node",
")",
"getValue",
"(",
")",
",",
"false",
... | Returns the property as a String. | [
"Returns",
"the",
"property",
"as",
"a",
"String",
"."
] | ffb48b1719762534bf92d762eadf91d1815f6748 | https://github.com/jboss/jboss-common-beans/blob/ffb48b1719762534bf92d762eadf91d1815f6748/src/main/java/org/jboss/common/beans/property/XMLEditorSupport.java#L55-L61 |
149,109 | openbase/jul | extension/rsb/com/src/main/java/org/openbase/jul/extension/rsb/com/exception/RSBResolvedException.java | RSBResolvedException.resolveRSBException | public static Exception resolveRSBException(final RSBException rsbException) {
Exception exception = null;
// build stacktrace array where each line is stored as entry. entry is extract each line stacktrace into arr
final String[] stacktrace = ("Caused by: " + rsbException.getMessage()).split("... | java | public static Exception resolveRSBException(final RSBException rsbException) {
Exception exception = null;
// build stacktrace array where each line is stored as entry. entry is extract each line stacktrace into arr
final String[] stacktrace = ("Caused by: " + rsbException.getMessage()).split("... | [
"public",
"static",
"Exception",
"resolveRSBException",
"(",
"final",
"RSBException",
"rsbException",
")",
"{",
"Exception",
"exception",
"=",
"null",
";",
"// build stacktrace array where each line is stored as entry. entry is extract each line stacktrace into arr",
"final",
"Stri... | Method parses the RSBException message and resolves the causes and messagen and use those to reconstruct the exception chain.
@param rsbException the origin RSBException
@return the reconstruced excetion cause chain. | [
"Method",
"parses",
"the",
"RSBException",
"message",
"and",
"resolves",
"the",
"causes",
"and",
"messagen",
"and",
"use",
"those",
"to",
"reconstruct",
"the",
"exception",
"chain",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/rsb/com/src/main/java/org/openbase/jul/extension/rsb/com/exception/RSBResolvedException.java#L81-L138 |
149,110 | ops4j/org.ops4j.pax.wicket | service/src/main/java/org/ops4j/pax/wicket/internal/servlet/ServletDescriptor.java | ServletDescriptor.unregister | public synchronized void unregister() {
if (this.service != null) {
LOG.info("unregister servlet on mountpoint {} with contextParams {}", getAlias(),
contextParams);
this.service.unregister(getAlias());
this.service = null;
}
} | java | public synchronized void unregister() {
if (this.service != null) {
LOG.info("unregister servlet on mountpoint {} with contextParams {}", getAlias(),
contextParams);
this.service.unregister(getAlias());
this.service = null;
}
} | [
"public",
"synchronized",
"void",
"unregister",
"(",
")",
"{",
"if",
"(",
"this",
".",
"service",
"!=",
"null",
")",
"{",
"LOG",
".",
"info",
"(",
"\"unregister servlet on mountpoint {} with contextParams {}\"",
",",
"getAlias",
"(",
")",
",",
"contextParams",
"... | Unregister a servlet if already registered. After this call it is save to register the servlet again | [
"Unregister",
"a",
"servlet",
"if",
"already",
"registered",
".",
"After",
"this",
"call",
"it",
"is",
"save",
"to",
"register",
"the",
"servlet",
"again"
] | ef7cb4bdf918e9e61ec69789b9c690567616faa9 | https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/servlet/ServletDescriptor.java#L350-L357 |
149,111 | ops4j/org.ops4j.pax.wicket | service/src/main/java/org/ops4j/pax/wicket/internal/HttpTracker.java | HttpTracker.unregisterServletDescriptor | private void unregisterServletDescriptor(ServletDescriptor servletDescriptor) {
try {
servletDescriptor.unregister();
} catch (RuntimeException e) {
LOG.error(
"Unregistration of ServletDescriptor under mountpoint {} fails with unexpected RuntimeException!",
... | java | private void unregisterServletDescriptor(ServletDescriptor servletDescriptor) {
try {
servletDescriptor.unregister();
} catch (RuntimeException e) {
LOG.error(
"Unregistration of ServletDescriptor under mountpoint {} fails with unexpected RuntimeException!",
... | [
"private",
"void",
"unregisterServletDescriptor",
"(",
"ServletDescriptor",
"servletDescriptor",
")",
"{",
"try",
"{",
"servletDescriptor",
".",
"unregister",
"(",
")",
";",
"}",
"catch",
"(",
"RuntimeException",
"e",
")",
"{",
"LOG",
".",
"error",
"(",
"\"Unreg... | Unregister a servlet descriptor handling runtime exceptions | [
"Unregister",
"a",
"servlet",
"descriptor",
"handling",
"runtime",
"exceptions"
] | ef7cb4bdf918e9e61ec69789b9c690567616faa9 | https://github.com/ops4j/org.ops4j.pax.wicket/blob/ef7cb4bdf918e9e61ec69789b9c690567616faa9/service/src/main/java/org/ops4j/pax/wicket/internal/HttpTracker.java#L81-L89 |
149,112 | kevoree/kevoree-library | mqttServer/src/main/java/org/dna/mqtt/moquette/proto/Utils.java | Utils.msgType2String | public static String msgType2String(int type) {
switch (type) {
case AbstractMessage.CONNECT: return "CONNECT";
case AbstractMessage.CONNACK: return "CONNACK";
case AbstractMessage.PUBLISH: return "PUBLISH";
case AbstractMessage.PUBACK: return "PUBACK";
... | java | public static String msgType2String(int type) {
switch (type) {
case AbstractMessage.CONNECT: return "CONNECT";
case AbstractMessage.CONNACK: return "CONNACK";
case AbstractMessage.PUBLISH: return "PUBLISH";
case AbstractMessage.PUBACK: return "PUBACK";
... | [
"public",
"static",
"String",
"msgType2String",
"(",
"int",
"type",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"AbstractMessage",
".",
"CONNECT",
":",
"return",
"\"CONNECT\"",
";",
"case",
"AbstractMessage",
".",
"CONNACK",
":",
"return",
"\"CONNACK\""... | Converts MQTT message type to a textual description. | [
"Converts",
"MQTT",
"message",
"type",
"to",
"a",
"textual",
"description",
"."
] | 617460e6c5881902ebc488a31ecdea179024d8f1 | https://github.com/kevoree/kevoree-library/blob/617460e6c5881902ebc488a31ecdea179024d8f1/mqttServer/src/main/java/org/dna/mqtt/moquette/proto/Utils.java#L183-L201 |
149,113 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.partHeader | public OkRequest<T> partHeader(final String name, final String value) throws IOException {
return send(name).send(": ").send(value).send(CRLF);
} | java | public OkRequest<T> partHeader(final String name, final String value) throws IOException {
return send(name).send(": ").send(value).send(CRLF);
} | [
"public",
"OkRequest",
"<",
"T",
">",
"partHeader",
"(",
"final",
"String",
"name",
",",
"final",
"String",
"value",
")",
"throws",
"IOException",
"{",
"return",
"send",
"(",
"name",
")",
".",
"send",
"(",
"\": \"",
")",
".",
"send",
"(",
"value",
")",... | Write a multipart header to the response body
@param name
@param value
@return this request | [
"Write",
"a",
"multipart",
"header",
"to",
"the",
"response",
"body"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L389-L391 |
149,114 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.send | public OkRequest<T> send(final File input) throws IOException {
final InputStream stream;
stream = new BufferedInputStream(new FileInputStream(input));
return send(stream);
} | java | public OkRequest<T> send(final File input) throws IOException {
final InputStream stream;
stream = new BufferedInputStream(new FileInputStream(input));
return send(stream);
} | [
"public",
"OkRequest",
"<",
"T",
">",
"send",
"(",
"final",
"File",
"input",
")",
"throws",
"IOException",
"{",
"final",
"InputStream",
"stream",
";",
"stream",
"=",
"new",
"BufferedInputStream",
"(",
"new",
"FileInputStream",
"(",
"input",
")",
")",
";",
... | Write contents of file to request body
@param input
@return this request | [
"Write",
"contents",
"of",
"file",
"to",
"request",
"body"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L399-L404 |
149,115 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.form | public OkRequest<T> form(final Map<String, String> values, final String charset) {
if (!values.isEmpty()) {
for (Map.Entry<String, String> entry : values.entrySet()) {
form(entry, charset);
}
}
return this;
} | java | public OkRequest<T> form(final Map<String, String> values, final String charset) {
if (!values.isEmpty()) {
for (Map.Entry<String, String> entry : values.entrySet()) {
form(entry, charset);
}
}
return this;
} | [
"public",
"OkRequest",
"<",
"T",
">",
"form",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"values",
",",
"final",
"String",
"charset",
")",
"{",
"if",
"(",
"!",
"values",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"Map",
".",
"En... | Write the values in the map as encoded form data to the request body
@param values
@param charset
@return this request | [
"Write",
"the",
"values",
"in",
"the",
"map",
"as",
"encoded",
"form",
"data",
"to",
"the",
"request",
"body"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L556-L563 |
149,116 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.param | public OkRequest<T> param(final String key, final String value) {
StringBuilder urlBuilder = new StringBuilder(getUrl());
if (getUrl().contains("?")) {
urlBuilder.append("&");
} else {
urlBuilder.append("?");
}
urlBuilder.append(key);
urlBuilder.ap... | java | public OkRequest<T> param(final String key, final String value) {
StringBuilder urlBuilder = new StringBuilder(getUrl());
if (getUrl().contains("?")) {
urlBuilder.append("&");
} else {
urlBuilder.append("?");
}
urlBuilder.append(key);
urlBuilder.ap... | [
"public",
"OkRequest",
"<",
"T",
">",
"param",
"(",
"final",
"String",
"key",
",",
"final",
"String",
"value",
")",
"{",
"StringBuilder",
"urlBuilder",
"=",
"new",
"StringBuilder",
"(",
"getUrl",
"(",
")",
")",
";",
"if",
"(",
"getUrl",
"(",
")",
".",
... | Write the value to url params
@param key key
@param value value
@return this request | [
"Write",
"the",
"value",
"to",
"url",
"params"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L572-L584 |
149,117 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.param | public OkRequest<T> param(final Map.Entry<String, String> entry) {
return param(entry.getKey(), entry.getValue());
} | java | public OkRequest<T> param(final Map.Entry<String, String> entry) {
return param(entry.getKey(), entry.getValue());
} | [
"public",
"OkRequest",
"<",
"T",
">",
"param",
"(",
"final",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
")",
"{",
"return",
"param",
"(",
"entry",
".",
"getKey",
"(",
")",
",",
"entry",
".",
"getValue",
"(",
")",
")",
";",
"... | Write the map entry to url params
@param entry map entry
@return this request | [
"Write",
"the",
"map",
"entry",
"to",
"url",
"params"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L592-L594 |
149,118 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.params | public OkRequest<T> params(final Map<String, String> values) {
if (!values.isEmpty()) {
for (Map.Entry<String, String> entry : values.entrySet()) {
param(entry);
}
}
return this;
} | java | public OkRequest<T> params(final Map<String, String> values) {
if (!values.isEmpty()) {
for (Map.Entry<String, String> entry : values.entrySet()) {
param(entry);
}
}
return this;
} | [
"public",
"OkRequest",
"<",
"T",
">",
"params",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"values",
")",
"{",
"if",
"(",
"!",
"values",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String... | Write the map to url params
@param values map
@return this request | [
"Write",
"the",
"map",
"to",
"url",
"params"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L602-L609 |
149,119 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.headers | public OkRequest<T> headers(final Map<String, String> headers) {
if (!headers.isEmpty())
for (Map.Entry<String, String> header : headers.entrySet())
header(header);
return this;
} | java | public OkRequest<T> headers(final Map<String, String> headers) {
if (!headers.isEmpty())
for (Map.Entry<String, String> header : headers.entrySet())
header(header);
return this;
} | [
"public",
"OkRequest",
"<",
"T",
">",
"headers",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
")",
"{",
"if",
"(",
"!",
"headers",
".",
"isEmpty",
"(",
")",
")",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
... | Set all headers found in given map where the keys are the header names and
the values are the header values
@param headers
@return this request | [
"Set",
"all",
"headers",
"found",
"in",
"given",
"map",
"where",
"the",
"keys",
"are",
"the",
"header",
"names",
"and",
"the",
"values",
"are",
"the",
"header",
"values"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L641-L646 |
149,120 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.header | public OkRequest<T> header(final Map.Entry<String, String> header) {
return header(header.getKey(), header.getValue());
} | java | public OkRequest<T> header(final Map.Entry<String, String> header) {
return header(header.getKey(), header.getValue());
} | [
"public",
"OkRequest",
"<",
"T",
">",
"header",
"(",
"final",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"header",
")",
"{",
"return",
"header",
"(",
"header",
".",
"getKey",
"(",
")",
",",
"header",
".",
"getValue",
"(",
")",
")",
";"... | Set header to have given entry's key as the name and value as the value
@param header
@return this request | [
"Set",
"header",
"to",
"have",
"given",
"entry",
"s",
"key",
"as",
"the",
"name",
"and",
"value",
"as",
"the",
"value"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L654-L656 |
149,121 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.getHeaders | @Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> headers = super.getHeaders();
if (!mRequestHeaders.isEmpty()) {
if (headers.isEmpty()) {
return mRequestHeaders;
} else {
headers.putAll(mRequestHea... | java | @Override
public Map<String, String> getHeaders() throws AuthFailureError {
Map<String, String> headers = super.getHeaders();
if (!mRequestHeaders.isEmpty()) {
if (headers.isEmpty()) {
return mRequestHeaders;
} else {
headers.putAll(mRequestHea... | [
"@",
"Override",
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getHeaders",
"(",
")",
"throws",
"AuthFailureError",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
"=",
"super",
".",
"getHeaders",
"(",
")",
";",
"if",
"(",
"!",
"mReque... | get request header | [
"get",
"request",
"header"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L780-L791 |
149,122 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/OkRequest.java | OkRequest.getBody | @Override
public byte[] getBody() throws AuthFailureError {
if (mOutput == null) {
openOutput();
}
try {
if (mMultipart) {
mOutput.write(CRLF + "--" + BOUNDARY + "--" + CRLF);
}
return mOutput.toByteArray();
} catch (IO... | java | @Override
public byte[] getBody() throws AuthFailureError {
if (mOutput == null) {
openOutput();
}
try {
if (mMultipart) {
mOutput.write(CRLF + "--" + BOUNDARY + "--" + CRLF);
}
return mOutput.toByteArray();
} catch (IO... | [
"@",
"Override",
"public",
"byte",
"[",
"]",
"getBody",
"(",
")",
"throws",
"AuthFailureError",
"{",
"if",
"(",
"mOutput",
"==",
"null",
")",
"{",
"openOutput",
"(",
")",
";",
"}",
"try",
"{",
"if",
"(",
"mMultipart",
")",
"{",
"mOutput",
".",
"write... | get request body | [
"get",
"request",
"body"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/OkRequest.java#L841-L864 |
149,123 | socialsensor/socialsensor-framework-client | src/main/java/eu/socialsensor/framework/client/search/visual/VisualIndexHandler.java | VisualIndexHandler.getSimilarImages | public JsonResultSet getSimilarImages(String imageId, double threshold) {
JsonResultSet similar = new JsonResultSet();
PostMethod queryMethod = null;
String response = null;
try {
Part[] parts = {
new StringPart("id", imageId),
new StringPart("t... | java | public JsonResultSet getSimilarImages(String imageId, double threshold) {
JsonResultSet similar = new JsonResultSet();
PostMethod queryMethod = null;
String response = null;
try {
Part[] parts = {
new StringPart("id", imageId),
new StringPart("t... | [
"public",
"JsonResultSet",
"getSimilarImages",
"(",
"String",
"imageId",
",",
"double",
"threshold",
")",
"{",
"JsonResultSet",
"similar",
"=",
"new",
"JsonResultSet",
"(",
")",
";",
"PostMethod",
"queryMethod",
"=",
"null",
";",
"String",
"response",
"=",
"null... | Get similar images for a specific media item
@param imageId
@param threshold
@return | [
"Get",
"similar",
"images",
"for",
"a",
"specific",
"media",
"item"
] | 67cd45c5d8e096d5f76ace49f453ff6438920473 | https://github.com/socialsensor/socialsensor-framework-client/blob/67cd45c5d8e096d5f76ace49f453ff6438920473/src/main/java/eu/socialsensor/framework/client/search/visual/VisualIndexHandler.java#L74-L111 |
149,124 | socialsensor/socialsensor-framework-client | src/main/java/eu/socialsensor/framework/client/search/visual/VisualIndexHandler.java | VisualIndexHandler.getSimilarImagesAndIndex | public JsonResultSet getSimilarImagesAndIndex(String id, double[] vector, double threshold) {
JsonResultSet similar = new JsonResultSet();
byte[] vectorInBytes = new byte[8 * vector.length];
ByteBuffer bbuf = ByteBuffer.wrap(vectorInBytes);
for (double value : vector) {
bbuf.p... | java | public JsonResultSet getSimilarImagesAndIndex(String id, double[] vector, double threshold) {
JsonResultSet similar = new JsonResultSet();
byte[] vectorInBytes = new byte[8 * vector.length];
ByteBuffer bbuf = ByteBuffer.wrap(vectorInBytes);
for (double value : vector) {
bbuf.p... | [
"public",
"JsonResultSet",
"getSimilarImagesAndIndex",
"(",
"String",
"id",
",",
"double",
"[",
"]",
"vector",
",",
"double",
"threshold",
")",
"{",
"JsonResultSet",
"similar",
"=",
"new",
"JsonResultSet",
"(",
")",
";",
"byte",
"[",
"]",
"vectorInBytes",
"=",... | Get similar images by vector
@param vector
@param threshold
@return | [
"Get",
"similar",
"images",
"by",
"vector"
] | 67cd45c5d8e096d5f76ace49f453ff6438920473 | https://github.com/socialsensor/socialsensor-framework-client/blob/67cd45c5d8e096d5f76ace49f453ff6438920473/src/main/java/eu/socialsensor/framework/client/search/visual/VisualIndexHandler.java#L267-L308 |
149,125 | foundation-runtime/configuration | configuration-lib/src/main/java/com/cisco/oss/foundation/configuration/ConfigResourcesLoader.java | ConfigResourcesLoader.afterPropertiesSet | @Override
public void afterPropertiesSet() throws Exception { // NOPMD
final boolean isQCEnabld = isQCEnabled();
// iterator over the list of possible external resources
// only one of the resources should exist
// this is to support special locations on special modules such as: We... | java | @Override
public void afterPropertiesSet() throws Exception { // NOPMD
final boolean isQCEnabld = isQCEnabled();
// iterator over the list of possible external resources
// only one of the resources should exist
// this is to support special locations on special modules such as: We... | [
"@",
"Override",
"public",
"void",
"afterPropertiesSet",
"(",
")",
"throws",
"Exception",
"{",
"// NOPMD",
"final",
"boolean",
"isQCEnabld",
"=",
"isQCEnabled",
"(",
")",
";",
"// iterator over the list of possible external resources",
"// only one of the resources should exi... | fill the resourcesList only once. return it in the getObject method. | [
"fill",
"the",
"resourcesList",
"only",
"once",
".",
"return",
"it",
"in",
"the",
"getObject",
"method",
"."
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-lib/src/main/java/com/cisco/oss/foundation/configuration/ConfigResourcesLoader.java#L173-L257 |
149,126 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.abbreviate | public static String abbreviate(String _str, int _length) {
if (_str == null) {
return null;
}
if (_str.length() <= _length) {
return _str;
}
String abbr = _str.substring(0, _length -3) + "...";
return abbr;
} | java | public static String abbreviate(String _str, int _length) {
if (_str == null) {
return null;
}
if (_str.length() <= _length) {
return _str;
}
String abbr = _str.substring(0, _length -3) + "...";
return abbr;
} | [
"public",
"static",
"String",
"abbreviate",
"(",
"String",
"_str",
",",
"int",
"_length",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"_str",
".",
"length",
"(",
")",
"<=",
"_length",
")",
"{",
"retur... | Abbreviates a String using ellipses.
@param _str string to abbrivate
@param _length max length
@return abbreviated string, original string if string length is lower or equal then desired length or null if input was null | [
"Abbreviates",
"a",
"String",
"using",
"ellipses",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L43-L54 |
149,127 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.strAppender | private static int strAppender(String[] _text, StringBuilder _sbResult, int _beginIdx, int _len) {
if (_text == null || _sbResult == null) {
return -1;
}
if (_beginIdx > _text.length) {
return _text.length;
}
int i = _beginIdx;
for (i = _beginIdx; ... | java | private static int strAppender(String[] _text, StringBuilder _sbResult, int _beginIdx, int _len) {
if (_text == null || _sbResult == null) {
return -1;
}
if (_beginIdx > _text.length) {
return _text.length;
}
int i = _beginIdx;
for (i = _beginIdx; ... | [
"private",
"static",
"int",
"strAppender",
"(",
"String",
"[",
"]",
"_text",
",",
"StringBuilder",
"_sbResult",
",",
"int",
"_beginIdx",
",",
"int",
"_len",
")",
"{",
"if",
"(",
"_text",
"==",
"null",
"||",
"_sbResult",
"==",
"null",
")",
"{",
"return",
... | Internally used by smartStringSplit to recombine the string until the expected length is reached.
@param _text string array to process
@param _sbResult resulting line
@param _beginIdx start index of string array
@param _len line length
@return last position in string array or -1 if _text or _sbResult is null | [
"Internally",
"used",
"by",
"smartStringSplit",
"to",
"recombine",
"the",
"string",
"until",
"the",
"expected",
"length",
"is",
"reached",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L105-L139 |
149,128 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.splitEqually | public static List<String> splitEqually(String _text, int _len) {
if (_text == null) {
return null;
}
List<String> ret = new ArrayList<String>((_text.length() + _len - 1) / _len);
for (int start = 0; start < _text.length(); start += _len) {
ret.add(_text.substrin... | java | public static List<String> splitEqually(String _text, int _len) {
if (_text == null) {
return null;
}
List<String> ret = new ArrayList<String>((_text.length() + _len - 1) / _len);
for (int start = 0; start < _text.length(); start += _len) {
ret.add(_text.substrin... | [
"public",
"static",
"List",
"<",
"String",
">",
"splitEqually",
"(",
"String",
"_text",
",",
"int",
"_len",
")",
"{",
"if",
"(",
"_text",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"List",
"<",
"String",
">",
"ret",
"=",
"new",
"ArrayList",
... | Splits a Text to equal parts.
There is no detection of words, everything will be cut to the same length.
@param _text text to split
@param _len max length per line
@return list of string splitted to _len or null if _text was null | [
"Splits",
"a",
"Text",
"to",
"equal",
"parts",
".",
"There",
"is",
"no",
"detection",
"of",
"words",
"everything",
"will",
"be",
"cut",
"to",
"the",
"same",
"length",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L149-L159 |
149,129 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.replaceByMap | public static String replaceByMap(String _searchStr, Map<String, String> _replacements) {
if (_searchStr == null) {
return null;
}
if (_replacements == null || _replacements.isEmpty()) {
return _searchStr;
}
String str = _searchStr;
for (Entry<St... | java | public static String replaceByMap(String _searchStr, Map<String, String> _replacements) {
if (_searchStr == null) {
return null;
}
if (_replacements == null || _replacements.isEmpty()) {
return _searchStr;
}
String str = _searchStr;
for (Entry<St... | [
"public",
"static",
"String",
"replaceByMap",
"(",
"String",
"_searchStr",
",",
"Map",
"<",
"String",
",",
"String",
">",
"_replacements",
")",
"{",
"if",
"(",
"_searchStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"_replacements",
... | Replace all placeholders in given string by value of the corresponding key in given Map.
@param _searchStr search string
@param _replacements replacement
@return String or null if _searchStr was null | [
"Replace",
"all",
"placeholders",
"in",
"given",
"string",
"by",
"value",
"of",
"the",
"corresponding",
"key",
"in",
"given",
"Map",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L168-L183 |
149,130 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.lowerCaseFirstChar | public static String lowerCaseFirstChar(String _str) {
if (_str == null) {
return null;
}
if (_str.isEmpty()) {
return _str;
}
return _str.substring(0, 1).toLowerCase() + _str.substring(1);
} | java | public static String lowerCaseFirstChar(String _str) {
if (_str == null) {
return null;
}
if (_str.isEmpty()) {
return _str;
}
return _str.substring(0, 1).toLowerCase() + _str.substring(1);
} | [
"public",
"static",
"String",
"lowerCaseFirstChar",
"(",
"String",
"_str",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"_str",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"_str",
";",
"}",
"return",
... | Lower case the first letter of the given string.
@param _str string
@return lowercased string | [
"Lower",
"case",
"the",
"first",
"letter",
"of",
"the",
"given",
"string",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L191-L200 |
149,131 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.upperCaseFirstChar | public static String upperCaseFirstChar(String _str) {
if (_str == null) {
return null;
}
if (_str.isEmpty()) {
return _str;
}
return _str.substring(0, 1).toUpperCase() + _str.substring(1);
} | java | public static String upperCaseFirstChar(String _str) {
if (_str == null) {
return null;
}
if (_str.isEmpty()) {
return _str;
}
return _str.substring(0, 1).toUpperCase() + _str.substring(1);
} | [
"public",
"static",
"String",
"upperCaseFirstChar",
"(",
"String",
"_str",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"_str",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"_str",
";",
"}",
"return",
... | Upper case the first letter of the given string.
@param _str string
@return uppercased string | [
"Upper",
"case",
"the",
"first",
"letter",
"of",
"the",
"given",
"string",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L208-L216 |
149,132 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.rot13 | public static String rot13(String _input) {
if (_input == null) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < _input.length(); i++) {
char c = _input.charAt(i);
if (c >= 'a' && c <= 'm') {
c += 13;
... | java | public static String rot13(String _input) {
if (_input == null) {
return null;
}
StringBuilder sb = new StringBuilder();
for (int i = 0; i < _input.length(); i++) {
char c = _input.charAt(i);
if (c >= 'a' && c <= 'm') {
c += 13;
... | [
"public",
"static",
"String",
"rot13",
"(",
"String",
"_input",
")",
"{",
"if",
"(",
"_input",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
... | Simple rot13 implementation.
@param _input input to scramble
@return scrambled input (null if input was null) | [
"Simple",
"rot13",
"implementation",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L224-L243 |
149,133 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.convertUpperToCamelCase | public static String convertUpperToCamelCase(String _str) {
if (_str == null || isBlank(_str)) {
return _str;
} else if (!_str.contains("_")) {
return (_str.charAt(0) + "").toUpperCase() + _str.substring(1);
}
StringBuffer sb = new StringBuffer(String.valueOf(_st... | java | public static String convertUpperToCamelCase(String _str) {
if (_str == null || isBlank(_str)) {
return _str;
} else if (!_str.contains("_")) {
return (_str.charAt(0) + "").toUpperCase() + _str.substring(1);
}
StringBuffer sb = new StringBuffer(String.valueOf(_st... | [
"public",
"static",
"String",
"convertUpperToCamelCase",
"(",
"String",
"_str",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
"||",
"isBlank",
"(",
"_str",
")",
")",
"{",
"return",
"_str",
";",
"}",
"else",
"if",
"(",
"!",
"_str",
".",
"contains",
"(",
... | Tries to convert upper-case string to camel-case.
The given string will be analyzed and all string parts preceded by an underline character will be
converted to upper-case, all other following characters to lower-case.
@param _str string to convert
@return converted string or original string if there was nothing to do | [
"Tries",
"to",
"convert",
"upper",
"-",
"case",
"string",
"to",
"camel",
"-",
"case",
".",
"The",
"given",
"string",
"will",
"be",
"analyzed",
"and",
"all",
"string",
"parts",
"preceded",
"by",
"an",
"underline",
"character",
"will",
"be",
"converted",
"to... | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L437-L456 |
149,134 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.containsAny | public static boolean containsAny(boolean _ignoreCase, String _str, String... _args) {
if (_str == null || _args == null || _args.length == 0) {
return false;
}
String heystack = _str;
if (_ignoreCase) {
heystack = _str.toLowerCase();
}
for (Strin... | java | public static boolean containsAny(boolean _ignoreCase, String _str, String... _args) {
if (_str == null || _args == null || _args.length == 0) {
return false;
}
String heystack = _str;
if (_ignoreCase) {
heystack = _str.toLowerCase();
}
for (Strin... | [
"public",
"static",
"boolean",
"containsAny",
"(",
"boolean",
"_ignoreCase",
",",
"String",
"_str",
",",
"String",
"...",
"_args",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
"||",
"_args",
"==",
"null",
"||",
"_args",
".",
"length",
"==",
"0",
")",
"{"... | Checks if any of the given strings in _args is contained in _str.
@param _ignoreCase true to ignore case, false to be case sensitive
@param _str string to check
@param _args patterns to find
@return true if any string in _args is found in _str, false if not or _str/_args is null | [
"Checks",
"if",
"any",
"of",
"the",
"given",
"strings",
"in",
"_args",
"is",
"contained",
"in",
"_str",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L495-L512 |
149,135 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.endsWithAny | public static boolean endsWithAny(boolean _ignoreCase, String _str, String... _args) {
if (_str == null || _args == null || _args.length == 0) {
return false;
}
String heystack = _str;
if (_ignoreCase) {
heystack = _str.toLowerCase();
}
for (Strin... | java | public static boolean endsWithAny(boolean _ignoreCase, String _str, String... _args) {
if (_str == null || _args == null || _args.length == 0) {
return false;
}
String heystack = _str;
if (_ignoreCase) {
heystack = _str.toLowerCase();
}
for (Strin... | [
"public",
"static",
"boolean",
"endsWithAny",
"(",
"boolean",
"_ignoreCase",
",",
"String",
"_str",
",",
"String",
"...",
"_args",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
"||",
"_args",
"==",
"null",
"||",
"_args",
".",
"length",
"==",
"0",
")",
"{"... | Checks if given string in _str ends with any of the given strings in _args.
@param _ignoreCase true to ignore case, false to be case sensitive
@param _str string to check
@param _args patterns to find
@return true if given string in _str ends with any of the given strings in _args, false if not or _str/_args is null | [
"Checks",
"if",
"given",
"string",
"in",
"_str",
"ends",
"with",
"any",
"of",
"the",
"given",
"strings",
"in",
"_args",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L521-L538 |
149,136 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/StringUtil.java | StringUtil.startsWithAny | public static boolean startsWithAny(boolean _ignoreCase, String _str, String... _args) {
if (_str == null || _args == null || _args.length == 0) {
return false;
}
String heystack = _str;
if (_ignoreCase) {
heystack = _str.toLowerCase();
}
for (Str... | java | public static boolean startsWithAny(boolean _ignoreCase, String _str, String... _args) {
if (_str == null || _args == null || _args.length == 0) {
return false;
}
String heystack = _str;
if (_ignoreCase) {
heystack = _str.toLowerCase();
}
for (Str... | [
"public",
"static",
"boolean",
"startsWithAny",
"(",
"boolean",
"_ignoreCase",
",",
"String",
"_str",
",",
"String",
"...",
"_args",
")",
"{",
"if",
"(",
"_str",
"==",
"null",
"||",
"_args",
"==",
"null",
"||",
"_args",
".",
"length",
"==",
"0",
")",
"... | Checks if given string in _str starts with any of the given strings in _args.
@param _ignoreCase true to ignore case, false to be case sensitive
@param _str string to check
@param _args patterns to find
@return true if given string in _str starts with any of the given strings in _args, false if not or _str/_args is nul... | [
"Checks",
"if",
"given",
"string",
"in",
"_str",
"starts",
"with",
"any",
"of",
"the",
"given",
"strings",
"in",
"_args",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/StringUtil.java#L547-L564 |
149,137 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/PROTEMPAConflictResolver.java | PROTEMPAConflictResolver.compare | @Override
public int compare(Activation a1, Activation a2) {
//Salience-based conflict resolution.
final int s1 = a1.getSalience();
final int s2 = a2.getSalience();
if (s1 > s2) {
return -1;
} else if (s1 < s2) {
return 1;
}
//Propagat... | java | @Override
public int compare(Activation a1, Activation a2) {
//Salience-based conflict resolution.
final int s1 = a1.getSalience();
final int s2 = a2.getSalience();
if (s1 > s2) {
return -1;
} else if (s1 < s2) {
return 1;
}
//Propagat... | [
"@",
"Override",
"public",
"int",
"compare",
"(",
"Activation",
"a1",
",",
"Activation",
"a2",
")",
"{",
"//Salience-based conflict resolution.",
"final",
"int",
"s1",
"=",
"a1",
".",
"getSalience",
"(",
")",
";",
"final",
"int",
"s2",
"=",
"a2",
".",
"get... | Compares two activations for order. Sequentially tries salience-,
propagation-, recency-, topological- and
load order-based conflict resolution. The first of these conflict
resolution attempts that successfully finds a non-equal ordering of
the two activations immediately returns the ordering found.
@param a1 an {@lin... | [
"Compares",
"two",
"activations",
"for",
"order",
".",
"Sequentially",
"tries",
"salience",
"-",
"propagation",
"-",
"recency",
"-",
"topological",
"-",
"and",
"load",
"order",
"-",
"based",
"conflict",
"resolution",
".",
"The",
"first",
"of",
"these",
"confli... | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/PROTEMPAConflictResolver.java#L89-L136 |
149,138 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/TimeMeasure.java | TimeMeasure.getElapsedFormatted | String getElapsedFormatted(DateFormat _dateFormat, long _elapsedTime) {
Date elapsedTime = new Date(_elapsedTime);
DateFormat sdf = _dateFormat;
if (_dateFormat == null) {
sdf = new SimpleDateFormat("HH:mm:ss.SSS");
}
sdf.setTimeZone(TimeZone.getTimeZone("UTC")); // ... | java | String getElapsedFormatted(DateFormat _dateFormat, long _elapsedTime) {
Date elapsedTime = new Date(_elapsedTime);
DateFormat sdf = _dateFormat;
if (_dateFormat == null) {
sdf = new SimpleDateFormat("HH:mm:ss.SSS");
}
sdf.setTimeZone(TimeZone.getTimeZone("UTC")); // ... | [
"String",
"getElapsedFormatted",
"(",
"DateFormat",
"_dateFormat",
",",
"long",
"_elapsedTime",
")",
"{",
"Date",
"elapsedTime",
"=",
"new",
"Date",
"(",
"_elapsedTime",
")",
";",
"DateFormat",
"sdf",
"=",
"_dateFormat",
";",
"if",
"(",
"_dateFormat",
"==",
"n... | Same as above, used for proper unit testing.
@param _dateFormat
@param _elapsedTime
@return formatted string | [
"Same",
"as",
"above",
"used",
"for",
"proper",
"unit",
"testing",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/TimeMeasure.java#L89-L99 |
149,139 | rolfl/MicroBench | src/main/java/net/tuis/ubench/TaskRunner.java | TaskRunner.expandTo | private static int expandTo(int length) {
// add 25% + 100 - limit to Integer.Max
int toAdd = 100 + (length >> 2);
toAdd = Math.min(UBench.MAX_RESULTS - length, toAdd);
return toAdd == 0 ? -1 : toAdd + length;
} | java | private static int expandTo(int length) {
// add 25% + 100 - limit to Integer.Max
int toAdd = 100 + (length >> 2);
toAdd = Math.min(UBench.MAX_RESULTS - length, toAdd);
return toAdd == 0 ? -1 : toAdd + length;
} | [
"private",
"static",
"int",
"expandTo",
"(",
"int",
"length",
")",
"{",
"// add 25% + 100 - limit to Integer.Max",
"int",
"toAdd",
"=",
"100",
"+",
"(",
"length",
">>",
"2",
")",
";",
"toAdd",
"=",
"Math",
".",
"min",
"(",
"UBench",
".",
"MAX_RESULTS",
"-"... | Compute the length of the results array with some space for growth
@param length
the current length
@return the desired length | [
"Compute",
"the",
"length",
"of",
"the",
"results",
"array",
"with",
"some",
"space",
"for",
"growth"
] | f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce | https://github.com/rolfl/MicroBench/blob/f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce/src/main/java/net/tuis/ubench/TaskRunner.java#L22-L27 |
149,140 | rolfl/MicroBench | src/main/java/net/tuis/ubench/TaskRunner.java | TaskRunner.inBounds | private static final boolean inBounds(final long[] times, final double bound) {
long min = times[0];
long max = times[0];
long limit = (long) (min * bound);
for (int i = 1; i < times.length; i++) {
if (times[i] < min) {
min = times[i];
limit = ... | java | private static final boolean inBounds(final long[] times, final double bound) {
long min = times[0];
long max = times[0];
long limit = (long) (min * bound);
for (int i = 1; i < times.length; i++) {
if (times[i] < min) {
min = times[i];
limit = ... | [
"private",
"static",
"final",
"boolean",
"inBounds",
"(",
"final",
"long",
"[",
"]",
"times",
",",
"final",
"double",
"bound",
")",
"{",
"long",
"min",
"=",
"times",
"[",
"0",
"]",
";",
"long",
"max",
"=",
"times",
"[",
"0",
"]",
";",
"long",
"limi... | Compute whether any of the values in times exceed the given bound,
relative to the minimum value in times.
@param times
the times to compute the bounds on
@param bound
the bound is represented as a value like 1.10 for 10% greater
than the minimum
@return true if all values are in bounds. | [
"Compute",
"whether",
"any",
"of",
"the",
"values",
"in",
"times",
"exceed",
"the",
"given",
"bound",
"relative",
"to",
"the",
"minimum",
"value",
"in",
"times",
"."
] | f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce | https://github.com/rolfl/MicroBench/blob/f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce/src/main/java/net/tuis/ubench/TaskRunner.java#L40-L61 |
149,141 | rolfl/MicroBench | src/main/java/net/tuis/ubench/TaskRunner.java | TaskRunner.invoke | boolean invoke() {
if (complete) {
return complete;
}
if (iterations >= results.length) {
int newlen = expandTo(results.length);
if (newlen < 0) {
complete = true;
return complete;
}
results = Arrays.cop... | java | boolean invoke() {
if (complete) {
return complete;
}
if (iterations >= results.length) {
int newlen = expandTo(results.length);
if (newlen < 0) {
complete = true;
return complete;
}
results = Arrays.cop... | [
"boolean",
"invoke",
"(",
")",
"{",
"if",
"(",
"complete",
")",
"{",
"return",
"complete",
";",
"}",
"if",
"(",
"iterations",
">=",
"results",
".",
"length",
")",
"{",
"int",
"newlen",
"=",
"expandTo",
"(",
"results",
".",
"length",
")",
";",
"if",
... | Perform a single additional iteration of the task.
@return true if this task is now complete. | [
"Perform",
"a",
"single",
"additional",
"iteration",
"of",
"the",
"task",
"."
] | f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce | https://github.com/rolfl/MicroBench/blob/f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce/src/main/java/net/tuis/ubench/TaskRunner.java#L92-L122 |
149,142 | rolfl/MicroBench | src/main/java/net/tuis/ubench/TaskRunner.java | TaskRunner.collect | UStats collect(String suite) {
return new UStats(suite, name, index, Arrays.copyOf(results, iterations));
} | java | UStats collect(String suite) {
return new UStats(suite, name, index, Arrays.copyOf(results, iterations));
} | [
"UStats",
"collect",
"(",
"String",
"suite",
")",
"{",
"return",
"new",
"UStats",
"(",
"suite",
",",
"name",
",",
"index",
",",
"Arrays",
".",
"copyOf",
"(",
"results",
",",
"iterations",
")",
")",
";",
"}"
] | Collect all statistics in to a single public UStats instance.
@param suite
the name of the test suite this task is part of.
@return the UStats instance containing the data for statistical analysis | [
"Collect",
"all",
"statistics",
"in",
"to",
"a",
"single",
"public",
"UStats",
"instance",
"."
] | f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce | https://github.com/rolfl/MicroBench/blob/f2bfa92dacd7ea0d6b8eae4d4fe2975139d317ce/src/main/java/net/tuis/ubench/TaskRunner.java#L131-L133 |
149,143 | foundation-runtime/configuration | configuration-api/src/main/java/com/cisco/oss/foundation/configuration/xml/NamespaceDefinitionMessage.java | NamespaceDefinitionMessage.sortByDependencies | public List<NamespaceDefinition> sortByDependencies() throws XmlException {
ArrayList<NamespaceDefinition> sorted = new ArrayList<NamespaceDefinition>();
Map<Namespace, List<String>> namespaceMap = createNamespaceMap(jaxb.getNamespaceDefinitions());
NamespaceDefinition def = null;
do ... | java | public List<NamespaceDefinition> sortByDependencies() throws XmlException {
ArrayList<NamespaceDefinition> sorted = new ArrayList<NamespaceDefinition>();
Map<Namespace, List<String>> namespaceMap = createNamespaceMap(jaxb.getNamespaceDefinitions());
NamespaceDefinition def = null;
do ... | [
"public",
"List",
"<",
"NamespaceDefinition",
">",
"sortByDependencies",
"(",
")",
"throws",
"XmlException",
"{",
"ArrayList",
"<",
"NamespaceDefinition",
">",
"sorted",
"=",
"new",
"ArrayList",
"<",
"NamespaceDefinition",
">",
"(",
")",
";",
"Map",
"<",
"Namesp... | A NamespaceDefinition cannot be injected into the DB unless it's dependencies are injected first.
This method will sort the given list of NamespaceDefinitions by dependency.
If dependencies are missing, or circular dependencies exist such that there aren't any NamespaceDefinitions without dependencies
a XmlException w... | [
"A",
"NamespaceDefinition",
"cannot",
"be",
"injected",
"into",
"the",
"DB",
"unless",
"it",
"s",
"dependencies",
"are",
"injected",
"first",
".",
"This",
"method",
"will",
"sort",
"the",
"given",
"list",
"of",
"NamespaceDefinitions",
"by",
"dependency",
"."
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/xml/NamespaceDefinitionMessage.java#L83-L98 |
149,144 | foundation-runtime/configuration | configuration-api/src/main/java/com/cisco/oss/foundation/configuration/xml/NamespaceDefinitionMessage.java | NamespaceDefinitionMessage.createNamespaceMap | protected Map<Namespace, List<String>> createNamespaceMap(List<NamespaceDefinition> namespaceDefs) throws XmlException {
ArrayList<Namespace> namespaces = new ArrayList<Namespace>();
// add all root namespaces
for(NamespaceDefinition namespaceDef: namespaceDefs) {
Namespace node = n... | java | protected Map<Namespace, List<String>> createNamespaceMap(List<NamespaceDefinition> namespaceDefs) throws XmlException {
ArrayList<Namespace> namespaces = new ArrayList<Namespace>();
// add all root namespaces
for(NamespaceDefinition namespaceDef: namespaceDefs) {
Namespace node = n... | [
"protected",
"Map",
"<",
"Namespace",
",",
"List",
"<",
"String",
">",
">",
"createNamespaceMap",
"(",
"List",
"<",
"NamespaceDefinition",
">",
"namespaceDefs",
")",
"throws",
"XmlException",
"{",
"ArrayList",
"<",
"Namespace",
">",
"namespaces",
"=",
"new",
"... | Checks that there aren't namespaces that depend on namespaces that don't exist in the list,
and creates a list of all Namespace Objects in the list.
@throws XmlException if there are any dependencies missing. | [
"Checks",
"that",
"there",
"aren",
"t",
"namespaces",
"that",
"depend",
"on",
"namespaces",
"that",
"don",
"t",
"exist",
"in",
"the",
"list",
"and",
"creates",
"a",
"list",
"of",
"all",
"Namespace",
"Objects",
"in",
"the",
"list",
"."
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/xml/NamespaceDefinitionMessage.java#L129-L163 |
149,145 | foundation-runtime/configuration | configuration-api/src/main/java/com/cisco/oss/foundation/configuration/xml/NamespaceDefinitionMessage.java | NamespaceDefinitionMessage.addDependenciesRecursively | protected void addDependenciesRecursively(Namespace namespace, List<Namespace> namespaceList, String dependencyId, List<String> extendedDependencies) throws XmlException {
if(extendedDependencies.contains(dependencyId)) {
return;
}
if(namespace.getId().equals(dependencyId)) {
... | java | protected void addDependenciesRecursively(Namespace namespace, List<Namespace> namespaceList, String dependencyId, List<String> extendedDependencies) throws XmlException {
if(extendedDependencies.contains(dependencyId)) {
return;
}
if(namespace.getId().equals(dependencyId)) {
... | [
"protected",
"void",
"addDependenciesRecursively",
"(",
"Namespace",
"namespace",
",",
"List",
"<",
"Namespace",
">",
"namespaceList",
",",
"String",
"dependencyId",
",",
"List",
"<",
"String",
">",
"extendedDependencies",
")",
"throws",
"XmlException",
"{",
"if",
... | Adds dependencyId, and all of it's depdencies recursively using namespaceList, to extendedDependencies for namespace.
@throws XmlException | [
"Adds",
"dependencyId",
"and",
"all",
"of",
"it",
"s",
"depdencies",
"recursively",
"using",
"namespaceList",
"to",
"extendedDependencies",
"for",
"namespace",
"."
] | c5bd171a2cca0dc1c8d568f987843ca47c6d1eed | https://github.com/foundation-runtime/configuration/blob/c5bd171a2cca0dc1c8d568f987843ca47c6d1eed/configuration-api/src/main/java/com/cisco/oss/foundation/configuration/xml/NamespaceDefinitionMessage.java#L169-L182 |
149,146 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/CompoundLowLevelAbstractionDefinition.java | CompoundLowLevelAbstractionDefinition.addValueClassification | public void addValueClassification(
ValueClassification valueClassification) {
if (valueClassification == null) {
throw new IllegalArgumentException(
"valueClassification cannot be null");
}
if (!classificationMatrix.containsKey(valueClassification.val... | java | public void addValueClassification(
ValueClassification valueClassification) {
if (valueClassification == null) {
throw new IllegalArgumentException(
"valueClassification cannot be null");
}
if (!classificationMatrix.containsKey(valueClassification.val... | [
"public",
"void",
"addValueClassification",
"(",
"ValueClassification",
"valueClassification",
")",
"{",
"if",
"(",
"valueClassification",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"valueClassification cannot be null\"",
")",
";",
"}",
"... | Adds a value classification for the abstraction. If a classification of
the provided name doesn't exist, then it is created. The value definition
name must be one of the values applicable to the low-level abstraction
whose ID is also passed in.
@param id the name of the value definition
@param lowLevelAbstractionId th... | [
"Adds",
"a",
"value",
"classification",
"for",
"the",
"abstraction",
".",
"If",
"a",
"classification",
"of",
"the",
"provided",
"name",
"doesn",
"t",
"exist",
"then",
"it",
"is",
"created",
".",
"The",
"value",
"definition",
"name",
"must",
"be",
"one",
"o... | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/CompoundLowLevelAbstractionDefinition.java#L242-L257 |
149,147 | openbase/jul | exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java | ExceptionPrinter.getHistory | public static String getHistory(final Throwable th) {
VariablePrinter printer = new VariablePrinter();
printHistory(th, printer);
return printer.getMessages();
} | java | public static String getHistory(final Throwable th) {
VariablePrinter printer = new VariablePrinter();
printHistory(th, printer);
return printer.getMessages();
} | [
"public",
"static",
"String",
"getHistory",
"(",
"final",
"Throwable",
"th",
")",
"{",
"VariablePrinter",
"printer",
"=",
"new",
"VariablePrinter",
"(",
")",
";",
"printHistory",
"(",
"th",
",",
"printer",
")",
";",
"return",
"printer",
".",
"getMessages",
"... | Generates a human readable Exception cause chain of the given Exception as String representation.
@param th the Throwable to process the StackTrace.
@return A History description as String. | [
"Generates",
"a",
"human",
"readable",
"Exception",
"cause",
"chain",
"of",
"the",
"given",
"Exception",
"as",
"String",
"representation",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java#L323-L327 |
149,148 | openbase/jul | exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java | ExceptionPrinter.printVerboseMessage | public static void printVerboseMessage(final String message, final Logger logger) {
try {
if (JPService.getProperty(JPVerbose.class).getValue()) {
logger.info(message);
} else {
logger.debug(message);
}
} catch (final JPServiceException... | java | public static void printVerboseMessage(final String message, final Logger logger) {
try {
if (JPService.getProperty(JPVerbose.class).getValue()) {
logger.info(message);
} else {
logger.debug(message);
}
} catch (final JPServiceException... | [
"public",
"static",
"void",
"printVerboseMessage",
"(",
"final",
"String",
"message",
",",
"final",
"Logger",
"logger",
")",
"{",
"try",
"{",
"if",
"(",
"JPService",
".",
"getProperty",
"(",
"JPVerbose",
".",
"class",
")",
".",
"getValue",
"(",
")",
")",
... | Method prints the given message only in verbose mode on the INFO channel, otherwise the DEBUG channel is used for printing.
@param message the message to print
@param logger the logger which is used for the message logging. | [
"Method",
"prints",
"the",
"given",
"message",
"only",
"in",
"verbose",
"mode",
"on",
"the",
"INFO",
"channel",
"otherwise",
"the",
"DEBUG",
"channel",
"is",
"used",
"for",
"printing",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java#L438-L449 |
149,149 | vtatai/srec | core/src/main/java/com/github/srec/jemmy/JemmyDSL.java | JemmyDSL.find | public static Component find(String locator, String id, String componentType, boolean required) {
java.awt.Component component = findComponent(locator, currentWindow().getComponent()
.getSource());
if (component == null) {
if (!required) {
componentMap.putComponent(id, nul... | java | public static Component find(String locator, String id, String componentType, boolean required) {
java.awt.Component component = findComponent(locator, currentWindow().getComponent()
.getSource());
if (component == null) {
if (!required) {
componentMap.putComponent(id, nul... | [
"public",
"static",
"Component",
"find",
"(",
"String",
"locator",
",",
"String",
"id",
",",
"String",
"componentType",
",",
"boolean",
"required",
")",
"{",
"java",
".",
"awt",
".",
"Component",
"component",
"=",
"findComponent",
"(",
"locator",
",",
"curre... | Finds a component and stores it under the given id. The component can later be used on other
commands using the locator "id=ID_ASSIGNED". This method searches both VISIBLE and INVISIBLE
components.
@param locator The locator (accepted are name (default), title, text, label)
@param id The id
@param componentType The co... | [
"Finds",
"a",
"component",
"and",
"stores",
"it",
"under",
"the",
"given",
"id",
".",
"The",
"component",
"can",
"later",
"be",
"used",
"on",
"other",
"commands",
"using",
"the",
"locator",
"id",
"=",
"ID_ASSIGNED",
".",
"This",
"method",
"searches",
"both... | 87fa6754a6a5f8569ef628db4d149eea04062568 | https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/jemmy/JemmyDSL.java#L296-L314 |
149,150 | vtatai/srec | core/src/main/java/com/github/srec/jemmy/JemmyDSL.java | JemmyDSL.findByComponentType | @SuppressWarnings({"unchecked"})
public static Component findByComponentType(String id,
String containerId,
String componentType,
int index,
... | java | @SuppressWarnings({"unchecked"})
public static Component findByComponentType(String id,
String containerId,
String componentType,
int index,
... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"unchecked\"",
"}",
")",
"public",
"static",
"Component",
"findByComponentType",
"(",
"String",
"id",
",",
"String",
"containerId",
",",
"String",
"componentType",
",",
"int",
"index",
",",
"boolean",
"required",
")",
"{",
... | Finds the first component with the given component type and stores it under the given id. The
component can later be used on other commands using the locator "id=ID_ASSIGNED". This method
searches both VISIBLE and INVISIBLE components.
@param id The id
@param componentType The component type
@return The component foun... | [
"Finds",
"the",
"first",
"component",
"with",
"the",
"given",
"component",
"type",
"and",
"stores",
"it",
"under",
"the",
"given",
"id",
".",
"The",
"component",
"can",
"later",
"be",
"used",
"on",
"other",
"commands",
"using",
"the",
"locator",
"id",
"=",... | 87fa6754a6a5f8569ef628db4d149eea04062568 | https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/jemmy/JemmyDSL.java#L523-L579 |
149,151 | openbase/jul | pattern/default/src/main/java/org/openbase/jul/pattern/ChangeHandler.java | ChangeHandler.addlistener | public void addlistener(final ChangeListener listener) {
synchronized (LISTENER_LOCK) {
if (listeners.contains(listener)) {
LOGGER.warn("Skip listener registration. listener[" + listener + "] is already registered!");
return;
}
listeners.add(li... | java | public void addlistener(final ChangeListener listener) {
synchronized (LISTENER_LOCK) {
if (listeners.contains(listener)) {
LOGGER.warn("Skip listener registration. listener[" + listener + "] is already registered!");
return;
}
listeners.add(li... | [
"public",
"void",
"addlistener",
"(",
"final",
"ChangeListener",
"listener",
")",
"{",
"synchronized",
"(",
"LISTENER_LOCK",
")",
"{",
"if",
"(",
"listeners",
".",
"contains",
"(",
"listener",
")",
")",
"{",
"LOGGER",
".",
"warn",
"(",
"\"Skip listener registr... | Registers the given listener to get informed about changes.
@param listener the listener to register. | [
"Registers",
"the",
"given",
"listener",
"to",
"get",
"informed",
"about",
"changes",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/default/src/main/java/org/openbase/jul/pattern/ChangeHandler.java#L64-L72 |
149,152 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/DataStreamerIterator.java | DataStreamerIterator.hasNext | boolean hasNext() throws DataSourceReadException {
if (!hasNextComputed) {
boolean stayInLoop;
do {
stayInLoop = false;
/*
* Prior to reading the first iterator, we loop through all of
* the iterators to determine the mini... | java | boolean hasNext() throws DataSourceReadException {
if (!hasNextComputed) {
boolean stayInLoop;
do {
stayInLoop = false;
/*
* Prior to reading the first iterator, we loop through all of
* the iterators to determine the mini... | [
"boolean",
"hasNext",
"(",
")",
"throws",
"DataSourceReadException",
"{",
"if",
"(",
"!",
"hasNextComputed",
")",
"{",
"boolean",
"stayInLoop",
";",
"do",
"{",
"stayInLoop",
"=",
"false",
";",
"/*\n * Prior to reading the first iterator, we loop through al... | We loop through the iterators passed into the constructor and return
whether the the next item in at least one iterator is for the right
keyId.
@return
<code>true</code> or
<code>false</code>. | [
"We",
"loop",
"through",
"the",
"iterators",
"passed",
"into",
"the",
"constructor",
"and",
"return",
"whether",
"the",
"the",
"next",
"item",
"in",
"at",
"least",
"one",
"iterator",
"is",
"for",
"the",
"right",
"keyId",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/DataStreamerIterator.java#L100-L151 |
149,153 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/toolbox/OkVolley.java | OkVolley.init | public OkVolley init(Context context) {
this.mContext = context;
InstanceRequestQueue = newRequestQueue(context);
mUserAgent = generateUserAgent(context);
mRequestHeaders = new HashMap<>();
mRequestHeaders.put(OkRequest.HEADER_USER_AGENT, mUserAgent);
mRequestHeaders.put(... | java | public OkVolley init(Context context) {
this.mContext = context;
InstanceRequestQueue = newRequestQueue(context);
mUserAgent = generateUserAgent(context);
mRequestHeaders = new HashMap<>();
mRequestHeaders.put(OkRequest.HEADER_USER_AGENT, mUserAgent);
mRequestHeaders.put(... | [
"public",
"OkVolley",
"init",
"(",
"Context",
"context",
")",
"{",
"this",
".",
"mContext",
"=",
"context",
";",
"InstanceRequestQueue",
"=",
"newRequestQueue",
"(",
"context",
")",
";",
"mUserAgent",
"=",
"generateUserAgent",
"(",
"context",
")",
";",
"mReque... | init method please call this method in Application
@param context ApplicationContext
@return this Volley Object | [
"init",
"method",
"please",
"call",
"this",
"method",
"in",
"Application"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/toolbox/OkVolley.java#L66-L74 |
149,154 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/toolbox/OkVolley.java | OkVolley.generateUserAgent | public static String generateUserAgent(Context context) {
StringBuilder ua = new StringBuilder("api-client/");
ua.append(VERSION);
String packageName = context.getApplicationContext().getPackageName();
ua.append(" ");
ua.append(packageName);
PackageInfo pi = null;
... | java | public static String generateUserAgent(Context context) {
StringBuilder ua = new StringBuilder("api-client/");
ua.append(VERSION);
String packageName = context.getApplicationContext().getPackageName();
ua.append(" ");
ua.append(packageName);
PackageInfo pi = null;
... | [
"public",
"static",
"String",
"generateUserAgent",
"(",
"Context",
"context",
")",
"{",
"StringBuilder",
"ua",
"=",
"new",
"StringBuilder",
"(",
"\"api-client/\"",
")",
";",
"ua",
".",
"append",
"(",
"VERSION",
")",
";",
"String",
"packageName",
"=",
"context"... | build the default User-Agent
@param context
@return | [
"build",
"the",
"default",
"User",
"-",
"Agent"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/toolbox/OkVolley.java#L93-L140 |
149,155 | googolmo/OkVolley | okvolley/src/main/java/im/amomo/volley/toolbox/OkVolley.java | OkVolley.getRequestQueue | @Deprecated
public static RequestQueue getRequestQueue(Context context) {
if (InstanceRequestQueue == null) {
InstanceRequestQueue = newRequestQueue(context);
}
return InstanceRequestQueue;
} | java | @Deprecated
public static RequestQueue getRequestQueue(Context context) {
if (InstanceRequestQueue == null) {
InstanceRequestQueue = newRequestQueue(context);
}
return InstanceRequestQueue;
} | [
"@",
"Deprecated",
"public",
"static",
"RequestQueue",
"getRequestQueue",
"(",
"Context",
"context",
")",
"{",
"if",
"(",
"InstanceRequestQueue",
"==",
"null",
")",
"{",
"InstanceRequestQueue",
"=",
"newRequestQueue",
"(",
"context",
")",
";",
"}",
"return",
"In... | getRquest queue static
@param context
@return {@link com.android.volley.RequestQueue} | [
"getRquest",
"queue",
"static"
] | 5c41df7cf1a8156c85e179a3c4af8a1c1485ffec | https://github.com/googolmo/OkVolley/blob/5c41df7cf1a8156c85e179a3c4af8a1c1485ffec/okvolley/src/main/java/im/amomo/volley/toolbox/OkVolley.java#L190-L196 |
149,156 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/ValidateAlgorithmCheckedVisitor.java | ValidateAlgorithmCheckedVisitor.visit | @Override
public void visit(LowLevelAbstractionDefinition lowLevelAbstractionDefinition) throws NoSuchAlgorithmException, AlgorithmSourceReadException {
String algorithmId = lowLevelAbstractionDefinition.getAlgorithmId();
Algorithm algorithm = this.algorithmSource.readAlgorithm(algorithmId);
... | java | @Override
public void visit(LowLevelAbstractionDefinition lowLevelAbstractionDefinition) throws NoSuchAlgorithmException, AlgorithmSourceReadException {
String algorithmId = lowLevelAbstractionDefinition.getAlgorithmId();
Algorithm algorithm = this.algorithmSource.readAlgorithm(algorithmId);
... | [
"@",
"Override",
"public",
"void",
"visit",
"(",
"LowLevelAbstractionDefinition",
"lowLevelAbstractionDefinition",
")",
"throws",
"NoSuchAlgorithmException",
",",
"AlgorithmSourceReadException",
"{",
"String",
"algorithmId",
"=",
"lowLevelAbstractionDefinition",
".",
"getAlgori... | Throws an exception if no algorithm was found for the given low level
abstraction definition.
@param lowLevelAbstractionDefinition the low level abstraction definition
to check.
@throws NoSuchAlgorithmException if no algorithm was found in the
algorithm source.
@throws AlgorithmSourceReadException if an error occurred... | [
"Throws",
"an",
"exception",
"if",
"no",
"algorithm",
"was",
"found",
"for",
"the",
"given",
"low",
"level",
"abstraction",
"definition",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/ValidateAlgorithmCheckedVisitor.java#L70-L78 |
149,157 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/DeletedWorkingMemoryEventListener.java | DeletedWorkingMemoryEventListener.objectRetracted | @Override
public void objectRetracted(ObjectRetractedEvent ore) {
String name = ore.getPropagationContext().getRuleOrigin().getName();
if (name.equals("DELETE_PROPOSITION")) {
Proposition prop = (Proposition) ore.getOldObject();
LOGGER.log(Level.FINEST, "Deleted proposition {... | java | @Override
public void objectRetracted(ObjectRetractedEvent ore) {
String name = ore.getPropagationContext().getRuleOrigin().getName();
if (name.equals("DELETE_PROPOSITION")) {
Proposition prop = (Proposition) ore.getOldObject();
LOGGER.log(Level.FINEST, "Deleted proposition {... | [
"@",
"Override",
"public",
"void",
"objectRetracted",
"(",
"ObjectRetractedEvent",
"ore",
")",
"{",
"String",
"name",
"=",
"ore",
".",
"getPropagationContext",
"(",
")",
".",
"getRuleOrigin",
"(",
")",
".",
"getName",
"(",
")",
";",
"if",
"(",
"name",
".",... | Listens for retracted propositions that were retracted as a result of
another proposition coming from a data source backend with a non-null
delete date. Adds them to a list that will be passed to the
query results handler along with propositions that remain in working
memory.
@param ore an object retracted event conta... | [
"Listens",
"for",
"retracted",
"propositions",
"that",
"were",
"retracted",
"as",
"a",
"result",
"of",
"another",
"proposition",
"coming",
"from",
"a",
"data",
"source",
"backend",
"with",
"a",
"non",
"-",
"null",
"delete",
"date",
".",
"Adds",
"them",
"to",... | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/DeletedWorkingMemoryEventListener.java#L60-L69 |
149,158 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/interval/DirectionalPathConsistency.java | DirectionalPathConsistency.getConsistent | static boolean getConsistent(DirectedGraph g) {
Object[] vertexOrdering = new Object[g.size()];
int voa = 0;
for (Iterator<?> itr = g.iterator(); itr.hasNext(); voa++) {
vertexOrdering[voa] = itr.next();
}
int vol = vertexOrdering.length;
Weight[][] updatedEdg... | java | static boolean getConsistent(DirectedGraph g) {
Object[] vertexOrdering = new Object[g.size()];
int voa = 0;
for (Iterator<?> itr = g.iterator(); itr.hasNext(); voa++) {
vertexOrdering[voa] = itr.next();
}
int vol = vertexOrdering.length;
Weight[][] updatedEdg... | [
"static",
"boolean",
"getConsistent",
"(",
"DirectedGraph",
"g",
")",
"{",
"Object",
"[",
"]",
"vertexOrdering",
"=",
"new",
"Object",
"[",
"g",
".",
"size",
"(",
")",
"]",
";",
"int",
"voa",
"=",
"0",
";",
"for",
"(",
"Iterator",
"<",
"?",
">",
"i... | Returns whether a directed graph is consistent.
@param g
a <code>DirectedGraph</code>.
@return <code>true</code> if the given graph is consistent,
<code>false</code> otherwise. | [
"Returns",
"whether",
"a",
"directed",
"graph",
"is",
"consistent",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/interval/DirectionalPathConsistency.java#L88-L144 |
149,159 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/SslTlsUtil.java | SslTlsUtil.initializeTrustManagers | public static TrustManager[] initializeTrustManagers(File _trustStoreFile, String _trustStorePassword) throws IOException {
if (_trustStoreFile == null) {
return null;
}
String storeType = getStoreTypeByFileName(_trustStoreFile);
boolean derEncoded = storeType == STORETYPE_... | java | public static TrustManager[] initializeTrustManagers(File _trustStoreFile, String _trustStorePassword) throws IOException {
if (_trustStoreFile == null) {
return null;
}
String storeType = getStoreTypeByFileName(_trustStoreFile);
boolean derEncoded = storeType == STORETYPE_... | [
"public",
"static",
"TrustManager",
"[",
"]",
"initializeTrustManagers",
"(",
"File",
"_trustStoreFile",
",",
"String",
"_trustStorePassword",
")",
"throws",
"IOException",
"{",
"if",
"(",
"_trustStoreFile",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"S... | Initialization of trustStoreManager used to provide access to the configured trustStore.
@param _trustStoreFile trust store file
@param _trustStorePassword trust store password
@return TrustManager array or null
@throws IOException on error | [
"Initialization",
"of",
"trustStoreManager",
"used",
"to",
"provide",
"access",
"to",
"the",
"configured",
"trustStore",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/SslTlsUtil.java#L47-L80 |
149,160 | hypfvieh/java-utils | src/main/java/com/github/hypfvieh/util/SslTlsUtil.java | SslTlsUtil.initializeKeyManagers | public static KeyManager[] initializeKeyManagers(File _keyStoreFile, String _keyStorePassword, String _keyPassword) throws IOException {
if (_keyStoreFile == null) {
return null;
}
String keyStorePwd = StringUtil.defaultIfBlank(_keyStorePassword, System.getProperty("javax.net.ssl.ke... | java | public static KeyManager[] initializeKeyManagers(File _keyStoreFile, String _keyStorePassword, String _keyPassword) throws IOException {
if (_keyStoreFile == null) {
return null;
}
String keyStorePwd = StringUtil.defaultIfBlank(_keyStorePassword, System.getProperty("javax.net.ssl.ke... | [
"public",
"static",
"KeyManager",
"[",
"]",
"initializeKeyManagers",
"(",
"File",
"_keyStoreFile",
",",
"String",
"_keyStorePassword",
",",
"String",
"_keyPassword",
")",
"throws",
"IOException",
"{",
"if",
"(",
"_keyStoreFile",
"==",
"null",
")",
"{",
"return",
... | Initialization of keyStoreManager used to provide access to the configured keyStore.
@param _keyStoreFile key store file
@param _keyStorePassword key store password
@param _keyPassword key password
@return KeyManager array or null
@throws IOException on error | [
"Initialization",
"of",
"keyStoreManager",
"used",
"to",
"provide",
"access",
"to",
"the",
"configured",
"keyStore",
"."
] | 407c32d6b485596d4d2b644f5f7fc7a02d0169c6 | https://github.com/hypfvieh/java-utils/blob/407c32d6b485596d4d2b644f5f7fc7a02d0169c6/src/main/java/com/github/hypfvieh/util/SslTlsUtil.java#L91-L123 |
149,161 | vtatai/srec | core/src/main/java/com/github/srec/command/base/BaseCommand.java | BaseCommand.findObjectSymbol | protected Object findObjectSymbol(String name, ExecutionContext context) {
CommandSymbol s = context.findSymbol(name);
if (s == null)
throw new CommandExecutionException("Symbol cannot be null");
if (!(s instanceof VarCommand))
throw new CommandExecutionException("Symbol must be a variable");
Value value ... | java | protected Object findObjectSymbol(String name, ExecutionContext context) {
CommandSymbol s = context.findSymbol(name);
if (s == null)
throw new CommandExecutionException("Symbol cannot be null");
if (!(s instanceof VarCommand))
throw new CommandExecutionException("Symbol must be a variable");
Value value ... | [
"protected",
"Object",
"findObjectSymbol",
"(",
"String",
"name",
",",
"ExecutionContext",
"context",
")",
"{",
"CommandSymbol",
"s",
"=",
"context",
".",
"findSymbol",
"(",
"name",
")",
";",
"if",
"(",
"s",
"==",
"null",
")",
"throw",
"new",
"CommandExecuti... | Finds a symbol which should wrap a Java object.
@param name
The symbol name
@param context
The EC
@return The object, if it was found by Jemmy returns the source | [
"Finds",
"a",
"symbol",
"which",
"should",
"wrap",
"a",
"Java",
"object",
"."
] | 87fa6754a6a5f8569ef628db4d149eea04062568 | https://github.com/vtatai/srec/blob/87fa6754a6a5f8569ef628db4d149eea04062568/core/src/main/java/com/github/srec/command/base/BaseCommand.java#L120-L139 |
149,162 | openbase/jul | extension/type/storage/src/main/java/org/openbase/jul/extension/type/storage/registry/consistency/TransformationFrameConsistencyHandler.java | TransformationFrameConsistencyHandler.verifyAndUpdatePlacement | protected PlacementConfig verifyAndUpdatePlacement(final String alias, final PlacementConfig placementConfig) throws CouldNotPerformException, EntryModification {
try {
if (alias == null || alias.isEmpty()) {
throw new NotAvailableException("label");
}
if (pl... | java | protected PlacementConfig verifyAndUpdatePlacement(final String alias, final PlacementConfig placementConfig) throws CouldNotPerformException, EntryModification {
try {
if (alias == null || alias.isEmpty()) {
throw new NotAvailableException("label");
}
if (pl... | [
"protected",
"PlacementConfig",
"verifyAndUpdatePlacement",
"(",
"final",
"String",
"alias",
",",
"final",
"PlacementConfig",
"placementConfig",
")",
"throws",
"CouldNotPerformException",
",",
"EntryModification",
"{",
"try",
"{",
"if",
"(",
"alias",
"==",
"null",
"||... | Methods verifies and updates the transformation frame id for the given placement configuration.
If the given placement configuration is up to date this the method returns null.
@param alias
@param placementConfig
@return
@throws CouldNotPerformException
@throws EntryModification | [
"Methods",
"verifies",
"and",
"updates",
"the",
"transformation",
"frame",
"id",
"for",
"the",
"given",
"placement",
"configuration",
".",
"If",
"the",
"given",
"placement",
"configuration",
"is",
"up",
"to",
"date",
"this",
"the",
"method",
"returns",
"null",
... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/storage/src/main/java/org/openbase/jul/extension/type/storage/registry/consistency/TransformationFrameConsistencyHandler.java#L64-L85 |
149,163 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/CopyPropositionVisitor.java | CopyPropositionVisitor.setProperties | public void setProperties(Map<String, Value> properties) {
if (properties != null) {
this.properties = new HashMap<>(properties);
} else {
this.properties = null;
}
} | java | public void setProperties(Map<String, Value> properties) {
if (properties != null) {
this.properties = new HashMap<>(properties);
} else {
this.properties = null;
}
} | [
"public",
"void",
"setProperties",
"(",
"Map",
"<",
"String",
",",
"Value",
">",
"properties",
")",
"{",
"if",
"(",
"properties",
"!=",
"null",
")",
"{",
"this",
".",
"properties",
"=",
"new",
"HashMap",
"<>",
"(",
"properties",
")",
";",
"}",
"else",
... | Overrides the properties for copies made with this visitor.
@param properties a map of property name to value pairs, or
<code>null</code> to use the original proposition's value for this field. | [
"Overrides",
"the",
"properties",
"for",
"copies",
"made",
"with",
"this",
"visitor",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/CopyPropositionVisitor.java#L73-L79 |
149,164 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/CopyPropositionVisitor.java | CopyPropositionVisitor.setReferences | public void setReferences(Map<String, List<UniqueId>> references) {
if (references != null) {
this.references = new HashMap<>(references);
} else {
this.references = null;
}
} | java | public void setReferences(Map<String, List<UniqueId>> references) {
if (references != null) {
this.references = new HashMap<>(references);
} else {
this.references = null;
}
} | [
"public",
"void",
"setReferences",
"(",
"Map",
"<",
"String",
",",
"List",
"<",
"UniqueId",
">",
">",
"references",
")",
"{",
"if",
"(",
"references",
"!=",
"null",
")",
"{",
"this",
".",
"references",
"=",
"new",
"HashMap",
"<>",
"(",
"references",
")... | Overrides the references for copies made with this visitor.
@param references a map of reference name to reference pairs, or
<code>null</code> to use the original proposition's value for this field. | [
"Overrides",
"the",
"references",
"for",
"copies",
"made",
"with",
"this",
"visitor",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/CopyPropositionVisitor.java#L98-L104 |
149,165 | openbase/jul | pattern/default/src/main/java/org/openbase/jul/pattern/AbstractFilter.java | AbstractFilter.filter | @Override
public List<T> filter(final List<T> list) throws CouldNotPerformException {
beforeFilter();
return ListFilter.super.filter(list);
} | java | @Override
public List<T> filter(final List<T> list) throws CouldNotPerformException {
beforeFilter();
return ListFilter.super.filter(list);
} | [
"@",
"Override",
"public",
"List",
"<",
"T",
">",
"filter",
"(",
"final",
"List",
"<",
"T",
">",
"list",
")",
"throws",
"CouldNotPerformException",
"{",
"beforeFilter",
"(",
")",
";",
"return",
"ListFilter",
".",
"super",
".",
"filter",
"(",
"list",
")",... | Filter object from the list for which the verification fails.
@param list the list which is filtered
@return a filtered list
@throws CouldNotPerformException if an error occurs while filtering | [
"Filter",
"object",
"from",
"the",
"list",
"for",
"which",
"the",
"verification",
"fails",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/default/src/main/java/org/openbase/jul/pattern/AbstractFilter.java#L44-L48 |
149,166 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/EnhanceContext.java | EnhanceContext.log | public void log(int level, String msg, String extra) {
if (logLevel >= level) {
messageListener.debug(msg + extra);
}
} | java | public void log(int level, String msg, String extra) {
if (logLevel >= level) {
messageListener.debug(msg + extra);
}
} | [
"public",
"void",
"log",
"(",
"int",
"level",
",",
"String",
"msg",
",",
"String",
"extra",
")",
"{",
"if",
"(",
"logLevel",
">=",
"level",
")",
"{",
"messageListener",
".",
"debug",
"(",
"msg",
"+",
"extra",
")",
";",
"}",
"}"
] | Log some debug output. | [
"Log",
"some",
"debug",
"output",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/EnhanceContext.java#L88-L92 |
149,167 | ebean-orm/querybean-agent-now-merged-into-ebean-agent- | src/main/java/io/ebean/typequery/agent/QueryBeanTransformer.java | QueryBeanTransformer.enhancement | private byte[] enhancement(ClassLoader classLoader, byte[] classfileBuffer) {
ClassReader cr = new ClassReader(classfileBuffer);
CLAwareClassWriter cw = new CLAwareClassWriter(FLAGS, classLoader);
TypeQueryClassAdapter ca = new TypeQueryClassAdapter(cw, enhanceContext);
try {
cr.accept(ca, Clas... | java | private byte[] enhancement(ClassLoader classLoader, byte[] classfileBuffer) {
ClassReader cr = new ClassReader(classfileBuffer);
CLAwareClassWriter cw = new CLAwareClassWriter(FLAGS, classLoader);
TypeQueryClassAdapter ca = new TypeQueryClassAdapter(cw, enhanceContext);
try {
cr.accept(ca, Clas... | [
"private",
"byte",
"[",
"]",
"enhancement",
"(",
"ClassLoader",
"classLoader",
",",
"byte",
"[",
"]",
"classfileBuffer",
")",
"{",
"ClassReader",
"cr",
"=",
"new",
"ClassReader",
"(",
"classfileBuffer",
")",
";",
"CLAwareClassWriter",
"cw",
"=",
"new",
"CLAwar... | Perform enhancement. | [
"Perform",
"enhancement",
"."
] | a063554fabdbed15ff5e10ad0a0b53b67e039006 | https://github.com/ebean-orm/querybean-agent-now-merged-into-ebean-agent-/blob/a063554fabdbed15ff5e10ad0a0b53b67e039006/src/main/java/io/ebean/typequery/agent/QueryBeanTransformer.java#L91-L117 |
149,168 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.contains | public static boolean contains(final Label label, final String labelString) {
final String withoutWhite = StringProcessor.removeWhiteSpaces(labelString);
for (final Label.MapFieldEntry entry : label.getEntryList()) {
for (final String value : entry.getValueList()) {
if (Strin... | java | public static boolean contains(final Label label, final String labelString) {
final String withoutWhite = StringProcessor.removeWhiteSpaces(labelString);
for (final Label.MapFieldEntry entry : label.getEntryList()) {
for (final String value : entry.getValueList()) {
if (Strin... | [
"public",
"static",
"boolean",
"contains",
"(",
"final",
"Label",
"label",
",",
"final",
"String",
"labelString",
")",
"{",
"final",
"String",
"withoutWhite",
"=",
"StringProcessor",
".",
"removeWhiteSpaces",
"(",
"labelString",
")",
";",
"for",
"(",
"final",
... | Test if a label contains a label string. This test iterates over all languages and all
label strings for the language and check if one equals the label string.
The test is done ignoring the case of the label string and ignoring white spaces.
@param label the label type which is checked
@param labelString the lab... | [
"Test",
"if",
"a",
"label",
"contains",
"a",
"label",
"string",
".",
"This",
"test",
"iterates",
"over",
"all",
"languages",
"and",
"all",
"label",
"strings",
"for",
"the",
"language",
"and",
"check",
"if",
"one",
"equals",
"the",
"label",
"string",
".",
... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L58-L68 |
149,169 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.isEmpty | public static boolean isEmpty(final Label label) {
for (Label.MapFieldEntry entry : label.getEntryList()) {
for (String value : entry.getValueList()) {
if (!value.isEmpty()) {
return false;
}
}
}
return true;
} | java | public static boolean isEmpty(final Label label) {
for (Label.MapFieldEntry entry : label.getEntryList()) {
for (String value : entry.getValueList()) {
if (!value.isEmpty()) {
return false;
}
}
}
return true;
} | [
"public",
"static",
"boolean",
"isEmpty",
"(",
"final",
"Label",
"label",
")",
"{",
"for",
"(",
"Label",
".",
"MapFieldEntry",
"entry",
":",
"label",
".",
"getEntryList",
"(",
")",
")",
"{",
"for",
"(",
"String",
"value",
":",
"entry",
".",
"getValueList... | Test if the label is empty. This means that every label list for every
languageCode is empty or that it only contains empty string.
@param label the label type which is tested
@return if the label type is empty as explained above | [
"Test",
"if",
"the",
"label",
"is",
"empty",
".",
"This",
"means",
"that",
"every",
"label",
"list",
"for",
"every",
"languageCode",
"is",
"empty",
"or",
"that",
"it",
"only",
"contains",
"empty",
"string",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L78-L87 |
149,170 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.addLabel | public static Label.Builder addLabel(final Label.Builder labelBuilder, final String languageCode, final String label) {
for (int i = 0; i < labelBuilder.getEntryCount(); i++) {
// found labels for the entry key
if (labelBuilder.getEntry(i).getKey().equals(languageCode)) {
... | java | public static Label.Builder addLabel(final Label.Builder labelBuilder, final String languageCode, final String label) {
for (int i = 0; i < labelBuilder.getEntryCount(); i++) {
// found labels for the entry key
if (labelBuilder.getEntry(i).getKey().equals(languageCode)) {
... | [
"public",
"static",
"Label",
".",
"Builder",
"addLabel",
"(",
"final",
"Label",
".",
"Builder",
"labelBuilder",
",",
"final",
"String",
"languageCode",
",",
"final",
"String",
"label",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"labelBuil... | Add a label to a labelBuilder by languageCode. If the label is already contained for the
language code nothing will be done. If the languageCode already exists and the label is not contained
it will be added to the end of the label list by this language code. If no entry for the languageCode
exists a new entry will be ... | [
"Add",
"a",
"label",
"to",
"a",
"labelBuilder",
"by",
"languageCode",
".",
"If",
"the",
"label",
"is",
"already",
"contained",
"for",
"the",
"language",
"code",
"nothing",
"will",
"be",
"done",
".",
"If",
"the",
"languageCode",
"already",
"exists",
"and",
... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L162-L183 |
149,171 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.getFirstLabel | public static String getFirstLabel(final LabelOrBuilder label) throws NotAvailableException {
for (Label.MapFieldEntry entry : label.getEntryList()) {
for (String value : entry.getValueList()) {
return value;
}
}
throw new NotAvailableException("Label");
... | java | public static String getFirstLabel(final LabelOrBuilder label) throws NotAvailableException {
for (Label.MapFieldEntry entry : label.getEntryList()) {
for (String value : entry.getValueList()) {
return value;
}
}
throw new NotAvailableException("Label");
... | [
"public",
"static",
"String",
"getFirstLabel",
"(",
"final",
"LabelOrBuilder",
"label",
")",
"throws",
"NotAvailableException",
"{",
"for",
"(",
"Label",
".",
"MapFieldEntry",
"entry",
":",
"label",
".",
"getEntryList",
"(",
")",
")",
"{",
"for",
"(",
"String"... | Get the first label found in the label type. This is independent of the language of the label.
@param label the label type which is searched for the first label
@return the first label found
@throws NotAvailableException if now label is contained in the label type. | [
"Get",
"the",
"first",
"label",
"found",
"in",
"the",
"label",
"type",
".",
"This",
"is",
"independent",
"of",
"the",
"language",
"of",
"the",
"label",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L194-L201 |
149,172 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.getLabelListByLanguage | public static List<String> getLabelListByLanguage(final String languageCode, final LabelOrBuilder label) throws NotAvailableException {
for (Label.MapFieldEntry entry : label.getEntryList()) {
if (entry.getKey().equalsIgnoreCase(languageCode)) {
return entry.getValueList();
... | java | public static List<String> getLabelListByLanguage(final String languageCode, final LabelOrBuilder label) throws NotAvailableException {
for (Label.MapFieldEntry entry : label.getEntryList()) {
if (entry.getKey().equalsIgnoreCase(languageCode)) {
return entry.getValueList();
... | [
"public",
"static",
"List",
"<",
"String",
">",
"getLabelListByLanguage",
"(",
"final",
"String",
"languageCode",
",",
"final",
"LabelOrBuilder",
"label",
")",
"throws",
"NotAvailableException",
"{",
"for",
"(",
"Label",
".",
"MapFieldEntry",
"entry",
":",
"label"... | Get a list of all labels for a languageCode in a label type. This is done by iterating over all entries
in the label type and checking if the key matches the languageCode. If it matches the value list is
returned. Thus the returned list can be empty depending on the label.
@param languageCode the languageCode which is... | [
"Get",
"a",
"list",
"of",
"all",
"labels",
"for",
"a",
"languageCode",
"in",
"a",
"label",
"type",
".",
"This",
"is",
"done",
"by",
"iterating",
"over",
"all",
"entries",
"in",
"the",
"label",
"type",
"and",
"checking",
"if",
"the",
"key",
"matches",
"... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L327-L334 |
149,173 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.replace | public static Label.Builder replace(final Label.Builder label, final String oldLabel, final String newLabel) {
for (final MapFieldEntry.Builder entryBuilder : label.getEntryBuilderList()) {
final List<String> valueList = new ArrayList<>(entryBuilder.getValueList());
entryBuilder.clearVal... | java | public static Label.Builder replace(final Label.Builder label, final String oldLabel, final String newLabel) {
for (final MapFieldEntry.Builder entryBuilder : label.getEntryBuilderList()) {
final List<String> valueList = new ArrayList<>(entryBuilder.getValueList());
entryBuilder.clearVal... | [
"public",
"static",
"Label",
".",
"Builder",
"replace",
"(",
"final",
"Label",
".",
"Builder",
"label",
",",
"final",
"String",
"oldLabel",
",",
"final",
"String",
"newLabel",
")",
"{",
"for",
"(",
"final",
"MapFieldEntry",
".",
"Builder",
"entryBuilder",
":... | Replace all instances of a label string in a label builder. The check for the label string which should be
replaced is done ignoring the case.
@param label the label builder in which label string will be replaced
@param oldLabel the label string which is replaced
@param newLabel the label string replacement
@retur... | [
"Replace",
"all",
"instances",
"of",
"a",
"label",
"string",
"in",
"a",
"label",
"builder",
".",
"The",
"check",
"for",
"the",
"label",
"string",
"which",
"should",
"be",
"replaced",
"is",
"done",
"ignoring",
"the",
"case",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L346-L359 |
149,174 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.format | public static Label.Builder format(final Label.Builder label) {
for (final MapFieldEntry.Builder entryBuilder : label.getEntryBuilderList()) {
final List<String> valueList = new ArrayList<>(entryBuilder.getValueList());
entryBuilder.clearValue();
for (String value : valueList... | java | public static Label.Builder format(final Label.Builder label) {
for (final MapFieldEntry.Builder entryBuilder : label.getEntryBuilderList()) {
final List<String> valueList = new ArrayList<>(entryBuilder.getValueList());
entryBuilder.clearValue();
for (String value : valueList... | [
"public",
"static",
"Label",
".",
"Builder",
"format",
"(",
"final",
"Label",
".",
"Builder",
"label",
")",
"{",
"for",
"(",
"final",
"MapFieldEntry",
".",
"Builder",
"entryBuilder",
":",
"label",
".",
"getEntryBuilderList",
"(",
")",
")",
"{",
"final",
"L... | Format the given label by removing duplicated white spaces, underscores and camel cases in all entries.
@param label the label to format.
@return the formatted label. | [
"Format",
"the",
"given",
"label",
"by",
"removing",
"duplicated",
"white",
"spaces",
"underscores",
"and",
"camel",
"cases",
"in",
"all",
"entries",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L368-L377 |
149,175 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java | LabelProcessor.format | public static String format(String label) {
if (label.isEmpty()) {
return label;
}
if(Character.isDigit(label.charAt(label.length()-1))) {
for (int i = label.length(); i > 0; i--) {
if(!Character.isDigit(label.charAt(i-1))) {
if(!Charac... | java | public static String format(String label) {
if (label.isEmpty()) {
return label;
}
if(Character.isDigit(label.charAt(label.length()-1))) {
for (int i = label.length(); i > 0; i--) {
if(!Character.isDigit(label.charAt(i-1))) {
if(!Charac... | [
"public",
"static",
"String",
"format",
"(",
"String",
"label",
")",
"{",
"if",
"(",
"label",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"label",
";",
"}",
"if",
"(",
"Character",
".",
"isDigit",
"(",
"label",
".",
"charAt",
"(",
"label",
".",
"... | Format the given label by removing duplicated white spaces, underscores and camel cases.
@param label the label to format.
@return the formatted label. | [
"Format",
"the",
"given",
"label",
"by",
"removing",
"duplicated",
"white",
"spaces",
"underscores",
"and",
"camel",
"cases",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/LabelProcessor.java#L386-L402 |
149,176 | eurekaclinical/protempa | protempa-dsb-file/src/main/java/org/protempa/backend/dsb/file/CloseableIteratorChain.java | CloseableIteratorChain.addIterator | void addIterator(final DataStreamingEventIterator<E> iterator) {
checkLocked();
if (iterator == null) {
throw new NullPointerException("Iterator must not be null");
}
iteratorChain.add(iterator);
} | java | void addIterator(final DataStreamingEventIterator<E> iterator) {
checkLocked();
if (iterator == null) {
throw new NullPointerException("Iterator must not be null");
}
iteratorChain.add(iterator);
} | [
"void",
"addIterator",
"(",
"final",
"DataStreamingEventIterator",
"<",
"E",
">",
"iterator",
")",
"{",
"checkLocked",
"(",
")",
";",
"if",
"(",
"iterator",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Iterator must not be null\"",
")"... | Add an Iterator to the end of the chain
@param iterator Iterator to add
@throws IllegalStateException if I've already started iterating
@throws NullPointerException if the iterator is null | [
"Add",
"an",
"Iterator",
"to",
"the",
"end",
"of",
"the",
"chain"
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-file/src/main/java/org/protempa/backend/dsb/file/CloseableIteratorChain.java#L142-L148 |
149,177 | eurekaclinical/protempa | protempa-dsb-file/src/main/java/org/protempa/backend/dsb/file/CloseableIteratorChain.java | CloseableIteratorChain.updateCurrentIterator | protected void updateCurrentIterator() throws DataSourceReadException {
if (currentIterator == null) {
if (iteratorChain.isEmpty()) {
currentIterator = new EmptyDataStreamingEventIterator();
} else {
currentIterator = iteratorChain.remove();
}
... | java | protected void updateCurrentIterator() throws DataSourceReadException {
if (currentIterator == null) {
if (iteratorChain.isEmpty()) {
currentIterator = new EmptyDataStreamingEventIterator();
} else {
currentIterator = iteratorChain.remove();
}
... | [
"protected",
"void",
"updateCurrentIterator",
"(",
")",
"throws",
"DataSourceReadException",
"{",
"if",
"(",
"currentIterator",
"==",
"null",
")",
"{",
"if",
"(",
"iteratorChain",
".",
"isEmpty",
"(",
")",
")",
"{",
"currentIterator",
"=",
"new",
"EmptyDataStrea... | Updates the current iterator field to ensure that the current Iterator is
not exhausted | [
"Updates",
"the",
"current",
"iterator",
"field",
"to",
"ensure",
"that",
"the",
"current",
"Iterator",
"is",
"not",
"exhausted"
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-file/src/main/java/org/protempa/backend/dsb/file/CloseableIteratorChain.java#L194-L210 |
149,178 | eurekaclinical/protempa | protempa-dsb-file/src/main/java/org/protempa/backend/dsb/file/CloseableIteratorChain.java | CloseableIteratorChain.next | @Override
public DataStreamingEvent<E> next() throws DataSourceReadException {
lockChain();
updateCurrentIterator();
lastUsedIterator = currentIterator;
return currentIterator.next();
} | java | @Override
public DataStreamingEvent<E> next() throws DataSourceReadException {
lockChain();
updateCurrentIterator();
lastUsedIterator = currentIterator;
return currentIterator.next();
} | [
"@",
"Override",
"public",
"DataStreamingEvent",
"<",
"E",
">",
"next",
"(",
")",
"throws",
"DataSourceReadException",
"{",
"lockChain",
"(",
")",
";",
"updateCurrentIterator",
"(",
")",
";",
"lastUsedIterator",
"=",
"currentIterator",
";",
"return",
"currentItera... | Returns the next Object of the current Iterator
@return Object from the current Iterator
@throws java.util.NoSuchElementException if all the Iterators are
exhausted | [
"Returns",
"the",
"next",
"Object",
"of",
"the",
"current",
"Iterator"
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-dsb-file/src/main/java/org/protempa/backend/dsb/file/CloseableIteratorChain.java#L234-L240 |
149,179 | znerd/xmlenc | src/main/java/org/znerd/xmlenc/XMLEncoder.java | XMLEncoder.declaration | public void declaration(Writer out, char quotationMark) throws IllegalArgumentException, NullPointerException, IOException {
if (quotationMark == '"') {
out.write(_declarationDoubleQuotes);
} else if (quotationMark == '\'') {
out.write(_declarationSingleQuotes);
}
} | java | public void declaration(Writer out, char quotationMark) throws IllegalArgumentException, NullPointerException, IOException {
if (quotationMark == '"') {
out.write(_declarationDoubleQuotes);
} else if (quotationMark == '\'') {
out.write(_declarationSingleQuotes);
}
} | [
"public",
"void",
"declaration",
"(",
"Writer",
"out",
",",
"char",
"quotationMark",
")",
"throws",
"IllegalArgumentException",
",",
"NullPointerException",
",",
"IOException",
"{",
"if",
"(",
"quotationMark",
"==",
"'",
"'",
")",
"{",
"out",
".",
"write",
"("... | Writes an XML declaration with double quotes.
@param out the character stream to write to, not <code>null</code>.
@param quotationMark the quotationMark to use, either <code>'\''</code> or <code>'"'</code>.
@throws IllegalArgumentException if
<code>quotationMark != '\'' && quotationMark != '"'</code>... | [
"Writes",
"an",
"XML",
"declaration",
"with",
"double",
"quotes",
"."
] | 6ff483777d9467db9990b7c7ae0158f21a243c31 | https://github.com/znerd/xmlenc/blob/6ff483777d9467db9990b7c7ae0158f21a243c31/src/main/java/org/znerd/xmlenc/XMLEncoder.java#L167-L173 |
149,180 | znerd/xmlenc | src/main/java/org/znerd/xmlenc/XMLEncoder.java | XMLEncoder.whitespace | public void whitespace(Writer out, String s) throws NullPointerException, InvalidXMLException, IOException {
char[] ch = s.toCharArray();
int length = ch.length;
whitespace(out, ch, 0, length);
} | java | public void whitespace(Writer out, String s) throws NullPointerException, InvalidXMLException, IOException {
char[] ch = s.toCharArray();
int length = ch.length;
whitespace(out, ch, 0, length);
} | [
"public",
"void",
"whitespace",
"(",
"Writer",
"out",
",",
"String",
"s",
")",
"throws",
"NullPointerException",
",",
"InvalidXMLException",
",",
"IOException",
"{",
"char",
"[",
"]",
"ch",
"=",
"s",
".",
"toCharArray",
"(",
")",
";",
"int",
"length",
"=",... | Writes the specified whitespace string.
@param out the character stream to write to, not <code>null</code>.
@param s the character string to be written, not <code>null</code>.
@throws NullPointerException if <code>out == null || s == null</code>.
@throws InvalidXMLException if the specified character string contain... | [
"Writes",
"the",
"specified",
"whitespace",
"string",
"."
] | 6ff483777d9467db9990b7c7ae0158f21a243c31 | https://github.com/znerd/xmlenc/blob/6ff483777d9467db9990b7c7ae0158f21a243c31/src/main/java/org/znerd/xmlenc/XMLEncoder.java#L325-L330 |
149,181 | znerd/xmlenc | src/main/java/org/znerd/xmlenc/XMLEncoder.java | XMLEncoder.whitespace | public void whitespace(Writer out, char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException, IOException {
// Check the string
XMLChecker.checkS(ch, start, length);
// Write the complete character string at once
out.write(ch, start, ... | java | public void whitespace(Writer out, char[] ch, int start, int length) throws NullPointerException, IndexOutOfBoundsException, InvalidXMLException, IOException {
// Check the string
XMLChecker.checkS(ch, start, length);
// Write the complete character string at once
out.write(ch, start, ... | [
"public",
"void",
"whitespace",
"(",
"Writer",
"out",
",",
"char",
"[",
"]",
"ch",
",",
"int",
"start",
",",
"int",
"length",
")",
"throws",
"NullPointerException",
",",
"IndexOutOfBoundsException",
",",
"InvalidXMLException",
",",
"IOException",
"{",
"// Check ... | Writes whitespace from the specified character array.
@param out the character stream to write to, not <code>null</code>.
@param ch the character array from which to retrieve the text to be written,
not <code>null</code>.
@param start the start index into <code>ch</code>, must be >= 0.
@param length the num... | [
"Writes",
"whitespace",
"from",
"the",
"specified",
"character",
"array",
"."
] | 6ff483777d9467db9990b7c7ae0158f21a243c31 | https://github.com/znerd/xmlenc/blob/6ff483777d9467db9990b7c7ae0158f21a243c31/src/main/java/org/znerd/xmlenc/XMLEncoder.java#L350-L357 |
149,182 | znerd/xmlenc | src/main/java/org/znerd/xmlenc/XMLEncoder.java | XMLEncoder.attribute | public void attribute(Writer out, String name, String value, char quotationMark, boolean escapeAmpersands) throws NullPointerException, IOException {
char[] ch = value.toCharArray();
int length = ch.length;
int start = 0;
int end = start + length;
// TODO: Call overloaded attri... | java | public void attribute(Writer out, String name, String value, char quotationMark, boolean escapeAmpersands) throws NullPointerException, IOException {
char[] ch = value.toCharArray();
int length = ch.length;
int start = 0;
int end = start + length;
// TODO: Call overloaded attri... | [
"public",
"void",
"attribute",
"(",
"Writer",
"out",
",",
"String",
"name",
",",
"String",
"value",
",",
"char",
"quotationMark",
",",
"boolean",
"escapeAmpersands",
")",
"throws",
"NullPointerException",
",",
"IOException",
"{",
"char",
"[",
"]",
"ch",
"=",
... | Writes an attribute assignment.
@param out the character stream to write to, not <code>null</code>.
@param name the name of the attribute, not <code>null</code>.
@param value the value of the attribute, not <code>null</code>.
@param quotationMark the quotation mark, must be either the apostr... | [
"Writes",
"an",
"attribute",
"assignment",
"."
] | 6ff483777d9467db9990b7c7ae0158f21a243c31 | https://github.com/znerd/xmlenc/blob/6ff483777d9467db9990b7c7ae0158f21a243c31/src/main/java/org/znerd/xmlenc/XMLEncoder.java#L371-L432 |
149,183 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java | HighLevelAbstractionDefinition.setRelation | public boolean setRelation(TemporalExtendedPropositionDefinition lhsDef,
TemporalExtendedPropositionDefinition rhsDef, Relation relation) {
if (lhsDef == null || rhsDef == null || relation == null) {
return false;
}
if (!defs.contains(lhsDef) || !defs.contains(rhsDef)) {... | java | public boolean setRelation(TemporalExtendedPropositionDefinition lhsDef,
TemporalExtendedPropositionDefinition rhsDef, Relation relation) {
if (lhsDef == null || rhsDef == null || relation == null) {
return false;
}
if (!defs.contains(lhsDef) || !defs.contains(rhsDef)) {... | [
"public",
"boolean",
"setRelation",
"(",
"TemporalExtendedPropositionDefinition",
"lhsDef",
",",
"TemporalExtendedPropositionDefinition",
"rhsDef",
",",
"Relation",
"relation",
")",
"{",
"if",
"(",
"lhsDef",
"==",
"null",
"||",
"rhsDef",
"==",
"null",
"||",
"relation"... | Sets the relation between the two temporal extended proposition
definitions.
@param lhsDef
a {@link TemporalExtendedPropositionDefinition}.
@param rhsDef
a {@link TemporalExtendedPropositionDefinition}.
@param relation
a {@link Relation}.
@return <code>true</code> if setting the relation was successful,
<code>false</c... | [
"Sets",
"the",
"relation",
"between",
"the",
"two",
"temporal",
"extended",
"proposition",
"definitions",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java#L101-L116 |
149,184 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java | HighLevelAbstractionDefinition.removeRelation | public boolean removeRelation(
TemporalExtendedPropositionDefinition lhsRule,
TemporalExtendedPropositionDefinition rhsRule) {
List<TemporalExtendedPropositionDefinition> key = Arrays.asList(
lhsRule, rhsRule);
if (defPairsMap.remove(key) != null) {
re... | java | public boolean removeRelation(
TemporalExtendedPropositionDefinition lhsRule,
TemporalExtendedPropositionDefinition rhsRule) {
List<TemporalExtendedPropositionDefinition> key = Arrays.asList(
lhsRule, rhsRule);
if (defPairsMap.remove(key) != null) {
re... | [
"public",
"boolean",
"removeRelation",
"(",
"TemporalExtendedPropositionDefinition",
"lhsRule",
",",
"TemporalExtendedPropositionDefinition",
"rhsRule",
")",
"{",
"List",
"<",
"TemporalExtendedPropositionDefinition",
">",
"key",
"=",
"Arrays",
".",
"asList",
"(",
"lhsRule",... | Removes a relation between two temporal extended proposition definitions.
@param lhsRule
a {@link TemporalExtendedPropositionDefinition}.
@param rhsRule
a {@link TemporalExtendedPropositionDefinition}.
@return <code>true</code> if removing the relation was successful,
<code>false</code> otherwise (e.g., if either argu... | [
"Removes",
"a",
"relation",
"between",
"two",
"temporal",
"extended",
"proposition",
"definitions",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java#L130-L140 |
149,185 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java | HighLevelAbstractionDefinition.add | public boolean add(ExtendedPropositionDefinition def) {
if (def != null && this.defs.add(def)) {
this.defsAsListOutdated = true;
recalculateChildren();
return true;
} else {
return false;
}
} | java | public boolean add(ExtendedPropositionDefinition def) {
if (def != null && this.defs.add(def)) {
this.defsAsListOutdated = true;
recalculateChildren();
return true;
} else {
return false;
}
} | [
"public",
"boolean",
"add",
"(",
"ExtendedPropositionDefinition",
"def",
")",
"{",
"if",
"(",
"def",
"!=",
"null",
"&&",
"this",
".",
"defs",
".",
"add",
"(",
"def",
")",
")",
"{",
"this",
".",
"defsAsListOutdated",
"=",
"true",
";",
"recalculateChildren",... | Adds an extended proposition definition.
@param def
an {@link ExtendedPropositionDefinition}.
@return <code>true</code> if successfully added, <code>false</code>
otherwise (e.g., the {@link ExtendedPropositionDefinition} is
<code>null</code> or is already part of this abstraction
definition. | [
"Adds",
"an",
"extended",
"proposition",
"definition",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java#L174-L182 |
149,186 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java | HighLevelAbstractionDefinition.getRelation | public Relation getRelation(TemporalExtendedPropositionDefinition lhsDef,
TemporalExtendedPropositionDefinition rhsDef) {
return this.defPairsMap.get(Arrays.asList(lhsDef, rhsDef));
} | java | public Relation getRelation(TemporalExtendedPropositionDefinition lhsDef,
TemporalExtendedPropositionDefinition rhsDef) {
return this.defPairsMap.get(Arrays.asList(lhsDef, rhsDef));
} | [
"public",
"Relation",
"getRelation",
"(",
"TemporalExtendedPropositionDefinition",
"lhsDef",
",",
"TemporalExtendedPropositionDefinition",
"rhsDef",
")",
"{",
"return",
"this",
".",
"defPairsMap",
".",
"get",
"(",
"Arrays",
".",
"asList",
"(",
"lhsDef",
",",
"rhsDef",... | Gets the relation between two temporal extended proposition definitions.
@param lhsDef
a {@link TemporalExtendedPropositionDefinition}.
@param rhsDef
a {@link TemporalExtendedPropositionDefinition}.
@return a <code>Relation</code>, or <code>null</code> if none was
found. | [
"Gets",
"the",
"relation",
"between",
"two",
"temporal",
"extended",
"proposition",
"definitions",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java#L194-L197 |
149,187 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java | HighLevelAbstractionDefinition.removeAllRelations | public boolean removeAllRelations(TemporalExtendedPropositionDefinition def) {
for (Iterator<List<TemporalExtendedPropositionDefinition>> itr = this.defPairsMap.keySet().iterator(); itr.hasNext();) {
List<TemporalExtendedPropositionDefinition> pair = itr.next();
if (pair.get(0) == def ||... | java | public boolean removeAllRelations(TemporalExtendedPropositionDefinition def) {
for (Iterator<List<TemporalExtendedPropositionDefinition>> itr = this.defPairsMap.keySet().iterator(); itr.hasNext();) {
List<TemporalExtendedPropositionDefinition> pair = itr.next();
if (pair.get(0) == def ||... | [
"public",
"boolean",
"removeAllRelations",
"(",
"TemporalExtendedPropositionDefinition",
"def",
")",
"{",
"for",
"(",
"Iterator",
"<",
"List",
"<",
"TemporalExtendedPropositionDefinition",
">",
">",
"itr",
"=",
"this",
".",
"defPairsMap",
".",
"keySet",
"(",
")",
... | Removes all relations involving a temporal extended proposition
definition.
@param def
a {@link TemporalExtendedPropositionDefinition}.
@return <code>true</code> if all such relations were removed,
<code>false</code> otherwise. | [
"Removes",
"all",
"relations",
"involving",
"a",
"temporal",
"extended",
"proposition",
"definition",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java#L213-L221 |
149,188 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java | HighLevelAbstractionDefinition.remove | public boolean remove(ExtendedPropositionDefinition def) {
if (def instanceof TemporalExtendedPropositionDefinition) {
if (removeAllRelations((TemporalExtendedPropositionDefinition) def)) {
return true;
} else {
return false;
}
}
... | java | public boolean remove(ExtendedPropositionDefinition def) {
if (def instanceof TemporalExtendedPropositionDefinition) {
if (removeAllRelations((TemporalExtendedPropositionDefinition) def)) {
return true;
} else {
return false;
}
}
... | [
"public",
"boolean",
"remove",
"(",
"ExtendedPropositionDefinition",
"def",
")",
"{",
"if",
"(",
"def",
"instanceof",
"TemporalExtendedPropositionDefinition",
")",
"{",
"if",
"(",
"removeAllRelations",
"(",
"(",
"TemporalExtendedPropositionDefinition",
")",
"def",
")",
... | Removes an extended proposition definition, and all relations involving
it.
@param def
an {@link ExtendedPropositionDefinition}.
@return <code>true</code> if successful, <code>false</code>
otherwise. | [
"Removes",
"an",
"extended",
"proposition",
"definition",
"and",
"all",
"relations",
"involving",
"it",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/HighLevelAbstractionDefinition.java#L232-L246 |
149,189 | weblicht/wlfxb | src/main/java/eu/clarin/weblicht/wlfxb/io/XmlReaderWriter.java | XmlReaderWriter.readWriteElement | public void readWriteElement(String tagName) throws WLFormatException {
try {
while (xmlEventReader.hasNext()) {
XMLEvent event = xmlEventReader.nextEvent();
switch (event.getEventType()) {
case XMLStreamConstants.END_ELEMENT:
... | java | public void readWriteElement(String tagName) throws WLFormatException {
try {
while (xmlEventReader.hasNext()) {
XMLEvent event = xmlEventReader.nextEvent();
switch (event.getEventType()) {
case XMLStreamConstants.END_ELEMENT:
... | [
"public",
"void",
"readWriteElement",
"(",
"String",
"tagName",
")",
"throws",
"WLFormatException",
"{",
"try",
"{",
"while",
"(",
"xmlEventReader",
".",
"hasNext",
"(",
")",
")",
"{",
"XMLEvent",
"event",
"=",
"xmlEventReader",
".",
"nextEvent",
"(",
")",
"... | postcondition read pointer is just after the end of the tag with the local name tagName | [
"postcondition",
"read",
"pointer",
"is",
"just",
"after",
"the",
"end",
"of",
"the",
"tag",
"with",
"the",
"local",
"name",
"tagName"
] | a50f3c31062a3d617ed9018aabcc1180a8ceb464 | https://github.com/weblicht/wlfxb/blob/a50f3c31062a3d617ed9018aabcc1180a8ceb464/src/main/java/eu/clarin/weblicht/wlfxb/io/XmlReaderWriter.java#L232-L255 |
149,190 | weblicht/wlfxb | src/main/java/eu/clarin/weblicht/wlfxb/io/XmlReaderWriter.java | XmlReaderWriter.readWriteUpToStartElement | public void readWriteUpToStartElement(String startTag) throws XMLStreamException {
boolean startTagIsNext = false;
while (xmlEventReader.hasNext() && !startTagIsNext) {
XMLEvent peekedEvent = xmlEventReader.peek();
switch (peekedEvent.getEventType()) {
case XMLStr... | java | public void readWriteUpToStartElement(String startTag) throws XMLStreamException {
boolean startTagIsNext = false;
while (xmlEventReader.hasNext() && !startTagIsNext) {
XMLEvent peekedEvent = xmlEventReader.peek();
switch (peekedEvent.getEventType()) {
case XMLStr... | [
"public",
"void",
"readWriteUpToStartElement",
"(",
"String",
"startTag",
")",
"throws",
"XMLStreamException",
"{",
"boolean",
"startTagIsNext",
"=",
"false",
";",
"while",
"(",
"xmlEventReader",
".",
"hasNext",
"(",
")",
"&&",
"!",
"startTagIsNext",
")",
"{",
"... | postcondition read pointer is just before the start of the tag with the local name startTag | [
"postcondition",
"read",
"pointer",
"is",
"just",
"before",
"the",
"start",
"of",
"the",
"tag",
"with",
"the",
"local",
"name",
"startTag"
] | a50f3c31062a3d617ed9018aabcc1180a8ceb464 | https://github.com/weblicht/wlfxb/blob/a50f3c31062a3d617ed9018aabcc1180a8ceb464/src/main/java/eu/clarin/weblicht/wlfxb/io/XmlReaderWriter.java#L259-L279 |
149,191 | openbase/jul | pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java | StateRunner.init | @Override
public void init(final Class<? extends State> stateClass) throws InitializationException {
try {
currentState = getState(stateClass);
change.firePropertyChange(STATE_CHANGE, null, currentState.getClass());
} catch (NotAvailableException ex) {
throw new I... | java | @Override
public void init(final Class<? extends State> stateClass) throws InitializationException {
try {
currentState = getState(stateClass);
change.firePropertyChange(STATE_CHANGE, null, currentState.getClass());
} catch (NotAvailableException ex) {
throw new I... | [
"@",
"Override",
"public",
"void",
"init",
"(",
"final",
"Class",
"<",
"?",
"extends",
"State",
">",
"stateClass",
")",
"throws",
"InitializationException",
"{",
"try",
"{",
"currentState",
"=",
"getState",
"(",
"stateClass",
")",
";",
"change",
".",
"firePr... | Defines the initial state of the state machine.
@param stateClass
@throws InitializationException | [
"Defines",
"the",
"initial",
"state",
"of",
"the",
"state",
"machine",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java#L72-L80 |
149,192 | openbase/jul | pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java | StateRunner.run | @Override
public synchronized void run() {
LOGGER.info("run " + currentState.getClass().getSimpleName() + "...");
if (currentState == null) {
throw new IllegalStateException("No initial state defined.");
}
while (currentState != null) {
LOGGER.debug("execute "... | java | @Override
public synchronized void run() {
LOGGER.info("run " + currentState.getClass().getSimpleName() + "...");
if (currentState == null) {
throw new IllegalStateException("No initial state defined.");
}
while (currentState != null) {
LOGGER.debug("execute "... | [
"@",
"Override",
"public",
"synchronized",
"void",
"run",
"(",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"run \"",
"+",
"currentState",
".",
"getClass",
"(",
")",
".",
"getSimpleName",
"(",
")",
"+",
"\"...\"",
")",
";",
"if",
"(",
"currentState",
"==",
... | Method starts the state machine.
Because this class is implementing the runnable interface its not recommended to call this method manually.
Start the state machine via the global executor service.
e.g. GlobalCachedExecutorService.submit(stateMachineInstance) | [
"Method",
"starts",
"the",
"state",
"machine",
".",
"Because",
"this",
"class",
"is",
"implementing",
"the",
"runnable",
"interface",
"its",
"not",
"recommended",
"to",
"call",
"this",
"method",
"manually",
".",
"Start",
"the",
"state",
"machine",
"via",
"the"... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java#L89-L124 |
149,193 | openbase/jul | pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java | StateRunner.getState | private State getState(final Class<? extends State> stateClass) throws NotAvailableException {
if (!stateMap.containsKey(stateClass)) {
try {
final State state;
try {
state = stateClass.getConstructor().newInstance();
} catch (Illeg... | java | private State getState(final Class<? extends State> stateClass) throws NotAvailableException {
if (!stateMap.containsKey(stateClass)) {
try {
final State state;
try {
state = stateClass.getConstructor().newInstance();
} catch (Illeg... | [
"private",
"State",
"getState",
"(",
"final",
"Class",
"<",
"?",
"extends",
"State",
">",
"stateClass",
")",
"throws",
"NotAvailableException",
"{",
"if",
"(",
"!",
"stateMap",
".",
"containsKey",
"(",
"stateClass",
")",
")",
"{",
"try",
"{",
"final",
"Sta... | Method loads the state referred by the state class.
Once the state is loaded it will be cached and next time the state is requested the cached instance will be returned out of performance reasons.
@param stateClass the class defining the state to load.
@return an new or cached instance of the state..
@throws NotAvail... | [
"Method",
"loads",
"the",
"state",
"referred",
"by",
"the",
"state",
"class",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/pattern/default/src/main/java/org/openbase/jul/pattern/statemachine/StateRunner.java#L153-L169 |
149,194 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/proposition/value/InequalityNumberValue.java | InequalityNumberValue.compare | @Override
public ValueComparator compare(Value d2) {
if (d2 == null) {
return ValueComparator.NOT_EQUAL_TO;
}
switch (d2.getType()) {
case NUMBERVALUE:
NumberValue otherVal = (NumberValue) d2;
int valComp = val.compareTo(otherVal);
... | java | @Override
public ValueComparator compare(Value d2) {
if (d2 == null) {
return ValueComparator.NOT_EQUAL_TO;
}
switch (d2.getType()) {
case NUMBERVALUE:
NumberValue otherVal = (NumberValue) d2;
int valComp = val.compareTo(otherVal);
... | [
"@",
"Override",
"public",
"ValueComparator",
"compare",
"(",
"Value",
"d2",
")",
"{",
"if",
"(",
"d2",
"==",
"null",
")",
"{",
"return",
"ValueComparator",
".",
"NOT_EQUAL_TO",
";",
"}",
"switch",
"(",
"d2",
".",
"getType",
"(",
")",
")",
"{",
"case",... | Compares this value and another numerically, or checks this value
for membership in a value list.
@param o a {@link Value}.
@return If the provided value is a {@link NumericalValue}, returns
{@link ValueComparator#GREATER_THAN},
{@link ValueComparator#LESS_THAN} or {@link ValueComparator#EQUAL_TO}
depending on whether... | [
"Compares",
"this",
"value",
"and",
"another",
"numerically",
"or",
"checks",
"this",
"value",
"for",
"membership",
"in",
"a",
"value",
"list",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/proposition/value/InequalityNumberValue.java#L203-L257 |
149,195 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/graph/DirectedGraph.java | DirectedGraph.clear | public void clear() {
vertices.clear();
vertexModCount++;
Arrays.matrixFill(edges, null);
edgeCount = 0;
edgesArr = null;
edgeModCount++;
freeList.clear();
for (int row = capacity - 1; row >= 0; row--) {
freeList.add(row);
}
} | java | public void clear() {
vertices.clear();
vertexModCount++;
Arrays.matrixFill(edges, null);
edgeCount = 0;
edgesArr = null;
edgeModCount++;
freeList.clear();
for (int row = capacity - 1; row >= 0; row--) {
freeList.add(row);
}
} | [
"public",
"void",
"clear",
"(",
")",
"{",
"vertices",
".",
"clear",
"(",
")",
";",
"vertexModCount",
"++",
";",
"Arrays",
".",
"matrixFill",
"(",
"edges",
",",
"null",
")",
";",
"edgeCount",
"=",
"0",
";",
"edgesArr",
"=",
"null",
";",
"edgeModCount",
... | Remove all vertices and edges. | [
"Remove",
"all",
"vertices",
"and",
"edges",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/graph/DirectedGraph.java#L141-L152 |
149,196 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/graph/DirectedGraph.java | DirectedGraph.add | public void add(Object vertex) {
if (vertex == null || vertices.containsKey(vertex)) {
return;
}
checkGraphSize();
vertices.put(vertex, new VertexMetadata(freeList.removeFirst()));
vertexModCount++;
} | java | public void add(Object vertex) {
if (vertex == null || vertices.containsKey(vertex)) {
return;
}
checkGraphSize();
vertices.put(vertex, new VertexMetadata(freeList.removeFirst()));
vertexModCount++;
} | [
"public",
"void",
"add",
"(",
"Object",
"vertex",
")",
"{",
"if",
"(",
"vertex",
"==",
"null",
"||",
"vertices",
".",
"containsKey",
"(",
"vertex",
")",
")",
"{",
"return",
";",
"}",
"checkGraphSize",
"(",
")",
";",
"vertices",
".",
"put",
"(",
"vert... | Adds a vertex.
@param vertex
a vertex. | [
"Adds",
"a",
"vertex",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/graph/DirectedGraph.java#L160-L169 |
149,197 | eurekaclinical/protempa | protempa-framework/src/main/java/org/protempa/graph/DirectedGraph.java | DirectedGraph.remove | public Object remove(Object vertex) {
VertexMetadata vm = (VertexMetadata) vertices.get(vertex);
if (vm == null) {
return null;
}
vertices.remove(vertex);
vertexModCount++;
int index = vm.index;
for (int row = 0; row < capacity; row++) {
ed... | java | public Object remove(Object vertex) {
VertexMetadata vm = (VertexMetadata) vertices.get(vertex);
if (vm == null) {
return null;
}
vertices.remove(vertex);
vertexModCount++;
int index = vm.index;
for (int row = 0; row < capacity; row++) {
ed... | [
"public",
"Object",
"remove",
"(",
"Object",
"vertex",
")",
"{",
"VertexMetadata",
"vm",
"=",
"(",
"VertexMetadata",
")",
"vertices",
".",
"get",
"(",
"vertex",
")",
";",
"if",
"(",
"vm",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"vertices",
... | Remove a vertex and all edges between the vertex and other vertices.
@param vertex
a vertex.
@return the value of the vertex, if it existed. | [
"Remove",
"a",
"vertex",
"and",
"all",
"edges",
"between",
"the",
"vertex",
"and",
"other",
"vertices",
"."
] | 5a620d1a407c7a5426d1cf17d47b97717cf71634 | https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/graph/DirectedGraph.java#L178-L194 |
149,198 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java | MultiLanguageTextProcessor.isEmpty | public static boolean isEmpty(final MultiLanguageText multiLanguageText) {
for (MultiLanguageText.MapFieldEntry entry : multiLanguageText.getEntryList()) {
if (!entry.getValue().isEmpty()) {
return false;
}
}
return true;
} | java | public static boolean isEmpty(final MultiLanguageText multiLanguageText) {
for (MultiLanguageText.MapFieldEntry entry : multiLanguageText.getEntryList()) {
if (!entry.getValue().isEmpty()) {
return false;
}
}
return true;
} | [
"public",
"static",
"boolean",
"isEmpty",
"(",
"final",
"MultiLanguageText",
"multiLanguageText",
")",
"{",
"for",
"(",
"MultiLanguageText",
".",
"MapFieldEntry",
"entry",
":",
"multiLanguageText",
".",
"getEntryList",
"(",
")",
")",
"{",
"if",
"(",
"!",
"entry"... | Test if the multiLanguageText is empty. This means that every multiLanguageText list for every
languageCode is empty or that it only contains empty string.
@param multiLanguageText the multiLanguageText type which is tested
@return if the multiLanguageText type is empty as explained above | [
"Test",
"if",
"the",
"multiLanguageText",
"is",
"empty",
".",
"This",
"means",
"that",
"every",
"multiLanguageText",
"list",
"for",
"every",
"languageCode",
"is",
"empty",
"or",
"that",
"it",
"only",
"contains",
"empty",
"string",
"."
] | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java#L54-L61 |
149,199 | openbase/jul | extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java | MultiLanguageTextProcessor.addMultiLanguageText | public static MultiLanguageText.Builder addMultiLanguageText(final MultiLanguageText.Builder multiLanguageTextBuilder, final String languageCode, final String multiLanguageText) {
for (int i = 0; i < multiLanguageTextBuilder.getEntryCount(); i++) {
// found multiLanguageTexts for the entry key
... | java | public static MultiLanguageText.Builder addMultiLanguageText(final MultiLanguageText.Builder multiLanguageTextBuilder, final String languageCode, final String multiLanguageText) {
for (int i = 0; i < multiLanguageTextBuilder.getEntryCount(); i++) {
// found multiLanguageTexts for the entry key
... | [
"public",
"static",
"MultiLanguageText",
".",
"Builder",
"addMultiLanguageText",
"(",
"final",
"MultiLanguageText",
".",
"Builder",
"multiLanguageTextBuilder",
",",
"final",
"String",
"languageCode",
",",
"final",
"String",
"multiLanguageText",
")",
"{",
"for",
"(",
"... | Add a multiLanguageText to a multiLanguageTextBuilder by languageCode. If the multiLanguageText is already contained for the
language code nothing will be done. If the languageCode already exists and the multiLanguageText is not contained
it will be added to the end of the multiLanguageText list by this language code. ... | [
"Add",
"a",
"multiLanguageText",
"to",
"a",
"multiLanguageTextBuilder",
"by",
"languageCode",
".",
"If",
"the",
"multiLanguageText",
"is",
"already",
"contained",
"for",
"the",
"language",
"code",
"nothing",
"will",
"be",
"done",
".",
"If",
"the",
"languageCode",
... | 662e98c3a853085e475be54c3be3deb72193c72d | https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/extension/type/processing/src/main/java/org/openbase/jul/extension/type/processing/MultiLanguageTextProcessor.java#L136-L154 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.