repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
218
func_name
stringlengths
4
140
whole_func_string
stringlengths
153
5.32k
language
stringclasses
1 value
func_code_string
stringlengths
72
4k
func_code_tokens
listlengths
20
832
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
647
split_name
stringclasses
1 value
func_code_url
stringlengths
102
339
fcrepo4/fcrepo4
fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/InternalFedoraBinary.java
InternalFedoraBinary.verifyChecksums
private void verifyChecksums(final Collection<URI> checksums, final Property dataProperty) throws InvalidChecksumException { """ This method ensures that the arg checksums are valid against the binary associated with the arg dataProperty. If one or more of the checksums are invalid, an InvalidChecksum...
java
private void verifyChecksums(final Collection<URI> checksums, final Property dataProperty) throws InvalidChecksumException { final Map<URI, URI> checksumErrors = new HashMap<>(); // Loop through provided checksums validating against computed values checksums.forEach(checksum -> { ...
[ "private", "void", "verifyChecksums", "(", "final", "Collection", "<", "URI", ">", "checksums", ",", "final", "Property", "dataProperty", ")", "throws", "InvalidChecksumException", "{", "final", "Map", "<", "URI", ",", "URI", ">", "checksumErrors", "=", "new", ...
This method ensures that the arg checksums are valid against the binary associated with the arg dataProperty. If one or more of the checksums are invalid, an InvalidChecksumException is thrown. @param checksums that the user provided @param dataProperty containing the binary against which the checksums will be verifie...
[ "This", "method", "ensures", "that", "the", "arg", "checksums", "are", "valid", "against", "the", "binary", "associated", "with", "the", "arg", "dataProperty", ".", "If", "one", "or", "more", "of", "the", "checksums", "are", "invalid", "an", "InvalidChecksumEx...
train
https://github.com/fcrepo4/fcrepo4/blob/7489ad5bc8fb44e2442c93eceb7d97ac54553ab6/fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/InternalFedoraBinary.java#L200-L243
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractInput.java
AbstractInput.createMandatoryDiagnostic
protected Diagnostic createMandatoryDiagnostic() { """ <p> This method is called by validateComponent to create the mandatory diagnostic error message if the mandatory validation check does not pass. </p> <p> Subclasses may override this method to customise the message, however in most cases it is easier to s...
java
protected Diagnostic createMandatoryDiagnostic() { String errorMessage = getComponentModel().errorMessage; String msg = errorMessage == null ? InternalMessages.DEFAULT_VALIDATION_ERROR_MANDATORY : errorMessage; return createErrorDiagnostic(msg, this); }
[ "protected", "Diagnostic", "createMandatoryDiagnostic", "(", ")", "{", "String", "errorMessage", "=", "getComponentModel", "(", ")", ".", "errorMessage", ";", "String", "msg", "=", "errorMessage", "==", "null", "?", "InternalMessages", ".", "DEFAULT_VALIDATION_ERROR_M...
<p> This method is called by validateComponent to create the mandatory diagnostic error message if the mandatory validation check does not pass. </p> <p> Subclasses may override this method to customise the message, however in most cases it is easier to supply a custom error message pattern to the setMandatory method. ...
[ "<p", ">", "This", "method", "is", "called", "by", "validateComponent", "to", "create", "the", "mandatory", "diagnostic", "error", "message", "if", "the", "mandatory", "validation", "check", "does", "not", "pass", ".", "<", "/", "p", ">", "<p", ">", "Subcl...
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/AbstractInput.java#L96-L100
52inc/android-52Kit
library-drawer/src/main/java/com/ftinc/kit/drawer/items/ActionDrawerItem.java
ActionDrawerItem.onCreateView
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, int highlightColor) { """ Called to create this view @param inflater the layout inflater to inflate a layout from system @param container the container the layout is going to be placed in @return """ Cont...
java
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, int highlightColor) { Context ctx = inflater.getContext(); View view = inflater.inflate(R.layout.navdrawer_item, container, false); ImageView iconView = ButterKnife.findById(view, R.id.icon); TextView t...
[ "@", "Override", "public", "View", "onCreateView", "(", "LayoutInflater", "inflater", ",", "ViewGroup", "container", ",", "int", "highlightColor", ")", "{", "Context", "ctx", "=", "inflater", ".", "getContext", "(", ")", ";", "View", "view", "=", "inflater", ...
Called to create this view @param inflater the layout inflater to inflate a layout from system @param container the container the layout is going to be placed in @return
[ "Called", "to", "create", "this", "view" ]
train
https://github.com/52inc/android-52Kit/blob/8644fab0f633477b1bb1dddd8147a9ef8bc03516/library-drawer/src/main/java/com/ftinc/kit/drawer/items/ActionDrawerItem.java#L61-L88
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java
Normalization.zeromeanUnitVariance
public static JavaRDD<List<Writable>> zeromeanUnitVariance(Schema schema, JavaRDD<List<Writable>> data) { """ Normalize by zero mean unit variance @param schema the schema to use to create the data frame @param data the data to normalize @return a zero mean unit variance centered rdd """ retur...
java
public static JavaRDD<List<Writable>> zeromeanUnitVariance(Schema schema, JavaRDD<List<Writable>> data) { return zeromeanUnitVariance(schema, data, Collections.<String>emptyList()); }
[ "public", "static", "JavaRDD", "<", "List", "<", "Writable", ">", ">", "zeromeanUnitVariance", "(", "Schema", "schema", ",", "JavaRDD", "<", "List", "<", "Writable", ">", ">", "data", ")", "{", "return", "zeromeanUnitVariance", "(", "schema", ",", "data", ...
Normalize by zero mean unit variance @param schema the schema to use to create the data frame @param data the data to normalize @return a zero mean unit variance centered rdd
[ "Normalize", "by", "zero", "mean", "unit", "variance" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java#L62-L64
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.getPlan
public Plan getPlan(final String planCode) { """ Get a Plan's details <p> @param planCode recurly id of plan @return the plan object as identified by the passed in ID """ if (planCode == null || planCode.isEmpty()) throw new RuntimeException("planCode cannot be empty!"); retur...
java
public Plan getPlan(final String planCode) { if (planCode == null || planCode.isEmpty()) throw new RuntimeException("planCode cannot be empty!"); return doGET(Plan.PLANS_RESOURCE + "/" + planCode, Plan.class); }
[ "public", "Plan", "getPlan", "(", "final", "String", "planCode", ")", "{", "if", "(", "planCode", "==", "null", "||", "planCode", ".", "isEmpty", "(", ")", ")", "throw", "new", "RuntimeException", "(", "\"planCode cannot be empty!\"", ")", ";", "return", "do...
Get a Plan's details <p> @param planCode recurly id of plan @return the plan object as identified by the passed in ID
[ "Get", "a", "Plan", "s", "details", "<p", ">" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L1377-L1382
google/error-prone
core/src/main/java/com/google/errorprone/refaster/ExpressionTemplate.java
ExpressionTemplate.replace
@Override public Fix replace(ExpressionTemplateMatch match) { """ Generates a {@link SuggestedFix} replacing the specified match (usually of another template) with this template. """ Inliner inliner = match.createInliner(); Context context = inliner.getContext(); if (annotations().containsKey(Us...
java
@Override public Fix replace(ExpressionTemplateMatch match) { Inliner inliner = match.createInliner(); Context context = inliner.getContext(); if (annotations().containsKey(UseImportPolicy.class)) { ImportPolicy.bind(context, annotations().getInstance(UseImportPolicy.class).value()); } else { ...
[ "@", "Override", "public", "Fix", "replace", "(", "ExpressionTemplateMatch", "match", ")", "{", "Inliner", "inliner", "=", "match", ".", "createInliner", "(", ")", ";", "Context", "context", "=", "inliner", ".", "getContext", "(", ")", ";", "if", "(", "ann...
Generates a {@link SuggestedFix} replacing the specified match (usually of another template) with this template.
[ "Generates", "a", "{" ]
train
https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/refaster/ExpressionTemplate.java#L222-L243
apache/predictionio-sdk-java
client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java
EventClient.setUserAsFuture
public FutureAPIResponse setUserAsFuture(String uid, Map<String, Object> properties) throws IOException { """ Sends a set user properties request. Same as {@link #setUserAsFuture(String, Map, DateTime) setUserAsFuture(String, Map&lt;String, Object&gt;, DateTime)} except event time is not specified and reco...
java
public FutureAPIResponse setUserAsFuture(String uid, Map<String, Object> properties) throws IOException { return setUserAsFuture(uid, properties, new DateTime()); }
[ "public", "FutureAPIResponse", "setUserAsFuture", "(", "String", "uid", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "throws", "IOException", "{", "return", "setUserAsFuture", "(", "uid", ",", "properties", ",", "new", "DateTime", "(", ")"...
Sends a set user properties request. Same as {@link #setUserAsFuture(String, Map, DateTime) setUserAsFuture(String, Map&lt;String, Object&gt;, DateTime)} except event time is not specified and recorded as the time when the function is called.
[ "Sends", "a", "set", "user", "properties", "request", ".", "Same", "as", "{" ]
train
https://github.com/apache/predictionio-sdk-java/blob/16052c96b136340c175c3f9c2692e720850df219/client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java#L310-L313
indeedeng/proctor
proctor-consumer/src/main/java/com/indeed/proctor/consumer/ProctorConsumerUtils.java
ProctorConsumerUtils.setForcedGroupsCookie
public static void setForcedGroupsCookie(final HttpServletRequest request, final HttpServletResponse response, final Map<String, Integer> forceGroups) { """ Set a cookie that will be parsed by {@link #parseForcedGroups(HttpServletRequest)}. Cookie expires at end of browser session @param request request @param ...
java
public static void setForcedGroupsCookie(final HttpServletRequest request, final HttpServletResponse response, final Map<String, Integer> forceGroups) { // don't overwrite with empty; this would be relevant in a race condition where there is a forceGroups request simultaneous with a non-forceGroups request ...
[ "public", "static", "void", "setForcedGroupsCookie", "(", "final", "HttpServletRequest", "request", ",", "final", "HttpServletResponse", "response", ",", "final", "Map", "<", "String", ",", "Integer", ">", "forceGroups", ")", "{", "// don't overwrite with empty; this w...
Set a cookie that will be parsed by {@link #parseForcedGroups(HttpServletRequest)}. Cookie expires at end of browser session @param request request @param response response @param forceGroups parsed force groups
[ "Set", "a", "cookie", "that", "will", "be", "parsed", "by", "{" ]
train
https://github.com/indeedeng/proctor/blob/b7795acfc26a30d013655d0e0fa1d3f8d0576571/proctor-consumer/src/main/java/com/indeed/proctor/consumer/ProctorConsumerUtils.java#L135-L164
stackify/stackify-api-java
src/main/java/com/stackify/api/common/ApiConfigurations.java
ApiConfigurations.fromPropertiesWithOverrides
public static ApiConfiguration fromPropertiesWithOverrides(final String apiUrl, final String apiKey, final String application, final String environment) { """ Explicitly configure the API @param apiUrl API URL @param apiKey API Key @param application Configured application name @param environment Configured en...
java
public static ApiConfiguration fromPropertiesWithOverrides(final String apiUrl, final String apiKey, final String application, final String environment) { return fromPropertiesWithOverrides(apiUrl, apiKey, application, environment, null); }
[ "public", "static", "ApiConfiguration", "fromPropertiesWithOverrides", "(", "final", "String", "apiUrl", ",", "final", "String", "apiKey", ",", "final", "String", "application", ",", "final", "String", "environment", ")", "{", "return", "fromPropertiesWithOverrides", ...
Explicitly configure the API @param apiUrl API URL @param apiKey API Key @param application Configured application name @param environment Configured environment name @return ApiConfiguration
[ "Explicitly", "configure", "the", "API" ]
train
https://github.com/stackify/stackify-api-java/blob/d3000b7c87ed53a88b302939b0c88405d63d7b67/src/main/java/com/stackify/api/common/ApiConfigurations.java#L43-L45
alkacon/opencms-core
src/org/opencms/flex/CmsFlexController.java
CmsFlexController.removeUncacheableAttributes
public void removeUncacheableAttributes(Map<String, Object> attributeMap) { """ Removes request attributes which shouldn't be cached in flex cache entries from a map.<p> @param attributeMap the map of attributes """ for (String uncacheableAttribute : uncacheableAttributes) { attributeMa...
java
public void removeUncacheableAttributes(Map<String, Object> attributeMap) { for (String uncacheableAttribute : uncacheableAttributes) { attributeMap.remove(uncacheableAttribute); } attributeMap.remove(CmsFlexController.ATTRIBUTE_NAME); attributeMap.remove(CmsDetailPageResour...
[ "public", "void", "removeUncacheableAttributes", "(", "Map", "<", "String", ",", "Object", ">", "attributeMap", ")", "{", "for", "(", "String", "uncacheableAttribute", ":", "uncacheableAttributes", ")", "{", "attributeMap", ".", "remove", "(", "uncacheableAttribute"...
Removes request attributes which shouldn't be cached in flex cache entries from a map.<p> @param attributeMap the map of attributes
[ "Removes", "request", "attributes", "which", "shouldn", "t", "be", "cached", "in", "flex", "cache", "entries", "from", "a", "map", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexController.java#L630-L638
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java
MapEntryLite.serializeTo
public void serializeTo(CodedOutputStream output, int fieldNumber, K key, V value) throws IOException { """ Serializes the provided key and value as though they were wrapped by a {@link MapEntryLite} to the output stream. This helper method avoids allocation of a {@link MapEntryLite} built with a key and value an...
java
public void serializeTo(CodedOutputStream output, int fieldNumber, K key, V value) throws IOException { output.writeTag(fieldNumber, WireFormat.WIRETYPE_LENGTH_DELIMITED); output.writeUInt32NoTag(computeSerializedSize(metadata, key, value)); writeTo(output, metadata, key, value); }
[ "public", "void", "serializeTo", "(", "CodedOutputStream", "output", ",", "int", "fieldNumber", ",", "K", "key", ",", "V", "value", ")", "throws", "IOException", "{", "output", ".", "writeTag", "(", "fieldNumber", ",", "WireFormat", ".", "WIRETYPE_LENGTH_DELIMIT...
Serializes the provided key and value as though they were wrapped by a {@link MapEntryLite} to the output stream. This helper method avoids allocation of a {@link MapEntryLite} built with a key and value and is called from generated code directly. @param output the output @param fieldNumber the field number @param key...
[ "Serializes", "the", "provided", "key", "and", "value", "as", "though", "they", "were", "wrapped", "by", "a", "{", "@link", "MapEntryLite", "}", "to", "the", "output", "stream", ".", "This", "helper", "method", "avoids", "allocation", "of", "a", "{", "@lin...
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java#L232-L236
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java
AbstractFaxClientSpi.fireFaxEvent
protected void fireFaxEvent(FaxClientActionEventID id,FaxJob faxJob) { """ This function fires a new fax event. @param id The fax event ID @param faxJob The fax job """ //create new fax event FaxClientActionEvent event=new FaxClientActionEvent(id,faxJob); //get listeners ...
java
protected void fireFaxEvent(FaxClientActionEventID id,FaxJob faxJob) { //create new fax event FaxClientActionEvent event=new FaxClientActionEvent(id,faxJob); //get listeners FaxClientActionEventListener[] listeners=null; synchronized(this.faxClientActionEventListeners) ...
[ "protected", "void", "fireFaxEvent", "(", "FaxClientActionEventID", "id", ",", "FaxJob", "faxJob", ")", "{", "//create new fax event", "FaxClientActionEvent", "event", "=", "new", "FaxClientActionEvent", "(", "id", ",", "faxJob", ")", ";", "//get listeners", "FaxClien...
This function fires a new fax event. @param id The fax event ID @param faxJob The fax job
[ "This", "function", "fires", "a", "new", "fax", "event", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxClientSpi.java#L529-L573
RKumsher/utils
src/main/java/com/github/rkumsher/collection/ArrayUtils.java
ArrayUtils.containsAll
@SafeVarargs public static <T> boolean containsAll(T[] arrayToCheck, T... elementsToCheckFor) { """ Returns whether or not the given array contains all the given elements to check for. <pre> ArrayUtils.containsAll(new String[] {}) = true; ArrayUtils.containsAll(new String[] {"a"}, "a") = true; ArrayUtils.c...
java
@SafeVarargs public static <T> boolean containsAll(T[] arrayToCheck, T... elementsToCheckFor) { return containsAll(arrayToCheck, Arrays.asList(elementsToCheckFor)); }
[ "@", "SafeVarargs", "public", "static", "<", "T", ">", "boolean", "containsAll", "(", "T", "[", "]", "arrayToCheck", ",", "T", "...", "elementsToCheckFor", ")", "{", "return", "containsAll", "(", "arrayToCheck", ",", "Arrays", ".", "asList", "(", "elementsTo...
Returns whether or not the given array contains all the given elements to check for. <pre> ArrayUtils.containsAll(new String[] {}) = true; ArrayUtils.containsAll(new String[] {"a"}, "a") = true; ArrayUtils.containsAll(new String[] {"a"}, "b") = false; ArrayUtils.containsAll(new String[] {"a", "b"}, "a", "b", "a", "b")...
[ "Returns", "whether", "or", "not", "the", "given", "array", "contains", "all", "the", "given", "elements", "to", "check", "for", "." ]
train
https://github.com/RKumsher/utils/blob/fcdb190569cd0288249bf4b46fd418f8c01d1caf/src/main/java/com/github/rkumsher/collection/ArrayUtils.java#L78-L81
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java
RecordChangedHandler.doRecordChange
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { """ Called when a change is the record status is about to happen/has happened. This method sets the field to the current time on an add or update. @param field If this file change is due to a field, this is the field. @param c...
java
public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record if ((this.getOwner().getMasterSlave() & RecordOwner.SLAVE) != 0) { // Only do this in the slave and shared code switch (iChangeType) { case DBConstants.REFRESH_TYPE: ...
[ "public", "int", "doRecordChange", "(", "FieldInfo", "field", ",", "int", "iChangeType", ",", "boolean", "bDisplayOption", ")", "{", "// Read a valid record", "if", "(", "(", "this", ".", "getOwner", "(", ")", ".", "getMasterSlave", "(", ")", "&", "RecordOwner...
Called when a change is the record status is about to happen/has happened. This method sets the field to the current time on an add or update. @param field If this file change is due to a field, this is the field. @param changeType The type of change that occurred. @param bDisplayOption If true, display any changes. @r...
[ "Called", "when", "a", "change", "is", "the", "record", "status", "is", "about", "to", "happen", "/", "has", "happened", ".", "This", "method", "sets", "the", "field", "to", "the", "current", "time", "on", "an", "add", "or", "update", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/event/RecordChangedHandler.java#L101-L126
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/ui/groupeditor/CmsGroupContainerEditor.java
CmsGroupContainerEditor.openGroupcontainerEditor
public static CmsGroupContainerEditor openGroupcontainerEditor( CmsGroupContainerElementPanel groupContainer, CmsContainerpageController controller, CmsContainerpageHandler handler) { """ Opens the group container editor.<p> @param groupContainer the group container @param controller...
java
public static CmsGroupContainerEditor openGroupcontainerEditor( CmsGroupContainerElementPanel groupContainer, CmsContainerpageController controller, CmsContainerpageHandler handler) { // making sure only a single instance of the group-container editor is open if (INSTANCE ...
[ "public", "static", "CmsGroupContainerEditor", "openGroupcontainerEditor", "(", "CmsGroupContainerElementPanel", "groupContainer", ",", "CmsContainerpageController", "controller", ",", "CmsContainerpageHandler", "handler", ")", "{", "// making sure only a single instance of the group-c...
Opens the group container editor.<p> @param groupContainer the group container @param controller the container page controller @param handler the container page handler @return the editor instance
[ "Opens", "the", "group", "container", "editor", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/ui/groupeditor/CmsGroupContainerEditor.java#L134-L150
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java
CQLTranslator.buildEmbeddedValue
private void buildEmbeddedValue(final Object record, MetamodelImpl metaModel, StringBuilder embeddedValueBuilder, SingularAttribute attribute) { """ Builds the embedded value. @param record the record @param metaModel the meta model @param embeddedValueBuilder the embedded value builder @param...
java
private void buildEmbeddedValue(final Object record, MetamodelImpl metaModel, StringBuilder embeddedValueBuilder, SingularAttribute attribute) { // TODO Auto-generated method stub Field field = (Field) attribute.getJavaMember(); EmbeddableType embeddableKey = metaModel.embeddabl...
[ "private", "void", "buildEmbeddedValue", "(", "final", "Object", "record", ",", "MetamodelImpl", "metaModel", ",", "StringBuilder", "embeddedValueBuilder", ",", "SingularAttribute", "attribute", ")", "{", "// TODO Auto-generated method stub", "Field", "field", "=", "(", ...
Builds the embedded value. @param record the record @param metaModel the meta model @param embeddedValueBuilder the embedded value builder @param attribute the attribute
[ "Builds", "the", "embedded", "value", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L684-L731
apache/incubator-druid
core/src/main/java/org/apache/druid/utils/CompressionUtils.java
CompressionUtils.getGzBaseName
public static String getGzBaseName(String fname) { """ Get the file name without the .gz extension @param fname The name of the gzip file @return fname without the ".gz" extension @throws IAE if fname is not a valid "*.gz" file name """ final String reducedFname = Files.getNameWithoutExtension(fna...
java
public static String getGzBaseName(String fname) { final String reducedFname = Files.getNameWithoutExtension(fname); if (isGz(fname) && !reducedFname.isEmpty()) { return reducedFname; } throw new IAE("[%s] is not a valid gz file name", fname); }
[ "public", "static", "String", "getGzBaseName", "(", "String", "fname", ")", "{", "final", "String", "reducedFname", "=", "Files", ".", "getNameWithoutExtension", "(", "fname", ")", ";", "if", "(", "isGz", "(", "fname", ")", "&&", "!", "reducedFname", ".", ...
Get the file name without the .gz extension @param fname The name of the gzip file @return fname without the ".gz" extension @throws IAE if fname is not a valid "*.gz" file name
[ "Get", "the", "file", "name", "without", "the", ".", "gz", "extension" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/core/src/main/java/org/apache/druid/utils/CompressionUtils.java#L563-L570
elki-project/elki
elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/LogPanel.java
LogPanel.updateProgressBar
private void updateProgressBar(Progress prog, JProgressBar pbar) { """ Update a progress bar @param prog Progress @param pbar Associated progress bar """ if(prog instanceof FiniteProgress) { pbar.setValue(((FiniteProgress) prog).getProcessed()); pbar.setString(((FiniteProgress) prog).toStri...
java
private void updateProgressBar(Progress prog, JProgressBar pbar) { if(prog instanceof FiniteProgress) { pbar.setValue(((FiniteProgress) prog).getProcessed()); pbar.setString(((FiniteProgress) prog).toString()); } else if(prog instanceof IndefiniteProgress) { pbar.setValue(((IndefiniteProgr...
[ "private", "void", "updateProgressBar", "(", "Progress", "prog", ",", "JProgressBar", "pbar", ")", "{", "if", "(", "prog", "instanceof", "FiniteProgress", ")", "{", "pbar", ".", "setValue", "(", "(", "(", "FiniteProgress", ")", "prog", ")", ".", "getProcesse...
Update a progress bar @param prog Progress @param pbar Associated progress bar
[ "Update", "a", "progress", "bar" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-gui-minigui/src/main/java/de/lmu/ifi/dbs/elki/gui/util/LogPanel.java#L167-L184
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.setBoolean
public <T extends Model> T setBoolean(String attributeName, Object value) { """ Sets attribute value as <code>Boolean</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Boolean</code>, given the value is an instance of <code>S</co...
java
public <T extends Model> T setBoolean(String attributeName, Object value) { Converter<Object, Boolean> converter = modelRegistryLocal.converterForValue(attributeName, value, Boolean.class); return setRaw(attributeName, converter != null ? converter.convert(value) : Convert.toBoolean(value)); }
[ "public", "<", "T", "extends", "Model", ">", "T", "setBoolean", "(", "String", "attributeName", ",", "Object", "value", ")", "{", "Converter", "<", "Object", ",", "Boolean", ">", "converter", "=", "modelRegistryLocal", ".", "converterForValue", "(", "attribute...
Sets attribute value as <code>Boolean</code>. If there is a {@link Converter} registered for the attribute that converts from Class <code>S</code> to Class <code>java.lang.Boolean</code>, given the value is an instance of <code>S</code>, then it will be used, otherwise performs a conversion using {@link Convert#toBoole...
[ "Sets", "attribute", "value", "as", "<code", ">", "Boolean<", "/", "code", ">", ".", "If", "there", "is", "a", "{", "@link", "Converter", "}", "registered", "for", "the", "attribute", "that", "converts", "from", "Class", "<code", ">", "S<", "/", "code", ...
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L1848-L1851
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java
WebConfigParamUtils.getBooleanInitParameter
public static boolean getBooleanInitParameter(ExternalContext context, String[] names, boolean defaultValue) { """ Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param ...
java
public static boolean getBooleanInitParameter(ExternalContext context, String[] names, boolean defaultValue) { if (names == null) { throw new NullPointerException(); } String param = null; for (String name : names) { if (name == null) ...
[ "public", "static", "boolean", "getBooleanInitParameter", "(", "ExternalContext", "context", ",", "String", "[", "]", "names", ",", "boolean", "defaultValue", ")", "{", "if", "(", "names", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")...
Gets the boolean init parameter value from the specified context. If the parameter was not specified, the default value is used instead. @param context the application's external context @param names the init parameter's names @param defaultValue the default value to return in case the parameter was not set @return t...
[ "Gets", "the", "boolean", "init", "parameter", "value", "from", "the", "specified", "context", ".", "If", "the", "parameter", "was", "not", "specified", "the", "default", "value", "is", "used", "instead", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/shared/util/WebConfigParamUtils.java#L318-L347
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java
GVRPose.getLocalMatrix
public void getLocalMatrix(int boneindex, Matrix4f mtx) { """ Get the local rotation matrix for this bone (relative to parent). @param mtx where to store bone matrix. @param boneindex zero based index of bone to get matrix for. @return local matrix for the designated bone. @see #getWorldRotation @see #getL...
java
public void getLocalMatrix(int boneindex, Matrix4f mtx) { Bone bone = mBones[boneindex]; if ((bone.Changed & (WORLD_ROT | WORLD_POS)) != 0) { calcLocal(bone, mSkeleton.getParentBoneIndex(boneindex)); } bone.getLocalMatrix(mtx); }
[ "public", "void", "getLocalMatrix", "(", "int", "boneindex", ",", "Matrix4f", "mtx", ")", "{", "Bone", "bone", "=", "mBones", "[", "boneindex", "]", ";", "if", "(", "(", "bone", ".", "Changed", "&", "(", "WORLD_ROT", "|", "WORLD_POS", ")", ")", "!=", ...
Get the local rotation matrix for this bone (relative to parent). @param mtx where to store bone matrix. @param boneindex zero based index of bone to get matrix for. @return local matrix for the designated bone. @see #getWorldRotation @see #getLocalRotation @see GVRSkeleton#setBoneAxis
[ "Get", "the", "local", "rotation", "matrix", "for", "this", "bone", "(", "relative", "to", "parent", ")", ".", "@param", "mtx", "where", "to", "store", "bone", "matrix", ".", "@param", "boneindex", "zero", "based", "index", "of", "bone", "to", "get", "ma...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java#L489-L498
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/word/Word07Writer.java
Word07Writer.addText
public Word07Writer addText(ParagraphAlignment align, Font font, String... texts) { """ 增加一个段落 @param align 段落对齐方式{@link ParagraphAlignment} @param font 字体信息{@link Font} @param texts 段落中的文本,支持多个文本作为一个段落 @return this """ final XWPFParagraph p = this.doc.createParagraph(); if (null != align) { p....
java
public Word07Writer addText(ParagraphAlignment align, Font font, String... texts) { final XWPFParagraph p = this.doc.createParagraph(); if (null != align) { p.setAlignment(align); } if (ArrayUtil.isNotEmpty(texts)) { XWPFRun run; for (String text : texts) { run = p.createRun(); run.set...
[ "public", "Word07Writer", "addText", "(", "ParagraphAlignment", "align", ",", "Font", "font", ",", "String", "...", "texts", ")", "{", "final", "XWPFParagraph", "p", "=", "this", ".", "doc", ".", "createParagraph", "(", ")", ";", "if", "(", "null", "!=", ...
增加一个段落 @param align 段落对齐方式{@link ParagraphAlignment} @param font 字体信息{@link Font} @param texts 段落中的文本,支持多个文本作为一个段落 @return this
[ "增加一个段落" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/word/Word07Writer.java#L109-L128
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/projections/CanvasSize.java
CanvasSize.clipToMargin
public boolean clipToMargin(double[] origin, double[] target) { """ Clip a line on the margin (modifies arrays!) @param origin Origin point, <b>will be modified</b> @param target Target point, <b>will be modified</b> @return {@code false} if entirely outside the margin """ assert (target.length == 2 &...
java
public boolean clipToMargin(double[] origin, double[] target) { assert (target.length == 2 && origin.length == 2); if ((origin[0] < minx && target[0] < minx) // || (origin[0] > maxx && target[0] > maxx) // || (origin[1] < miny && target[1] < miny) // || (origin[1] > maxy && target[1] > m...
[ "public", "boolean", "clipToMargin", "(", "double", "[", "]", "origin", ",", "double", "[", "]", "target", ")", "{", "assert", "(", "target", ".", "length", "==", "2", "&&", "origin", ".", "length", "==", "2", ")", ";", "if", "(", "(", "origin", "[...
Clip a line on the margin (modifies arrays!) @param origin Origin point, <b>will be modified</b> @param target Target point, <b>will be modified</b> @return {@code false} if entirely outside the margin
[ "Clip", "a", "line", "on", "the", "margin", "(", "modifies", "arrays!", ")" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/projections/CanvasSize.java#L141-L165
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/doc/DocClient.java
DocClient.getNotification
public GetNotificationResponse getNotification(GetNotificationRequest request) { """ Get your doc notification by doc notification name. @param request The request object containing all parameters for getting doc notification. @return Your doc notification. """ checkNotNull(request, "The paramete...
java
public GetNotificationResponse getNotification(GetNotificationRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getName(), "The parameter name should NOT be null or empty string."); InternalRequest internalRequest = createRequest(H...
[ "public", "GetNotificationResponse", "getNotification", "(", "GetNotificationRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"The parameter request should NOT be null.\"", ")", ";", "checkStringNotEmpty", "(", "request", ".", "getName", "(", ")", ","...
Get your doc notification by doc notification name. @param request The request object containing all parameters for getting doc notification. @return Your doc notification.
[ "Get", "your", "doc", "notification", "by", "doc", "notification", "name", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L869-L875
stephanenicolas/robospice
robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceService.java
SpiceService.createRequestProcessor
protected RequestProcessor createRequestProcessor(CacheManager cacheManager, RequestProgressManager requestProgressManager, RequestRunner requestRunner) { """ Factory method to create an entity responsible for processing requests send to the SpiceService. The default implementation of this method will return a {...
java
protected RequestProcessor createRequestProcessor(CacheManager cacheManager, RequestProgressManager requestProgressManager, RequestRunner requestRunner) { return new RequestProcessor(cacheManager, requestProgressManager, requestRunner); }
[ "protected", "RequestProcessor", "createRequestProcessor", "(", "CacheManager", "cacheManager", ",", "RequestProgressManager", "requestProgressManager", ",", "RequestRunner", "requestRunner", ")", "{", "return", "new", "RequestProcessor", "(", "cacheManager", ",", "requestPro...
Factory method to create an entity responsible for processing requests send to the SpiceService. The default implementation of this method will return a {@link RequestProcessor}. Override this method if you want to inject a custom request processor. This feature has been implemented following a request from Christopher...
[ "Factory", "method", "to", "create", "an", "entity", "responsible", "for", "processing", "requests", "send", "to", "the", "SpiceService", ".", "The", "default", "implementation", "of", "this", "method", "will", "return", "a", "{" ]
train
https://github.com/stephanenicolas/robospice/blob/8bffde88b3534a961a13cab72a8f07a755f0a0fe/robospice-core-parent/robospice/src/main/java/com/octo/android/robospice/SpiceService.java#L171-L173
visallo/vertexium
elasticsearch5/src/main/java/org/vertexium/elasticsearch5/utils/Murmur3.java
Murmur3.hash64
public static long hash64(byte[] data, int offset, int length, int seed) { """ Murmur3 64-bit variant. This is essentially MSB 8 bytes of Murmur3 128-bit variant. @param data - input byte array @param length - length of array @param seed - seed. (default is 0) @return - hashcode """ long hash...
java
public static long hash64(byte[] data, int offset, int length, int seed) { long hash = seed; final int nblocks = length >> 3; // body for (int i = 0; i < nblocks; i++) { final int i8 = i << 3; long k = ((long) data[offset + i8] & 0xff) | (((long) ...
[ "public", "static", "long", "hash64", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "length", ",", "int", "seed", ")", "{", "long", "hash", "=", "seed", ";", "final", "int", "nblocks", "=", "length", ">>", "3", ";", "// body", "f...
Murmur3 64-bit variant. This is essentially MSB 8 bytes of Murmur3 128-bit variant. @param data - input byte array @param length - length of array @param seed - seed. (default is 0) @return - hashcode
[ "Murmur3", "64", "-", "bit", "variant", ".", "This", "is", "essentially", "MSB", "8", "bytes", "of", "Murmur3", "128", "-", "bit", "variant", "." ]
train
https://github.com/visallo/vertexium/blob/bb132b5425ac168957667164e1409b78adbea769/elasticsearch5/src/main/java/org/vertexium/elasticsearch5/utils/Murmur3.java#L130-L183
alkacon/opencms-core
src/org/opencms/ade/configuration/formatters/CmsFormatterConfigurationCache.java
CmsFormatterConfigurationCache.readFormatter
protected I_CmsFormatterBean readFormatter(CmsUUID structureId) { """ Reads a formatter given its structure id and returns it, or null if the formatter couldn't be read.<p> @param structureId the structure id of the formatter configuration @return the formatter bean, or null if no formatter could be read for...
java
protected I_CmsFormatterBean readFormatter(CmsUUID structureId) { I_CmsFormatterBean formatterBean = null; CmsResource formatterRes = null; try { formatterRes = m_cms.readResource(structureId); CmsFile formatterFile = m_cms.readFile(formatterRes); CmsFormatte...
[ "protected", "I_CmsFormatterBean", "readFormatter", "(", "CmsUUID", "structureId", ")", "{", "I_CmsFormatterBean", "formatterBean", "=", "null", ";", "CmsResource", "formatterRes", "=", "null", ";", "try", "{", "formatterRes", "=", "m_cms", ".", "readResource", "(",...
Reads a formatter given its structure id and returns it, or null if the formatter couldn't be read.<p> @param structureId the structure id of the formatter configuration @return the formatter bean, or null if no formatter could be read for some reason
[ "Reads", "a", "formatter", "given", "its", "structure", "id", "and", "returns", "it", "or", "null", "if", "the", "formatter", "couldn", "t", "be", "read", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/formatters/CmsFormatterConfigurationCache.java#L334-L359
jamesagnew/hapi-fhir
hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/tags/Cycle.java
Cycle.render
@Override public Object render(Map<String, Object> context, LNode... nodes) { """ /* Cycle is usually used within a loop to alternate between values, like colors or DOM classes. """ // The group-name is either the first token-expression, or if that is // null (indicating there is no name...
java
@Override public Object render(Map<String, Object> context, LNode... nodes) { // The group-name is either the first token-expression, or if that is // null (indicating there is no name), give it the name PREPEND followed // by the number of expressions in the cycle-group. String gro...
[ "@", "Override", "public", "Object", "render", "(", "Map", "<", "String", ",", "Object", ">", "context", ",", "LNode", "...", "nodes", ")", "{", "// The group-name is either the first token-expression, or if that is", "// null (indicating there is no name), give it the name P...
/* Cycle is usually used within a loop to alternate between values, like colors or DOM classes.
[ "/", "*", "Cycle", "is", "usually", "used", "within", "a", "loop", "to", "alternate", "between", "values", "like", "colors", "or", "DOM", "classes", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-narrativegenerator/src/main/java/ca/uhn/fhir/narrative/template/tags/Cycle.java#L18-L52
jwtk/jjwt
api/src/main/java/io/jsonwebtoken/lang/Assert.java
Assert.doesNotContain
public static void doesNotContain(String textToSearch, String substring, String message) { """ Assert that the given text does not contain the given substring. <pre class="code">Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");</pre> @param textToSearch the text to search @param substring the s...
java
public static void doesNotContain(String textToSearch, String substring, String message) { if (Strings.hasLength(textToSearch) && Strings.hasLength(substring) && textToSearch.indexOf(substring) != -1) { throw new IllegalArgumentException(message); } }
[ "public", "static", "void", "doesNotContain", "(", "String", "textToSearch", ",", "String", "substring", ",", "String", "message", ")", "{", "if", "(", "Strings", ".", "hasLength", "(", "textToSearch", ")", "&&", "Strings", ".", "hasLength", "(", "substring", ...
Assert that the given text does not contain the given substring. <pre class="code">Assert.doesNotContain(name, "rod", "Name must not contain 'rod'");</pre> @param textToSearch the text to search @param substring the substring to find within the text @param message the exception message to use if the assertion fails
[ "Assert", "that", "the", "given", "text", "does", "not", "contain", "the", "given", "substring", ".", "<pre", "class", "=", "code", ">", "Assert", ".", "doesNotContain", "(", "name", "rod", "Name", "must", "not", "contain", "rod", ")", ";", "<", "/", "...
train
https://github.com/jwtk/jjwt/blob/86b6096946752cffcfbc9b0a5503f1ea195cc140/api/src/main/java/io/jsonwebtoken/lang/Assert.java#L155-L160
google/closure-compiler
src/com/google/javascript/jscomp/TemplateAstMatcher.java
TemplateAstMatcher.matchesTemplateShape
private boolean matchesTemplateShape(Node template, Node ast) { """ Returns whether the template matches an AST structure node starting with node, taking into account the template parameters that were provided to this matcher. Here only the template shape is checked, template local declarations and parameters ...
java
private boolean matchesTemplateShape(Node template, Node ast) { while (template != null) { if (ast == null || !matchesNodeShape(template, ast)) { return false; } template = template.getNext(); ast = ast.getNext(); } return true; }
[ "private", "boolean", "matchesTemplateShape", "(", "Node", "template", ",", "Node", "ast", ")", "{", "while", "(", "template", "!=", "null", ")", "{", "if", "(", "ast", "==", "null", "||", "!", "matchesNodeShape", "(", "template", ",", "ast", ")", ")", ...
Returns whether the template matches an AST structure node starting with node, taking into account the template parameters that were provided to this matcher. Here only the template shape is checked, template local declarations and parameters are checked later.
[ "Returns", "whether", "the", "template", "matches", "an", "AST", "structure", "node", "starting", "with", "node", "taking", "into", "account", "the", "template", "parameters", "that", "were", "provided", "to", "this", "matcher", ".", "Here", "only", "the", "te...
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TemplateAstMatcher.java#L324-L333
softindex/datakernel
core-codegen/src/main/java/io/datakernel/codegen/Expressions.java
Expressions.newLocal
public static VarLocal newLocal(Context ctx, Type type) { """ Returns a new local variable from a given context @param ctx context of a dynamic class @param type the type of the local variable to be created @return new instance of {@link VarLocal} """ int local = ctx.getGeneratorAdapter().newLocal(type...
java
public static VarLocal newLocal(Context ctx, Type type) { int local = ctx.getGeneratorAdapter().newLocal(type); return new VarLocal(local); }
[ "public", "static", "VarLocal", "newLocal", "(", "Context", "ctx", ",", "Type", "type", ")", "{", "int", "local", "=", "ctx", ".", "getGeneratorAdapter", "(", ")", ".", "newLocal", "(", "type", ")", ";", "return", "new", "VarLocal", "(", "local", ")", ...
Returns a new local variable from a given context @param ctx context of a dynamic class @param type the type of the local variable to be created @return new instance of {@link VarLocal}
[ "Returns", "a", "new", "local", "variable", "from", "a", "given", "context" ]
train
https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/core-codegen/src/main/java/io/datakernel/codegen/Expressions.java#L507-L510
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/listener/lifecycle/JdbcLifecycleEventListenerUtils.java
JdbcLifecycleEventListenerUtils.getListenerMethod
public static Method getListenerMethod(String invokedMethodName, boolean isBefore) { """ Find corresponding callback method on {@link JdbcLifecycleEventListener}. @param invokedMethodName invoked method name @param isBefore before method or not @return corresponding callback method or {@code null} if...
java
public static Method getListenerMethod(String invokedMethodName, boolean isBefore) { if (isBefore) { return beforeLifecycleMethodsByMethodName.get(invokedMethodName); } else { return afterLifecycleMethodsByMethodName.get(invokedMethodName); } }
[ "public", "static", "Method", "getListenerMethod", "(", "String", "invokedMethodName", ",", "boolean", "isBefore", ")", "{", "if", "(", "isBefore", ")", "{", "return", "beforeLifecycleMethodsByMethodName", ".", "get", "(", "invokedMethodName", ")", ";", "}", "else...
Find corresponding callback method on {@link JdbcLifecycleEventListener}. @param invokedMethodName invoked method name @param isBefore before method or not @return corresponding callback method or {@code null} if not found. (e.g.: toString, hashCode)
[ "Find", "corresponding", "callback", "method", "on", "{", "@link", "JdbcLifecycleEventListener", "}", "." ]
train
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/listener/lifecycle/JdbcLifecycleEventListenerUtils.java#L94-L100
aws/aws-cloudtrail-processing-library
src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/LibraryUtils.java
LibraryUtils.handleException
public static void handleException(ExceptionHandler exceptionHandler, ProgressStatus progressStatus, Exception e, String message) { """ A wrapper function of handling exceptions that have a known root cause, such as {@link AmazonServiceException}. @param exceptionHandler the {@link ExceptionHandler} to handle exc...
java
public static void handleException(ExceptionHandler exceptionHandler, ProgressStatus progressStatus, Exception e, String message) { ProcessingLibraryException exception = new ProcessingLibraryException(message, e, progressStatus); exceptionHandler.handleException(exception); }
[ "public", "static", "void", "handleException", "(", "ExceptionHandler", "exceptionHandler", ",", "ProgressStatus", "progressStatus", ",", "Exception", "e", ",", "String", "message", ")", "{", "ProcessingLibraryException", "exception", "=", "new", "ProcessingLibraryExcepti...
A wrapper function of handling exceptions that have a known root cause, such as {@link AmazonServiceException}. @param exceptionHandler the {@link ExceptionHandler} to handle exceptions. @param progressStatus the current progress status {@link ProgressStatus}. @param e the exception needs to be handled. @param message ...
[ "A", "wrapper", "function", "of", "handling", "exceptions", "that", "have", "a", "known", "root", "cause", "such", "as", "{" ]
train
https://github.com/aws/aws-cloudtrail-processing-library/blob/411315808d8d3dc6b45e4182212e3e04d82e3782/src/main/java/com/amazonaws/services/cloudtrail/processinglibrary/utils/LibraryUtils.java#L169-L172
lucee/Lucee
core/src/main/java/lucee/commons/io/FileUtil.java
FileUtil.toFile
public static File toFile(File parent, String path) { """ create a File from parent file and string @param parent @param path @return new File Object """ return new File(parent, path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); }
java
public static File toFile(File parent, String path) { return new File(parent, path.replace(FILE_ANTI_SEPERATOR, FILE_SEPERATOR)); }
[ "public", "static", "File", "toFile", "(", "File", "parent", ",", "String", "path", ")", "{", "return", "new", "File", "(", "parent", ",", "path", ".", "replace", "(", "FILE_ANTI_SEPERATOR", ",", "FILE_SEPERATOR", ")", ")", ";", "}" ]
create a File from parent file and string @param parent @param path @return new File Object
[ "create", "a", "File", "from", "parent", "file", "and", "string" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/FileUtil.java#L78-L80
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/ds/LDAP.java
LDAP.setupKerberosContext
@SuppressWarnings( { """ Initial LDAP for kerberos support @param env @throws NamingException """ "rawtypes", "unchecked" }) protected DirContext setupKerberosContext(Hashtable<String,Object> env) throws NamingException { LoginContext lc = null; try { lc = new Log...
java
@SuppressWarnings({ "rawtypes", "unchecked" }) protected DirContext setupKerberosContext(Hashtable<String,Object> env) throws NamingException { LoginContext lc = null; try { lc = new LoginContext(getClass().getName(), new JXCallbackHandler()); lc.login(); ...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "protected", "DirContext", "setupKerberosContext", "(", "Hashtable", "<", "String", ",", "Object", ">", "env", ")", "throws", "NamingException", "{", "LoginContext", "lc", "=", "n...
Initial LDAP for kerberos support @param env @throws NamingException
[ "Initial", "LDAP", "for", "kerberos", "support" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/ds/LDAP.java#L156-L181
javamelody/javamelody
javamelody-swing/src/main/java/net/bull/javamelody/swing/util/FastBlurFilter.java
FastBlurFilter.setPixels
private static void setPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels) { """ <p>Writes a rectangular area of pixels in the destination <code>BufferedImage</code>. Calling this method on an image of type different from <code>BufferedImage.TYPE_INT_ARGB</code> and <code>BufferedImage.TYPE_INT_...
java
private static void setPixels(BufferedImage img, int x, int y, int w, int h, int[] pixels) { if (pixels == null || w == 0 || h == 0) { return; } else if (pixels.length < w * h) { throw new IllegalArgumentException("pixels array must have a length >= w*h"); } final int imageType = img.getType(); ...
[ "private", "static", "void", "setPixels", "(", "BufferedImage", "img", ",", "int", "x", ",", "int", "y", ",", "int", "w", ",", "int", "h", ",", "int", "[", "]", "pixels", ")", "{", "if", "(", "pixels", "==", "null", "||", "w", "==", "0", "||", ...
<p>Writes a rectangular area of pixels in the destination <code>BufferedImage</code>. Calling this method on an image of type different from <code>BufferedImage.TYPE_INT_ARGB</code> and <code>BufferedImage.TYPE_INT_RGB</code> will unmanage the image.</p> @param img the destination image @param x the x location at whic...
[ "<p", ">", "Writes", "a", "rectangular", "area", "of", "pixels", "in", "the", "destination", "<code", ">", "BufferedImage<", "/", "code", ">", ".", "Calling", "this", "method", "on", "an", "image", "of", "type", "different", "from", "<code", ">", "Buffered...
train
https://github.com/javamelody/javamelody/blob/18ad583ddeb5dcadd797dfda295409c6983ffd71/javamelody-swing/src/main/java/net/bull/javamelody/swing/util/FastBlurFilter.java#L141-L156
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/StructureSequenceMatcher.java
StructureSequenceMatcher.getProteinSequenceForStructure
public static ProteinSequence getProteinSequenceForStructure(Structure struct, Map<Integer,Group> groupIndexPosition ) { """ Generates a ProteinSequence corresponding to the sequence of struct, and maintains a mapping from the sequence back to the original groups. Chains are appended to one another. 'X' is use...
java
public static ProteinSequence getProteinSequenceForStructure(Structure struct, Map<Integer,Group> groupIndexPosition ) { if( groupIndexPosition != null) { groupIndexPosition.clear(); } StringBuilder seqStr = new StringBuilder(); for(Chain chain : struct.getChains()) { List<Group> groups = chain.getAtom...
[ "public", "static", "ProteinSequence", "getProteinSequenceForStructure", "(", "Structure", "struct", ",", "Map", "<", "Integer", ",", "Group", ">", "groupIndexPosition", ")", "{", "if", "(", "groupIndexPosition", "!=", "null", ")", "{", "groupIndexPosition", ".", ...
Generates a ProteinSequence corresponding to the sequence of struct, and maintains a mapping from the sequence back to the original groups. Chains are appended to one another. 'X' is used for heteroatoms. @param struct Input structure @param groupIndexPosition An empty map, which will be populated with (residue index...
[ "Generates", "a", "ProteinSequence", "corresponding", "to", "the", "sequence", "of", "struct", "and", "maintains", "a", "mapping", "from", "the", "sequence", "back", "to", "the", "original", "groups", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/StructureSequenceMatcher.java#L112-L147
sagiegurari/fax4j
src/main/java/org/fax4j/bridge/process/DefaultCommandLineArgumentsParser.java
DefaultCommandLineArgumentsParser.getFileInfoFromInputDataImpl
@Override protected FileInfo getFileInfoFromInputDataImpl(String[] inputData) { """ This function returns the file info from the request data. @param inputData The input data @return The file info """ //get amount int amount=inputData.length; FileInfo fileInfo=null; ...
java
@Override protected FileInfo getFileInfoFromInputDataImpl(String[] inputData) { //get amount int amount=inputData.length; FileInfo fileInfo=null; if((amount%2)==0) { String argument=null; String value=null; for(int index=0;index<inputD...
[ "@", "Override", "protected", "FileInfo", "getFileInfoFromInputDataImpl", "(", "String", "[", "]", "inputData", ")", "{", "//get amount", "int", "amount", "=", "inputData", ".", "length", ";", "FileInfo", "fileInfo", "=", "null", ";", "if", "(", "(", "amount",...
This function returns the file info from the request data. @param inputData The input data @return The file info
[ "This", "function", "returns", "the", "file", "info", "from", "the", "request", "data", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/bridge/process/DefaultCommandLineArgumentsParser.java#L59-L94
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/MilestonesApi.java
MilestonesApi.closeGroupMilestone
public Milestone closeGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { """ Close a group milestone. @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance @param milestoneId the milestone ID to close @return the closed Milestone insta...
java
public Milestone closeGroupMilestone(Object groupIdOrPath, Integer milestoneId) throws GitLabApiException { if (milestoneId == null) { throw new RuntimeException("milestoneId cannot be null"); } GitLabApiForm formData = new GitLabApiForm().withParam("state_event", MilestoneState.CL...
[ "public", "Milestone", "closeGroupMilestone", "(", "Object", "groupIdOrPath", ",", "Integer", "milestoneId", ")", "throws", "GitLabApiException", "{", "if", "(", "milestoneId", "==", "null", ")", "{", "throw", "new", "RuntimeException", "(", "\"milestoneId cannot be n...
Close a group milestone. @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance @param milestoneId the milestone ID to close @return the closed Milestone instance @throws GitLabApiException if any exception occurs
[ "Close", "a", "group", "milestone", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/MilestonesApi.java#L195-L205
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java
GlobalizationPreferences.setCollator
public GlobalizationPreferences setCollator(Collator collator) { """ Explicitly set the collator for this object. @param collator The collator object to be passed. @return this, for chaining @hide draft / provisional / internal are hidden on Android """ if (isFrozen()) { throw new Unsupp...
java
public GlobalizationPreferences setCollator(Collator collator) { if (isFrozen()) { throw new UnsupportedOperationException("Attempt to modify immutable object"); } try { this.collator = (Collator) collator.clone(); // clone for safety } catch (CloneNotSupportedExc...
[ "public", "GlobalizationPreferences", "setCollator", "(", "Collator", "collator", ")", "{", "if", "(", "isFrozen", "(", ")", ")", "{", "throw", "new", "UnsupportedOperationException", "(", "\"Attempt to modify immutable object\"", ")", ";", "}", "try", "{", "this", ...
Explicitly set the collator for this object. @param collator The collator object to be passed. @return this, for chaining @hide draft / provisional / internal are hidden on Android
[ "Explicitly", "set", "the", "collator", "for", "this", "object", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/GlobalizationPreferences.java#L476-L486
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optSizeF
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static SizeF optSizeF(@Nullable Bundle bundle, @Nullable String key, @Nullable SizeF fallback) { """ Returns a optional {@link android.util.SizeF} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.SizeF...
java
@Nullable @TargetApi(Build.VERSION_CODES.LOLLIPOP) public static SizeF optSizeF(@Nullable Bundle bundle, @Nullable String key, @Nullable SizeF fallback) { if (bundle == null) { return fallback; } return bundle.getSizeF(key); }
[ "@", "Nullable", "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "LOLLIPOP", ")", "public", "static", "SizeF", "optSizeF", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ",", "@", "Nullable", "SizeF", "fallback", ...
Returns a optional {@link android.util.SizeF} value. In other words, returns the value mapped by key if it exists and is a {@link android.util.SizeF}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will retur...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L918-L925
tminglei/form-binder-java
src/main/java/com/github/tminglei/bind/Mappings.java
Mappings.longv
public static Mapping<Long> longv(Constraint... constraints) { """ (convert to Long) mapping @param constraints constraints @return new created mapping """ return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr(s) ? 0l : Long.p...
java
public static Mapping<Long> longv(Constraint... constraints) { return new FieldMapping( InputMode.SINGLE, mkSimpleConverter(s -> isEmptyStr(s) ? 0l : Long.parseLong(s) ), new MappingMeta(MAPPING_LONG, Long.class) ).constraint(checki...
[ "public", "static", "Mapping", "<", "Long", ">", "longv", "(", "Constraint", "...", "constraints", ")", "{", "return", "new", "FieldMapping", "(", "InputMode", ".", "SINGLE", ",", "mkSimpleConverter", "(", "s", "->", "isEmptyStr", "(", "s", ")", "?", "0l",...
(convert to Long) mapping @param constraints constraints @return new created mapping
[ "(", "convert", "to", "Long", ")", "mapping" ]
train
https://github.com/tminglei/form-binder-java/blob/4c0bd1e8f81ae56b21142bb525ee6b4deb7f92ab/src/main/java/com/github/tminglei/bind/Mappings.java#L107-L115
haraldk/TwelveMonkeys
sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java
DebugUtil.printDebug
public static void printDebug(final Collection pCollection, final String pMethodName) { """ Invokes a given method of every element in a {@code java.util.Collection} and prints the results to {@code System.out}. The method to be invoked must have no formal parameters. <p> If an exception is throwed during the m...
java
public static void printDebug(final Collection pCollection, final String pMethodName) { printDebug(pCollection, pMethodName, System.out); }
[ "public", "static", "void", "printDebug", "(", "final", "Collection", "pCollection", ",", "final", "String", "pMethodName", ")", "{", "printDebug", "(", "pCollection", ",", "pMethodName", ",", "System", ".", "out", ")", ";", "}" ]
Invokes a given method of every element in a {@code java.util.Collection} and prints the results to {@code System.out}. The method to be invoked must have no formal parameters. <p> If an exception is throwed during the method invocation, the element's {@code toString()} method is called. For bulk data types, recursive ...
[ "Invokes", "a", "given", "method", "of", "every", "element", "in", "a", "{" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/util/DebugUtil.java#L520-L522
apache/groovy
subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java
TemplateServlet.getTemplate
protected Template getTemplate(URL url) throws ServletException { """ Gets the template created by the underlying engine parsing the request. <p> This method looks up a simple (weak) hash map for an existing template object that matches the source URL. If there is no cache entry, a new one is created by the ...
java
protected Template getTemplate(URL url) throws ServletException { String key = url.toString(); Template template = findCachedTemplate(key, null); // Template not cached or the source file changed - compile new template! if (template == null) { try { template ...
[ "protected", "Template", "getTemplate", "(", "URL", "url", ")", "throws", "ServletException", "{", "String", "key", "=", "url", ".", "toString", "(", ")", ";", "Template", "template", "=", "findCachedTemplate", "(", "key", ",", "null", ")", ";", "// Template...
Gets the template created by the underlying engine parsing the request. <p> This method looks up a simple (weak) hash map for an existing template object that matches the source URL. If there is no cache entry, a new one is created by the underlying template engine. This new instance is put to the cache for consecutiv...
[ "Gets", "the", "template", "created", "by", "the", "underlying", "engine", "parsing", "the", "request", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-servlet/src/main/java/groovy/servlet/TemplateServlet.java#L325-L339
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.plus
public static String plus(CharSequence left, Object value) { """ Appends the String representation of the given operand to this CharSequence. @param left a CharSequence @param value any Object @return the original toString() of the CharSequence with the object appended @since 1.8.2 """ return le...
java
public static String plus(CharSequence left, Object value) { return left + DefaultGroovyMethods.toString(value); }
[ "public", "static", "String", "plus", "(", "CharSequence", "left", ",", "Object", "value", ")", "{", "return", "left", "+", "DefaultGroovyMethods", ".", "toString", "(", "value", ")", ";", "}" ]
Appends the String representation of the given operand to this CharSequence. @param left a CharSequence @param value any Object @return the original toString() of the CharSequence with the object appended @since 1.8.2
[ "Appends", "the", "String", "representation", "of", "the", "given", "operand", "to", "this", "CharSequence", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L2325-L2327
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java
MementoResource.getMementoLinks
public static Stream<Link> getMementoLinks(final String identifier, final SortedSet<Instant> mementos) { """ Retrieve all of the Memento-related link headers given a collection of datetimes. @param identifier the public identifier for the resource @param mementos a collection of memento values @return a strea...
java
public static Stream<Link> getMementoLinks(final String identifier, final SortedSet<Instant> mementos) { if (mementos.isEmpty()) { return empty(); } return concat(getTimeMap(identifier, mementos.first(), mementos.last()), mementos.stream().map(mementoToLink(identifier...
[ "public", "static", "Stream", "<", "Link", ">", "getMementoLinks", "(", "final", "String", "identifier", ",", "final", "SortedSet", "<", "Instant", ">", "mementos", ")", "{", "if", "(", "mementos", ".", "isEmpty", "(", ")", ")", "{", "return", "empty", "...
Retrieve all of the Memento-related link headers given a collection of datetimes. @param identifier the public identifier for the resource @param mementos a collection of memento values @return a stream of link headers
[ "Retrieve", "all", "of", "the", "Memento", "-", "related", "link", "headers", "given", "a", "collection", "of", "datetimes", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java#L170-L176
realtime-framework/RealtimeStorage-Android
library/src/main/java/co/realtime/storage/TableRef.java
TableRef.isNull
public TableRef isNull(String attributeName) { """ Applies a filter to the table. When fetched, it will return the null values. <pre> StorageRef storage = new StorageRef("your_app_key", "your_token"); TableRef tableRef = storage.table("your_table"); // Retrieve all items where their "itemProperty" value ...
java
public TableRef isNull(String attributeName){ filters.add(new Filter(StorageFilter.NULL, attributeName, null, null)); return this; }
[ "public", "TableRef", "isNull", "(", "String", "attributeName", ")", "{", "filters", ".", "add", "(", "new", "Filter", "(", "StorageFilter", ".", "NULL", ",", "attributeName", ",", "null", ",", "null", ")", ")", ";", "return", "this", ";", "}" ]
Applies a filter to the table. When fetched, it will return the null values. <pre> StorageRef storage = new StorageRef("your_app_key", "your_token"); TableRef tableRef = storage.table("your_table"); // Retrieve all items where their "itemProperty" value is null tableRef.isNull("itemProperty").getItems(new OnItemSnap...
[ "Applies", "a", "filter", "to", "the", "table", ".", "When", "fetched", "it", "will", "return", "the", "null", "values", "." ]
train
https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L829-L832
TheHortonMachine/hortonmachine
gui/src/main/java/org/hortonmachine/gui/utils/GuiUtilities.java
GuiUtilities.setPreference
public static void setPreference( String preferenceKey, String value ) { """ Set a preference. @param preferenceKey the preference key. @param value the value to set. """ if (preferencesDb != null) { preferencesDb.setPreference(preferenceKey, value); return; } ...
java
public static void setPreference( String preferenceKey, String value ) { if (preferencesDb != null) { preferencesDb.setPreference(preferenceKey, value); return; } Preferences preferences = Preferences.userRoot().node(GuiBridgeHandler.PREFS_NODE_NAME); if (value !...
[ "public", "static", "void", "setPreference", "(", "String", "preferenceKey", ",", "String", "value", ")", "{", "if", "(", "preferencesDb", "!=", "null", ")", "{", "preferencesDb", ".", "setPreference", "(", "preferenceKey", ",", "value", ")", ";", "return", ...
Set a preference. @param preferenceKey the preference key. @param value the value to set.
[ "Set", "a", "preference", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gui/src/main/java/org/hortonmachine/gui/utils/GuiUtilities.java#L187-L199
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java
OrderUrl.priceOrderUrl
public static MozuUrl priceOrderUrl(Boolean refreshShipping, String responseFields) { """ Get Resource Url for PriceOrder @param refreshShipping Specifies whether shipping rates should be re-evaluated while pricing. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount...
java
public static MozuUrl priceOrderUrl(Boolean refreshShipping, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/price?refreshShipping={refreshShipping}&responseFields={responseFields}"); formatter.formatUrl("refreshShipping", refreshShipping); formatter.formatUrl("respon...
[ "public", "static", "MozuUrl", "priceOrderUrl", "(", "Boolean", "refreshShipping", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/orders/price?refreshShipping={refreshShipping}&responseFields={responseFiel...
Get Resource Url for PriceOrder @param refreshShipping Specifies whether shipping rates should be re-evaluated while pricing. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Atte...
[ "Get", "Resource", "Url", "for", "PriceOrder" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/OrderUrl.java#L130-L136
thymeleaf/thymeleaf
src/main/java/org/thymeleaf/expression/Strings.java
Strings.substring
public String substring(final Object target, final int start) { """ <p> copy a part of target start beginIndex to the end of target. If non-String object, toString() will be called. </p> @param target source of the copy. @param start index where the copy start. @return part of target, or {@code null} if...
java
public String substring(final Object target, final int start) { if (target == null) { return null; } return StringUtils.substring(target, start); }
[ "public", "String", "substring", "(", "final", "Object", "target", ",", "final", "int", "start", ")", "{", "if", "(", "target", "==", "null", ")", "{", "return", "null", ";", "}", "return", "StringUtils", ".", "substring", "(", "target", ",", "start", ...
<p> copy a part of target start beginIndex to the end of target. If non-String object, toString() will be called. </p> @param target source of the copy. @param start index where the copy start. @return part of target, or {@code null} if target is null. @since 1.1.2
[ "<p", ">", "copy", "a", "part", "of", "target", "start", "beginIndex", "to", "the", "end", "of", "target", ".", "If", "non", "-", "String", "object", "toString", "()", "will", "be", "called", ".", "<", "/", "p", ">", "@param", "target", "source", "of...
train
https://github.com/thymeleaf/thymeleaf/blob/2b0e6d6d7571fbe638904b5fd222fc9e77188879/src/main/java/org/thymeleaf/expression/Strings.java#L442-L447
facebookarchive/hadoop-20
src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java
FTPFileSystem.makeAbsolute
private Path makeAbsolute(Path workDir, Path path) { """ Resolve against given working directory. * @param workDir @param path @return """ if (path.isAbsolute()) { return path; } return new Path(workDir, path); }
java
private Path makeAbsolute(Path workDir, Path path) { if (path.isAbsolute()) { return path; } return new Path(workDir, path); }
[ "private", "Path", "makeAbsolute", "(", "Path", "workDir", ",", "Path", "path", ")", "{", "if", "(", "path", ".", "isAbsolute", "(", ")", ")", "{", "return", "path", ";", "}", "return", "new", "Path", "(", "workDir", ",", "path", ")", ";", "}" ]
Resolve against given working directory. * @param workDir @param path @return
[ "Resolve", "against", "given", "working", "directory", ".", "*" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/fs/ftp/FTPFileSystem.java#L151-L156
real-logic/simple-binary-encoding
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/c/CUtil.java
CUtil.formatScopedName
public static String formatScopedName(final CharSequence[] scope, final String value) { """ Format a String as a struct name prepended with a scope. @param scope to be prepended. @param value to be formatted. @return the string formatted as a struct name. """ return String.join("_", scope).toLower...
java
public static String formatScopedName(final CharSequence[] scope, final String value) { return String.join("_", scope).toLowerCase() + "_" + formatName(value); }
[ "public", "static", "String", "formatScopedName", "(", "final", "CharSequence", "[", "]", "scope", ",", "final", "String", "value", ")", "{", "return", "String", ".", "join", "(", "\"_\"", ",", "scope", ")", ".", "toLowerCase", "(", ")", "+", "\"_\"", "+...
Format a String as a struct name prepended with a scope. @param scope to be prepended. @param value to be formatted. @return the string formatted as a struct name.
[ "Format", "a", "String", "as", "a", "struct", "name", "prepended", "with", "a", "scope", "." ]
train
https://github.com/real-logic/simple-binary-encoding/blob/9a7be490c86d98f0e430e4189bc6c8c4fbef658b/sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/c/CUtil.java#L125-L128
derari/cthul
matchers/src/main/java/org/cthul/matchers/diagnose/nested/Nested.java
Nested.useParentheses
public static boolean useParentheses(int pSelf, int pNested) { """ Compares own precedence against nested and return @param pSelf @param pNested @return true iff parentheses should be used """ if (pSelf == PrecedencedSelfDescribing.P_NONE || pSelf == PrecedencedSelfDescribing.P_UNA...
java
public static boolean useParentheses(int pSelf, int pNested) { if (pSelf == PrecedencedSelfDescribing.P_NONE || pSelf == PrecedencedSelfDescribing.P_UNARY_NO_PAREN) { return false; } if (pNested < PrecedencedSelfDescribing.P_UNARY) { return pNested <...
[ "public", "static", "boolean", "useParentheses", "(", "int", "pSelf", ",", "int", "pNested", ")", "{", "if", "(", "pSelf", "==", "PrecedencedSelfDescribing", ".", "P_NONE", "||", "pSelf", "==", "PrecedencedSelfDescribing", ".", "P_UNARY_NO_PAREN", ")", "{", "ret...
Compares own precedence against nested and return @param pSelf @param pNested @return true iff parentheses should be used
[ "Compares", "own", "precedence", "against", "nested", "and", "return" ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/matchers/src/main/java/org/cthul/matchers/diagnose/nested/Nested.java#L133-L143
lemire/sparsebitmap
src/main/java/sparsebitmap/SparseBitmap.java
SparseBitmap.fastadd
private void fastadd(int wo, int off) { """ same as add but without updating the cardinality counter, strictly for internal use. @param wo the wo @param off the off """ this.buffer.add(off - this.sizeinwords); this.buffer.add(wo); this.sizeinwords = off + 1; }
java
private void fastadd(int wo, int off) { this.buffer.add(off - this.sizeinwords); this.buffer.add(wo); this.sizeinwords = off + 1; }
[ "private", "void", "fastadd", "(", "int", "wo", ",", "int", "off", ")", "{", "this", ".", "buffer", ".", "add", "(", "off", "-", "this", ".", "sizeinwords", ")", ";", "this", ".", "buffer", ".", "add", "(", "wo", ")", ";", "this", ".", "sizeinwor...
same as add but without updating the cardinality counter, strictly for internal use. @param wo the wo @param off the off
[ "same", "as", "add", "but", "without", "updating", "the", "cardinality", "counter", "strictly", "for", "internal", "use", "." ]
train
https://github.com/lemire/sparsebitmap/blob/f362e0811c32f68adfe4b748d513c46857898ec9/src/main/java/sparsebitmap/SparseBitmap.java#L64-L68
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/parameter/ParameterBuilder.java
ParameterBuilder.storePropertiesParameter
private void storePropertiesParameter(final Map.Entry<Object, Object> entry) { """ Store a parameter read from properties files.<br /> The parameter is wrapped into a parameterEntry @param entry the entry to store """ this.propertiesParametersMap.put(entry.getKey().toString(), new ParameterEntry(e...
java
private void storePropertiesParameter(final Map.Entry<Object, Object> entry) { this.propertiesParametersMap.put(entry.getKey().toString(), new ParameterEntry(entry.getValue().toString())); }
[ "private", "void", "storePropertiesParameter", "(", "final", "Map", ".", "Entry", "<", "Object", ",", "Object", ">", "entry", ")", "{", "this", ".", "propertiesParametersMap", ".", "put", "(", "entry", ".", "getKey", "(", ")", ".", "toString", "(", ")", ...
Store a parameter read from properties files.<br /> The parameter is wrapped into a parameterEntry @param entry the entry to store
[ "Store", "a", "parameter", "read", "from", "properties", "files", ".", "<br", "/", ">", "The", "parameter", "is", "wrapped", "into", "a", "parameterEntry" ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/parameter/ParameterBuilder.java#L151-L153
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/util/GosuStringUtil.java
GosuStringUtil.indexOfAnyBut
public static int indexOfAnyBut(String str, char[] searchChars) { """ <p>Search a String to find the first index of any character not in the given set of characters.</p> <p>A <code>null</code> String will return <code>-1</code>. A <code>null</code> or zero length search array will return <code>-1</code>.</p> ...
java
public static int indexOfAnyBut(String str, char[] searchChars) { if (isEmpty(str) ||searchChars == null) { return -1; } outer : for (int i = 0; i < str.length(); i++) { char ch = str.charAt(i); for (int j = 0; j < searchChars.length; j++) { if (searchChars[...
[ "public", "static", "int", "indexOfAnyBut", "(", "String", "str", ",", "char", "[", "]", "searchChars", ")", "{", "if", "(", "isEmpty", "(", "str", ")", "||", "searchChars", "==", "null", ")", "{", "return", "-", "1", ";", "}", "outer", ":", "for", ...
<p>Search a String to find the first index of any character not in the given set of characters.</p> <p>A <code>null</code> String will return <code>-1</code>. A <code>null</code> or zero length search array will return <code>-1</code>.</p> <pre> GosuStringUtil.indexOfAnyBut(null, *) = -1 GosuStringUtil.inde...
[ "<p", ">", "Search", "a", "String", "to", "find", "the", "first", "index", "of", "any", "character", "not", "in", "the", "given", "set", "of", "characters", ".", "<", "/", "p", ">" ]
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/util/GosuStringUtil.java#L1209-L1223
liyiorg/weixin-popular
src/main/java/weixin/popular/api/MessageAPI.java
MessageAPI.mediaUploadnews
public static Media mediaUploadnews(String access_token, String messageJson) { """ 高级群发 构成 MassMPnewsMessage 对象的前置请求接口 @param access_token access_token @param messageJson messageJson @return result """ return MediaAPI.mediaUploadnews(access_token, messageJson); }
java
public static Media mediaUploadnews(String access_token, String messageJson) { return MediaAPI.mediaUploadnews(access_token, messageJson); }
[ "public", "static", "Media", "mediaUploadnews", "(", "String", "access_token", ",", "String", "messageJson", ")", "{", "return", "MediaAPI", ".", "mediaUploadnews", "(", "access_token", ",", "messageJson", ")", ";", "}" ]
高级群发 构成 MassMPnewsMessage 对象的前置请求接口 @param access_token access_token @param messageJson messageJson @return result
[ "高级群发", "构成", "MassMPnewsMessage", "对象的前置请求接口" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/MessageAPI.java#L112-L114
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.leftShift
public static OffsetTime leftShift(final ZoneOffset self, LocalTime time) { """ Returns an {@link java.time.OffsetDateTime} of this offset and the provided {@link java.time.LocalTime}. @param self a ZoneOffset @param time a LocalTime @return an OffsetTime @since 2.5.0 """ return OffsetTime.of(tim...
java
public static OffsetTime leftShift(final ZoneOffset self, LocalTime time) { return OffsetTime.of(time, self); }
[ "public", "static", "OffsetTime", "leftShift", "(", "final", "ZoneOffset", "self", ",", "LocalTime", "time", ")", "{", "return", "OffsetTime", ".", "of", "(", "time", ",", "self", ")", ";", "}" ]
Returns an {@link java.time.OffsetDateTime} of this offset and the provided {@link java.time.LocalTime}. @param self a ZoneOffset @param time a LocalTime @return an OffsetTime @since 2.5.0
[ "Returns", "an", "{", "@link", "java", ".", "time", ".", "OffsetDateTime", "}", "of", "this", "offset", "and", "the", "provided", "{", "@link", "java", ".", "time", ".", "LocalTime", "}", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1966-L1968
google/j2objc
jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java
SpannableStringBuilder.substring
public String substring(int start, int end) { """ Return a String containing a copy of the chars in this buffer, limited to the [start, end[ range. @hide """ char[] buf = new char[end - start]; getChars(start, end, buf, 0); return new String(buf); }
java
public String substring(int start, int end) { char[] buf = new char[end - start]; getChars(start, end, buf, 0); return new String(buf); }
[ "public", "String", "substring", "(", "int", "start", ",", "int", "end", ")", "{", "char", "[", "]", "buf", "=", "new", "char", "[", "end", "-", "start", "]", ";", "getChars", "(", "start", ",", "end", ",", "buf", ",", "0", ")", ";", "return", ...
Return a String containing a copy of the chars in this buffer, limited to the [start, end[ range. @hide
[ "Return", "a", "String", "containing", "a", "copy", "of", "the", "chars", "in", "this", "buffer", "limited", "to", "the", "[", "start", "end", "[", "range", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/frameworks/base/core/java/android/text/SpannableStringBuilder.java#L942-L946
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/CharSequences.java
CharSequences.onCharacterBoundary
@Deprecated public static boolean onCharacterBoundary(CharSequence s, int i) { """ Are we on a character boundary? @deprecated This API is ICU internal only. @hide draft / provisional / internal are hidden on Android """ return i <= 0 || i >= s.length() || !Character.isHighSur...
java
@Deprecated public static boolean onCharacterBoundary(CharSequence s, int i) { return i <= 0 || i >= s.length() || !Character.isHighSurrogate(s.charAt(i-1)) || !Character.isLowSurrogate(s.charAt(i)); }
[ "@", "Deprecated", "public", "static", "boolean", "onCharacterBoundary", "(", "CharSequence", "s", ",", "int", "i", ")", "{", "return", "i", "<=", "0", "||", "i", ">=", "s", ".", "length", "(", ")", "||", "!", "Character", ".", "isHighSurrogate", "(", ...
Are we on a character boundary? @deprecated This API is ICU internal only. @hide draft / provisional / internal are hidden on Android
[ "Are", "we", "on", "a", "character", "boundary?" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/lang/CharSequences.java#L251-L257
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/templatemethoddesign/LogNormalProcess.java
LogNormalProcess.getProcessValue
public RandomVariable getProcessValue(int timeIndex, int componentIndex) { """ This method returns the realization of the process at a certain time index. @param timeIndex Time index at which the process should be observed @param componentIndex Component of the process vector @return A vector of process reali...
java
public RandomVariable getProcessValue(int timeIndex, int componentIndex) { if(timeIndex == 0) { return getInitialValue()[componentIndex]; } // Lazy initialization, synchronized for thread safety synchronized(this) { if(discreteProcess == null || discreteProcess.length == 0) { doPrecalculateProcess()...
[ "public", "RandomVariable", "getProcessValue", "(", "int", "timeIndex", ",", "int", "componentIndex", ")", "{", "if", "(", "timeIndex", "==", "0", ")", "{", "return", "getInitialValue", "(", ")", "[", "componentIndex", "]", ";", "}", "// Lazy initialization, syn...
This method returns the realization of the process at a certain time index. @param timeIndex Time index at which the process should be observed @param componentIndex Component of the process vector @return A vector of process realizations (on path)
[ "This", "method", "returns", "the", "realization", "of", "the", "process", "at", "a", "certain", "time", "index", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/templatemethoddesign/LogNormalProcess.java#L174-L189
super-csv/super-csv
super-csv/src/main/java/org/supercsv/util/ReflectionUtils.java
ReflectionUtils.findGetter
public static Method findGetter(final Object object, final String fieldName) { """ Returns the getter method associated with the object's field. @param object the object @param fieldName the name of the field @return the getter method @throws NullPointerException if object or fieldName is null @throws Su...
java
public static Method findGetter(final Object object, final String fieldName) { if( object == null ) { throw new NullPointerException("object should not be null"); } else if( fieldName == null ) { throw new NullPointerException("fieldName should not be null"); } final Class<?> clazz = object.getClass();...
[ "public", "static", "Method", "findGetter", "(", "final", "Object", "object", ",", "final", "String", "fieldName", ")", "{", "if", "(", "object", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"object should not be null\"", ")", ";", "}...
Returns the getter method associated with the object's field. @param object the object @param fieldName the name of the field @return the getter method @throws NullPointerException if object or fieldName is null @throws SuperCsvReflectionException if the getter doesn't exist or is not visible
[ "Returns", "the", "getter", "method", "associated", "with", "the", "object", "s", "field", "." ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/util/ReflectionUtils.java#L77-L105
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdBlock.java
ThresholdBlock.applyThreshold
protected void applyThreshold( T input, GrayU8 output ) { """ Applies the dynamically computed threshold to each pixel in the image, one block at a time """ for (int blockY = 0; blockY < stats.height; blockY++) { for (int blockX = 0; blockX < stats.width; blockX++) { original.thresholdBlock(blockX,blo...
java
protected void applyThreshold( T input, GrayU8 output ) { for (int blockY = 0; blockY < stats.height; blockY++) { for (int blockX = 0; blockX < stats.width; blockX++) { original.thresholdBlock(blockX,blockY,input,stats,output); } } }
[ "protected", "void", "applyThreshold", "(", "T", "input", ",", "GrayU8", "output", ")", "{", "for", "(", "int", "blockY", "=", "0", ";", "blockY", "<", "stats", ".", "height", ";", "blockY", "++", ")", "{", "for", "(", "int", "blockX", "=", "0", ";...
Applies the dynamically computed threshold to each pixel in the image, one block at a time
[ "Applies", "the", "dynamically", "computed", "threshold", "to", "each", "pixel", "in", "the", "image", "one", "block", "at", "a", "time" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdBlock.java#L132-L138
cdk/cdk
display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java
BasicBondGenerator.generateBond
public IRenderingElement generateBond(IBond bond, RendererModel model) { """ Generate stereo or bond elements for this bond. @param bond the bond to use when generating elements @param model the renderer model @return one or more rendering elements """ boolean showExplicitHydrogens = true; ...
java
public IRenderingElement generateBond(IBond bond, RendererModel model) { boolean showExplicitHydrogens = true; if (model.hasParameter(BasicAtomGenerator.ShowExplicitHydrogens.class)) { showExplicitHydrogens = model.getParameter(BasicAtomGenerator.ShowExplicitHydrogens.class).getValue(); ...
[ "public", "IRenderingElement", "generateBond", "(", "IBond", "bond", ",", "RendererModel", "model", ")", "{", "boolean", "showExplicitHydrogens", "=", "true", ";", "if", "(", "model", ".", "hasParameter", "(", "BasicAtomGenerator", ".", "ShowExplicitHydrogens", ".",...
Generate stereo or bond elements for this bond. @param bond the bond to use when generating elements @param model the renderer model @return one or more rendering elements
[ "Generate", "stereo", "or", "bond", "elements", "for", "this", "bond", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/renderbasic/src/main/java/org/openscience/cdk/renderer/generators/BasicBondGenerator.java#L493-L508
dnsjava/dnsjava
org/xbill/DNS/Message.java
Message.setTSIG
public void setTSIG(TSIG key, int error, TSIGRecord querytsig) { """ Sets the TSIG key and other necessary information to sign a message. @param key The TSIG key. @param error The value of the TSIG error field. @param querytsig If this is a response, the TSIG from the request. """ this.tsigkey = key; this...
java
public void setTSIG(TSIG key, int error, TSIGRecord querytsig) { this.tsigkey = key; this.tsigerror = error; this.querytsig = querytsig; }
[ "public", "void", "setTSIG", "(", "TSIG", "key", ",", "int", "error", ",", "TSIGRecord", "querytsig", ")", "{", "this", ".", "tsigkey", "=", "key", ";", "this", ".", "tsigerror", "=", "error", ";", "this", ".", "querytsig", "=", "querytsig", ";", "}" ]
Sets the TSIG key and other necessary information to sign a message. @param key The TSIG key. @param error The value of the TSIG error field. @param querytsig If this is a response, the TSIG from the request.
[ "Sets", "the", "TSIG", "key", "and", "other", "necessary", "information", "to", "sign", "a", "message", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Message.java#L543-L548
OpenLiberty/open-liberty
dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/servers/ServerBootstrapUtils.java
ServerBootstrapUtils.writeBootstrapProperties
public void writeBootstrapProperties(LibertyServer server, Map<String, String> miscParms) throws Exception { """ Writes each of the specified bootstrap properties and values to the provided server's bootstrap.properties file. """ String thisMethod = "writeBootstrapProperties"; loggingUtils.prin...
java
public void writeBootstrapProperties(LibertyServer server, Map<String, String> miscParms) throws Exception { String thisMethod = "writeBootstrapProperties"; loggingUtils.printMethodName(thisMethod); if (miscParms == null) { return; } String bootPropFilePath = getBoot...
[ "public", "void", "writeBootstrapProperties", "(", "LibertyServer", "server", ",", "Map", "<", "String", ",", "String", ">", "miscParms", ")", "throws", "Exception", "{", "String", "thisMethod", "=", "\"writeBootstrapProperties\"", ";", "loggingUtils", ".", "printMe...
Writes each of the specified bootstrap properties and values to the provided server's bootstrap.properties file.
[ "Writes", "each", "of", "the", "specified", "bootstrap", "properties", "and", "values", "to", "the", "provided", "server", "s", "bootstrap", ".", "properties", "file", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.fat.common/src/com/ibm/ws/security/fat/common/servers/ServerBootstrapUtils.java#L29-L40
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/CommonSteps.java
CommonSteps.checkInputText
@Conditioned @Et("Je vérifie le texte '(.*)-(.*)' avec '(.*)'[\\.|\\?]") @And("I check text '(.*)-(.*)' with '(.*)'[\\.|\\?]") public void checkInputText(String page, String elementName, String textOrKey, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { """ Checks...
java
@Conditioned @Et("Je vérifie le texte '(.*)-(.*)' avec '(.*)'[\\.|\\?]") @And("I check text '(.*)-(.*)' with '(.*)'[\\.|\\?]") public void checkInputText(String page, String elementName, String textOrKey, List<GherkinStepCondition> conditions) throws FailureException, TechnicalException { if (!c...
[ "@", "Conditioned", "@", "Et", "(", "\"Je vérifie le texte '(.*)-(.*)' avec '(.*)'[\\\\.|\\\\?]\")", "\r", "@", "And", "(", "\"I check text '(.*)-(.*)' with '(.*)'[\\\\.|\\\\?]\"", ")", "public", "void", "checkInputText", "(", "String", "page", ",", "String", "elementName", ...
Checks if html input text contains expected value. @param page The concerned page of elementName @param elementName The key of the PageElement to check @param textOrKey Is the new data (text or text in context (after a save)) @param conditions list of 'expected' values condition and 'actual' values ({@link com.github....
[ "Checks", "if", "html", "input", "text", "contains", "expected", "value", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/CommonSteps.java#L687-L694
Wolfgang-Schuetzelhofer/jcypher
src/main/java/iot/jcypher/query/values/JcValue.java
JcValue.asBoolean
public JcBoolean asBoolean() { """ <div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the receiver as a JcBoolean</i></div> <br/> """ JcBoolean ret = new JcBoolean(null, this, null); QueryRecorder.recordInvocati...
java
public JcBoolean asBoolean() { JcBoolean ret = new JcBoolean(null, this, null); QueryRecorder.recordInvocationConditional(this, "asBoolean", ret); return ret; }
[ "public", "JcBoolean", "asBoolean", "(", ")", "{", "JcBoolean", "ret", "=", "new", "JcBoolean", "(", "null", ",", "this", ",", "null", ")", ";", "QueryRecorder", ".", "recordInvocationConditional", "(", "this", ",", "\"asBoolean\"", ",", "ret", ")", ";", "...
<div color='red' style="font-size:24px;color:red"><b><i><u>JCYPHER</u></i></b></div> <div color='red' style="font-size:18px;color:red"><i>return the receiver as a JcBoolean</i></div> <br/>
[ "<div", "color", "=", "red", "style", "=", "font", "-", "size", ":", "24px", ";", "color", ":", "red", ">", "<b", ">", "<i", ">", "<u", ">", "JCYPHER<", "/", "u", ">", "<", "/", "i", ">", "<", "/", "b", ">", "<", "/", "div", ">", "<div", ...
train
https://github.com/Wolfgang-Schuetzelhofer/jcypher/blob/0f36914b4d6993a004cc235bb18dd3e02a59d253/src/main/java/iot/jcypher/query/values/JcValue.java#L81-L85
DataSketches/sketches-core
src/main/java/com/yahoo/sketches/cpc/CpcCompression.java
CpcCompression.compressHybridFlavor
private static void compressHybridFlavor(final CompressedState target, final CpcSketch source) { """ of a Pinned sketch before compressing it. Hence the name Hybrid. """ final int srcK = 1 << source.lgK; final PairTable srcPairTable = source.pairTable; final int srcNumPairs = srcPairTable.getNumPai...
java
private static void compressHybridFlavor(final CompressedState target, final CpcSketch source) { final int srcK = 1 << source.lgK; final PairTable srcPairTable = source.pairTable; final int srcNumPairs = srcPairTable.getNumPairs(); final int[] srcPairArr = PairTable.unwrappingGetItems(srcPairTable, srcN...
[ "private", "static", "void", "compressHybridFlavor", "(", "final", "CompressedState", "target", ",", "final", "CpcSketch", "source", ")", "{", "final", "int", "srcK", "=", "1", "<<", "source", ".", "lgK", ";", "final", "PairTable", "srcPairTable", "=", "source...
of a Pinned sketch before compressing it. Hence the name Hybrid.
[ "of", "a", "Pinned", "sketch", "before", "compressing", "it", ".", "Hence", "the", "name", "Hybrid", "." ]
train
https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/cpc/CpcCompression.java#L561-L589
awslabs/amazon-sqs-java-messaging-lib
src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java
AmazonSQSMessagingClientWrapper.getQueueUrl
public GetQueueUrlResult getQueueUrl(String queueName, String queueOwnerAccountId) throws JMSException { """ Gets the queueUrl of a queue given a queue name owned by the provided accountId. @param queueName @param queueOwnerAccountId The AWS accountId of the account that created the queue @return The response...
java
public GetQueueUrlResult getQueueUrl(String queueName, String queueOwnerAccountId) throws JMSException { return getQueueUrl(new GetQueueUrlRequest(queueName).withQueueOwnerAWSAccountId(queueOwnerAccountId)); }
[ "public", "GetQueueUrlResult", "getQueueUrl", "(", "String", "queueName", ",", "String", "queueOwnerAccountId", ")", "throws", "JMSException", "{", "return", "getQueueUrl", "(", "new", "GetQueueUrlRequest", "(", "queueName", ")", ".", "withQueueOwnerAWSAccountId", "(", ...
Gets the queueUrl of a queue given a queue name owned by the provided accountId. @param queueName @param queueOwnerAccountId The AWS accountId of the account that created the queue @return The response from the GetQueueUrl service method, as returned by AmazonSQS, which will include queue`s URL @throws JMSException
[ "Gets", "the", "queueUrl", "of", "a", "queue", "given", "a", "queue", "name", "owned", "by", "the", "provided", "accountId", "." ]
train
https://github.com/awslabs/amazon-sqs-java-messaging-lib/blob/efa716d34d51ef1c5572790626cdb795419cb342/src/main/java/com/amazon/sqs/javamessaging/AmazonSQSMessagingClientWrapper.java#L277-L279
lessthanoptimal/ddogleg
src/org/ddogleg/sorting/CountingSort.java
CountingSort.setRange
public void setRange( int minValue , int maxValue ) { """ Specify the data range @param minValue Minimum allowed value. (inclusive) @param maxValue Maximum allowed value. (inclusive) """ this.maxValue = maxValue; this.minValue = minValue; histogram.resize(maxValue-minValue+1); histIndexes.resize...
java
public void setRange( int minValue , int maxValue ) { this.maxValue = maxValue; this.minValue = minValue; histogram.resize(maxValue-minValue+1); histIndexes.resize(maxValue-minValue+1); }
[ "public", "void", "setRange", "(", "int", "minValue", ",", "int", "maxValue", ")", "{", "this", ".", "maxValue", "=", "maxValue", ";", "this", ".", "minValue", "=", "minValue", ";", "histogram", ".", "resize", "(", "maxValue", "-", "minValue", "+", "1", ...
Specify the data range @param minValue Minimum allowed value. (inclusive) @param maxValue Maximum allowed value. (inclusive)
[ "Specify", "the", "data", "range" ]
train
https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/sorting/CountingSort.java#L50-L56
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4Statement.java
JDBC4Statement.executeBatch
@Override public int[] executeBatch() throws SQLException { """ Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts. """ checkClosed(); closeCurrentResult(); if (batch == null || batch.size() == 0) { ...
java
@Override public int[] executeBatch() throws SQLException { checkClosed(); closeCurrentResult(); if (batch == null || batch.size() == 0) { return new int[0]; } int[] updateCounts = new int[batch.size()]; // keep a running total of update counts ...
[ "@", "Override", "public", "int", "[", "]", "executeBatch", "(", ")", "throws", "SQLException", "{", "checkClosed", "(", ")", ";", "closeCurrentResult", "(", ")", ";", "if", "(", "batch", "==", "null", "||", "batch", ".", "size", "(", ")", "==", "0", ...
Submits a batch of commands to the database for execution and if all commands execute successfully, returns an array of update counts.
[ "Submits", "a", "batch", "of", "commands", "to", "the", "database", "for", "execution", "and", "if", "all", "commands", "execute", "successfully", "returns", "an", "array", "of", "update", "counts", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4Statement.java#L415-L454
rzwitserloot/lombok
src/core/lombok/javac/handlers/JavacHandlerUtil.java
JavacHandlerUtil.getFieldType
static JCExpression getFieldType(JavacNode field, FieldAccess fieldAccess) { """ Returns the type of the field, unless a getter exists for this field, in which case the return type of the getter is returned. @see #createFieldAccessor(TreeMaker, JavacNode, FieldAccess) """ if (field.getKind() == Kind.METHO...
java
static JCExpression getFieldType(JavacNode field, FieldAccess fieldAccess) { if (field.getKind() == Kind.METHOD) return ((JCMethodDecl) field.get()).restype; boolean lookForGetter = lookForGetter(field, fieldAccess); GetterMethod getter = lookForGetter ? findGetter(field) : null; if (getter == null) { ...
[ "static", "JCExpression", "getFieldType", "(", "JavacNode", "field", ",", "FieldAccess", "fieldAccess", ")", "{", "if", "(", "field", ".", "getKind", "(", ")", "==", "Kind", ".", "METHOD", ")", "return", "(", "(", "JCMethodDecl", ")", "field", ".", "get", ...
Returns the type of the field, unless a getter exists for this field, in which case the return type of the getter is returned. @see #createFieldAccessor(TreeMaker, JavacNode, FieldAccess)
[ "Returns", "the", "type", "of", "the", "field", "unless", "a", "getter", "exists", "for", "this", "field", "in", "which", "case", "the", "return", "type", "of", "the", "getter", "is", "returned", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/handlers/JavacHandlerUtil.java#L924-L936
metafacture/metafacture-core
metafacture-commons/src/main/java/org/metafacture/commons/tries/WildcardTrie.java
WildcardTrie.put
public void put(final String keys, final P value) { """ Inserts keys into the try. Use '|' to concatenate. Use '*' (0,inf) and '?' (1,1) to express wildcards. @param keys pattern of keys to register @param value value to associate with the key pattern. """ if (keys.contains(OR_STRING)) { ...
java
public void put(final String keys, final P value) { if (keys.contains(OR_STRING)) { final String[] keysSplit = OR_PATTERN.split(keys); for (String string : keysSplit) { simplyPut(string, value); } } else { simplyPut(keys, value); } ...
[ "public", "void", "put", "(", "final", "String", "keys", ",", "final", "P", "value", ")", "{", "if", "(", "keys", ".", "contains", "(", "OR_STRING", ")", ")", "{", "final", "String", "[", "]", "keysSplit", "=", "OR_PATTERN", ".", "split", "(", "keys"...
Inserts keys into the try. Use '|' to concatenate. Use '*' (0,inf) and '?' (1,1) to express wildcards. @param keys pattern of keys to register @param value value to associate with the key pattern.
[ "Inserts", "keys", "into", "the", "try", ".", "Use", "|", "to", "concatenate", ".", "Use", "*", "(", "0", "inf", ")", "and", "?", "(", "1", "1", ")", "to", "express", "wildcards", "." ]
train
https://github.com/metafacture/metafacture-core/blob/cb43933ec8eb01a4ddce4019c14b2415cc441918/metafacture-commons/src/main/java/org/metafacture/commons/tries/WildcardTrie.java#L51-L60
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UPropertyAliases.java
UPropertyAliases.getPropertyValueEnumNoThrow
public int getPropertyValueEnumNoThrow(int property, CharSequence alias) { """ Returns a value enum given a property enum and one of its value names. Does not throw. @return value enum, or UProperty.UNDEFINED if not defined for that property """ int valueMapIndex=findProperty(property); if(val...
java
public int getPropertyValueEnumNoThrow(int property, CharSequence alias) { int valueMapIndex=findProperty(property); if(valueMapIndex==0) { return UProperty.UNDEFINED; } valueMapIndex=valueMaps[valueMapIndex+1]; if(valueMapIndex==0) { return UProperty.UNDE...
[ "public", "int", "getPropertyValueEnumNoThrow", "(", "int", "property", ",", "CharSequence", "alias", ")", "{", "int", "valueMapIndex", "=", "findProperty", "(", "property", ")", ";", "if", "(", "valueMapIndex", "==", "0", ")", "{", "return", "UProperty", ".",...
Returns a value enum given a property enum and one of its value names. Does not throw. @return value enum, or UProperty.UNDEFINED if not defined for that property
[ "Returns", "a", "value", "enum", "given", "a", "property", "enum", "and", "one", "of", "its", "value", "names", ".", "Does", "not", "throw", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/UPropertyAliases.java#L314-L326
larsga/Duke
duke-core/src/main/java/no/priv/garshol/duke/utils/PropertyUtils.java
PropertyUtils.get
public static String get(Properties props, String name, String defval) { """ Returns the value of an optional property, if the property is set. If it is not set defval is returned. """ String value = props.getProperty(name); if (value == null) value = defval; return value; }
java
public static String get(Properties props, String name, String defval) { String value = props.getProperty(name); if (value == null) value = defval; return value; }
[ "public", "static", "String", "get", "(", "Properties", "props", ",", "String", "name", ",", "String", "defval", ")", "{", "String", "value", "=", "props", ".", "getProperty", "(", "name", ")", ";", "if", "(", "value", "==", "null", ")", "value", "=", ...
Returns the value of an optional property, if the property is set. If it is not set defval is returned.
[ "Returns", "the", "value", "of", "an", "optional", "property", "if", "the", "property", "is", "set", ".", "If", "it", "is", "not", "set", "defval", "is", "returned", "." ]
train
https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/PropertyUtils.java#L28-L33
mapsforge/mapsforge
mapsforge-map-android/src/main/java/org/mapsforge/map/android/util/MapViewerTemplate.java
MapViewerTemplate.initializePosition
protected IMapViewPosition initializePosition(IMapViewPosition mvp) { """ initializes the map view position. @param mvp the map view position to be set @return the mapviewposition set """ LatLong center = mvp.getCenter(); if (center.equals(new LatLong(0, 0))) { mvp.setMapPositi...
java
protected IMapViewPosition initializePosition(IMapViewPosition mvp) { LatLong center = mvp.getCenter(); if (center.equals(new LatLong(0, 0))) { mvp.setMapPosition(this.getInitialPosition()); } mvp.setZoomLevelMax(getZoomLevelMax()); mvp.setZoomLevelMin(getZoomLevelMi...
[ "protected", "IMapViewPosition", "initializePosition", "(", "IMapViewPosition", "mvp", ")", "{", "LatLong", "center", "=", "mvp", ".", "getCenter", "(", ")", ";", "if", "(", "center", ".", "equals", "(", "new", "LatLong", "(", "0", ",", "0", ")", ")", ")...
initializes the map view position. @param mvp the map view position to be set @return the mapviewposition set
[ "initializes", "the", "map", "view", "position", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-android/src/main/java/org/mapsforge/map/android/util/MapViewerTemplate.java#L252-L261
rhuss/jolokia
agent/jvm/src/main/java/org/jolokia/jvmagent/client/command/StatusCommand.java
StatusCommand.execute
@Override @SuppressWarnings("PMD.SystemPrintln") int execute(OptionsAndArgs pOptions, Object pVm, VirtualMachineHandler pHandler) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { """ Checkt the status and print it out (except for <code>--quiet</code> @param pVm...
java
@Override @SuppressWarnings("PMD.SystemPrintln") int execute(OptionsAndArgs pOptions, Object pVm, VirtualMachineHandler pHandler) throws InvocationTargetException, NoSuchMethodException, IllegalAccessException { String agentUrl = checkAgentUrl(pVm); boolean quiet = pOptions.isQuiet()...
[ "@", "Override", "@", "SuppressWarnings", "(", "\"PMD.SystemPrintln\"", ")", "int", "execute", "(", "OptionsAndArgs", "pOptions", ",", "Object", "pVm", ",", "VirtualMachineHandler", "pHandler", ")", "throws", "InvocationTargetException", ",", "NoSuchMethodException", ",...
Checkt the status and print it out (except for <code>--quiet</code> @param pVm the virtual machine @return the exit code (0: agent is attached, 1: agent is not attached.)
[ "Checkt", "the", "status", "and", "print", "it", "out", "(", "except", "for", "<code", ">", "--", "quiet<", "/", "code", ">" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jvm/src/main/java/org/jolokia/jvmagent/client/command/StatusCommand.java#L44-L62
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsRenameImages.java
CmsRenameImages.buildSelectPlaces
public String buildSelectPlaces(String htmlAttributes) { """ Builds the html for the default copy folder mode select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the default copy folder mode select box """ List<String> options = new ArrayL...
java
public String buildSelectPlaces(String htmlAttributes) { List<String> options = new ArrayList<String>(4); options.add(OPTION_DECIMALPLACES_1); options.add(OPTION_DECIMALPLACES_2); options.add(OPTION_DECIMALPLACES_3); options.add(OPTION_DECIMALPLACES_4); List<String> valu...
[ "public", "String", "buildSelectPlaces", "(", "String", "htmlAttributes", ")", "{", "List", "<", "String", ">", "options", "=", "new", "ArrayList", "<", "String", ">", "(", "4", ")", ";", "options", ".", "add", "(", "OPTION_DECIMALPLACES_1", ")", ";", "opt...
Builds the html for the default copy folder mode select box.<p> @param htmlAttributes optional html attributes for the &lgt;select&gt; tag @return the html for the default copy folder mode select box
[ "Builds", "the", "html", "for", "the", "default", "copy", "folder", "mode", "select", "box", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsRenameImages.java#L182-L199
gallandarakhneorg/afc
core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/TernaryTreeNode.java
TernaryTreeNode.getHeights
@Override protected void getHeights(int currentHeight, List<Integer> heights) { """ Replies the heights of all the leaf nodes. The order of the heights is given by a depth-first iteration. @param currentHeight is the current height of this node. @param heights is the list of heights to fill """ if (isL...
java
@Override protected void getHeights(int currentHeight, List<Integer> heights) { if (isLeaf()) { heights.add(new Integer(currentHeight)); } else { if (this.left != null) { this.left.getHeights(currentHeight + 1, heights); } if (this.middle != null) { this.middle.getHeights(currentHeight + 1, hei...
[ "@", "Override", "protected", "void", "getHeights", "(", "int", "currentHeight", ",", "List", "<", "Integer", ">", "heights", ")", "{", "if", "(", "isLeaf", "(", ")", ")", "{", "heights", ".", "add", "(", "new", "Integer", "(", "currentHeight", ")", ")...
Replies the heights of all the leaf nodes. The order of the heights is given by a depth-first iteration. @param currentHeight is the current height of this node. @param heights is the list of heights to fill
[ "Replies", "the", "heights", "of", "all", "the", "leaf", "nodes", ".", "The", "order", "of", "the", "heights", "is", "given", "by", "a", "depth", "-", "first", "iteration", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathtree/src/main/java/org/arakhne/afc/math/tree/node/TernaryTreeNode.java#L481-L496
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/WebAppSecurityCollaboratorImpl.java
WebAppSecurityCollaboratorImpl.setUnauthenticatedSubjectIfNeeded
private boolean setUnauthenticatedSubjectIfNeeded(Subject invokedSubject, Subject receivedSubject) { """ If invoked and received cred are null, then set the unauthenticated subject. @param invokedSubject @param receivedSubject @return {@code true} if the unauthenticated subject was set, {@code false} otherwis...
java
private boolean setUnauthenticatedSubjectIfNeeded(Subject invokedSubject, Subject receivedSubject) { if ((invokedSubject == null) && (receivedSubject == null)) { // create the unauthenticated subject and set as the invocation subject SubjectManager sm = new SubjectManager(); ...
[ "private", "boolean", "setUnauthenticatedSubjectIfNeeded", "(", "Subject", "invokedSubject", ",", "Subject", "receivedSubject", ")", "{", "if", "(", "(", "invokedSubject", "==", "null", ")", "&&", "(", "receivedSubject", "==", "null", ")", ")", "{", "// create the...
If invoked and received cred are null, then set the unauthenticated subject. @param invokedSubject @param receivedSubject @return {@code true} if the unauthenticated subject was set, {@code false} otherwise.
[ "If", "invoked", "and", "received", "cred", "are", "null", "then", "set", "the", "unauthenticated", "subject", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/WebAppSecurityCollaboratorImpl.java#L1185-L1193
Ordinastie/MalisisCore
src/main/java/net/malisis/core/block/component/DirectionalComponent.java
DirectionalComponent.getDirection
public static EnumFacing getDirection(IBlockAccess world, BlockPos pos) { """ Gets the {@link EnumFacing direction} for the {@link Block} at world coords. @param world the world @param pos the pos @return the EnumFacing, null if the block is not {@link DirectionalComponent} """ return world != null && p...
java
public static EnumFacing getDirection(IBlockAccess world, BlockPos pos) { return world != null && pos != null ? getDirection(world.getBlockState(pos)) : EnumFacing.SOUTH; }
[ "public", "static", "EnumFacing", "getDirection", "(", "IBlockAccess", "world", ",", "BlockPos", "pos", ")", "{", "return", "world", "!=", "null", "&&", "pos", "!=", "null", "?", "getDirection", "(", "world", ".", "getBlockState", "(", "pos", ")", ")", ":"...
Gets the {@link EnumFacing direction} for the {@link Block} at world coords. @param world the world @param pos the pos @return the EnumFacing, null if the block is not {@link DirectionalComponent}
[ "Gets", "the", "{", "@link", "EnumFacing", "direction", "}", "for", "the", "{", "@link", "Block", "}", "at", "world", "coords", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/block/component/DirectionalComponent.java#L190-L193
StanKocken/EfficientAdapter
efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java
ViewHelper.setImageBitmap
public static void setImageBitmap(EfficientCacheView cacheView, int viewId, Bitmap bm) { """ Equivalent to calling ImageView.setImageBitmap @param cacheView The cache of views to get the view from @param viewId The id of the view whose image should change @param bm The bitmap to set """ ...
java
public static void setImageBitmap(EfficientCacheView cacheView, int viewId, Bitmap bm) { View view = cacheView.findViewByIdEfficient(viewId); if (view instanceof ImageView) { ((ImageView) view).setImageBitmap(bm); } }
[ "public", "static", "void", "setImageBitmap", "(", "EfficientCacheView", "cacheView", ",", "int", "viewId", ",", "Bitmap", "bm", ")", "{", "View", "view", "=", "cacheView", ".", "findViewByIdEfficient", "(", "viewId", ")", ";", "if", "(", "view", "instanceof",...
Equivalent to calling ImageView.setImageBitmap @param cacheView The cache of views to get the view from @param viewId The id of the view whose image should change @param bm The bitmap to set
[ "Equivalent", "to", "calling", "ImageView", ".", "setImageBitmap" ]
train
https://github.com/StanKocken/EfficientAdapter/blob/0bcc3a20182cbce9d7901e1e2a9104251637167d/efficientadapter/src/main/java/com/skocken/efficientadapter/lib/util/ViewHelper.java#L231-L236
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java
SelectBooleanCheckboxRenderer.startColSpanDiv
protected String startColSpanDiv(ResponseWriter rw, SelectBooleanCheckbox selectBooleanCheckbox) throws IOException { """ Start the column span div (if there's one). This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param selectBooleanCheckbox...
java
protected String startColSpanDiv(ResponseWriter rw, SelectBooleanCheckbox selectBooleanCheckbox) throws IOException { String clazz = Responsive.getResponsiveStyleClass(selectBooleanCheckbox, false); if (clazz != null && clazz.trim().length() > 0) { rw.startElement("div", selectBooleanCheckbo...
[ "protected", "String", "startColSpanDiv", "(", "ResponseWriter", "rw", ",", "SelectBooleanCheckbox", "selectBooleanCheckbox", ")", "throws", "IOException", "{", "String", "clazz", "=", "Responsive", ".", "getResponsiveStyleClass", "(", "selectBooleanCheckbox", ",", "false...
Start the column span div (if there's one). This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param selectBooleanCheckbox the component to render @throws IOException may be thrown by the response writer
[ "Start", "the", "column", "span", "div", "(", "if", "there", "s", "one", ")", ".", "This", "method", "is", "protected", "in", "order", "to", "allow", "third", "-", "party", "frameworks", "to", "derive", "from", "it", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java#L387-L394
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.getAccessControlList
public CmsAccessControlList getAccessControlList(CmsDbContext dbc, CmsResource resource) throws CmsException { """ Returns the full access control list of a given resource.<p> @param dbc the current database context @param resource the resource @return the access control list of the resource @throws CmsE...
java
public CmsAccessControlList getAccessControlList(CmsDbContext dbc, CmsResource resource) throws CmsException { return getAccessControlList(dbc, resource, false); }
[ "public", "CmsAccessControlList", "getAccessControlList", "(", "CmsDbContext", "dbc", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "return", "getAccessControlList", "(", "dbc", ",", "resource", ",", "false", ")", ";", "}" ]
Returns the full access control list of a given resource.<p> @param dbc the current database context @param resource the resource @return the access control list of the resource @throws CmsException if something goes wrong
[ "Returns", "the", "full", "access", "control", "list", "of", "a", "given", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L3459-L3462
exoplatform/jcr
exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java
LnkProducer.produceLink
@GET @Path("/ { """ Produces a link. @param linkFilePath link file path @param path path to resource @param uriInfo uriInfo @return generated link @response {code} "content" : the generated link file. {code} @LevelAPI Experimental """linkFilePath}/") @Produces("application/octet-stream") pu...
java
@GET @Path("/{linkFilePath}/") @Produces("application/octet-stream") public Response produceLink(@PathParam("linkFilePath") String linkFilePath, @QueryParam("path") String path, @Context UriInfo uriInfo) { String host = uriInfo.getRequestUri().getHost(); String uri = uriInfo.getBaseUri()....
[ "@", "GET", "@", "Path", "(", "\"/{linkFilePath}/\"", ")", "@", "Produces", "(", "\"application/octet-stream\"", ")", "public", "Response", "produceLink", "(", "@", "PathParam", "(", "\"linkFilePath\"", ")", "String", "linkFilePath", ",", "@", "QueryParam", "(", ...
Produces a link. @param linkFilePath link file path @param path path to resource @param uriInfo uriInfo @return generated link @response {code} "content" : the generated link file. {code} @LevelAPI Experimental
[ "Produces", "a", "link", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.webdav/src/main/java/org/exoplatform/services/jcr/webdav/lnkproducer/LnkProducer.java#L78-L103
morimekta/providence
providence-reflect/src/main/java/net/morimekta/providence/reflect/contained/CField.java
CField.equalsQualifiedName
private static boolean equalsQualifiedName(PDescriptor a, PDescriptor b) { """ Check if the two descriptors has the same qualified name, i..e symbolically represent the same type. @param a The first type. @param b The second type. @return If the two types are the same. """ return (a != null) && (...
java
private static boolean equalsQualifiedName(PDescriptor a, PDescriptor b) { return (a != null) && (b != null) && (a.getQualifiedName() .equals(b.getQualifiedName())); }
[ "private", "static", "boolean", "equalsQualifiedName", "(", "PDescriptor", "a", ",", "PDescriptor", "b", ")", "{", "return", "(", "a", "!=", "null", ")", "&&", "(", "b", "!=", "null", ")", "&&", "(", "a", ".", "getQualifiedName", "(", ")", ".", "equals...
Check if the two descriptors has the same qualified name, i..e symbolically represent the same type. @param a The first type. @param b The second type. @return If the two types are the same.
[ "Check", "if", "the", "two", "descriptors", "has", "the", "same", "qualified", "name", "i", "..", "e", "symbolically", "represent", "the", "same", "type", "." ]
train
https://github.com/morimekta/providence/blob/7c17dc1c96b1a1d4b9ff942c2cfeb725278bd3aa/providence-reflect/src/main/java/net/morimekta/providence/reflect/contained/CField.java#L190-L193
raphw/byte-buddy
byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java
ElementMatchers.nameMatches
public static <T extends NamedElement> ElementMatcher.Junction<T> nameMatches(String regex) { """ Matches a {@link NamedElement} name against a regular expression. @param regex The regular expression to match the name against. @param <T> The type of the matched object. @return An element matcher for a named...
java
public static <T extends NamedElement> ElementMatcher.Junction<T> nameMatches(String regex) { return new NameMatcher<T>(new StringMatcher(regex, StringMatcher.Mode.MATCHES)); }
[ "public", "static", "<", "T", "extends", "NamedElement", ">", "ElementMatcher", ".", "Junction", "<", "T", ">", "nameMatches", "(", "String", "regex", ")", "{", "return", "new", "NameMatcher", "<", "T", ">", "(", "new", "StringMatcher", "(", "regex", ",", ...
Matches a {@link NamedElement} name against a regular expression. @param regex The regular expression to match the name against. @param <T> The type of the matched object. @return An element matcher for a named element's name's against the given regular expression.
[ "Matches", "a", "{", "@link", "NamedElement", "}", "name", "against", "a", "regular", "expression", "." ]
train
https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L746-L748
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java
QualityWidgetScore.processQualityUTScore
private void processQualityUTScore( ScoreComponentSettings qualityUTSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { """ Process Unit Tests score @param qualityUTSettings Unit Tests Param Settings @param codeQualityIterable Quality values @param categoryScor...
java
private void processQualityUTScore( ScoreComponentSettings qualityUTSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityUTScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_UT_ID_NAME); Double qualityUTRatio = fetchQualityValue(cod...
[ "private", "void", "processQualityUTScore", "(", "ScoreComponentSettings", "qualityUTSettings", ",", "Iterable", "<", "CodeQuality", ">", "codeQualityIterable", ",", "List", "<", "ScoreWeight", ">", "categoryScores", ")", "{", "ScoreWeight", "qualityUTScore", "=", "getC...
Process Unit Tests score @param qualityUTSettings Unit Tests Param Settings @param codeQualityIterable Quality values @param categoryScores List of category scores
[ "Process", "Unit", "Tests", "score" ]
train
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java#L185-L210
google/auto
value/src/main/java/com/google/auto/value/processor/BuilderMethodClassifier.java
BuilderMethodClassifier.classifyMethodNoArgs
private boolean classifyMethodNoArgs(ExecutableElement method) { """ Classifies a method given that it has no arguments. Currently a method with no arguments can be a {@code build()} method, meaning that its return type must be the {@code @AutoValue} class; it can be a getter, with the same signature as one of t...
java
private boolean classifyMethodNoArgs(ExecutableElement method) { String methodName = method.getSimpleName().toString(); TypeMirror returnType = builderMethodReturnType(method); ExecutableElement getter = getterNameToGetter.get(methodName); if (getter != null) { return classifyGetter(method, gette...
[ "private", "boolean", "classifyMethodNoArgs", "(", "ExecutableElement", "method", ")", "{", "String", "methodName", "=", "method", ".", "getSimpleName", "(", ")", ".", "toString", "(", ")", ";", "TypeMirror", "returnType", "=", "builderMethodReturnType", "(", "met...
Classifies a method given that it has no arguments. Currently a method with no arguments can be a {@code build()} method, meaning that its return type must be the {@code @AutoValue} class; it can be a getter, with the same signature as one of the property getters in the {@code @AutoValue} class; or it can be a property...
[ "Classifies", "a", "method", "given", "that", "it", "has", "no", "arguments", ".", "Currently", "a", "method", "with", "no", "arguments", "can", "be", "a", "{", "@code", "build", "()", "}", "method", "meaning", "that", "its", "return", "type", "must", "b...
train
https://github.com/google/auto/blob/4158a5fa71f1ef763e683b627f4d29bc04cfde9d/value/src/main/java/com/google/auto/value/processor/BuilderMethodClassifier.java#L260-L298
fuinorg/units4j
src/main/java/org/fuin/units4j/Units4JUtils.java
Units4JUtils.isExpectedType
public static boolean isExpectedType(final Class<?> expectedClass, final Object obj) { """ Determines if an object has an expected type in a null-safe way. @param expectedClass Expected type. @param obj Object to test. @return TRUE if the object is exactly of the same class, else FALSE. """ fi...
java
public static boolean isExpectedType(final Class<?> expectedClass, final Object obj) { final Class<?> actualClass; if (obj == null) { actualClass = null; } else { actualClass = obj.getClass(); } return Objects.equals(expectedClass, actualClass); }
[ "public", "static", "boolean", "isExpectedType", "(", "final", "Class", "<", "?", ">", "expectedClass", ",", "final", "Object", "obj", ")", "{", "final", "Class", "<", "?", ">", "actualClass", ";", "if", "(", "obj", "==", "null", ")", "{", "actualClass",...
Determines if an object has an expected type in a null-safe way. @param expectedClass Expected type. @param obj Object to test. @return TRUE if the object is exactly of the same class, else FALSE.
[ "Determines", "if", "an", "object", "has", "an", "expected", "type", "in", "a", "null", "-", "safe", "way", "." ]
train
https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/Units4JUtils.java#L535-L543
apache/groovy
subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java
GPathResult.getAt
public Object getAt(final int index) { """ Supports the subscript operator for a GPathResult. <pre class="groovyTestCase"> import groovy.util.slurpersupport.* def text = """ &lt;characterList&gt; &lt;character/&gt; &lt;character&gt; &lt;name&gt;Gromit&lt;/name&gt; &lt;/character&gt; &lt;/characterList&gt;...
java
public Object getAt(final int index) { if (index < 0) { // calculate whole list in this case // recommend avoiding -ve's as this is obviously not as efficient List list = list(); int adjustedIndex = index + list.size(); if (adjustedIndex >= 0 && adjust...
[ "public", "Object", "getAt", "(", "final", "int", "index", ")", "{", "if", "(", "index", "<", "0", ")", "{", "// calculate whole list in this case", "// recommend avoiding -ve's as this is obviously not as efficient", "List", "list", "=", "list", "(", ")", ";", "int...
Supports the subscript operator for a GPathResult. <pre class="groovyTestCase"> import groovy.util.slurpersupport.* def text = """ &lt;characterList&gt; &lt;character/&gt; &lt;character&gt; &lt;name&gt;Gromit&lt;/name&gt; &lt;/character&gt; &lt;/characterList&gt;""" GPathResult characterList = new XmlSlurper().parseTe...
[ "Supports", "the", "subscript", "operator", "for", "a", "GPathResult", ".", "<pre", "class", "=", "groovyTestCase", ">", "import", "groovy", ".", "util", ".", "slurpersupport", ".", "*", "def", "text", "=", "&lt", ";", "characterList&gt", ";", "&lt", ";", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-xml/src/main/java/groovy/util/slurpersupport/GPathResult.java#L426-L448
alkacon/opencms-core
src/org/opencms/jlan/CmsJlanDiskInterface.java
CmsJlanDiskInterface.getCms
protected CmsObjectWrapper getCms(SrvSession session, TreeConnection connection) throws CmsException { """ Creates a CmsObjectWrapper for the current session.<p> @param session the current session @param connection the tree connection @return the correctly configured CmsObjectWrapper for this session @th...
java
protected CmsObjectWrapper getCms(SrvSession session, TreeConnection connection) throws CmsException { CmsJlanRepository repository = ((CmsJlanDeviceContext)connection.getContext()).getRepository(); CmsObjectWrapper result = repository.getCms(session, connection); return result; }
[ "protected", "CmsObjectWrapper", "getCms", "(", "SrvSession", "session", ",", "TreeConnection", "connection", ")", "throws", "CmsException", "{", "CmsJlanRepository", "repository", "=", "(", "(", "CmsJlanDeviceContext", ")", "connection", ".", "getContext", "(", ")", ...
Creates a CmsObjectWrapper for the current session.<p> @param session the current session @param connection the tree connection @return the correctly configured CmsObjectWrapper for this session @throws CmsException if something goes wrong
[ "Creates", "a", "CmsObjectWrapper", "for", "the", "current", "session", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jlan/CmsJlanDiskInterface.java#L430-L435
cesarferreira/AndroidQuickUtils
library/src/main/java/quickutils/core/categories/string.java
string.getFirstToken
public static String getFirstToken(String string, String token) { """ Returns the first token of the string if that string can be split by the token, else return the unmodified input string @param string The string to split @param token The token to use as splitter @return The resultant string """ ...
java
public static String getFirstToken(String string, String token) { if ((string != null) && string.contains(token)) { return string.split(token)[0]; } return string; }
[ "public", "static", "String", "getFirstToken", "(", "String", "string", ",", "String", "token", ")", "{", "if", "(", "(", "string", "!=", "null", ")", "&&", "string", ".", "contains", "(", "token", ")", ")", "{", "return", "string", ".", "split", "(", ...
Returns the first token of the string if that string can be split by the token, else return the unmodified input string @param string The string to split @param token The token to use as splitter @return The resultant string
[ "Returns", "the", "first", "token", "of", "the", "string", "if", "that", "string", "can", "be", "split", "by", "the", "token", "else", "return", "the", "unmodified", "input", "string" ]
train
https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/categories/string.java#L365-L370
glookast/commons-timecode
src/main/java/com/glookast/commons/timecode/MutableTimecode.java
MutableTimecode.valueOf
public static MutableTimecode valueOf(String timecode, int timecodeBase) throws IllegalArgumentException { """ Returns a Timecode instance for given timecode string and timecode base. Acceptable inputs are the normal representation HH:MM:SS:FF for non drop frame and HH:MM:SS:FF for drop frame @param timecode ...
java
public static MutableTimecode valueOf(String timecode, int timecodeBase) throws IllegalArgumentException { return valueOf(timecode, timecodeBase, StringType.NORMAL); }
[ "public", "static", "MutableTimecode", "valueOf", "(", "String", "timecode", ",", "int", "timecodeBase", ")", "throws", "IllegalArgumentException", "{", "return", "valueOf", "(", "timecode", ",", "timecodeBase", ",", "StringType", ".", "NORMAL", ")", ";", "}" ]
Returns a Timecode instance for given timecode string and timecode base. Acceptable inputs are the normal representation HH:MM:SS:FF for non drop frame and HH:MM:SS:FF for drop frame @param timecode @param timecodeBase @return the timecode @throws IllegalArgumentException
[ "Returns", "a", "Timecode", "instance", "for", "given", "timecode", "string", "and", "timecode", "base", ".", "Acceptable", "inputs", "are", "the", "normal", "representation", "HH", ":", "MM", ":", "SS", ":", "FF", "for", "non", "drop", "frame", "and", "HH...
train
https://github.com/glookast/commons-timecode/blob/ec2f682a51d1cc435d0b42d80de48ff15adb4ee8/src/main/java/com/glookast/commons/timecode/MutableTimecode.java#L73-L76
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.findBestNameForUrlNameMapping
protected String findBestNameForUrlNameMapping(CmsDbContext dbc, String name, CmsUUID structureId) throws CmsDataAccessException { """ Helper method for finding the 'best' URL name to use for a new URL name mapping.<p> Since the name given as a parameter may be already used, this method will try to append n...
java
protected String findBestNameForUrlNameMapping(CmsDbContext dbc, String name, CmsUUID structureId) throws CmsDataAccessException { List<CmsUrlNameMappingEntry> entriesStartingWithName = getVfsDriver(dbc).readUrlNameMappingEntries( dbc, false, CmsUrlNameMappingFilter.ALL....
[ "protected", "String", "findBestNameForUrlNameMapping", "(", "CmsDbContext", "dbc", ",", "String", "name", ",", "CmsUUID", "structureId", ")", "throws", "CmsDataAccessException", "{", "List", "<", "CmsUrlNameMappingEntry", ">", "entriesStartingWithName", "=", "getVfsDrive...
Helper method for finding the 'best' URL name to use for a new URL name mapping.<p> Since the name given as a parameter may be already used, this method will try to append numeric suffixes to the name to find a mapping name which is not used.<p> @param dbc the current database context @param name the name of the mapp...
[ "Helper", "method", "for", "finding", "the", "best", "URL", "name", "to", "use", "for", "a", "new", "URL", "name", "mapping", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L10465-L10483
mgormley/pacaya
src/main/java/edu/jhu/pacaya/autodiff/Tensor.java
Tensor.ravelIndexMatlab
public static int ravelIndexMatlab(int[] indices, int[] dims) { """ Gets the index into the values array that corresponds to the indices. """ indices = indices.clone(); ArrayUtils.reverse(indices); dims = dims.clone(); ArrayUtils.reverse(dims); return ravelIndex(indices,...
java
public static int ravelIndexMatlab(int[] indices, int[] dims) { indices = indices.clone(); ArrayUtils.reverse(indices); dims = dims.clone(); ArrayUtils.reverse(dims); return ravelIndex(indices, dims); }
[ "public", "static", "int", "ravelIndexMatlab", "(", "int", "[", "]", "indices", ",", "int", "[", "]", "dims", ")", "{", "indices", "=", "indices", ".", "clone", "(", ")", ";", "ArrayUtils", ".", "reverse", "(", "indices", ")", ";", "dims", "=", "dims...
Gets the index into the values array that corresponds to the indices.
[ "Gets", "the", "index", "into", "the", "values", "array", "that", "corresponds", "to", "the", "indices", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/autodiff/Tensor.java#L178-L184
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.read03BySax
public static Excel03SaxReader read03BySax(InputStream in, int sheetIndex, RowHandler rowHandler) { """ Sax方式读取Excel03 @param in 输入流 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0 """ try { return new Excel03SaxReader(rowHan...
java
public static Excel03SaxReader read03BySax(InputStream in, int sheetIndex, RowHandler rowHandler) { try { return new Excel03SaxReader(rowHandler).read(in, sheetIndex); } catch (NoClassDefFoundError e) { throw new DependencyException(ObjectUtil.defaultIfNull(e.getCause(), e), PoiChecker.NO_POI_ERROR_MSG); ...
[ "public", "static", "Excel03SaxReader", "read03BySax", "(", "InputStream", "in", ",", "int", "sheetIndex", ",", "RowHandler", "rowHandler", ")", "{", "try", "{", "return", "new", "Excel03SaxReader", "(", "rowHandler", ")", ".", "read", "(", "in", ",", "sheetIn...
Sax方式读取Excel03 @param in 输入流 @param sheetIndex Sheet索引,-1表示全部Sheet, 0表示第一个Sheet @param rowHandler 行处理器 @return {@link Excel07SaxReader} @since 3.2.0
[ "Sax方式读取Excel03" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L140-L146
Guichaguri/MinimalFTP
src/main/java/com/guichaguri/minimalftp/FTPConnection.java
FTPConnection.sendData
public void sendData(InputStream in) throws ResponseException { """ Sends a stream through a data connection @param in The input stream @throws ResponseException When an error occurs """ if(con.isClosed()) return; Socket socket = null; try { socket = conHandler.createData...
java
public void sendData(InputStream in) throws ResponseException { if(con.isClosed()) return; Socket socket = null; try { socket = conHandler.createDataSocket(); dataConnections.add(socket); OutputStream out = socket.getOutputStream(); byte[] buffer...
[ "public", "void", "sendData", "(", "InputStream", "in", ")", "throws", "ResponseException", "{", "if", "(", "con", ".", "isClosed", "(", ")", ")", "return", ";", "Socket", "socket", "=", "null", ";", "try", "{", "socket", "=", "conHandler", ".", "createD...
Sends a stream through a data connection @param in The input stream @throws ResponseException When an error occurs
[ "Sends", "a", "stream", "through", "a", "data", "connection" ]
train
https://github.com/Guichaguri/MinimalFTP/blob/ddd81e26ec88079ee4c37fe53d8efe420996e9b1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L266-L294
JavaMoney/jsr354-api
src/main/java/javax/money/Monetary.java
Monetary.getCurrency
public static CurrencyUnit getCurrency(String currencyCode, String... providers) { """ Access a new instance based on the currency code. Currencies are available as provided by {@link CurrencyProviderSpi} instances registered with the {@link javax.money.spi.Bootstrap}. @param currencyCode the ISO currency cod...
java
public static CurrencyUnit getCurrency(String currencyCode, String... providers) { return Optional.ofNullable(MONETARY_CURRENCIES_SINGLETON_SPI()).orElseThrow( () -> new MonetaryException("No MonetaryCurrenciesSingletonSpi loaded, check your system setup.")) .getCurrency(currency...
[ "public", "static", "CurrencyUnit", "getCurrency", "(", "String", "currencyCode", ",", "String", "...", "providers", ")", "{", "return", "Optional", ".", "ofNullable", "(", "MONETARY_CURRENCIES_SINGLETON_SPI", "(", ")", ")", ".", "orElseThrow", "(", "(", ")", "-...
Access a new instance based on the currency code. Currencies are available as provided by {@link CurrencyProviderSpi} instances registered with the {@link javax.money.spi.Bootstrap}. @param currencyCode the ISO currency code, not {@code null}. @param providers the (optional) specification of providers to consider. ...
[ "Access", "a", "new", "instance", "based", "on", "the", "currency", "code", ".", "Currencies", "are", "available", "as", "provided", "by", "{", "@link", "CurrencyProviderSpi", "}", "instances", "registered", "with", "the", "{", "@link", "javax", ".", "money", ...
train
https://github.com/JavaMoney/jsr354-api/blob/49a7ae436eaf45cac1040879185531ef22de5525/src/main/java/javax/money/Monetary.java#L386-L390