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 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.processOrphanedEvents | Observable<ComapiResult<MessagesQueryResponse>> processOrphanedEvents(ComapiResult<MessagesQueryResponse> result, final ChatController.OrphanedEventsToRemoveListener removeListener) {
if (result.isSuccessful() && result.getResult() != null) {
final MessagesQueryResponse response = result.getResult... | java | Observable<ComapiResult<MessagesQueryResponse>> processOrphanedEvents(ComapiResult<MessagesQueryResponse> result, final ChatController.OrphanedEventsToRemoveListener removeListener) {
if (result.isSuccessful() && result.getResult() != null) {
final MessagesQueryResponse response = result.getResult... | [
"Observable",
"<",
"ComapiResult",
"<",
"MessagesQueryResponse",
">",
">",
"processOrphanedEvents",
"(",
"ComapiResult",
"<",
"MessagesQueryResponse",
">",
"result",
",",
"final",
"ChatController",
".",
"OrphanedEventsToRemoveListener",
"removeListener",
")",
"{",
"if",
... | Handle orphaned events related to message query.
@param result Message query response
@return Observable returning message query response from argument unchanged by the method. | [
"Handle",
"orphaned",
"events",
"related",
"to",
"message",
"query",
"."
] | 388f37bfacb7793ce30c92ab70e5f32848bbe460 | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L185-L245 | train |
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.updateStoreWithNewMessage | public Observable<Boolean> updateStoreWithNewMessage(final ChatMessage message, final ChatController.NoConversationListener noConversationListener) {
return asObservable(new Executor<Boolean>() {
@Override
protected void execute(ChatStore store, Emitter<Boolean> emitter) {
... | java | public Observable<Boolean> updateStoreWithNewMessage(final ChatMessage message, final ChatController.NoConversationListener noConversationListener) {
return asObservable(new Executor<Boolean>() {
@Override
protected void execute(ChatStore store, Emitter<Boolean> emitter) {
... | [
"public",
"Observable",
"<",
"Boolean",
">",
"updateStoreWithNewMessage",
"(",
"final",
"ChatMessage",
"message",
",",
"final",
"ChatController",
".",
"NoConversationListener",
"noConversationListener",
")",
"{",
"return",
"asObservable",
"(",
"new",
"Executor",
"<",
... | Deletes temporary message and inserts provided one. If no associated conversation exists will trigger GET from server.
@param message Message to save.
@param noConversationListener Listener for the chat controller to get conversation if no local copy is present.
@return Observable emitting result. | [
"Deletes",
"temporary",
"message",
"and",
"inserts",
"provided",
"one",
".",
"If",
"no",
"associated",
"conversation",
"exists",
"will",
"trigger",
"GET",
"from",
"server",
"."
] | 388f37bfacb7793ce30c92ab70e5f32848bbe460 | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L254-L295 | train |
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.updateStoreForSentError | public Observable<Boolean> updateStoreForSentError(String conversationId, String tempId, String profileId) {
return asObservable(new Executor<Boolean>() {
@Override
protected void execute(ChatStore store, Emitter<Boolean> emitter) {
store.beginTransaction();
... | java | public Observable<Boolean> updateStoreForSentError(String conversationId, String tempId, String profileId) {
return asObservable(new Executor<Boolean>() {
@Override
protected void execute(ChatStore store, Emitter<Boolean> emitter) {
store.beginTransaction();
... | [
"public",
"Observable",
"<",
"Boolean",
">",
"updateStoreForSentError",
"(",
"String",
"conversationId",
",",
"String",
"tempId",
",",
"String",
"profileId",
")",
"{",
"return",
"asObservable",
"(",
"new",
"Executor",
"<",
"Boolean",
">",
"(",
")",
"{",
"@",
... | Insert 'error' message status if sending message failed.
@param conversationId Unique conversation id.
@param tempId Id of an temporary message for which
@param profileId Profile id from current session data.
@return Observable emitting result. | [
"Insert",
"error",
"message",
"status",
"if",
"sending",
"message",
"failed",
"."
] | 388f37bfacb7793ce30c92ab70e5f32848bbe460 | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L305-L317 | train |
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.doUpdateConversationFromEvent | private boolean doUpdateConversationFromEvent(ChatStore store, String conversationId, Long eventId, Long updatedOn) {
ChatConversationBase conversation = store.getConversation(conversationId);
if (conversation != null) {
ChatConversationBase.Builder builder = ChatConversationBase.baseBuil... | java | private boolean doUpdateConversationFromEvent(ChatStore store, String conversationId, Long eventId, Long updatedOn) {
ChatConversationBase conversation = store.getConversation(conversationId);
if (conversation != null) {
ChatConversationBase.Builder builder = ChatConversationBase.baseBuil... | [
"private",
"boolean",
"doUpdateConversationFromEvent",
"(",
"ChatStore",
"store",
",",
"String",
"conversationId",
",",
"Long",
"eventId",
",",
"Long",
"updatedOn",
")",
"{",
"ChatConversationBase",
"conversation",
"=",
"store",
".",
"getConversation",
"(",
"conversat... | Update conversation state with received event details. This should be called only inside transaction.
@param store Chat Store instance.
@param conversationId Unique conversation id.
@param eventId Conversation event id.
@param updatedOn New timestamp of state update.
@return True if successful. | [
"Update",
"conversation",
"state",
"with",
"received",
"event",
"details",
".",
"This",
"should",
"be",
"called",
"only",
"inside",
"transaction",
"."
] | 388f37bfacb7793ce30c92ab70e5f32848bbe460 | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L328-L354 | train |
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.upsertConversation | public Observable<Boolean> upsertConversation(ChatConversation conversation) {
List<ChatConversation> conversations = new ArrayList<>();
conversations.add(conversation);
return upsertConversations(conversations);
} | java | public Observable<Boolean> upsertConversation(ChatConversation conversation) {
List<ChatConversation> conversations = new ArrayList<>();
conversations.add(conversation);
return upsertConversations(conversations);
} | [
"public",
"Observable",
"<",
"Boolean",
">",
"upsertConversation",
"(",
"ChatConversation",
"conversation",
")",
"{",
"List",
"<",
"ChatConversation",
">",
"conversations",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"conversations",
".",
"add",
"(",
"conversa... | Insert or update conversation in the store.
@param conversation Conversation object to insert or apply an update.
@return Observable emitting result. | [
"Insert",
"or",
"update",
"conversation",
"in",
"the",
"store",
"."
] | 388f37bfacb7793ce30c92ab70e5f32848bbe460 | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L425-L430 | train |
comapi/comapi-chat-sdk-android | COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java | PersistenceController.asObservable | private <T> Observable<T> asObservable(Executor<T> transaction) {
return Observable.create(emitter -> storeFactory.execute(new StoreTransaction<ChatStore>() {
@Override
protected void execute(ChatStore store) {
try {
transaction.execute(store, emitter)... | java | private <T> Observable<T> asObservable(Executor<T> transaction) {
return Observable.create(emitter -> storeFactory.execute(new StoreTransaction<ChatStore>() {
@Override
protected void execute(ChatStore store) {
try {
transaction.execute(store, emitter)... | [
"private",
"<",
"T",
">",
"Observable",
"<",
"T",
">",
"asObservable",
"(",
"Executor",
"<",
"T",
">",
"transaction",
")",
"{",
"return",
"Observable",
".",
"create",
"(",
"emitter",
"->",
"storeFactory",
".",
"execute",
"(",
"new",
"StoreTransaction",
"<"... | Executes transaction callback ass an observable.
@param transaction Store transaction.
@param <T> Store class.
@return Observable executing given store transaction. | [
"Executes",
"transaction",
"callback",
"ass",
"an",
"observable",
"."
] | 388f37bfacb7793ce30c92ab70e5f32848bbe460 | https://github.com/comapi/comapi-chat-sdk-android/blob/388f37bfacb7793ce30c92ab70e5f32848bbe460/COMAPI/chat/src/main/java/com/comapi/chat/PersistenceController.java#L598-L609 | train |
tvesalainen/lpg | src/main/java/org/vesalainen/parser/util/Input.java | Input.setCharset | @Override
public void setCharset(Charset cs, boolean fixedCharset)
{
if (includeLevel.in instanceof ModifiableCharset)
{
ModifiableCharset sr = (ModifiableCharset) includeLevel.in;
sr.setCharset(cs, fixedCharset);
}
else
{
throw new Uns... | java | @Override
public void setCharset(Charset cs, boolean fixedCharset)
{
if (includeLevel.in instanceof ModifiableCharset)
{
ModifiableCharset sr = (ModifiableCharset) includeLevel.in;
sr.setCharset(cs, fixedCharset);
}
else
{
throw new Uns... | [
"@",
"Override",
"public",
"void",
"setCharset",
"(",
"Charset",
"cs",
",",
"boolean",
"fixedCharset",
")",
"{",
"if",
"(",
"includeLevel",
".",
"in",
"instanceof",
"ModifiableCharset",
")",
"{",
"ModifiableCharset",
"sr",
"=",
"(",
"ModifiableCharset",
")",
"... | Set current character set. Only supported with byte input!
@param cs
@param fixedCharset
@see org.vesalainen.parser.ParserFeature#UseModifiableCharset | [
"Set",
"current",
"character",
"set",
".",
"Only",
"supported",
"with",
"byte",
"input!"
] | 0917b8d295e9772b9f8a0affc258a08530cd567a | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L558-L570 | train |
tvesalainen/lpg | src/main/java/org/vesalainen/parser/util/Input.java | Input.release | @Override
public void release() throws IOException
{
if (includeLevel.in != null && end != cursor)
{
if (end % size < cursor % size)
{
buffer2.position(0);
buffer2.limit((int)(end % size));
buffer1.position((int)(cursor % si... | java | @Override
public void release() throws IOException
{
if (includeLevel.in != null && end != cursor)
{
if (end % size < cursor % size)
{
buffer2.position(0);
buffer2.limit((int)(end % size));
buffer1.position((int)(cursor % si... | [
"@",
"Override",
"public",
"void",
"release",
"(",
")",
"throws",
"IOException",
"{",
"if",
"(",
"includeLevel",
".",
"in",
"!=",
"null",
"&&",
"end",
"!=",
"cursor",
")",
"{",
"if",
"(",
"end",
"%",
"size",
"<",
"cursor",
"%",
"size",
")",
"{",
"b... | Synchronizes actual reader to current cursor position
@throws IOException | [
"Synchronizes",
"actual",
"reader",
"to",
"current",
"cursor",
"position"
] | 0917b8d295e9772b9f8a0affc258a08530cd567a | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L744-L790 | train |
tvesalainen/lpg | src/main/java/org/vesalainen/parser/util/Input.java | Input.peek | @Override
public int peek(int offset) throws IOException
{
long target = cursor + offset - 1;
if (target - end > size || target < end - size || target < 0)
{
throw new IllegalArgumentException("offset "+offset+" out of buffer");
}
if (target >= end)
{
... | java | @Override
public int peek(int offset) throws IOException
{
long target = cursor + offset - 1;
if (target - end > size || target < end - size || target < 0)
{
throw new IllegalArgumentException("offset "+offset+" out of buffer");
}
if (target >= end)
{
... | [
"@",
"Override",
"public",
"int",
"peek",
"(",
"int",
"offset",
")",
"throws",
"IOException",
"{",
"long",
"target",
"=",
"cursor",
"+",
"offset",
"-",
"1",
";",
"if",
"(",
"target",
"-",
"end",
">",
"size",
"||",
"target",
"<",
"end",
"-",
"size",
... | get a char from input buffer.
@param offset 0 is last read char.
@return
@throws IOException | [
"get",
"a",
"char",
"from",
"input",
"buffer",
"."
] | 0917b8d295e9772b9f8a0affc258a08530cd567a | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L959-L989 | train |
tvesalainen/lpg | src/main/java/org/vesalainen/parser/util/Input.java | Input.rewind | @Override
public void rewind(int count) throws IOException
{
if (count < 0)
{
throw new IllegalArgumentException("negative rewind "+count);
}
cursor -= count;
if (cursor < end - size || cursor < 0)
{
throw new IOException("insufficient room... | java | @Override
public void rewind(int count) throws IOException
{
if (count < 0)
{
throw new IllegalArgumentException("negative rewind "+count);
}
cursor -= count;
if (cursor < end - size || cursor < 0)
{
throw new IOException("insufficient room... | [
"@",
"Override",
"public",
"void",
"rewind",
"(",
"int",
"count",
")",
"throws",
"IOException",
"{",
"if",
"(",
"count",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"negative rewind \"",
"+",
"count",
")",
";",
"}",
"cursor",
"-=... | Rewinds cursor position count characters. Used for unread.
@param count
@throws IOException | [
"Rewinds",
"cursor",
"position",
"count",
"characters",
".",
"Used",
"for",
"unread",
"."
] | 0917b8d295e9772b9f8a0affc258a08530cd567a | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L1037-L1083 | train |
tvesalainen/lpg | src/main/java/org/vesalainen/parser/util/Input.java | Input.read | @Override
public final int read() throws IOException
{
assert cursor <= end;
if (cursor >= end)
{
if (includeLevel.in == null)
{
return -1;
}
int cp = (int)(cursor % size);
long len = size-(cursor-waterMark);
... | java | @Override
public final int read() throws IOException
{
assert cursor <= end;
if (cursor >= end)
{
if (includeLevel.in == null)
{
return -1;
}
int cp = (int)(cursor % size);
long len = size-(cursor-waterMark);
... | [
"@",
"Override",
"public",
"final",
"int",
"read",
"(",
")",
"throws",
"IOException",
"{",
"assert",
"cursor",
"<=",
"end",
";",
"if",
"(",
"cursor",
">=",
"end",
")",
"{",
"if",
"(",
"includeLevel",
".",
"in",
"==",
"null",
")",
"{",
"return",
"-",
... | Reads from ring buffer or from actual reader.
@return
@throws IOException | [
"Reads",
"from",
"ring",
"buffer",
"or",
"from",
"actual",
"reader",
"."
] | 0917b8d295e9772b9f8a0affc258a08530cd567a | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L1115-L1191 | train |
tvesalainen/lpg | src/main/java/org/vesalainen/parser/util/Input.java | Input.parseInt | @Override
public int parseInt(long s, int l, int radix)
{
return Primitives.parseInt(getCharSequence(s, l), radix);
} | java | @Override
public int parseInt(long s, int l, int radix)
{
return Primitives.parseInt(getCharSequence(s, l), radix);
} | [
"@",
"Override",
"public",
"int",
"parseInt",
"(",
"long",
"s",
",",
"int",
"l",
",",
"int",
"radix",
")",
"{",
"return",
"Primitives",
".",
"parseInt",
"(",
"getCharSequence",
"(",
"s",
",",
"l",
")",
",",
"radix",
")",
";",
"}"
] | Converts binary to int
@param s
@param l
@param radix
@return | [
"Converts",
"binary",
"to",
"int"
] | 0917b8d295e9772b9f8a0affc258a08530cd567a | https://github.com/tvesalainen/lpg/blob/0917b8d295e9772b9f8a0affc258a08530cd567a/src/main/java/org/vesalainen/parser/util/Input.java#L1432-L1436 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/rest/Compile.java | Compile.compile | @GET
public Response compile(@QueryParam("type") final String _type)
{
boolean success = false;
try {
if (hasAccess()) {
AbstractRest.LOG.info("===Starting Compiler via REST===");
if ("java".equalsIgnoreCase(_type)) {
AbstractRest.L... | java | @GET
public Response compile(@QueryParam("type") final String _type)
{
boolean success = false;
try {
if (hasAccess()) {
AbstractRest.LOG.info("===Starting Compiler via REST===");
if ("java".equalsIgnoreCase(_type)) {
AbstractRest.L... | [
"@",
"GET",
"public",
"Response",
"compile",
"(",
"@",
"QueryParam",
"(",
"\"type\"",
")",
"final",
"String",
"_type",
")",
"{",
"boolean",
"success",
"=",
"false",
";",
"try",
"{",
"if",
"(",
"hasAccess",
"(",
")",
")",
"{",
"AbstractRest",
".",
"LOG"... | Called to compile java, css etc.
@param _type type tobe compiled
@return Response | [
"Called",
"to",
"compile",
"java",
"css",
"etc",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/rest/Compile.java#L58-L90 | train |
javabits/yar | yar-guice/src/main/java/org/javabits/yar/guice/NoWaitBlockingSupplier.java | NoWaitBlockingSupplier.supplierChanged | @Override
public void supplierChanged(SupplierEvent supplierEvent) {
SupplierEvent.Type type = supplierEvent.type();
@SuppressWarnings("unchecked")
Supplier<T> supplier = (Supplier<T>) supplierEvent.supplier();
switch (type) {
case ADD:
if (supplierReferen... | java | @Override
public void supplierChanged(SupplierEvent supplierEvent) {
SupplierEvent.Type type = supplierEvent.type();
@SuppressWarnings("unchecked")
Supplier<T> supplier = (Supplier<T>) supplierEvent.supplier();
switch (type) {
case ADD:
if (supplierReferen... | [
"@",
"Override",
"public",
"void",
"supplierChanged",
"(",
"SupplierEvent",
"supplierEvent",
")",
"{",
"SupplierEvent",
".",
"Type",
"type",
"=",
"supplierEvent",
".",
"type",
"(",
")",
";",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Supplier",
"<",
... | there no thread safety issue because the supplierFutureRef is only used for the
asynchronous approach. The risk is small enough to avoid to introduce more complexity. | [
"there",
"no",
"thread",
"safety",
"issue",
"because",
"the",
"supplierFutureRef",
"is",
"only",
"used",
"for",
"the",
"asynchronous",
"approach",
".",
"The",
"risk",
"is",
"small",
"enough",
"to",
"avoid",
"to",
"introduce",
"more",
"complexity",
"."
] | e146a86611ca4831e8334c9a98fd7086cee9c03e | https://github.com/javabits/yar/blob/e146a86611ca4831e8334c9a98fd7086cee9c03e/yar-guice/src/main/java/org/javabits/yar/guice/NoWaitBlockingSupplier.java#L83-L102 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/datamodel/ui/BooleanUI.java | BooleanUI.getLabel | private String getLabel(final UIValue _uiValue,
final Boolean _key)
throws CacheReloadException
{
String ret = BooleanUtils.toStringTrueFalse(_key);
if (_uiValue.getAttribute() != null
&& DBProperties.hasProperty(_uiValue.getAttribute().get... | java | private String getLabel(final UIValue _uiValue,
final Boolean _key)
throws CacheReloadException
{
String ret = BooleanUtils.toStringTrueFalse(_key);
if (_uiValue.getAttribute() != null
&& DBProperties.hasProperty(_uiValue.getAttribute().get... | [
"private",
"String",
"getLabel",
"(",
"final",
"UIValue",
"_uiValue",
",",
"final",
"Boolean",
"_key",
")",
"throws",
"CacheReloadException",
"{",
"String",
"ret",
"=",
"BooleanUtils",
".",
"toStringTrueFalse",
"(",
"_key",
")",
";",
"if",
"(",
"_uiValue",
"."... | Method to evaluate a String representation for the boolean.
@param _uiValue UIValue the String representation is wanted for
@param _key key the String representation is wanted for
@return String representation
@throws CacheReloadException the cache reload exception | [
"Method",
"to",
"evaluate",
"a",
"String",
"representation",
"for",
"the",
"boolean",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/datamodel/ui/BooleanUI.java#L57-L72 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.addObject | public void addObject(final Object[] _row)
throws SQLException
{
// store the ids also
this.idList.add((Long) _row[0]);
if (getFromSelect() != null) {
final int column = "id".equals(this.valueSelect.getValueType())
? this.valueSelect.getColInd... | java | public void addObject(final Object[] _row)
throws SQLException
{
// store the ids also
this.idList.add((Long) _row[0]);
if (getFromSelect() != null) {
final int column = "id".equals(this.valueSelect.getValueType())
? this.valueSelect.getColInd... | [
"public",
"void",
"addObject",
"(",
"final",
"Object",
"[",
"]",
"_row",
")",
"throws",
"SQLException",
"{",
"// store the ids also",
"this",
".",
"idList",
".",
"add",
"(",
"(",
"Long",
")",
"_row",
"[",
"0",
"]",
")",
";",
"if",
"(",
"getFromSelect",
... | Add an Object for this OneSelect.
@param _row Objects from the eFaps database
@throws SQLException on error | [
"Add",
"an",
"Object",
"for",
"this",
"OneSelect",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L222-L263 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.addFileSelectPart | public void addFileSelectPart()
throws EFapsException
{
final Type type;
// if a previous select exists it is based on the previous select,
// else it is based on the basic table
if (this.selectParts.size() > 0) {
type = this.selectParts.get(this.selectParts.size(... | java | public void addFileSelectPart()
throws EFapsException
{
final Type type;
// if a previous select exists it is based on the previous select,
// else it is based on the basic table
if (this.selectParts.size() > 0) {
type = this.selectParts.get(this.selectParts.size(... | [
"public",
"void",
"addFileSelectPart",
"(",
")",
"throws",
"EFapsException",
"{",
"final",
"Type",
"type",
";",
"// if a previous select exists it is based on the previous select,",
"// else it is based on the basic table",
"if",
"(",
"this",
".",
"selectParts",
".",
"size",
... | Add the select part to connect the general store.
@throws EFapsException the e faps exception | [
"Add",
"the",
"select",
"part",
"to",
"connect",
"the",
"general",
"store",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L304-L317 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.addGenInstSelectPart | public void addGenInstSelectPart()
throws EFapsException
{
final Type type;
// if a previous select exists it is based on the previous select,
// else it is based on the basic table
if (this.selectParts.size() > 0) {
type = this.selectParts.get(this.selectParts.si... | java | public void addGenInstSelectPart()
throws EFapsException
{
final Type type;
// if a previous select exists it is based on the previous select,
// else it is based on the basic table
if (this.selectParts.size() > 0) {
type = this.selectParts.get(this.selectParts.si... | [
"public",
"void",
"addGenInstSelectPart",
"(",
")",
"throws",
"EFapsException",
"{",
"final",
"Type",
"type",
";",
"// if a previous select exists it is based on the previous select,",
"// else it is based on the basic table",
"if",
"(",
"this",
".",
"selectParts",
".",
"size... | Add the select part to connect the general instances.
@throws EFapsException the e faps exception | [
"Add",
"the",
"select",
"part",
"to",
"connect",
"the",
"general",
"instances",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L324-L337 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.addAttributeSetSelectPart | public void addAttributeSetSelectPart(final String _attributeSet,
final String _where)
throws EFapsException
{
final Type type;
// if a previous select exists it is based on the previous select,
// else it is based on the basic table
... | java | public void addAttributeSetSelectPart(final String _attributeSet,
final String _where)
throws EFapsException
{
final Type type;
// if a previous select exists it is based on the previous select,
// else it is based on the basic table
... | [
"public",
"void",
"addAttributeSetSelectPart",
"(",
"final",
"String",
"_attributeSet",
",",
"final",
"String",
"_where",
")",
"throws",
"EFapsException",
"{",
"final",
"Type",
"type",
";",
"// if a previous select exists it is based on the previous select,",
"// else it is b... | Adds the attribute set select part.
@param _attributeSet the attribute set
@param _where the where
@throws EFapsException on error | [
"Adds",
"the",
"attribute",
"set",
"select",
"part",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L359-L381 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.append2SQLFrom | public void append2SQLFrom(final SQLSelect _select)
throws EFapsException
{
// for attributes it must be evaluated if the attribute is inside a child table
if (this.valueSelect != null && "attribute".equals(this.valueSelect.getValueType())) {
final Type type;
if (this... | java | public void append2SQLFrom(final SQLSelect _select)
throws EFapsException
{
// for attributes it must be evaluated if the attribute is inside a child table
if (this.valueSelect != null && "attribute".equals(this.valueSelect.getValueType())) {
final Type type;
if (this... | [
"public",
"void",
"append2SQLFrom",
"(",
"final",
"SQLSelect",
"_select",
")",
"throws",
"EFapsException",
"{",
"// for attributes it must be evaluated if the attribute is inside a child table",
"if",
"(",
"this",
".",
"valueSelect",
"!=",
"null",
"&&",
"\"attribute\"",
"."... | Method used to append to the from part of an SQL statement.
@param _select SQL select wrapper
@throws EFapsException on error | [
"Method",
"used",
"to",
"append",
"to",
"the",
"from",
"part",
"of",
"an",
"SQL",
"statement",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L402-L436 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.append2SQLSelect | public int append2SQLSelect(final SQLSelect _select,
final int _colIndex)
throws EFapsException
{
final Type type;
if (this.selectParts.size() > 0) {
type = this.selectParts.get(this.selectParts.size() - 1).getType();
} else {
t... | java | public int append2SQLSelect(final SQLSelect _select,
final int _colIndex)
throws EFapsException
{
final Type type;
if (this.selectParts.size() > 0) {
type = this.selectParts.get(this.selectParts.size() - 1).getType();
} else {
t... | [
"public",
"int",
"append2SQLSelect",
"(",
"final",
"SQLSelect",
"_select",
",",
"final",
"int",
"_colIndex",
")",
"throws",
"EFapsException",
"{",
"final",
"Type",
"type",
";",
"if",
"(",
"this",
".",
"selectParts",
".",
"size",
"(",
")",
">",
"0",
")",
... | Method used to append to the select part of an SQL statement.
@param _select SQL select statement
@param _colIndex actual column index
@return number of columns added in this part of the SQL statement
@throws EFapsException on error | [
"Method",
"used",
"to",
"append",
"to",
"the",
"select",
"part",
"of",
"an",
"SQL",
"statement",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L446-L465 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.append2SQLWhere | public void append2SQLWhere(final SQLSelect _select)
throws EFapsException
{
for (final ISelectPart part : this.selectParts) {
part.add2Where(this, _select);
}
} | java | public void append2SQLWhere(final SQLSelect _select)
throws EFapsException
{
for (final ISelectPart part : this.selectParts) {
part.add2Where(this, _select);
}
} | [
"public",
"void",
"append2SQLWhere",
"(",
"final",
"SQLSelect",
"_select",
")",
"throws",
"EFapsException",
"{",
"for",
"(",
"final",
"ISelectPart",
"part",
":",
"this",
".",
"selectParts",
")",
"{",
"part",
".",
"add2Where",
"(",
"this",
",",
"_select",
")"... | Method used to append to the where part of an SQL statement.
@param _select SQL select wrapper
@throws EFapsException on error | [
"Method",
"used",
"to",
"append",
"to",
"the",
"where",
"part",
"of",
"an",
"SQL",
"statement",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L473-L479 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.getObject | private Object getObject(final Object _object)
throws EFapsException
{
final Object ret;
// inside a fromobject the correct value must be set
if (this.fromSelect != null && _object instanceof Number) {
final List<Object> tmpList = new ArrayList<>();
final Long... | java | private Object getObject(final Object _object)
throws EFapsException
{
final Object ret;
// inside a fromobject the correct value must be set
if (this.fromSelect != null && _object instanceof Number) {
final List<Object> tmpList = new ArrayList<>();
final Long... | [
"private",
"Object",
"getObject",
"(",
"final",
"Object",
"_object",
")",
"throws",
"EFapsException",
"{",
"final",
"Object",
"ret",
";",
"// inside a fromobject the correct value must be set",
"if",
"(",
"this",
".",
"fromSelect",
"!=",
"null",
"&&",
"_object",
"in... | Get an object from a "n to 1" Relation.Therefore the given object
is used to filter only the valid values from the by the Database
returned objects.
@param _object Object used as filter (must be an <code>Long</code> Id)
@return Object
@throws EFapsException on error | [
"Get",
"an",
"object",
"from",
"a",
"n",
"to",
"1",
"Relation",
".",
"Therefore",
"the",
"given",
"object",
"is",
"used",
"to",
"filter",
"only",
"the",
"valid",
"values",
"from",
"the",
"by",
"the",
"Database",
"returned",
"objects",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L625-L663 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.getObject | public Object getObject()
throws EFapsException
{
Object ret = null;
if (this.valueSelect == null) {
// if the fromSelect has data
if (this.fromSelect.hasResult()) {
// and there are more than one id the current object must not be null
... | java | public Object getObject()
throws EFapsException
{
Object ret = null;
if (this.valueSelect == null) {
// if the fromSelect has data
if (this.fromSelect.hasResult()) {
// and there are more than one id the current object must not be null
... | [
"public",
"Object",
"getObject",
"(",
")",
"throws",
"EFapsException",
"{",
"Object",
"ret",
"=",
"null",
";",
"if",
"(",
"this",
".",
"valueSelect",
"==",
"null",
")",
"{",
"// if the fromSelect has data",
"if",
"(",
"this",
".",
"fromSelect",
".",
"hasResu... | Method to get the Object for this OneSelect.
@return object for this OneSelect
@throws EFapsException on error | [
"Method",
"to",
"get",
"the",
"Object",
"for",
"this",
"OneSelect",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L670-L695 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.getInstances | @SuppressWarnings("unchecked")
public List<Instance> getInstances()
throws EFapsException
{
final List<Instance> ret = new ArrayList<>();
// no value select means, that the from select must be asked
if (this.valueSelect == null) {
ret.addAll(this.fromSelect.getMainOne... | java | @SuppressWarnings("unchecked")
public List<Instance> getInstances()
throws EFapsException
{
final List<Instance> ret = new ArrayList<>();
// no value select means, that the from select must be asked
if (this.valueSelect == null) {
ret.addAll(this.fromSelect.getMainOne... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"List",
"<",
"Instance",
">",
"getInstances",
"(",
")",
"throws",
"EFapsException",
"{",
"final",
"List",
"<",
"Instance",
">",
"ret",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"// no value se... | Method returns the instances this OneSelect has returned.
@return Collection of Instances
@throws EFapsException on error | [
"Method",
"returns",
"the",
"instances",
"this",
"OneSelect",
"has",
"returned",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L703-L736 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/OneSelect.java | OneSelect.sortByInstanceList | public void sortByInstanceList(final List<Instance> _targetList,
final Map<Instance, Integer> _currentList)
{
final List<Long> idListNew = new ArrayList<>();
final List<Object> objectListNew = new ArrayList<>();
for (final Instance instance : _targetList) {... | java | public void sortByInstanceList(final List<Instance> _targetList,
final Map<Instance, Integer> _currentList)
{
final List<Long> idListNew = new ArrayList<>();
final List<Object> objectListNew = new ArrayList<>();
for (final Instance instance : _targetList) {... | [
"public",
"void",
"sortByInstanceList",
"(",
"final",
"List",
"<",
"Instance",
">",
"_targetList",
",",
"final",
"Map",
"<",
"Instance",
",",
"Integer",
">",
"_currentList",
")",
"{",
"final",
"List",
"<",
"Long",
">",
"idListNew",
"=",
"new",
"ArrayList",
... | Method sorts the object and idList.
@param _targetList list of instances
@param _currentList list if instances how it is sorted now | [
"Method",
"sorts",
"the",
"object",
"and",
"idList",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/OneSelect.java#L920-L936 | train |
labai/ted | ted-driver/src/main/java/ted/driver/TedDriver.java | TedDriver.createTask | public Long createTask(String taskName, String data) {
return tedDriverImpl.createTask(taskName, data, null, null, null);
} | java | public Long createTask(String taskName, String data) {
return tedDriverImpl.createTask(taskName, data, null, null, null);
} | [
"public",
"Long",
"createTask",
"(",
"String",
"taskName",
",",
"String",
"data",
")",
"{",
"return",
"tedDriverImpl",
".",
"createTask",
"(",
"taskName",
",",
"data",
",",
"null",
",",
"null",
",",
"null",
")",
";",
"}"
] | create task - simple version | [
"create",
"task",
"-",
"simple",
"version"
] | 2ee197246a78d842c18d6780c48fd903b00608a6 | https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/TedDriver.java#L73-L75 | train |
labai/ted | ted-driver/src/main/java/ted/driver/TedDriver.java | TedDriver.createBatch | public Long createBatch(String batchTaskName, String data, String key1, String key2, List<TedTask> tedTasks) {
return tedDriverImpl.createBatch(batchTaskName, data, key1, key2, tedTasks);
} | java | public Long createBatch(String batchTaskName, String data, String key1, String key2, List<TedTask> tedTasks) {
return tedDriverImpl.createBatch(batchTaskName, data, key1, key2, tedTasks);
} | [
"public",
"Long",
"createBatch",
"(",
"String",
"batchTaskName",
",",
"String",
"data",
",",
"String",
"key1",
",",
"String",
"key2",
",",
"List",
"<",
"TedTask",
">",
"tedTasks",
")",
"{",
"return",
"tedDriverImpl",
".",
"createBatch",
"(",
"batchTaskName",
... | create tasks by list and batch task for them. return batch taskId | [
"create",
"tasks",
"by",
"list",
"and",
"batch",
"task",
"for",
"them",
".",
"return",
"batch",
"taskId"
] | 2ee197246a78d842c18d6780c48fd903b00608a6 | https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/TedDriver.java#L101-L103 | train |
labai/ted | ted-driver/src/main/java/ted/driver/TedDriver.java | TedDriver.createEvent | public Long createEvent(String taskName, String queueId, String data, String key2) {
return tedDriverImpl.createEvent(taskName, queueId, data, key2);
} | java | public Long createEvent(String taskName, String queueId, String data, String key2) {
return tedDriverImpl.createEvent(taskName, queueId, data, key2);
} | [
"public",
"Long",
"createEvent",
"(",
"String",
"taskName",
",",
"String",
"queueId",
",",
"String",
"data",
",",
"String",
"key2",
")",
"{",
"return",
"tedDriverImpl",
".",
"createEvent",
"(",
"taskName",
",",
"queueId",
",",
"data",
",",
"key2",
")",
";"... | create event in queue | [
"create",
"event",
"in",
"queue"
] | 2ee197246a78d842c18d6780c48fd903b00608a6 | https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/TedDriver.java#L108-L110 | train |
labai/ted | ted-driver/src/main/java/ted/driver/TedDriver.java | TedDriver.createEventAndTryExecute | public Long createEventAndTryExecute(String taskName, String queueId, String data, String key2) {
return tedDriverImpl.createEventAndTryExecute(taskName, queueId, data, key2);
} | java | public Long createEventAndTryExecute(String taskName, String queueId, String data, String key2) {
return tedDriverImpl.createEventAndTryExecute(taskName, queueId, data, key2);
} | [
"public",
"Long",
"createEventAndTryExecute",
"(",
"String",
"taskName",
",",
"String",
"queueId",
",",
"String",
"data",
",",
"String",
"key2",
")",
"{",
"return",
"tedDriverImpl",
".",
"createEventAndTryExecute",
"(",
"taskName",
",",
"queueId",
",",
"data",
"... | create event in queue. If possible, try to execute | [
"create",
"event",
"in",
"queue",
".",
"If",
"possible",
"try",
"to",
"execute"
] | 2ee197246a78d842c18d6780c48fd903b00608a6 | https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/TedDriver.java#L115-L117 | train |
labai/ted | ted-driver/src/main/java/ted/driver/TedDriver.java | TedDriver.sendNotification | public Long sendNotification(String taskName, String data) {
return tedDriverImpl.sendNotification(taskName, data);
} | java | public Long sendNotification(String taskName, String data) {
return tedDriverImpl.sendNotification(taskName, data);
} | [
"public",
"Long",
"sendNotification",
"(",
"String",
"taskName",
",",
"String",
"data",
")",
"{",
"return",
"tedDriverImpl",
".",
"sendNotification",
"(",
"taskName",
",",
"data",
")",
";",
"}"
] | send notification to instances | [
"send",
"notification",
"to",
"instances"
] | 2ee197246a78d842c18d6780c48fd903b00608a6 | https://github.com/labai/ted/blob/2ee197246a78d842c18d6780c48fd903b00608a6/ted-driver/src/main/java/ted/driver/TedDriver.java#L122-L124 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Arc.java | Arc.set | public void set(double x, double y, double r, double radStart, double radEnd) {
this.x = x;
this.y = y;
this.w = r * 2;
this.h = r * 2;
this.radStart = radStart;
this.radEnd = radEnd;
} | java | public void set(double x, double y, double r, double radStart, double radEnd) {
this.x = x;
this.y = y;
this.w = r * 2;
this.h = r * 2;
this.radStart = radStart;
this.radEnd = radEnd;
} | [
"public",
"void",
"set",
"(",
"double",
"x",
",",
"double",
"y",
",",
"double",
"r",
",",
"double",
"radStart",
",",
"double",
"radEnd",
")",
"{",
"this",
".",
"x",
"=",
"x",
";",
"this",
".",
"y",
"=",
"y",
";",
"this",
".",
"w",
"=",
"r",
"... | Sets a Arc object using x and y-coordinate of the Arc, width, height, start and end points of
degree properties.
@param x The x-coordinate of the Arc.
@param y The y-coordinate of the Arc.
@param r The radius of the Arc.
@param radStart The start degree of the Arc.
@param radEnd The end degree of the Arc. | [
"Sets",
"a",
"Arc",
"object",
"using",
"x",
"and",
"y",
"-",
"coordinate",
"of",
"the",
"Arc",
"width",
"height",
"start",
"and",
"end",
"points",
"of",
"degree",
"properties",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Arc.java#L223-L230 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Arc.java | Arc.setCenterColor | public void setCenterColor(ColorSet colorSet) {
if (this.centerColor == null) {
this.centerColor = new RGBColor(0.0, 0.0, 0.0);
}
setGradation(true);
this.centerColor = RGBColor.color(colorSet);
} | java | public void setCenterColor(ColorSet colorSet) {
if (this.centerColor == null) {
this.centerColor = new RGBColor(0.0, 0.0, 0.0);
}
setGradation(true);
this.centerColor = RGBColor.color(colorSet);
} | [
"public",
"void",
"setCenterColor",
"(",
"ColorSet",
"colorSet",
")",
"{",
"if",
"(",
"this",
".",
"centerColor",
"==",
"null",
")",
"{",
"this",
".",
"centerColor",
"=",
"new",
"RGBColor",
"(",
"0.0",
",",
"0.0",
",",
"0.0",
")",
";",
"}",
"setGradati... | Sets the colorSet of the center of this Arc.
@param colorSet The colorSet of the center of the Arc. | [
"Sets",
"the",
"colorSet",
"of",
"the",
"center",
"of",
"this",
"Arc",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Arc.java#L423-L429 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Arc.java | Arc.setEdgeColor | public void setEdgeColor(Color color) {
if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
setGradation(true);
this.edgeColor = color;
} | java | public void setEdgeColor(Color color) {
if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
setGradation(true);
this.edgeColor = color;
} | [
"public",
"void",
"setEdgeColor",
"(",
"Color",
"color",
")",
"{",
"if",
"(",
"edgeColor",
"==",
"null",
")",
"edgeColor",
"=",
"new",
"RGBColor",
"(",
"0.0",
",",
"0.0",
",",
"0.0",
")",
";",
"setGradation",
"(",
"true",
")",
";",
"this",
".",
"edge... | Sets the color of the edge of this Arc.
@param color The color of the edge of the Arc. | [
"Sets",
"the",
"color",
"of",
"the",
"edge",
"of",
"this",
"Arc",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Arc.java#L436-L440 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Arc.java | Arc.setEdgeColor | public void setEdgeColor(ColorSet colorSet) {
if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
setGradation(true);
this.edgeColor = RGBColor.color(colorSet);
} | java | public void setEdgeColor(ColorSet colorSet) {
if (edgeColor == null) edgeColor = new RGBColor(0.0, 0.0, 0.0);
setGradation(true);
this.edgeColor = RGBColor.color(colorSet);
} | [
"public",
"void",
"setEdgeColor",
"(",
"ColorSet",
"colorSet",
")",
"{",
"if",
"(",
"edgeColor",
"==",
"null",
")",
"edgeColor",
"=",
"new",
"RGBColor",
"(",
"0.0",
",",
"0.0",
",",
"0.0",
")",
";",
"setGradation",
"(",
"true",
")",
";",
"this",
".",
... | Sets the colorSet of the edge of this Arc.
@param colorSet The colorSet of the edge of the Arc. | [
"Sets",
"the",
"colorSet",
"of",
"the",
"edge",
"of",
"this",
"Arc",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Arc.java#L447-L451 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/index/Searcher.java | Searcher.addSubDimension | private void addSubDimension(final Facets _facets,
final DimValue _dimValue,
final String _dim,
final String _path)
throws IOException
{
final FacetResult result = _facets.getTopChildren(1000, _dim, _p... | java | private void addSubDimension(final Facets _facets,
final DimValue _dimValue,
final String _dim,
final String _path)
throws IOException
{
final FacetResult result = _facets.getTopChildren(1000, _dim, _p... | [
"private",
"void",
"addSubDimension",
"(",
"final",
"Facets",
"_facets",
",",
"final",
"DimValue",
"_dimValue",
",",
"final",
"String",
"_dim",
",",
"final",
"String",
"_path",
")",
"throws",
"IOException",
"{",
"final",
"FacetResult",
"result",
"=",
"_facets",
... | Recursive method to get the sub dimension.
@param _facets the facets
@param _dimValue the _dim value
@param _dim the _dim
@param _path the _path
@throws IOException Signals that an I/O exception has occurred. | [
"Recursive",
"method",
"to",
"get",
"the",
"sub",
"dimension",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/index/Searcher.java#L195-L212 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/index/Searcher.java | Searcher.checkAccess | private void checkAccess()
throws EFapsException
{
// check the access for the given instances
final Map<Instance, Boolean> accessmap = new HashMap<Instance, Boolean>();
for (final Entry<Type, List<Instance>> entry : this.typeMapping.entrySet()) {
accessmap.putAll(entry.g... | java | private void checkAccess()
throws EFapsException
{
// check the access for the given instances
final Map<Instance, Boolean> accessmap = new HashMap<Instance, Boolean>();
for (final Entry<Type, List<Instance>> entry : this.typeMapping.entrySet()) {
accessmap.putAll(entry.g... | [
"private",
"void",
"checkAccess",
"(",
")",
"throws",
"EFapsException",
"{",
"// check the access for the given instances",
"final",
"Map",
"<",
"Instance",
",",
"Boolean",
">",
"accessmap",
"=",
"new",
"HashMap",
"<",
"Instance",
",",
"Boolean",
">",
"(",
")",
... | Check access.
@throws EFapsException on error | [
"Check",
"access",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/index/Searcher.java#L219-L229 | train |
ArpNetworking/metrics-jvm-extra | src/main/java/com/arpnetworking/metrics/jvm/collectors/PoolMemoryMetricsCollector.java | PoolMemoryMetricsCollector.recordMetricsForPool | protected void recordMetricsForPool(final MemoryPoolMXBean pool, final Metrics metrics) {
final MemoryUsage usage = pool.getUsage();
metrics.setGauge(
String.join(
"/",
ROOT_NAMESPACE,
memoryTypeSegment(pool.getType(... | java | protected void recordMetricsForPool(final MemoryPoolMXBean pool, final Metrics metrics) {
final MemoryUsage usage = pool.getUsage();
metrics.setGauge(
String.join(
"/",
ROOT_NAMESPACE,
memoryTypeSegment(pool.getType(... | [
"protected",
"void",
"recordMetricsForPool",
"(",
"final",
"MemoryPoolMXBean",
"pool",
",",
"final",
"Metrics",
"metrics",
")",
"{",
"final",
"MemoryUsage",
"usage",
"=",
"pool",
".",
"getUsage",
"(",
")",
";",
"metrics",
".",
"setGauge",
"(",
"String",
".",
... | Records the metrics for a given pool. Useful if a deriving class filters the list of pools to collect.
@param pool {@link MemoryPoolMXBean} to record
@param metrics {@link Metrics} to record into | [
"Records",
"the",
"metrics",
"for",
"a",
"given",
"pool",
".",
"Useful",
"if",
"a",
"deriving",
"class",
"filters",
"the",
"list",
"of",
"pools",
"to",
"collect",
"."
] | 2a931240afc611b73b6bcb647fb042f42f158047 | https://github.com/ArpNetworking/metrics-jvm-extra/blob/2a931240afc611b73b6bcb647fb042f42f158047/src/main/java/com/arpnetworking/metrics/jvm/collectors/PoolMemoryMetricsCollector.java#L60-L85 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Curve.java | Curve.setNode | public void setNode(int number, double x, double y) {
if (number <= 0) number = 0;
if (number >= 3) number = 3;
this.points[number * 3] = (float)x;
this.points[number * 3 + 1] = (float)y;
this.points[number * 3 + 2] = 0;
set();
} | java | public void setNode(int number, double x, double y) {
if (number <= 0) number = 0;
if (number >= 3) number = 3;
this.points[number * 3] = (float)x;
this.points[number * 3 + 1] = (float)y;
this.points[number * 3 + 2] = 0;
set();
} | [
"public",
"void",
"setNode",
"(",
"int",
"number",
",",
"double",
"x",
",",
"double",
"y",
")",
"{",
"if",
"(",
"number",
"<=",
"0",
")",
"number",
"=",
"0",
";",
"if",
"(",
"number",
">=",
"3",
")",
"number",
"=",
"3",
";",
"this",
".",
"point... | Sets x,y,z-coordinate of nodes of this Curve.
@param number The number of a node. The node whose number is 0 or 3 is a anchor point, and
the node whose number is 1 or 2 is a control point.
@param x The x-coordinate of this node.
@param y The y-coordinate of this node. | [
"Sets",
"x",
"y",
"z",
"-",
"coordinate",
"of",
"nodes",
"of",
"this",
"Curve",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Curve.java#L348-L355 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Curve.java | Curve.setNode | public void setNode(int number, Vector3D v) {
if (number <= 0) {
number = 0;
} else if (3 <= number) {
number = 3;
}
this.points[number * 3] = (float)v.getX();
this.points[number * 3 + 1] = (float)v.getY();
this.points[number * 3 + 2] = (float)v.ge... | java | public void setNode(int number, Vector3D v) {
if (number <= 0) {
number = 0;
} else if (3 <= number) {
number = 3;
}
this.points[number * 3] = (float)v.getX();
this.points[number * 3 + 1] = (float)v.getY();
this.points[number * 3 + 2] = (float)v.ge... | [
"public",
"void",
"setNode",
"(",
"int",
"number",
",",
"Vector3D",
"v",
")",
"{",
"if",
"(",
"number",
"<=",
"0",
")",
"{",
"number",
"=",
"0",
";",
"}",
"else",
"if",
"(",
"3",
"<=",
"number",
")",
"{",
"number",
"=",
"3",
";",
"}",
"this",
... | Sets coordinate of nodes of this Curve.
@param number The number of a node. The node whose number is 0 or 3 is a anchor point, and
the node whose number is 1 or 2 is a control point.
@param v The coordinates of this node. | [
"Sets",
"coordinate",
"of",
"nodes",
"of",
"this",
"Curve",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Curve.java#L384-L394 | train |
casmi/casmi | src/main/java/casmi/graphics/element/Curve.java | Curve.curvePoint | public double curvePoint(XYZ vec, float t) {
double tmp = 0;
switch (vec) {
case X:
tmp = catmullRom(points[0], points[3], points[6], points[9], t);
break;
case Y:
tmp = catmullRom(points[1], points[4], points[7], points[10], t);
break;
... | java | public double curvePoint(XYZ vec, float t) {
double tmp = 0;
switch (vec) {
case X:
tmp = catmullRom(points[0], points[3], points[6], points[9], t);
break;
case Y:
tmp = catmullRom(points[1], points[4], points[7], points[10], t);
break;
... | [
"public",
"double",
"curvePoint",
"(",
"XYZ",
"vec",
",",
"float",
"t",
")",
"{",
"double",
"tmp",
"=",
"0",
";",
"switch",
"(",
"vec",
")",
"{",
"case",
"X",
":",
"tmp",
"=",
"catmullRom",
"(",
"points",
"[",
"0",
"]",
",",
"points",
"[",
"3",
... | Evaluates the curve at point t.
@param vec The coordinate to get the location of a curve at t.
@param t value between 0 and 1 | [
"Evaluates",
"the",
"curve",
"at",
"point",
"t",
"."
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Curve.java#L466-L479 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.getAttribute | @SuppressWarnings("unchecked")
public <T> T getAttribute(final Attribute _attribute)
throws EFapsException
{
return (T) getAttribute(_attribute.getName());
} | java | @SuppressWarnings("unchecked")
public <T> T getAttribute(final Attribute _attribute)
throws EFapsException
{
return (T) getAttribute(_attribute.getName());
} | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"getAttribute",
"(",
"final",
"Attribute",
"_attribute",
")",
"throws",
"EFapsException",
"{",
"return",
"(",
"T",
")",
"getAttribute",
"(",
"_attribute",
".",
"getName",
"(",
... | Get the object returned by the given Attribute.
@param <T> class the return value will be casted to
@param _attribute the object is wanted for
@return object for the select statement
@throws EFapsException on error | [
"Get",
"the",
"object",
"returned",
"by",
"the",
"given",
"Attribute",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L234-L239 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.addAttributeSet | public AbstractPrintQuery addAttributeSet(final String _setName)
throws EFapsException
{
final Type type = getMainType();
if (type != null) {
final AttributeSet set = AttributeSet.find(type.getName(), _setName);
addAttributeSet(set);
}
return this;
... | java | public AbstractPrintQuery addAttributeSet(final String _setName)
throws EFapsException
{
final Type type = getMainType();
if (type != null) {
final AttributeSet set = AttributeSet.find(type.getName(), _setName);
addAttributeSet(set);
}
return this;
... | [
"public",
"AbstractPrintQuery",
"addAttributeSet",
"(",
"final",
"String",
"_setName",
")",
"throws",
"EFapsException",
"{",
"final",
"Type",
"type",
"=",
"getMainType",
"(",
")",
";",
"if",
"(",
"type",
"!=",
"null",
")",
"{",
"final",
"AttributeSet",
"set",
... | Add an AttributeSet to the PrintQuery. It is used to get editable values
from the eFaps DataBase.
@param _setName Name of the AttributeSet to add
@return this PrintQuery
@throws EFapsException on error | [
"Add",
"an",
"AttributeSet",
"to",
"the",
"PrintQuery",
".",
"It",
"is",
"used",
"to",
"get",
"editable",
"values",
"from",
"the",
"eFaps",
"DataBase",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L285-L294 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.addAttributeSet | public AbstractPrintQuery addAttributeSet(final AttributeSet _set)
throws EFapsException
{
final String key = "linkfrom[" + _set.getName() + "#" + _set.getAttributeName() + "]";
final OneSelect oneselect = new OneSelect(this, key);
this.allSelects.add(oneselect);
this.attr2On... | java | public AbstractPrintQuery addAttributeSet(final AttributeSet _set)
throws EFapsException
{
final String key = "linkfrom[" + _set.getName() + "#" + _set.getAttributeName() + "]";
final OneSelect oneselect = new OneSelect(this, key);
this.allSelects.add(oneselect);
this.attr2On... | [
"public",
"AbstractPrintQuery",
"addAttributeSet",
"(",
"final",
"AttributeSet",
"_set",
")",
"throws",
"EFapsException",
"{",
"final",
"String",
"key",
"=",
"\"linkfrom[\"",
"+",
"_set",
".",
"getName",
"(",
")",
"+",
"\"#\"",
"+",
"_set",
".",
"getAttributeNam... | Add an AttributeSet to the PrintQuery. It is used to get editable values
from the eFaps DataBase. The AttributeSet is internally transformed into
an linkfrom query.
@param _set AttributeSet to add
@return this PrintQuery
@throws EFapsException on error | [
"Add",
"an",
"AttributeSet",
"to",
"the",
"PrintQuery",
".",
"It",
"is",
"used",
"to",
"get",
"editable",
"values",
"from",
"the",
"eFaps",
"DataBase",
".",
"The",
"AttributeSet",
"is",
"internally",
"transformed",
"into",
"an",
"linkfrom",
"query",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L305-L320 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.getAttributeSet | @SuppressWarnings("unchecked")
public <T> T getAttributeSet(final String _setName)
throws EFapsException
{
final OneSelect oneselect = this.attr2OneSelect.get(_setName);
Map<String, Object> ret = null;
if (oneselect == null || oneselect.getFromSelect() == null) {
Abst... | java | @SuppressWarnings("unchecked")
public <T> T getAttributeSet(final String _setName)
throws EFapsException
{
final OneSelect oneselect = this.attr2OneSelect.get(_setName);
Map<String, Object> ret = null;
if (oneselect == null || oneselect.getFromSelect() == null) {
Abst... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"getAttributeSet",
"(",
"final",
"String",
"_setName",
")",
"throws",
"EFapsException",
"{",
"final",
"OneSelect",
"oneselect",
"=",
"this",
".",
"attr2OneSelect",
".",
"get",
"(... | Get the object returned by the given name of an AttributeSet.
@param <T> class the return value will be casted to
@param _setName name of the AttributeSet the object is wanted for
@return object for the select statement
@throws EFapsException on error | [
"Get",
"the",
"object",
"returned",
"by",
"the",
"given",
"name",
"of",
"an",
"AttributeSet",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L330-L359 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.getAttribute4Select | public Attribute getAttribute4Select(final String _selectStmt)
{
final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);
return oneselect == null ? null : oneselect.getAttribute();
} | java | public Attribute getAttribute4Select(final String _selectStmt)
{
final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);
return oneselect == null ? null : oneselect.getAttribute();
} | [
"public",
"Attribute",
"getAttribute4Select",
"(",
"final",
"String",
"_selectStmt",
")",
"{",
"final",
"OneSelect",
"oneselect",
"=",
"this",
".",
"selectStmt2OneSelect",
".",
"get",
"(",
"_selectStmt",
")",
";",
"return",
"oneselect",
"==",
"null",
"?",
"null"... | Method to get the Attribute used for an select.
@param _selectStmt selectstatement the attribute is wanted for
@return Attribute for the selectstatement | [
"Method",
"to",
"get",
"the",
"Attribute",
"used",
"for",
"an",
"select",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L754-L758 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.getInstances4Select | public List<Instance> getInstances4Select(final String _selectStmt)
throws EFapsException
{
final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);
return oneselect == null ? new ArrayList<>() : oneselect.getInstances();
} | java | public List<Instance> getInstances4Select(final String _selectStmt)
throws EFapsException
{
final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);
return oneselect == null ? new ArrayList<>() : oneselect.getInstances();
} | [
"public",
"List",
"<",
"Instance",
">",
"getInstances4Select",
"(",
"final",
"String",
"_selectStmt",
")",
"throws",
"EFapsException",
"{",
"final",
"OneSelect",
"oneselect",
"=",
"this",
".",
"selectStmt2OneSelect",
".",
"get",
"(",
"_selectStmt",
")",
";",
"re... | Method to get the instances used for an select.
@param _selectStmt selectstatement the attribute is wanted for
@return List of instances for the select or an empty list in case that
the onselect is not found
@throws EFapsException on error | [
"Method",
"to",
"get",
"the",
"instances",
"used",
"for",
"an",
"select",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L768-L773 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.isList4Select | public boolean isList4Select(final String _selectStmt)
throws EFapsException
{
final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);
return oneselect == null ? false : oneselect.isMultiple();
} | java | public boolean isList4Select(final String _selectStmt)
throws EFapsException
{
final OneSelect oneselect = this.selectStmt2OneSelect.get(_selectStmt);
return oneselect == null ? false : oneselect.isMultiple();
} | [
"public",
"boolean",
"isList4Select",
"(",
"final",
"String",
"_selectStmt",
")",
"throws",
"EFapsException",
"{",
"final",
"OneSelect",
"oneselect",
"=",
"this",
".",
"selectStmt2OneSelect",
".",
"get",
"(",
"_selectStmt",
")",
";",
"return",
"oneselect",
"==",
... | Method to determine it the select statement returns more than one value.
@param _selectStmt selectstatement the attribute is wanted for
@return true it the oneselect is muliple, else false
@throws EFapsException on error | [
"Method",
"to",
"determine",
"it",
"the",
"select",
"statement",
"returns",
"more",
"than",
"one",
"value",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L782-L787 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/AbstractPrintQuery.java | AbstractPrintQuery.getNewTableIndex | public Integer getNewTableIndex(final String _tableName,
final String _column,
final Integer _relIndex,
final Long _clazzId)
{
this.tableIndex++;
this.sqlTable2Index.put(_relIndex + "__" + _ta... | java | public Integer getNewTableIndex(final String _tableName,
final String _column,
final Integer _relIndex,
final Long _clazzId)
{
this.tableIndex++;
this.sqlTable2Index.put(_relIndex + "__" + _ta... | [
"public",
"Integer",
"getNewTableIndex",
"(",
"final",
"String",
"_tableName",
",",
"final",
"String",
"_column",
",",
"final",
"Integer",
"_relIndex",
",",
"final",
"Long",
"_clazzId",
")",
"{",
"this",
".",
"tableIndex",
"++",
";",
"this",
".",
"sqlTable2Ind... | Get a new table index and add the table to the map of existing table
indexes.
@param _tableName tablename the index is wanted for
@param _column name of the column, used for the relation
@param _relIndex relation the table is used in
@param _clazzId optional id of the classification
@return new index for the table | [
"Get",
"a",
"new",
"table",
"index",
"and",
"add",
"the",
"table",
"to",
"the",
"map",
"of",
"existing",
"table",
"indexes",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/AbstractPrintQuery.java#L1027-L1036 | train |
rometools/rome-propono | src/main/java/com/rometools/propono/atom/common/rome/AppModuleGenerator.java | AppModuleGenerator.generate | @Override
public void generate(final Module module, final Element parent) {
final AppModule m = (AppModule) module;
if (m.getDraft() != null) {
final String draft = m.getDraft().booleanValue() ? "yes" : "no";
final Element control = new Element("control", APP_NS);
... | java | @Override
public void generate(final Module module, final Element parent) {
final AppModule m = (AppModule) module;
if (m.getDraft() != null) {
final String draft = m.getDraft().booleanValue() ? "yes" : "no";
final Element control = new Element("control", APP_NS);
... | [
"@",
"Override",
"public",
"void",
"generate",
"(",
"final",
"Module",
"module",
",",
"final",
"Element",
"parent",
")",
"{",
"final",
"AppModule",
"m",
"=",
"(",
"AppModule",
")",
"module",
";",
"if",
"(",
"m",
".",
"getDraft",
"(",
")",
"!=",
"null",... | Generate JDOM element for module and add it to parent element | [
"Generate",
"JDOM",
"element",
"for",
"module",
"and",
"add",
"it",
"to",
"parent",
"element"
] | 721de8d5a47998f92969d1ee3db80bdaa3f26fb2 | https://github.com/rometools/rome-propono/blob/721de8d5a47998f92969d1ee3db80bdaa3f26fb2/src/main/java/com/rometools/propono/atom/common/rome/AppModuleGenerator.java#L62-L80 | train |
casmi/casmi | src/main/java/casmi/Applet.java | Applet.setCursor | public void setCursor(CursorMode cursorMode) {
Cursor c = CursorMode.getAWTCursor(cursorMode);
if (c.getType() == panel.getCursor().getType()) return;
panel.setCursor(c);
} | java | public void setCursor(CursorMode cursorMode) {
Cursor c = CursorMode.getAWTCursor(cursorMode);
if (c.getType() == panel.getCursor().getType()) return;
panel.setCursor(c);
} | [
"public",
"void",
"setCursor",
"(",
"CursorMode",
"cursorMode",
")",
"{",
"Cursor",
"c",
"=",
"CursorMode",
".",
"getAWTCursor",
"(",
"cursorMode",
")",
";",
"if",
"(",
"c",
".",
"getType",
"(",
")",
"==",
"panel",
".",
"getCursor",
"(",
")",
".",
"get... | Change mouse cursor image
@param cursorMode
A cursor type | [
"Change",
"mouse",
"cursor",
"image"
] | 90f6514a9cbce0685186e7a92beb69e22a3b11c4 | https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/Applet.java#L239-L244 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/access/user/Key.java | Key.get4Instance | public static Key get4Instance(final Instance _instance)
throws EFapsException
{
Key.LOG.debug("Retrieving Key for {}", _instance);
final Key ret = new Key();
ret.setPersonId(Context.getThreadContext().getPersonId());
final Type type = _instance.getType();
ret.setTyp... | java | public static Key get4Instance(final Instance _instance)
throws EFapsException
{
Key.LOG.debug("Retrieving Key for {}", _instance);
final Key ret = new Key();
ret.setPersonId(Context.getThreadContext().getPersonId());
final Type type = _instance.getType();
ret.setTyp... | [
"public",
"static",
"Key",
"get4Instance",
"(",
"final",
"Instance",
"_instance",
")",
"throws",
"EFapsException",
"{",
"Key",
".",
"LOG",
".",
"debug",
"(",
"\"Retrieving Key for {}\"",
",",
"_instance",
")",
";",
"final",
"Key",
"ret",
"=",
"new",
"Key",
"... | Gets the for instance.
@param _instance the instance
@return the for instance
@throws EFapsException on error | [
"Gets",
"the",
"for",
"instance",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/access/user/Key.java#L162-L176 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/client/RestRequest.java | RestRequest.execute | public T execute() throws ApiException, IOException {
return client.executeRequest(this.builder, expectedCode, responseClass, needAuth);
} | java | public T execute() throws ApiException, IOException {
return client.executeRequest(this.builder, expectedCode, responseClass, needAuth);
} | [
"public",
"T",
"execute",
"(",
")",
"throws",
"ApiException",
",",
"IOException",
"{",
"return",
"client",
".",
"executeRequest",
"(",
"this",
".",
"builder",
",",
"expectedCode",
",",
"responseClass",
",",
"needAuth",
")",
";",
"}"
] | Execute the REST request synchronously on the calling thread, returning the result when the
operation completes.
@return The response result of the REST request. | [
"Execute",
"the",
"REST",
"request",
"synchronously",
"on",
"the",
"calling",
"thread",
"returning",
"the",
"result",
"when",
"the",
"operation",
"completes",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/client/RestRequest.java#L89-L91 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/client/RestRequest.java | RestRequest.executeAsync | public Future<T> executeAsync(final RestCallback<T> handler) {
return client.submit(new Callable<T>() {
@Override
public T call() throws Exception {
try {
final T result = execute();
handler.completed(result, RestRequest.this);
... | java | public Future<T> executeAsync(final RestCallback<T> handler) {
return client.submit(new Callable<T>() {
@Override
public T call() throws Exception {
try {
final T result = execute();
handler.completed(result, RestRequest.this);
... | [
"public",
"Future",
"<",
"T",
">",
"executeAsync",
"(",
"final",
"RestCallback",
"<",
"T",
">",
"handler",
")",
"{",
"return",
"client",
".",
"submit",
"(",
"new",
"Callable",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"T",
"call",
"(",... | Execute the REST request asynchronously and call the given handler when the operation
completes. The handler runs on the REST client's executor service.
@param handler the handler to run once the request completes, or failure occurs.
@return A future result of the asynchronous operation. | [
"Execute",
"the",
"REST",
"request",
"asynchronously",
"and",
"call",
"the",
"given",
"handler",
"when",
"the",
"operation",
"completes",
".",
"The",
"handler",
"runs",
"on",
"the",
"REST",
"client",
"s",
"executor",
"service",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/client/RestRequest.java#L138-L154 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/client/RestRequest.java | RestRequest.executeAsync | public Future<T> executeAsync() {
return client.submit(new Callable<T>() {
@Override
public T call() throws Exception {
return execute();
}
});
} | java | public Future<T> executeAsync() {
return client.submit(new Callable<T>() {
@Override
public T call() throws Exception {
return execute();
}
});
} | [
"public",
"Future",
"<",
"T",
">",
"executeAsync",
"(",
")",
"{",
"return",
"client",
".",
"submit",
"(",
"new",
"Callable",
"<",
"T",
">",
"(",
")",
"{",
"@",
"Override",
"public",
"T",
"call",
"(",
")",
"throws",
"Exception",
"{",
"return",
"execut... | Execute the REST request asynchronously.
@return A future result of the asynchronous operation. | [
"Execute",
"the",
"REST",
"request",
"asynchronously",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/client/RestRequest.java#L161-L170 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/ui/Image.java | Image.getTypeIcon | public static Image getTypeIcon(final Type _type)
throws EFapsException
{
Image ret = null;
if (_type != null) {
ret = _type.getTypeIcon();
}
return ret;
} | java | public static Image getTypeIcon(final Type _type)
throws EFapsException
{
Image ret = null;
if (_type != null) {
ret = _type.getTypeIcon();
}
return ret;
} | [
"public",
"static",
"Image",
"getTypeIcon",
"(",
"final",
"Type",
"_type",
")",
"throws",
"EFapsException",
"{",
"Image",
"ret",
"=",
"null",
";",
"if",
"(",
"_type",
"!=",
"null",
")",
"{",
"ret",
"=",
"_type",
".",
"getTypeIcon",
"(",
")",
";",
"}",
... | Returns for given type the type tree menu. If no type tree menu is
defined for the type, it is searched if for parent type a menu is
defined.
@param _type type for which the type tree menu is searched
@return Image for type tree menu for given type if found; otherwise
<code>null</code>.
@throws EFapsException on error | [
"Returns",
"for",
"given",
"type",
"the",
"type",
"tree",
"menu",
".",
"If",
"no",
"type",
"tree",
"menu",
"is",
"defined",
"for",
"the",
"type",
"it",
"is",
"searched",
"if",
"for",
"parent",
"type",
"a",
"menu",
"is",
"defined",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/ui/Image.java#L114-L122 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Update.java | Update.addAlwaysUpdateAttributes | protected void addAlwaysUpdateAttributes()
throws EFapsException
{
final Iterator<?> iter = getInstance().getType().getAttributes().entrySet().iterator();
while (iter.hasNext()) {
final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) iter.next();
final Attribute attr = (Att... | java | protected void addAlwaysUpdateAttributes()
throws EFapsException
{
final Iterator<?> iter = getInstance().getType().getAttributes().entrySet().iterator();
while (iter.hasNext()) {
final Map.Entry<?, ?> entry = (Map.Entry<?, ?>) iter.next();
final Attribute attr = (Att... | [
"protected",
"void",
"addAlwaysUpdateAttributes",
"(",
")",
"throws",
"EFapsException",
"{",
"final",
"Iterator",
"<",
"?",
">",
"iter",
"=",
"getInstance",
"(",
")",
".",
"getType",
"(",
")",
".",
"getAttributes",
"(",
")",
".",
"entrySet",
"(",
")",
".",... | Add all attributes of the type which must be always updated.
@throws EFapsException on error | [
"Add",
"all",
"attributes",
"of",
"the",
"type",
"which",
"must",
"be",
"always",
"updated",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Update.java#L154-L166 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Update.java | Update.executeWithoutTrigger | public void executeWithoutTrigger()
throws EFapsException
{
if (Update.STATUSOK.getStati().isEmpty()) {
final Context context = Context.getThreadContext();
ConnectionResource con = null;
try {
con = context.getConnectionResource();
... | java | public void executeWithoutTrigger()
throws EFapsException
{
if (Update.STATUSOK.getStati().isEmpty()) {
final Context context = Context.getThreadContext();
ConnectionResource con = null;
try {
con = context.getConnectionResource();
... | [
"public",
"void",
"executeWithoutTrigger",
"(",
")",
"throws",
"EFapsException",
"{",
"if",
"(",
"Update",
".",
"STATUSOK",
".",
"getStati",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"final",
"Context",
"context",
"=",
"Context",
".",
"getThreadContext",... | The update is done without calling triggers and check of access rights.
@throws EFapsException if update not possible (unique key, object does
not exists, etc...) | [
"The",
"update",
"is",
"done",
"without",
"calling",
"triggers",
"and",
"check",
"of",
"access",
"rights",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Update.java#L416-L469 | train |
ldriscoll/ektorplucene | src/main/java/com/github/ldriscoll/ektorplucene/util/IndexUploader.java | IndexUploader.updateSearchFunctionIfNecessary | public boolean updateSearchFunctionIfNecessary(CouchDbConnector db, String viewName, String searchFunction,
String javascriptIndexFunctionBody) {
boolean updatePerformed = false;
String designDocName = viewName.startsWith(DesignDocument.ID_PREFIX)
... | java | public boolean updateSearchFunctionIfNecessary(CouchDbConnector db, String viewName, String searchFunction,
String javascriptIndexFunctionBody) {
boolean updatePerformed = false;
String designDocName = viewName.startsWith(DesignDocument.ID_PREFIX)
... | [
"public",
"boolean",
"updateSearchFunctionIfNecessary",
"(",
"CouchDbConnector",
"db",
",",
"String",
"viewName",
",",
"String",
"searchFunction",
",",
"String",
"javascriptIndexFunctionBody",
")",
"{",
"boolean",
"updatePerformed",
"=",
"false",
";",
"String",
"designD... | Ensures taht the given body of the index function matches that in the database, otherwise update it.
@param db Connection to couchdb
@param viewName Name of the view that we're updating
@param searchFunction Name of the search function, within that view
@param j... | [
"Ensures",
"taht",
"the",
"given",
"body",
"of",
"the",
"index",
"function",
"matches",
"that",
"in",
"the",
"database",
"otherwise",
"update",
"it",
"."
] | b81e78cad27e1c9e0a6c9a7cf2698310112de24e | https://github.com/ldriscoll/ektorplucene/blob/b81e78cad27e1c9e0a6c9a7cf2698310112de24e/src/main/java/com/github/ldriscoll/ektorplucene/util/IndexUploader.java#L34-L65 | train |
ldriscoll/ektorplucene | src/main/java/com/github/ldriscoll/ektorplucene/util/IndexUploader.java | IndexUploader.updateSearchFunction | private void updateSearchFunction(CouchDbConnector db, DesignDocument doc, String searchFunctionName,
String javascript, long jsChecksum) {
// get the 'fulltext' object from the design document, this is what couchdb-lucene uses to index couch
Map<String, Map<String... | java | private void updateSearchFunction(CouchDbConnector db, DesignDocument doc, String searchFunctionName,
String javascript, long jsChecksum) {
// get the 'fulltext' object from the design document, this is what couchdb-lucene uses to index couch
Map<String, Map<String... | [
"private",
"void",
"updateSearchFunction",
"(",
"CouchDbConnector",
"db",
",",
"DesignDocument",
"doc",
",",
"String",
"searchFunctionName",
",",
"String",
"javascript",
",",
"long",
"jsChecksum",
")",
"{",
"// get the 'fulltext' object from the design document, this is what ... | Creates the design document that we use when searching. This contains the index function that is used by lucene
in the future we will probably want to support customer specific instances, as well as adding a checksum
to the object, so that we can test if an index needs to be upgraded
@param db Couch c... | [
"Creates",
"the",
"design",
"document",
"that",
"we",
"use",
"when",
"searching",
".",
"This",
"contains",
"the",
"index",
"function",
"that",
"is",
"used",
"by",
"lucene",
"in",
"the",
"future",
"we",
"will",
"probably",
"want",
"to",
"support",
"customer",... | b81e78cad27e1c9e0a6c9a7cf2698310112de24e | https://github.com/ldriscoll/ektorplucene/blob/b81e78cad27e1c9e0a6c9a7cf2698310112de24e/src/main/java/com/github/ldriscoll/ektorplucene/util/IndexUploader.java#L89-L113 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/DataConnection.java | DataConnection.connect | public void connect() throws Exception {
logger.debug("[connect] initializing new connection");
synchronized (webSocketHandler.getNotifyConnectionObject()) {
webSocketConnectionManager.start();
try {
webSocketHandler.getNotifyConnectionObject().wait(TimeUnit.SEC... | java | public void connect() throws Exception {
logger.debug("[connect] initializing new connection");
synchronized (webSocketHandler.getNotifyConnectionObject()) {
webSocketConnectionManager.start();
try {
webSocketHandler.getNotifyConnectionObject().wait(TimeUnit.SEC... | [
"public",
"void",
"connect",
"(",
")",
"throws",
"Exception",
"{",
"logger",
".",
"debug",
"(",
"\"[connect] initializing new connection\"",
")",
";",
"synchronized",
"(",
"webSocketHandler",
".",
"getNotifyConnectionObject",
"(",
")",
")",
"{",
"webSocketConnectionMa... | Initiate connection to Neo4j server.
@throws Exception connection could not be established | [
"Initiate",
"connection",
"to",
"Neo4j",
"server",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/DataConnection.java#L59-L76 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/DataConnection.java | DataConnection.isUsable | public boolean isUsable() {
return isConnected() && TimeUnit.MILLISECONDS.toMinutes(new Date().getTime() - lastUsage.getTime()) <= MAXIMUM_AGE_IN_MINUTES;
} | java | public boolean isUsable() {
return isConnected() && TimeUnit.MILLISECONDS.toMinutes(new Date().getTime() - lastUsage.getTime()) <= MAXIMUM_AGE_IN_MINUTES;
} | [
"public",
"boolean",
"isUsable",
"(",
")",
"{",
"return",
"isConnected",
"(",
")",
"&&",
"TimeUnit",
".",
"MILLISECONDS",
".",
"toMinutes",
"(",
"new",
"Date",
"(",
")",
".",
"getTime",
"(",
")",
"-",
"lastUsage",
".",
"getTime",
"(",
")",
")",
"<=",
... | Gets whether this connection may still be used.
@return may this connection still be used? | [
"Gets",
"whether",
"this",
"connection",
"may",
"still",
"be",
"used",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/DataConnection.java#L122-L124 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.add | public void add(long timestamp, String column, Object value) {
if (!(value instanceof Long) && !(value instanceof Integer) && !(value instanceof Double) &&
!(value instanceof Float) && !(value instanceof Boolean) &&
!(value instanceof String)) {
throw new IllegalArgumentExcep... | java | public void add(long timestamp, String column, Object value) {
if (!(value instanceof Long) && !(value instanceof Integer) && !(value instanceof Double) &&
!(value instanceof Float) && !(value instanceof Boolean) &&
!(value instanceof String)) {
throw new IllegalArgumentExcep... | [
"public",
"void",
"add",
"(",
"long",
"timestamp",
",",
"String",
"column",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"!",
"(",
"value",
"instanceof",
"Long",
")",
"&&",
"!",
"(",
"value",
"instanceof",
"Integer",
")",
"&&",
"!",
"(",
"value",
"in... | Add a data row, consisting of one column, to the store at a particular time.
@param timestamp Timestamp for the data point.
@param column The column for a field to value mapping
@param value The value for a field to value mapping | [
"Add",
"a",
"data",
"row",
"consisting",
"of",
"one",
"column",
"to",
"the",
"store",
"at",
"a",
"particular",
"time",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L100-L110 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.add | public void add(String column, Object value) {
add(System.currentTimeMillis(), column, value);
} | java | public void add(String column, Object value) {
add(System.currentTimeMillis(), column, value);
} | [
"public",
"void",
"add",
"(",
"String",
"column",
",",
"Object",
"value",
")",
"{",
"add",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
",",
"column",
",",
"value",
")",
";",
"}"
] | Add a data row, consisting of one column, to the store at the current time.
See {@link #add(long, Map)} for more information.
@param column The column for a field to value mapping
@param value The value for a field to value mapping | [
"Add",
"a",
"data",
"row",
"consisting",
"of",
"one",
"column",
"to",
"the",
"store",
"at",
"the",
"current",
"time",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L120-L122 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.add | public void add(String[] columns, Object[] values) {
add(System.currentTimeMillis(), columns, values);
} | java | public void add(String[] columns, Object[] values) {
add(System.currentTimeMillis(), columns, values);
} | [
"public",
"void",
"add",
"(",
"String",
"[",
"]",
"columns",
",",
"Object",
"[",
"]",
"values",
")",
"{",
"add",
"(",
"System",
".",
"currentTimeMillis",
"(",
")",
",",
"columns",
",",
"values",
")",
";",
"}"
] | Add a data row to the batch with the current time.
This method will throw a `MismatchedLengthException` if the length of `columns` and `values`
are not the same.
See {@link #add(long, Map)} for more information.
@param columns The list of columns for a field to value mapping
@param values The list of values for a f... | [
"Add",
"a",
"data",
"row",
"to",
"the",
"batch",
"with",
"the",
"current",
"time",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L151-L153 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.add | public void add(long timestamp, Map<String, Object> data) {
for (String k : data.keySet()) {
if (!columns.contains(k)) {
throw new UnknownFieldException(k);
}
}
Map<String, Object> curr = this.rows.get(timestamp);
if (curr == null) {
t... | java | public void add(long timestamp, Map<String, Object> data) {
for (String k : data.keySet()) {
if (!columns.contains(k)) {
throw new UnknownFieldException(k);
}
}
Map<String, Object> curr = this.rows.get(timestamp);
if (curr == null) {
t... | [
"public",
"void",
"add",
"(",
"long",
"timestamp",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"data",
")",
"{",
"for",
"(",
"String",
"k",
":",
"data",
".",
"keySet",
"(",
")",
")",
"{",
"if",
"(",
"!",
"columns",
".",
"contains",
"(",
"k",
... | Add a data row to the batch at a particular timestamp, merging with previous values if
needed.
This method will throw an `UnknownFieldException` if `data` contains a key that is not in the
set of columns this batch was constructed with.
@param timestamp Timestamp for all data points
@param data Map that has fiel... | [
"Add",
"a",
"data",
"row",
"to",
"the",
"batch",
"at",
"a",
"particular",
"timestamp",
"merging",
"with",
"previous",
"values",
"if",
"needed",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L203-L216 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.merge | public void merge(DataStore other) {
if (!this.hasSameColumns(other)) {
throw new IllegalArgumentException("DataStore must have the same columns to merge");
}
this.rows.putAll(other.rows);
} | java | public void merge(DataStore other) {
if (!this.hasSameColumns(other)) {
throw new IllegalArgumentException("DataStore must have the same columns to merge");
}
this.rows.putAll(other.rows);
} | [
"public",
"void",
"merge",
"(",
"DataStore",
"other",
")",
"{",
"if",
"(",
"!",
"this",
".",
"hasSameColumns",
"(",
"other",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"DataStore must have the same columns to merge\"",
")",
";",
"}",
"this... | Add the entirety of another DataStore into this one.
@param other The other DataStore to merge in | [
"Add",
"the",
"entirety",
"of",
"another",
"DataStore",
"into",
"this",
"one",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L235-L241 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.getRows | public TreeMap<Long, Map<String, Object>> getRows() {
return new TreeMap<Long, Map<String, Object>>(this.rows);
} | java | public TreeMap<Long, Map<String, Object>> getRows() {
return new TreeMap<Long, Map<String, Object>>(this.rows);
} | [
"public",
"TreeMap",
"<",
"Long",
",",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"getRows",
"(",
")",
"{",
"return",
"new",
"TreeMap",
"<",
"Long",
",",
"Map",
"<",
"String",
",",
"Object",
">",
">",
"(",
"this",
".",
"rows",
")",
";",
"}"
] | Return the rows of this batch as a Map from time to a Map from column to value.
@return Map from a time to a Map from column o value. | [
"Return",
"the",
"rows",
"of",
"this",
"batch",
"as",
"a",
"Map",
"from",
"time",
"to",
"a",
"Map",
"from",
"column",
"to",
"value",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L257-L259 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.hasColumns | public boolean hasColumns(Collection<String> columns) {
return columns != null && this.columns.equals(new TreeSet<String>(columns));
} | java | public boolean hasColumns(Collection<String> columns) {
return columns != null && this.columns.equals(new TreeSet<String>(columns));
} | [
"public",
"boolean",
"hasColumns",
"(",
"Collection",
"<",
"String",
">",
"columns",
")",
"{",
"return",
"columns",
"!=",
"null",
"&&",
"this",
".",
"columns",
".",
"equals",
"(",
"new",
"TreeSet",
"<",
"String",
">",
"(",
"columns",
")",
")",
";",
"}"... | Check if this DataStore has the given columns.
@param columns Columns to check for
@return True if the column sets are equal | [
"Check",
"if",
"this",
"DataStore",
"has",
"the",
"given",
"columns",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L287-L289 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.fromJson | public static DataStore fromJson(final JSONObject json) throws ParseException {
DataStore ret;
JSONArray jsonCols = json.getJSONArray("fields");
if (!"time".equals(jsonCols.get(0))) {
throw new JSONException("time must be the first item in 'fields'");
}
Set<String> ... | java | public static DataStore fromJson(final JSONObject json) throws ParseException {
DataStore ret;
JSONArray jsonCols = json.getJSONArray("fields");
if (!"time".equals(jsonCols.get(0))) {
throw new JSONException("time must be the first item in 'fields'");
}
Set<String> ... | [
"public",
"static",
"DataStore",
"fromJson",
"(",
"final",
"JSONObject",
"json",
")",
"throws",
"ParseException",
"{",
"DataStore",
"ret",
";",
"JSONArray",
"jsonCols",
"=",
"json",
".",
"getJSONArray",
"(",
"\"fields\"",
")",
";",
"if",
"(",
"!",
"\"time\"",
... | Create a DataStore object from JSON.
@param json JSON of the DataStore
@return DataStore object corresponding to the given JSON
@throws ParseException If the JSON is invalid | [
"Create",
"a",
"DataStore",
"object",
"from",
"JSON",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L298-L324 | train |
iobeam/iobeam-client-java | src/main/java/com/iobeam/api/resource/DataStore.java | DataStore.toJson | public JSONObject toJson() {
JSONObject ret = new JSONObject();
JSONArray columns = new JSONArray(Arrays.asList(new String[]{"time"}));
for (String f : this.columns) {
columns.put(f);
}
ret.put(KEY_COLUMNS, columns);
JSONArray data = new JSONArray();
... | java | public JSONObject toJson() {
JSONObject ret = new JSONObject();
JSONArray columns = new JSONArray(Arrays.asList(new String[]{"time"}));
for (String f : this.columns) {
columns.put(f);
}
ret.put(KEY_COLUMNS, columns);
JSONArray data = new JSONArray();
... | [
"public",
"JSONObject",
"toJson",
"(",
")",
"{",
"JSONObject",
"ret",
"=",
"new",
"JSONObject",
"(",
")",
";",
"JSONArray",
"columns",
"=",
"new",
"JSONArray",
"(",
"Arrays",
".",
"asList",
"(",
"new",
"String",
"[",
"]",
"{",
"\"time\"",
"}",
")",
")"... | Convert this batch into a JSON representation.
@return JSONObject representing this batch. | [
"Convert",
"this",
"batch",
"into",
"a",
"JSON",
"representation",
"."
] | 06e7aeb2a313503392358a3671de7d28628d0e33 | https://github.com/iobeam/iobeam-client-java/blob/06e7aeb2a313503392358a3671de7d28628d0e33/src/main/java/com/iobeam/api/resource/DataStore.java#L331-L353 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/ui/AbstractCollection.java | AbstractCollection.add | public void add(final Field _field)
{
this.fields.put(_field.getId(), _field);
this.fieldName2Field.put(_field.getName(), _field);
if (_field.getReference() != null && _field.getReference().length() > 0) {
final String ref = _field.getReference();
int index;
... | java | public void add(final Field _field)
{
this.fields.put(_field.getId(), _field);
this.fieldName2Field.put(_field.getName(), _field);
if (_field.getReference() != null && _field.getReference().length() > 0) {
final String ref = _field.getReference();
int index;
... | [
"public",
"void",
"add",
"(",
"final",
"Field",
"_field",
")",
"{",
"this",
".",
"fields",
".",
"put",
"(",
"_field",
".",
"getId",
"(",
")",
",",
"_field",
")",
";",
"this",
".",
"fieldName2Field",
".",
"put",
"(",
"_field",
".",
"getName",
"(",
"... | Method to add a Field to this Collection.
@param _field Field to add to this collection | [
"Method",
"to",
"add",
"a",
"Field",
"to",
"this",
"Collection",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/ui/AbstractCollection.java#L113-L128 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/ui/AbstractCollection.java | AbstractCollection.addFieldExpr | protected int addFieldExpr(final String _expr)
{
int ret = -1;
if (getAllFieldExpr().containsKey(_expr)) {
ret = getFieldExprIndex(_expr);
} else {
getAllFieldExpr().put(_expr, Integer.valueOf(getSelIndexLen()));
if (getSelect() == null) {
... | java | protected int addFieldExpr(final String _expr)
{
int ret = -1;
if (getAllFieldExpr().containsKey(_expr)) {
ret = getFieldExprIndex(_expr);
} else {
getAllFieldExpr().put(_expr, Integer.valueOf(getSelIndexLen()));
if (getSelect() == null) {
... | [
"protected",
"int",
"addFieldExpr",
"(",
"final",
"String",
"_expr",
")",
"{",
"int",
"ret",
"=",
"-",
"1",
";",
"if",
"(",
"getAllFieldExpr",
"(",
")",
".",
"containsKey",
"(",
"_expr",
")",
")",
"{",
"ret",
"=",
"getFieldExprIndex",
"(",
"_expr",
")"... | Add a field expression to the select statement and the hash table of all
field expressions. The method returns the index of the field expression.
If the field expression is already added, the old index is returned, so a
expression is only added once.
@param _expr field expression to add
@return index of the field expr... | [
"Add",
"a",
"field",
"expression",
"to",
"the",
"select",
"statement",
"and",
"the",
"hash",
"table",
"of",
"all",
"field",
"expressions",
".",
"The",
"method",
"returns",
"the",
"index",
"of",
"the",
"field",
"expression",
".",
"If",
"the",
"field",
"expr... | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/ui/AbstractCollection.java#L142-L158 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/ui/AbstractCollection.java | AbstractCollection.readFromDB4Fields | private void readFromDB4Fields()
throws CacheReloadException
{
try {
final QueryBuilder queryBldr = new QueryBuilder(CIAdminUserInterface.Field);
queryBldr.addWhereAttrEqValue(CIAdminUserInterface.Field.Collection, getId());
final MultiPrintQuery multi = queryBld... | java | private void readFromDB4Fields()
throws CacheReloadException
{
try {
final QueryBuilder queryBldr = new QueryBuilder(CIAdminUserInterface.Field);
queryBldr.addWhereAttrEqValue(CIAdminUserInterface.Field.Collection, getId());
final MultiPrintQuery multi = queryBld... | [
"private",
"void",
"readFromDB4Fields",
"(",
")",
"throws",
"CacheReloadException",
"{",
"try",
"{",
"final",
"QueryBuilder",
"queryBldr",
"=",
"new",
"QueryBuilder",
"(",
"CIAdminUserInterface",
".",
"Field",
")",
";",
"queryBldr",
".",
"addWhereAttrEqValue",
"(",
... | Read all fields related to this collection object.
@throws CacheReloadException on error | [
"Read",
"all",
"fields",
"related",
"to",
"this",
"collection",
"object",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/ui/AbstractCollection.java#L200-L240 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/rest/RestContext.java | RestContext.setCompany | @Path("setCompany")
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN })
@SuppressWarnings("checkstyle:illegalcatch")
public Response setCompany(@QueryParam("company") final String _companyStr)
{
try {
final Company company;
if (UUIDUtil.isUUID(_compan... | java | @Path("setCompany")
@GET
@Produces({ MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN })
@SuppressWarnings("checkstyle:illegalcatch")
public Response setCompany(@QueryParam("company") final String _companyStr)
{
try {
final Company company;
if (UUIDUtil.isUUID(_compan... | [
"@",
"Path",
"(",
"\"setCompany\"",
")",
"@",
"GET",
"@",
"Produces",
"(",
"{",
"MediaType",
".",
"APPLICATION_JSON",
",",
"MediaType",
".",
"TEXT_PLAIN",
"}",
")",
"@",
"SuppressWarnings",
"(",
"\"checkstyle:illegalcatch\"",
")",
"public",
"Response",
"setCompa... | Sets the company.
@param _companyStr the _company str
@return the response | [
"Sets",
"the",
"company",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/rest/RestContext.java#L94-L118 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java | Database.onServerAvailable | public synchronized void onServerAvailable(final String id, final String role) {
logger.debug("[onServerAvailable] id = {}, role = {}", id, role);
Server server = getServerById(id);
boolean isMaster = role.equals("master");
boolean isSlave = role.equals("slave");
if (server == ... | java | public synchronized void onServerAvailable(final String id, final String role) {
logger.debug("[onServerAvailable] id = {}, role = {}", id, role);
Server server = getServerById(id);
boolean isMaster = role.equals("master");
boolean isSlave = role.equals("slave");
if (server == ... | [
"public",
"synchronized",
"void",
"onServerAvailable",
"(",
"final",
"String",
"id",
",",
"final",
"String",
"role",
")",
"{",
"logger",
".",
"debug",
"(",
"\"[onServerAvailable] id = {}, role = {}\"",
",",
"id",
",",
"role",
")",
";",
"Server",
"server",
"=",
... | Adds a server to the list of available servers.
@param id Neo4j cluster id | [
"Adds",
"a",
"server",
"to",
"the",
"list",
"of",
"available",
"servers",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java#L118-L151 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java | Database.onServerUnavailable | public synchronized void onServerUnavailable(final String id) {
logger.debug("[onServerUnavailable] id = {}", id);
Server server = getServerById(id);
if (server != null) {
server.setAvailable(false);
refreshServers();
}
} | java | public synchronized void onServerUnavailable(final String id) {
logger.debug("[onServerUnavailable] id = {}", id);
Server server = getServerById(id);
if (server != null) {
server.setAvailable(false);
refreshServers();
}
} | [
"public",
"synchronized",
"void",
"onServerUnavailable",
"(",
"final",
"String",
"id",
")",
"{",
"logger",
".",
"debug",
"(",
"\"[onServerUnavailable] id = {}\"",
",",
"id",
")",
";",
"Server",
"server",
"=",
"getServerById",
"(",
"id",
")",
";",
"if",
"(",
... | Removes a server from the list of available servers.
@param id Neo4j cluster id | [
"Removes",
"a",
"server",
"from",
"the",
"list",
"of",
"available",
"servers",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java#L157-L166 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java | Database.onServerReconnected | public synchronized void onServerReconnected(final String id, final String uri) {
logger.debug("[onServerReconnected] id = {}, uri = {}", id, uri);
if (id.length() == 0) {
Server server = getServerByUri(uri);
server.register();
server.setAvailable(true);
}
... | java | public synchronized void onServerReconnected(final String id, final String uri) {
logger.debug("[onServerReconnected] id = {}, uri = {}", id, uri);
if (id.length() == 0) {
Server server = getServerByUri(uri);
server.register();
server.setAvailable(true);
}
... | [
"public",
"synchronized",
"void",
"onServerReconnected",
"(",
"final",
"String",
"id",
",",
"final",
"String",
"uri",
")",
"{",
"logger",
".",
"debug",
"(",
"\"[onServerReconnected] id = {}, uri = {}\"",
",",
"id",
",",
"uri",
")",
";",
"if",
"(",
"id",
".",
... | Add a server to the list of available servers.
@param id Neo4j cluster id
@param uri websocket uri | [
"Add",
"a",
"server",
"to",
"the",
"list",
"of",
"available",
"servers",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java#L173-L183 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java | Database.getReadServer | protected Server getReadServer() {
Server[] servers = readServers;
return servers[readSequence.incrementAndGet(servers.length)];
} | java | protected Server getReadServer() {
Server[] servers = readServers;
return servers[readSequence.incrementAndGet(servers.length)];
} | [
"protected",
"Server",
"getReadServer",
"(",
")",
"{",
"Server",
"[",
"]",
"servers",
"=",
"readServers",
";",
"return",
"servers",
"[",
"readSequence",
".",
"incrementAndGet",
"(",
"servers",
".",
"length",
")",
"]",
";",
"}"
] | Gets an read server from the list of available servers using round robing load balancing.
@return server for read access | [
"Gets",
"an",
"read",
"server",
"from",
"the",
"list",
"of",
"available",
"servers",
"using",
"round",
"robing",
"load",
"balancing",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/server/Database.java#L282-L286 | train |
jcommon/graph | src/main/java/jcommon/graph/impl/AdjacencyList.java | AdjacencyList.calculateInDegrees | @Override
public int[] calculateInDegrees() {
final int[] in_degrees = new int[size()];
for(int i = 0; i < size(); ++i) {
final IAdjacencyListPair<TVertex> p = pairAt(i);
final TVertex d = p.getVertex();
for(int j = 0; j < size(); ++j) {
for(IVertex dep : pairAt(j).getOutNeighbors()... | java | @Override
public int[] calculateInDegrees() {
final int[] in_degrees = new int[size()];
for(int i = 0; i < size(); ++i) {
final IAdjacencyListPair<TVertex> p = pairAt(i);
final TVertex d = p.getVertex();
for(int j = 0; j < size(); ++j) {
for(IVertex dep : pairAt(j).getOutNeighbors()... | [
"@",
"Override",
"public",
"int",
"[",
"]",
"calculateInDegrees",
"(",
")",
"{",
"final",
"int",
"[",
"]",
"in_degrees",
"=",
"new",
"int",
"[",
"size",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"size",
"(",
")",
";",... | Calculates an integer array where the value at each index is the number of times that vertex is
referenced elsewhere. | [
"Calculates",
"an",
"integer",
"array",
"where",
"the",
"value",
"at",
"each",
"index",
"is",
"the",
"number",
"of",
"times",
"that",
"vertex",
"is",
"referenced",
"elsewhere",
"."
] | bc115eb2da7b639806d835c01458ec22a3fdec53 | https://github.com/jcommon/graph/blob/bc115eb2da7b639806d835c01458ec22a3fdec53/src/main/java/jcommon/graph/impl/AdjacencyList.java#L85-L100 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java | WebSocketHandler.afterConnectionEstablished | @Override
public void afterConnectionEstablished(final WebSocketSession webSocketSession) {
logger.debug("[afterConnectionEstablished] id = {}", webSocketSession.getId());
this.session = webSocketSession;
synchronized (notifyConnectionObject) {
notifyConnectionObject.notifyAll()... | java | @Override
public void afterConnectionEstablished(final WebSocketSession webSocketSession) {
logger.debug("[afterConnectionEstablished] id = {}", webSocketSession.getId());
this.session = webSocketSession;
synchronized (notifyConnectionObject) {
notifyConnectionObject.notifyAll()... | [
"@",
"Override",
"public",
"void",
"afterConnectionEstablished",
"(",
"final",
"WebSocketSession",
"webSocketSession",
")",
"{",
"logger",
".",
"debug",
"(",
"\"[afterConnectionEstablished] id = {}\"",
",",
"webSocketSession",
".",
"getId",
"(",
")",
")",
";",
"this",... | Is called after a websocket session was established.
@param webSocketSession websocket session that was established | [
"Is",
"called",
"after",
"a",
"websocket",
"session",
"was",
"established",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java#L80-L88 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java | WebSocketHandler.afterConnectionClosed | @Override
public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus status) {
logger.debug("[afterConnectionClosed] id = ", webSocketSession.getId());
this.session = null;
if (connectionListener != null) {
connectionListener.onConnectionClosed(... | java | @Override
public void afterConnectionClosed(final WebSocketSession webSocketSession, final CloseStatus status) {
logger.debug("[afterConnectionClosed] id = ", webSocketSession.getId());
this.session = null;
if (connectionListener != null) {
connectionListener.onConnectionClosed(... | [
"@",
"Override",
"public",
"void",
"afterConnectionClosed",
"(",
"final",
"WebSocketSession",
"webSocketSession",
",",
"final",
"CloseStatus",
"status",
")",
"{",
"logger",
".",
"debug",
"(",
"\"[afterConnectionClosed] id = \"",
",",
"webSocketSession",
".",
"getId",
... | Is called after a websocket session was closed.
@param webSocketSession websocket session that was closed
@param status status of the websocket session | [
"Is",
"called",
"after",
"a",
"websocket",
"session",
"was",
"closed",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java#L95-L103 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java | WebSocketHandler.handleTransportError | @Override
public void handleTransportError(final WebSocketSession webSocketSession, final Throwable exception) throws Exception {
if (exception != null) {
logger.error("[handleTransportError]", exception);
}
} | java | @Override
public void handleTransportError(final WebSocketSession webSocketSession, final Throwable exception) throws Exception {
if (exception != null) {
logger.error("[handleTransportError]", exception);
}
} | [
"@",
"Override",
"public",
"void",
"handleTransportError",
"(",
"final",
"WebSocketSession",
"webSocketSession",
",",
"final",
"Throwable",
"exception",
")",
"throws",
"Exception",
"{",
"if",
"(",
"exception",
"!=",
"null",
")",
"{",
"logger",
".",
"error",
"(",... | Handles websocket transport errors
@param webSocketSession websocket session where the error appeared
@param exception exception that occured
@throws Exception transport error exception | [
"Handles",
"websocket",
"transport",
"errors"
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java#L187-L192 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java | WebSocketHandler.sendMessage | public void sendMessage(final String message) {
try {
session.sendMessage(new TextMessage(message));
}
catch (IOException e) {
logger.error("[sendTextMessage]", e);
}
} | java | public void sendMessage(final String message) {
try {
session.sendMessage(new TextMessage(message));
}
catch (IOException e) {
logger.error("[sendTextMessage]", e);
}
} | [
"public",
"void",
"sendMessage",
"(",
"final",
"String",
"message",
")",
"{",
"try",
"{",
"session",
".",
"sendMessage",
"(",
"new",
"TextMessage",
"(",
"message",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"logger",
".",
"error",
... | Sends a text message using this object's websocket session.
@param message json binary message | [
"Sends",
"a",
"text",
"message",
"using",
"this",
"object",
"s",
"websocket",
"session",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java#L198-L205 | train |
owetterau/neo4j-websockets | client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java | WebSocketHandler.sendMessage | public void sendMessage(final byte[] message) {
try {
session.sendMessage(new BinaryMessage(message));
}
catch (IOException e) {
logger.error("[sendBinaryMessage]", e);
}
} | java | public void sendMessage(final byte[] message) {
try {
session.sendMessage(new BinaryMessage(message));
}
catch (IOException e) {
logger.error("[sendBinaryMessage]", e);
}
} | [
"public",
"void",
"sendMessage",
"(",
"final",
"byte",
"[",
"]",
"message",
")",
"{",
"try",
"{",
"session",
".",
"sendMessage",
"(",
"new",
"BinaryMessage",
"(",
"message",
")",
")",
";",
"}",
"catch",
"(",
"IOException",
"e",
")",
"{",
"logger",
".",... | Sends a binary message using this object's websocket session.
@param message json binary message | [
"Sends",
"a",
"binary",
"message",
"using",
"this",
"object",
"s",
"websocket",
"session",
"."
] | ca3481066819d01169873aeb145ab3bf5c736afe | https://github.com/owetterau/neo4j-websockets/blob/ca3481066819d01169873aeb145ab3bf5c736afe/client/src/main/java/de/oliverwetterau/neo4j/websockets/client/web/WebSocketHandler.java#L211-L218 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.getStoreResource | public Resource getStoreResource(final Instance _instance,
final Resource.StoreEvent _event)
throws EFapsException
{
Resource storeRsrc = null;
final Store store = Store.get(_instance.getType().getStoreId());
storeRsrc = store.getResource(_instanc... | java | public Resource getStoreResource(final Instance _instance,
final Resource.StoreEvent _event)
throws EFapsException
{
Resource storeRsrc = null;
final Store store = Store.get(_instance.getType().getStoreId());
storeRsrc = store.getResource(_instanc... | [
"public",
"Resource",
"getStoreResource",
"(",
"final",
"Instance",
"_instance",
",",
"final",
"Resource",
".",
"StoreEvent",
"_event",
")",
"throws",
"EFapsException",
"{",
"Resource",
"storeRsrc",
"=",
"null",
";",
"final",
"Store",
"store",
"=",
"Store",
".",... | Method to get the sore resource.
@param _instance Instance to get the StoreResource for
@param _event StorEvent the store is wanted for
@throws EFapsException on error
@return StoreResource
@see #getStoreResource(Type,long) | [
"Method",
"to",
"get",
"the",
"sore",
"resource",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L388-L398 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.getParameter | public String getParameter(final String _key)
{
String value = null;
if (this.parameters != null) {
final String[] values = this.parameters.get(_key);
if (values != null && values.length > 0) {
value = values[0];
}
}
return value;
... | java | public String getParameter(final String _key)
{
String value = null;
if (this.parameters != null) {
final String[] values = this.parameters.get(_key);
if (values != null && values.length > 0) {
value = values[0];
}
}
return value;
... | [
"public",
"String",
"getParameter",
"(",
"final",
"String",
"_key",
")",
"{",
"String",
"value",
"=",
"null",
";",
"if",
"(",
"this",
".",
"parameters",
"!=",
"null",
")",
"{",
"final",
"String",
"[",
"]",
"values",
"=",
"this",
".",
"parameters",
".",... | Method to get a parameter from the context.
@param _key Key for the parameter
@return String value of the parameter | [
"Method",
"to",
"get",
"a",
"parameter",
"from",
"the",
"context",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L425-L435 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.setRequestAttribute | public Object setRequestAttribute(final String _key,
final Object _value)
{
return this.requestAttributes.put(_key, _value);
} | java | public Object setRequestAttribute(final String _key,
final Object _value)
{
return this.requestAttributes.put(_key, _value);
} | [
"public",
"Object",
"setRequestAttribute",
"(",
"final",
"String",
"_key",
",",
"final",
"Object",
"_value",
")",
"{",
"return",
"this",
".",
"requestAttributes",
".",
"put",
"(",
"_key",
",",
"_value",
")",
";",
"}"
] | Associates the specified value with the specified key in the request
attributes. If the request attributes previously contained a mapping for
this key, the old value is replaced by the specified value.
@param _key key name of the attribute to set
@param _value _value of the attribute to set
@return Object
@see #reques... | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"the",
"request",
"attributes",
".",
"If",
"the",
"request",
"attributes",
"previously",
"contained",
"a",
"mapping",
"for",
"this",
"key",
"the",
"old",
"value",
"is",
"replac... | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L523-L527 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.setSessionAttribute | public Object setSessionAttribute(final String _key,
final Object _value)
{
return this.sessionAttributes.put(_key, _value);
} | java | public Object setSessionAttribute(final String _key,
final Object _value)
{
return this.sessionAttributes.put(_key, _value);
} | [
"public",
"Object",
"setSessionAttribute",
"(",
"final",
"String",
"_key",
",",
"final",
"Object",
"_value",
")",
"{",
"return",
"this",
".",
"sessionAttributes",
".",
"put",
"(",
"_key",
",",
"_value",
")",
";",
"}"
] | Associates the specified value with the specified key in the session
attributes. If the session attributes previously contained a mapping for
this key, the old value is replaced by the specified value.
@param _key key name of the attribute to set
@param _value value of the attribute to set
@return Object
@see #session... | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"the",
"session",
"attributes",
".",
"If",
"the",
"session",
"attributes",
"previously",
"contained",
"a",
"mapping",
"for",
"this",
"key",
"the",
"old",
"value",
"is",
"replac... | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L594-L598 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.getUserAttributes | public UserAttributesSet getUserAttributes()
throws EFapsException
{
if (containsSessionAttribute(UserAttributesSet.CONTEXTMAPKEY)) {
return (UserAttributesSet) getSessionAttribute(UserAttributesSet.CONTEXTMAPKEY);
} else {
throw new EFapsException(Context.class, "get... | java | public UserAttributesSet getUserAttributes()
throws EFapsException
{
if (containsSessionAttribute(UserAttributesSet.CONTEXTMAPKEY)) {
return (UserAttributesSet) getSessionAttribute(UserAttributesSet.CONTEXTMAPKEY);
} else {
throw new EFapsException(Context.class, "get... | [
"public",
"UserAttributesSet",
"getUserAttributes",
"(",
")",
"throws",
"EFapsException",
"{",
"if",
"(",
"containsSessionAttribute",
"(",
"UserAttributesSet",
".",
"CONTEXTMAPKEY",
")",
")",
"{",
"return",
"(",
"UserAttributesSet",
")",
"getSessionAttribute",
"(",
"U... | Method to get the UserAttributesSet of the user of this context.
@return UserAttributesSet
@throws EFapsException on error | [
"Method",
"to",
"get",
"the",
"UserAttributesSet",
"of",
"the",
"user",
"of",
"this",
"context",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L703-L711 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.setCompany | public void setCompany(final Company _company)
throws CacheReloadException
{
if (_company == null) {
this.companyId = null;
} else {
this.companyId = _company.getId();
}
} | java | public void setCompany(final Company _company)
throws CacheReloadException
{
if (_company == null) {
this.companyId = null;
} else {
this.companyId = _company.getId();
}
} | [
"public",
"void",
"setCompany",
"(",
"final",
"Company",
"_company",
")",
"throws",
"CacheReloadException",
"{",
"if",
"(",
"_company",
"==",
"null",
")",
"{",
"this",
".",
"companyId",
"=",
"null",
";",
"}",
"else",
"{",
"this",
".",
"companyId",
"=",
"... | Set the Company currently valid for this context.
@param _company Company to set
@throws CacheReloadException on error | [
"Set",
"the",
"Company",
"currently",
"valid",
"for",
"this",
"context",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L760-L768 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.getThreadContext | public static Context getThreadContext()
throws EFapsException
{
Context context = Context.THREADCONTEXT.get();
if (context == null) {
context = Context.INHERITTHREADCONTEXT.get();
}
if (context == null) {
throw new EFapsException(Context.class, "getTh... | java | public static Context getThreadContext()
throws EFapsException
{
Context context = Context.THREADCONTEXT.get();
if (context == null) {
context = Context.INHERITTHREADCONTEXT.get();
}
if (context == null) {
throw new EFapsException(Context.class, "getTh... | [
"public",
"static",
"Context",
"getThreadContext",
"(",
")",
"throws",
"EFapsException",
"{",
"Context",
"context",
"=",
"Context",
".",
"THREADCONTEXT",
".",
"get",
"(",
")",
";",
"if",
"(",
"context",
"==",
"null",
")",
"{",
"context",
"=",
"Context",
".... | The method checks if for the current thread a context object is defined.
This found context object is returned.
@return defined context object of current thread
@throws EFapsException if no context object for current thread is defined
@see #INHERITTHREADCONTEXT | [
"The",
"method",
"checks",
"if",
"for",
"the",
"current",
"thread",
"a",
"context",
"object",
"is",
"defined",
".",
"This",
"found",
"context",
"object",
"is",
"returned",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L885-L896 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.save | public static void save()
throws EFapsException
{
try {
Context.TRANSMANAG.commit();
Context.TRANSMANAG.begin();
final Context context = Context.getThreadContext();
context.connectionResource = null;
context.setTransaction(Context.TRANSMANA... | java | public static void save()
throws EFapsException
{
try {
Context.TRANSMANAG.commit();
Context.TRANSMANAG.begin();
final Context context = Context.getThreadContext();
context.connectionResource = null;
context.setTransaction(Context.TRANSMANA... | [
"public",
"static",
"void",
"save",
"(",
")",
"throws",
"EFapsException",
"{",
"try",
"{",
"Context",
".",
"TRANSMANAG",
".",
"commit",
"(",
")",
";",
"Context",
".",
"TRANSMANAG",
".",
"begin",
"(",
")",
";",
"final",
"Context",
"context",
"=",
"Context... | Save the Context by committing and beginning a new Transaction.
@throws EFapsException on error | [
"Save",
"the",
"Context",
"by",
"committing",
"and",
"beginning",
"a",
"new",
"Transaction",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1037-L1061 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.isTMActive | public static boolean isTMActive()
throws EFapsException
{
try {
return Context.TRANSMANAG.getStatus() == Status.STATUS_ACTIVE;
} catch (final SystemException e) {
throw new EFapsException(Context.class, "isTMActive.SystemException", e);
}
} | java | public static boolean isTMActive()
throws EFapsException
{
try {
return Context.TRANSMANAG.getStatus() == Status.STATUS_ACTIVE;
} catch (final SystemException e) {
throw new EFapsException(Context.class, "isTMActive.SystemException", e);
}
} | [
"public",
"static",
"boolean",
"isTMActive",
"(",
")",
"throws",
"EFapsException",
"{",
"try",
"{",
"return",
"Context",
".",
"TRANSMANAG",
".",
"getStatus",
"(",
")",
"==",
"Status",
".",
"STATUS_ACTIVE",
";",
"}",
"catch",
"(",
"final",
"SystemException",
... | Is the status of transaction manager active?
@return <i>true</i> if transaction manager is active, otherwise
<i>false</i>
@throws EFapsException if the status of the transaction manager could not
be evaluated
@see #TRANSMANAG | [
"Is",
"the",
"status",
"of",
"transaction",
"manager",
"active?"
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1129-L1137 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.isTMNoTransaction | public static boolean isTMNoTransaction()
throws EFapsException
{
try {
return Context.TRANSMANAG.getStatus() == Status.STATUS_NO_TRANSACTION;
} catch (final SystemException e) {
throw new EFapsException(Context.class, "isTMNoTransaction.SystemException", e);
... | java | public static boolean isTMNoTransaction()
throws EFapsException
{
try {
return Context.TRANSMANAG.getStatus() == Status.STATUS_NO_TRANSACTION;
} catch (final SystemException e) {
throw new EFapsException(Context.class, "isTMNoTransaction.SystemException", e);
... | [
"public",
"static",
"boolean",
"isTMNoTransaction",
"(",
")",
"throws",
"EFapsException",
"{",
"try",
"{",
"return",
"Context",
".",
"TRANSMANAG",
".",
"getStatus",
"(",
")",
"==",
"Status",
".",
"STATUS_NO_TRANSACTION",
";",
"}",
"catch",
"(",
"final",
"Syste... | Is a transaction associated with a target object for transaction manager?
@return <i>true</i> if a transaction associated, otherwise <i>false</i>
@throws EFapsException if the status of the transaction manager could not
be evaluated
@see #TRANSMANAG | [
"Is",
"a",
"transaction",
"associated",
"with",
"a",
"target",
"object",
"for",
"transaction",
"manager?"
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1147-L1155 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.isTMMarkedRollback | public static boolean isTMMarkedRollback()
throws EFapsException
{
try {
return Context.TRANSMANAG.getStatus() == Status.STATUS_MARKED_ROLLBACK;
} catch (final SystemException e) {
throw new EFapsException(Context.class, "isTMMarkedRollback.SystemException", e);
... | java | public static boolean isTMMarkedRollback()
throws EFapsException
{
try {
return Context.TRANSMANAG.getStatus() == Status.STATUS_MARKED_ROLLBACK;
} catch (final SystemException e) {
throw new EFapsException(Context.class, "isTMMarkedRollback.SystemException", e);
... | [
"public",
"static",
"boolean",
"isTMMarkedRollback",
"(",
")",
"throws",
"EFapsException",
"{",
"try",
"{",
"return",
"Context",
".",
"TRANSMANAG",
".",
"getStatus",
"(",
")",
"==",
"Status",
".",
"STATUS_MARKED_ROLLBACK",
";",
"}",
"catch",
"(",
"final",
"Sys... | Is the status of transaction manager marked roll back?
@return <i>true</i> if transaction manager is marked roll back, otherwise
<i>false</i>
@throws EFapsException if the status of the transaction manager could not
be evaluated
@see #TRANSMANAG | [
"Is",
"the",
"status",
"of",
"transaction",
"manager",
"marked",
"roll",
"back?"
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1166-L1174 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/Context.java | Context.reset | public static void reset()
throws StartupException
{
try {
final InitialContext initCtx = new InitialContext();
final javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env");
Context.DBTYPE = (AbstractDatabase<?>) envCtx.lookup(INaming... | java | public static void reset()
throws StartupException
{
try {
final InitialContext initCtx = new InitialContext();
final javax.naming.Context envCtx = (javax.naming.Context) initCtx.lookup("java:comp/env");
Context.DBTYPE = (AbstractDatabase<?>) envCtx.lookup(INaming... | [
"public",
"static",
"void",
"reset",
"(",
")",
"throws",
"StartupException",
"{",
"try",
"{",
"final",
"InitialContext",
"initCtx",
"=",
"new",
"InitialContext",
"(",
")",
";",
"final",
"javax",
".",
"naming",
".",
"Context",
"envCtx",
"=",
"(",
"javax",
"... | Resets the context to current defined values in the Javax naming
environment.
@throws StartupException if context could not be reseted to new values
@see #DBTYPE
@see #DATASOURCE
@see #TRANSMANAG
@see #TRANSMANAGTIMEOUT | [
"Resets",
"the",
"context",
"to",
"current",
"defined",
"values",
"in",
"the",
"Javax",
"naming",
"environment",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1198-L1223 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/LinkFromSelect.java | LinkFromSelect.execute | public boolean execute(final OneSelect _onesel)
throws EFapsException
{
this.hasResult = executeOneCompleteStmt(createSQLStatement(_onesel), getAllSelects());
if (this.hasResult) {
for (final OneSelect onesel : getAllSelects()) {
if (onesel.getFromSelect() != nul... | java | public boolean execute(final OneSelect _onesel)
throws EFapsException
{
this.hasResult = executeOneCompleteStmt(createSQLStatement(_onesel), getAllSelects());
if (this.hasResult) {
for (final OneSelect onesel : getAllSelects()) {
if (onesel.getFromSelect() != nul... | [
"public",
"boolean",
"execute",
"(",
"final",
"OneSelect",
"_onesel",
")",
"throws",
"EFapsException",
"{",
"this",
".",
"hasResult",
"=",
"executeOneCompleteStmt",
"(",
"createSQLStatement",
"(",
"_onesel",
")",
",",
"getAllSelects",
"(",
")",
")",
";",
"if",
... | Execute the from select for the given instance.
@param _onesel instance
@return true if statement didi return values, else false
@throws EFapsException on error | [
"Execute",
"the",
"from",
"select",
"for",
"the",
"given",
"instance",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/LinkFromSelect.java#L154-L166 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/db/print/LinkFromSelect.java | LinkFromSelect.getAllChildTypes | private List<Type> getAllChildTypes(final Type _parent)
throws CacheReloadException
{
final List<Type> ret = new ArrayList<>();
for (final Type child : _parent.getChildTypes()) {
ret.addAll(getAllChildTypes(child));
ret.add(child);
}
return ret;
} | java | private List<Type> getAllChildTypes(final Type _parent)
throws CacheReloadException
{
final List<Type> ret = new ArrayList<>();
for (final Type child : _parent.getChildTypes()) {
ret.addAll(getAllChildTypes(child));
ret.add(child);
}
return ret;
} | [
"private",
"List",
"<",
"Type",
">",
"getAllChildTypes",
"(",
"final",
"Type",
"_parent",
")",
"throws",
"CacheReloadException",
"{",
"final",
"List",
"<",
"Type",
">",
"ret",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"final",
"Type",
"ch... | Recursive method to get all child types for a type.
@param _parent parent type
@return list of all child types
@throws CacheReloadException on error | [
"Recursive",
"method",
"to",
"get",
"all",
"child",
"types",
"for",
"a",
"type",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/print/LinkFromSelect.java#L257-L266 | train |
eFaps/eFaps-Kernel | src/main/java/org/efaps/admin/program/jasper/JasperUtil.java | JasperUtil.getJasperDesign | public static JasperDesign getJasperDesign(final Instance _instance)
throws EFapsException
{
final Checkout checkout = new Checkout(_instance);
final InputStream source = checkout.execute();
JasperDesign jasperDesign = null;
try {
JasperUtil.LOG.debug("Loading Jas... | java | public static JasperDesign getJasperDesign(final Instance _instance)
throws EFapsException
{
final Checkout checkout = new Checkout(_instance);
final InputStream source = checkout.execute();
JasperDesign jasperDesign = null;
try {
JasperUtil.LOG.debug("Loading Jas... | [
"public",
"static",
"JasperDesign",
"getJasperDesign",
"(",
"final",
"Instance",
"_instance",
")",
"throws",
"EFapsException",
"{",
"final",
"Checkout",
"checkout",
"=",
"new",
"Checkout",
"(",
"_instance",
")",
";",
"final",
"InputStream",
"source",
"=",
"checkou... | Get a JasperDesign for an instance.
@param _instance Instance the JasperDesign is wanted for
@return JasperDesign
@throws EFapsException on error | [
"Get",
"a",
"JasperDesign",
"for",
"an",
"instance",
"."
] | 04b96548f518c2386a93f5ec2b9349f9b9063859 | https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/program/jasper/JasperUtil.java#L66-L86 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.