repo
stringlengths
7
59
path
stringlengths
17
234
func_name
stringlengths
3
117
original_string
stringlengths
63
281k
language
stringclasses
1 value
code
stringlengths
63
281k
code_tokens
listlengths
20
16.3k
docstring
stringlengths
1
34k
docstring_tokens
listlengths
1
3.44k
sha
stringlengths
40
40
url
stringlengths
106
339
partition
stringclasses
3 values
summary
stringlengths
3
248
output
stringlengths
142
281k
RogerParkinson/madura-objects-parent
madura-objects/src/main/java/nz/co/senanque/validationengine/ValidationSession.java
ValidationSession.addListener
public void addListener(ValidationObject object, String name, SetterListener listener) { m_validationEngine.addListener(object, name, this, listener); }
java
public void addListener(ValidationObject object, String name, SetterListener listener) { m_validationEngine.addListener(object, name, this, listener); }
[ "public", "void", "addListener", "(", "ValidationObject", "object", ",", "String", "name", ",", "SetterListener", "listener", ")", "{", "m_validationEngine", ".", "addListener", "(", "object", ",", "name", ",", "this", ",", "listener", ")", ";", "}" ]
Add a setter listener to a field. @param object @param name @param listener
[ "Add", "a", "setter", "listener", "to", "a", "field", "." ]
9b5385dd0437611f0ce8506f63646e018d06fb8e
https://github.com/RogerParkinson/madura-objects-parent/blob/9b5385dd0437611f0ce8506f63646e018d06fb8e/madura-objects/src/main/java/nz/co/senanque/validationengine/ValidationSession.java#L115-L117
train
Add a setter listener to the specified object.
Of course, here is the Java code you requested: ```java public void addListener(ValidationObject object, String name, SetterListener listener) { m_validationEngine.addListener(object, name, this, listener); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/HpelSystemStream.java
HpelSystemStream.println
public void println(Object x) { if (ivSuppress == true) return; String writeData = null; if (x instanceof java.lang.Throwable) { // D230373 writeData = HpelHelper.throwableToString((java.lang.Throwable) x); } else { writeData = String.valueOf(x); ...
java
public void println(Object x) { if (ivSuppress == true) return; String writeData = null; if (x instanceof java.lang.Throwable) { // D230373 writeData = HpelHelper.throwableToString((java.lang.Throwable) x); } else { writeData = String.valueOf(x); ...
[ "public", "void", "println", "(", "Object", "x", ")", "{", "if", "(", "ivSuppress", "==", "true", ")", "return", ";", "String", "writeData", "=", "null", ";", "if", "(", "x", "instanceof", "java", ".", "lang", ".", "Throwable", ")", "{", "// D230373", ...
Print an Object and then terminate the line. This method behaves as though it invokes <code>{@link #print(Object)}</code> and then <code>{@link #println()}</code>. <p> @param x The <code>Object</code> to be printed.
[ "Print", "an", "Object", "and", "then", "terminate", "the", "line", ".", "This", "method", "behaves", "as", "though", "it", "invokes", "<code", ">", "{", "@link", "#print", "(", "Object", ")", "}", "<", "/", "code", ">", "and", "then", "<code", ">", ...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.hpel/src/com/ibm/ejs/ras/hpel/HpelSystemStream.java#L761-L771
train
Print a single exception.
Of course, here is the Java code you requested: ```java public void println(Object x) { if (ivSuppress == true) return; String writeData = null; if (x instanceof java.lang.Throwable) { // D230373 writeData = HpelHelper.throwableToString((java.lang.Throwable) x); ...
rey5137/material
material/src/main/java/com/rey/material/widget/ListPopupWindow.java
ListPopupWindow.onKeyUp
public boolean onKeyUp(int keyCode, KeyEvent event) { if (isShowing() && mDropDownList.getSelectedItemPosition() >= 0) { boolean consumed = mDropDownList.onKeyUp(keyCode, event); if (consumed && isConfirmKey(keyCode)) { // if the list accepts the key events and the key ev...
java
public boolean onKeyUp(int keyCode, KeyEvent event) { if (isShowing() && mDropDownList.getSelectedItemPosition() >= 0) { boolean consumed = mDropDownList.onKeyUp(keyCode, event); if (consumed && isConfirmKey(keyCode)) { // if the list accepts the key events and the key ev...
[ "public", "boolean", "onKeyUp", "(", "int", "keyCode", ",", "KeyEvent", "event", ")", "{", "if", "(", "isShowing", "(", ")", "&&", "mDropDownList", ".", "getSelectedItemPosition", "(", ")", ">=", "0", ")", "{", "boolean", "consumed", "=", "mDropDownList", ...
Filter key down events. By forwarding key up events to this function, views using non-modal ListPopupWindow can have it handle key selection of items. @param keyCode keyCode param passed to the host view's onKeyUp @param event event param passed to the host view's onKeyUp @return true if the event was handled, false i...
[ "Filter", "key", "down", "events", ".", "By", "forwarding", "key", "up", "events", "to", "this", "function", "views", "using", "non", "-", "modal", "ListPopupWindow", "can", "have", "it", "handle", "key", "selection", "of", "items", "." ]
1bbcac2686a0023ef7720d3fe455bb116d115af8
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/ListPopupWindow.java#L987-L998
train
onKeyUp This method is called when the user presses the key up button.
Of course, here is the Java code you requested: ```java public boolean onKeyUp(int keyCode, KeyEvent event) { if (isShowing() && mDropDownList.getSelectedItemPosition() >= 0) { boolean consumed = mDropDownList.onKeyUp(keyCode, event); if (consumed && isConfirmKey(keyCode)) { ...
DDTH/ddth-queue
ddth-queue-core/src/main/java/com/github/ddth/queue/impl/RabbitMqQueue.java
RabbitMqQueue.setConnectionFactory
protected RabbitMqQueue<ID, DATA> setConnectionFactory(ConnectionFactory connectionFactory, boolean setMyOwnConnectionFactory) { if (myOwnConnectionFactory && this.connectionFactory != null) { // destroy this.connectionFactory } this.connectionFactory = connectionFactory;...
java
protected RabbitMqQueue<ID, DATA> setConnectionFactory(ConnectionFactory connectionFactory, boolean setMyOwnConnectionFactory) { if (myOwnConnectionFactory && this.connectionFactory != null) { // destroy this.connectionFactory } this.connectionFactory = connectionFactory;...
[ "protected", "RabbitMqQueue", "<", "ID", ",", "DATA", ">", "setConnectionFactory", "(", "ConnectionFactory", "connectionFactory", ",", "boolean", "setMyOwnConnectionFactory", ")", "{", "if", "(", "myOwnConnectionFactory", "&&", "this", ".", "connectionFactory", "!=", ...
Setter for {@link #connectionFactory}. @param connectionFactory @param setMyOwnConnectionFactory @return @since 0.7.1
[ "Setter", "for", "{", "@link", "#connectionFactory", "}", "." ]
b20776850d23111d3d71fc8ed6023c590bc3621f
https://github.com/DDTH/ddth-queue/blob/b20776850d23111d3d71fc8ed6023c590bc3621f/ddth-queue-core/src/main/java/com/github/ddth/queue/impl/RabbitMqQueue.java#L86-L94
train
Sets the connection factory.
Of course, here is the Java code you requested: ```java protected RabbitMqQueue<ID, DATA> setConnectionFactory(ConnectionFactory connectionFactory, boolean setMyOwnConnectionFactory) { if (myOwnConnectionFactory && this.connectionFactory != null) { // destroy this.connectionFactory ...
zaproxy/zaproxy
src/org/zaproxy/zap/GuiBootstrap.java
GuiBootstrap.isFirstTime
private static boolean isFirstTime() { Path acceptedLicenseFile = Paths.get(Constant.getInstance().ACCEPTED_LICENSE); return Files.notExists(acceptedLicenseFile); }
java
private static boolean isFirstTime() { Path acceptedLicenseFile = Paths.get(Constant.getInstance().ACCEPTED_LICENSE); return Files.notExists(acceptedLicenseFile); }
[ "private", "static", "boolean", "isFirstTime", "(", ")", "{", "Path", "acceptedLicenseFile", "=", "Paths", ".", "get", "(", "Constant", ".", "getInstance", "(", ")", ".", "ACCEPTED_LICENSE", ")", ";", "return", "Files", ".", "notExists", "(", "acceptedLicenseF...
Tells whether or not ZAP is being started for first time. It does so by checking if the license was not yet been accepted. @return {@code true} if it's the first time, {@code false} otherwise. @see Constant#ACCEPTED_LICENSE
[ "Tells", "whether", "or", "not", "ZAP", "is", "being", "started", "for", "first", "time", ".", "It", "does", "so", "by", "checking", "if", "the", "license", "was", "not", "yet", "been", "accepted", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/GuiBootstrap.java#L601-L604
train
Checks if the first time of the test is being executed.
Of course, here is the Java code you requested: ```java private static boolean isFirstTime() { Path acceptedLicenseFile = Paths.get(Constant.getInstance().ACCEPTED_LICENSE); return Files.notExists(acceptedLicenseFile); } ``` Hope this helps!
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/grid/DataRecordList.java
DataRecordList.bookmarkToIndex
public int bookmarkToIndex(Object bookmark, int iHandleType) { int iTargetPosition; DataRecord thisBookmark = null; if (bookmark == null) return -1; //+ Not found, look through the recordlist for (iTargetPosition = 0; iTargetPosition < m_iRecordListEnd; iTargetPosition +=...
java
public int bookmarkToIndex(Object bookmark, int iHandleType) { int iTargetPosition; DataRecord thisBookmark = null; if (bookmark == null) return -1; //+ Not found, look through the recordlist for (iTargetPosition = 0; iTargetPosition < m_iRecordListEnd; iTargetPosition +=...
[ "public", "int", "bookmarkToIndex", "(", "Object", "bookmark", ",", "int", "iHandleType", ")", "{", "int", "iTargetPosition", ";", "DataRecord", "thisBookmark", "=", "null", ";", "if", "(", "bookmark", "==", "null", ")", "return", "-", "1", ";", "//+ Not fou...
This method was created by a SmartGuide. @return int index in table; or -1 if not found. @param bookmark java.lang.Object
[ "This", "method", "was", "created", "by", "a", "SmartGuide", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/grid/DataRecordList.java#L25-L40
train
Convert this bookmark to this bookmark.
Of course, here is the Java code you requested: ```java public int bookmarkToIndex(Object bookmark, int iHandleType) { int iTargetPosition; DataRecord thisBookmark = null; if (bookmark == null) return -1; //+ Not found, look through the recordlist for (iTargetPosition = ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiHdrsImpl.java
JsApiHdrsImpl.getReportNAN
@Override public final Boolean getReportNAN() { Boolean value = (Boolean) getApi().getField(JsApiAccess.REPORTNAN_VALUE); return (value == null) ? Boolean.FALSE : value; }
java
@Override public final Boolean getReportNAN() { Boolean value = (Boolean) getApi().getField(JsApiAccess.REPORTNAN_VALUE); return (value == null) ? Boolean.FALSE : value; }
[ "@", "Override", "public", "final", "Boolean", "getReportNAN", "(", ")", "{", "Boolean", "value", "=", "(", "Boolean", ")", "getApi", "(", ")", ".", "getField", "(", "JsApiAccess", ".", "REPORTNAN_VALUE", ")", ";", "return", "(", "value", "==", "null", "...
/* Get the Report NAN field from the message header. Javadoc description supplied by the SIBusMessage interface.
[ "/", "*", "Get", "the", "Report", "NAN", "field", "from", "the", "message", "header", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsApiHdrsImpl.java#L972-L976
train
Gets the reportNAN value.
Of course, here is the Java code you requested: ```java @Override public final Boolean getReportNAN() { Boolean value = (Boolean) getApi().getField(JsApiAccess.REPORTNAN_VALUE); return (value == null) ? Boolean.FALSE : value; } ``` Hope this helps!
FasterXML/woodstox
src/main/java/com/ctc/wstx/stax/WstxInputFactory.java
WstxInputFactory.createXMLEventReader
@Override public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException { // false for auto-close, since caller has access to the input stream return new WstxEventReader(createEventAllocator(), createSR(null, in, null, true, false)); }
java
@Override public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException { // false for auto-close, since caller has access to the input stream return new WstxEventReader(createEventAllocator(), createSR(null, in, null, true, false)); }
[ "@", "Override", "public", "XMLEventReader", "createXMLEventReader", "(", "InputStream", "in", ")", "throws", "XMLStreamException", "{", "// false for auto-close, since caller has access to the input stream", "return", "new", "WstxEventReader", "(", "createEventAllocator", "(", ...
// // Event reader factory methods
[ "//", "//", "Event", "reader", "factory", "methods" ]
ffcaabdc06672d9564c48c25d601d029b7fd6548
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/stax/WstxInputFactory.java#L267-L274
train
Create an XML Event Reader from an input stream.
Of course, here is the Java code you requested: ```java @Override public XMLEventReader createXMLEventReader(InputStream in) throws XMLStreamException { // false for auto-close, since caller has access to the input stream return new WstxEventReader(createEventAllocator(), crea...
jhy/jsoup
src/main/java/org/jsoup/parser/HtmlTreeBuilder.java
HtmlTreeBuilder.pushActiveFormattingElements
void pushActiveFormattingElements(Element in) { int numSeen = 0; for (int pos = formattingElements.size() -1; pos >= 0; pos--) { Element el = formattingElements.get(pos); if (el == null) // marker break; if (isSameFormattingElement(in, el)) ...
java
void pushActiveFormattingElements(Element in) { int numSeen = 0; for (int pos = formattingElements.size() -1; pos >= 0; pos--) { Element el = formattingElements.get(pos); if (el == null) // marker break; if (isSameFormattingElement(in, el)) ...
[ "void", "pushActiveFormattingElements", "(", "Element", "in", ")", "{", "int", "numSeen", "=", "0", ";", "for", "(", "int", "pos", "=", "formattingElements", ".", "size", "(", ")", "-", "1", ";", "pos", ">=", "0", ";", "pos", "--", ")", "{", "Element...
active formatting elements
[ "active", "formatting", "elements" ]
68ff8cbe7ad847059737a09c567a501a7f1d251f
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/parser/HtmlTreeBuilder.java#L598-L614
train
Pushes a new element into the active formatting elements list.
Of course, here is the Java code you requested: ```java void pushActiveFormattingElements(Element in) { int numSeen = 0; for (int pos = formattingElements.size() -1; pos >= 0; pos--) { Element el = formattingElements.get(pos); if (el == null) // marker break; ...
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/compiler/SemanticServiceImpl.java
SemanticServiceImpl.checkNested
@Override public void checkNested(final Statement statement) throws SemanticWarning { // Ignore non-nested statements if (!statement.hasNestedStatement()) { return; } final RelationshipType relationship = statement.getRelationshipType(); // No relationship? Ignor...
java
@Override public void checkNested(final Statement statement) throws SemanticWarning { // Ignore non-nested statements if (!statement.hasNestedStatement()) { return; } final RelationshipType relationship = statement.getRelationshipType(); // No relationship? Ignor...
[ "@", "Override", "public", "void", "checkNested", "(", "final", "Statement", "statement", ")", "throws", "SemanticWarning", "{", "// Ignore non-nested statements", "if", "(", "!", "statement", ".", "hasNestedStatement", "(", ")", ")", "{", "return", ";", "}", "f...
{@inheritDoc}
[ "{" ]
149f80b1d6eabb15ab15815b6f745b0afa9fd2d3
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/compiler/SemanticServiceImpl.java#L257-L283
train
Check that a nested statement is a nested statement.
Of course, here is the Java code you requested: ```java @Override public void checkNested(final Statement statement) throws SemanticWarning { // Ignore non-nested statements if (!statement.hasNestedStatement()) { return; } final RelationshipType relationship = statement...
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PTBConstituent.java
PTBConstituent.setFormFuncDisc
public void setFormFuncDisc(String v) { if (PTBConstituent_Type.featOkTst && ((PTBConstituent_Type)jcasType).casFeat_formFuncDisc == null) jcasType.jcas.throwFeatMissing("formFuncDisc", "de.julielab.jules.types.PTBConstituent"); jcasType.ll_cas.ll_setStringValue(addr, ((PTBConstituent_Type)jcasType).casFe...
java
public void setFormFuncDisc(String v) { if (PTBConstituent_Type.featOkTst && ((PTBConstituent_Type)jcasType).casFeat_formFuncDisc == null) jcasType.jcas.throwFeatMissing("formFuncDisc", "de.julielab.jules.types.PTBConstituent"); jcasType.ll_cas.ll_setStringValue(addr, ((PTBConstituent_Type)jcasType).casFe...
[ "public", "void", "setFormFuncDisc", "(", "String", "v", ")", "{", "if", "(", "PTBConstituent_Type", ".", "featOkTst", "&&", "(", "(", "PTBConstituent_Type", ")", "jcasType", ")", ".", "casFeat_formFuncDisc", "==", "null", ")", "jcasType", ".", "jcas", ".", ...
setter for formFuncDisc - sets Form/function discrepancies, O @generated @param v value to set into the feature
[ "setter", "for", "formFuncDisc", "-", "sets", "Form", "/", "function", "discrepancies", "O" ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/PTBConstituent.java#L94-L97
train
setter for formFuncDisc - sets
Of course, here is the Java code you requested: ```java public void setFormFuncDisc(String v) { if (PTBConstituent_Type.featOkTst && ((PTBConstituent_Type)jcasType).casFeat_formFuncDisc == null) jcasType.jcas.throwFeatMissing("formFuncDisc", "de.julielab.jules.types.PTBConstituent"); jcasType.ll_cas.ll_s...
EXIficient/exificient
src/main/java/com/siemens/ct/exi/main/api/sax/SAXDecoder.java
SAXDecoder.handleDeferredStartElement
protected void handleDeferredStartElement(EXIBodyDecoder decoder, QNameContext deferredStartElement, final AttributesImpl attributes) throws SAXException, IOException, EXIException { if (namespaces) { List<NamespaceDeclaration> prefixes = decoder .getDeclaredPrefixDeclarations(); if (prefixes...
java
protected void handleDeferredStartElement(EXIBodyDecoder decoder, QNameContext deferredStartElement, final AttributesImpl attributes) throws SAXException, IOException, EXIException { if (namespaces) { List<NamespaceDeclaration> prefixes = decoder .getDeclaredPrefixDeclarations(); if (prefixes...
[ "protected", "void", "handleDeferredStartElement", "(", "EXIBodyDecoder", "decoder", ",", "QNameContext", "deferredStartElement", ",", "final", "AttributesImpl", "attributes", ")", "throws", "SAXException", ",", "IOException", ",", "EXIException", "{", "if", "(", "names...
/* SAX Content Handler
[ "/", "*", "SAX", "Content", "Handler" ]
93c7c0d63d74cfccf6ab1d5041b203745ef9ddb8
https://github.com/EXIficient/exificient/blob/93c7c0d63d74cfccf6ab1d5041b203745ef9ddb8/src/main/java/com/siemens/ct/exi/main/api/sax/SAXDecoder.java#L473-L514
train
Handles a deferred start element.
Of course, here is the Java code you requested: ```java protected void handleDeferredStartElement(EXIBodyDecoder decoder, QNameContext deferredStartElement, final AttributesImpl attributes) throws SAXException, IOException, EXIException { if (namespaces) { List<NamespaceDeclaration> prefixes = decoder...
feroult/yawp
yawp-core/src/main/java/io/yawp/commons/utils/ResourceFinder.java
ResourceFinder.find
public URL find(String uri) throws IOException { String fullUri = path + uri; URL resource = getResource(fullUri); if (resource == null) { throw new IOException("Could not find resource '" + fullUri + "'"); } return resource; }
java
public URL find(String uri) throws IOException { String fullUri = path + uri; URL resource = getResource(fullUri); if (resource == null) { throw new IOException("Could not find resource '" + fullUri + "'"); } return resource; }
[ "public", "URL", "find", "(", "String", "uri", ")", "throws", "IOException", "{", "String", "fullUri", "=", "path", "+", "uri", ";", "URL", "resource", "=", "getResource", "(", "fullUri", ")", ";", "if", "(", "resource", "==", "null", ")", "{", "throw"...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*", "*" ]
b90deb905edd3fdb3009a5525e310cd17ead7f3d
https://github.com/feroult/yawp/blob/b90deb905edd3fdb3009a5525e310cd17ead7f3d/yawp-core/src/main/java/io/yawp/commons/utils/ResourceFinder.java#L113-L122
train
Find a resource in the resource manager.
Of course, here is the Java code you requested: ```java public URL find(String uri) throws IOException { String fullUri = path + uri; URL resource = getResource(fullUri); if (resource == null) { throw new IOException("Could not find resource '" + fullUri + "'"); } ...
iig-uni-freiburg/SEWOL
src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContext.java
ProcessContext.addDataUsageFor
public void addDataUsageFor(String activity, String attribute) throws CompatibilityException { setDataUsageFor(activity, attribute, new HashSet<>(validUsageModes)); }
java
public void addDataUsageFor(String activity, String attribute) throws CompatibilityException { setDataUsageFor(activity, attribute, new HashSet<>(validUsageModes)); }
[ "public", "void", "addDataUsageFor", "(", "String", "activity", ",", "String", "attribute", ")", "throws", "CompatibilityException", "{", "setDataUsageFor", "(", "activity", ",", "attribute", ",", "new", "HashSet", "<>", "(", "validUsageModes", ")", ")", ";", "}...
Adds a data attribute for an activity.<br> The given activity/attributes have to be known by the context, i.e. be contained in the activity/attribute list. @param activity Activity for which the attribute usage is set. @param attribute Attribute used by the given activity. @throws ParameterException @throws Compatibil...
[ "Adds", "a", "data", "attribute", "for", "an", "activity", ".", "<br", ">", "The", "given", "activity", "/", "attributes", "have", "to", "be", "known", "by", "the", "context", "i", ".", "e", ".", "be", "contained", "in", "the", "activity", "/", "attrib...
e791cb07a6e62ecf837d760d58a25f32fbf6bbca
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/src/de/uni/freiburg/iig/telematik/sewol/context/process/ProcessContext.java#L631-L633
train
Add data usage for an activity and attribute.
Of course, here is the Java code you requested: ```java public void addDataUsageFor(String activity, String attribute) throws CompatibilityException { setDataUsageFor(activity, attribute, new HashSet<>(validUsageModes)); } ``` Hope this helps!
zeromq/jeromq
src/main/java/org/zeromq/ZFrame.java
ZFrame.hasSameData
public boolean hasSameData(ZFrame other) { if (other == null) { return false; } if (size() == other.size()) { return Arrays.equals(data, other.data); } return false; }
java
public boolean hasSameData(ZFrame other) { if (other == null) { return false; } if (size() == other.size()) { return Arrays.equals(data, other.data); } return false; }
[ "public", "boolean", "hasSameData", "(", "ZFrame", "other", ")", "{", "if", "(", "other", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "size", "(", ")", "==", "other", ".", "size", "(", ")", ")", "{", "return", "Arrays", ".", "...
Returns true if both frames have byte - for byte identical data @param other The other ZFrame to compare @return True if both ZFrames have same byte-identical data, else false
[ "Returns", "true", "if", "both", "frames", "have", "byte", "-", "for", "byte", "identical", "data" ]
8b4a2960b468d08b7aebb0d40bfb947e08fed040
https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/org/zeromq/ZFrame.java#L218-L228
train
Check if this frame has the same data as another frame.
Of course, here is the Java code you requested: ```java public boolean hasSameData(ZFrame other) { if (other == null) { return false; } if (size() == other.size()) { return Arrays.equals(data, other.data); } return false; } ``` Hope this helps!
knowm/XChange
xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseTradeService.java
CoinbaseTradeService.getTradeHistory
@Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer page = null; Integer limit = null; if (params instanceof TradeHistoryParamPaging) { page = ((TradeHistoryParamPaging) params).getPageNumber() + 1; limit = ((TradeHistoryParamPaging) params).get...
java
@Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer page = null; Integer limit = null; if (params instanceof TradeHistoryParamPaging) { page = ((TradeHistoryParamPaging) params).getPageNumber() + 1; limit = ((TradeHistoryParamPaging) params).get...
[ "@", "Override", "public", "UserTrades", "getTradeHistory", "(", "TradeHistoryParams", "params", ")", "throws", "IOException", "{", "Integer", "page", "=", "null", ";", "Integer", "limit", "=", "null", ";", "if", "(", "params", "instanceof", "TradeHistoryParamPagi...
Authenticated resource which returns the user’s Bitcoin purchases and sells. Sorted in descending order by creation date. @see <a href="https://coinbase.com/api/doc/1.0/transfers/index.html">coinbase.com/api/doc/1.0/transfers/index.html</a>
[ "Authenticated", "resource", "which", "returns", "the", "user’s", "Bitcoin", "purchases", "and", "sells", ".", "Sorted", "in", "descending", "order", "by", "creation", "date", "." ]
e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinbase/src/main/java/org/knowm/xchange/coinbase/service/CoinbaseTradeService.java#L85-L97
train
Override to provide a list of UserTrades for a single market.
Of course, here is the Java code you requested: ```java @Override public UserTrades getTradeHistory(TradeHistoryParams params) throws IOException { Integer page = null; Integer limit = null; if (params instanceof TradeHistoryParamPaging) { page = ((TradeHistoryParamPaging) params).getPageNumber() ...
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/XMLChar.java
XMLChar.isDigit
public static boolean isDigit(int ch) { return (0x0030 <= ch && ch <= 0x0039) || (0x0660 <= ch && ch <= 0x0669) || (0x06F0 <= ch && ch <= 0x06F9) || (0x0966 <= ch && ch <= 0x096F) || (0x09E6 <= ch && ch <= 0x09EF) || (0x0A66 <= ch && ch <= 0x0A6F) || (0x0AE6 <= ch && ch <= 0x0AEF) || (0x0B66 ...
java
public static boolean isDigit(int ch) { return (0x0030 <= ch && ch <= 0x0039) || (0x0660 <= ch && ch <= 0x0669) || (0x06F0 <= ch && ch <= 0x06F9) || (0x0966 <= ch && ch <= 0x096F) || (0x09E6 <= ch && ch <= 0x09EF) || (0x0A66 <= ch && ch <= 0x0A6F) || (0x0AE6 <= ch && ch <= 0x0AEF) || (0x0B66 ...
[ "public", "static", "boolean", "isDigit", "(", "int", "ch", ")", "{", "return", "(", "0x0030", "<=", "ch", "&&", "ch", "<=", "0x0039", ")", "||", "(", "0x0660", "<=", "ch", "&&", "ch", "<=", "0x0669", ")", "||", "(", "0x06F0", "<=", "ch", "&&", "...
Returns true if the specified character is a digit as defined by production [88] in the XML 1.0 specification. @param ch The character to check.
[ "Returns", "true", "if", "the", "specified", "character", "is", "a", "digit", "as", "defined", "by", "production", "[", "88", "]", "in", "the", "XML", "1", ".", "0", "specification", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/xml/XMLChar.java#L172-L179
train
isDigit Method.
Of course, here is the Java code you requested: ```java public static boolean isDigit(int ch) { return (0x0030 <= ch && ch <= 0x0039) || (0x0660 <= ch && ch <= 0x0669) || (0x06F0 <= ch && ch <= 0x06F9) || (0x0966 <= ch && ch <= 0x096F) || (0x09E6 <= ch && ch <= 0x09EF) || (0x0A66 <= ch && ch <= 0x0A6...
apache/flink
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BufferSpiller.java
BufferSpiller.createSpillingChannel
@SuppressWarnings("resource") private void createSpillingChannel() throws IOException { currentSpillFile = new File(tempDir, spillFilePrefix + (fileCounter++) + ".buffer"); currentChannel = new RandomAccessFile(currentSpillFile, "rw").getChannel(); }
java
@SuppressWarnings("resource") private void createSpillingChannel() throws IOException { currentSpillFile = new File(tempDir, spillFilePrefix + (fileCounter++) + ".buffer"); currentChannel = new RandomAccessFile(currentSpillFile, "rw").getChannel(); }
[ "@", "SuppressWarnings", "(", "\"resource\"", ")", "private", "void", "createSpillingChannel", "(", ")", "throws", "IOException", "{", "currentSpillFile", "=", "new", "File", "(", "tempDir", ",", "spillFilePrefix", "+", "(", "fileCounter", "++", ")", "+", "\".bu...
------------------------------------------------------------------------
[ "------------------------------------------------------------------------" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/io/BufferSpiller.java#L253-L257
train
Creates the spilling channel.
Of course, here is the Java code you requested: ```java @SuppressWarnings("resource") private void createSpillingChannel() throws IOException { currentSpillFile = new File(tempDir, spillFilePrefix + (fileCounter++) + ".buffer"); currentChannel = new RandomAccessFile(currentSpillFile, "rw").getChannel(); } ``` H...
alkacon/opencms-core
src/org/opencms/ui/apps/logfile/CmsLogChannelTable.java
CmsLogChannelTable.updateLevel
private void updateLevel() { @SuppressWarnings("unchecked") List<Logger> logger = (List<Logger>)m_container.getItemIds(); for (Logger item : logger) { m_container.getItem(item).getItemProperty(TableColumn.Level).setValue(LoggerLevel.fromLogger(item)); } resetPageBuf...
java
private void updateLevel() { @SuppressWarnings("unchecked") List<Logger> logger = (List<Logger>)m_container.getItemIds(); for (Logger item : logger) { m_container.getItem(item).getItemProperty(TableColumn.Level).setValue(LoggerLevel.fromLogger(item)); } resetPageBuf...
[ "private", "void", "updateLevel", "(", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "List", "<", "Logger", ">", "logger", "=", "(", "List", "<", "Logger", ">", ")", "m_container", ".", "getItemIds", "(", ")", ";", "for", "(", "Logger", ...
Updates table after change of Level.<p>
[ "Updates", "table", "after", "change", "of", "Level", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/logfile/CmsLogChannelTable.java#L689-L700
train
Update the level of all loggers.
Of course, here is the Java code you requested: ```java private void updateLevel() { @SuppressWarnings("unchecked") List<Logger> logger = (List<Logger>)m_container.getItemIds(); for (Logger item : logger) { m_container.getItem(item).getItemProperty(TableColumn.Level).setValue(Logg...
simpligility/android-maven-plugin
src/main/java/com/simpligility/maven/plugins/android/PluginInfo.java
PluginInfo.getGAV
public static String getGAV() { StringBuilder builder = new StringBuilder() .append( groupId ) .append( COLON ) .append( artifactId ) .append( COLON ) .append( version ); return builder.toString(); }
java
public static String getGAV() { StringBuilder builder = new StringBuilder() .append( groupId ) .append( COLON ) .append( artifactId ) .append( COLON ) .append( version ); return builder.toString(); }
[ "public", "static", "String", "getGAV", "(", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ".", "append", "(", "groupId", ")", ".", "append", "(", "COLON", ")", ".", "append", "(", "artifactId", ")", ".", "append", "(", "...
Get the Maven GAV string of the plugin. @return
[ "Get", "the", "Maven", "GAV", "string", "of", "the", "plugin", "." ]
4d54d38b03bd3601bc25ab314719626a623da460
https://github.com/simpligility/android-maven-plugin/blob/4d54d38b03bd3601bc25ab314719626a623da460/src/main/java/com/simpligility/maven/plugins/android/PluginInfo.java#L51-L60
valid
Get the GAV version of the CBE file.
Of course, here is the Java code you requested: ```java public static String getGAV() { StringBuilder builder = new StringBuilder() .append( groupId ) .append( COLON ) .append( artifactId ) .append( COLON ) .append( version ); return builder.toString(); } ``` Hope this help...
linkedin/dexmaker
dexmaker-mockito-inline-extended/src/main/java/com/android/dx/mockito/inline/extended/StaticMockitoSession.java
StaticMockitoSession.mockStatic
<T> void mockStatic(StaticMocking<T> mocking) { if (ExtendedMockito.staticMockMarker(mocking.clazz) != null) { throw new IllegalArgumentException(mocking.clazz + " is already mocked"); } mockingInProgressClass.set(mocking.clazz); try { classToMarker.put(mocking.c...
java
<T> void mockStatic(StaticMocking<T> mocking) { if (ExtendedMockito.staticMockMarker(mocking.clazz) != null) { throw new IllegalArgumentException(mocking.clazz + " is already mocked"); } mockingInProgressClass.set(mocking.clazz); try { classToMarker.put(mocking.c...
[ "<", "T", ">", "void", "mockStatic", "(", "StaticMocking", "<", "T", ">", "mocking", ")", "{", "if", "(", "ExtendedMockito", ".", "staticMockMarker", "(", "mocking", ".", "clazz", ")", "!=", "null", ")", "{", "throw", "new", "IllegalArgumentException", "("...
Init mocking for a class. @param mocking Description and settings of the mocking @param <T> The class to mock
[ "Init", "mocking", "for", "a", "class", "." ]
c58ffebcbb2564c7d1fa6fb58b48f351c330296d
https://github.com/linkedin/dexmaker/blob/c58ffebcbb2564c7d1fa6fb58b48f351c330296d/dexmaker-mockito-inline-extended/src/main/java/com/android/dx/mockito/inline/extended/StaticMockitoSession.java#L91-L104
train
Mock static methods.
Of course, here is the Java code you requested: ```java <T> void mockStatic(StaticMocking<T> mocking) { if (ExtendedMockito.staticMockMarker(mocking.clazz) != null) { throw new IllegalArgumentException(mocking.clazz + " is already mocked"); } mockingInProgressClass.set(mocking.claz...
h2oai/h2o-3
h2o-genmodel/src/main/java/hex/genmodel/utils/StringEscapeUtils.java
StringEscapeUtils.escapeNewlines
public static String escapeNewlines(String str) { final int len = str.length(); StringWriter out = new StringWriter(len * 2); for (int i = 0; i < len; i++) { char c = str.charAt(i); switch (c) { case '\\': out.write('\\'); out.write('\\'); break; cas...
java
public static String escapeNewlines(String str) { final int len = str.length(); StringWriter out = new StringWriter(len * 2); for (int i = 0; i < len; i++) { char c = str.charAt(i); switch (c) { case '\\': out.write('\\'); out.write('\\'); break; cas...
[ "public", "static", "String", "escapeNewlines", "(", "String", "str", ")", "{", "final", "int", "len", "=", "str", ".", "length", "(", ")", ";", "StringWriter", "out", "=", "new", "StringWriter", "(", "len", "*", "2", ")", ";", "for", "(", "int", "i"...
Escapes new line characters of a given string. It also escapes the forward slash characters. @param str string to be escaped @return escaped string
[ "Escapes", "new", "line", "characters", "of", "a", "given", "string", ".", "It", "also", "escapes", "the", "forward", "slash", "characters", "." ]
845eb49dfeaadf638b6e2f779d82fac996391fad
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-genmodel/src/main/java/hex/genmodel/utils/StringEscapeUtils.java#L13-L32
train
Escape newlines in a string.
Of course, here is the Java code you requested: ```java public static String escapeNewlines(String str) { final int len = str.length(); StringWriter out = new StringWriter(len * 2); for (int i = 0; i < len; i++) { char c = str.charAt(i); switch (c) { case '\\': out.write('\\')...
mcxiaoke/Android-Next
core/src/main/java/com/mcxiaoke/next/utils/BitmapUtils.java
BitmapUtils.rotate
public static Bitmap rotate(Bitmap bmp, float angle) { Matrix matrixRotateLeft = new Matrix(); matrixRotateLeft.setRotate(angle); return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrixRotateLeft, true); }
java
public static Bitmap rotate(Bitmap bmp, float angle) { Matrix matrixRotateLeft = new Matrix(); matrixRotateLeft.setRotate(angle); return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrixRotateLeft, true); }
[ "public", "static", "Bitmap", "rotate", "(", "Bitmap", "bmp", ",", "float", "angle", ")", "{", "Matrix", "matrixRotateLeft", "=", "new", "Matrix", "(", ")", ";", "matrixRotateLeft", ".", "setRotate", "(", "angle", ")", ";", "return", "Bitmap", ".", "create...
旋转图片 @param bmp 原始图片 @param angle 旋转的角度 @return
[ "旋转图片" ]
1bfdf99d0b81a849aa0fa6697c53ed673151ca39
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/utils/BitmapUtils.java#L52-L56
train
Rotate a bitmap
Of course, here is the Java code you requested: ```java public static Bitmap rotate(Bitmap bmp, float angle) { Matrix matrixRotateLeft = new Matrix(); matrixRotateLeft.setRotate(angle); return Bitmap.createBitmap(bmp, 0, 0, bmp.getWidth(), bmp.getHeight(), matrixRotateLeft, true); } ``` Ho...
wilkenstein/redis-mock-java
src/main/java/org/rarefiedredis/redis/RedisMockClient.java
RedisMockClient.append
@Override public Long append(final String key, final String value) throws WrongTypeException { return redisMock.append(key, value); }
java
@Override public Long append(final String key, final String value) throws WrongTypeException { return redisMock.append(key, value); }
[ "@", "Override", "public", "Long", "append", "(", "final", "String", "key", ",", "final", "String", "value", ")", "throws", "WrongTypeException", "{", "return", "redisMock", ".", "append", "(", "key", ",", "value", ")", ";", "}" ]
/* IRedisString implementations
[ "/", "*", "IRedisString", "implementations" ]
35a73f0d1b9f7401ecd4eaa58d40e59c8dd8a28e
https://github.com/wilkenstein/redis-mock-java/blob/35a73f0d1b9f7401ecd4eaa58d40e59c8dd8a28e/src/main/java/org/rarefiedredis/redis/RedisMockClient.java#L60-L62
train
append to a cache
Of course, here is the Java code you requested: ```java @Override public Long append(final String key, final String value) throws WrongTypeException { return redisMock.append(key, value); } ``` Hope this helps!
jamesagnew/hapi-fhir
hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java
IniFile.getTimestampProperty
public Date getTimestampProperty(String pstrSection, String pstrProp) { Timestamp tsRet = null; Date dtTmp = null; String strVal = null; DateFormat dtFmt = null; INIProperty objProp = null; INISection objSec = null; objSec = (...
java
public Date getTimestampProperty(String pstrSection, String pstrProp) { Timestamp tsRet = null; Date dtTmp = null; String strVal = null; DateFormat dtFmt = null; INIProperty objProp = null; INISection objSec = null; objSec = (...
[ "public", "Date", "getTimestampProperty", "(", "String", "pstrSection", ",", "String", "pstrProp", ")", "{", "Timestamp", "tsRet", "=", "null", ";", "Date", "dtTmp", "=", "null", ";", "String", "strVal", "=", "null", ";", "DateFormat", "dtFmt", "=", "null", ...
Returns the specified date property from the specified section. @param pstrSection the INI section name. @param pstrProp the property to be retrieved. @return the date property value.
[ "Returns", "the", "specified", "date", "property", "from", "the", "specified", "section", "." ]
150a84d52fe691b7f48fcb28247c4bddb7aec352
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L333-L369
train
Gets the TimestampProperty method.
Of course, here is the Java code you requested: ```java public Date getTimestampProperty(String pstrSection, String pstrProp) { Timestamp tsRet = null; Date dtTmp = null; String strVal = null; DateFormat dtFmt = null; INIProperty objProp = null; ...
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
PendingChangesLog.getRandomAccessFile
public RandomAccessFile getRandomAccessFile(FixupStream fs) throws IOException { int i = 0; try { for (i = 0; i < listFixupStream.size(); i++) if (this.listFixupStream.get(i).compare(fs)) return listRandomAccessFile.get(i); } catch (IndexOutOfBoundsEx...
java
public RandomAccessFile getRandomAccessFile(FixupStream fs) throws IOException { int i = 0; try { for (i = 0; i < listFixupStream.size(); i++) if (this.listFixupStream.get(i).compare(fs)) return listRandomAccessFile.get(i); } catch (IndexOutOfBoundsEx...
[ "public", "RandomAccessFile", "getRandomAccessFile", "(", "FixupStream", "fs", ")", "throws", "IOException", "{", "int", "i", "=", "0", ";", "try", "{", "for", "(", "i", "=", "0", ";", "i", "<", "listFixupStream", ".", "size", "(", ")", ";", "i", "++",...
getRandomAccessFile. @param fs the FixupStream @return RandomAccessFile return the RandomAccessFile by FixupStream @throws IOException will be generated the IOException
[ "getRandomAccessFile", "." ]
3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java#L414-L457
train
getRandomAccessFile Method.
Of course, here is the Java code you requested: ```java public RandomAccessFile getRandomAccessFile(FixupStream fs) throws IOException { int i = 0; try { for (i = 0; i < listFixupStream.size(); i++) if (this.listFixupStream.get(i).compare(fs)) return listRandomA...
ontop/ontop
engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/TreeWitness.java
TreeWitness.getGeneratorSubConcepts
public Set<ClassExpression> getGeneratorSubConcepts() { if (gens.size() == 1) return gens.iterator().next().getSubConcepts(); Set<ClassExpression> all = new HashSet<ClassExpression>(); for (TreeWitnessGenerator twg : gens) all.addAll(twg.getSubConcepts()); return all; }
java
public Set<ClassExpression> getGeneratorSubConcepts() { if (gens.size() == 1) return gens.iterator().next().getSubConcepts(); Set<ClassExpression> all = new HashSet<ClassExpression>(); for (TreeWitnessGenerator twg : gens) all.addAll(twg.getSubConcepts()); return all; }
[ "public", "Set", "<", "ClassExpression", ">", "getGeneratorSubConcepts", "(", ")", "{", "if", "(", "gens", ".", "size", "(", ")", "==", "1", ")", "return", "gens", ".", "iterator", "(", ")", ".", "next", "(", ")", ".", "getSubConcepts", "(", ")", ";"...
getGeneratorSubConcepts @return the set of all sub-concepts for all of the tree witness generators
[ "getGeneratorSubConcepts" ]
ddf78b26981b6129ee9a1a59310016830f5352e4
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/core/src/main/java/it/unibz/inf/ontop/answering/reformulation/rewriting/impl/TreeWitness.java#L131-L139
train
Returns the sub concepts of the generators.
Of course, here is the Java code you requested: ```java public Set<ClassExpression> getGeneratorSubConcepts() { if (gens.size() == 1) return gens.iterator().next().getSubConcepts(); Set<ClassExpression> all = new HashSet<ClassExpression>(); for (TreeWitnessGenerator twg : gens) all.addAll(twg.getSubC...
aws/aws-sdk-java
aws-java-sdk-chime/src/main/java/com/amazonaws/services/chime/model/BatchSuspendUserResult.java
BatchSuspendUserResult.withUserErrors
public BatchSuspendUserResult withUserErrors(UserError... userErrors) { if (this.userErrors == null) { setUserErrors(new java.util.ArrayList<UserError>(userErrors.length)); } for (UserError ele : userErrors) { this.userErrors.add(ele); } return this; }
java
public BatchSuspendUserResult withUserErrors(UserError... userErrors) { if (this.userErrors == null) { setUserErrors(new java.util.ArrayList<UserError>(userErrors.length)); } for (UserError ele : userErrors) { this.userErrors.add(ele); } return this; }
[ "public", "BatchSuspendUserResult", "withUserErrors", "(", "UserError", "...", "userErrors", ")", "{", "if", "(", "this", ".", "userErrors", "==", "null", ")", "{", "setUserErrors", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "UserError", ">", "(...
<p> If the <a>BatchSuspendUser</a> action fails for one or more of the user IDs in the request, a list of the user IDs is returned, along with error codes and error messages. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setUserErrors(java.util.Collection)} or {@link #w...
[ "<p", ">", "If", "the", "<a", ">", "BatchSuspendUser<", "/", "a", ">", "action", "fails", "for", "one", "or", "more", "of", "the", "user", "IDs", "in", "the", "request", "a", "list", "of", "the", "user", "IDs", "is", "returned", "along", "with", "err...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-chime/src/main/java/com/amazonaws/services/chime/model/BatchSuspendUserResult.java#L85-L93
train
A list of UserErrors that occurred during the suspend of a user.
Of course, here is the Java code you requested: ```java public BatchSuspendUserResult withUserErrors(UserError... userErrors) { if (this.userErrors == null) { setUserErrors(new java.util.ArrayList<UserError>(userErrors.length)); } for (UserError ele : userErrors) { this....
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConBox.java
ConBox.modificationConstraint
public static Constraint modificationConstraint(String modifTerm) { return new FieldOfMultiple(new MappedConst(new LinkedPE(LinkedPE.Type.TO_SPECIFIC), 0), "PhysicalEntity/feature:ModificationFeature/modificationType/term", Field.Operation.INTERSECT, modifTerm); }
java
public static Constraint modificationConstraint(String modifTerm) { return new FieldOfMultiple(new MappedConst(new LinkedPE(LinkedPE.Type.TO_SPECIFIC), 0), "PhysicalEntity/feature:ModificationFeature/modificationType/term", Field.Operation.INTERSECT, modifTerm); }
[ "public", "static", "Constraint", "modificationConstraint", "(", "String", "modifTerm", ")", "{", "return", "new", "FieldOfMultiple", "(", "new", "MappedConst", "(", "new", "LinkedPE", "(", "LinkedPE", ".", "Type", ".", "TO_SPECIFIC", ")", ",", "0", ")", ",", ...
Makes sure that the PhysicalEntity or any linked PE contains the modification term. Size = 1. @param modifTerm term to check @return constraint to filter out PhysicalEntity not associated to a modification term
[ "Makes", "sure", "that", "the", "PhysicalEntity", "or", "any", "linked", "PE", "contains", "the", "modification", "term", ".", "Size", "=", "1", "." ]
2f93afa94426bf8b5afc2e0e61cd4b269a83288d
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConBox.java#L498-L503
train
Create a constraint that will check if the given modification term is a valid modification term.
Of course, here is the Java code you requested: ```java public static Constraint modificationConstraint(String modifTerm) { return new FieldOfMultiple(new MappedConst(new LinkedPE(LinkedPE.Type.TO_SPECIFIC), 0), "PhysicalEntity/feature:ModificationFeature/modificationType/term", Field.Operation.INTERSECT, mod...
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.el.3.0/src/javax/el/ExpressionFactory.java
ExpressionFactory.discoverClassName
private static String discoverClassName(ClassLoader tccl) { String className = null; // First services API className = getClassNameServices(tccl); if (className == null) { if (IS_SECURITY_ENABLED) { className = AccessController.doPrivileged( ...
java
private static String discoverClassName(ClassLoader tccl) { String className = null; // First services API className = getClassNameServices(tccl); if (className == null) { if (IS_SECURITY_ENABLED) { className = AccessController.doPrivileged( ...
[ "private", "static", "String", "discoverClassName", "(", "ClassLoader", "tccl", ")", "{", "String", "className", "=", "null", ";", "// First services API", "className", "=", "getClassNameServices", "(", "tccl", ")", ";", "if", "(", "className", "==", "null", ")"...
Discover the name of class that implements ExpressionFactory. @param tccl {@code ClassLoader} @return Class name. There is default, so it is never {@code null}.
[ "Discover", "the", "name", "of", "class", "that", "implements", "ExpressionFactory", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.el.3.0/src/javax/el/ExpressionFactory.java#L364-L404
train
Get the class name from the class loader.
Of course, here is the Java code you requested: ```java private static String discoverClassName(ClassLoader tccl) { String className = null; // First services API className = getClassNameServices(tccl); if (className == null) { if (IS_SECURITY_ENABLED) { cla...
biezhi/anima
src/main/java/io/github/biezhi/anima/core/AnimaQuery.java
AnimaQuery.and
public <R> AnimaQuery<T> and(TypeFunction<T, R> function) { return this.where(function); }
java
public <R> AnimaQuery<T> and(TypeFunction<T, R> function) { return this.where(function); }
[ "public", "<", "R", ">", "AnimaQuery", "<", "T", ">", "and", "(", "TypeFunction", "<", "T", ",", "R", ">", "function", ")", "{", "return", "this", ".", "where", "(", "function", ")", ";", "}" ]
generate AND statement with lambda @param function column name with lambda @param <R> @return AnimaQuery
[ "generate", "AND", "statement", "with", "lambda" ]
d6655e47ac4c08d9d7f961ac0569062bead8b1ed
https://github.com/biezhi/anima/blob/d6655e47ac4c08d9d7f961ac0569062bead8b1ed/src/main/java/io/github/biezhi/anima/core/AnimaQuery.java#L305-L307
train
generate and statement with type function
Of course, here is the Java code you requested: ```java public <R> AnimaQuery<T> and(TypeFunction<T, R> function) { return this.where(function); } ``` Hope this helps!
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java
Subtypes2.addInheritanceEdge
private void addInheritanceEdge(ClassVertex vertex, ClassDescriptor superclassDescriptor, boolean isInterfaceEdge, @CheckForNull LinkedList<XClass> workList) { if (superclassDescriptor == null) { return; } ClassVertex superclassVertex = classDescriptorToVertexMap.get(sup...
java
private void addInheritanceEdge(ClassVertex vertex, ClassDescriptor superclassDescriptor, boolean isInterfaceEdge, @CheckForNull LinkedList<XClass> workList) { if (superclassDescriptor == null) { return; } ClassVertex superclassVertex = classDescriptorToVertexMap.get(sup...
[ "private", "void", "addInheritanceEdge", "(", "ClassVertex", "vertex", ",", "ClassDescriptor", "superclassDescriptor", ",", "boolean", "isInterfaceEdge", ",", "@", "CheckForNull", "LinkedList", "<", "XClass", ">", "workList", ")", "{", "if", "(", "superclassDescriptor...
Add supertype edge to the InheritanceGraph. @param vertex source ClassVertex (subtype) @param superclassDescriptor ClassDescriptor of a direct supertype @param isInterfaceEdge true if supertype is (as far as we know) an interface @param workList work list of ClassVertexes that need to have their supertype edges added ...
[ "Add", "supertype", "edge", "to", "the", "InheritanceGraph", "." ]
f6365c6eea6515035bded38efa4a7c8b46ccf28c
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/ch/Subtypes2.java#L1335-L1371
train
Add an edge between a class vertex and a superclass.
Of course, here is the Java code you requested: ```java private void addInheritanceEdge(ClassVertex vertex, ClassDescriptor superclassDescriptor, boolean isInterfaceEdge, @CheckForNull LinkedList<XClass> workList) { if (superclassDescriptor == null) { return; } ClassVer...
banq/jdonframework
src/main/java/com/jdon/controller/WebAppUtil.java
WebAppUtil.callService
public static Object callService(String serviceName, String methodName, Object[] methodParams, HttpServletRequest request) throws Exception { Debug.logVerbose("[JdonFramework] call the method: " + methodName + " for the service: " + serviceName, module); Object result = null; try { MethodMetaArgs methodMet...
java
public static Object callService(String serviceName, String methodName, Object[] methodParams, HttpServletRequest request) throws Exception { Debug.logVerbose("[JdonFramework] call the method: " + methodName + " for the service: " + serviceName, module); Object result = null; try { MethodMetaArgs methodMet...
[ "public", "static", "Object", "callService", "(", "String", "serviceName", ",", "String", "methodName", ",", "Object", "[", "]", "methodParams", ",", "HttpServletRequest", "request", ")", "throws", "Exception", "{", "Debug", ".", "logVerbose", "(", "\"[JdonFramewo...
Command pattern for service invoke sample: browser url: /aaa.do?method=xxxxx xxxxx is the service's method, such as: public interface TestService{ void xxxxx(EventModel em); } @see com.jdon.strutsutil.ServiceMethodAction @param serviceName the service name in jdonframework.xml @param methodName the method name @par...
[ "Command", "pattern", "for", "service", "invoke", "sample", ":", "browser", "url", ":", "/", "aaa", ".", "do?method", "=", "xxxxx" ]
72b451caac04f775e57f52aaed3d8775044ead53
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/controller/WebAppUtil.java#L185-L201
train
call service method
Of course, here is the Java code you requested: ```java public static Object callService(String serviceName, String methodName, Object[] methodParams, HttpServletRequest request) throws Exception { Debug.logVerbose("[JdonFramework] call the method: " + methodName + " for the service: " + serviceName, module); Ob...
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/models/RetryStrategy.java
RetryStrategy.invokeRetry
public <T> T invokeRetry( Callable<T> invoker ) throws CStorageException { int currentTries = 0; while ( true ) { currentTries++; try { if ( currentTries > 1 ) { LOGGER.debug( "Invocation #{}/{}", currentTries, nbTriesMax ); ...
java
public <T> T invokeRetry( Callable<T> invoker ) throws CStorageException { int currentTries = 0; while ( true ) { currentTries++; try { if ( currentTries > 1 ) { LOGGER.debug( "Invocation #{}/{}", currentTries, nbTriesMax ); ...
[ "public", "<", "T", ">", "T", "invokeRetry", "(", "Callable", "<", "T", ">", "invoker", ")", "throws", "CStorageException", "{", "int", "currentTries", "=", "0", ";", "while", "(", "true", ")", "{", "currentTries", "++", ";", "try", "{", "if", "(", "...
Main method to be called by user of this class : calls {@link Callable#call()} until success, non retriable error or max trials has been reached. @param <T> The request result type @param invoker The request invoker which execute and validate the request @return The request result @throws CStorageException Request exe...
[ "Main", "method", "to", "be", "called", "by", "user", "of", "this", "class", ":", "calls", "{", "@link", "Callable#call", "()", "}", "until", "success", "non", "retriable", "error", "or", "max", "trials", "has", "been", "reached", "." ]
20691e52e144014f99ca75cb7dedc7ba0c18586c
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/models/RetryStrategy.java#L50-L85
train
Invoke a Callable with retries.
Of course, here is the Java code you requested: ```java public <T> T invokeRetry( Callable<T> invoker ) throws CStorageException { int currentTries = 0; while ( true ) { currentTries++; try { if ( currentTries > 1 ) { LOGGER...
mcxiaoke/Android-Next
core/src/main/java/com/mcxiaoke/next/io/BoundedInputStream.java
BoundedInputStream.read
@Override public int read() throws IOException { if (max >= 0 && pos >= max) { return -1; } int result = in.read(); pos++; return result; }
java
@Override public int read() throws IOException { if (max >= 0 && pos >= max) { return -1; } int result = in.read(); pos++; return result; }
[ "@", "Override", "public", "int", "read", "(", ")", "throws", "IOException", "{", "if", "(", "max", ">=", "0", "&&", "pos", ">=", "max", ")", "{", "return", "-", "1", ";", "}", "int", "result", "=", "in", ".", "read", "(", ")", ";", "pos", "++"...
Invokes the delegate's <code>read()</code> method if the current position is less than the limit. @return the byte read or -1 if the end of stream or the limit has been reached. @throws java.io.IOException if an I/O error occurs
[ "Invokes", "the", "delegate", "s", "<code", ">", "read", "()", "<", "/", "code", ">", "method", "if", "the", "current", "position", "is", "less", "than", "the", "limit", "." ]
1bfdf99d0b81a849aa0fa6697c53ed673151ca39
https://github.com/mcxiaoke/Android-Next/blob/1bfdf99d0b81a849aa0fa6697c53ed673151ca39/core/src/main/java/com/mcxiaoke/next/io/BoundedInputStream.java#L140-L148
train
Reads a value.
Of course, here is the Java code you requested: ```java @Override public int read() throws IOException { if (max >= 0 && pos >= max) { return -1; } int result = in.read(); pos++; return result; } ``` Hope this helps!
lastaflute/lastaflute
src/main/java/org/lastaflute/web/servlet/request/SimpleResponseManager.java
SimpleResponseManager.initialize
@PostConstruct public void initialize() { final FwWebDirection direction = assistWebDirection(); final ResponseHandlingProvider provider = direction.assistResponseHandlingProvider(); if (provider != null) { responseWritePerformerCreator = provider.provideResponseWritePerformerCre...
java
@PostConstruct public void initialize() { final FwWebDirection direction = assistWebDirection(); final ResponseHandlingProvider provider = direction.assistResponseHandlingProvider(); if (provider != null) { responseWritePerformerCreator = provider.provideResponseWritePerformerCre...
[ "@", "PostConstruct", "public", "void", "initialize", "(", ")", "{", "final", "FwWebDirection", "direction", "=", "assistWebDirection", "(", ")", ";", "final", "ResponseHandlingProvider", "provider", "=", "direction", ".", "assistResponseHandlingProvider", "(", ")", ...
Initialize this component. <br> This is basically called by DI setting file.
[ "Initialize", "this", "component", ".", "<br", ">", "This", "is", "basically", "called", "by", "DI", "setting", "file", "." ]
17b56dda8322e4c6d79043532c1dda917d6b60a8
https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/web/servlet/request/SimpleResponseManager.java#L82-L92
train
Initialize the application.
Of course, here is the Java code you requested: ```java @PostConstruct public void initialize() { final FwWebDirection direction = assistWebDirection(); final ResponseHandlingProvider provider = direction.assistResponseHandlingProvider(); if (provider != null) { responseWritePer...
jbundle/jbundle
base/message/core/src/main/java/org/jbundle/base/message/core/trx/TrxMessageHeader.java
TrxMessageHeader.get
public Object get(String strKey) { Object objData = super.get(strKey); if (objData == null) if (m_mapMessageHeader != null) objData = m_mapMessageHeader.get(strKey); if (objData == null) if (m_mapMessageInfo != null) objData = m_mapMess...
java
public Object get(String strKey) { Object objData = super.get(strKey); if (objData == null) if (m_mapMessageHeader != null) objData = m_mapMessageHeader.get(strKey); if (objData == null) if (m_mapMessageInfo != null) objData = m_mapMess...
[ "public", "Object", "get", "(", "String", "strKey", ")", "{", "Object", "objData", "=", "super", ".", "get", "(", "strKey", ")", ";", "if", "(", "objData", "==", "null", ")", "if", "(", "m_mapMessageHeader", "!=", "null", ")", "objData", "=", "m_mapMes...
Return the state of this object as a properties object. @param strKey The key to return. @return The properties.
[ "Return", "the", "state", "of", "this", "object", "as", "a", "properties", "object", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/core/src/main/java/org/jbundle/base/message/core/trx/TrxMessageHeader.java#L252-L265
train
Get the value for this key in the record.
Of course, here is the Java code you requested: ```java public Object get(String strKey) { Object objData = super.get(strKey); if (objData == null) if (m_mapMessageHeader != null) objData = m_mapMessageHeader.get(strKey); if (objData == null) if (m_ma...
alkacon/opencms-core
src/org/opencms/newsletter/CmsNewsletterDistributor.java
CmsNewsletterDistributor.distribute
public void distribute(CmsObject cms, List<I_CmsNewsletterRecipient> recipients, I_CmsNewsletter newsletter) { Iterator<I_CmsNewsletterRecipient> recipientsIterator = recipients.iterator(); while (recipientsIterator.hasNext()) { I_CmsNewsletterRecipient recipient = recipientsIterator.next()...
java
public void distribute(CmsObject cms, List<I_CmsNewsletterRecipient> recipients, I_CmsNewsletter newsletter) { Iterator<I_CmsNewsletterRecipient> recipientsIterator = recipients.iterator(); while (recipientsIterator.hasNext()) { I_CmsNewsletterRecipient recipient = recipientsIterator.next()...
[ "public", "void", "distribute", "(", "CmsObject", "cms", ",", "List", "<", "I_CmsNewsletterRecipient", ">", "recipients", ",", "I_CmsNewsletter", "newsletter", ")", "{", "Iterator", "<", "I_CmsNewsletterRecipient", ">", "recipientsIterator", "=", "recipients", ".", ...
Sends a {@link I_CmsNewsletter} to a list of {@link I_CmsNewsletterRecipient} objects.<p> @param recipients a list of CmsNewsletterRecipient objects @param newsletter the newsletter to be distributed @param cms the CmsObject
[ "Sends", "a", "{", "@link", "I_CmsNewsletter", "}", "to", "a", "list", "of", "{", "@link", "I_CmsNewsletterRecipient", "}", "objects", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/newsletter/CmsNewsletterDistributor.java#L62-L75
train
Distribute the mails to the given recipients.
Of course, here is the Java code you requested: ```java public void distribute(CmsObject cms, List<I_CmsNewsletterRecipient> recipients, I_CmsNewsletter newsletter) { Iterator<I_CmsNewsletterRecipient> recipientsIterator = recipients.iterator(); while (recipientsIterator.hasNext()) { I_Cms...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/ConversationState.java
ConversationState.removeObject
public synchronized Object removeObject(int objectIndex) throws IndexOutOfBoundsException, NoSuchElementException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "removeObject", Integer.valueOf(objectIndex)); if ((objectIndex ...
java
public synchronized Object removeObject(int objectIndex) throws IndexOutOfBoundsException, NoSuchElementException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "removeObject", Integer.valueOf(objectIndex)); if ((objectIndex ...
[ "public", "synchronized", "Object", "removeObject", "(", "int", "objectIndex", ")", "throws", "IndexOutOfBoundsException", ",", "NoSuchElementException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ...
removeObject - remove an object from the object store. @param objectIndex An integer value that identifies the location of the object in the object store. @return Returns the object that was in that position @throws IndexOutOfBoundsException @throws NoSuchElementException
[ "removeObject", "-", "remove", "an", "object", "from", "the", "object", "store", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/ConversationState.java#L444-L508
train
Removes an object from the object table.
Of course, here is the Java code you requested: ```java public synchronized Object removeObject(int objectIndex) throws IndexOutOfBoundsException, NoSuchElementException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "removeObject", ...
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/ArrayMatrix.java
ArrayMatrix.getRow
public double[] getRow(int row) { checkIndices(row, 0); double[] rowArr = new double[cols]; int index = getIndex(row, 0); for (int i = 0; i < cols; ++i) rowArr[i] = matrix[index++]; return rowArr; }
java
public double[] getRow(int row) { checkIndices(row, 0); double[] rowArr = new double[cols]; int index = getIndex(row, 0); for (int i = 0; i < cols; ++i) rowArr[i] = matrix[index++]; return rowArr; }
[ "public", "double", "[", "]", "getRow", "(", "int", "row", ")", "{", "checkIndices", "(", "row", ",", "0", ")", ";", "double", "[", "]", "rowArr", "=", "new", "double", "[", "cols", "]", ";", "int", "index", "=", "getIndex", "(", "row", ",", "0",...
{@inheritDoc}
[ "{" ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/ArrayMatrix.java#L178-L186
train
Gets the row of the image as double array.
Of course, here is the Java code you requested: ```java public double[] getRow(int row) { checkIndices(row, 0); double[] rowArr = new double[cols]; int index = getIndex(row, 0); for (int i = 0; i < cols; ++i) rowArr[i] = matrix[index++]; return rowArr; } ``` Ho...
baratine/baratine
web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java
EnvironmentLogger.getAssignedLevel
private Level getAssignedLevel(ClassLoader loader) { Level level = null; if (_localLevel != null) { return _localLevel.get(loader); } return null; }
java
private Level getAssignedLevel(ClassLoader loader) { Level level = null; if (_localLevel != null) { return _localLevel.get(loader); } return null; }
[ "private", "Level", "getAssignedLevel", "(", "ClassLoader", "loader", ")", "{", "Level", "level", "=", "null", ";", "if", "(", "_localLevel", "!=", "null", ")", "{", "return", "_localLevel", ".", "get", "(", "loader", ")", ";", "}", "return", "null", ";"...
Returns the most specific assigned level for the given classloader, i.e. children override parents.
[ "Returns", "the", "most", "specific", "assigned", "level", "for", "the", "given", "classloader", "i", ".", "e", ".", "children", "override", "parents", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/web/src/main/java/com/caucho/v5/log/impl/EnvironmentLogger.java#L747-L756
train
Gets the assigned level.
Of course, here is the Java code you requested: ```java private Level getAssignedLevel(ClassLoader loader) { Level level = null; if (_localLevel != null) { return _localLevel.get(loader); } return null; } ``` Hope this helps!
OpenVidu/openvidu
openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java
MediaEndpoint.registerElemErrListener
protected ListenerSubscription registerElemErrListener(MediaElement element) { return element.addErrorListener(new EventListener<ErrorEvent>() { @Override public void onEvent(ErrorEvent event) { owner.sendMediaError(event); } }); }
java
protected ListenerSubscription registerElemErrListener(MediaElement element) { return element.addErrorListener(new EventListener<ErrorEvent>() { @Override public void onEvent(ErrorEvent event) { owner.sendMediaError(event); } }); }
[ "protected", "ListenerSubscription", "registerElemErrListener", "(", "MediaElement", "element", ")", "{", "return", "element", ".", "addErrorListener", "(", "new", "EventListener", "<", "ErrorEvent", ">", "(", ")", "{", "@", "Override", "public", "void", "onEvent", ...
Registers a listener for when the {@link MediaElement} triggers an {@link ErrorEvent}. Notifies the owner with the error. @param element the {@link MediaElement} @return {@link ListenerSubscription} that can be used to deregister the listener
[ "Registers", "a", "listener", "for", "when", "the", "{", "@link", "MediaElement", "}", "triggers", "an", "{", "@link", "ErrorEvent", "}", ".", "Notifies", "the", "owner", "with", "the", "error", "." ]
89db47dd37949ceab29e5228371a8fcab04d8d55
https://github.com/OpenVidu/openvidu/blob/89db47dd37949ceab29e5228371a8fcab04d8d55/openvidu-server/src/main/java/io/openvidu/server/kurento/endpoint/MediaEndpoint.java#L319-L326
train
Registers an error listener for the given media element.
Of course, here is the Java code you requested: ```java protected ListenerSubscription registerElemErrListener(MediaElement element) { return element.addErrorListener(new EventListener<ErrorEvent>() { @Override public void onEvent(ErrorEvent event) { owner.sendMediaError(event); } }); } ``` Hope thi...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PtoPInputHandler.java
PtoPInputHandler.checkStillBlocked
@Override public int checkStillBlocked() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkStillBlocked"); // For safety, we assume that the destination is blocked (def 244425 and 464463) int blockingReason = DestinationHandler.OUTPUT_H...
java
@Override public int checkStillBlocked() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkStillBlocked"); // For safety, we assume that the destination is blocked (def 244425 and 464463) int blockingReason = DestinationHandler.OUTPUT_H...
[ "@", "Override", "public", "int", "checkStillBlocked", "(", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"checkStillBlocked\"", ")", ...
See if the condition that led to the link being blocked has been resolved. The block could have been caused by a number of factors, such as the routing destination being full or put-disabled or the link exception destination being full, etc, etc. This code is called by the processAckExpected code in the target stream ...
[ "See", "if", "the", "condition", "that", "led", "to", "the", "link", "being", "blocked", "has", "been", "resolved", ".", "The", "block", "could", "have", "been", "caused", "by", "a", "number", "of", "factors", "such", "as", "the", "routing", "destination",...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/PtoPInputHandler.java#L3400-L3495
train
Check if the destination is blocked.
Of course, here is the Java code you requested: ```java @Override public int checkStillBlocked() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkStillBlocked"); // For safety, we assume that the destination is blocked (def 244425 and 464463)...
future-architect/uroborosql
src/main/java/jp/co/future/uroborosql/parser/SqlParserImpl.java
SqlParserImpl.parseElse
protected void parseElse(final int length) { Node parent = peek(); if (!(parent instanceof IfNode)) { return; } IfNode ifNode = (IfNode) pop(); ElseNode elseNode = new ElseNode(Math.max(this.position - 2, 0), length); this.position = this.tokenizer.getPosition(); ifNode.setElseNode(elseNode); push(el...
java
protected void parseElse(final int length) { Node parent = peek(); if (!(parent instanceof IfNode)) { return; } IfNode ifNode = (IfNode) pop(); ElseNode elseNode = new ElseNode(Math.max(this.position - 2, 0), length); this.position = this.tokenizer.getPosition(); ifNode.setElseNode(elseNode); push(el...
[ "protected", "void", "parseElse", "(", "final", "int", "length", ")", "{", "Node", "parent", "=", "peek", "(", ")", ";", "if", "(", "!", "(", "parent", "instanceof", "IfNode", ")", ")", "{", "return", ";", "}", "IfNode", "ifNode", "=", "(", "IfNode",...
ELSE文解析 @param length ELSE文の長さ
[ "ELSE文解析" ]
4c26db51defdac3c6ed16866e33ab45e190e2e0c
https://github.com/future-architect/uroborosql/blob/4c26db51defdac3c6ed16866e33ab45e190e2e0c/src/main/java/jp/co/future/uroborosql/parser/SqlParserImpl.java#L236-L247
train
Parse an ELSE node.
Of course, here is the Java code you requested: ```java protected void parseElse(final int length) { Node parent = peek(); if (!(parent instanceof IfNode)) { return; } IfNode ifNode = (IfNode) pop(); ElseNode elseNode = new ElseNode(Math.max(this.position - 2, 0), length); this.position = this.tokenizer...
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterTokenServices.java
TwitterTokenServices.isMissingParameter
protected boolean isMissingParameter(Map<String, String[]> requestParams, String endpoint) { if (TwitterConstants.TWITTER_ENDPOINT_ACCESS_TOKEN.equals(endpoint)) { // Must have oauth_token and oauth_verifier parameters in order to send request to oauth/access_token endpoint if (!requestP...
java
protected boolean isMissingParameter(Map<String, String[]> requestParams, String endpoint) { if (TwitterConstants.TWITTER_ENDPOINT_ACCESS_TOKEN.equals(endpoint)) { // Must have oauth_token and oauth_verifier parameters in order to send request to oauth/access_token endpoint if (!requestP...
[ "protected", "boolean", "isMissingParameter", "(", "Map", "<", "String", ",", "String", "[", "]", ">", "requestParams", ",", "String", "endpoint", ")", "{", "if", "(", "TwitterConstants", ".", "TWITTER_ENDPOINT_ACCESS_TOKEN", ".", "equals", "(", "endpoint", ")",...
Checks for required parameters depending on the endpoint type. - oauth/access_token: Must have oauth_token and oauth_verifier parameters in order to continue @param requestParams @param endpoint @return
[ "Checks", "for", "required", "parameters", "depending", "on", "the", "endpoint", "type", ".", "-", "oauth", "/", "access_token", ":", "Must", "have", "oauth_token", "and", "oauth_verifier", "parameters", "in", "order", "to", "continue" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterTokenServices.java#L210-L223
train
Check if request parameters contains missing parameter
Of course, here is the Java code you requested: ```java protected boolean isMissingParameter(Map<String, String[]> requestParams, String endpoint) { if (TwitterConstants.TWITTER_ENDPOINT_ACCESS_TOKEN.equals(endpoint)) { // Must have oauth_token and oauth_verifier parameters in order to send request...
landawn/AbacusUtil
src/com/landawn/abacus/util/Matth.java
Matth.log2
@SuppressWarnings("fallthrough") // TODO(kevinb): remove after this warning is disabled globally public static int log2(BigInteger x, RoundingMode mode) { checkPositive("x", N.checkArgNotNull(x)); int logFloor = x.bitLength() - 1; switch (mode) { case UNNECESSARY: ...
java
@SuppressWarnings("fallthrough") // TODO(kevinb): remove after this warning is disabled globally public static int log2(BigInteger x, RoundingMode mode) { checkPositive("x", N.checkArgNotNull(x)); int logFloor = x.bitLength() - 1; switch (mode) { case UNNECESSARY: ...
[ "@", "SuppressWarnings", "(", "\"fallthrough\"", ")", "// TODO(kevinb): remove after this warning is disabled globally\r", "public", "static", "int", "log2", "(", "BigInteger", "x", ",", "RoundingMode", "mode", ")", "{", "checkPositive", "(", "\"x\"", ",", "N", ".", "...
Returns the base-2 logarithm of {@code x}, rounded according to the specified rounding mode. @throws IllegalArgumentException if {@code x <= 0} @throws ArithmeticException if {@code mode} is {@link RoundingMode#UNNECESSARY} and {@code x} is not a power of two
[ "Returns", "the", "base", "-", "2", "logarithm", "of", "{", "@code", "x", "}", "rounded", "according", "to", "the", "specified", "rounding", "mode", "." ]
544b7720175d15e9329f83dd22a8cc5fa4515e12
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Matth.java#L474-L512
train
Returns the log2 of the specified BigInteger.
Of course, here is the Java code you requested: ```java @SuppressWarnings("fallthrough") // TODO(kevinb): remove after this warning is disabled globally public static int log2(BigInteger x, RoundingMode mode) { checkPositive("x", N.checkArgNotNull(x)); int logFloor = x.bitLength() - 1; ...
knowm/XChange
xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/CoinmateAdapters.java
CoinmateAdapters.adaptTicker
public static Ticker adaptTicker(CoinmateTicker coinmateTicker, CurrencyPair currencyPair) { BigDecimal last = coinmateTicker.getData().getLast(); BigDecimal bid = coinmateTicker.getData().getBid(); BigDecimal ask = coinmateTicker.getData().getAsk(); BigDecimal high = coinmateTicker.getData().getHigh()...
java
public static Ticker adaptTicker(CoinmateTicker coinmateTicker, CurrencyPair currencyPair) { BigDecimal last = coinmateTicker.getData().getLast(); BigDecimal bid = coinmateTicker.getData().getBid(); BigDecimal ask = coinmateTicker.getData().getAsk(); BigDecimal high = coinmateTicker.getData().getHigh()...
[ "public", "static", "Ticker", "adaptTicker", "(", "CoinmateTicker", "coinmateTicker", ",", "CurrencyPair", "currencyPair", ")", "{", "BigDecimal", "last", "=", "coinmateTicker", ".", "getData", "(", ")", ".", "getLast", "(", ")", ";", "BigDecimal", "bid", "=", ...
Adapts a CoinmateTicker to a Ticker Object @param coinmateTicker The exchange specific ticker @param currencyPair (e.g. BTC/USD) @return The ticker
[ "Adapts", "a", "CoinmateTicker", "to", "a", "Ticker", "Object" ]
e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-coinmate/src/main/java/org/knowm/xchange/coinmate/CoinmateAdapters.java#L66-L86
train
Adapts a CoinmateTicker to a Ticker Object
Of course, here is the Java code you requested: ```java public static Ticker adaptTicker(CoinmateTicker coinmateTicker, CurrencyPair currencyPair) { BigDecimal last = coinmateTicker.getData().getLast(); BigDecimal bid = coinmateTicker.getData().getBid(); BigDecimal ask = coinmateTicker.getData().getAsk();...
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/messaging/AtomAPIMMessage.java
AtomAPIMMessage.getParameterName
private static String getParameterName(Method m, int paramIndex) { PName pName = getParameterAnnotation(m, paramIndex, PName.class); if (pName != null) { return pName.value(); } else { return ""; } }
java
private static String getParameterName(Method m, int paramIndex) { PName pName = getParameterAnnotation(m, paramIndex, PName.class); if (pName != null) { return pName.value(); } else { return ""; } }
[ "private", "static", "String", "getParameterName", "(", "Method", "m", ",", "int", "paramIndex", ")", "{", "PName", "pName", "=", "getParameterAnnotation", "(", "m", ",", "paramIndex", ",", "PName", ".", "class", ")", ";", "if", "(", "pName", "!=", "null",...
Get the name of a method parameter via its <code>PName</code> annotation. @param m @param paramIndex the index of the parameter array. @return the parameter name or an empty string if not available.
[ "Get", "the", "name", "of", "a", "method", "parameter", "via", "its", "<code", ">", "PName<", "/", "code", ">", "annotation", "." ]
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/messaging/AtomAPIMMessage.java#L380-L387
train
Gets the parameter name.
Of course, here is the Java code you requested: ```java private static String getParameterName(Method m, int paramIndex) { PName pName = getParameterAnnotation(m, paramIndex, PName.class); if (pName != null) { return pName.value(); } else { return ""; } } ```...
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/opengl/renderer/QuadBasedLineStripRenderer.java
QuadBasedLineStripRenderer.bindColor
private void bindColor(int index) { if (index < cpt) { if (renderHalf) { GL.glColor4f(colours[(index*4)]*0.5f, colours[(index*4)+1]*0.5f, colours[(index*4)+2]*0.5f, colours[(index*4)+3]*0.5f); } else { GL.glColor4f(colours[(index*4)], colours[(index*4)+1], colours[(index*4)+2], c...
java
private void bindColor(int index) { if (index < cpt) { if (renderHalf) { GL.glColor4f(colours[(index*4)]*0.5f, colours[(index*4)+1]*0.5f, colours[(index*4)+2]*0.5f, colours[(index*4)+3]*0.5f); } else { GL.glColor4f(colours[(index*4)], colours[(index*4)+1], colours[(index*4)+2], c...
[ "private", "void", "bindColor", "(", "int", "index", ")", "{", "if", "(", "index", "<", "cpt", ")", "{", "if", "(", "renderHalf", ")", "{", "GL", ".", "glColor4f", "(", "colours", "[", "(", "index", "*", "4", ")", "]", "*", "0.5f", ",", "colours"...
Bind the colour at a given index in the array @param index The index of the colour to bind
[ "Bind", "the", "colour", "at", "a", "given", "index", "in", "the", "array" ]
8251f88a0ed6a70e726d2468842455cd1f80893f
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/opengl/renderer/QuadBasedLineStripRenderer.java#L258-L268
train
Bind the color of the 16 bit word.
Of course, here is the Java code you requested: ```java private void bindColor(int index) { if (index < cpt) { if (renderHalf) { GL.glColor4f(colours[(index*4)]*0.5f, colours[(index*4)+1]*0.5f, colours[(index*4)+2]*0.5f, colours[(index*4)+3]*0.5f); } else { GL.glColor4f(colours[(index*4)...
alipay/sofa-rpc
core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java
AllConnectConnectionHolder.notifyStateChangeToAvailable
public void notifyStateChangeToAvailable() { final List<ConsumerStateListener> onAvailable = consumerConfig.getOnAvailable(); if (onAvailable != null) { AsyncRuntime.getAsyncThreadPool().execute(new Runnable() { @Override public void run() { ...
java
public void notifyStateChangeToAvailable() { final List<ConsumerStateListener> onAvailable = consumerConfig.getOnAvailable(); if (onAvailable != null) { AsyncRuntime.getAsyncThreadPool().execute(new Runnable() { @Override public void run() { ...
[ "public", "void", "notifyStateChangeToAvailable", "(", ")", "{", "final", "List", "<", "ConsumerStateListener", ">", "onAvailable", "=", "consumerConfig", ".", "getOnAvailable", "(", ")", ";", "if", "(", "onAvailable", "!=", "null", ")", "{", "AsyncRuntime", "."...
通知状态变成可用,主要是:<br> 1.启动成功变成可用时<br> 2.注册中心增加,更新节点后变成可用时<br> 3.重连上从一个可用节点都没有变成有可用节点时
[ "通知状态变成可用", "主要是:<br", ">", "1", ".", "启动成功变成可用时<br", ">", "2", ".", "注册中心增加,更新节点后变成可用时<br", ">", "3", ".", "重连上从一个可用节点都没有变成有可用节点时" ]
a31406410291e56696185a29c3ba4bd1f54488fd
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core-impl/client/src/main/java/com/alipay/sofa/rpc/client/AllConnectConnectionHolder.java#L301-L319
train
Notify state change to available
Of course, here is the Java code you requested: ```java public void notifyStateChangeToAvailable() { final List<ConsumerStateListener> onAvailable = consumerConfig.getOnAvailable(); if (onAvailable != null) { AsyncRuntime.getAsyncThreadPool().execute(new Runnable() { @Overri...
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/meta/model/EntityType.java
EntityType.addSequenceNumber
static void addSequenceNumber(Attribute attr, Iterable<Attribute> attrs) { Integer sequenceNumber = attr.getSequenceNumber(); if (null == sequenceNumber) { int i = stream(attrs) .filter(a -> null != a.getSequenceNumber()) .mapToInt(Attribute::getSequenceNumber) ...
java
static void addSequenceNumber(Attribute attr, Iterable<Attribute> attrs) { Integer sequenceNumber = attr.getSequenceNumber(); if (null == sequenceNumber) { int i = stream(attrs) .filter(a -> null != a.getSequenceNumber()) .mapToInt(Attribute::getSequenceNumber) ...
[ "static", "void", "addSequenceNumber", "(", "Attribute", "attr", ",", "Iterable", "<", "Attribute", ">", "attrs", ")", "{", "Integer", "sequenceNumber", "=", "attr", ".", "getSequenceNumber", "(", ")", ";", "if", "(", "null", "==", "sequenceNumber", ")", "{"...
Add a sequence number to the attribute. If the sequence number exists add it ot the attribute. If the sequence number does not exists then find the highest sequence number. If Entity has not attributes with sequence numbers put 0. @param attr the attribute to add @param attrs existing attributes
[ "Add", "a", "sequence", "number", "to", "the", "attribute", ".", "If", "the", "sequence", "number", "exists", "add", "it", "ot", "the", "attribute", ".", "If", "the", "sequence", "number", "does", "not", "exists", "then", "find", "the", "highest", "sequenc...
b4d0d6b27e6f6c8d7505a3863dc03b589601f987
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/meta/model/EntityType.java#L554-L566
train
Add sequence number to attribute
Of course, here is the Java code you requested: ```java static void addSequenceNumber(Attribute attr, Iterable<Attribute> attrs) { Integer sequenceNumber = attr.getSequenceNumber(); if (null == sequenceNumber) { int i = stream(attrs) .filter(a -> null != a.getSequenceNumber()) ...
oaqa/baseqa
src/main/java/edu/cmu/lti/oaqa/type/kb/Concept.java
Concept.getNames
public StringList getNames() { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "edu.cmu.lti.oaqa.type.kb.Concept"); return (StringList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Concept_Type)jcasType).casFeat...
java
public StringList getNames() { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "edu.cmu.lti.oaqa.type.kb.Concept"); return (StringList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Concept_Type)jcasType).casFeat...
[ "public", "StringList", "getNames", "(", ")", "{", "if", "(", "Concept_Type", ".", "featOkTst", "&&", "(", "(", "Concept_Type", ")", "jcasType", ")", ".", "casFeat_names", "==", "null", ")", "jcasType", ".", "jcas", ".", "throwFeatMissing", "(", "\"names\"",...
getter for names - gets All name variants (preferred/default name, synonyms, lexicial variants, etc) of the concept. @generated @return value of the feature
[ "getter", "for", "names", "-", "gets", "All", "name", "variants", "(", "preferred", "/", "default", "name", "synonyms", "lexicial", "variants", "etc", ")", "of", "the", "concept", "." ]
6ea632d8e51e3e617d4876fc1185c49be0ad7eb8
https://github.com/oaqa/baseqa/blob/6ea632d8e51e3e617d4876fc1185c49be0ad7eb8/src/main/java/edu/cmu/lti/oaqa/type/kb/Concept.java#L76-L79
test
getter for names - gets
Of course, here is the Java code you requested: ```java public StringList getNames() { if (Concept_Type.featOkTst && ((Concept_Type)jcasType).casFeat_names == null) jcasType.jcas.throwFeatMissing("names", "edu.cmu.lti.oaqa.type.kb.Concept"); return (StringList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_...
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/bulkloader/SybaseBcpFile.java
SybaseBcpFile.writeColumn
public void writeColumn(String value) throws IllegalArgumentException, IOException { if (value == null) { if (! this.nullableColumns[this.currentColumn]) { throw new IllegalArgumentException( "Bulk load will fail as a null value cann...
java
public void writeColumn(String value) throws IllegalArgumentException, IOException { if (value == null) { if (! this.nullableColumns[this.currentColumn]) { throw new IllegalArgumentException( "Bulk load will fail as a null value cann...
[ "public", "void", "writeColumn", "(", "String", "value", ")", "throws", "IllegalArgumentException", ",", "IOException", "{", "if", "(", "value", "==", "null", ")", "{", "if", "(", "!", "this", ".", "nullableColumns", "[", "this", ".", "currentColumn", "]", ...
write a single column. After all the columns on a single row have been written, call endRow() @param value @throws IllegalArgumentException if the row values contains a null value but the column isn't nullable. @throws IOException if there was a problem writing to the file.
[ "write", "a", "single", "column", ".", "After", "all", "the", "columns", "on", "a", "single", "row", "have", "been", "written", "call", "endRow", "()" ]
e9a069452eece7a6ef9551caf81a69d3d9a3d990
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/bulkloader/SybaseBcpFile.java#L96-L117
train
Write the value of the CTYPE column.
Of course, here is the Java code you requested: ```java public void writeColumn(String value) throws IllegalArgumentException, IOException { if (value == null) { if (! this.nullableColumns[this.currentColumn]) { throw new IllegalArgumentException( ...
aws/aws-sdk-java
aws-java-sdk-inspector/src/main/java/com/amazonaws/services/inspector/model/transform/AttributeMarshaller.java
AttributeMarshaller.marshall
public void marshall(Attribute attribute, ProtocolMarshaller protocolMarshaller) { if (attribute == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(attribute.getKey(), KEY_BINDING); protoc...
java
public void marshall(Attribute attribute, ProtocolMarshaller protocolMarshaller) { if (attribute == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(attribute.getKey(), KEY_BINDING); protoc...
[ "public", "void", "marshall", "(", "Attribute", "attribute", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "attribute", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to marshall(...)\"", ")", ";",...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-inspector/src/main/java/com/amazonaws/services/inspector/model/transform/AttributeMarshaller.java#L44-L56
train
marshalls the given Attribute to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(Attribute attribute, ProtocolMarshaller protocolMarshaller) { if (attribute == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.mars...
Shusshu/Android-RecurrencePicker
library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java
Utils.getDisplayColorFromColor
public static int getDisplayColorFromColor(int color) { if (!isJellybeanOrLater()) { return color; } float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[1] = Math.min(hsv[1] * SATURATION_ADJUST, 1.0f); hsv[2] = hsv[2] * INTENSITY_ADJUST; ret...
java
public static int getDisplayColorFromColor(int color) { if (!isJellybeanOrLater()) { return color; } float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[1] = Math.min(hsv[1] * SATURATION_ADJUST, 1.0f); hsv[2] = hsv[2] * INTENSITY_ADJUST; ret...
[ "public", "static", "int", "getDisplayColorFromColor", "(", "int", "color", ")", "{", "if", "(", "!", "isJellybeanOrLater", "(", ")", ")", "{", "return", "color", ";", "}", "float", "[", "]", "hsv", "=", "new", "float", "[", "3", "]", ";", "Color", "...
For devices with Jellybean or later, darkens the given color to ensure that white text is clearly visible on top of it. For devices prior to Jellybean, does nothing, as the sync adapter handles the color change. @param color
[ "For", "devices", "with", "Jellybean", "or", "later", "darkens", "the", "given", "color", "to", "ensure", "that", "white", "text", "is", "clearly", "visible", "on", "top", "of", "it", ".", "For", "devices", "prior", "to", "Jellybean", "does", "nothing", "a...
4f0ae74482e4d46d57a8fb13b4b7980a8613f4af
https://github.com/Shusshu/Android-RecurrencePicker/blob/4f0ae74482e4d46d57a8fb13b4b7980a8613f4af/library/src/main/java/be/billington/calendar/recurrencepicker/Utils.java#L553-L563
train
Get the display color from the color.
Of course, here is the Java code you requested: ```java public static int getDisplayColorFromColor(int color) { if (!isJellybeanOrLater()) { return color; } float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[1] = Math.min(hsv[1] * SATURATION_ADJUST, 1.0f)...
wildfly/wildfly-core
controller-client/src/main/java/org/jboss/as/controller/client/impl/ExistingChannelModelControllerClient.java
ExistingChannelModelControllerClient.createAndAdd
public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) { final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler); handler.addHandlerFactory(client); return client; }
java
public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) { final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler); handler.addHandlerFactory(client); return client; }
[ "public", "static", "ModelControllerClient", "createAndAdd", "(", "final", "ManagementChannelHandler", "handler", ")", "{", "final", "ExistingChannelModelControllerClient", "client", "=", "new", "ExistingChannelModelControllerClient", "(", "handler", ")", ";", "handler", "....
Create and add model controller handler to an existing management channel handler. @param handler the channel handler @return the created client
[ "Create", "and", "add", "model", "controller", "handler", "to", "an", "existing", "management", "channel", "handler", "." ]
cfaf0479dcbb2d320a44c5374b93b944ec39fade
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller-client/src/main/java/org/jboss/as/controller/client/impl/ExistingChannelModelControllerClient.java#L63-L67
train
Create and add.
Of course, here is the Java code you requested: ```java public static ModelControllerClient createAndAdd(final ManagementChannelHandler handler) { final ExistingChannelModelControllerClient client = new ExistingChannelModelControllerClient(handler); handler.addHandlerFactory(client); return cli...
cogroo/cogroo4
cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/GovernmentChecker.java
GovernmentChecker.findVerb
public Token findVerb(Sentence sentence) { List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks(); for (int i = 0; i < syntChunks.size(); i++) { String tag = syntChunks.get(i).getTag(); if (tag.equals("P") || tag.equals("MV") || tag.equals("PMV") || tag.equals("AUX") || tag.equa...
java
public Token findVerb(Sentence sentence) { List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks(); for (int i = 0; i < syntChunks.size(); i++) { String tag = syntChunks.get(i).getTag(); if (tag.equals("P") || tag.equals("MV") || tag.equals("PMV") || tag.equals("AUX") || tag.equa...
[ "public", "Token", "findVerb", "(", "Sentence", "sentence", ")", "{", "List", "<", "SyntacticChunk", ">", "syntChunks", "=", "sentence", ".", "getSyntacticChunks", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "syntChunks", ".", "size",...
Looks in a sentence for a verb. @param sentence entered by the user @return the <tt>Token</tt> which contains the searched verb, in case none was found returns <tt>null</tt>
[ "Looks", "in", "a", "sentence", "for", "a", "verb", "." ]
b6228900c20c6b37eac10a03708a9669dd562f52
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/cogroo-gc/src/main/java/org/cogroo/tools/checker/checkers/GovernmentChecker.java#L166-L178
train
Find verb from a sentence
Of course, here is the Java code you requested: ```java public Token findVerb(Sentence sentence) { List<SyntacticChunk> syntChunks = sentence.getSyntacticChunks(); for (int i = 0; i < syntChunks.size(); i++) { String tag = syntChunks.get(i).getTag(); if (tag.equals("P") || tag.equals("MV") || tag...
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/QueryRecord.java
QueryRecord.free
public void free() { super.free(); // Free first in case you have to Update() the current record! while (m_LinkageList.size() > 0) { TableLink tableLink = (TableLink)m_LinkageList.elementAt(0); tableLink.free(); } m_LinkageList.removeAllElements(); ...
java
public void free() { super.free(); // Free first in case you have to Update() the current record! while (m_LinkageList.size() > 0) { TableLink tableLink = (TableLink)m_LinkageList.elementAt(0); tableLink.free(); } m_LinkageList.removeAllElements(); ...
[ "public", "void", "free", "(", ")", "{", "super", ".", "free", "(", ")", ";", "// Free first in case you have to Update() the current record!", "while", "(", "m_LinkageList", ".", "size", "(", ")", ">", "0", ")", "{", "TableLink", "tableLink", "=", "(", "Table...
Free the query record.
[ "Free", "the", "query", "record", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/QueryRecord.java#L119-L131
train
Free the base class.
Of course, here is the Java code you requested: ```java public void free() { super.free(); // Free first in case you have to Update() the current record! while (m_LinkageList.size() > 0) { TableLink tableLink = (TableLink)m_LinkageList.elementAt(0); tableLink.free();...
Chorus-bdd/Chorus
extensions/chorus-websockets/src/main/java/org/chorusbdd/chorus/websockets/client/WebSocketStepPublisher.java
WebSocketStepPublisher.addHandlers
public void addHandlers(Object... handlers) { for ( Object handler : handlers) { //assert that this is a Handler checkValidHandlerType(handler); StepInvokerProvider invokerFactory = new HandlerClassInvokerFactory(handler); List<StepInvoker> invokers = invokerFact...
java
public void addHandlers(Object... handlers) { for ( Object handler : handlers) { //assert that this is a Handler checkValidHandlerType(handler); StepInvokerProvider invokerFactory = new HandlerClassInvokerFactory(handler); List<StepInvoker> invokers = invokerFact...
[ "public", "void", "addHandlers", "(", "Object", "...", "handlers", ")", "{", "for", "(", "Object", "handler", ":", "handlers", ")", "{", "//assert that this is a Handler", "checkValidHandlerType", "(", "handler", ")", ";", "StepInvokerProvider", "invokerFactory", "=...
Add handler classes containing the step definitions to publish This must be done before publish is called (or while the step publisher is disconnected)
[ "Add", "handler", "classes", "containing", "the", "step", "definitions", "to", "publish", "This", "must", "be", "done", "before", "publish", "is", "called", "(", "or", "while", "the", "step", "publisher", "is", "disconnected", ")" ]
1eea7ca858876bce821bb49b43fd5b6ba1737997
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/extensions/chorus-websockets/src/main/java/org/chorusbdd/chorus/websockets/client/WebSocketStepPublisher.java#L79-L97
train
Add the given handlers to the application.
Of course, here is the Java code you requested: ```java public void addHandlers(Object... handlers) { for ( Object handler : handlers) { //assert that this is a Handler checkValidHandlerType(handler); StepInvokerProvider invokerFactory = new HandlerClassInvokerFactory(handl...
borball/weixin-sdk
weixin-common/src/main/java/com/riversoft/weixin/common/util/JsonMapper.java
JsonMapper.nonDefaultMapper
public synchronized static JsonMapper nonDefaultMapper() { if (nonDefaultJsonMapper == null) { nonDefaultJsonMapper = new JsonMapper(JsonInclude.Include.NON_DEFAULT, false); } return nonDefaultJsonMapper; }
java
public synchronized static JsonMapper nonDefaultMapper() { if (nonDefaultJsonMapper == null) { nonDefaultJsonMapper = new JsonMapper(JsonInclude.Include.NON_DEFAULT, false); } return nonDefaultJsonMapper; }
[ "public", "synchronized", "static", "JsonMapper", "nonDefaultMapper", "(", ")", "{", "if", "(", "nonDefaultJsonMapper", "==", "null", ")", "{", "nonDefaultJsonMapper", "=", "new", "JsonMapper", "(", "JsonInclude", ".", "Include", ".", "NON_DEFAULT", ",", "false", ...
创建只输出初始值被改变的属性到Json字符串的Mapper, 最节约的存储方式,建议在内部接口中使用。
[ "创建只输出初始值被改变的属性到Json字符串的Mapper", "最节约的存储方式,建议在内部接口中使用。" ]
32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7
https://github.com/borball/weixin-sdk/blob/32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7/weixin-common/src/main/java/com/riversoft/weixin/common/util/JsonMapper.java#L74-L79
train
Gets a JsonMapper that uses the default JsonMapper.
Of course, here is the Java code you requested: ```java public synchronized static JsonMapper nonDefaultMapper() { if (nonDefaultJsonMapper == null) { nonDefaultJsonMapper = new JsonMapper(JsonInclude.Include.NON_DEFAULT, false); } return nonDefaultJsonMapper; } ``` Hope t...
anotheria/moskito
moskito-extensions/moskito-php/src/main/java/net/anotheria/extensions/php/connectors/impl/RabbitMQConnector.java
RabbitMQConnector.initWithDefaultProperties
@Override public void initWithDefaultProperties(Properties properties) throws ConnectorInitException { log.debug("Starting to initWithDefaultProperties RabbitMQ connector in php plugin..."); ConnectionFactory factory = new ConnectionFactory(); factory.setHost(properties.getProperty("conne...
java
@Override public void initWithDefaultProperties(Properties properties) throws ConnectorInitException { log.debug("Starting to initWithDefaultProperties RabbitMQ connector in php plugin..."); ConnectionFactory factory = new ConnectionFactory(); factory.setHost(properties.getProperty("conne...
[ "@", "Override", "public", "void", "initWithDefaultProperties", "(", "Properties", "properties", ")", "throws", "ConnectorInitException", "{", "log", ".", "debug", "(", "\"Starting to initWithDefaultProperties RabbitMQ connector in php plugin...\"", ")", ";", "ConnectionFactory...
Opens connection and channel to listen configured queue for incoming data @param properties configured connector properties @throws ConnectorInitException on connection to RabbitMQ fail
[ "Opens", "connection", "and", "channel", "to", "listen", "configured", "queue", "for", "incoming", "data" ]
0fdb79053b98a6ece610fa159f59bc3331e4cf05
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-extensions/moskito-php/src/main/java/net/anotheria/extensions/php/connectors/impl/RabbitMQConnector.java#L67-L97
train
This method is called by the connector in php plugin to initialize the connection to RabbitMQ and basic consume queues.
Of course, here is the Java code you requested: ```java @Override public void initWithDefaultProperties(Properties properties) throws ConnectorInitException { log.debug("Starting to initWithDefaultProperties RabbitMQ connector in php plugin..."); ConnectionFactory factory = new ConnectionFactory(...
tiefaces/TieFaces
src/org/tiefaces/common/FacesUtility.java
FacesUtility.findBean
@SuppressWarnings("unchecked") public static <T> T findBean(final String beanName) { FacesContext context = FacesContext.getCurrentInstance(); return (T) context.getApplication().evaluateExpressionGet(context, TieConstants.EL_START + beanName + TieConstants.EL_END, Object.class); }
java
@SuppressWarnings("unchecked") public static <T> T findBean(final String beanName) { FacesContext context = FacesContext.getCurrentInstance(); return (T) context.getApplication().evaluateExpressionGet(context, TieConstants.EL_START + beanName + TieConstants.EL_END, Object.class); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ">", "T", "findBean", "(", "final", "String", "beanName", ")", "{", "FacesContext", "context", "=", "FacesContext", ".", "getCurrentInstance", "(", ")", ";", "return", "(", "T"...
Find bean in context. @param <T> This is the type parameter. @param beanName bean name. @return bean object.
[ "Find", "bean", "in", "context", "." ]
3b57b9701ed0f080b5fa4fa78269cc0c422b34ba
https://github.com/tiefaces/TieFaces/blob/3b57b9701ed0f080b5fa4fa78269cc0c422b34ba/src/org/tiefaces/common/FacesUtility.java#L205-L211
test
Find a bean by its name.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public static <T> T findBean(final String beanName) { FacesContext context = FacesContext.getCurrentInstance(); return (T) context.getApplication().evaluateExpressionGet(context, TieConstants.EL_START + beanName + TieCo...
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java
WebSiteManagementClientImpl.getPublishingUserWithServiceResponseAsync
public Observable<ServiceResponse<UserInner>> getPublishingUserWithServiceResponseAsync() { if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } return service.getPublishingUser(this.apiVersion(), this.a...
java
public Observable<ServiceResponse<UserInner>> getPublishingUserWithServiceResponseAsync() { if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } return service.getPublishingUser(this.apiVersion(), this.a...
[ "public", "Observable", "<", "ServiceResponse", "<", "UserInner", ">", ">", "getPublishingUserWithServiceResponseAsync", "(", ")", "{", "if", "(", "this", ".", "apiVersion", "(", ")", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Pa...
Gets publishing user. Gets publishing user. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the UserInner object
[ "Gets", "publishing", "user", ".", "Gets", "publishing", "user", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/WebSiteManagementClientImpl.java#L543-L559
train
Get a user by ID.
Of course, here is the Java code you requested: ```java public Observable<ServiceResponse<UserInner>> getPublishingUserWithServiceResponseAsync() { if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } r...
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/query/Criteria.java
Criteria.addLessOrEqualThan
public void addLessOrEqualThan(Object attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getUserAlias(attribute))); }
java
public void addLessOrEqualThan(Object attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getUserAlias(attribute))); }
[ "public", "void", "addLessOrEqualThan", "(", "Object", "attribute", ",", "Object", "value", ")", "{", "// PAW\r", "// addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getAlias()));\r", "addSelectionCriteria", "(", "ValueCriteria", ".", "buildNotGreaterCr...
Adds LessOrEqual Than (<=) criteria, customer_id <= 10034 @param attribute The field name to be used @param value An object representing the value of the field
[ "Adds", "LessOrEqual", "Than", "(", "<", "=", ")", "criteria", "customer_id", "<", "=", "10034" ]
9a544372f67ce965f662cdc71609dd03683c8f04
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/query/Criteria.java#L435-L440
train
Adds a Criteria object that requires a value to be less than or equal to the given value.
Of course, here is the Java code you requested: ```java public void addLessOrEqualThan(Object attribute, Object value) { // PAW // addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getAlias())); addSelectionCriteria(ValueCriteria.buildNotGreaterCriteria(attribute, value, getUse...
googleapis/cloud-bigtable-client
bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAdmin.java
BigtableAdmin.snapshotAsync
@Override public void snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException { asyncAdmin.snapshot(snapshot); LOG.warn("isSnapshotFinished() is not currently supported by BigtableAdmin.\n" + "You may poll for existence of the snapshot with listSnapshots(snpasho...
java
@Override public void snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException { asyncAdmin.snapshot(snapshot); LOG.warn("isSnapshotFinished() is not currently supported by BigtableAdmin.\n" + "You may poll for existence of the snapshot with listSnapshots(snpasho...
[ "@", "Override", "public", "void", "snapshotAsync", "(", "SnapshotDescription", "snapshot", ")", "throws", "IOException", ",", "SnapshotCreationException", "{", "asyncAdmin", ".", "snapshot", "(", "snapshot", ")", ";", "LOG", ".", "warn", "(", "\"isSnapshotFinished(...
{@inheritDoc}
[ "{" ]
53543f36e4d6f9ed1963640d91a35be2a2047656
https://github.com/googleapis/cloud-bigtable-client/blob/53543f36e4d6f9ed1963640d91a35be2a2047656/bigtable-hbase-2.x-parent/bigtable-hbase-2.x/src/main/java/com/google/cloud/bigtable/hbase2_x/BigtableAdmin.java#L217-L223
train
This method is called by the snapshot async admin.
Of course, here is the Java code you requested: ```java @Override public void snapshotAsync(SnapshotDescription snapshot) throws IOException, SnapshotCreationException { asyncAdmin.snapshot(snapshot); LOG.warn("isSnapshotFinished() is not currently supported by BigtableAdmin.\n" + "You may poll...
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/spi/msg/AttributeListExtension.java
AttributeListExtension.findFirst
public static AttributeListExtension findFirst(Collection<? extends Extension> extensions) { for (Extension extension : extensions) { if (ATTRIBUTE_LIST_EXTENSION_ID == extension.getId()) return (AttributeListExtension)extension; } return null; }
java
public static AttributeListExtension findFirst(Collection<? extends Extension> extensions) { for (Extension extension : extensions) { if (ATTRIBUTE_LIST_EXTENSION_ID == extension.getId()) return (AttributeListExtension)extension; } return null; }
[ "public", "static", "AttributeListExtension", "findFirst", "(", "Collection", "<", "?", "extends", "Extension", ">", "extensions", ")", "{", "for", "(", "Extension", "extension", ":", "extensions", ")", "{", "if", "(", "ATTRIBUTE_LIST_EXTENSION_ID", "==", "extensi...
Returns the first AttributeListExtension found in the given collection of extensions, or null if the extension collection does not contain an AttributeListExtension.
[ "Returns", "the", "first", "AttributeListExtension", "found", "in", "the", "given", "collection", "of", "extensions", "or", "null", "if", "the", "extension", "collection", "does", "not", "contain", "an", "AttributeListExtension", "." ]
6cc13dbe81feab133fe3dd291ca081cbc6e1f591
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/spi/msg/AttributeListExtension.java#L167-L175
train
Gets the first AttributeListExtension in the collection of extensions.
Of course, here is the Java code you requested: ```java public static AttributeListExtension findFirst(Collection<? extends Extension> extensions) { for (Extension extension : extensions) { if (ATTRIBUTE_LIST_EXTENSION_ID == extension.getId()) return (AttributeListExtens...
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java
JShellTool.messageFormat
String messageFormat(String key, Object... args) { String rs = getResourceString(key); return MessageFormat.format(rs, args); }
java
String messageFormat(String key, Object... args) { String rs = getResourceString(key); return MessageFormat.format(rs, args); }
[ "String", "messageFormat", "(", "String", "key", ",", "Object", "...", "args", ")", "{", "String", "rs", "=", "getResourceString", "(", "key", ")", ";", "return", "MessageFormat", ".", "format", "(", "rs", ",", "args", ")", ";", "}" ]
Format using resource bundle look-up using MessageFormat @param key the resource key @param args
[ "Format", "using", "resource", "bundle", "look", "-", "up", "using", "MessageFormat" ]
a53d069bbdb2c60232ed3811c19b65e41c3e60e0
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/internal/jshell/tool/JShellTool.java#L787-L790
train
Format a message for a resource.
Of course, here is the Java code you requested: ```java String messageFormat(String key, Object... args) { String rs = getResourceString(key); return MessageFormat.format(rs, args); } ``` Hope this helps!
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/fdt/FdtSketch.java
FdtSketch.getResult
public List<Group> getResult(final int[] priKeyIndices, final int limit, final int numStdDev, final char sep) { final PostProcessor proc = new PostProcessor(this, new Group(), sep); return proc.getGroupList(priKeyIndices, numStdDev, limit); }
java
public List<Group> getResult(final int[] priKeyIndices, final int limit, final int numStdDev, final char sep) { final PostProcessor proc = new PostProcessor(this, new Group(), sep); return proc.getGroupList(priKeyIndices, numStdDev, limit); }
[ "public", "List", "<", "Group", ">", "getResult", "(", "final", "int", "[", "]", "priKeyIndices", ",", "final", "int", "limit", ",", "final", "int", "numStdDev", ",", "final", "char", "sep", ")", "{", "final", "PostProcessor", "proc", "=", "new", "PostPr...
Returns an ordered List of Groups of the most frequent distinct population of subset tuples represented by the count of entries of each group. @param priKeyIndices these indices define the dimensions used for the Primary Keys. @param limit the maximum number of groups to return. If this value is &le; 0, all groups will...
[ "Returns", "an", "ordered", "List", "of", "Groups", "of", "the", "most", "frequent", "distinct", "population", "of", "subset", "tuples", "represented", "by", "the", "count", "of", "entries", "of", "each", "group", "." ]
900c8c9668a1e2f1d54d453e956caad54702e540
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/fdt/FdtSketch.java#L89-L93
train
Get the result of the group search.
Of course, here is the Java code you requested: ```java public List<Group> getResult(final int[] priKeyIndices, final int limit, final int numStdDev, final char sep) { final PostProcessor proc = new PostProcessor(this, new Group(), sep); return proc.getGroupList(priKeyIndices, numStdDev, limit); } ``` ...
ModeShape/modeshape
modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java
ConnectionInfo.getCredentials
public Credentials getCredentials() { String username = getUsername(); char[] password = getPassword(); if (username != null) { return new SimpleCredentials(username, password); } return null; }
java
public Credentials getCredentials() { String username = getUsername(); char[] password = getPassword(); if (username != null) { return new SimpleCredentials(username, password); } return null; }
[ "public", "Credentials", "getCredentials", "(", ")", "{", "String", "username", "=", "getUsername", "(", ")", ";", "char", "[", "]", "password", "=", "getPassword", "(", ")", ";", "if", "(", "username", "!=", "null", ")", "{", "return", "new", "SimpleCre...
Return the credentials based on the user name and password. @return Credentials
[ "Return", "the", "credentials", "based", "on", "the", "user", "name", "and", "password", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jdbc-local/src/main/java/org/modeshape/jdbc/delegate/ConnectionInfo.java#L310-L317
train
Get the Credentials object.
Of course, here is the Java code you requested: ```java public Credentials getCredentials() { String username = getUsername(); char[] password = getPassword(); if (username != null) { return new SimpleCredentials(username, password); } return null; } ``` Hope th...
apache/incubator-atlas
webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java
EntityResource.updateEntities
@PUT @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public Response updateEntities(@Context HttpServletRequest request) { if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.updateEntities()"); } String entityJ...
java
@PUT @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public Response updateEntities(@Context HttpServletRequest request) { if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResource.updateEntities()"); } String entityJ...
[ "@", "PUT", "@", "Consumes", "(", "{", "Servlets", ".", "JSON_MEDIA_TYPE", ",", "MediaType", ".", "APPLICATION_JSON", "}", ")", "@", "Produces", "(", "Servlets", ".", "JSON_MEDIA_TYPE", ")", "public", "Response", "updateEntities", "(", "@", "Context", "HttpSer...
Complete update of a set of entities - the values not specified will be replaced with null/removed Adds/Updates given entities identified by its GUID or unique attribute @return response payload as json
[ "Complete", "update", "of", "a", "set", "of", "entities", "-", "the", "values", "not", "specified", "will", "be", "replaced", "with", "null", "/", "removed", "Adds", "/", "Updates", "given", "entities", "identified", "by", "its", "GUID", "or", "unique", "a...
e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java#L257-L315
train
Update the entities in the database.
Of course, here is the Java code you requested: ```java @PUT @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON}) @Produces(Servlets.JSON_MEDIA_TYPE) public Response updateEntities(@Context HttpServletRequest request) { if (LOG.isDebugEnabled()) { LOG.debug("==> EntityResou...
attribyte/wpdb
src/main/java/org/attribyte/wp/db/DB.java
DB.selectPostMetaValue
public Meta selectPostMetaValue(final long postId, final String metaKey) throws SQLException { Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; Timer.Context ctx = metrics.selectPostMetaTimer.time(); try { conn = connectionSupplier.getConnection(); ...
java
public Meta selectPostMetaValue(final long postId, final String metaKey) throws SQLException { Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; Timer.Context ctx = metrics.selectPostMetaTimer.time(); try { conn = connectionSupplier.getConnection(); ...
[ "public", "Meta", "selectPostMetaValue", "(", "final", "long", "postId", ",", "final", "String", "metaKey", ")", "throws", "SQLException", "{", "Connection", "conn", "=", "null", ";", "PreparedStatement", "stmt", "=", "null", ";", "ResultSet", "rs", "=", "null...
Selects a single post meta value. @param postId The post id. @param metaKey The key. @return The meta value or {@code null} if none. @throws SQLException on database error.
[ "Selects", "a", "single", "post", "meta", "value", "." ]
b9adf6131dfb67899ebff770c9bfeb001cc42f30
https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/db/DB.java#L1918-L1935
train
Selects a meta value from a post.
Of course, here is the Java code you requested: ```java public Meta selectPostMetaValue(final long postId, final String metaKey) throws SQLException { Connection conn = null; PreparedStatement stmt = null; ResultSet rs = null; Timer.Context ctx = metrics.selectPostMetaTimer.time(); try {...
chenlb/mmseg4j-from-googlecode
src/com/chenlb/mmseg4j/Seg.java
Seg.printChunk
protected void printChunk(List<Chunk> chunks) { for(Chunk ck : chunks) { System.out.println(ck+" -> "+ck.toFactorString()); } }
java
protected void printChunk(List<Chunk> chunks) { for(Chunk ck : chunks) { System.out.println(ck+" -> "+ck.toFactorString()); } }
[ "protected", "void", "printChunk", "(", "List", "<", "Chunk", ">", "chunks", ")", "{", "for", "(", "Chunk", "ck", ":", "chunks", ")", "{", "System", ".", "out", ".", "println", "(", "ck", "+", "\" -> \"", "+", "ck", ".", "toFactorString", "(", ")", ...
输出 chunks, 调试用.
[ "输出", "chunks", "调试用", "." ]
3053a70c29c1bc8e7c280a8098fb41b5ad9ec3cb
https://github.com/chenlb/mmseg4j-from-googlecode/blob/3053a70c29c1bc8e7c280a8098fb41b5ad9ec3cb/src/com/chenlb/mmseg4j/Seg.java#L23-L27
test
Print a list of chunks to stdout.
Of course, here is the Java code you requested: ```java protected void printChunk(List<Chunk> chunks) { for(Chunk ck : chunks) { System.out.println(ck+" -> "+ck.toFactorString()); } } ``` Hope this helps!
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/core/Parser.java
Parser.parseUpdateKeyword
public static boolean parseUpdateKeyword(final char[] query, int offset) { if (query.length < (offset + 6)) { return false; } return (query[offset] | 32) == 'u' && (query[offset + 1] | 32) == 'p' && (query[offset + 2] | 32) == 'd' && (query[offset + 3] | 32) == 'a' && ...
java
public static boolean parseUpdateKeyword(final char[] query, int offset) { if (query.length < (offset + 6)) { return false; } return (query[offset] | 32) == 'u' && (query[offset + 1] | 32) == 'p' && (query[offset + 2] | 32) == 'd' && (query[offset + 3] | 32) == 'a' && ...
[ "public", "static", "boolean", "parseUpdateKeyword", "(", "final", "char", "[", "]", "query", ",", "int", "offset", ")", "{", "if", "(", "query", ".", "length", "<", "(", "offset", "+", "6", ")", ")", "{", "return", "false", ";", "}", "return", "(", ...
Parse string to check presence of UPDATE keyword regardless of case. @param query char[] of the query statement @param offset position of query to start checking @return boolean indicates presence of word
[ "Parse", "string", "to", "check", "presence", "of", "UPDATE", "keyword", "regardless", "of", "case", "." ]
95ba7b261e39754674c5817695ae5ebf9a341fae
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/core/Parser.java#L663-L674
train
Parse an update keyword in the query string.
Of course, here is the Java code you requested: ```java public static boolean parseUpdateKeyword(final char[] query, int offset) { if (query.length < (offset + 6)) { return false; } return (query[offset] | 32) == 'u' && (query[offset + 1] | 32) == 'p' && (query[offset + 2] | 32) == '...
liferay/com-liferay-commerce
commerce-discount-api/src/main/java/com/liferay/commerce/discount/service/persistence/CommerceDiscountRelUtil.java
CommerceDiscountRelUtil.findByCommerceDiscountId_PrevAndNext
public static CommerceDiscountRel[] findByCommerceDiscountId_PrevAndNext( long commerceDiscountRelId, long commerceDiscountId, OrderByComparator<CommerceDiscountRel> orderByComparator) throws com.liferay.commerce.discount.exception.NoSuchDiscountRelException { return getPersistence() .findByCommerceDisco...
java
public static CommerceDiscountRel[] findByCommerceDiscountId_PrevAndNext( long commerceDiscountRelId, long commerceDiscountId, OrderByComparator<CommerceDiscountRel> orderByComparator) throws com.liferay.commerce.discount.exception.NoSuchDiscountRelException { return getPersistence() .findByCommerceDisco...
[ "public", "static", "CommerceDiscountRel", "[", "]", "findByCommerceDiscountId_PrevAndNext", "(", "long", "commerceDiscountRelId", ",", "long", "commerceDiscountId", ",", "OrderByComparator", "<", "CommerceDiscountRel", ">", "orderByComparator", ")", "throws", "com", ".", ...
Returns the commerce discount rels before and after the current commerce discount rel in the ordered set where commerceDiscountId = &#63;. @param commerceDiscountRelId the primary key of the current commerce discount rel @param commerceDiscountId the commerce discount ID @param orderByComparator the comparator to orde...
[ "Returns", "the", "commerce", "discount", "rels", "before", "and", "after", "the", "current", "commerce", "discount", "rel", "in", "the", "ordered", "set", "where", "commerceDiscountId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-api/src/main/java/com/liferay/commerce/discount/service/persistence/CommerceDiscountRelUtil.java#L262-L269
train
Returns the commerce discount rels before and after the current commerce discount rel in the ordered set.
Of course, here is the Java code you requested: ```java public static CommerceDiscountRel[] findByCommerceDiscountId_PrevAndNext( long commerceDiscountRelId, long commerceDiscountId, OrderByComparator<CommerceDiscountRel> orderByComparator) throws com.liferay.commerce.discount.exception.NoSuchDiscountRelExceptio...
aws/aws-sdk-java
aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/transform/LocalDeviceResourceDataMarshaller.java
LocalDeviceResourceDataMarshaller.marshall
public void marshall(LocalDeviceResourceData localDeviceResourceData, ProtocolMarshaller protocolMarshaller) { if (localDeviceResourceData == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(localDevic...
java
public void marshall(LocalDeviceResourceData localDeviceResourceData, ProtocolMarshaller protocolMarshaller) { if (localDeviceResourceData == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(localDevic...
[ "public", "void", "marshall", "(", "LocalDeviceResourceData", "localDeviceResourceData", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "localDeviceResourceData", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-greengrass/src/main/java/com/amazonaws/services/greengrass/model/transform/LocalDeviceResourceDataMarshaller.java#L44-L56
train
marshalls the given LocalDeviceResourceData to the JSON object.
Of course, here is the Java code you requested: ```java public void marshall(LocalDeviceResourceData localDeviceResourceData, ProtocolMarshaller protocolMarshaller) { if (localDeviceResourceData == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } ...
DV8FromTheWorld/JDA
src/main/java/com/iwebpp/crypto/TweetNaclFast.java
Signature.keyPair
public static KeyPair keyPair() { KeyPair kp = new KeyPair(); crypto_sign_keypair(kp.getPublicKey(), kp.getSecretKey(), false); return kp; }
java
public static KeyPair keyPair() { KeyPair kp = new KeyPair(); crypto_sign_keypair(kp.getPublicKey(), kp.getSecretKey(), false); return kp; }
[ "public", "static", "KeyPair", "keyPair", "(", ")", "{", "KeyPair", "kp", "=", "new", "KeyPair", "(", ")", ";", "crypto_sign_keypair", "(", "kp", ".", "getPublicKey", "(", ")", ",", "kp", ".", "getSecretKey", "(", ")", ",", "false", ")", ";", "return",...
/* @description Signs the message using the secret key and returns a signed message.
[ "/", "*" ]
8ecbbe354d03f6bf448411bba573d0d4c268b560
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/com/iwebpp/crypto/TweetNaclFast.java#L820-L825
train
Get a KeyPair from the public key and secret key.
Of course, here is the Java code you requested: ```java public static KeyPair keyPair() { KeyPair kp = new KeyPair(); crypto_sign_keypair(kp.getPublicKey(), kp.getSecretKey(), false); return kp; } ``` Hope this helps!
leancloud/java-sdk-all
android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/hwid/CheckSignInApi.java
CheckSignInApi.disposeCheckSignInResult
private void disposeCheckSignInResult(SignInResult result) { if (result == null) { HMSAgentLog.e("result is null"); onCheckSignInResult(HMSAgent.AgentResultCode.RESULT_IS_NULL, null); return; } Status status = result.getStatus(); if (status ==...
java
private void disposeCheckSignInResult(SignInResult result) { if (result == null) { HMSAgentLog.e("result is null"); onCheckSignInResult(HMSAgent.AgentResultCode.RESULT_IS_NULL, null); return; } Status status = result.getStatus(); if (status ==...
[ "private", "void", "disposeCheckSignInResult", "(", "SignInResult", "result", ")", "{", "if", "(", "result", "==", "null", ")", "{", "HMSAgentLog", ".", "e", "(", "\"result is null\"", ")", ";", "onCheckSignInResult", "(", "HMSAgent", ".", "AgentResultCode", "."...
处理signInResult回调 @param result 回调的signInResult实例
[ "处理signInResult回调" ]
323f8e7ee38051b1350790e5192304768c5c9f5f
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/hwid/CheckSignInApi.java#L83-L113
train
Dispose of checkSignInResult.
Of course, here is the Java code you requested: ```java private void disposeCheckSignInResult(SignInResult result) { if (result == null) { HMSAgentLog.e("result is null"); onCheckSignInResult(HMSAgent.AgentResultCode.RESULT_IS_NULL, null); return; } S...
beanshell/beanshell
src/main/java/bsh/Interpreter.java
Interpreter.eval
public Object eval( String statements, NameSpace nameSpace ) throws EvalError { String s = ( statements.endsWith(";") ? statements : statements+";" ); return eval( new StringReader(s), nameSpace, "inline evaluation of: ``"+ showEvalString(s)+"''" ); }
java
public Object eval( String statements, NameSpace nameSpace ) throws EvalError { String s = ( statements.endsWith(";") ? statements : statements+";" ); return eval( new StringReader(s), nameSpace, "inline evaluation of: ``"+ showEvalString(s)+"''" ); }
[ "public", "Object", "eval", "(", "String", "statements", ",", "NameSpace", "nameSpace", ")", "throws", "EvalError", "{", "String", "s", "=", "(", "statements", ".", "endsWith", "(", "\";\"", ")", "?", "statements", ":", "statements", "+", "\";\"", ")", ";"...
Evaluate the string in the specified namespace.
[ "Evaluate", "the", "string", "in", "the", "specified", "namespace", "." ]
fdddee3de948c9e6babb2d1337028f6fd0a2ba5c
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/Interpreter.java#L716-L723
train
Evaluate a sequence of CRASS SEQ statements.
Of course, here is the Java code you requested: ```java public Object eval( String statements, NameSpace nameSpace ) throws EvalError { String s = ( statements.endsWith(";") ? statements : statements+";" ); return eval( new StringReader(s), nameSpace, "inline evaluat...
jbundle/jbundle
thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java
JAltGridScreen.fieldsToControls
public void fieldsToControls() { super.fieldsToControls(); for (int iRowIndex = 0; iRowIndex < m_vComponentCache.size(); iRowIndex++) { ComponentCache componentCache = (ComponentCache)m_vComponentCache.elementAt(iRowIndex); if (componentCache != null) { ...
java
public void fieldsToControls() { super.fieldsToControls(); for (int iRowIndex = 0; iRowIndex < m_vComponentCache.size(); iRowIndex++) { ComponentCache componentCache = (ComponentCache)m_vComponentCache.elementAt(iRowIndex); if (componentCache != null) { ...
[ "public", "void", "fieldsToControls", "(", ")", "{", "super", ".", "fieldsToControls", "(", ")", ";", "for", "(", "int", "iRowIndex", "=", "0", ";", "iRowIndex", "<", "m_vComponentCache", ".", "size", "(", ")", ";", "iRowIndex", "++", ")", "{", "Componen...
Move the the data record(s) to the screen controls.
[ "Move", "the", "the", "data", "record", "(", "s", ")", "to", "the", "screen", "controls", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L347-L361
train
Move the data to the controls.
Of course, here is the Java code you requested: ```java public void fieldsToControls() { super.fieldsToControls(); for (int iRowIndex = 0; iRowIndex < m_vComponentCache.size(); iRowIndex++) { ComponentCache componentCache = (ComponentCache)m_vComponentCache.elementAt(iRowIndex);...
aws/aws-sdk-java
aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/model/UpdateNFSFileShareRequest.java
UpdateNFSFileShareRequest.withClientList
public UpdateNFSFileShareRequest withClientList(String... clientList) { if (this.clientList == null) { setClientList(new com.amazonaws.internal.SdkInternalList<String>(clientList.length)); } for (String ele : clientList) { this.clientList.add(ele); } retur...
java
public UpdateNFSFileShareRequest withClientList(String... clientList) { if (this.clientList == null) { setClientList(new com.amazonaws.internal.SdkInternalList<String>(clientList.length)); } for (String ele : clientList) { this.clientList.add(ele); } retur...
[ "public", "UpdateNFSFileShareRequest", "withClientList", "(", "String", "...", "clientList", ")", "{", "if", "(", "this", ".", "clientList", "==", "null", ")", "{", "setClientList", "(", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", ...
<p> The list of clients that are allowed to access the file gateway. The list must contain either valid IP addresses or valid CIDR blocks. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setClientList(java.util.Collection)} or {@link #withClientList(java.util.Collection)}...
[ "<p", ">", "The", "list", "of", "clients", "that", "are", "allowed", "to", "access", "the", "file", "gateway", ".", "The", "list", "must", "contain", "either", "valid", "IP", "addresses", "or", "valid", "CIDR", "blocks", ".", "<", "/", "p", ">", "<p", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/model/UpdateNFSFileShareRequest.java#L490-L498
train
Sets the clientList property.
Of course, here is the Java code you requested: ```java public UpdateNFSFileShareRequest withClientList(String... clientList) { if (this.clientList == null) { setClientList(new com.amazonaws.internal.SdkInternalList<String>(clientList.length)); } for (String ele : clientList) { ...
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountUserRelPersistenceImpl.java
CommerceAccountUserRelPersistenceImpl.findByCommerceAccountId
@Override public List<CommerceAccountUserRel> findByCommerceAccountId( long commerceAccountId) { return findByCommerceAccountId(commerceAccountId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceAccountUserRel> findByCommerceAccountId( long commerceAccountId) { return findByCommerceAccountId(commerceAccountId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccountUserRel", ">", "findByCommerceAccountId", "(", "long", "commerceAccountId", ")", "{", "return", "findByCommerceAccountId", "(", "commerceAccountId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_P...
Returns all the commerce account user rels where commerceAccountId = &#63;. @param commerceAccountId the commerce account ID @return the matching commerce account user rels
[ "Returns", "all", "the", "commerce", "account", "user", "rels", "where", "commerceAccountId", "=", "&#63", ";", "." ]
9e54362d7f59531fc684016ba49ee7cdc3a2f22b
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountUserRelPersistenceImpl.java#L123-L128
train
Returns all the commerce account user rels of the commerce account.
Of course, here is the Java code you requested: ```java @Override public List<CommerceAccountUserRel> findByCommerceAccountId( long commerceAccountId) { return findByCommerceAccountId(commerceAccountId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); } ``` Hope this helps!
jbundle/jbundle
app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java
WriteRecordClass.getBaseDataClass
public void getBaseDataClass(FieldStuff fieldStuff) { Record recClassInfo2 = m_recClassInfo2; FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE); String strRecordClass = recFieldData.getField(FieldData.FIELD_CLASS).getString(); fieldStuff.strBaseFi...
java
public void getBaseDataClass(FieldStuff fieldStuff) { Record recClassInfo2 = m_recClassInfo2; FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE); String strRecordClass = recFieldData.getField(FieldData.FIELD_CLASS).getString(); fieldStuff.strBaseFi...
[ "public", "void", "getBaseDataClass", "(", "FieldStuff", "fieldStuff", ")", "{", "Record", "recClassInfo2", "=", "m_recClassInfo2", ";", "FieldData", "recFieldData", "=", "(", "FieldData", ")", "this", ".", "getRecord", "(", "FieldData", ".", "FIELD_DATA_FILE", ")...
Read thru the classes until you get a Physical data class.
[ "Read", "thru", "the", "classes", "until", "you", "get", "a", "Physical", "data", "class", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/manual/util/src/main/java/org/jbundle/app/program/manual/util/WriteRecordClass.java#L1391-L1433
train
Get the Base Data Class.
Of course, here is the Java code you requested: ```java public void getBaseDataClass(FieldStuff fieldStuff) { Record recClassInfo2 = m_recClassInfo2; FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE); String strRecordClass = recFieldData.getField(FieldDa...
JOML-CI/JOML
src/org/joml/Vector3f.java
Vector3f.add
public Vector3f add(Vector3fc v, Vector3f dest) { dest.x = x + v.x(); dest.y = y + v.y(); dest.z = z + v.z(); return dest; }
java
public Vector3f add(Vector3fc v, Vector3f dest) { dest.x = x + v.x(); dest.y = y + v.y(); dest.z = z + v.z(); return dest; }
[ "public", "Vector3f", "add", "(", "Vector3fc", "v", ",", "Vector3f", "dest", ")", "{", "dest", ".", "x", "=", "x", "+", "v", ".", "x", "(", ")", ";", "dest", ".", "y", "=", "y", "+", "v", ".", "y", "(", ")", ";", "dest", ".", "z", "=", "z...
/* (non-Javadoc) @see org.joml.Vector3fc#add(org.joml.Vector3fc, org.joml.Vector3f)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3f.java#L549-L554
train
Add two vectors.
Of course, here is the Java code you requested: ```java public Vector3f add(Vector3fc v, Vector3f dest) { dest.x = x + v.x(); dest.y = y + v.y(); dest.z = z + v.z(); return dest; } ``` Hope this helps!
dihedron/dihedron-commons
src/main/java/org/dihedron/core/reflection/Reflector.java
Reflector.getFieldValue
public Object getFieldValue(String fieldName) throws ReflectorException { if(object == null) { logger.error("object is null: did you specify it using the 'inspect()' method?"); throw new ReflectorException("object is null: did you specify it using the 'inspect()' method?"); } if(!Strings.isValid(fieldName))...
java
public Object getFieldValue(String fieldName) throws ReflectorException { if(object == null) { logger.error("object is null: did you specify it using the 'inspect()' method?"); throw new ReflectorException("object is null: did you specify it using the 'inspect()' method?"); } if(!Strings.isValid(fieldName))...
[ "public", "Object", "getFieldValue", "(", "String", "fieldName", ")", "throws", "ReflectorException", "{", "if", "(", "object", "==", "null", ")", "{", "logger", ".", "error", "(", "\"object is null: did you specify it using the 'inspect()' method?\"", ")", ";", "thro...
Retrieves the value of a field. @param fieldName the name of the field. @return the field value. @throws ReflectorException
[ "Retrieves", "the", "value", "of", "a", "field", "." ]
a5194cdaa0d6417ef4aade6ea407a1cad6e8458e
https://github.com/dihedron/dihedron-commons/blob/a5194cdaa0d6417ef4aade6ea407a1cad6e8458e/src/main/java/org/dihedron/core/reflection/Reflector.java#L143-L180
train
Gets the value of the specified field.
Of course, here is the Java code you requested: ```java public Object getFieldValue(String fieldName) throws ReflectorException { if(object == null) { logger.error("object is null: did you specify it using the 'inspect()' method?"); throw new ReflectorException("object is null: did you specify it using the 'in...
jbundle/jbundle
main/calendar/src/main/java/org/jbundle/main/calendar/db/RepeatInterval.java
RepeatInterval.setupField
public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} //if (iFieldSeq == 1) //{ // fiel...
java
public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} //if (iFieldSeq == 1) //{ // fiel...
[ "public", "BaseField", "setupField", "(", "int", "iFieldSeq", ")", "{", "BaseField", "field", "=", "null", ";", "//if (iFieldSeq == 0)", "//{", "// field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);", "// field.setHidden(true);", "//}", "//if (iFiel...
Add this field in the Record's field sequence.
[ "Add", "this", "field", "in", "the", "Record", "s", "field", "sequence", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/calendar/src/main/java/org/jbundle/main/calendar/db/RepeatInterval.java#L86-L109
train
Set up the Field in the Record header.
Of course, here is the Java code you requested: ```java public BaseField setupField(int iFieldSeq) { BaseField field = null; //if (iFieldSeq == 0) //{ // field = new CounterField(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null); // field.setHidden(true); //} ...
wisdom-framework/wisdom
extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/logger/LoggerExtension.java
LoggerExtension.loggers
@Route(method = HttpMethod.GET, uri = "/monitor/logs/loggers") public Result loggers() { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); List<LoggerModel> loggers = new ArrayList<>(); for (Logger logger : context.getLoggerList()) { loggers.add(new Logge...
java
@Route(method = HttpMethod.GET, uri = "/monitor/logs/loggers") public Result loggers() { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); List<LoggerModel> loggers = new ArrayList<>(); for (Logger logger : context.getLoggerList()) { loggers.add(new Logge...
[ "@", "Route", "(", "method", "=", "HttpMethod", ".", "GET", ",", "uri", "=", "\"/monitor/logs/loggers\"", ")", "public", "Result", "loggers", "(", ")", "{", "LoggerContext", "context", "=", "(", "LoggerContext", ")", "LoggerFactory", ".", "getILoggerFactory", ...
Gets a json form of the list of logger. @return the list of loggers as json.
[ "Gets", "a", "json", "form", "of", "the", "list", "of", "logger", "." ]
a35b6431200fec56b178c0ff60837ed73fd7874d
https://github.com/wisdom-framework/wisdom/blob/a35b6431200fec56b178c0ff60837ed73fd7874d/extensions/wisdom-monitor/src/main/java/org/wisdom/monitor/extensions/logger/LoggerExtension.java#L66-L74
train
List of loggers.
Of course, here is the Java code you requested: ```java @Route(method = HttpMethod.GET, uri = "/monitor/logs/loggers") public Result loggers() { LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); List<LoggerModel> loggers = new ArrayList<>(); for (Logger logger : con...
google/closure-compiler
src/com/google/javascript/jscomp/Compiler.java
Compiler.toSource
public String toSource(final JSModule module) { return runInCompilerThread( () -> { List<CompilerInput> inputs = module.getInputs(); int numInputs = inputs.size(); if (numInputs == 0) { return ""; } CodeBuilder cb = new CodeBuilder(); f...
java
public String toSource(final JSModule module) { return runInCompilerThread( () -> { List<CompilerInput> inputs = module.getInputs(); int numInputs = inputs.size(); if (numInputs == 0) { return ""; } CodeBuilder cb = new CodeBuilder(); f...
[ "public", "String", "toSource", "(", "final", "JSModule", "module", ")", "{", "return", "runInCompilerThread", "(", "(", ")", "->", "{", "List", "<", "CompilerInput", ">", "inputs", "=", "module", ".", "getInputs", "(", ")", ";", "int", "numInputs", "=", ...
Converts the parse tree for a module back to JS code.
[ "Converts", "the", "parse", "tree", "for", "a", "module", "back", "to", "JS", "code", "." ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Compiler.java#L2133-L2151
train
Returns a code source for a module.
Of course, here is the Java code you requested: ```java public String toSource(final JSModule module) { return runInCompilerThread( () -> { List<CompilerInput> inputs = module.getInputs(); int numInputs = inputs.size(); if (numInputs == 0) { return ""; } ...
bmatthews68/ldap-maven-plugin
format-dsml/src/main/java/com/btmatthews/maven/plugins/ldap/dsml/DSMLFormatReader.java
DSMLFormatReader.createXPath
private XPath createXPath(final String xpathString) throws JaxenException { final XPath xpath = new Dom4jXPath(xpathString); xpath.setNamespaceContext(namespaceContext); return xpath; }
java
private XPath createXPath(final String xpathString) throws JaxenException { final XPath xpath = new Dom4jXPath(xpathString); xpath.setNamespaceContext(namespaceContext); return xpath; }
[ "private", "XPath", "createXPath", "(", "final", "String", "xpathString", ")", "throws", "JaxenException", "{", "final", "XPath", "xpath", "=", "new", "Dom4jXPath", "(", "xpathString", ")", ";", "xpath", ".", "setNamespaceContext", "(", "namespaceContext", ")", ...
Create a {@link XPath} for the expression {@code xpathString}. @param xpathString The expression. @return The {@link XPath}. @throws JaxenException If there was a problem parsing the {@code xpathString} expression.
[ "Create", "a", "{", "@link", "XPath", "}", "for", "the", "expression", "{", "@code", "xpathString", "}", "." ]
02d33503c4f602482972c06cdd960f04f490a6ed
https://github.com/bmatthews68/ldap-maven-plugin/blob/02d33503c4f602482972c06cdd960f04f490a6ed/format-dsml/src/main/java/com/btmatthews/maven/plugins/ldap/dsml/DSMLFormatReader.java#L149-L153
valid
Create an XPath object from a string.
Of course, here is the Java code you requested: ```java private XPath createXPath(final String xpathString) throws JaxenException { final XPath xpath = new Dom4jXPath(xpathString); xpath.setNamespaceContext(namespaceContext); return xpath; } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DeleteLaunchTemplateVersionsResult.java
DeleteLaunchTemplateVersionsResult.setUnsuccessfullyDeletedLaunchTemplateVersions
public void setUnsuccessfullyDeletedLaunchTemplateVersions( java.util.Collection<DeleteLaunchTemplateVersionsResponseErrorItem> unsuccessfullyDeletedLaunchTemplateVersions) { if (unsuccessfullyDeletedLaunchTemplateVersions == null) { this.unsuccessfullyDeletedLaunchTemplateVersions = nul...
java
public void setUnsuccessfullyDeletedLaunchTemplateVersions( java.util.Collection<DeleteLaunchTemplateVersionsResponseErrorItem> unsuccessfullyDeletedLaunchTemplateVersions) { if (unsuccessfullyDeletedLaunchTemplateVersions == null) { this.unsuccessfullyDeletedLaunchTemplateVersions = nul...
[ "public", "void", "setUnsuccessfullyDeletedLaunchTemplateVersions", "(", "java", ".", "util", ".", "Collection", "<", "DeleteLaunchTemplateVersionsResponseErrorItem", ">", "unsuccessfullyDeletedLaunchTemplateVersions", ")", "{", "if", "(", "unsuccessfullyDeletedLaunchTemplateVersio...
<p> Information about the launch template versions that could not be deleted. </p> @param unsuccessfullyDeletedLaunchTemplateVersions Information about the launch template versions that could not be deleted.
[ "<p", ">", "Information", "about", "the", "launch", "template", "versions", "that", "could", "not", "be", "deleted", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/DeleteLaunchTemplateVersionsResult.java#L142-L151
train
Sets the value of the unsuccessfullyDeletedLaunchTemplateVersions property.
Of course, here is the Java code you requested: ```java public void setUnsuccessfullyDeletedLaunchTemplateVersions( java.util.Collection<DeleteLaunchTemplateVersionsResponseErrorItem> unsuccessfullyDeletedLaunchTemplateVersions) { if (unsuccessfullyDeletedLaunchTemplateVersions == null) { ...
objectify/objectify
src/main/java/com/googlecode/objectify/impl/KeyMetadata.java
KeyMetadata.getIncompleteKey
public IncompleteKey getIncompleteKey(final P pojo) { log.trace("Getting key from {}", pojo); if (!clazz.isAssignableFrom(pojo.getClass())) throw new IllegalArgumentException("Trying to use metadata for " + clazz.getName() + " to get key of " + pojo.getClass().getName()); final Object id = getId(pojo); fin...
java
public IncompleteKey getIncompleteKey(final P pojo) { log.trace("Getting key from {}", pojo); if (!clazz.isAssignableFrom(pojo.getClass())) throw new IllegalArgumentException("Trying to use metadata for " + clazz.getName() + " to get key of " + pojo.getClass().getName()); final Object id = getId(pojo); fin...
[ "public", "IncompleteKey", "getIncompleteKey", "(", "final", "P", "pojo", ")", "{", "log", ".", "trace", "(", "\"Getting key from {}\"", ",", "pojo", ")", ";", "if", "(", "!", "clazz", ".", "isAssignableFrom", "(", "pojo", ".", "getClass", "(", ")", ")", ...
Gets a key composed of the relevant id and parent fields in the object. @param pojo must be of the entityClass type for this metadata. @return either a Key or IncompleteKey depending on whether the id is null or not
[ "Gets", "a", "key", "composed", "of", "the", "relevant", "id", "and", "parent", "fields", "in", "the", "object", "." ]
4bf325d2e49b400326416977c7d9bbdf5380175b
https://github.com/objectify/objectify/blob/4bf325d2e49b400326416977c7d9bbdf5380175b/src/main/java/com/googlecode/objectify/impl/KeyMetadata.java#L174-L187
test
Gets the incomplete key for the given pojo.
Of course, here is the Java code you requested: ```java public IncompleteKey getIncompleteKey(final P pojo) { log.trace("Getting key from {}", pojo); if (!clazz.isAssignableFrom(pojo.getClass())) throw new IllegalArgumentException("Trying to use metadata for " + clazz.getName() + " to get key of " + pojo.getCl...
actorapp/actor-platform
actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java
ImageLoading.loadReuse
public static ReuseResult loadReuse(Uri uri, Context context, Bitmap dest) throws ImageLoadException { return loadBitmapReuse(new UriSource(uri, context), dest); }
java
public static ReuseResult loadReuse(Uri uri, Context context, Bitmap dest) throws ImageLoadException { return loadBitmapReuse(new UriSource(uri, context), dest); }
[ "public", "static", "ReuseResult", "loadReuse", "(", "Uri", "uri", ",", "Context", "context", ",", "Bitmap", "dest", ")", "throws", "ImageLoadException", "{", "return", "loadBitmapReuse", "(", "new", "UriSource", "(", "uri", ",", "context", ")", ",", "dest", ...
Loading bitmap with using reuse bitmap with the different size of source image. If it is unable to load with reuse method tries to load without it. Reuse works only for Android 4.4+ @param uri content uri for bitmap @param dest destination bitmap @param context Application Context @return result of loading @thr...
[ "Loading", "bitmap", "with", "using", "reuse", "bitmap", "with", "the", "different", "size", "of", "source", "image", ".", "If", "it", "is", "unable", "to", "load", "with", "reuse", "method", "tries", "to", "load", "without", "it", ".", "Reuse", "works", ...
5123c1584757c6eeea0ed2a0e7e043629871a0c6
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/util/images/ops/ImageLoading.java#L231-L233
train
Load a bitmap from a URI using a reuse context.
Of course, here is the Java code you requested: ```java public static ReuseResult loadReuse(Uri uri, Context context, Bitmap dest) throws ImageLoadException { return loadBitmapReuse(new UriSource(uri, context), dest); } ``` Hope this helps!
grails/gorm-hibernate5
grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java
GrailsDomainBinder.bindUnidirectionalOneToMany
protected void bindUnidirectionalOneToMany(org.grails.datastore.mapping.model.types.OneToMany property, InFlightMetadataCollector mappings, Collection collection) { Value v = collection.getElement(); v.createForeignKey(); String entityName; if (v instanceof ManyToOne) { ManyT...
java
protected void bindUnidirectionalOneToMany(org.grails.datastore.mapping.model.types.OneToMany property, InFlightMetadataCollector mappings, Collection collection) { Value v = collection.getElement(); v.createForeignKey(); String entityName; if (v instanceof ManyToOne) { ManyT...
[ "protected", "void", "bindUnidirectionalOneToMany", "(", "org", ".", "grails", ".", "datastore", ".", "mapping", ".", "model", ".", "types", ".", "OneToMany", "property", ",", "InFlightMetadataCollector", "mappings", ",", "Collection", "collection", ")", "{", "Val...
Binds a unidirectional one-to-many creating a psuedo back reference property in the process. @param property @param mappings @param collection
[ "Binds", "a", "unidirectional", "one", "-", "to", "-", "many", "creating", "a", "psuedo", "back", "reference", "property", "in", "the", "process", "." ]
0ebb80cd769ef2bea955723d4543828a3e9542ef
https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsDomainBinder.java#L917-L941
train
Binds a unidirectional OneToMany property to the metadata collector.
Of course, here is the Java code you requested: ```java protected void bindUnidirectionalOneToMany(org.grails.datastore.mapping.model.types.OneToMany property, InFlightMetadataCollector mappings, Collection collection) { Value v = collection.getElement(); v.createForeignKey(); String entityName...
QSFT/Doradus
doradus-common/src/main/java/com/dell/doradus/common/Utils.java
Utils.tokenize
public static Map<String, AtomicInteger> tokenize(String string) { Map<String, AtomicInteger> result = new HashMap<String, AtomicInteger>(); String[] tokens = string.split("\\s"); // regular expression for "all whitespace" for (String token : tokens) { // For some reasons, somet...
java
public static Map<String, AtomicInteger> tokenize(String string) { Map<String, AtomicInteger> result = new HashMap<String, AtomicInteger>(); String[] tokens = string.split("\\s"); // regular expression for "all whitespace" for (String token : tokens) { // For some reasons, somet...
[ "public", "static", "Map", "<", "String", ",", "AtomicInteger", ">", "tokenize", "(", "String", "string", ")", "{", "Map", "<", "String", ",", "AtomicInteger", ">", "result", "=", "new", "HashMap", "<", "String", ",", "AtomicInteger", ">", "(", ")", ";",...
Parse the given string and return a list of the whitespace-delimited tokens that it contains mapped to the number of occurrences of each token. Only whitespace characters (SP, CR, LF, TAB, FF, VT) are used to delimit tokens. @param string String to be tokenized. @return Map of tokens to occurrence counts.
[ "Parse", "the", "given", "string", "and", "return", "a", "list", "of", "the", "whitespace", "-", "delimited", "tokens", "that", "it", "contains", "mapped", "to", "the", "number", "of", "occurrences", "of", "each", "token", ".", "Only", "whitespace", "charact...
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-common/src/main/java/com/dell/doradus/common/Utils.java#L1886-L1905
train
Tokenize a string into a map of tokens.
Of course, here is the Java code you requested: ```java public static Map<String, AtomicInteger> tokenize(String string) { Map<String, AtomicInteger> result = new HashMap<String, AtomicInteger>(); String[] tokens = string.split("\\s"); // regular expression for "all whitespace" for (String ...
linkedin/Spyglass
spyglass/src/main/java/com/linkedin/android/spyglass/ui/RichEditorView.java
RichEditorView.onQueryReceived
@Override public List<String> onQueryReceived(@NonNull QueryToken queryToken) { List<String> buckets = null; // Pass the query token to a host receiver if (mHostQueryTokenReceiver != null) { buckets = mHostQueryTokenReceiver.onQueryReceived(queryToken); mSuggestionsAd...
java
@Override public List<String> onQueryReceived(@NonNull QueryToken queryToken) { List<String> buckets = null; // Pass the query token to a host receiver if (mHostQueryTokenReceiver != null) { buckets = mHostQueryTokenReceiver.onQueryReceived(queryToken); mSuggestionsAd...
[ "@", "Override", "public", "List", "<", "String", ">", "onQueryReceived", "(", "@", "NonNull", "QueryToken", "queryToken", ")", "{", "List", "<", "String", ">", "buckets", "=", "null", ";", "// Pass the query token to a host receiver", "if", "(", "mHostQueryTokenR...
{@inheritDoc}
[ "{" ]
3816f2da13b75e1a20b2911d1b780b73f44e1150
https://github.com/linkedin/Spyglass/blob/3816f2da13b75e1a20b2911d1b780b73f44e1150/spyglass/src/main/java/com/linkedin/android/spyglass/ui/RichEditorView.java#L307-L316
valid
Override this method to receive a query token.
Of course, here is the Java code you requested: ```java @Override public List<String> onQueryReceived(@NonNull QueryToken queryToken) { List<String> buckets = null; // Pass the query token to a host receiver if (mHostQueryTokenReceiver != null) { buckets = mHostQueryTokenReceive...
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java
StorageAccountsInner.create
public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); }
java
public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); }
[ "public", "StorageAccountInner", "create", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "StorageAccountCreateParameters", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ",", "parame...
Asynchronously creates a new storage account with the specified parameters. If an account is already created and a subsequent create request is issued with different properties, the account properties will be updated. If an account is already created and a subsequent create or update request is issued with the exact sa...
[ "Asynchronously", "creates", "a", "new", "storage", "account", "with", "the", "specified", "parameters", ".", "If", "an", "account", "is", "already", "created", "and", "a", "subsequent", "create", "request", "is", "issued", "with", "different", "properties", "th...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/StorageAccountsInner.java#L227-L229
train
Creates a new CDN image.
Of course, here is the Java code you requested: ```java public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().body(); } ``` Hope this...
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/io/csv/CsvReader.java
CsvReader.parse
public static List<String> parse(String line) { if(line == null || line.length() ==0) return null; final short START = 2; final short TERM = 3; final short QUOTED_TERM = 4; final short start_ESCAPEDDOUBLEQUOTE =5; short state = START; int length = line.length(); ArrayList<String> tokens ...
java
public static List<String> parse(String line) { if(line == null || line.length() ==0) return null; final short START = 2; final short TERM = 3; final short QUOTED_TERM = 4; final short start_ESCAPEDDOUBLEQUOTE =5; short state = START; int length = line.length(); ArrayList<String> tokens ...
[ "public", "static", "List", "<", "String", ">", "parse", "(", "String", "line", ")", "{", "if", "(", "line", "==", "null", "||", "line", ".", "length", "(", ")", "==", "0", ")", "return", "null", ";", "final", "short", "START", "=", "2", ";", "fi...
------------------------------------------------
[ "------------------------------------------------" ]
38d5b843c76eae9762bbca20453ed0f0ad8412a9
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/io/csv/CsvReader.java#L100-L195
train
Parses a line of text into a list of tokens.
Of course, here is the Java code you requested: ```java public static List<String> parse(String line) { if(line == null || line.length() ==0) return null; final short START = 2; final short TERM = 3; final short QUOTED_TERM = 4; final short start_ESCAPEDDOUBLEQUOTE =5; short state = START; ...
sdl/Testy
src/main/java/com/sdl/selenium/web/WebLocatorAbstractBuilder.java
WebLocatorAbstractBuilder.setLabel
@SuppressWarnings("unchecked") public <T extends WebLocatorAbstractBuilder> T setLabel(String label, final SearchType... searchTypes) { pathBuilder.setLabel(label, searchTypes); return (T) this; }
java
@SuppressWarnings("unchecked") public <T extends WebLocatorAbstractBuilder> T setLabel(String label, final SearchType... searchTypes) { pathBuilder.setLabel(label, searchTypes); return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "WebLocatorAbstractBuilder", ">", "T", "setLabel", "(", "String", "label", ",", "final", "SearchType", "...", "searchTypes", ")", "{", "pathBuilder", ".", "setLabel", "(", "label"...
<p><b>Used for finding element process (to generate xpath address)</b></p> @param label text label element @param searchTypes type search text element: see more details see {@link SearchType} @param <T> the element which calls this method @return this element
[ "<p", ">", "<b", ">", "Used", "for", "finding", "element", "process", "(", "to", "generate", "xpath", "address", ")", "<", "/", "b", ">", "<", "/", "p", ">" ]
b3ae061554016f926f04694a39ff00dab7576609
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/web/WebLocatorAbstractBuilder.java#L403-L407
train
Sets the label for the resource.
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public <T extends WebLocatorAbstractBuilder> T setLabel(String label, final SearchType... searchTypes) { pathBuilder.setLabel(label, searchTypes); return (T) this; } ``` Hope this helps!
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/conditions/AssertNot.java
AssertNot.negates
public boolean negates( IAssertion other) { Assert assertion = other != null && other.getClass().equals( Assert.class) ? (Assert) other : null; return assertion != null && assertion.getProperty().equals( getProperty()); }
java
public boolean negates( IAssertion other) { Assert assertion = other != null && other.getClass().equals( Assert.class) ? (Assert) other : null; return assertion != null && assertion.getProperty().equals( getProperty()); }
[ "public", "boolean", "negates", "(", "IAssertion", "other", ")", "{", "Assert", "assertion", "=", "other", "!=", "null", "&&", "other", ".", "getClass", "(", ")", ".", "equals", "(", "Assert", ".", "class", ")", "?", "(", "Assert", ")", "other", ":", ...
Returns true if this assertion negates the other.
[ "Returns", "true", "if", "this", "assertion", "negates", "the", "other", "." ]
21e15cf107fa149620c40f4bda1829c1224fcfb1
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/conditions/AssertNot.java#L54-L64
train
Checks if this assertion negates another assertion.
Of course, here is the Java code you requested: ```java public boolean negates( IAssertion other) { Assert assertion = other != null && other.getClass().equals( Assert.class) ? (Assert) other : null; return assertion != null && assertion.getProperty().equals( getProperty()); ...
apache/flink
flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/KinesisConfigUtil.java
KinesisConfigUtil.getValidatedProducerConfiguration
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (!config.containsKey(AWSConfigConstants.AWS_REGION)) { // per requirement in Amazon Kinesis Producer Library throw new Ille...
java
public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (!config.containsKey(AWSConfigConstants.AWS_REGION)) { // per requirement in Amazon Kinesis Producer Library throw new Ille...
[ "public", "static", "KinesisProducerConfiguration", "getValidatedProducerConfiguration", "(", "Properties", "config", ")", "{", "checkNotNull", "(", "config", ",", "\"config can not be null\"", ")", ";", "validateAwsConfiguration", "(", "config", ")", ";", "if", "(", "!...
Validate configuration properties for {@link FlinkKinesisProducer}, and return a constructed KinesisProducerConfiguration.
[ "Validate", "configuration", "properties", "for", "{" ]
b62db93bf63cb3bb34dd03d611a779d9e3fc61ac
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-connectors/flink-connector-kinesis/src/main/java/org/apache/flink/streaming/connectors/kinesis/util/KinesisConfigUtil.java#L230-L262
train
Returns a valid KinesisProducerConfiguration object from the given properties.
Of course, here is the Java code you requested: ```java public static KinesisProducerConfiguration getValidatedProducerConfiguration(Properties config) { checkNotNull(config, "config can not be null"); validateAwsConfiguration(config); if (!config.containsKey(AWSConfigConstants.AWS_REGION)) { // per require...
opengeospatial/teamengine
teamengine-core/src/main/java/com/occamlab/te/util/SoapUtils.java
SoapUtils.getSoapBody
public static Document getSoapBody(Document soapMessage) throws Exception { Element envelope = soapMessage.getDocumentElement(); Element body = DomUtils.getChildElement(DomUtils.getElementByTagName( envelope, envelope.getPrefix() + ":Body")); Document content = DomUtils.creat...
java
public static Document getSoapBody(Document soapMessage) throws Exception { Element envelope = soapMessage.getDocumentElement(); Element body = DomUtils.getChildElement(DomUtils.getElementByTagName( envelope, envelope.getPrefix() + ":Body")); Document content = DomUtils.creat...
[ "public", "static", "Document", "getSoapBody", "(", "Document", "soapMessage", ")", "throws", "Exception", "{", "Element", "envelope", "=", "soapMessage", ".", "getDocumentElement", "(", ")", ";", "Element", "body", "=", "DomUtils", ".", "getChildElement", "(", ...
A method to extract the content of the SOAP body. @param soapMessage the SOAP message. @return the content of the body of the input SOAP message. @author Simone Gianfranceschi
[ "A", "method", "to", "extract", "the", "content", "of", "the", "SOAP", "body", "." ]
b6b890214b6784bbe19460bf753bdf28a9514bee
https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-core/src/main/java/com/occamlab/te/util/SoapUtils.java#L87-L97
train
Get the body of the SOAP message.
Of course, here is the Java code you requested: ```java public static Document getSoapBody(Document soapMessage) throws Exception { Element envelope = soapMessage.getDocumentElement(); Element body = DomUtils.getChildElement(DomUtils.getElementByTagName( envelope, envelope.getPrefix(...