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
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java
FlowController.addValidationError
protected void addValidationError( String propertyName, String messageKey, Object[] messageArgs ) { """ Add a validation error that will be shown with the Errors and Error tags. @deprecated Use {@link #addActionError} instead. @param propertyName the name of the property with which to associate this error. @p...
java
protected void addValidationError( String propertyName, String messageKey, Object[] messageArgs ) { PageFlowUtils.addValidationError( propertyName, messageKey, messageArgs, getRequest() ); }
[ "protected", "void", "addValidationError", "(", "String", "propertyName", ",", "String", "messageKey", ",", "Object", "[", "]", "messageArgs", ")", "{", "PageFlowUtils", ".", "addValidationError", "(", "propertyName", ",", "messageKey", ",", "messageArgs", ",", "g...
Add a validation error that will be shown with the Errors and Error tags. @deprecated Use {@link #addActionError} instead. @param propertyName the name of the property with which to associate this error. @param messageKey the message-resources key for the error message. @param messageArgs an array of arguments for the...
[ "Add", "a", "validation", "error", "that", "will", "be", "shown", "with", "the", "Errors", "and", "Error", "tags", ".", "@deprecated", "Use", "{", "@link", "#addActionError", "}", "instead", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/FlowController.java#L1496-L1499
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/string/StringHelper.java
StringHelper.getToString
@Nullable public static String getToString (@Nullable final Object aObject, @Nullable final String sNullValue) { """ Convert the passed object to a string using the {@link Object#toString()} method or otherwise return the passed default value. @param aObject The value to be converted. May be <code>null</cod...
java
@Nullable public static String getToString (@Nullable final Object aObject, @Nullable final String sNullValue) { return aObject == null ? sNullValue : aObject.toString (); }
[ "@", "Nullable", "public", "static", "String", "getToString", "(", "@", "Nullable", "final", "Object", "aObject", ",", "@", "Nullable", "final", "String", "sNullValue", ")", "{", "return", "aObject", "==", "null", "?", "sNullValue", ":", "aObject", ".", "toS...
Convert the passed object to a string using the {@link Object#toString()} method or otherwise return the passed default value. @param aObject The value to be converted. May be <code>null</code>. @param sNullValue The value to be returned in case the passed object is <code>null</code>. May be <code>null</code> itself. ...
[ "Convert", "the", "passed", "object", "to", "a", "string", "using", "the", "{", "@link", "Object#toString", "()", "}", "method", "or", "otherwise", "return", "the", "passed", "default", "value", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/string/StringHelper.java#L4636-L4640
lucee/Lucee
core/src/main/java/lucee/runtime/functions/conversion/SerializeJSON.java
SerializeJSON.call
public static String call(PageContext pc, Object var, boolean serializeQueryByColumns, String strCharset) throws PageException { """ FUTURE remove, this methods are only used by compiled code in archives older than 5.2.3 """ Charset cs = StringUtil.isEmpty(strCharset) ? pc.getWebCharset() : CharsetUtil.toChar...
java
public static String call(PageContext pc, Object var, boolean serializeQueryByColumns, String strCharset) throws PageException { Charset cs = StringUtil.isEmpty(strCharset) ? pc.getWebCharset() : CharsetUtil.toCharset(strCharset); return _call(pc, var, serializeQueryByColumns, cs); }
[ "public", "static", "String", "call", "(", "PageContext", "pc", ",", "Object", "var", ",", "boolean", "serializeQueryByColumns", ",", "String", "strCharset", ")", "throws", "PageException", "{", "Charset", "cs", "=", "StringUtil", ".", "isEmpty", "(", "strCharse...
FUTURE remove, this methods are only used by compiled code in archives older than 5.2.3
[ "FUTURE", "remove", "this", "methods", "are", "only", "used", "by", "compiled", "code", "in", "archives", "older", "than", "5", ".", "2", ".", "3" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/functions/conversion/SerializeJSON.java#L61-L64
geomajas/geomajas-project-client-gwt2
common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/util/Dom.java
Dom.disAssembleId
public static String disAssembleId(String id, String... suffixes) { """ Disassemble an DOM id, removing suffixes. @param id base id @param suffixes suffixes to remove @return id """ return IMPL.disAssembleId(id, suffixes); }
java
public static String disAssembleId(String id, String... suffixes) { return IMPL.disAssembleId(id, suffixes); }
[ "public", "static", "String", "disAssembleId", "(", "String", "id", ",", "String", "...", "suffixes", ")", "{", "return", "IMPL", ".", "disAssembleId", "(", "id", ",", "suffixes", ")", ";", "}" ]
Disassemble an DOM id, removing suffixes. @param id base id @param suffixes suffixes to remove @return id
[ "Disassemble", "an", "DOM", "id", "removing", "suffixes", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/common-gwt/common-gwt/src/main/java/org/geomajas/gwt/client/util/Dom.java#L90-L92
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_PUT
public void ip_PUT(String ip, OvhIp body) throws IOException { """ Alter this object properties REST: PUT /ip/{ip} @param body [required] New object properties @param ip [required] """ String qPath = "/ip/{ip}"; StringBuilder sb = path(qPath, ip); exec(qPath, "PUT", sb.toString(), body); }
java
public void ip_PUT(String ip, OvhIp body) throws IOException { String qPath = "/ip/{ip}"; StringBuilder sb = path(qPath, ip); exec(qPath, "PUT", sb.toString(), body); }
[ "public", "void", "ip_PUT", "(", "String", "ip", ",", "OvhIp", "body", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "ip", ")", ";", "exec", "(", "qPath", ",", "\"...
Alter this object properties REST: PUT /ip/{ip} @param body [required] New object properties @param ip [required]
[ "Alter", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L683-L687
Azure/azure-sdk-for-java
cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java
AccountsInner.createAsync
public Observable<CognitiveServicesAccountInner> createAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParameters parameters) { """ Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's ...
java
public Observable<CognitiveServicesAccountInner> createAsync(String resourceGroupName, String accountName, CognitiveServicesAccountCreateParameters parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).map(new Func1<ServiceResponse<CognitiveServicesAccountInner>, Cognit...
[ "public", "Observable", "<", "CognitiveServicesAccountInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "CognitiveServicesAccountCreateParameters", "parameters", ")", "{", "return", "createWithServiceResponseAsync", "(", "resou...
Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing. @param resourceGroupName The name of the resource group within the user's subscription. @param accountName The name of Cognitive Servi...
[ "Create", "Cognitive", "Services", "Account", ".", "Accounts", "is", "a", "resource", "group", "wide", "resource", "type", ".", "It", "holds", "the", "keys", "for", "developer", "to", "access", "intelligent", "APIs", ".", "It", "s", "also", "the", "resource"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/resource-manager/v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java#L163-L170
finmath/finmath-lib
src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java
AbstractMonteCarloProduct.getValuesForModifiedData
public Map<String, Object> getValuesForModifiedData(double evaluationTime, MonteCarloSimulationInterface model, String entityKey, Object dataModified) throws CalculationException { """ This method returns the value under shifted market data (or model parameters). In its default implementation it does bump (creati...
java
public Map<String, Object> getValuesForModifiedData(double evaluationTime, MonteCarloSimulationInterface model, String entityKey, Object dataModified) throws CalculationException { Map<String, Object> dataModifiedMap = new HashMap<String, Object>(); dataModifiedMap.put(entityKey, dataModified); return getValuesF...
[ "public", "Map", "<", "String", ",", "Object", ">", "getValuesForModifiedData", "(", "double", "evaluationTime", ",", "MonteCarloSimulationInterface", "model", ",", "String", "entityKey", ",", "Object", "dataModified", ")", "throws", "CalculationException", "{", "Map"...
This method returns the value under shifted market data (or model parameters). In its default implementation it does bump (creating a new model) and revalue. Override the way the new model is created, to implemented improved techniques (proxy scheme, re-calibration). @param evaluationTime The time on which this produc...
[ "This", "method", "returns", "the", "value", "under", "shifted", "market", "data", "(", "or", "model", "parameters", ")", ".", "In", "its", "default", "implementation", "it", "does", "bump", "(", "creating", "a", "new", "model", ")", "and", "revalue", ".",...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/montecarlo/AbstractMonteCarloProduct.java#L164-L169
carewebframework/carewebframework-vista
org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java
FMDate.addFMPiece
private void addFMPiece(StringBuilder sb, int value, int pad) { """ Used to build a FM string representation of a date. @param sb String builder. @param value Value to append. @param pad Left pad with zeros to this number of digits. """ String val = Integer.toString(value); pad -= val.leng...
java
private void addFMPiece(StringBuilder sb, int value, int pad) { String val = Integer.toString(value); pad -= val.length(); while (pad-- > 0) { sb.append('0'); } sb.append(val); }
[ "private", "void", "addFMPiece", "(", "StringBuilder", "sb", ",", "int", "value", ",", "int", "pad", ")", "{", "String", "val", "=", "Integer", ".", "toString", "(", "value", ")", ";", "pad", "-=", "val", ".", "length", "(", ")", ";", "while", "(", ...
Used to build a FM string representation of a date. @param sb String builder. @param value Value to append. @param pad Left pad with zeros to this number of digits.
[ "Used", "to", "build", "a", "FM", "string", "representation", "of", "a", "date", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/FMDate.java#L231-L240
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountUsageEntryPersistenceImpl.java
CommerceDiscountUsageEntryPersistenceImpl.findAll
@Override public List<CommerceDiscountUsageEntry> findAll() { """ Returns all the commerce discount usage entries. @return the commerce discount usage entries """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceDiscountUsageEntry> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscountUsageEntry", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce discount usage entries. @return the commerce discount usage entries
[ "Returns", "all", "the", "commerce", "discount", "usage", "entries", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountUsageEntryPersistenceImpl.java#L1117-L1120
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsSiteManager.java
CmsSiteManager.isFolderWithMacros
public static boolean isFolderWithMacros(CmsObject cms, String folderPathRoot) { """ Method to check if a folder under given path contains a bundle for macro resolving.<p> @param cms CmsObject @param folderPathRoot root path of folder @return true if macros bundle found """ if (!CmsResource.isFol...
java
public static boolean isFolderWithMacros(CmsObject cms, String folderPathRoot) { if (!CmsResource.isFolder(folderPathRoot)) { folderPathRoot = folderPathRoot.concat("/"); } try { cms.readResource(folderPathRoot + MACRO_FOLDER); cms.readResource(folderPathRoot...
[ "public", "static", "boolean", "isFolderWithMacros", "(", "CmsObject", "cms", ",", "String", "folderPathRoot", ")", "{", "if", "(", "!", "CmsResource", ".", "isFolder", "(", "folderPathRoot", ")", ")", "{", "folderPathRoot", "=", "folderPathRoot", ".", "concat",...
Method to check if a folder under given path contains a bundle for macro resolving.<p> @param cms CmsObject @param folderPathRoot root path of folder @return true if macros bundle found
[ "Method", "to", "check", "if", "a", "folder", "under", "given", "path", "contains", "a", "bundle", "for", "macro", "resolving", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsSiteManager.java#L134-L146
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java
ExpressRouteCrossConnectionPeeringsInner.createOrUpdate
public ExpressRouteCrossConnectionPeeringInner createOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { """ Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGroupName The name of...
java
public ExpressRouteCrossConnectionPeeringInner createOrUpdate(String resourceGroupName, String crossConnectionName, String peeringName, ExpressRouteCrossConnectionPeeringInner peeringParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, peeringParameter...
[ "public", "ExpressRouteCrossConnectionPeeringInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "crossConnectionName", ",", "String", "peeringName", ",", "ExpressRouteCrossConnectionPeeringInner", "peeringParameters", ")", "{", "return", "createOrUpdateW...
Creates or updates a peering in the specified ExpressRouteCrossConnection. @param resourceGroupName The name of the resource group. @param crossConnectionName The name of the ExpressRouteCrossConnection. @param peeringName The name of the peering. @param peeringParameters Parameters supplied to the create or update Ex...
[ "Creates", "or", "updates", "a", "peering", "in", "the", "specified", "ExpressRouteCrossConnection", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ExpressRouteCrossConnectionPeeringsInner.java#L483-L485
stapler/stapler
core/src/main/java/org/kohsuke/stapler/Stapler.java
Stapler.invoke
void invoke(RequestImpl req, ResponseImpl rsp, Object node ) throws IOException, ServletException { """ Try to dispatch the request against the given node, and if it fails, report an error to the client. """ if(node==null) { // node is null if(!Dispatcher.isTraceEnabled(req)) { ...
java
void invoke(RequestImpl req, ResponseImpl rsp, Object node ) throws IOException, ServletException { if(node==null) { // node is null if(!Dispatcher.isTraceEnabled(req)) { rsp.sendError(SC_NOT_FOUND); } else { // show error page ...
[ "void", "invoke", "(", "RequestImpl", "req", ",", "ResponseImpl", "rsp", ",", "Object", "node", ")", "throws", "IOException", ",", "ServletException", "{", "if", "(", "node", "==", "null", ")", "{", "// node is null", "if", "(", "!", "Dispatcher", ".", "is...
Try to dispatch the request against the given node, and if it fails, report an error to the client.
[ "Try", "to", "dispatch", "the", "request", "against", "the", "given", "node", "and", "if", "it", "fails", "report", "an", "error", "to", "the", "client", "." ]
train
https://github.com/stapler/stapler/blob/11ad5af185e062fb46e01bf9fbed66f3ebf2a8f7/core/src/main/java/org/kohsuke/stapler/Stapler.java#L855-L906
atomix/catalyst
serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java
SerializerRegistry.registerAbstract
public SerializerRegistry registerAbstract(Class<?> abstractType, Class<? extends TypeSerializer> serializer) { """ Registers the given class as an abstract serializer for the given abstract type. @param abstractType The abstract type for which to register the serializer. @param serializer The serializer class...
java
public SerializerRegistry registerAbstract(Class<?> abstractType, Class<? extends TypeSerializer> serializer) { return registerAbstract(abstractType, calculateTypeId(abstractType), new DefaultTypeSerializerFactory(serializer)); }
[ "public", "SerializerRegistry", "registerAbstract", "(", "Class", "<", "?", ">", "abstractType", ",", "Class", "<", "?", "extends", "TypeSerializer", ">", "serializer", ")", "{", "return", "registerAbstract", "(", "abstractType", ",", "calculateTypeId", "(", "abst...
Registers the given class as an abstract serializer for the given abstract type. @param abstractType The abstract type for which to register the serializer. @param serializer The serializer class. @return The serializer registry.
[ "Registers", "the", "given", "class", "as", "an", "abstract", "serializer", "for", "the", "given", "abstract", "type", "." ]
train
https://github.com/atomix/catalyst/blob/140e762cb975cd8ee1fd85119043c5b8bf917c5c/serializer/src/main/java/io/atomix/catalyst/serializer/SerializerRegistry.java#L208-L210
demidenko05/beigesoft-webcrud-jar
src/main/java/org/beigesoft/web/model/HttpRequestData.java
HttpRequestData.setCookieValue
@Override public final void setCookieValue(final String pName, final String pValue) { """ <p>Set(add/change) cookie value.</p> @param pName Name @param pValue Value """ Cookie cookie = null; if (this.httpReq.getCookies() != null) { for (Cookie co : this.httpReq.getCookies()) { if (co....
java
@Override public final void setCookieValue(final String pName, final String pValue) { Cookie cookie = null; if (this.httpReq.getCookies() != null) { for (Cookie co : this.httpReq.getCookies()) { if (co.getName().equals(pName)) { cookie = co; cookie.setValue(pValue); ...
[ "@", "Override", "public", "final", "void", "setCookieValue", "(", "final", "String", "pName", ",", "final", "String", "pValue", ")", "{", "Cookie", "cookie", "=", "null", ";", "if", "(", "this", ".", "httpReq", ".", "getCookies", "(", ")", "!=", "null",...
<p>Set(add/change) cookie value.</p> @param pName Name @param pValue Value
[ "<p", ">", "Set", "(", "add", "/", "change", ")", "cookie", "value", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-webcrud-jar/blob/e973170f8fc1f164f0b67af9bb6a52b04579b64a/src/main/java/org/beigesoft/web/model/HttpRequestData.java#L139-L163
googleapis/google-cloud-java
google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java
Query.select
@Nonnull public Query select(FieldPath... fieldPaths) { """ Creates and returns a new Query instance that applies a field mask to the result and returns the specified subset of fields. You can specify a list of field paths to return, or use an empty list to only return the references of matching documents. ...
java
@Nonnull public Query select(FieldPath... fieldPaths) { QueryOptions newOptions = new QueryOptions(options); newOptions.fieldProjections = new ArrayList<>(); if (fieldPaths.length == 0) { fieldPaths = new FieldPath[] {FieldPath.DOCUMENT_ID}; } for (FieldPath path : fieldPaths) { Fiel...
[ "@", "Nonnull", "public", "Query", "select", "(", "FieldPath", "...", "fieldPaths", ")", "{", "QueryOptions", "newOptions", "=", "new", "QueryOptions", "(", "options", ")", ";", "newOptions", ".", "fieldProjections", "=", "new", "ArrayList", "<>", "(", ")", ...
Creates and returns a new Query instance that applies a field mask to the result and returns the specified subset of fields. You can specify a list of field paths to return, or use an empty list to only return the references of matching documents. @param fieldPaths The field paths to include. @return The created Query...
[ "Creates", "and", "returns", "a", "new", "Query", "instance", "that", "applies", "a", "field", "mask", "to", "the", "result", "and", "returns", "the", "specified", "subset", "of", "fields", ".", "You", "can", "specify", "a", "list", "of", "field", "paths",...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-firestore/src/main/java/com/google/cloud/firestore/Query.java#L755-L771
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java
ObjectInputStream.readFieldDescriptors
private void readFieldDescriptors(ObjectStreamClass cDesc) throws ClassNotFoundException, IOException { """ Reads a collection of field descriptors (name, type name, etc) for the class descriptor {@code cDesc} (an {@code ObjectStreamClass}) @param cDesc The class descriptor (an {@code ObjectStream...
java
private void readFieldDescriptors(ObjectStreamClass cDesc) throws ClassNotFoundException, IOException { short numFields = input.readShort(); ObjectStreamField[] fields = new ObjectStreamField[numFields]; // We set it now, but each element will be inserted in the array further ...
[ "private", "void", "readFieldDescriptors", "(", "ObjectStreamClass", "cDesc", ")", "throws", "ClassNotFoundException", ",", "IOException", "{", "short", "numFields", "=", "input", ".", "readShort", "(", ")", ";", "ObjectStreamField", "[", "]", "fields", "=", "new"...
Reads a collection of field descriptors (name, type name, etc) for the class descriptor {@code cDesc} (an {@code ObjectStreamClass}) @param cDesc The class descriptor (an {@code ObjectStreamClass}) for which to write field information @throws IOException If an IO exception happened when reading the field descriptors....
[ "Reads", "a", "collection", "of", "field", "descriptors", "(", "name", "type", "name", "etc", ")", "for", "the", "class", "descriptor", "{", "@code", "cDesc", "}", "(", "an", "{", "@code", "ObjectStreamClass", "}", ")" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/io/ObjectInputStream.java#L911-L948
jenkinsci/jenkins
core/src/main/java/hudson/search/Search.java
Search.doSuggestOpenSearch
public void doSuggestOpenSearch(StaplerRequest req, StaplerResponse rsp, @QueryParameter String q) throws IOException, ServletException { """ Used by OpenSearch auto-completion. Returns JSON array of the form: <pre> ["queryString",["comp1","comp2",...]] </pre> See http://developer.mozilla.org/en/docs/Suppo...
java
public void doSuggestOpenSearch(StaplerRequest req, StaplerResponse rsp, @QueryParameter String q) throws IOException, ServletException { rsp.setContentType(Flavor.JSON.contentType); DataWriter w = Flavor.JSON.createDataWriter(null, rsp); w.startArray(); w.value(q); w.startArray...
[ "public", "void", "doSuggestOpenSearch", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ",", "@", "QueryParameter", "String", "q", ")", "throws", "IOException", ",", "ServletException", "{", "rsp", ".", "setContentType", "(", "Flavor", ".", "JSON", ...
Used by OpenSearch auto-completion. Returns JSON array of the form: <pre> ["queryString",["comp1","comp2",...]] </pre> See http://developer.mozilla.org/en/docs/Supporting_search_suggestions_in_search_plugins
[ "Used", "by", "OpenSearch", "auto", "-", "completion", ".", "Returns", "JSON", "array", "of", "the", "form", ":" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/search/Search.java#L113-L124
OpenLiberty/open-liberty
dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java
AbstractRepositoryClient.getAssets
@Override public Collection<Asset> getAssets(final ResourceType type) throws IOException, RequestFailureException { """ This method will return all of the assets of a specific type in Massive. It will just return a summary of each asset and not include any {@link Attachment}s. @param type The type to look...
java
@Override public Collection<Asset> getAssets(final ResourceType type) throws IOException, RequestFailureException { Collection<ResourceType> types; if (type == null) { types = null; } else { types = Collections.singleton(type); } return getFilteredAsse...
[ "@", "Override", "public", "Collection", "<", "Asset", ">", "getAssets", "(", "final", "ResourceType", "type", ")", "throws", "IOException", ",", "RequestFailureException", "{", "Collection", "<", "ResourceType", ">", "types", ";", "if", "(", "type", "==", "nu...
This method will return all of the assets of a specific type in Massive. It will just return a summary of each asset and not include any {@link Attachment}s. @param type The type to look for, if <code>null</code> this method behaves in the same way as {@link #getAllAssets()} @return A collection of the assets of that ...
[ "This", "method", "will", "return", "all", "of", "the", "assets", "of", "a", "specific", "type", "in", "Massive", ".", "It", "will", "just", "return", "a", "summary", "of", "each", "asset", "and", "not", "include", "any", "{", "@link", "Attachment", "}",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java#L84-L93
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/BaasDocument.java
BaasDocument.getObject
public JsonObject getObject(String name, JsonObject otherwise) { """ Returns the value mapped to <code>name</code> as a {@link com.baasbox.android.json.JsonObject} or <code>otherwise</code> if the mapping is absent. @param name a non <code>null</code> key @param otherwise a default value @return the val...
java
public JsonObject getObject(String name, JsonObject otherwise) { return data.getObject(name, otherwise); }
[ "public", "JsonObject", "getObject", "(", "String", "name", ",", "JsonObject", "otherwise", ")", "{", "return", "data", ".", "getObject", "(", "name", ",", "otherwise", ")", ";", "}" ]
Returns the value mapped to <code>name</code> as a {@link com.baasbox.android.json.JsonObject} or <code>otherwise</code> if the mapping is absent. @param name a non <code>null</code> key @param otherwise a default value @return the value mapped to <code>name</code> or <code>otherwise</code>
[ "Returns", "the", "value", "mapped", "to", "<code", ">", "name<", "/", "code", ">", "as", "a", "{", "@link", "com", ".", "baasbox", ".", "android", ".", "json", ".", "JsonObject", "}", "or", "<code", ">", "otherwise<", "/", "code", ">", "if", "the", ...
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasDocument.java#L948-L950
threerings/nenya
core/src/main/java/com/threerings/media/image/NinePatchMirage.java
NinePatchMirage.newNinePatchContaining
public static Mirage newNinePatchContaining(NinePatch ninePatch, Rectangle content) { """ Returns a new Mirage that's a NinePatch stretched and positioned to contain the given Rectangle. """ Rectangle bounds = ninePatch.getBoundsSurrounding(content); Mirage mirage = new NinePatchMirage(ninePa...
java
public static Mirage newNinePatchContaining(NinePatch ninePatch, Rectangle content) { Rectangle bounds = ninePatch.getBoundsSurrounding(content); Mirage mirage = new NinePatchMirage(ninePatch, bounds.width, bounds.height); return new TransformedMirage(mirage, AffineTransform.get...
[ "public", "static", "Mirage", "newNinePatchContaining", "(", "NinePatch", "ninePatch", ",", "Rectangle", "content", ")", "{", "Rectangle", "bounds", "=", "ninePatch", ".", "getBoundsSurrounding", "(", "content", ")", ";", "Mirage", "mirage", "=", "new", "NinePatch...
Returns a new Mirage that's a NinePatch stretched and positioned to contain the given Rectangle.
[ "Returns", "a", "new", "Mirage", "that", "s", "a", "NinePatch", "stretched", "and", "positioned", "to", "contain", "the", "given", "Rectangle", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/image/NinePatchMirage.java#L53-L60
OpenFeign/feign
core/src/main/java/feign/template/UriUtils.java
UriUtils.queryEncode
public static String queryEncode(String query, Charset charset) { """ Uri Encode a Query Fragment. @param query containing the query fragment @param charset to use. @return the encoded query fragment. """ return encodeReserved(query, FragmentType.QUERY, charset); /* spaces will be encoded as 'plu...
java
public static String queryEncode(String query, Charset charset) { return encodeReserved(query, FragmentType.QUERY, charset); /* spaces will be encoded as 'plus' symbols here, we want them pct-encoded */ // return encoded.replaceAll("\\+", "%20"); }
[ "public", "static", "String", "queryEncode", "(", "String", "query", ",", "Charset", "charset", ")", "{", "return", "encodeReserved", "(", "query", ",", "FragmentType", ".", "QUERY", ",", "charset", ")", ";", "/* spaces will be encoded as 'plus' symbols here, we want ...
Uri Encode a Query Fragment. @param query containing the query fragment @param charset to use. @return the encoded query fragment.
[ "Uri", "Encode", "a", "Query", "Fragment", "." ]
train
https://github.com/OpenFeign/feign/blob/318fb0e955b8cfcf64f70d6aeea0ba5795f8a7eb/core/src/main/java/feign/template/UriUtils.java#L103-L108
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java
SwapAnnuity.getSwapAnnuity
public static RandomVariable getSwapAnnuity(TimeDiscretization tenor, DiscountCurveInterface discountCurve) { """ Function to calculate an (idealized) swap annuity for a given schedule and discount curve. @param tenor The schedule discretization, i.e., the period start and end dates. End dates are considered pa...
java
public static RandomVariable getSwapAnnuity(TimeDiscretization tenor, DiscountCurveInterface discountCurve) { return getSwapAnnuity(new RegularSchedule(tenor), discountCurve); }
[ "public", "static", "RandomVariable", "getSwapAnnuity", "(", "TimeDiscretization", "tenor", ",", "DiscountCurveInterface", "discountCurve", ")", "{", "return", "getSwapAnnuity", "(", "new", "RegularSchedule", "(", "tenor", ")", ",", "discountCurve", ")", ";", "}" ]
Function to calculate an (idealized) swap annuity for a given schedule and discount curve. @param tenor The schedule discretization, i.e., the period start and end dates. End dates are considered payment dates and start of the next period. @param discountCurve The discount curve. @return The swap annuity.
[ "Function", "to", "calculate", "an", "(", "idealized", ")", "swap", "annuity", "for", "a", "given", "schedule", "and", "discount", "curve", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java#L59-L61
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/stats/Counters.java
Counters.dotProductInPlace
public static <E> void dotProductInPlace(Counter<E> target, Counter<E> term) { """ Multiplies every count in target by the corresponding value in the term Counter. """ for (E key : target.keySet()) { target.setCount(key, target.getCount(key) * term.getCount(key)); } }
java
public static <E> void dotProductInPlace(Counter<E> target, Counter<E> term) { for (E key : target.keySet()) { target.setCount(key, target.getCount(key) * term.getCount(key)); } }
[ "public", "static", "<", "E", ">", "void", "dotProductInPlace", "(", "Counter", "<", "E", ">", "target", ",", "Counter", "<", "E", ">", "term", ")", "{", "for", "(", "E", "key", ":", "target", ".", "keySet", "(", ")", ")", "{", "target", ".", "se...
Multiplies every count in target by the corresponding value in the term Counter.
[ "Multiplies", "every", "count", "in", "target", "by", "the", "corresponding", "value", "in", "the", "term", "Counter", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/stats/Counters.java#L423-L427
enioka/jqm
jqm-all/jqm-model/src/main/java/com/enioka/jqm/model/JobInstance.java
JobInstance.addParameter
public RuntimeParameter addParameter(String key, String value) { """ Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards. @param key name of the parameter to add @param value value of the parameter to create @return the newly created...
java
public RuntimeParameter addParameter(String key, String value) { RuntimeParameter jp = new RuntimeParameter(); jp.setJi(this.getId()); jp.setKey(key); jp.setValue(value); return jp; }
[ "public", "RuntimeParameter", "addParameter", "(", "String", "key", ",", "String", "value", ")", "{", "RuntimeParameter", "jp", "=", "new", "RuntimeParameter", "(", ")", ";", "jp", ".", "setJi", "(", "this", ".", "getId", "(", ")", ")", ";", "jp", ".", ...
Helper method to add a parameter without having to create it explicitely. The created parameter should be persisted afterwards. @param key name of the parameter to add @param value value of the parameter to create @return the newly created parameter
[ "Helper", "method", "to", "add", "a", "parameter", "without", "having", "to", "create", "it", "explicitely", ".", "The", "created", "parameter", "should", "be", "persisted", "afterwards", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-model/src/main/java/com/enioka/jqm/model/JobInstance.java#L89-L96
jlinn/quartz-redis-jobstore
src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java
RedisJobStore.triggeredJobComplete
@Override public void triggeredJobComplete(final OperableTrigger trigger, final JobDetail jobDetail, final Trigger.CompletedExecutionInstruction triggerInstCode) { """ Inform the <code>JobStore</code> that the scheduler has completed the firing of the given <code>Trigger</code> (and the execution of its asso...
java
@Override public void triggeredJobComplete(final OperableTrigger trigger, final JobDetail jobDetail, final Trigger.CompletedExecutionInstruction triggerInstCode) { try { doWithLock(new LockCallbackWithoutResult() { @Override public Void doWithLock(JedisCommands je...
[ "@", "Override", "public", "void", "triggeredJobComplete", "(", "final", "OperableTrigger", "trigger", ",", "final", "JobDetail", "jobDetail", ",", "final", "Trigger", ".", "CompletedExecutionInstruction", "triggerInstCode", ")", "{", "try", "{", "doWithLock", "(", ...
Inform the <code>JobStore</code> that the scheduler has completed the firing of the given <code>Trigger</code> (and the execution of its associated <code>Job</code> completed, threw an exception, or was vetoed), and that the <code>{@link org.quartz.JobDataMap}</code> in the given <code>JobDetail</code> should be update...
[ "Inform", "the", "<code", ">", "JobStore<", "/", "code", ">", "that", "the", "scheduler", "has", "completed", "the", "firing", "of", "the", "given", "<code", ">", "Trigger<", "/", "code", ">", "(", "and", "the", "execution", "of", "its", "associated", "<...
train
https://github.com/jlinn/quartz-redis-jobstore/blob/be9a52ee776d8a09866fe99fd9718bc13a0cb992/src/main/java/net/joelinn/quartz/jobstore/RedisJobStore.java#L1108-L1125
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/AccessControlEntryImpl.java
AccessControlEntryImpl.combineRecursively
protected boolean combineRecursively( List<Privilege> list, Privilege[] privileges ) { """ Adds specified privileges to the given list. @param list the result list of combined privileges. @param privileges privileges to add. @return true if at least one of privileges ...
java
protected boolean combineRecursively( List<Privilege> list, Privilege[] privileges ) { boolean res = false; for (Privilege p : privileges) { if (p.isAggregate()) { res = combineRecursively(list, p.getAggregatePrivileges()); ...
[ "protected", "boolean", "combineRecursively", "(", "List", "<", "Privilege", ">", "list", ",", "Privilege", "[", "]", "privileges", ")", "{", "boolean", "res", "=", "false", ";", "for", "(", "Privilege", "p", ":", "privileges", ")", "{", "if", "(", "p", ...
Adds specified privileges to the given list. @param list the result list of combined privileges. @param privileges privileges to add. @return true if at least one of privileges was added.
[ "Adds", "specified", "privileges", "to", "the", "given", "list", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/security/acl/AccessControlEntryImpl.java#L114-L127
OpenLiberty/open-liberty
dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java
AdministeredObjectResourceFactoryBuilder.getadminObjectID
private static final String getadminObjectID(String application, String module, String component, String jndiName) { """ Utility method that creates a unique identifier for an application defined data source. For example, application[MyApp]/module[MyModule]/connectionFactory[java:module/env/jdbc/cf1] @param a...
java
private static final String getadminObjectID(String application, String module, String component, String jndiName) { StringBuilder sb = new StringBuilder(jndiName.length() + 80); if (application != null) { sb.append(AppDefinedResource.APPLICATION).append('[').append(application).append(']')....
[ "private", "static", "final", "String", "getadminObjectID", "(", "String", "application", ",", "String", "module", ",", "String", "component", ",", "String", "jndiName", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "jndiName", ".", "length"...
Utility method that creates a unique identifier for an application defined data source. For example, application[MyApp]/module[MyModule]/connectionFactory[java:module/env/jdbc/cf1] @param application application name if data source is in java:app, java:module, or java:comp. Otherwise null. @param module module name if...
[ "Utility", "method", "that", "creates", "a", "unique", "identifier", "for", "an", "application", "defined", "data", "source", ".", "For", "example", "application", "[", "MyApp", "]", "/", "module", "[", "MyModule", "]", "/", "connectionFactory", "[", "java", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jca.1.7/src/com/ibm/ws/jca17/processor/service/AdministeredObjectResourceFactoryBuilder.java#L295-L306
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java
ReturnUrl.getAvailablePaymentActionsForReturnUrl
public static MozuUrl getAvailablePaymentActionsForReturnUrl(String paymentId, String returnId) { """ Get Resource Url for GetAvailablePaymentActionsForReturn @param paymentId Unique identifier of the payment for which to perform the action. @param returnId Unique identifier of the return whose items you want to...
java
public static MozuUrl getAvailablePaymentActionsForReturnUrl(String paymentId, String returnId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/payments/{paymentId}/actions"); formatter.formatUrl("paymentId", paymentId); formatter.formatUrl("returnId", returnId); return new M...
[ "public", "static", "MozuUrl", "getAvailablePaymentActionsForReturnUrl", "(", "String", "paymentId", ",", "String", "returnId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/returns/{returnId}/payments/{paymentId}/actions\"", ")", ";...
Get Resource Url for GetAvailablePaymentActionsForReturn @param paymentId Unique identifier of the payment for which to perform the action. @param returnId Unique identifier of the return whose items you want to get. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetAvailablePaymentActionsForReturn" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java#L86-L92
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/TagsApi.java
TagsApi.createRelease
public Release createRelease(Object projectIdOrPath, String tagName, String releaseNotes) throws GitLabApiException { """ Add release notes to the existing git tag. <pre><code>GitLab Endpoint: POST /projects/:id/repository/tags/:tagName/release</code></pre> @param projectIdOrPath id, path of the project, or ...
java
public Release createRelease(Object projectIdOrPath, String tagName, String releaseNotes) throws GitLabApiException { Form formData = new GitLabApiForm().withParam("description", releaseNotes); Response response = post(Response.Status.CREATED, formData.asMap(), "projects", getProjectIdOr...
[ "public", "Release", "createRelease", "(", "Object", "projectIdOrPath", ",", "String", "tagName", ",", "String", "releaseNotes", ")", "throws", "GitLabApiException", "{", "Form", "formData", "=", "new", "GitLabApiForm", "(", ")", ".", "withParam", "(", "\"descript...
Add release notes to the existing git tag. <pre><code>GitLab Endpoint: POST /projects/:id/repository/tags/:tagName/release</code></pre> @param projectIdOrPath id, path of the project, or a Project instance holding the project ID or path @param tagName the name of a tag @param releaseNotes release notes with markdown ...
[ "Add", "release", "notes", "to", "the", "existing", "git", "tag", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/TagsApi.java#L215-L220
molgenis/molgenis
molgenis-data/src/main/java/org/molgenis/data/listeners/EntityListenersService.java
EntityListenersService.addEntityListener
public void addEntityListener(String repoFullName, EntityListener entityListener) { """ Adds an entity listener for a entity of the given class that listens to entity changes @param entityListener entity listener for a entity """ lock.writeLock().lock(); try { verifyRepoRegistered(repoFullName...
java
public void addEntityListener(String repoFullName, EntityListener entityListener) { lock.writeLock().lock(); try { verifyRepoRegistered(repoFullName); SetMultimap<Object, EntityListener> entityListeners = this.entityListenersByRepo.get(repoFullName); entityListeners.put(entityListene...
[ "public", "void", "addEntityListener", "(", "String", "repoFullName", ",", "EntityListener", "entityListener", ")", "{", "lock", ".", "writeLock", "(", ")", ".", "lock", "(", ")", ";", "try", "{", "verifyRepoRegistered", "(", "repoFullName", ")", ";", "SetMult...
Adds an entity listener for a entity of the given class that listens to entity changes @param entityListener entity listener for a entity
[ "Adds", "an", "entity", "listener", "for", "a", "entity", "of", "the", "given", "class", "that", "listens", "to", "entity", "changes" ]
train
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-data/src/main/java/org/molgenis/data/listeners/EntityListenersService.java#L79-L89
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/cache/links/ItemStreamLink.java
ItemStreamLink.addItem
public final void addItem(Item item, long lockID, Transaction transaction) throws OutOfCacheSpace, ProtocolException, StreamIsFull, TransactionException, PersistenceException, SevereMessageStoreException { """ @see com.ibm.ws.sib.msgstore.ItemCollection#addItem(com.ibm.ws.sib.msgstore.Item, com.ibm.ws.sib.msgstore...
java
public final void addItem(Item item, long lockID, Transaction transaction) throws OutOfCacheSpace, ProtocolException, StreamIsFull, TransactionException, PersistenceException, SevereMessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "addItem", new...
[ "public", "final", "void", "addItem", "(", "Item", "item", ",", "long", "lockID", ",", "Transaction", "transaction", ")", "throws", "OutOfCacheSpace", ",", "ProtocolException", ",", "StreamIsFull", ",", "TransactionException", ",", "PersistenceException", ",", "Seve...
@see com.ibm.ws.sib.msgstore.ItemCollection#addItem(com.ibm.ws.sib.msgstore.Item, com.ibm.ws.sib.msgstore.Transaction) @throws OutOfCacheSpace if there is not enough space in the unstoredCache and the storage strategy is AbstractItem.STORE_NEVER. @throws StreamIsFull if the size of the stream would exceed the maximum...
[ "@see", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "msgstore", ".", "ItemCollection#addItem", "(", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "msgstore", ".", "Item", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "msgstore", ".", "Transact...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/cache/links/ItemStreamLink.java#L270-L307
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/trees/TreeGraph.java
TreeGraph.addNodeToIndexMap
public void addNodeToIndexMap(int index, TreeGraphNode node) { """ Store a mapping from an arbitrary integer index to a node in this treegraph. Normally a client shouldn't need to use this, as the nodes are automatically indexed by the <code>TreeGraph</code> constructor. @param index the arbitrary integer i...
java
public void addNodeToIndexMap(int index, TreeGraphNode node) { indexMap.put(Integer.valueOf(index), node); }
[ "public", "void", "addNodeToIndexMap", "(", "int", "index", ",", "TreeGraphNode", "node", ")", "{", "indexMap", ".", "put", "(", "Integer", ".", "valueOf", "(", "index", ")", ",", "node", ")", ";", "}" ]
Store a mapping from an arbitrary integer index to a node in this treegraph. Normally a client shouldn't need to use this, as the nodes are automatically indexed by the <code>TreeGraph</code> constructor. @param index the arbitrary integer index @param node the <code>TreeGraphNode</code> to be indexed
[ "Store", "a", "mapping", "from", "an", "arbitrary", "integer", "index", "to", "a", "node", "in", "this", "treegraph", ".", "Normally", "a", "client", "shouldn", "t", "need", "to", "use", "this", "as", "the", "nodes", "are", "automatically", "indexed", "by"...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/trees/TreeGraph.java#L70-L72
ops4j/org.ops4j.base
ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java
Resources.getTime
public Date getTime( String key, Date defaultValue ) throws MissingResourceException { """ Retrieve a time from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource time @throws MissingResourceException if the requested key i...
java
public Date getTime( String key, Date defaultValue ) throws MissingResourceException { try { return getTime( key ); } catch( MissingResourceException mre ) { return defaultValue; } }
[ "public", "Date", "getTime", "(", "String", "key", ",", "Date", "defaultValue", ")", "throws", "MissingResourceException", "{", "try", "{", "return", "getTime", "(", "key", ")", ";", "}", "catch", "(", "MissingResourceException", "mre", ")", "{", "return", "...
Retrieve a time from bundle. @param key the key of resource @param defaultValue the default value if key is missing @return the resource time @throws MissingResourceException if the requested key is unknown
[ "Retrieve", "a", "time", "from", "bundle", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util/src/main/java/org/ops4j/util/i18n/Resources.java#L579-L590
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java
DeploymentHelper.runInNewTransaction
public static <T> T runInNewTransaction(@NotNull final PlatformTransactionManager txManager, final String transactionName, final int isolationLevel, @NotNull final TransactionCallback<T> action) { """ Executes the modifying action in new transaction @param txManager transaction manager interface @...
java
public static <T> T runInNewTransaction(@NotNull final PlatformTransactionManager txManager, final String transactionName, final int isolationLevel, @NotNull final TransactionCallback<T> action) { final DefaultTransactionDefinition def = new DefaultTransactionDefinition(); def.setName(transa...
[ "public", "static", "<", "T", ">", "T", "runInNewTransaction", "(", "@", "NotNull", "final", "PlatformTransactionManager", "txManager", ",", "final", "String", "transactionName", ",", "final", "int", "isolationLevel", ",", "@", "NotNull", "final", "TransactionCallba...
Executes the modifying action in new transaction @param txManager transaction manager interface @param transactionName the name of the new transaction @param isolationLevel isolation level of the new transaction @param action the callback to execute in new tranaction @return the result of the action
[ "Executes", "the", "modifying", "action", "in", "new", "transaction" ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/utils/DeploymentHelper.java#L104-L112
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.timemachine/src/main/java/de/tudarmstadt/ukp/wikipedia/timemachine/dump/xml/XMLDumpTableInputStream.java
XMLDumpTableInputStream.initialize
@Override public void initialize(InputStream inputStream, DumpTableEnum table) throws IOException { """ Decorator for InputStream, which allows to convert an XML input stream to SQL @param inputStream XML input stream @throws IOException """ unbufferedResult = new PipedInputStream(); decodedS...
java
@Override public void initialize(InputStream inputStream, DumpTableEnum table) throws IOException { unbufferedResult = new PipedInputStream(); decodedStream = new PipedOutputStream(unbufferedResult); result = new BufferedInputStream(unbufferedResult, BUFFERSIZE); xmlInputThread = new XMLDumpTableInputS...
[ "@", "Override", "public", "void", "initialize", "(", "InputStream", "inputStream", ",", "DumpTableEnum", "table", ")", "throws", "IOException", "{", "unbufferedResult", "=", "new", "PipedInputStream", "(", ")", ";", "decodedStream", "=", "new", "PipedOutputStream",...
Decorator for InputStream, which allows to convert an XML input stream to SQL @param inputStream XML input stream @throws IOException
[ "Decorator", "for", "InputStream", "which", "allows", "to", "convert", "an", "XML", "input", "stream", "to", "SQL" ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.timemachine/src/main/java/de/tudarmstadt/ukp/wikipedia/timemachine/dump/xml/XMLDumpTableInputStream.java#L67-L79
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java
NameUtil.getLocalImplClassName
public static String getLocalImplClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { """ Return the name of the deployed class that implements the local interface of the bean. <p> @param enterpriseBean bean impl class @param isPost11DD true if bean is defined using later than 1.1 deploym...
java
public static String getLocalImplClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { String localInterfaceName = getLocalInterfaceName(enterpriseBean); if (localInterfaceName == null) { return null; } String packageName = packageName(localInterfaceN...
[ "public", "static", "String", "getLocalImplClassName", "(", "EnterpriseBean", "enterpriseBean", ",", "boolean", "isPost11DD", ")", "// d114199", "{", "String", "localInterfaceName", "=", "getLocalInterfaceName", "(", "enterpriseBean", ")", ";", "if", "(", "localInterfac...
Return the name of the deployed class that implements the local interface of the bean. <p> @param enterpriseBean bean impl class @param isPost11DD true if bean is defined using later than 1.1 deployment description.
[ "Return", "the", "name", "of", "the", "deployed", "class", "that", "implements", "the", "local", "interface", "of", "the", "bean", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java#L228-L248
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/Graphics.java
Graphics.createText
public static Text createText(String fontName, int size, TextStyle style) { """ Crate a text. @param fontName The font name (must not be <code>null</code>). @param size The font size in pixel (must be strictly positive). @param style The font style (must not be <code>null</code>). @return The created text. ...
java
public static Text createText(String fontName, int size, TextStyle style) { return factoryGraphic.createText(fontName, size, style); }
[ "public", "static", "Text", "createText", "(", "String", "fontName", ",", "int", "size", ",", "TextStyle", "style", ")", "{", "return", "factoryGraphic", ".", "createText", "(", "fontName", ",", "size", ",", "style", ")", ";", "}" ]
Crate a text. @param fontName The font name (must not be <code>null</code>). @param size The font size in pixel (must be strictly positive). @param style The font style (must not be <code>null</code>). @return The created text. @throws LionEngineException If invalid arguments.
[ "Crate", "a", "text", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/graphic/Graphics.java#L99-L102
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/FacetUrl.java
FacetUrl.getFacetsUrl
public static MozuUrl getFacetsUrl(String documentListName, String propertyName) { """ Get Resource Url for GetFacets @param documentListName Name of content documentListName to delete @param propertyName The property name associated with the facets to retrieve. @return String Resource Url """ UrlForma...
java
public static MozuUrl getFacetsUrl(String documentListName, String propertyName) { UrlFormatter formatter = new UrlFormatter("/api/content/documentlists/{documentListName}/facets/{propertyName}"); formatter.formatUrl("documentListName", documentListName); formatter.formatUrl("propertyName", propertyName); ...
[ "public", "static", "MozuUrl", "getFacetsUrl", "(", "String", "documentListName", ",", "String", "propertyName", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/content/documentlists/{documentListName}/facets/{propertyName}\"", ")", ";", "for...
Get Resource Url for GetFacets @param documentListName Name of content documentListName to delete @param propertyName The property name associated with the facets to retrieve. @return String Resource Url
[ "Get", "Resource", "Url", "for", "GetFacets" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/content/documentlists/FacetUrl.java#L22-L28
pedrovgs/Lynx
lynx/src/main/java/com/github/pedrovgs/lynx/model/Trace.java
Trace.fromString
public static Trace fromString(String logcatTrace) throws IllegalTraceException { """ Factory method used to create a Trace instance from a String. The format of the input string have to be something like: "02-07 17:45:33.014 D/Any debug trace" @param logcatTrace the logcat string @return a new Trace instance...
java
public static Trace fromString(String logcatTrace) throws IllegalTraceException { if (logcatTrace == null || logcatTrace.length() < MIN_TRACE_SIZE || logcatTrace.charAt(20) != TRACE_LEVEL_SEPARATOR) { throw new IllegalTraceException( "You are trying to create a Trace object from a in...
[ "public", "static", "Trace", "fromString", "(", "String", "logcatTrace", ")", "throws", "IllegalTraceException", "{", "if", "(", "logcatTrace", "==", "null", "||", "logcatTrace", ".", "length", "(", ")", "<", "MIN_TRACE_SIZE", "||", "logcatTrace", ".", "charAt",...
Factory method used to create a Trace instance from a String. The format of the input string have to be something like: "02-07 17:45:33.014 D/Any debug trace" @param logcatTrace the logcat string @return a new Trace instance @throws IllegalTraceException if the string argument is an invalid string
[ "Factory", "method", "used", "to", "create", "a", "Trace", "instance", "from", "a", "String", ".", "The", "format", "of", "the", "input", "string", "have", "to", "be", "something", "like", ":", "02", "-", "07", "17", ":", "45", ":", "33", ".", "014",...
train
https://github.com/pedrovgs/Lynx/blob/6097ab18b76c1ebdd0819c10e5d09ec19ea5bf4d/lynx/src/main/java/com/github/pedrovgs/lynx/model/Trace.java#L50-L62
couchbase/couchbase-lite-java-core
src/main/java/com/couchbase/lite/support/security/SymmetricKey.java
SymmetricKey.decryptStream
public InputStream decryptStream(InputStream input) throws SymmetricKeyException { """ Decrypt the input stream. The encrypted stream must be prefixed with the IV header (16 bytes) use when encrypting the data of the given input stream. @param input InputStream of the data to be decrypted @return InputStream of...
java
public InputStream decryptStream(InputStream input) throws SymmetricKeyException { try { EncryptedInputStream encryptedInputStream = new EncryptedInputStream(input); byte[] iv = encryptedInputStream.getIv(); Cipher cipher = getCipher(Cipher.DECRYPT_MODE, iv); retu...
[ "public", "InputStream", "decryptStream", "(", "InputStream", "input", ")", "throws", "SymmetricKeyException", "{", "try", "{", "EncryptedInputStream", "encryptedInputStream", "=", "new", "EncryptedInputStream", "(", "input", ")", ";", "byte", "[", "]", "iv", "=", ...
Decrypt the input stream. The encrypted stream must be prefixed with the IV header (16 bytes) use when encrypting the data of the given input stream. @param input InputStream of the data to be decrypted @return InputStream of the decrypted data @throws SymmetricKeyException
[ "Decrypt", "the", "input", "stream", ".", "The", "encrypted", "stream", "must", "be", "prefixed", "with", "the", "IV", "header", "(", "16", "bytes", ")", "use", "when", "encrypting", "the", "data", "of", "the", "given", "input", "stream", "." ]
train
https://github.com/couchbase/couchbase-lite-java-core/blob/3b275642e2d2f231fd155ad9def9c5e9eff3118e/src/main/java/com/couchbase/lite/support/security/SymmetricKey.java#L150-L159
Netflix/spectator
spectator-api/src/main/java/com/netflix/spectator/api/patterns/PolledMeter.java
PolledMeter.monitorMeter
@Deprecated public static void monitorMeter(Registry registry, Meter meter) { """ Provided for backwards compatibility to support the {@link Registry#register(Meter)} method. Use the builder created with {@link #using(Registry)} instead. @deprecated This method only exists to allow for backwards compatibilit...
java
@Deprecated public static void monitorMeter(Registry registry, Meter meter) { ConcurrentMap<Id, Object> state = registry.state(); Object c = Utils.computeIfAbsent(state, meter.id(), MeterState::new); if (!(c instanceof MeterState)) { Utils.propagateTypeError(registry, meter.id(), MeterState.class, c...
[ "@", "Deprecated", "public", "static", "void", "monitorMeter", "(", "Registry", "registry", ",", "Meter", "meter", ")", "{", "ConcurrentMap", "<", "Id", ",", "Object", ">", "state", "=", "registry", ".", "state", "(", ")", ";", "Object", "c", "=", "Utils...
Provided for backwards compatibility to support the {@link Registry#register(Meter)} method. Use the builder created with {@link #using(Registry)} instead. @deprecated This method only exists to allow for backwards compatibility and should be considered an internal detail. Scheduled to be removed in 2.0.
[ "Provided", "for", "backwards", "compatibility", "to", "support", "the", "{", "@link", "Registry#register", "(", "Meter", ")", "}", "method", ".", "Use", "the", "builder", "created", "with", "{", "@link", "#using", "(", "Registry", ")", "}", "instead", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-api/src/main/java/com/netflix/spectator/api/patterns/PolledMeter.java#L352-L364
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/model/monitor/ServiceLevelAgreement.java
ServiceLevelAgreement.secondsToUnits
public static String secondsToUnits(int seconds, String unit) { """ Convert seconds to specified units @param seconds @param unit @return """ if (unit == null) return String.valueOf(seconds); else if (unit.equals(INTERVAL_DAYS)) return String.valueOf(Math.round(seconds/86400)); else if ...
java
public static String secondsToUnits(int seconds, String unit) { if (unit == null) return String.valueOf(seconds); else if (unit.equals(INTERVAL_DAYS)) return String.valueOf(Math.round(seconds/86400)); else if (unit.equals(INTERVAL_HOURS)) return String.valueOf(Math.round(seconds/3600)); else...
[ "public", "static", "String", "secondsToUnits", "(", "int", "seconds", ",", "String", "unit", ")", "{", "if", "(", "unit", "==", "null", ")", "return", "String", ".", "valueOf", "(", "seconds", ")", ";", "else", "if", "(", "unit", ".", "equals", "(", ...
Convert seconds to specified units @param seconds @param unit @return
[ "Convert", "seconds", "to", "specified", "units" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/model/monitor/ServiceLevelAgreement.java#L83-L89
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/ScanningQueryEngine.java
ScanningQueryEngine.executeOptimizedQuery
protected QueryResults executeOptimizedQuery( final ScanQueryContext context, QueryCommand command, Statistics statistics, PlanNode plan ) { """ Execute the optimize...
java
protected QueryResults executeOptimizedQuery( final ScanQueryContext context, QueryCommand command, Statistics statistics, PlanNode plan ) { long nanos = System.n...
[ "protected", "QueryResults", "executeOptimizedQuery", "(", "final", "ScanQueryContext", "context", ",", "QueryCommand", "command", ",", "Statistics", "statistics", ",", "PlanNode", "plan", ")", "{", "long", "nanos", "=", "System", ".", "nanoTime", "(", ")", ";", ...
Execute the optimized query defined by the supplied {@link PlanNode plan node}. @param context the context in which the query is to be executed; may not be null @param command the original query; may not be null @param statistics the statistics for the current query execution @param plan the optimized plan for the que...
[ "Execute", "the", "optimized", "query", "defined", "by", "the", "supplied", "{", "@link", "PlanNode", "plan", "node", "}", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/engine/ScanningQueryEngine.java#L481-L526
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java
DdosProtectionPlansInner.beginCreateOrUpdateAsync
public Observable<DdosProtectionPlanInner> beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { """ Creates or updates a DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of th...
java
public Observable<DdosProtectionPlanInner> beginCreateOrUpdateAsync(String resourceGroupName, String ddosProtectionPlanName, DdosProtectionPlanInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName, parameters).map(new Func1<ServiceResponse<DdosProtectio...
[ "public", "Observable", "<", "DdosProtectionPlanInner", ">", "beginCreateOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "ddosProtectionPlanName", ",", "DdosProtectionPlanInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", ...
Creates or updates a DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of the DDoS protection plan. @param parameters Parameters supplied to the create or update operation. @throws IllegalArgumentException thrown if parameters fail the validation @ret...
[ "Creates", "or", "updates", "a", "DDoS", "protection", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L453-L460
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameterization/TrackParameters.java
TrackParameters.descend
@Override public Parameterization descend(Object option) { """ {@inheritDoc} Track parameters using a shared options list with parent tracker. """ registerChild(option); return new TrackParameters(inner, option, options, parents, children); }
java
@Override public Parameterization descend(Object option) { registerChild(option); return new TrackParameters(inner, option, options, parents, children); }
[ "@", "Override", "public", "Parameterization", "descend", "(", "Object", "option", ")", "{", "registerChild", "(", "option", ")", ";", "return", "new", "TrackParameters", "(", "inner", ",", "option", ",", "options", ",", "parents", ",", "children", ")", ";",...
{@inheritDoc} Track parameters using a shared options list with parent tracker.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameterization/TrackParameters.java#L149-L153
overturetool/overture
core/interpreter/src/main/java/org/overture/interpreter/assistant/definition/PDefinitionAssistantInterpreter.java
PDefinitionAssistantInterpreter.getValues
public ValueList getValues(PDefinition def, ObjectContext ctxt) { """ Return a list of external values that are read by the definition. @param def @param ctxt The context in which to evaluate the expressions. @return A list of values read. """ try { return def.apply(af.getValuesDefinitionLocator()...
java
public ValueList getValues(PDefinition def, ObjectContext ctxt) { try { return def.apply(af.getValuesDefinitionLocator(), ctxt); } catch (AnalysisException e) { return null; } }
[ "public", "ValueList", "getValues", "(", "PDefinition", "def", ",", "ObjectContext", "ctxt", ")", "{", "try", "{", "return", "def", ".", "apply", "(", "af", ".", "getValuesDefinitionLocator", "(", ")", ",", "ctxt", ")", ";", "}", "catch", "(", "AnalysisExc...
Return a list of external values that are read by the definition. @param def @param ctxt The context in which to evaluate the expressions. @return A list of values read.
[ "Return", "a", "list", "of", "external", "values", "that", "are", "read", "by", "the", "definition", "." ]
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/interpreter/src/main/java/org/overture/interpreter/assistant/definition/PDefinitionAssistantInterpreter.java#L67-L77
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java
RpcConfigs.putValue
public static void putValue(String key, Object newValue) { """ Put value. @param key the key @param newValue the new value """ Object oldValue = CFG.get(key); if (changed(oldValue, newValue)) { CFG.put(key, newValue); List<RpcConfigListener> rpcConfigListeners =...
java
public static void putValue(String key, Object newValue) { Object oldValue = CFG.get(key); if (changed(oldValue, newValue)) { CFG.put(key, newValue); List<RpcConfigListener> rpcConfigListeners = CFG_LISTENER.get(key); if (CommonUtils.isNotEmpty(rpcConfigListeners)) { ...
[ "public", "static", "void", "putValue", "(", "String", "key", ",", "Object", "newValue", ")", "{", "Object", "oldValue", "=", "CFG", ".", "get", "(", "key", ")", ";", "if", "(", "changed", "(", "oldValue", ",", "newValue", ")", ")", "{", "CFG", ".", ...
Put value. @param key the key @param newValue the new value
[ "Put", "value", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/common/RpcConfigs.java#L130-L141
roboconf/roboconf-platform
core/roboconf-dm/src/main/java/net/roboconf/dm/internal/utils/ConfigurationUtils.java
ConfigurationUtils.findTemplateDirectory
public static File findTemplateDirectory( ApplicationTemplate tpl, File configurationDirectory ) { """ Finds the directory that contains the files for an application template. @param tpl an application template @param configurationDirectory the DM's configuration directory @return a non-null file that should po...
java
public static File findTemplateDirectory( ApplicationTemplate tpl, File configurationDirectory ) { StringBuilder sb = new StringBuilder( TEMPLATES ); sb.append( "/" ); sb.append( tpl.getName()); if( ! Utils.isEmptyOrWhitespaces( tpl.getVersion())) { sb.append( " - " ); sb.append( tpl.getVersion()); } ...
[ "public", "static", "File", "findTemplateDirectory", "(", "ApplicationTemplate", "tpl", ",", "File", "configurationDirectory", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "TEMPLATES", ")", ";", "sb", ".", "append", "(", "\"/\"", ")", ";", ...
Finds the directory that contains the files for an application template. @param tpl an application template @param configurationDirectory the DM's configuration directory @return a non-null file that should point to a directory
[ "Finds", "the", "directory", "that", "contains", "the", "files", "for", "an", "application", "template", "." ]
train
https://github.com/roboconf/roboconf-platform/blob/add54eead479effb138d0ff53a2d637902b82702/core/roboconf-dm/src/main/java/net/roboconf/dm/internal/utils/ConfigurationUtils.java#L87-L98
ocelotds/ocelot
ocelot-core/src/main/java/org/ocelotds/messaging/JsTopicInterceptor.java
JsTopicInterceptor.proceedAndSendMessage
Object proceedAndSendMessage(InvocationContext ctx, String topic, boolean jsonPayload) throws Exception { """ Proceed the method and send MessageToClient to topic @param ctx @param topic @return @throws Exception """ MessageToClient messageToClient = new MessageToClient(); messageToClient.setId(topic...
java
Object proceedAndSendMessage(InvocationContext ctx, String topic, boolean jsonPayload) throws Exception { MessageToClient messageToClient = new MessageToClient(); messageToClient.setId(topic); Object result = ctx.proceed(); if(jsonPayload) { if(!String.class.isInstance(result)) { throw new Unsuppor...
[ "Object", "proceedAndSendMessage", "(", "InvocationContext", "ctx", ",", "String", "topic", ",", "boolean", "jsonPayload", ")", "throws", "Exception", "{", "MessageToClient", "messageToClient", "=", "new", "MessageToClient", "(", ")", ";", "messageToClient", ".", "s...
Proceed the method and send MessageToClient to topic @param ctx @param topic @return @throws Exception
[ "Proceed", "the", "method", "and", "send", "MessageToClient", "to", "topic" ]
train
https://github.com/ocelotds/ocelot/blob/5f0ac37afd8fa4dc9f7234a2aac8abbb522128e7/ocelot-core/src/main/java/org/ocelotds/messaging/JsTopicInterceptor.java#L150-L164
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java
AsynchronousRequest.getRaceInfo
public void getRaceInfo(String[] ids, Callback<List<Race>> callback) throws GuildWars2Exception, NullPointerException { """ For more info on races API go <a href="https://wiki.guildwars2.com/wiki/API:2/races">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onF...
java
public void getRaceInfo(String[] ids, Callback<List<Race>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getRaceInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
[ "public", "void", "getRaceInfo", "(", "String", "[", "]", "ids", ",", "Callback", "<", "List", "<", "Race", ">", ">", "callback", ")", "throws", "GuildWars2Exception", ",", "NullPointerException", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", ...
For more info on races API go <a href="https://wiki.guildwars2.com/wiki/API:2/races">here</a><br/> Give user the access to {@link Callback#onResponse(Call, Response)} and {@link Callback#onFailure(Call, Throwable)} methods for custom interactions @param ids list of race id(s) @param callback callback that is goin...
[ "For", "more", "info", "on", "races", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "races", ">", "here<", "/", "a", ">", "<br", "/", ">", "Give", "user", "the...
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/AsynchronousRequest.java#L2248-L2251
orhanobut/dialogplus
dialogplus/src/main/java/com/orhanobut/dialogplus/DialogPlusBuilder.java
DialogPlusBuilder.setMargin
public DialogPlusBuilder setMargin(int left, int top, int right, int bottom) { """ Add margins to your dialog. They are set to 0 except when gravity is center. In that case basic margins are applied """ this.margin[0] = left; this.margin[1] = top; this.margin[2] = right; this.margin[3] = botto...
java
public DialogPlusBuilder setMargin(int left, int top, int right, int bottom) { this.margin[0] = left; this.margin[1] = top; this.margin[2] = right; this.margin[3] = bottom; return this; }
[ "public", "DialogPlusBuilder", "setMargin", "(", "int", "left", ",", "int", "top", ",", "int", "right", ",", "int", "bottom", ")", "{", "this", ".", "margin", "[", "0", "]", "=", "left", ";", "this", ".", "margin", "[", "1", "]", "=", "top", ";", ...
Add margins to your dialog. They are set to 0 except when gravity is center. In that case basic margins are applied
[ "Add", "margins", "to", "your", "dialog", ".", "They", "are", "set", "to", "0", "except", "when", "gravity", "is", "center", ".", "In", "that", "case", "basic", "margins", "are", "applied" ]
train
https://github.com/orhanobut/dialogplus/blob/291bf4daaa3c81bf5537125f547913beb8ee2c17/dialogplus/src/main/java/com/orhanobut/dialogplus/DialogPlusBuilder.java#L220-L226
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/inventory_status.java
inventory_status.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ inventory_status_responses result = (inventory_status_responses) servic...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { inventory_status_responses result = (inventory_status_responses) service.get_payload_formatter().string_to_resource(inventory_status_responses.class, response); if(result.errorcode != 0) { if (res...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "inventory_status_responses", "result", "=", "(", "inventory_status_responses", ")", "service", ".", "get_payl...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/inventory_status.java#L323-L340
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/RefCapablePropertyResourceBundle.java
RefCapablePropertyResourceBundle.getExpandedString
public String getExpandedString(String key, int behavior) { """ Same as getString(), but expands System Variables specified in property values like ${sysvarname}. """ String s = getString(key); Matcher matcher = sysPropVarPattern.matcher(s); int previousEnd = 0; StringBuffer sb...
java
public String getExpandedString(String key, int behavior) { String s = getString(key); Matcher matcher = sysPropVarPattern.matcher(s); int previousEnd = 0; StringBuffer sb = new StringBuffer(); String varName, varValue; String condlVal; // Conditional : value whi...
[ "public", "String", "getExpandedString", "(", "String", "key", ",", "int", "behavior", ")", "{", "String", "s", "=", "getString", "(", "key", ")", ";", "Matcher", "matcher", "=", "sysPropVarPattern", ".", "matcher", "(", "s", ")", ";", "int", "previousEnd"...
Same as getString(), but expands System Variables specified in property values like ${sysvarname}.
[ "Same", "as", "getString", "()", "but", "expands", "System", "Variables", "specified", "in", "property", "values", "like", "$", "{", "sysvarname", "}", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/RefCapablePropertyResourceBundle.java#L194-L234
osglworks/java-tool
src/main/java/org/osgl/Lang.java
F2.andThen
public <T> F2<P1, P2, T> andThen(final Function<? super R, ? extends T> f) { """ Returns a composed function from this function and the specified function that takes the result of this function. When applying the composed function, this function is applied first to given parameter and then the specified function...
java
public <T> F2<P1, P2, T> andThen(final Function<? super R, ? extends T> f) { E.NPE(f); final Func2<P1, P2, R> me = this; return new F2<P1, P2, T>() { @Override public T apply(P1 p1, P2 p2) { R r = me.apply(p1, p2); ...
[ "public", "<", "T", ">", "F2", "<", "P1", ",", "P2", ",", "T", ">", "andThen", "(", "final", "Function", "<", "?", "super", "R", ",", "?", "extends", "T", ">", "f", ")", "{", "E", ".", "NPE", "(", "f", ")", ";", "final", "Func2", "<", "P1",...
Returns a composed function from this function and the specified function that takes the result of this function. When applying the composed function, this function is applied first to given parameter and then the specified function is applied to the result of this function. @param f the function takes the <code>R</co...
[ "Returns", "a", "composed", "function", "from", "this", "function", "and", "the", "specified", "function", "that", "takes", "the", "result", "of", "this", "function", ".", "When", "applying", "the", "composed", "function", "this", "function", "is", "applied", ...
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L988-L998
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java
SvgGraphicsContext.drawImage
public void drawImage(Object parent, String name, String href, Bbox bounds, PictureStyle style) { """ Draw an image onto the the <code>GraphicsContext</code>. @param parent parent group object @param name The image's name. @param href The image's location (URL). @param bounds The bounding box that sets t...
java
public void drawImage(Object parent, String name, String href, Bbox bounds, PictureStyle style) { if (isAttached()) { Element image = helper.createOrUpdateElement(parent, name, "image", style); Dom.setElementAttribute(image, "x", Integer.toString((int) bounds.getX())); Dom.setElementAttribute(image, "y", Int...
[ "public", "void", "drawImage", "(", "Object", "parent", ",", "String", "name", ",", "String", "href", ",", "Bbox", "bounds", ",", "PictureStyle", "style", ")", "{", "if", "(", "isAttached", "(", ")", ")", "{", "Element", "image", "=", "helper", ".", "c...
Draw an image onto the the <code>GraphicsContext</code>. @param parent parent group object @param name The image's name. @param href The image's location (URL). @param bounds The bounding box that sets the image's origin (x and y), it's width and it's height. @param style A styling object to be passed along with the i...
[ "Draw", "an", "image", "onto", "the", "the", "<code", ">", "GraphicsContext<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java#L271-L280
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java
ClassLoaderUtil.loadClass
public static Class<?> loadClass(String name, boolean isInitialized) throws UtilException { """ 加载类,通过传入类的字符串,返回其对应的类名,使用默认ClassLoader<br> 扩展{@link Class#forName(String, boolean, ClassLoader)}方法,支持以下几类类名的加载: <pre> 1、原始类型,例如:int 2、数组类型,例如:int[]、Long[]、String[] 3、内部类,例如:java.lang.Thread.State会被转为java.lang.Thr...
java
public static Class<?> loadClass(String name, boolean isInitialized) throws UtilException { return loadClass(name, null, isInitialized); }
[ "public", "static", "Class", "<", "?", ">", "loadClass", "(", "String", "name", ",", "boolean", "isInitialized", ")", "throws", "UtilException", "{", "return", "loadClass", "(", "name", ",", "null", ",", "isInitialized", ")", ";", "}" ]
加载类,通过传入类的字符串,返回其对应的类名,使用默认ClassLoader<br> 扩展{@link Class#forName(String, boolean, ClassLoader)}方法,支持以下几类类名的加载: <pre> 1、原始类型,例如:int 2、数组类型,例如:int[]、Long[]、String[] 3、内部类,例如:java.lang.Thread.State会被转为java.lang.Thread$State加载 </pre> @param name 类名 @param isInitialized 是否初始化类(调用static模块内容和初始化static属性) @return 类名对应的类 @th...
[ "加载类,通过传入类的字符串,返回其对应的类名,使用默认ClassLoader<br", ">", "扩展", "{", "@link", "Class#forName", "(", "String", "boolean", "ClassLoader", ")", "}", "方法,支持以下几类类名的加载:" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ClassLoaderUtil.java#L125-L127
quattor/pan
panc/src/main/java/org/quattor/pan/ttemplate/BuildContext.java
BuildContext.setGlobalVariable
public void setGlobalVariable(String name, Element value, boolean finalFlag) { """ Set the variable to the given value. If the value is null, then the variable will be removed from the context. """ assert (name != null); // Either modify an existing value (with appropriate checks) or add a // new one....
java
public void setGlobalVariable(String name, Element value, boolean finalFlag) { assert (name != null); // Either modify an existing value (with appropriate checks) or add a // new one. if (globalVariables.containsKey(name)) { GlobalVariable gvar = globalVariables.get(name); gvar.setValue(value); gvar...
[ "public", "void", "setGlobalVariable", "(", "String", "name", ",", "Element", "value", ",", "boolean", "finalFlag", ")", "{", "assert", "(", "name", "!=", "null", ")", ";", "// Either modify an existing value (with appropriate checks) or add a", "// new one.", "if", "...
Set the variable to the given value. If the value is null, then the variable will be removed from the context.
[ "Set", "the", "variable", "to", "the", "given", "value", ".", "If", "the", "value", "is", "null", "then", "the", "variable", "will", "be", "removed", "from", "the", "context", "." ]
train
https://github.com/quattor/pan/blob/009934a603dd0c08d3fa4bb7d9389c380a916f54/panc/src/main/java/org/quattor/pan/ttemplate/BuildContext.java#L649-L665
kefirfromperm/kefirbb
src/org/kefirsf/bb/DomConfigurationFactory.java
DomConfigurationFactory.nodeHasAttribute
private boolean nodeHasAttribute(Node node, String attributeName) { """ Check node attribute. @param node XML-node @param attributeName name of attribute @return true if node has attribute with specified name false if has not """ return node.hasAttributes() && node.getAttributes().getNam...
java
private boolean nodeHasAttribute(Node node, String attributeName) { return node.hasAttributes() && node.getAttributes().getNamedItem(attributeName) != null; }
[ "private", "boolean", "nodeHasAttribute", "(", "Node", "node", ",", "String", "attributeName", ")", "{", "return", "node", ".", "hasAttributes", "(", ")", "&&", "node", ".", "getAttributes", "(", ")", ".", "getNamedItem", "(", "attributeName", ")", "!=", "nu...
Check node attribute. @param node XML-node @param attributeName name of attribute @return true if node has attribute with specified name false if has not
[ "Check", "node", "attribute", "." ]
train
https://github.com/kefirfromperm/kefirbb/blob/8c36fc3d3dc27459b0cdc179b87582df30420856/src/org/kefirsf/bb/DomConfigurationFactory.java#L677-L679
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java
IdentityPatchContext.backupConfiguration
void backupConfiguration() throws IOException { """ Backup the current configuration as part of the patch history. @throws IOException for any error """ final String configuration = Constants.CONFIGURATION; final File a = new File(installedImage.getAppClientDir(), configuration); f...
java
void backupConfiguration() throws IOException { final String configuration = Constants.CONFIGURATION; final File a = new File(installedImage.getAppClientDir(), configuration); final File d = new File(installedImage.getDomainDir(), configuration); final File s = new File(installedImage....
[ "void", "backupConfiguration", "(", ")", "throws", "IOException", "{", "final", "String", "configuration", "=", "Constants", ".", "CONFIGURATION", ";", "final", "File", "a", "=", "new", "File", "(", "installedImage", ".", "getAppClientDir", "(", ")", ",", "con...
Backup the current configuration as part of the patch history. @throws IOException for any error
[ "Backup", "the", "current", "configuration", "as", "part", "of", "the", "patch", "history", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L975-L996
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/OperatorCentroid2DLocal.java
OperatorCentroid2DLocal.computePolylineCentroid
private static Point2D computePolylineCentroid(Polyline polyline) { """ Lines centroid is weighted mean of each line segment, weight in terms of line length """ double xSum = 0; double ySum = 0; double weightSum = 0; Point2D startPoint = new Point2D(); Point2D endPoint ...
java
private static Point2D computePolylineCentroid(Polyline polyline) { double xSum = 0; double ySum = 0; double weightSum = 0; Point2D startPoint = new Point2D(); Point2D endPoint = new Point2D(); for (int i = 0; i < polyline.getPathCount(); i++) { polyline....
[ "private", "static", "Point2D", "computePolylineCentroid", "(", "Polyline", "polyline", ")", "{", "double", "xSum", "=", "0", ";", "double", "ySum", "=", "0", ";", "double", "weightSum", "=", "0", ";", "Point2D", "startPoint", "=", "new", "Point2D", "(", "...
Lines centroid is weighted mean of each line segment, weight in terms of line length
[ "Lines", "centroid", "is", "weighted", "mean", "of", "each", "line", "segment", "weight", "in", "terms", "of", "line", "length" ]
train
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/OperatorCentroid2DLocal.java#L77-L96
JodaOrg/joda-time
src/main/java/org/joda/time/DateMidnight.java
DateMidnight.withField
public DateMidnight withField(DateTimeFieldType fieldType, int value) { """ Returns a copy of this date with the specified field set to a new value. <p> For example, if the field type is <code>dayOfMonth</code> then the day of month field would be changed in the returned instance. If the field type is null, th...
java
public DateMidnight withField(DateTimeFieldType fieldType, int value) { if (fieldType == null) { throw new IllegalArgumentException("Field must not be null"); } long instant = fieldType.getField(getChronology()).set(getMillis(), value); return withMillis(instant); }
[ "public", "DateMidnight", "withField", "(", "DateTimeFieldType", "fieldType", ",", "int", "value", ")", "{", "if", "(", "fieldType", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Field must not be null\"", ")", ";", "}", "long", "in...
Returns a copy of this date with the specified field set to a new value. <p> For example, if the field type is <code>dayOfMonth</code> then the day of month field would be changed in the returned instance. If the field type is null, then <code>this</code> is returned. <p> These three lines are equivalent: <pre> DateTim...
[ "Returns", "a", "copy", "of", "this", "date", "with", "the", "specified", "field", "set", "to", "a", "new", "value", ".", "<p", ">", "For", "example", "if", "the", "field", "type", "is", "<code", ">", "dayOfMonth<", "/", "code", ">", "then", "the", "...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/DateMidnight.java#L464-L470
googleapis/google-cloud-java
google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/DnsException.java
DnsException.translateAndThrow
static DnsException translateAndThrow(RetryHelperException ex) { """ Translate RetryHelperException to the DnsException that caused the error. This method will always throw an exception. @throws DnsException when {@code ex} was caused by a {@code DnsException} """ BaseServiceException.translate(ex); ...
java
static DnsException translateAndThrow(RetryHelperException ex) { BaseServiceException.translate(ex); throw new DnsException(UNKNOWN_CODE, ex.getMessage(), ex.getCause()); }
[ "static", "DnsException", "translateAndThrow", "(", "RetryHelperException", "ex", ")", "{", "BaseServiceException", ".", "translate", "(", "ex", ")", ";", "throw", "new", "DnsException", "(", "UNKNOWN_CODE", ",", "ex", ".", "getMessage", "(", ")", ",", "ex", "...
Translate RetryHelperException to the DnsException that caused the error. This method will always throw an exception. @throws DnsException when {@code ex} was caused by a {@code DnsException}
[ "Translate", "RetryHelperException", "to", "the", "DnsException", "that", "caused", "the", "error", ".", "This", "method", "will", "always", "throw", "an", "exception", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-dns/src/main/java/com/google/cloud/dns/DnsException.java#L59-L62
agmip/dome
src/main/java/org/agmip/dome/Engine.java
Engine.runGenerators
public ArrayList<HashMap<String, Object>> runGenerators(HashMap<String, Object> data) { """ Run the generators on the dataset passed in. This will generate a number of additional datasets based on the original dataset. @param data A dataset to run the generators on @return A {@code HashMap} of just the expo...
java
public ArrayList<HashMap<String, Object>> runGenerators(HashMap<String, Object> data) { return runGenerators(data, false); }
[ "public", "ArrayList", "<", "HashMap", "<", "String", ",", "Object", ">", ">", "runGenerators", "(", "HashMap", "<", "String", ",", "Object", ">", "data", ")", "{", "return", "runGenerators", "(", "data", ",", "false", ")", ";", "}" ]
Run the generators on the dataset passed in. This will generate a number of additional datasets based on the original dataset. @param data A dataset to run the generators on @return A {@code HashMap} of just the exported keys.
[ "Run", "the", "generators", "on", "the", "dataset", "passed", "in", ".", "This", "will", "generate", "a", "number", "of", "additional", "datasets", "based", "on", "the", "original", "dataset", "." ]
train
https://github.com/agmip/dome/blob/ca7c15bf2bae09bb7e8d51160e77592bbda9343d/src/main/java/org/agmip/dome/Engine.java#L301-L303
acromusashi/acromusashi-stream
src/main/java/acromusashi/stream/spout/DrpcTridentEmitter.java
DrpcTridentEmitter.initialize
@SuppressWarnings("rawtypes") public void initialize(Map conf, TopologyContext context, String function) { """ 設定値、Context、DRPC機能名称を指定して初期化を行う。 @param conf 設定値 @param context Context @param function DRPC機能名称 """ this.context = context; this.stormConf = conf; this.function = fun...
java
@SuppressWarnings("rawtypes") public void initialize(Map conf, TopologyContext context, String function) { this.context = context; this.stormConf = conf; this.function = function; this.idsMap = new RotatingMap<TransactionAttempt, DrpcRequestInfo>(ROTATE_SIZE); this.rotate...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "void", "initialize", "(", "Map", "conf", ",", "TopologyContext", "context", ",", "String", "function", ")", "{", "this", ".", "context", "=", "context", ";", "this", ".", "stormConf", "=", "conf",...
設定値、Context、DRPC機能名称を指定して初期化を行う。 @param conf 設定値 @param context Context @param function DRPC機能名称
[ "設定値、Context、DRPC機能名称を指定して初期化を行う。" ]
train
https://github.com/acromusashi/acromusashi-stream/blob/65b1f335d771d657c5640a2056ab5c8546eddec9/src/main/java/acromusashi/stream/spout/DrpcTridentEmitter.java#L82-L91
xqbase/tuna
core/src/main/java/com/xqbase/tuna/packet/PacketOutputStream.java
PacketOutputStream.write
@Override public void write(byte[] b, int off, int len) throws PacketException { """ Parse packets when data arrived. This routine will consume every successfully parsed packet by calling {@link PacketConsumer#accept(byte[], int, int)}. """ baq.add(b, off, len); while (packetSize > 0 || (packetSize = ...
java
@Override public void write(byte[] b, int off, int len) throws PacketException { baq.add(b, off, len); while (packetSize > 0 || (packetSize = parser.getSize(baq.array(), baq.offset(), baq.length())) > 0) { if (baq.length() < packetSize) { return; } consumer.accept(baq.array(), baq.offset()...
[ "@", "Override", "public", "void", "write", "(", "byte", "[", "]", "b", ",", "int", "off", ",", "int", "len", ")", "throws", "PacketException", "{", "baq", ".", "add", "(", "b", ",", "off", ",", "len", ")", ";", "while", "(", "packetSize", ">", "...
Parse packets when data arrived. This routine will consume every successfully parsed packet by calling {@link PacketConsumer#accept(byte[], int, int)}.
[ "Parse", "packets", "when", "data", "arrived", ".", "This", "routine", "will", "consume", "every", "successfully", "parsed", "packet", "by", "calling", "{" ]
train
https://github.com/xqbase/tuna/blob/60d05a9e03877a3daafe9de83dc4427c6cbb9995/core/src/main/java/com/xqbase/tuna/packet/PacketOutputStream.java#L30-L42
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java
DdosProtectionPlansInner.getByResourceGroup
public DdosProtectionPlanInner getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName) { """ Gets information about the specified DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of the DDoS protection plan. @throws Illeg...
java
public DdosProtectionPlanInner getByResourceGroup(String resourceGroupName, String ddosProtectionPlanName) { return getByResourceGroupWithServiceResponseAsync(resourceGroupName, ddosProtectionPlanName).toBlocking().single().body(); }
[ "public", "DdosProtectionPlanInner", "getByResourceGroup", "(", "String", "resourceGroupName", ",", "String", "ddosProtectionPlanName", ")", "{", "return", "getByResourceGroupWithServiceResponseAsync", "(", "resourceGroupName", ",", "ddosProtectionPlanName", ")", ".", "toBlocki...
Gets information about the specified DDoS protection plan. @param resourceGroupName The name of the resource group. @param ddosProtectionPlanName The name of the DDoS protection plan. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by s...
[ "Gets", "information", "about", "the", "specified", "DDoS", "protection", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/DdosProtectionPlansInner.java#L266-L268
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InboundNatRulesInner.java
InboundNatRulesInner.listAsync
public Observable<Page<InboundNatRuleInner>> listAsync(final String resourceGroupName, final String loadBalancerName) { """ Gets all the inbound nat rules in a load balancer. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @throws IllegalArgument...
java
public Observable<Page<InboundNatRuleInner>> listAsync(final String resourceGroupName, final String loadBalancerName) { return listWithServiceResponseAsync(resourceGroupName, loadBalancerName) .map(new Func1<ServiceResponse<Page<InboundNatRuleInner>>, Page<InboundNatRuleInner>>() { @...
[ "public", "Observable", "<", "Page", "<", "InboundNatRuleInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "loadBalancerName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", "loadBal...
Gets all the inbound nat rules in a load balancer. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;InboundNatRuleInner&gt; object
[ "Gets", "all", "the", "inbound", "nat", "rules", "in", "a", "load", "balancer", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InboundNatRulesInner.java#L143-L151
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/jdeps/Analyzer.java
Analyzer.visitDependences
public void visitDependences(Archive source, Visitor v, Type level) { """ Visit the dependencies of the given source. If the requested level is SUMMARY, it will visit the required archives list. """ if (level == Type.SUMMARY) { final ArchiveDeps result = results.get(source); So...
java
public void visitDependences(Archive source, Visitor v, Type level) { if (level == Type.SUMMARY) { final ArchiveDeps result = results.get(source); SortedMap<String, Archive> sorted = new TreeMap<>(); for (Archive a : result.requires()) { sorted.put(a.getName()...
[ "public", "void", "visitDependences", "(", "Archive", "source", ",", "Visitor", "v", ",", "Type", "level", ")", "{", "if", "(", "level", "==", "Type", ".", "SUMMARY", ")", "{", "final", "ArchiveDeps", "result", "=", "results", ".", "get", "(", "source", ...
Visit the dependencies of the given source. If the requested level is SUMMARY, it will visit the required archives list.
[ "Visit", "the", "dependencies", "of", "the", "given", "source", ".", "If", "the", "requested", "level", "is", "SUMMARY", "it", "will", "visit", "the", "required", "archives", "list", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/jdeps/Analyzer.java#L136-L160
Netflix/conductor
mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLMetadataDAO.java
MySQLMetadataDAO.workflowExists
private Boolean workflowExists(Connection connection, WorkflowDef def) { """ Check if a {@link WorkflowDef} with the same {@literal name} and {@literal version} already exist. @param connection The {@link Connection} to use for queries. @param def The {@code WorkflowDef} to check for. @return {@literal...
java
private Boolean workflowExists(Connection connection, WorkflowDef def) { final String CHECK_WORKFLOW_DEF_EXISTS_QUERY = "SELECT COUNT(*) FROM meta_workflow_def WHERE name = ? AND " + "version = ?"; return query(connection, CHECK_WORKFLOW_DEF_EXISTS_QUERY, q -> q.addParam...
[ "private", "Boolean", "workflowExists", "(", "Connection", "connection", ",", "WorkflowDef", "def", ")", "{", "final", "String", "CHECK_WORKFLOW_DEF_EXISTS_QUERY", "=", "\"SELECT COUNT(*) FROM meta_workflow_def WHERE name = ? AND \"", "+", "\"version = ?\"", ";", "return", "q...
Check if a {@link WorkflowDef} with the same {@literal name} and {@literal version} already exist. @param connection The {@link Connection} to use for queries. @param def The {@code WorkflowDef} to check for. @return {@literal true} if a {@code WorkflowDef} already exists with the same values.
[ "Check", "if", "a", "{", "@link", "WorkflowDef", "}", "with", "the", "same", "{", "@literal", "name", "}", "and", "{", "@literal", "version", "}", "already", "exist", "." ]
train
https://github.com/Netflix/conductor/blob/78fae0ed9ddea22891f9eebb96a2ec0b2783dca0/mysql-persistence/src/main/java/com/netflix/conductor/dao/mysql/MySQLMetadataDAO.java#L306-L312
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java
GridRowSet.getFirstGeometryField
private static String getFirstGeometryField(String tableName, Connection connection) throws SQLException { """ Return the first spatial geometry field name @param tableName @param connection @return the name of the first geometry column @throws SQLException """ // Find first geometry column ...
java
private static String getFirstGeometryField(String tableName, Connection connection) throws SQLException { // Find first geometry column List<String> geomFields = SFSUtilities.getGeometryFields(connection, TableLocation.parse(tableName, JDBCUtilities.isH2DataBase(connection.getMetaData()))); if ...
[ "private", "static", "String", "getFirstGeometryField", "(", "String", "tableName", ",", "Connection", "connection", ")", "throws", "SQLException", "{", "// Find first geometry column", "List", "<", "String", ">", "geomFields", "=", "SFSUtilities", ".", "getGeometryFiel...
Return the first spatial geometry field name @param tableName @param connection @return the name of the first geometry column @throws SQLException
[ "Return", "the", "first", "spatial", "geometry", "field", "name" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/create/GridRowSet.java#L198-L206
OnyxDevTools/onyx-database-parent
onyx-database-examples/relationships/src/main/java/com/onyxdevtools/relationship/AbstractDemo.java
AbstractDemo.assertNotNull
static void assertNotNull(String message, Object nonNullObject) { """ Helper method to verify an the object is not null. @param message Message displayed if the object is null @param nonNullObject Object to assert """ if(nonNullObject == null) { System.err.println(message); ...
java
static void assertNotNull(String message, Object nonNullObject) { if(nonNullObject == null) { System.err.println(message); } }
[ "static", "void", "assertNotNull", "(", "String", "message", ",", "Object", "nonNullObject", ")", "{", "if", "(", "nonNullObject", "==", "null", ")", "{", "System", ".", "err", ".", "println", "(", "message", ")", ";", "}", "}" ]
Helper method to verify an the object is not null. @param message Message displayed if the object is null @param nonNullObject Object to assert
[ "Helper", "method", "to", "verify", "an", "the", "object", "is", "not", "null", "." ]
train
https://github.com/OnyxDevTools/onyx-database-parent/blob/474dfc273a094dbc2ca08fcc08a2858cd538c920/onyx-database-examples/relationships/src/main/java/com/onyxdevtools/relationship/AbstractDemo.java#L12-L18
shibme/jbotstats
src/me/shib/java/lib/jbotstats/AnalyticsBot.java
AnalyticsBot.getChatMember
@Override public ChatMember getChatMember(ChatId chat_id, long user_id) throws IOException { """ Use this method to get information about a member of a chat. @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) @param user_id ...
java
@Override public ChatMember getChatMember(ChatId chat_id, long user_id) throws IOException { AnalyticsData data = new AnalyticsData("getChatMember"); IOException ioException = null; ChatMember chatMember = null; data.setValue("chat_id", chat_id); data.setValue("user_id", user...
[ "@", "Override", "public", "ChatMember", "getChatMember", "(", "ChatId", "chat_id", ",", "long", "user_id", ")", "throws", "IOException", "{", "AnalyticsData", "data", "=", "new", "AnalyticsData", "(", "\"getChatMember\"", ")", ";", "IOException", "ioException", "...
Use this method to get information about a member of a chat. @param chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) @param user_id Unique identifier of the target user @return On success, returns a ChatMember object @throws IOException an e...
[ "Use", "this", "method", "to", "get", "information", "about", "a", "member", "of", "a", "chat", "." ]
train
https://github.com/shibme/jbotstats/blob/ba15c43a0722c2b7fd2a8396852bec787cca7b9d/src/me/shib/java/lib/jbotstats/AnalyticsBot.java#L728-L747
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java
ST_Drape.drapeMultiPolygon
public static Geometry drapeMultiPolygon(MultiPolygon polygons, Geometry triangles, STRtree sTRtree) { """ Drape a multilinestring to a set of triangles @param polygons @param triangles @param sTRtree @return """ GeometryFactory factory = polygons.getFactory(); //Split the triangle...
java
public static Geometry drapeMultiPolygon(MultiPolygon polygons, Geometry triangles, STRtree sTRtree) { GeometryFactory factory = polygons.getFactory(); //Split the triangles in lines to perform all intersections Geometry triangleLines = LinearComponentExtracter.getGeometry(triangles, tr...
[ "public", "static", "Geometry", "drapeMultiPolygon", "(", "MultiPolygon", "polygons", ",", "Geometry", "triangles", ",", "STRtree", "sTRtree", ")", "{", "GeometryFactory", "factory", "=", "polygons", ".", "getFactory", "(", ")", ";", "//Split the triangles in lines to...
Drape a multilinestring to a set of triangles @param polygons @param triangles @param sTRtree @return
[ "Drape", "a", "multilinestring", "to", "a", "set", "of", "triangles" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/topography/ST_Drape.java#L106-L119
OpenLiberty/open-liberty
dev/com.ibm.ws.transaction/src/com/ibm/ws/transaction/services/TransactionJavaColonHelper.java
TransactionJavaColonHelper.getUserTransaction
protected UserTransaction getUserTransaction(boolean injection, Object injectionContext) throws NamingException { """ Helper method for use with injection TransactionObjectFactoruy. @param injection if the UserTransaction is being obtained for injection @param injectionContext the injection target context if i...
java
protected UserTransaction getUserTransaction(boolean injection, Object injectionContext) throws NamingException { final UserTransaction ut = AccessController.doPrivileged(new PrivilegedAction<UserTransaction>() { @Override public UserTransaction run() { return userTra...
[ "protected", "UserTransaction", "getUserTransaction", "(", "boolean", "injection", ",", "Object", "injectionContext", ")", "throws", "NamingException", "{", "final", "UserTransaction", "ut", "=", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "...
Helper method for use with injection TransactionObjectFactoruy. @param injection if the UserTransaction is being obtained for injection @param injectionContext the injection target context if injection is true, or null if unspecified @return UserTransaction object with decorator applied if present @throws NamingExcept...
[ "Helper", "method", "for", "use", "with", "injection", "TransactionObjectFactoruy", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transaction/src/com/ibm/ws/transaction/services/TransactionJavaColonHelper.java#L152-L166
alb-i986/selenium-tinafw
src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java
PageHelper.waitUntil
public static <T> T waitUntil(ExpectedCondition<T> expectedCondition, WebDriver driver, long timeOutInSeconds) { """ Generic explicit wait, taking an {@link ExpectedCondition} as a parameter. Times out after the given number of seconds. @param expectedCondition @param driver @param timeOutInSeconds @retu...
java
public static <T> T waitUntil(ExpectedCondition<T> expectedCondition, WebDriver driver, long timeOutInSeconds) { logger.debug("BEGIN wait (timeout=" + timeOutInSeconds + "s) for " + expectedCondition); T object = new WebDriverWait(driver, timeOutInSeconds) .until(expectedCondition); logger.debug("EN...
[ "public", "static", "<", "T", ">", "T", "waitUntil", "(", "ExpectedCondition", "<", "T", ">", "expectedCondition", ",", "WebDriver", "driver", ",", "long", "timeOutInSeconds", ")", "{", "logger", ".", "debug", "(", "\"BEGIN wait (timeout=\"", "+", "timeOutInSeco...
Generic explicit wait, taking an {@link ExpectedCondition} as a parameter. Times out after the given number of seconds. @param expectedCondition @param driver @param timeOutInSeconds @return whatever WebDriverWait#until returns @see WebDriverWait#until(com.google.common.base.Function) @throws TimeoutException if the ...
[ "Generic", "explicit", "wait", "taking", "an", "{", "@link", "ExpectedCondition", "}", "as", "a", "parameter", ".", "Times", "out", "after", "the", "given", "number", "of", "seconds", "." ]
train
https://github.com/alb-i986/selenium-tinafw/blob/91c66720cda9f69751f96c58c0a0624b2222186e/src/main/java/me/alb_i986/selenium/tinafw/ui/PageHelper.java#L57-L66
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/naming/PrefixlessConvention.java
PrefixlessConvention.methodIsAbstractGetter
private boolean methodIsAbstractGetter(TypeElement valueType, ExecutableElement method) { """ Verifies {@code method} is an abstract getter. Any deviations will be logged as an error. """ Set<Modifier> modifiers = method.getModifiers(); if (!modifiers.contains(Modifier.ABSTRACT)) { return false; ...
java
private boolean methodIsAbstractGetter(TypeElement valueType, ExecutableElement method) { Set<Modifier> modifiers = method.getModifiers(); if (!modifiers.contains(Modifier.ABSTRACT)) { return false; } boolean declaredOnValueType = method.getEnclosingElement().equals(valueType); TypeMirror retu...
[ "private", "boolean", "methodIsAbstractGetter", "(", "TypeElement", "valueType", ",", "ExecutableElement", "method", ")", "{", "Set", "<", "Modifier", ">", "modifiers", "=", "method", ".", "getModifiers", "(", ")", ";", "if", "(", "!", "modifiers", ".", "conta...
Verifies {@code method} is an abstract getter. Any deviations will be logged as an error.
[ "Verifies", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/naming/PrefixlessConvention.java#L63-L82
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ClassParameter.java
ClassParameter.canonicalClassName
public static String canonicalClassName(Class<?> c, Class<?> parent) { """ Get the "simple" form of a class name. @param c Class name @param parent Parent/restriction class (to get package name to strip) @return Simplified class name. """ return canonicalClassName(c, parent == null ? null : parent.get...
java
public static String canonicalClassName(Class<?> c, Class<?> parent) { return canonicalClassName(c, parent == null ? null : parent.getPackage()); }
[ "public", "static", "String", "canonicalClassName", "(", "Class", "<", "?", ">", "c", ",", "Class", "<", "?", ">", "parent", ")", "{", "return", "canonicalClassName", "(", "c", ",", "parent", "==", "null", "?", "null", ":", "parent", ".", "getPackage", ...
Get the "simple" form of a class name. @param c Class name @param parent Parent/restriction class (to get package name to strip) @return Simplified class name.
[ "Get", "the", "simple", "form", "of", "a", "class", "name", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/optionhandling/parameters/ClassParameter.java#L219-L221
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableMapProperty.java
AbstractReadableMapProperty.doNotifyListenersOfAddedValues
protected void doNotifyListenersOfAddedValues(Map<K, R> newValues) { """ Notifies the change listeners that values have been added. <p> Note that the specified map of values will be wrapped in an unmodifiable map before being passed to the listeners. @param newValues Newly added values. """ List<...
java
protected void doNotifyListenersOfAddedValues(Map<K, R> newValues) { List<MapValueChangeListener<K, R>> listenersCopy = new ArrayList<MapValueChangeListener<K, R>>(listeners); Map<K, R> unmodifiable = Collections.unmodifiableMap(newValues); for (MapValueChangeListener<K, R> listener : listenersC...
[ "protected", "void", "doNotifyListenersOfAddedValues", "(", "Map", "<", "K", ",", "R", ">", "newValues", ")", "{", "List", "<", "MapValueChangeListener", "<", "K", ",", "R", ">", ">", "listenersCopy", "=", "new", "ArrayList", "<", "MapValueChangeListener", "<"...
Notifies the change listeners that values have been added. <p> Note that the specified map of values will be wrapped in an unmodifiable map before being passed to the listeners. @param newValues Newly added values.
[ "Notifies", "the", "change", "listeners", "that", "values", "have", "been", "added", ".", "<p", ">", "Note", "that", "the", "specified", "map", "of", "values", "will", "be", "wrapped", "in", "an", "unmodifiable", "map", "before", "being", "passed", "to", "...
train
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableMapProperty.java#L92-L98
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java
SOAPMessageTransport.getElement
public SOAPElement getElement(SOAPElement element, String strElementName) { """ Get the element. @param strElementName The element to return (if null, return the first element). """ Iterator<?> iterator = element.getChildElements(); while (iterator.hasNext()) { javax.xml.so...
java
public SOAPElement getElement(SOAPElement element, String strElementName) { Iterator<?> iterator = element.getChildElements(); while (iterator.hasNext()) { javax.xml.soap.Node elMessageType = (javax.xml.soap.Node)iterator.next(); if (elMessageType instanceof SOAPEleme...
[ "public", "SOAPElement", "getElement", "(", "SOAPElement", "element", ",", "String", "strElementName", ")", "{", "Iterator", "<", "?", ">", "iterator", "=", "element", ".", "getChildElements", "(", ")", ";", "while", "(", "iterator", ".", "hasNext", "(", ")"...
Get the element. @param strElementName The element to return (if null, return the first element).
[ "Get", "the", "element", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/soap/SOAPMessageTransport.java#L339-L354
GCRC/nunaliit
nunaliit2-dbSec/src/main/java/ca/carleton/gcrc/dbSec/DbSecurity.java
DbSecurity.retrieveColumnData
private void retrieveColumnData(TableSchemaImpl tableData) throws Exception { """ For a table, retrieves access to columns specified in the security tables. This method uses the table 'dbsec_columns' to perform this work. The resulting information in the column data is incomplete: it lacks types and other elemen...
java
private void retrieveColumnData(TableSchemaImpl tableData) throws Exception { String logicalName = tableData.getLogicalName(); int groupId = tableData.getGroupId(); try { PreparedStatement ps = connection.prepareStatement( "SELECT column_name,read,write,options " + "FROM "+DB_NAME_COLUMNS+ ...
[ "private", "void", "retrieveColumnData", "(", "TableSchemaImpl", "tableData", ")", "throws", "Exception", "{", "String", "logicalName", "=", "tableData", ".", "getLogicalName", "(", ")", ";", "int", "groupId", "=", "tableData", ".", "getGroupId", "(", ")", ";", ...
For a table, retrieves access to columns specified in the security tables. This method uses the table 'dbsec_columns' to perform this work. The resulting information in the column data is incomplete: it lacks types and other elements. @param tableData Table to query @throws Exception
[ "For", "a", "table", "retrieves", "access", "to", "columns", "specified", "in", "the", "security", "tables", ".", "This", "method", "uses", "the", "table", "dbsec_columns", "to", "perform", "this", "work", ".", "The", "resulting", "information", "in", "the", ...
train
https://github.com/GCRC/nunaliit/blob/0b4abfc64eef2eb8b94f852ce697de2e851d8e67/nunaliit2-dbSec/src/main/java/ca/carleton/gcrc/dbSec/DbSecurity.java#L244-L274
brianwhu/xillium
core/src/main/java/org/xillium/core/util/Scriptable.java
Scriptable.setObjects
public void setObjects(Map<String, Object> objects) { """ Provides objects to the JavaScript engine under various names. """ for (Map.Entry<String, Object> entry: objects.entrySet()) { js.put(entry.getKey(), entry.getValue()); } }
java
public void setObjects(Map<String, Object> objects) { for (Map.Entry<String, Object> entry: objects.entrySet()) { js.put(entry.getKey(), entry.getValue()); } }
[ "public", "void", "setObjects", "(", "Map", "<", "String", ",", "Object", ">", "objects", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "Object", ">", "entry", ":", "objects", ".", "entrySet", "(", ")", ")", "{", "js", ".", "put", ...
Provides objects to the JavaScript engine under various names.
[ "Provides", "objects", "to", "the", "JavaScript", "engine", "under", "various", "names", "." ]
train
https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/core/src/main/java/org/xillium/core/util/Scriptable.java#L32-L36
moparisthebest/beehive
beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/AptControlClient.java
AptControlClient.initControls
protected ArrayList<AptControlField> initControls() { """ Initializes the list of ControlFields declared directly by this ControlClient """ ArrayList<AptControlField> controls = new ArrayList<AptControlField>(); if ( _clientDecl == null || _clientDecl.getFields() == null ) return c...
java
protected ArrayList<AptControlField> initControls() { ArrayList<AptControlField> controls = new ArrayList<AptControlField>(); if ( _clientDecl == null || _clientDecl.getFields() == null ) return controls; Collection<FieldDeclaration> declaredFields = _clientDecl.getFields(); ...
[ "protected", "ArrayList", "<", "AptControlField", ">", "initControls", "(", ")", "{", "ArrayList", "<", "AptControlField", ">", "controls", "=", "new", "ArrayList", "<", "AptControlField", ">", "(", ")", ";", "if", "(", "_clientDecl", "==", "null", "||", "_c...
Initializes the list of ControlFields declared directly by this ControlClient
[ "Initializes", "the", "list", "of", "ControlFields", "declared", "directly", "by", "this", "ControlClient" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/generator/AptControlClient.java#L171-L185
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java
WebDriverHelper.waitForElementToContainSpecificText
public void waitForElementToContainSpecificText(final By by, final String text, final int maximumSeconds) { """ Waits until an element contains a specific text. @param by method of identifying the element @param text the element text to wait for @param maximumSeconds the maximum number of seconds to wai...
java
public void waitForElementToContainSpecificText(final By by, final String text, final int maximumSeconds) { WebDriverWait wait = new WebDriverWait(driver, maximumSeconds); wait.until(ExpectedConditions.textToBePresentInElement(by, text)); }
[ "public", "void", "waitForElementToContainSpecificText", "(", "final", "By", "by", ",", "final", "String", "text", ",", "final", "int", "maximumSeconds", ")", "{", "WebDriverWait", "wait", "=", "new", "WebDriverWait", "(", "driver", ",", "maximumSeconds", ")", "...
Waits until an element contains a specific text. @param by method of identifying the element @param text the element text to wait for @param maximumSeconds the maximum number of seconds to wait for
[ "Waits", "until", "an", "element", "contains", "a", "specific", "text", "." ]
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java#L531-L535
hortonworks/dstream
dstream-tez/src/main/java/io/dstream/tez/TaskDescriptorChainBuilder.java
TaskDescriptorChainBuilder.createTaskDescriptorForStreamCombineOperations
private TaskDescriptor createTaskDescriptorForStreamCombineOperations(DStreamOperation streamOperation) { """ Creates {@link TaskDescriptor} for stream combine operations (i.e., join, union, unionAll) """ TaskDescriptor taskDescriptor = this.createTaskDescriptor(streamOperation.getLastOperationName()); fo...
java
private TaskDescriptor createTaskDescriptorForStreamCombineOperations(DStreamOperation streamOperation){ TaskDescriptor taskDescriptor = this.createTaskDescriptor(streamOperation.getLastOperationName()); for (DStreamExecutionGraph dependentOps : streamOperation.getCombinableExecutionGraphs()) { TaskDescriptorCh...
[ "private", "TaskDescriptor", "createTaskDescriptorForStreamCombineOperations", "(", "DStreamOperation", "streamOperation", ")", "{", "TaskDescriptor", "taskDescriptor", "=", "this", ".", "createTaskDescriptor", "(", "streamOperation", ".", "getLastOperationName", "(", ")", ")...
Creates {@link TaskDescriptor} for stream combine operations (i.e., join, union, unionAll)
[ "Creates", "{" ]
train
https://github.com/hortonworks/dstream/blob/3a106c0f14725b028fe7fe2dbc660406d9a5f142/dstream-tez/src/main/java/io/dstream/tez/TaskDescriptorChainBuilder.java#L87-L96
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.getBaseName
public static String getBaseName(String fileName, String suffix) { """ Strip directory and suffix from filename. Like Unix 'basename'. <p/> Example: <code>getBaseName("/u/wcmac/foo.txt", "") ==> "foo.txt"</code><br/> Example: <code>getBaseName("/u/wcmac/foo.txt", ".txt") ==> "foo"</code><br/> Example: <code>...
java
public static String getBaseName(String fileName, String suffix) { String[] elts = fileName.split("/"); String lastElt = elts[elts.length - 1]; if (lastElt.endsWith(suffix)) { lastElt = lastElt.substring(0, lastElt.length() - suffix.length()); } return lastElt; }
[ "public", "static", "String", "getBaseName", "(", "String", "fileName", ",", "String", "suffix", ")", "{", "String", "[", "]", "elts", "=", "fileName", ".", "split", "(", "\"/\"", ")", ";", "String", "lastElt", "=", "elts", "[", "elts", ".", "length", ...
Strip directory and suffix from filename. Like Unix 'basename'. <p/> Example: <code>getBaseName("/u/wcmac/foo.txt", "") ==> "foo.txt"</code><br/> Example: <code>getBaseName("/u/wcmac/foo.txt", ".txt") ==> "foo"</code><br/> Example: <code>getBaseName("/u/wcmac/foo.txt", ".pdf") ==> "foo.txt"</code><br/>
[ "Strip", "directory", "and", "suffix", "from", "filename", ".", "Like", "Unix", "basename", ".", "<p", "/", ">" ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L1695-L1702
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cache/impl/MXBeanUtil.java
MXBeanUtil.calculateObjectName
public static ObjectName calculateObjectName(String cacheManagerName, String name, boolean stats) { """ Creates an object name using the scheme. "javax.cache:type=Cache&lt;Statistics|Configuration&gt;,name=&lt;cacheName&gt;" """ String cacheManagerNameSafe = mbeanSafe(cacheManagerName); String...
java
public static ObjectName calculateObjectName(String cacheManagerName, String name, boolean stats) { String cacheManagerNameSafe = mbeanSafe(cacheManagerName); String cacheName = mbeanSafe(name); try { String objectNameType = stats ? "Statistics" : "Configuration"; return...
[ "public", "static", "ObjectName", "calculateObjectName", "(", "String", "cacheManagerName", ",", "String", "name", ",", "boolean", "stats", ")", "{", "String", "cacheManagerNameSafe", "=", "mbeanSafe", "(", "cacheManagerName", ")", ";", "String", "cacheName", "=", ...
Creates an object name using the scheme. "javax.cache:type=Cache&lt;Statistics|Configuration&gt;,name=&lt;cacheName&gt;"
[ "Creates", "an", "object", "name", "using", "the", "scheme", ".", "javax", ".", "cache", ":", "type", "=", "Cache&lt", ";", "Statistics|Configuration&gt", ";", "name", "=", "&lt", ";", "cacheName&gt", ";" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cache/impl/MXBeanUtil.java#L105-L118
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcrl_serialnumber_binding.java
sslcrl_serialnumber_binding.count_filtered
public static long count_filtered(nitro_service service, String crlname, String filter) throws Exception { """ Use this API to count the filtered set of sslcrl_serialnumber_binding resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP". """ sslcrl_serialnumber_binding obj = new ssl...
java
public static long count_filtered(nitro_service service, String crlname, String filter) throws Exception{ sslcrl_serialnumber_binding obj = new sslcrl_serialnumber_binding(); obj.set_crlname(crlname); options option = new options(); option.set_count(true); option.set_filter(filter); sslcrl_serialnumber_bind...
[ "public", "static", "long", "count_filtered", "(", "nitro_service", "service", ",", "String", "crlname", ",", "String", "filter", ")", "throws", "Exception", "{", "sslcrl_serialnumber_binding", "obj", "=", "new", "sslcrl_serialnumber_binding", "(", ")", ";", "obj", ...
Use this API to count the filtered set of sslcrl_serialnumber_binding resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
[ "Use", "this", "API", "to", "count", "the", "filtered", "set", "of", "sslcrl_serialnumber_binding", "resources", ".", "filter", "string", "should", "be", "in", "JSON", "format", ".", "eg", ":", "port", ":", "80", "servicetype", ":", "HTTP", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslcrl_serialnumber_binding.java#L174-L185
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/version/SemanticVersion.java
SemanticVersion.isAtLeast
public static boolean isAtLeast(String version, String requiredVersion) { """ Check whether the version is at least the given version. @param version The version @param requiredVersion The required version @return True if it is """ if (version != null) { SemanticVersion thisVer...
java
public static boolean isAtLeast(String version, String requiredVersion) { if (version != null) { SemanticVersion thisVersion = new SemanticVersion(version); SemanticVersion otherVersion = new SemanticVersion(requiredVersion); return thisVersion.compareTo(otherVersion) != -1; ...
[ "public", "static", "boolean", "isAtLeast", "(", "String", "version", ",", "String", "requiredVersion", ")", "{", "if", "(", "version", "!=", "null", ")", "{", "SemanticVersion", "thisVersion", "=", "new", "SemanticVersion", "(", "version", ")", ";", "Semantic...
Check whether the version is at least the given version. @param version The version @param requiredVersion The required version @return True if it is
[ "Check", "whether", "the", "version", "is", "at", "least", "the", "given", "version", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/version/SemanticVersion.java#L111-L118
spring-cloud/spring-cloud-config
spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/support/AwsCodeCommitCredentialProvider.java
AwsCodeCommitCredentialProvider.calculateCodeCommitPassword
protected static String calculateCodeCommitPassword(URIish uri, String awsSecretKey) { """ Calculate the AWS CodeCommit password for the provided URI and AWS secret key. This uses the algorithm published by AWS at https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html @param uri the codecommit r...
java
protected static String calculateCodeCommitPassword(URIish uri, String awsSecretKey) { String[] split = uri.getHost().split("\\."); if (split.length < 4) { throw new CredentialException("Cannot detect AWS region from URI", null); } String region = split[1]; Date now = new Date(); SimpleDateFormat dateFo...
[ "protected", "static", "String", "calculateCodeCommitPassword", "(", "URIish", "uri", ",", "String", "awsSecretKey", ")", "{", "String", "[", "]", "split", "=", "uri", ".", "getHost", "(", ")", ".", "split", "(", "\"\\\\.\"", ")", ";", "if", "(", "split", ...
Calculate the AWS CodeCommit password for the provided URI and AWS secret key. This uses the algorithm published by AWS at https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html @param uri the codecommit repository uri @param awsSecretKey the aws secret key @return the password to use in the git request
[ "Calculate", "the", "AWS", "CodeCommit", "password", "for", "the", "provided", "URI", "and", "AWS", "secret", "key", ".", "This", "uses", "the", "algorithm", "published", "by", "AWS", "at", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".", "com...
train
https://github.com/spring-cloud/spring-cloud-config/blob/6b99631f78bac4e1b521d2cc126c8b2da45d1f1f/spring-cloud-config-server/src/main/java/org/springframework/cloud/config/server/support/AwsCodeCommitCredentialProvider.java#L104-L135
xcesco/kripton
kripton-core/src/main/java/com/abubusoft/kripton/common/CharMatcher.java
CharMatcher.trimAndCollapseFrom
public String trimAndCollapseFrom(CharSequence sequence, char replacement) { """ Collapses groups of matching characters exactly as {@link #collapseFrom} does, except that groups of matching characters at the start or end of the sequence are removed without replacement. @param sequence the sequence @param re...
java
public String trimAndCollapseFrom(CharSequence sequence, char replacement) { // This implementation avoids unnecessary allocation. int len = sequence.length(); int first; int last; for (first = 0; first < len && matches(sequence.charAt(first)); first++) {} for (last = len - 1; last > first && m...
[ "public", "String", "trimAndCollapseFrom", "(", "CharSequence", "sequence", ",", "char", "replacement", ")", "{", "// This implementation avoids unnecessary allocation.", "int", "len", "=", "sequence", ".", "length", "(", ")", ";", "int", "first", ";", "int", "last"...
Collapses groups of matching characters exactly as {@link #collapseFrom} does, except that groups of matching characters at the start or end of the sequence are removed without replacement. @param sequence the sequence @param replacement the replacement @return the string
[ "Collapses", "groups", "of", "matching", "characters", "exactly", "as", "{", "@link", "#collapseFrom", "}", "does", "except", "that", "groups", "of", "matching", "characters", "at", "the", "start", "or", "end", "of", "the", "sequence", "are", "removed", "witho...
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-core/src/main/java/com/abubusoft/kripton/common/CharMatcher.java#L1500-L1515
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java
ScriptRequestState.writeScriptBlock
public static void writeScriptBlock(ServletRequest req, AbstractRenderAppender results, String script) { """ This is a static method that will write a consistent look/feel to the tags and comment markup that appears around the JavaScript. @param results the InternalStringBuilder that will have the &lt;script> t...
java
public static void writeScriptBlock(ServletRequest req, AbstractRenderAppender results, String script) { assert(results != null); ScriptTag.State state = new ScriptTag.State(); state.suppressComments = false; ScriptTag br = (ScriptTag) TagRenderingBase.Factory.getRendering(TagRenderi...
[ "public", "static", "void", "writeScriptBlock", "(", "ServletRequest", "req", ",", "AbstractRenderAppender", "results", ",", "String", "script", ")", "{", "assert", "(", "results", "!=", "null", ")", ";", "ScriptTag", ".", "State", "state", "=", "new", "Script...
This is a static method that will write a consistent look/feel to the tags and comment markup that appears around the JavaScript. @param results the InternalStringBuilder that will have the &lt;script> tag written into @param script the JavaScript block
[ "This", "is", "a", "static", "method", "that", "will", "write", "a", "consistent", "look", "/", "feel", "to", "the", "tags", "and", "comment", "markup", "that", "appears", "around", "the", "JavaScript", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/javascript/ScriptRequestState.java#L248-L260
jingwei/krati
krati-main/src/main/java/krati/core/array/entry/EntryValueLong.java
EntryValueLong.updateArrayFile
@Override public void updateArrayFile(DataWriter writer, long position) throws IOException { """ Writes this EntryValue at a given position of a data writer. @param writer @param position @throws IOException """ writer.writeLong(position, val); }
java
@Override public void updateArrayFile(DataWriter writer, long position) throws IOException { writer.writeLong(position, val); }
[ "@", "Override", "public", "void", "updateArrayFile", "(", "DataWriter", "writer", ",", "long", "position", ")", "throws", "IOException", "{", "writer", ".", "writeLong", "(", "position", ",", "val", ")", ";", "}" ]
Writes this EntryValue at a given position of a data writer. @param writer @param position @throws IOException
[ "Writes", "this", "EntryValue", "at", "a", "given", "position", "of", "a", "data", "writer", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/entry/EntryValueLong.java#L94-L97
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.analyzeImageInStream
public ImageAnalysis analyzeImageInStream(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter) { """ This operation extracts a rich set of visual features based on the image content. @param image An image stream. @param analyzeImageInStreamOptionalParameter the object repr...
java
public ImageAnalysis analyzeImageInStream(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter) { return analyzeImageInStreamWithServiceResponseAsync(image, analyzeImageInStreamOptionalParameter).toBlocking().single().body(); }
[ "public", "ImageAnalysis", "analyzeImageInStream", "(", "byte", "[", "]", "image", ",", "AnalyzeImageInStreamOptionalParameter", "analyzeImageInStreamOptionalParameter", ")", "{", "return", "analyzeImageInStreamWithServiceResponseAsync", "(", "image", ",", "analyzeImageInStreamOp...
This operation extracts a rich set of visual features based on the image content. @param image An image stream. @param analyzeImageInStreamOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @throw...
[ "This", "operation", "extracts", "a", "rich", "set", "of", "visual", "features", "based", "on", "the", "image", "content", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1079-L1081
podio/podio-java
src/main/java/com/podio/conversation/ConversationAPI.java
ConversationAPI.addReply
public int addReply(int conversationId, String text) { """ Creates a reply to the conversation. @param conversationId The id of the conversation to reply to @param text The text of the reply @return The id of the new message """ return getResourceFactory() .getApiResource("/conversation/" + conver...
java
public int addReply(int conversationId, String text) { return getResourceFactory() .getApiResource("/conversation/" + conversationId + "/reply") .entity(new MessageCreate(text), MediaType.APPLICATION_JSON_TYPE) .get(MessageCreateResponse.class).getMessageId(); }
[ "public", "int", "addReply", "(", "int", "conversationId", ",", "String", "text", ")", "{", "return", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/conversation/\"", "+", "conversationId", "+", "\"/reply\"", ")", ".", "entity", "(", "new", "M...
Creates a reply to the conversation. @param conversationId The id of the conversation to reply to @param text The text of the reply @return The id of the new message
[ "Creates", "a", "reply", "to", "the", "conversation", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/conversation/ConversationAPI.java#L106-L112
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java
Check.notEmpty
@ArgumentsChecked @Throws( { """ Ensures that a passed parameter of the calling method is not empty, using the passed expression to evaluate the emptiness. @param expression the result of the expression to verify the emptiness of a reference ({@code true} means empty, {@code false} means not empty) @param ...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalEmptyArgumentException.class }) public static void notEmpty(final boolean expression, @Nullable final String name) { if (expression) { throw new IllegalEmptyArgumentException(name); } }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalEmptyArgumentException", ".", "class", "}", ")", "public", "static", "void", "notEmpty", "(", "final", "boolean", "expression", ",", "@", "Nullable", "fina...
Ensures that a passed parameter of the calling method is not empty, using the passed expression to evaluate the emptiness. @param expression the result of the expression to verify the emptiness of a reference ({@code true} means empty, {@code false} means not empty) @param name name of object reference (in source code...
[ "Ensures", "that", "a", "passed", "parameter", "of", "the", "calling", "method", "is", "not", "empty", "using", "the", "passed", "expression", "to", "evaluate", "the", "emptiness", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/Check.java#L1930-L1936
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java
CommercePriceEntryPersistenceImpl.removeByUUID_G
@Override public CommercePriceEntry removeByUUID_G(String uuid, long groupId) throws NoSuchPriceEntryException { """ Removes the commerce price entry where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce price entry that was removed ...
java
@Override public CommercePriceEntry removeByUUID_G(String uuid, long groupId) throws NoSuchPriceEntryException { CommercePriceEntry commercePriceEntry = findByUUID_G(uuid, groupId); return remove(commercePriceEntry); }
[ "@", "Override", "public", "CommercePriceEntry", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchPriceEntryException", "{", "CommercePriceEntry", "commercePriceEntry", "=", "findByUUID_G", "(", "uuid", ",", "groupId", ")", ";", ...
Removes the commerce price entry where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the commerce price entry that was removed
[ "Removes", "the", "commerce", "price", "entry", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceEntryPersistenceImpl.java#L815-L821
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.getExplicitList
public List<ExplicitListItem> getExplicitList(UUID appId, String versionId, UUID entityId) { """ Get the explicit list of the pattern.any entity. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity id. @throws IllegalArgumentException thrown if parameters ...
java
public List<ExplicitListItem> getExplicitList(UUID appId, String versionId, UUID entityId) { return getExplicitListWithServiceResponseAsync(appId, versionId, entityId).toBlocking().single().body(); }
[ "public", "List", "<", "ExplicitListItem", ">", "getExplicitList", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ")", "{", "return", "getExplicitListWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "entityId", ")", ".", ...
Get the explicit list of the pattern.any entity. @param appId The application ID. @param versionId The version ID. @param entityId The Pattern.Any entity id. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws Runt...
[ "Get", "the", "explicit", "list", "of", "the", "pattern", ".", "any", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L9899-L9901
ivanceras/orm
src/main/java/com/ivanceras/db/api/Query.java
Query.declare
public Query declare(String name, Query query) { """ When there is a need to have an inner query, this will be using with query in postgresql http://www.postgresql.org/docs/9.1/static/queries-with.html @param name @param columns @param query @param recursive """ selectAllColumns(); declaredQuery.put(n...
java
public Query declare(String name, Query query){ selectAllColumns(); declaredQuery.put(name, query); return this; }
[ "public", "Query", "declare", "(", "String", "name", ",", "Query", "query", ")", "{", "selectAllColumns", "(", ")", ";", "declaredQuery", ".", "put", "(", "name", ",", "query", ")", ";", "return", "this", ";", "}" ]
When there is a need to have an inner query, this will be using with query in postgresql http://www.postgresql.org/docs/9.1/static/queries-with.html @param name @param columns @param query @param recursive
[ "When", "there", "is", "a", "need", "to", "have", "an", "inner", "query", "this", "will", "be", "using", "with", "query", "in", "postgresql", "http", ":", "//", "www", ".", "postgresql", ".", "org", "/", "docs", "/", "9", ".", "1", "/", "static", "...
train
https://github.com/ivanceras/orm/blob/e63213cb8abefd11df0e2d34b1c95477788e600e/src/main/java/com/ivanceras/db/api/Query.java#L97-L101
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WFieldLayout.java
WFieldLayout.addField
public WField addField(final String label, final WComponent field) { """ Add a field using the label and components passed in. @param label the label to use for the field @param field the component to use for the field @return the field which was added to the layout. """ if (null == label) { return a...
java
public WField addField(final String label, final WComponent field) { if (null == label) { return addField((WLabel) null, field); } return addField(new WLabel(label), field); }
[ "public", "WField", "addField", "(", "final", "String", "label", ",", "final", "WComponent", "field", ")", "{", "if", "(", "null", "==", "label", ")", "{", "return", "addField", "(", "(", "WLabel", ")", "null", ",", "field", ")", ";", "}", "return", ...
Add a field using the label and components passed in. @param label the label to use for the field @param field the component to use for the field @return the field which was added to the layout.
[ "Add", "a", "field", "using", "the", "label", "and", "components", "passed", "in", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WFieldLayout.java#L182-L187
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java
JspUtil.getPageContext
public static PageContext getPageContext(JspContext jspContext) { """ Attempt to convert a {@link JspContext} into a {@link PageContext}. @param jspContext the jsp context @return the page context @throws IllegalStateException if the {@link JspContext} can't be converted into a {@link PageContext} """ ...
java
public static PageContext getPageContext(JspContext jspContext) { if(!(jspContext instanceof PageContext)) throw new IllegalStateException(Bundle.getErrorString("DataGridUtil_IllegalJspContext", new Object[]{(jspContext != null ? jspContext.getClass().getName() : "null")})); else ...
[ "public", "static", "PageContext", "getPageContext", "(", "JspContext", "jspContext", ")", "{", "if", "(", "!", "(", "jspContext", "instanceof", "PageContext", ")", ")", "throw", "new", "IllegalStateException", "(", "Bundle", ".", "getErrorString", "(", "\"DataGri...
Attempt to convert a {@link JspContext} into a {@link PageContext}. @param jspContext the jsp context @return the page context @throws IllegalStateException if the {@link JspContext} can't be converted into a {@link PageContext}
[ "Attempt", "to", "convert", "a", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/util/JspUtil.java#L63-L68