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
CenturyLinkCloud/clc-java-sdk
sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/InvoiceService.java
InvoiceService.getInvoice
public InvoiceData getInvoice(Date date, String pricingAccountAlias) { """ Gets a list of invoicing data for a given account alias for a given month. @param date Date of usage @param pricingAccountAlias Short code of the account that sends the invoice for the accountAlias @return the invoice data """ ...
java
public InvoiceData getInvoice(Date date, String pricingAccountAlias) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); return getInvoice(calendar, pricingAccountAlias); }
[ "public", "InvoiceData", "getInvoice", "(", "Date", "date", ",", "String", "pricingAccountAlias", ")", "{", "Calendar", "calendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "calendar", ".", "setTime", "(", "date", ")", ";", "return", "getInvoice", ...
Gets a list of invoicing data for a given account alias for a given month. @param date Date of usage @param pricingAccountAlias Short code of the account that sends the invoice for the accountAlias @return the invoice data
[ "Gets", "a", "list", "of", "invoicing", "data", "for", "a", "given", "account", "alias", "for", "a", "given", "month", "." ]
train
https://github.com/CenturyLinkCloud/clc-java-sdk/blob/c026322f077dea71b1acf9f2d665253d79d9bf85/sdk/src/main/java/com/centurylink/cloud/sdk/server/services/dsl/InvoiceService.java#L53-L58
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTransform.java
GVRTransform.translate
public void translate(float x, float y, float z) { """ Move the object, relative to its current position. Modify the tranform's current translation by applying translations on all 3 axes. @param x 'X' delta @param y 'Y' delta @param z 'Z' delta """ NativeTransform.translate(getNative(), x, ...
java
public void translate(float x, float y, float z) { NativeTransform.translate(getNative(), x, y, z); }
[ "public", "void", "translate", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "NativeTransform", ".", "translate", "(", "getNative", "(", ")", ",", "x", ",", "y", ",", "z", ")", ";", "}" ]
Move the object, relative to its current position. Modify the tranform's current translation by applying translations on all 3 axes. @param x 'X' delta @param y 'Y' delta @param z 'Z' delta
[ "Move", "the", "object", "relative", "to", "its", "current", "position", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRTransform.java#L387-L389
virgo47/javasimon
core/src/main/java/org/javasimon/utils/bean/ClassUtils.java
ClassUtils.getSetter
static Method getSetter(Class<?> targetClass, String propertyName, Class<?> type) { """ Get setter for the specified property with the specified type. * @param targetClass class for which a setter will be returned @param propertyName name of the property for which a setter will be returned @param type a target...
java
static Method getSetter(Class<?> targetClass, String propertyName, Class<?> type) { if (targetClass == null) { return null; } String setterMethodName = setterName(propertyName); try { Method setter = targetClass.getMethod(setterMethodName, type); logger.debug("Found public setter {} in class {}", sette...
[ "static", "Method", "getSetter", "(", "Class", "<", "?", ">", "targetClass", ",", "String", "propertyName", ",", "Class", "<", "?", ">", "type", ")", "{", "if", "(", "targetClass", "==", "null", ")", "{", "return", "null", ";", "}", "String", "setterMe...
Get setter for the specified property with the specified type. * @param targetClass class for which a setter will be returned @param propertyName name of the property for which a setter will be returned @param type a target setter accepts @return setter method for the specified property that accepts specified type if ...
[ "Get", "setter", "for", "the", "specified", "property", "with", "the", "specified", "type", ".", "*" ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/bean/ClassUtils.java#L53-L77
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java
GVRSkeletonAnimation.createSkeleton
public GVRSkeleton createSkeleton(List<String> boneNames) { """ Create a skeleton from the target hierarchy which has the given bones. <p> The structure of the target hierarchy is used to determine bone parentage. The skeleton will have only the bones designated in the list. The hierarchy is expected to be con...
java
public GVRSkeleton createSkeleton(List<String> boneNames) { int numBones = boneNames.size(); GVRSceneObject root = (GVRSceneObject) mTarget; mSkeleton = new GVRSkeleton(root, boneNames); for (int boneId = 0; boneId < numBones; ++boneId) { mSkeleton.setBoneOptions(...
[ "public", "GVRSkeleton", "createSkeleton", "(", "List", "<", "String", ">", "boneNames", ")", "{", "int", "numBones", "=", "boneNames", ".", "size", "(", ")", ";", "GVRSceneObject", "root", "=", "(", "GVRSceneObject", ")", "mTarget", ";", "mSkeleton", "=", ...
Create a skeleton from the target hierarchy which has the given bones. <p> The structure of the target hierarchy is used to determine bone parentage. The skeleton will have only the bones designated in the list. The hierarchy is expected to be connected with no gaps or unnamed nodes. @param boneNames names of bones in ...
[ "Create", "a", "skeleton", "from", "the", "target", "hierarchy", "which", "has", "the", "given", "bones", ".", "<p", ">", "The", "structure", "of", "the", "target", "hierarchy", "is", "used", "to", "determine", "bone", "parentage", ".", "The", "skeleton", ...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/keyframe/GVRSkeletonAnimation.java#L157-L168
fernandospr/javapns-jdk16
src/main/java/javapns/notification/PushNotificationPayload.java
PushNotificationPayload.getCompatibleProperty
@SuppressWarnings("unchecked") private <T> T getCompatibleProperty(String propertyName, Class<T> expectedClass, String exceptionMessage, JSONObject dictionary) throws JSONException { """ Get the value of a given property, but only if it is of the expected class. If the value exists but is of a different class t...
java
@SuppressWarnings("unchecked") private <T> T getCompatibleProperty(String propertyName, Class<T> expectedClass, String exceptionMessage, JSONObject dictionary) throws JSONException { Object propertyValue = null; try { propertyValue = dictionary.get(propertyName); } catch (Exception e) { } if (prope...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "<", "T", ">", "T", "getCompatibleProperty", "(", "String", "propertyName", ",", "Class", "<", "T", ">", "expectedClass", ",", "String", "exceptionMessage", ",", "JSONObject", "dictionary", ")", "thr...
Get the value of a given property, but only if it is of the expected class. If the value exists but is of a different class than expected, an exception is thrown. This method is useful for properly supporting properties that can have a simple or complex value (such as "alert") @param <T> the property value's class @p...
[ "Get", "the", "value", "of", "a", "given", "property", "but", "only", "if", "it", "is", "of", "the", "expected", "class", ".", "If", "the", "value", "exists", "but", "is", "of", "a", "different", "class", "than", "expected", "an", "exception", "is", "t...
train
https://github.com/fernandospr/javapns-jdk16/blob/84de6d9328ab01af92f77cc60c4554de02420909/src/main/java/javapns/notification/PushNotificationPayload.java#L277-L292
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java
CopyFileExtensions.copyFile
public static boolean copyFile(final File source, final File destination, final Charset sourceEncoding, final Charset destinationEncoding, final boolean lastModified) throws IOException { """ Copies the given source file to the given destination file with the given source encodings and destination encodings. ...
java
public static boolean copyFile(final File source, final File destination, final Charset sourceEncoding, final Charset destinationEncoding, final boolean lastModified) throws IOException { if (source.isDirectory()) { throw new IllegalArgumentException("The source File " + destination.getName() + " should...
[ "public", "static", "boolean", "copyFile", "(", "final", "File", "source", ",", "final", "File", "destination", ",", "final", "Charset", "sourceEncoding", ",", "final", "Charset", "destinationEncoding", ",", "final", "boolean", "lastModified", ")", "throws", "IOEx...
Copies the given source file to the given destination file with the given source encodings and destination encodings. @param source the source @param destination the destination @param sourceEncoding the source encoding @param destinationEncoding the destination encoding @param lastModified if true the last modified f...
[ "Copies", "the", "given", "source", "file", "to", "the", "given", "destination", "file", "with", "the", "given", "source", "encodings", "and", "destination", "encodings", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/copy/CopyFileExtensions.java#L531-L574
OpenLiberty/open-liberty
dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/CommonFilter.java
CommonFilter.makeConditionWithMatchType
private ICondition makeConditionWithMatchType(String key, String operand, String valueString, boolean ipAddress) throws FilterException { """ Given the three parts (key, operand, value) make a proper condition object. Notice that I need to know if the value should...
java
private ICondition makeConditionWithMatchType(String key, String operand, String valueString, boolean ipAddress) throws FilterException { if (operand.equalsIgnoreCase(AuthFilterConfig.MATCH_TYPE_EQUALS)) { return new EqualCondition(key, makeValue(val...
[ "private", "ICondition", "makeConditionWithMatchType", "(", "String", "key", ",", "String", "operand", ",", "String", "valueString", ",", "boolean", "ipAddress", ")", "throws", "FilterException", "{", "if", "(", "operand", ".", "equalsIgnoreCase", "(", "AuthFilterCo...
Given the three parts (key, operand, value) make a proper condition object. Notice that I need to know if the value should be interpreted as an IP address. There some service that use symbol and others use word for operand/matchType. Basically just look at the operator string and create the correct condition. Only the...
[ "Given", "the", "three", "parts", "(", "key", "operand", "value", ")", "make", "a", "proper", "condition", "object", ".", "Notice", "that", "I", "need", "to", "know", "if", "the", "value", "should", "be", "interpreted", "as", "an", "IP", "address", ".", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.authentication.filter/src/com/ibm/ws/security/authentication/filter/internal/CommonFilter.java#L245-L269
jenkinsci/jenkins
core/src/main/java/hudson/model/ResourceList.java
ResourceList.getConflict
public Resource getConflict(ResourceList that) { """ Returns the resource in this list that's colliding with the given resource list. """ Resource r = _getConflict(this,that); if(r!=null) return r; return _getConflict(that,this); }
java
public Resource getConflict(ResourceList that) { Resource r = _getConflict(this,that); if(r!=null) return r; return _getConflict(that,this); }
[ "public", "Resource", "getConflict", "(", "ResourceList", "that", ")", "{", "Resource", "r", "=", "_getConflict", "(", "this", ",", "that", ")", ";", "if", "(", "r", "!=", "null", ")", "return", "r", ";", "return", "_getConflict", "(", "that", ",", "th...
Returns the resource in this list that's colliding with the given resource list.
[ "Returns", "the", "resource", "in", "this", "list", "that", "s", "colliding", "with", "the", "given", "resource", "list", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ResourceList.java#L121-L125
pravega/pravega
common/src/main/java/io/pravega/common/hash/HashHelper.java
HashHelper.bytesToUUID
@VisibleForTesting static UUID bytesToUUID(byte[] data) { """ Converts a 128 bit array into a UUID. Copied from UUID's private constructor. """ long msb = 0; long lsb = 0; assert data.length == 16 : "data must be 16 bytes in length"; for (int i = 0; i < 8; i++) { ...
java
@VisibleForTesting static UUID bytesToUUID(byte[] data) { long msb = 0; long lsb = 0; assert data.length == 16 : "data must be 16 bytes in length"; for (int i = 0; i < 8; i++) { msb = (msb << 8) | (data[i] & 0xff); } for (int i = 8; i < 16; i++) { ...
[ "@", "VisibleForTesting", "static", "UUID", "bytesToUUID", "(", "byte", "[", "]", "data", ")", "{", "long", "msb", "=", "0", ";", "long", "lsb", "=", "0", ";", "assert", "data", ".", "length", "==", "16", ":", "\"data must be 16 bytes in length\"", ";", ...
Converts a 128 bit array into a UUID. Copied from UUID's private constructor.
[ "Converts", "a", "128", "bit", "array", "into", "a", "UUID", ".", "Copied", "from", "UUID", "s", "private", "constructor", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/hash/HashHelper.java#L54-L66
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/JobLauncherUtils.java
JobLauncherUtils.newTaskId
public static String newTaskId(String jobId, int sequence) { """ Create a new task ID for the job with the given job ID. @param jobId job ID @param sequence task sequence number @return new task ID """ return Id.Task.create(Id.parse(jobId).get(Id.Parts.INSTANCE_NAME), sequence).toString(); }
java
public static String newTaskId(String jobId, int sequence) { return Id.Task.create(Id.parse(jobId).get(Id.Parts.INSTANCE_NAME), sequence).toString(); }
[ "public", "static", "String", "newTaskId", "(", "String", "jobId", ",", "int", "sequence", ")", "{", "return", "Id", ".", "Task", ".", "create", "(", "Id", ".", "parse", "(", "jobId", ")", ".", "get", "(", "Id", ".", "Parts", ".", "INSTANCE_NAME", ")...
Create a new task ID for the job with the given job ID. @param jobId job ID @param sequence task sequence number @return new task ID
[ "Create", "a", "new", "task", "ID", "for", "the", "job", "with", "the", "given", "job", "ID", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/JobLauncherUtils.java#L78-L80
networknt/light-4j
utility/src/main/java/com/networknt/utility/NioUtils.java
NioUtils.createZipFileSystem
private static FileSystem createZipFileSystem(String zipFilename, boolean create) throws IOException { """ Returns a zip file system @param zipFilename to construct the file system from @param create true if the zip file should be created @return a zip file system @throws IOException """ // conver...
java
private static FileSystem createZipFileSystem(String zipFilename, boolean create) throws IOException { // convert the filename to a URI final Path path = Paths.get(zipFilename); if(Files.notExists(path.getParent())) { Files.createDirectories(path.getParent()); } fina...
[ "private", "static", "FileSystem", "createZipFileSystem", "(", "String", "zipFilename", ",", "boolean", "create", ")", "throws", "IOException", "{", "// convert the filename to a URI", "final", "Path", "path", "=", "Paths", ".", "get", "(", "zipFilename", ")", ";", ...
Returns a zip file system @param zipFilename to construct the file system from @param create true if the zip file should be created @return a zip file system @throws IOException
[ "Returns", "a", "zip", "file", "system" ]
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/utility/src/main/java/com/networknt/utility/NioUtils.java#L54-L68
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java
CPAttachmentFileEntryPersistenceImpl.removeByUUID_G
@Override public CPAttachmentFileEntry removeByUUID_G(String uuid, long groupId) throws NoSuchCPAttachmentFileEntryException { """ Removes the cp attachment file entry where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp attachment file e...
java
@Override public CPAttachmentFileEntry removeByUUID_G(String uuid, long groupId) throws NoSuchCPAttachmentFileEntryException { CPAttachmentFileEntry cpAttachmentFileEntry = findByUUID_G(uuid, groupId); return remove(cpAttachmentFileEntry); }
[ "@", "Override", "public", "CPAttachmentFileEntry", "removeByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchCPAttachmentFileEntryException", "{", "CPAttachmentFileEntry", "cpAttachmentFileEntry", "=", "findByUUID_G", "(", "uuid", ",", "group...
Removes the cp attachment file entry where uuid = &#63; and groupId = &#63; from the database. @param uuid the uuid @param groupId the group ID @return the cp attachment file entry that was removed
[ "Removes", "the", "cp", "attachment", "file", "entry", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPAttachmentFileEntryPersistenceImpl.java#L820-L826
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml11Attribute
public static String escapeXml11Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { """ <p> Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value. </p> <p> This method will perform an escape operation a...
java
public static String escapeXml11Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { return escapeXml(text, XmlEscapeSymbols.XML11_ATTRIBUTE_SYMBOLS, type, level); }
[ "public", "static", "String", "escapeXml11Attribute", "(", "final", "String", "text", ",", "final", "XmlEscapeType", "type", ",", "final", "XmlEscapeLevel", "level", ")", "{", "return", "escapeXml", "(", "text", ",", "XmlEscapeSymbols", ".", "XML11_ATTRIBUTE_SYMBOLS...
<p> Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values. </p...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "XML", "1", ".", "1", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "meant", "to", "be", "an", "XML", "attribute", "value", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L636-L638
EdwardRaff/JSAT
JSAT/src/jsat/classifiers/linear/SDCA.java
SDCA.setLambda
@Parameter.WarmParameter(prefLowToHigh = false) public void setLambda(double lambda) { """ Sets the regularization term, where larger values indicate a larger regularization penalty. @param lambda the positive regularization term """ if(lambda <= 0 || Double.isInfinite(lambda) || Double.isNaN(l...
java
@Parameter.WarmParameter(prefLowToHigh = false) public void setLambda(double lambda) { if(lambda <= 0 || Double.isInfinite(lambda) || Double.isNaN(lambda)) throw new IllegalArgumentException("Regularization term lambda must be a positive value, not " + lambda); this.lambda = lambda; ...
[ "@", "Parameter", ".", "WarmParameter", "(", "prefLowToHigh", "=", "false", ")", "public", "void", "setLambda", "(", "double", "lambda", ")", "{", "if", "(", "lambda", "<=", "0", "||", "Double", ".", "isInfinite", "(", "lambda", ")", "||", "Double", ".",...
Sets the regularization term, where larger values indicate a larger regularization penalty. @param lambda the positive regularization term
[ "Sets", "the", "regularization", "term", "where", "larger", "values", "indicate", "a", "larger", "regularization", "penalty", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/SDCA.java#L172-L178
google/closure-compiler
src/com/google/javascript/jscomp/JSModule.java
JSModule.addAfter
public void addAfter(CompilerInput input, CompilerInput other) { """ Adds a source code input to this module directly after other. """ checkState(inputs.contains(other)); inputs.add(inputs.indexOf(other), input); input.setModule(this); }
java
public void addAfter(CompilerInput input, CompilerInput other) { checkState(inputs.contains(other)); inputs.add(inputs.indexOf(other), input); input.setModule(this); }
[ "public", "void", "addAfter", "(", "CompilerInput", "input", ",", "CompilerInput", "other", ")", "{", "checkState", "(", "inputs", ".", "contains", "(", "other", ")", ")", ";", "inputs", ".", "add", "(", "inputs", ".", "indexOf", "(", "other", ")", ",", ...
Adds a source code input to this module directly after other.
[ "Adds", "a", "source", "code", "input", "to", "this", "module", "directly", "after", "other", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/JSModule.java#L165-L169
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getCertificateVersionsWithServiceResponseAsync
public Observable<ServiceResponse<Page<CertificateItem>>> getCertificateVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String certificateName) { """ List the versions of a certificate. The GetCertificateVersions operation returns the versions of a certificate in the specified key vault. This op...
java
public Observable<ServiceResponse<Page<CertificateItem>>> getCertificateVersionsWithServiceResponseAsync(final String vaultBaseUrl, final String certificateName) { return getCertificateVersionsSinglePageAsync(vaultBaseUrl, certificateName) .concatMap(new Func1<ServiceResponse<Page<CertificateItem>>,...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "CertificateItem", ">", ">", ">", "getCertificateVersionsWithServiceResponseAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "String", "certificateName", ")", "{", "return", "getCertificateVe...
List the versions of a certificate. The GetCertificateVersions operation returns the versions of a certificate in the specified key vault. This operation requires the certificates/list permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param certificateName The name of the ce...
[ "List", "the", "versions", "of", "a", "certificate", ".", "The", "GetCertificateVersions", "operation", "returns", "the", "versions", "of", "a", "certificate", "in", "the", "specified", "key", "vault", ".", "This", "operation", "requires", "the", "certificates", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L6961-L6973
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/GroupIterator.java
GroupIterator.getNextGroup
private Group getNextGroup(int tmp_model,int tmp_chain,int tmp_group) throws NoSuchElementException { """ recursive method to retrieve the next group. Helper method for gext(). @see #next """ if ( tmp_model >= structure.nrModels()){ throw new NoSuchElementException("arrived at end of structure!"); }...
java
private Group getNextGroup(int tmp_model,int tmp_chain,int tmp_group) throws NoSuchElementException { if ( tmp_model >= structure.nrModels()){ throw new NoSuchElementException("arrived at end of structure!"); } List<Chain> model = structure.getModel(tmp_model); if ( tmp_chain >= model.size() ){ if(fi...
[ "private", "Group", "getNextGroup", "(", "int", "tmp_model", ",", "int", "tmp_chain", ",", "int", "tmp_group", ")", "throws", "NoSuchElementException", "{", "if", "(", "tmp_model", ">=", "structure", ".", "nrModels", "(", ")", ")", "{", "throw", "new", "NoSu...
recursive method to retrieve the next group. Helper method for gext(). @see #next
[ "recursive", "method", "to", "retrieve", "the", "next", "group", ".", "Helper", "method", "for", "gext", "()", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/GroupIterator.java#L172-L200
quattor/pan
panc/src/main/java/org/quattor/pan/type/FullType.java
FullType.setDefaults
@Override public Element setDefaults(Context context, Element self) throws EvaluationException { """ This will call the setDefaults method of the base type with the given argument. NOTE: this method cannot be called with self equal to null. If the element doesn't exist, then the caller must extract the defau...
java
@Override public Element setDefaults(Context context, Element self) throws EvaluationException { assert (context != null); assert (self != null); return baseType.setDefaults(context, self); }
[ "@", "Override", "public", "Element", "setDefaults", "(", "Context", "context", ",", "Element", "self", ")", "throws", "EvaluationException", "{", "assert", "(", "context", "!=", "null", ")", ";", "assert", "(", "self", "!=", "null", ")", ";", "return", "b...
This will call the setDefaults method of the base type with the given argument. NOTE: this method cannot be called with self equal to null. If the element doesn't exist, then the caller must extract the default value from this type as set the value. Afterwards, this method can be called. This is necessary because we ca...
[ "This", "will", "call", "the", "setDefaults", "method", "of", "the", "base", "type", "with", "the", "given", "argument", ".", "NOTE", ":", "this", "method", "cannot", "be", "called", "with", "self", "equal", "to", "null", ".", "If", "the", "element", "do...
train
https://github.com/quattor/pan/blob/009934a603dd0c08d3fa4bb7d9389c380a916f54/panc/src/main/java/org/quattor/pan/type/FullType.java#L150-L158
banq/jdonframework
src/main/java/com/jdon/container/factory/ContainerBuilderFactory.java
ContainerBuilderFactory.createContainerBuilder
public synchronized ContainerRegistryBuilder createContainerBuilder(AppContextWrapper context) { """ the main method in this class, read all components include interceptors from Xml configure file. create a micro container instance. and then returen a ContainerBuilder instance @param context @return "...
java
public synchronized ContainerRegistryBuilder createContainerBuilder(AppContextWrapper context) { containerLoaderAnnotation.startScan(context); ContainerFactory containerFactory = new ContainerFactory(); ContainerWrapper cw = containerFactory.create(containerLoaderAnnotation.getConfigInfo()); ContainerCo...
[ "public", "synchronized", "ContainerRegistryBuilder", "createContainerBuilder", "(", "AppContextWrapper", "context", ")", "{", "containerLoaderAnnotation", ".", "startScan", "(", "context", ")", ";", "ContainerFactory", "containerFactory", "=", "new", "ContainerFactory", "(...
the main method in this class, read all components include interceptors from Xml configure file. create a micro container instance. and then returen a ContainerBuilder instance @param context @return
[ "the", "main", "method", "in", "this", "class", "read", "all", "components", "include", "interceptors", "from", "Xml", "configure", "file", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/container/factory/ContainerBuilderFactory.java#L53-L63
samskivert/samskivert
src/main/java/com/samskivert/velocity/FormTool.java
FormTool.fixedCheckbox
public String fixedCheckbox (String name, boolean value) { """ Constructs a checkbox input field with the specified name and value. """ StringBuilder buf = new StringBuilder(); buf.append("<input type=\"checkbox\""); buf.append(" name=\"").append(name).append("\""); if (value) ...
java
public String fixedCheckbox (String name, boolean value) { StringBuilder buf = new StringBuilder(); buf.append("<input type=\"checkbox\""); buf.append(" name=\"").append(name).append("\""); if (value) { buf.append(_useXHTML ? " checked=\"checked\"" : " checked"); ...
[ "public", "String", "fixedCheckbox", "(", "String", "name", ",", "boolean", "value", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"<input type=\\\"checkbox\\\"\"", ")", ";", "buf", ".", "append", ...
Constructs a checkbox input field with the specified name and value.
[ "Constructs", "a", "checkbox", "input", "field", "with", "the", "specified", "name", "and", "value", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/velocity/FormTool.java#L275-L285
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java
AbstractDatabaseEngine.executeUpdate
@Override public synchronized int executeUpdate(final String query) throws DatabaseEngineException { """ Executes a native query. @param query The query to execute. @return The number of rows updated. @throws DatabaseEngineException If something goes wrong executing the native query. """ State...
java
@Override public synchronized int executeUpdate(final String query) throws DatabaseEngineException { Statement s = null; try { getConnection(); s = conn.createStatement(); return s.executeUpdate(query); } catch (final Exception ex) { throw new ...
[ "@", "Override", "public", "synchronized", "int", "executeUpdate", "(", "final", "String", "query", ")", "throws", "DatabaseEngineException", "{", "Statement", "s", "=", "null", ";", "try", "{", "getConnection", "(", ")", ";", "s", "=", "conn", ".", "createS...
Executes a native query. @param query The query to execute. @return The number of rows updated. @throws DatabaseEngineException If something goes wrong executing the native query.
[ "Executes", "a", "native", "query", "." ]
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/engine/AbstractDatabaseEngine.java#L816-L834
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java
TitlePaneIconifyButtonPainter.paintBackgroundHover
private void paintBackgroundHover(Graphics2D g, JComponent c, int width, int height) { """ Paint the background mouse-over state. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component. """ ...
java
private void paintBackgroundHover(Graphics2D g, JComponent c, int width, int height) { paintBackground(g, c, width, height, hover); }
[ "private", "void", "paintBackgroundHover", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "paintBackground", "(", "g", ",", "c", ",", "width", ",", "height", ",", "hover", ")", ";", "}" ]
Paint the background mouse-over state. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component.
[ "Paint", "the", "background", "mouse", "-", "over", "state", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java#L147-L149
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java
MapIterate.reverseMapping
public static <K, V> MutableMap<V, K> reverseMapping(Map<K, V> map) { """ Return a new map swapping key-value for value-key. If the original map contains entries with the same value, the result mapping is undefined, in that the last entry applied wins (the order of application is undefined). """ fina...
java
public static <K, V> MutableMap<V, K> reverseMapping(Map<K, V> map) { final MutableMap<V, K> reverseMap = UnifiedMap.newMap(map.size()); MapIterate.forEachKeyValue(map, new Procedure2<K, V>() { public void value(K sourceKey, V sourceValue) { reverseMap...
[ "public", "static", "<", "K", ",", "V", ">", "MutableMap", "<", "V", ",", "K", ">", "reverseMapping", "(", "Map", "<", "K", ",", "V", ">", "map", ")", "{", "final", "MutableMap", "<", "V", ",", "K", ">", "reverseMap", "=", "UnifiedMap", ".", "new...
Return a new map swapping key-value for value-key. If the original map contains entries with the same value, the result mapping is undefined, in that the last entry applied wins (the order of application is undefined).
[ "Return", "a", "new", "map", "swapping", "key", "-", "value", "for", "value", "-", "key", ".", "If", "the", "original", "map", "contains", "entries", "with", "the", "same", "value", "the", "result", "mapping", "is", "undefined", "in", "that", "the", "las...
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java#L1006-L1017
actframework/actframework
src/main/java/act/internal/util/AppDescriptor.java
AppDescriptor.of
public static AppDescriptor of(String appName, Class<?> entryClass, Version appVersion) { """ Create an `AppDescriptor` with appName, entry class and app version. If `appName` is `null` or blank, it will try the following approach to get app name: 1. check the {@link Version#getArtifactId() artifact id} and...
java
public static AppDescriptor of(String appName, Class<?> entryClass, Version appVersion) { return new AppDescriptor(ensureAppName(appName, entryClass, $.requireNotNull(appVersion)), JavaNames.packageNameOf(entryClass), appVersion); }
[ "public", "static", "AppDescriptor", "of", "(", "String", "appName", ",", "Class", "<", "?", ">", "entryClass", ",", "Version", "appVersion", ")", "{", "return", "new", "AppDescriptor", "(", "ensureAppName", "(", "appName", ",", "entryClass", ",", "$", ".", ...
Create an `AppDescriptor` with appName, entry class and app version. If `appName` is `null` or blank, it will try the following approach to get app name: 1. check the {@link Version#getArtifactId() artifact id} and use it unless 2. if artifact id is null or empty, then infer app name using {@link AppNameInferer} @pa...
[ "Create", "an", "AppDescriptor", "with", "appName", "entry", "class", "and", "app", "version", "." ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/internal/util/AppDescriptor.java#L174-L178
Azure/autorest-clientruntime-for-java
client-runtime/src/main/java/com/microsoft/rest/serializer/FlatteningDeserializer.java
FlatteningDeserializer.findNestedNode
private static JsonNode findNestedNode(JsonNode jsonNode, String composedKey) { """ Given a json node, find a nested node using given composed key. @param jsonNode the parent json node @param composedKey a key combines multiple keys using flattening dots. Flattening dots are dot character '.' those are not pr...
java
private static JsonNode findNestedNode(JsonNode jsonNode, String composedKey) { String[] jsonNodeKeys = splitKeyByFlatteningDots(composedKey); for (String jsonNodeKey : jsonNodeKeys) { jsonNode = jsonNode.get(unescapeEscapedDots(jsonNodeKey)); if (jsonNode == null) { ...
[ "private", "static", "JsonNode", "findNestedNode", "(", "JsonNode", "jsonNode", ",", "String", "composedKey", ")", "{", "String", "[", "]", "jsonNodeKeys", "=", "splitKeyByFlatteningDots", "(", "composedKey", ")", ";", "for", "(", "String", "jsonNodeKey", ":", "...
Given a json node, find a nested node using given composed key. @param jsonNode the parent json node @param composedKey a key combines multiple keys using flattening dots. Flattening dots are dot character '.' those are not preceded by slash '\' Each flattening dot represents a level with following key as field key in...
[ "Given", "a", "json", "node", "find", "a", "nested", "node", "using", "given", "composed", "key", "." ]
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/client-runtime/src/main/java/com/microsoft/rest/serializer/FlatteningDeserializer.java#L168-L177
rubensousa/RecyclerViewSnap
gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravityDelegate.java
GravityDelegate.findEdgeView
@Nullable private View findEdgeView(LinearLayoutManager lm, OrientationHelper helper, boolean start) { """ Returns the first view that we should snap to. @param lm the recyclerview's layout manager @param helper orientation helper to calculate view sizes @return the first view in the LayoutManager to ...
java
@Nullable private View findEdgeView(LinearLayoutManager lm, OrientationHelper helper, boolean start) { if (lm.getChildCount() == 0) { return null; } // If we're at the end of the list, we shouldn't snap // to avoid having the last item not completely visible. if ...
[ "@", "Nullable", "private", "View", "findEdgeView", "(", "LinearLayoutManager", "lm", ",", "OrientationHelper", "helper", ",", "boolean", "start", ")", "{", "if", "(", "lm", ".", "getChildCount", "(", ")", "==", "0", ")", "{", "return", "null", ";", "}", ...
Returns the first view that we should snap to. @param lm the recyclerview's layout manager @param helper orientation helper to calculate view sizes @return the first view in the LayoutManager to snap to
[ "Returns", "the", "first", "view", "that", "we", "should", "snap", "to", "." ]
train
https://github.com/rubensousa/RecyclerViewSnap/blob/94686150f06bf8ad2b083a9b421a693ce3134656/gravitysnaphelper/src/main/java/com/github/rubensousa/gravitysnaphelper/GravityDelegate.java#L227-L257
alkacon/opencms-core
src/org/opencms/db/CmsUserSettings.java
CmsUserSettings.setAdditionalPreference
public void setAdditionalPreference(String name, String value) { """ Sets an additional preference value.<p> @param name the additional preference name @param value the preference value """ if (value == null) { m_additionalPreferences.remove(name); } else { m_additi...
java
public void setAdditionalPreference(String name, String value) { if (value == null) { m_additionalPreferences.remove(name); } else { m_additionalPreferences.put(name, value); } }
[ "public", "void", "setAdditionalPreference", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "m_additionalPreferences", ".", "remove", "(", "name", ")", ";", "}", "else", "{", "m_additionalPreferences", "....
Sets an additional preference value.<p> @param name the additional preference name @param value the preference value
[ "Sets", "an", "additional", "preference", "value", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsUserSettings.java#L1740-L1747
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java
SparkComputationGraph.evaluateROCMultiClass
public <T extends ROCMultiClass> T evaluateROCMultiClass(JavaRDD<DataSet> data) { """ Perform ROC analysis/evaluation (for the multi-class case, using {@link ROCMultiClass} on the given DataSet in a distributed manner @param data Test set data (to evaluate on) @return ROC for the entire data...
java
public <T extends ROCMultiClass> T evaluateROCMultiClass(JavaRDD<DataSet> data) { return evaluateROCMultiClass(data, DEFAULT_ROC_THRESHOLD_STEPS, DEFAULT_EVAL_SCORE_BATCH_SIZE); }
[ "public", "<", "T", "extends", "ROCMultiClass", ">", "T", "evaluateROCMultiClass", "(", "JavaRDD", "<", "DataSet", ">", "data", ")", "{", "return", "evaluateROCMultiClass", "(", "data", ",", "DEFAULT_ROC_THRESHOLD_STEPS", ",", "DEFAULT_EVAL_SCORE_BATCH_SIZE", ")", "...
Perform ROC analysis/evaluation (for the multi-class case, using {@link ROCMultiClass} on the given DataSet in a distributed manner @param data Test set data (to evaluate on) @return ROC for the entire data set
[ "Perform", "ROC", "analysis", "/", "evaluation", "(", "for", "the", "multi", "-", "class", "case", "using", "{", "@link", "ROCMultiClass", "}", "on", "the", "given", "DataSet", "in", "a", "distributed", "manner" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/impl/graph/SparkComputationGraph.java#L685-L687
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
Infer.reportBoundError
void reportBoundError(UndetVar uv, InferenceBound ib) { """ Incorporation error: mismatch between two (or more) bounds of same kind. """ reportInferenceError( String.format("incompatible.%s.bounds", StringUtils.toLowerCase(ib.name())), uv.qtype, uv.getBou...
java
void reportBoundError(UndetVar uv, InferenceBound ib) { reportInferenceError( String.format("incompatible.%s.bounds", StringUtils.toLowerCase(ib.name())), uv.qtype, uv.getBounds(ib)); }
[ "void", "reportBoundError", "(", "UndetVar", "uv", ",", "InferenceBound", "ib", ")", "{", "reportInferenceError", "(", "String", ".", "format", "(", "\"incompatible.%s.bounds\"", ",", "StringUtils", ".", "toLowerCase", "(", "ib", ".", "name", "(", ")", ")", ")...
Incorporation error: mismatch between two (or more) bounds of same kind.
[ "Incorporation", "error", ":", "mismatch", "between", "two", "(", "or", "more", ")", "bounds", "of", "same", "kind", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java#L1280-L1285
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java
AssertKripton.failIncompatibleAttributesInAnnotationException
public static void failIncompatibleAttributesInAnnotationException(String messageFormat, Object... args) { """ Fail incompatible attributes in annotation exception. @param messageFormat the message format @param args the args """ throw (new IncompatibleAttributesInAnnotationException(String.format(mess...
java
public static void failIncompatibleAttributesInAnnotationException(String messageFormat, Object... args) { throw (new IncompatibleAttributesInAnnotationException(String.format(messageFormat, args))); }
[ "public", "static", "void", "failIncompatibleAttributesInAnnotationException", "(", "String", "messageFormat", ",", "Object", "...", "args", ")", "{", "throw", "(", "new", "IncompatibleAttributesInAnnotationException", "(", "String", ".", "format", "(", "messageFormat", ...
Fail incompatible attributes in annotation exception. @param messageFormat the message format @param args the args
[ "Fail", "incompatible", "attributes", "in", "annotation", "exception", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/AssertKripton.java#L156-L158
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.createKeyAsync
public ServiceFuture<KeyBundle> createKeyAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty, final ServiceCallback<KeyBundle> serviceCallback) { """ Creates a new key, stores it, then returns key parameters and attributes to the client. The create key operation can be used to create any key type in Azu...
java
public ServiceFuture<KeyBundle> createKeyAsync(String vaultBaseUrl, String keyName, JsonWebKeyType kty, final ServiceCallback<KeyBundle> serviceCallback) { return ServiceFuture.fromResponse(createKeyWithServiceResponseAsync(vaultBaseUrl, keyName, kty), serviceCallback); }
[ "public", "ServiceFuture", "<", "KeyBundle", ">", "createKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "JsonWebKeyType", "kty", ",", "final", "ServiceCallback", "<", "KeyBundle", ">", "serviceCallback", ")", "{", "return", "ServiceFuture",...
Creates a new key, stores it, then returns key parameters and attributes to the client. The create key operation can be used to create any key type in Azure Key Vault. If the named key already exists, Azure Key Vault creates a new version of the key. It requires the keys/create permission. @param vaultBaseUrl The vaul...
[ "Creates", "a", "new", "key", "stores", "it", "then", "returns", "key", "parameters", "and", "attributes", "to", "the", "client", ".", "The", "create", "key", "operation", "can", "be", "used", "to", "create", "any", "key", "type", "in", "Azure", "Key", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L666-L668
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setStorageAccount
public StorageBundle setStorageAccount(String vaultBaseUrl, String storageAccountName, String resourceId, String activeKeyName, boolean autoRegenerateKey, String regenerationPeriod, StorageAccountAttributes storageAccountAttributes, Map<String, String> tags) { """ Creates or updates a new storage account. This ope...
java
public StorageBundle setStorageAccount(String vaultBaseUrl, String storageAccountName, String resourceId, String activeKeyName, boolean autoRegenerateKey, String regenerationPeriod, StorageAccountAttributes storageAccountAttributes, Map<String, String> tags) { return setStorageAccountWithServiceResponseAsync(va...
[ "public", "StorageBundle", "setStorageAccount", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "String", "resourceId", ",", "String", "activeKeyName", ",", "boolean", "autoRegenerateKey", ",", "String", "regenerationPeriod", ",", "StorageAccountA...
Creates or updates a new storage account. This operation requires the storage/set permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param resourceId Storage account resource id. @param activeKeyName Current active st...
[ "Creates", "or", "updates", "a", "new", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "set", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L9976-L9978
gallandarakhneorg/afc
core/maths/mathgeom/tobeincluded/src/d3/continuous/AlignedBox3f.java
AlignedBox3f.set
@Override public void set(double x, double y, double z, double sizex, double sizey, double sizez) { """ Change the frame of the box. @param x @param y @param z @param sizex @param sizey @param sizez """ setFromCorners(x, y, z, x+sizex, y+sizey, z+sizez); }
java
@Override public void set(double x, double y, double z, double sizex, double sizey, double sizez) { setFromCorners(x, y, z, x+sizex, y+sizey, z+sizez); }
[ "@", "Override", "public", "void", "set", "(", "double", "x", ",", "double", "y", ",", "double", "z", ",", "double", "sizex", ",", "double", "sizey", ",", "double", "sizez", ")", "{", "setFromCorners", "(", "x", ",", "y", ",", "z", ",", "x", "+", ...
Change the frame of the box. @param x @param y @param z @param sizex @param sizey @param sizez
[ "Change", "the", "frame", "of", "the", "box", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/tobeincluded/src/d3/continuous/AlignedBox3f.java#L235-L238
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWrite.java
GeoJsonWrite.writeGeoJson
public static void writeGeoJson(Connection connection, String fileName, String tableReference, String encoding) throws IOException, SQLException { """ Write the GeoJSON file. @param connection @param fileName @param tableReference @param encoding @throws IOException @throws SQLException """ Geo...
java
public static void writeGeoJson(Connection connection, String fileName, String tableReference, String encoding) throws IOException, SQLException { GeoJsonDriverFunction geoJsonDriver = new GeoJsonDriverFunction(); geoJsonDriver.exportTable(connection,tableReference, URIUtilities.fileFromString(fileName)...
[ "public", "static", "void", "writeGeoJson", "(", "Connection", "connection", ",", "String", "fileName", ",", "String", "tableReference", ",", "String", "encoding", ")", "throws", "IOException", ",", "SQLException", "{", "GeoJsonDriverFunction", "geoJsonDriver", "=", ...
Write the GeoJSON file. @param connection @param fileName @param tableReference @param encoding @throws IOException @throws SQLException
[ "Write", "the", "GeoJSON", "file", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/GeoJsonWrite.java#L59-L62
jbossas/jboss-invocation
src/main/java/org/jboss/invocation/proxy/AbstractSubclassFactory.java
AbstractSubclassFactory.overrideFinalize
protected boolean overrideFinalize(MethodBodyCreator creator) { """ Override the finalize method using the given {@link MethodBodyCreator}. @param creator the method body creator to use """ Method finalize = null; final ClassMetadataSource data = reflectionMetadataSource.getClassMetadata(Obj...
java
protected boolean overrideFinalize(MethodBodyCreator creator) { Method finalize = null; final ClassMetadataSource data = reflectionMetadataSource.getClassMetadata(Object.class); try { finalize = data.getMethod("finalize", void.class); } catch (Exception e) { throw...
[ "protected", "boolean", "overrideFinalize", "(", "MethodBodyCreator", "creator", ")", "{", "Method", "finalize", "=", "null", ";", "final", "ClassMetadataSource", "data", "=", "reflectionMetadataSource", ".", "getClassMetadata", "(", "Object", ".", "class", ")", ";"...
Override the finalize method using the given {@link MethodBodyCreator}. @param creator the method body creator to use
[ "Override", "the", "finalize", "method", "using", "the", "given", "{", "@link", "MethodBodyCreator", "}", "." ]
train
https://github.com/jbossas/jboss-invocation/blob/f72586a554264cbc78fcdad9fdd3e84b833249c9/src/main/java/org/jboss/invocation/proxy/AbstractSubclassFactory.java#L324-L333
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/handlers/FileStatusHostStatusHandler.java
FileStatusHostStatusHandler.taskHosts
private void taskHosts(RESTRequest request, RESTResponse response) { """ Returns a JSON array of {hostName, status, } tuple, representing the host names associated with that task (no particular order). [ {"hostName" : "host", "hostStatus" : "status", "hostURL" : "url"}* ] """ String taskID = RESTHel...
java
private void taskHosts(RESTRequest request, RESTResponse response) { String taskID = RESTHelper.getRequiredParam(request, APIConstants.PARAM_TASK_ID); String taskHostsJson = getMultipleRoutingHelper().getHosts(taskID); OutputHelper.writeJsonOutput(response, taskHostsJson); }
[ "private", "void", "taskHosts", "(", "RESTRequest", "request", ",", "RESTResponse", "response", ")", "{", "String", "taskID", "=", "RESTHelper", ".", "getRequiredParam", "(", "request", ",", "APIConstants", ".", "PARAM_TASK_ID", ")", ";", "String", "taskHostsJson"...
Returns a JSON array of {hostName, status, } tuple, representing the host names associated with that task (no particular order). [ {"hostName" : "host", "hostStatus" : "status", "hostURL" : "url"}* ]
[ "Returns", "a", "JSON", "array", "of", "{", "hostName", "status", "}", "tuple", "representing", "the", "host", "names", "associated", "with", "that", "task", "(", "no", "particular", "order", ")", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/handlers/FileStatusHostStatusHandler.java#L87-L92
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java
StyleUtils.createMarkerOptions
public static MarkerOptions createMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) { """ Create new marker options populated with the feature row style (icon or style) @param geoPackage GeoPackage @param featureRow feature row @param density display density: {@link android.util.Di...
java
public static MarkerOptions createMarkerOptions(GeoPackage geoPackage, FeatureRow featureRow, float density) { return createMarkerOptions(geoPackage, featureRow, density, null); }
[ "public", "static", "MarkerOptions", "createMarkerOptions", "(", "GeoPackage", "geoPackage", ",", "FeatureRow", "featureRow", ",", "float", "density", ")", "{", "return", "createMarkerOptions", "(", "geoPackage", ",", "featureRow", ",", "density", ",", "null", ")", ...
Create new marker options populated with the feature row style (icon or style) @param geoPackage GeoPackage @param featureRow feature row @param density display density: {@link android.util.DisplayMetrics#density} @return marker options populated with the feature style
[ "Create", "new", "marker", "options", "populated", "with", "the", "feature", "row", "style", "(", "icon", "or", "style", ")" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleUtils.java#L35-L37
pravega/pravega
controller/src/main/java/io/pravega/controller/metrics/TransactionMetrics.java
TransactionMetrics.abortTransaction
public void abortTransaction(String scope, String streamName, Duration latency) { """ This method increments the global and Stream-related counters of aborted Transactions and reports the latency of the operation. @param scope Scope. @param streamName Name of the Stream. @param latency Latency of the...
java
public void abortTransaction(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(ABORT_TRANSACTION), 1); DYNAMIC_LOGGER.incCounterValue(ABORT_TRANSACTION, 1, streamTags(scope, streamName)); abortTransactionLatency.reportSuccessValue(latency.toMill...
[ "public", "void", "abortTransaction", "(", "String", "scope", ",", "String", "streamName", ",", "Duration", "latency", ")", "{", "DYNAMIC_LOGGER", ".", "incCounterValue", "(", "globalMetricName", "(", "ABORT_TRANSACTION", ")", ",", "1", ")", ";", "DYNAMIC_LOGGER",...
This method increments the global and Stream-related counters of aborted Transactions and reports the latency of the operation. @param scope Scope. @param streamName Name of the Stream. @param latency Latency of the abort Transaction operation.
[ "This", "method", "increments", "the", "global", "and", "Stream", "-", "related", "counters", "of", "aborted", "Transactions", "and", "reports", "the", "latency", "of", "the", "operation", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/metrics/TransactionMetrics.java#L98-L102
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/Days.java
Days.ofWeeks
public static Days ofWeeks(int weeks) { """ Obtains a {@code Days} representing the number of days equivalent to a number of weeks. <p> The resulting amount will be day-based, with the number of days equal to the number of weeks multiplied by 7. @param weeks the number of weeks, positive or negative @retu...
java
public static Days ofWeeks(int weeks) { if (weeks == 0) { return ZERO; } return new Days(Math.multiplyExact(weeks, DAYS_PER_WEEK)); }
[ "public", "static", "Days", "ofWeeks", "(", "int", "weeks", ")", "{", "if", "(", "weeks", "==", "0", ")", "{", "return", "ZERO", ";", "}", "return", "new", "Days", "(", "Math", ".", "multiplyExact", "(", "weeks", ",", "DAYS_PER_WEEK", ")", ")", ";", ...
Obtains a {@code Days} representing the number of days equivalent to a number of weeks. <p> The resulting amount will be day-based, with the number of days equal to the number of weeks multiplied by 7. @param weeks the number of weeks, positive or negative @return the amount with the input weeks converted to days, no...
[ "Obtains", "a", "{", "@code", "Days", "}", "representing", "the", "number", "of", "days", "equivalent", "to", "a", "number", "of", "weeks", ".", "<p", ">", "The", "resulting", "amount", "will", "be", "day", "-", "based", "with", "the", "number", "of", ...
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/Days.java#L129-L134
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.isPublicField
public static boolean isPublicField(Object obj, String name) { """ Work out if the specified object has a public field with the name supplied. @param obj @param name @return true if a public field with the name exists """ Class<?> clazz = obj.getClass(); try { Field f = clazz.g...
java
public static boolean isPublicField(Object obj, String name) { Class<?> clazz = obj.getClass(); try { Field f = clazz.getDeclaredField(name); return Modifier.isPublic(f.getModifiers()); } catch (NoSuchFieldException e) { return false; } }
[ "public", "static", "boolean", "isPublicField", "(", "Object", "obj", ",", "String", "name", ")", "{", "Class", "<", "?", ">", "clazz", "=", "obj", ".", "getClass", "(", ")", ";", "try", "{", "Field", "f", "=", "clazz", ".", "getDeclaredField", "(", ...
Work out if the specified object has a public field with the name supplied. @param obj @param name @return true if a public field with the name exists
[ "Work", "out", "if", "the", "specified", "object", "has", "a", "public", "field", "with", "the", "name", "supplied", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L673-L682
voldemort/voldemort
src/java/voldemort/client/rebalance/RebalanceScheduler.java
RebalanceScheduler.doneTask
public synchronized void doneTask(int stealerId, int donorId) { """ Method must be invoked upon completion of a rebalancing task. It is the task's responsibility to do so. @param stealerId @param donorId """ removeNodesFromWorkerList(Arrays.asList(stealerId, donorId)); numTasksExecuting--;...
java
public synchronized void doneTask(int stealerId, int donorId) { removeNodesFromWorkerList(Arrays.asList(stealerId, donorId)); numTasksExecuting--; doneSignal.countDown(); // Try and schedule more tasks now that resources may be available to do // so. scheduleMoreTasks(); ...
[ "public", "synchronized", "void", "doneTask", "(", "int", "stealerId", ",", "int", "donorId", ")", "{", "removeNodesFromWorkerList", "(", "Arrays", ".", "asList", "(", "stealerId", ",", "donorId", ")", ")", ";", "numTasksExecuting", "--", ";", "doneSignal", "....
Method must be invoked upon completion of a rebalancing task. It is the task's responsibility to do so. @param stealerId @param donorId
[ "Method", "must", "be", "invoked", "upon", "completion", "of", "a", "rebalancing", "task", ".", "It", "is", "the", "task", "s", "responsibility", "to", "do", "so", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/client/rebalance/RebalanceScheduler.java#L274-L281
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceCreator.java
V1InstanceCreator.regressionSuite
public RegressionSuite regressionSuite(String name, RegressionPlan regressionPlan) { """ Creates a new Regression Suite with title assigned with this Regression Plan. @param name Title of the suite. @param regressionPlan Regression Plan to assign. @return A newly minted Regression Suite that exists ...
java
public RegressionSuite regressionSuite(String name, RegressionPlan regressionPlan) { return regressionSuite(name, regressionPlan, null); }
[ "public", "RegressionSuite", "regressionSuite", "(", "String", "name", ",", "RegressionPlan", "regressionPlan", ")", "{", "return", "regressionSuite", "(", "name", ",", "regressionPlan", ",", "null", ")", ";", "}" ]
Creates a new Regression Suite with title assigned with this Regression Plan. @param name Title of the suite. @param regressionPlan Regression Plan to assign. @return A newly minted Regression Suite that exists in the VersionOne system.
[ "Creates", "a", "new", "Regression", "Suite", "with", "title", "assigned", "with", "this", "Regression", "Plan", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L1112-L1114
CleverTap/clevertap-android-sdk
clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java
CleverTapAPI.showAppInbox
@SuppressWarnings( { """ Opens {@link CTInboxActivity} to display Inbox Messages @param styleConfig {@link CTInboxStyleConfig} configuration of various style parameters for the {@link CTInboxActivity} """"unused", "WeakerAccess"}) public void showAppInbox(CTInboxStyleConfig styleConfig){ sync...
java
@SuppressWarnings({"unused", "WeakerAccess"}) public void showAppInbox(CTInboxStyleConfig styleConfig){ synchronized (inboxControllerLock) { if (ctInboxController == null) { getConfigLogger().debug(getAccountId(), "Notification Inbox not initialized"); ...
[ "@", "SuppressWarnings", "(", "{", "\"unused\"", ",", "\"WeakerAccess\"", "}", ")", "public", "void", "showAppInbox", "(", "CTInboxStyleConfig", "styleConfig", ")", "{", "synchronized", "(", "inboxControllerLock", ")", "{", "if", "(", "ctInboxController", "==", "n...
Opens {@link CTInboxActivity} to display Inbox Messages @param styleConfig {@link CTInboxStyleConfig} configuration of various style parameters for the {@link CTInboxActivity}
[ "Opens", "{" ]
train
https://github.com/CleverTap/clevertap-android-sdk/blob/be134c06a4f07494c398335ad9ff4976633743e1/clevertap-android-sdk/src/main/java/com/clevertap/android/sdk/CleverTapAPI.java#L6326-L6355
actorapp/actor-platform
actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/Actor.java
Actor.initActor
public final void initActor(String path, ActorContext context, Mailbox mailbox) { """ <p>INTERNAL API</p> Initialization of actor @param path path of actor @param context context of actor @param mailbox mailbox of actor """ this.path = path; this.context = context; this.mailbox...
java
public final void initActor(String path, ActorContext context, Mailbox mailbox) { this.path = path; this.context = context; this.mailbox = mailbox; }
[ "public", "final", "void", "initActor", "(", "String", "path", ",", "ActorContext", "context", ",", "Mailbox", "mailbox", ")", "{", "this", ".", "path", "=", "path", ";", "this", ".", "context", "=", "context", ";", "this", ".", "mailbox", "=", "mailbox"...
<p>INTERNAL API</p> Initialization of actor @param path path of actor @param context context of actor @param mailbox mailbox of actor
[ "<p", ">", "INTERNAL", "API<", "/", "p", ">", "Initialization", "of", "actor" ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-sdk/sdk-core/runtime/runtime-shared/src/main/java/im/actor/runtime/actors/Actor.java#L51-L55
phax/ph-web
ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java
HttpClientFactory.setProxy
public final void setProxy (@Nullable final HttpHost aProxy, @Nullable final Credentials aProxyCredentials) { """ Set proxy host and proxy credentials. @param aProxy The proxy host to be used. May be <code>null</code>. @param aProxyCredentials The proxy server credentials to be used. May be <code>null</code>...
java
public final void setProxy (@Nullable final HttpHost aProxy, @Nullable final Credentials aProxyCredentials) { m_aProxy = aProxy; m_aProxyCredentials = aProxyCredentials; }
[ "public", "final", "void", "setProxy", "(", "@", "Nullable", "final", "HttpHost", "aProxy", ",", "@", "Nullable", "final", "Credentials", "aProxyCredentials", ")", "{", "m_aProxy", "=", "aProxy", ";", "m_aProxyCredentials", "=", "aProxyCredentials", ";", "}" ]
Set proxy host and proxy credentials. @param aProxy The proxy host to be used. May be <code>null</code>. @param aProxyCredentials The proxy server credentials to be used. May be <code>null</code>. They are only used if a proxy host is present! Usually they are of type {@link org.apache.http.auth.UsernamePasswordCreden...
[ "Set", "proxy", "host", "and", "proxy", "credentials", "." ]
train
https://github.com/phax/ph-web/blob/d445fd25184605b62682c93c9782409acf0ae813/ph-httpclient/src/main/java/com/helger/httpclient/HttpClientFactory.java#L350-L354
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java
CommsByteBuffer.putMessage
public synchronized int putMessage(JsMessage message, CommsConnection commsConnection, Conversation conversation) throws MessageCopyFailedException, IncorrectMessageTypeException, MessageEncodeFailedException, UnsupportedEncodingException, SIConnectionDroppedExc...
java
public synchronized int putMessage(JsMessage message, CommsConnection commsConnection, Conversation conversation) throws MessageCopyFailedException, IncorrectMessageTypeException, MessageEncodeFailedException, UnsupportedEncodingException, SIConnectionDroppedExc...
[ "public", "synchronized", "int", "putMessage", "(", "JsMessage", "message", ",", "CommsConnection", "commsConnection", ",", "Conversation", "conversation", ")", "throws", "MessageCopyFailedException", ",", "IncorrectMessageTypeException", ",", "MessageEncodeFailedException", ...
Puts a message into the byte buffer using the <code>encodeFast()</code> method of encoding messages. This method takes account of any <i>capabilities</i> negotiated at the point the connection was established. <p>This method is used for putting an entire message into the buffer. There are more efficient ways of doing t...
[ "Puts", "a", "message", "into", "the", "byte", "buffer", "using", "the", "<code", ">", "encodeFast", "()", "<", "/", "code", ">", "method", "of", "encoding", "messages", ".", "This", "method", "takes", "account", "of", "any", "<i", ">", "capabilities<", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsByteBuffer.java#L429-L443
navnorth/LRJavaLib
src/com/navnorth/learningregistry/LRActivity.java
LRActivity.addVerb
public boolean addVerb(String action, Date dateStart, Date dateEnd, String[] description, String comment) { """ Add a verb object to this activity @param action The action type of the verb (required) @param dateStart The start date of the action described @param dateEnd The end date of the action described @...
java
public boolean addVerb(String action, Date dateStart, Date dateEnd, String[] description, String comment) { Map<String, Object> container = new HashMap<String, Object>(); if (action != null) { container.put("action", action); } else { ...
[ "public", "boolean", "addVerb", "(", "String", "action", ",", "Date", "dateStart", ",", "Date", "dateEnd", ",", "String", "[", "]", "description", ",", "String", "comment", ")", "{", "Map", "<", "String", ",", "Object", ">", "container", "=", "new", "Has...
Add a verb object to this activity @param action The action type of the verb (required) @param dateStart The start date of the action described @param dateEnd The end date of the action described @param description An array of descriptions of this action @param comment A comment on this verb @return True if added, fal...
[ "Add", "a", "verb", "object", "to", "this", "activity" ]
train
https://github.com/navnorth/LRJavaLib/blob/27af28b9f80d772273592414e7d0dccffaac09e1/src/com/navnorth/learningregistry/LRActivity.java#L298-L328
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newPlacesSearchRequest
public static Request newPlacesSearchRequest(Session session, Location location, int radiusInMeters, int resultsLimit, String searchText, final GraphPlaceListCallback callback) { """ Creates a new Request that is configured to perform a search for places near a specified location via the Graph API. At...
java
public static Request newPlacesSearchRequest(Session session, Location location, int radiusInMeters, int resultsLimit, String searchText, final GraphPlaceListCallback callback) { if (location == null && Utility.isNullOrEmpty(searchText)) { throw new FacebookException("Either location or ...
[ "public", "static", "Request", "newPlacesSearchRequest", "(", "Session", "session", ",", "Location", "location", ",", "int", "radiusInMeters", ",", "int", "resultsLimit", ",", "String", "searchText", ",", "final", "GraphPlaceListCallback", "callback", ")", "{", "if"...
Creates a new Request that is configured to perform a search for places near a specified location via the Graph API. At least one of location or searchText must be specified. @param session the Session to use, or null; if non-null, the session must be in an opened state @param location the location around which to sea...
[ "Creates", "a", "new", "Request", "that", "is", "configured", "to", "perform", "a", "search", "for", "places", "near", "a", "specified", "location", "via", "the", "Graph", "API", ".", "At", "least", "one", "of", "location", "or", "searchText", "must", "be"...
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L399-L427
alkacon/opencms-core
src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java
CmsJSONSearchConfigurationParser.parseFacetQueryItem
protected I_CmsFacetQueryItem parseFacetQueryItem(JSONObject item) { """ Parses a single query item for the query facet. @param item JSON object of the query item. @return the parsed query item, or <code>null</code> if parsing failed. """ String query; try { query = item.getStrin...
java
protected I_CmsFacetQueryItem parseFacetQueryItem(JSONObject item) { String query; try { query = item.getString(JSON_KEY_QUERY_FACET_QUERY_QUERY); } catch (JSONException e) { // TODO: Log return null; } String label = parseOptionalStringValue(...
[ "protected", "I_CmsFacetQueryItem", "parseFacetQueryItem", "(", "JSONObject", "item", ")", "{", "String", "query", ";", "try", "{", "query", "=", "item", ".", "getString", "(", "JSON_KEY_QUERY_FACET_QUERY_QUERY", ")", ";", "}", "catch", "(", "JSONException", "e", ...
Parses a single query item for the query facet. @param item JSON object of the query item. @return the parsed query item, or <code>null</code> if parsing failed.
[ "Parses", "a", "single", "query", "item", "for", "the", "query", "facet", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/search/config/parser/CmsJSONSearchConfigurationParser.java#L829-L840
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.translateArrayAssign
private Context translateArrayAssign(WyilFile.Expr.ArrayAccess lval, Expr rval, Context context) { """ Translate an assignment to an array element. @param lval The array assignment expression @param result The value being assigned to the given array element @param context The enclosing context @return ...
java
private Context translateArrayAssign(WyilFile.Expr.ArrayAccess lval, Expr rval, Context context) { // Translate src and index expressions Pair<Expr, Context> p1 = translateExpressionWithChecks(lval.getFirstOperand(), null, context); Pair<Expr, Context> p2 = translateExpressionWithChecks(lval.getSecondOperand(), n...
[ "private", "Context", "translateArrayAssign", "(", "WyilFile", ".", "Expr", ".", "ArrayAccess", "lval", ",", "Expr", "rval", ",", "Context", "context", ")", "{", "// Translate src and index expressions", "Pair", "<", "Expr", ",", "Context", ">", "p1", "=", "tran...
Translate an assignment to an array element. @param lval The array assignment expression @param result The value being assigned to the given array element @param context The enclosing context @return
[ "Translate", "an", "assignment", "to", "an", "array", "element", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L642-L653
igniterealtime/Smack
smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/IoTDataManager.java
IoTDataManager.requestMomentaryValuesReadOut
public List<IoTFieldsExtension> requestMomentaryValuesReadOut(EntityFullJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { """ Try to read out a things momentary values. @param jid the full JID of the thing to read data from. @return a lis...
java
public List<IoTFieldsExtension> requestMomentaryValuesReadOut(EntityFullJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { final XMPPConnection connection = connection(); final int seqNr = nextSeqNr.incrementAndGet(); IoTDat...
[ "public", "List", "<", "IoTFieldsExtension", ">", "requestMomentaryValuesReadOut", "(", "EntityFullJid", "jid", ")", "throws", "NoResponseException", ",", "XMPPErrorException", ",", "NotConnectedException", ",", "InterruptedException", "{", "final", "XMPPConnection", "conne...
Try to read out a things momentary values. @param jid the full JID of the thing to read data from. @return a list with the read out data. @throws NoResponseException @throws XMPPErrorException @throws NotConnectedException @throws InterruptedException
[ "Try", "to", "read", "out", "a", "things", "momentary", "values", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/IoTDataManager.java#L172-L209
lucee/Lucee
core/src/main/java/lucee/runtime/schedule/StorageUtil.java
StorageUtil.toInt
public int toInt(Element el, String attributeName, int defaultValue) { """ reads a XML Element Attribute ans cast it to a int value @param el XML Element to read Attribute from it @param attributeName Name of the Attribute to read @param defaultValue if attribute doesn't exist return default value @return At...
java
public int toInt(Element el, String attributeName, int defaultValue) { String value = el.getAttribute(attributeName); if (value == null) return defaultValue; int intValue = Caster.toIntValue(value, Integer.MIN_VALUE); if (intValue == Integer.MIN_VALUE) return defaultValue; return intValue; }
[ "public", "int", "toInt", "(", "Element", "el", ",", "String", "attributeName", ",", "int", "defaultValue", ")", "{", "String", "value", "=", "el", ".", "getAttribute", "(", "attributeName", ")", ";", "if", "(", "value", "==", "null", ")", "return", "def...
reads a XML Element Attribute ans cast it to a int value @param el XML Element to read Attribute from it @param attributeName Name of the Attribute to read @param defaultValue if attribute doesn't exist return default value @return Attribute Value
[ "reads", "a", "XML", "Element", "Attribute", "ans", "cast", "it", "to", "a", "int", "value" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/schedule/StorageUtil.java#L227-L233
Azure/azure-sdk-for-java
edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/RolesInner.java
RolesInner.createOrUpdateAsync
public Observable<RoleInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, RoleInner role) { """ Create or update a role. @param deviceName The device name. @param name The role name. @param resourceGroupName The resource group name. @param role The role properties. @throws I...
java
public Observable<RoleInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, RoleInner role) { return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, role).map(new Func1<ServiceResponse<RoleInner>, RoleInner>() { @Override public ...
[ "public", "Observable", "<", "RoleInner", ">", "createOrUpdateAsync", "(", "String", "deviceName", ",", "String", "name", ",", "String", "resourceGroupName", ",", "RoleInner", "role", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "deviceName", ","...
Create or update a role. @param deviceName The device name. @param name The role name. @param resourceGroupName The resource group name. @param role The role properties. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Create", "or", "update", "a", "role", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/RolesInner.java#L351-L358
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.listReadOnlyKeys
public DatabaseAccountListReadOnlyKeysResultInner listReadOnlyKeys(String resourceGroupName, String accountName) { """ Lists the read-only access keys for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name...
java
public DatabaseAccountListReadOnlyKeysResultInner listReadOnlyKeys(String resourceGroupName, String accountName) { return listReadOnlyKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body(); }
[ "public", "DatabaseAccountListReadOnlyKeysResultInner", "listReadOnlyKeys", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "listReadOnlyKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ")", ".", "toBlocking", ...
Lists the read-only access keys for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rej...
[ "Lists", "the", "read", "-", "only", "access", "keys", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1714-L1716
BlueBrain/bluima
modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java
ManualDescriptor.setKeywordList
public void setKeywordList(int i, Keyword v) { """ indexed setter for keywordList - sets an indexed value - A collection of objects of type uima.julielab.uima.Keyword, O @generated @param i index in the array to set @param v value to set into the array """ if (ManualDescriptor_Type.featOkTst && ((Manua...
java
public void setKeywordList(int i, Keyword v) { if (ManualDescriptor_Type.featOkTst && ((ManualDescriptor_Type)jcasType).casFeat_keywordList == null) jcasType.jcas.throwFeatMissing("keywordList", "de.julielab.jules.types.pubmed.ManualDescriptor"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefVa...
[ "public", "void", "setKeywordList", "(", "int", "i", ",", "Keyword", "v", ")", "{", "if", "(", "ManualDescriptor_Type", ".", "featOkTst", "&&", "(", "(", "ManualDescriptor_Type", ")", "jcasType", ")", ".", "casFeat_keywordList", "==", "null", ")", "jcasType", ...
indexed setter for keywordList - sets an indexed value - A collection of objects of type uima.julielab.uima.Keyword, O @generated @param i index in the array to set @param v value to set into the array
[ "indexed", "setter", "for", "keywordList", "-", "sets", "an", "indexed", "value", "-", "A", "collection", "of", "objects", "of", "type", "uima", ".", "julielab", ".", "uima", ".", "Keyword", "O" ]
train
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_typesystem/src/main/java/de/julielab/jules/types/pubmed/ManualDescriptor.java#L253-L257
micronaut-projects/micronaut-core
tracing/src/main/java/io/micronaut/tracing/brave/instrument/http/AbstractBraveTracingFilter.java
AbstractBraveTracingFilter.withSpanInScope
void withSpanInScope(HttpRequest<?> request, Span span) { """ Configures the request with the given Span. @param request The request @param span The span """ request.setAttribute(TraceRequestAttributes.CURRENT_SPAN, span); Tracer.SpanInScope spanInScope = httpTracing.tracing().tracer().with...
java
void withSpanInScope(HttpRequest<?> request, Span span) { request.setAttribute(TraceRequestAttributes.CURRENT_SPAN, span); Tracer.SpanInScope spanInScope = httpTracing.tracing().tracer().withSpanInScope(span); request.setAttribute(TraceRequestAttributes.CURRENT_SCOPE, spanInScope); }
[ "void", "withSpanInScope", "(", "HttpRequest", "<", "?", ">", "request", ",", "Span", "span", ")", "{", "request", ".", "setAttribute", "(", "TraceRequestAttributes", ".", "CURRENT_SPAN", ",", "span", ")", ";", "Tracer", ".", "SpanInScope", "spanInScope", "=",...
Configures the request with the given Span. @param request The request @param span The span
[ "Configures", "the", "request", "with", "the", "given", "Span", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/tracing/src/main/java/io/micronaut/tracing/brave/instrument/http/AbstractBraveTracingFilter.java#L53-L57
JodaOrg/joda-beans
src/main/java/org/joda/beans/gen/BeanData.java
BeanData.getTypeGenericExtends
public String getTypeGenericExtends(int typeParamIndex, String[] typeParamNames) { """ Gets the extends clause of the parameterisation of the bean, such as '{@code extends Foo}'. @param typeParamIndex the zero-based index of the type parameter @param typeParamNames the type parameter names @return the generi...
java
public String getTypeGenericExtends(int typeParamIndex, String[] typeParamNames) { String genericClause = typeGenericExtends[typeParamIndex]; genericClause = genericClause.replace("<" + typeGenericName[typeParamIndex] + ">", "<" + typeParamNames[typeParamIndex] + ">"); for (int i = 0; i < typeGe...
[ "public", "String", "getTypeGenericExtends", "(", "int", "typeParamIndex", ",", "String", "[", "]", "typeParamNames", ")", "{", "String", "genericClause", "=", "typeGenericExtends", "[", "typeParamIndex", "]", ";", "genericClause", "=", "genericClause", ".", "replac...
Gets the extends clause of the parameterisation of the bean, such as '{@code extends Foo}'. @param typeParamIndex the zero-based index of the type parameter @param typeParamNames the type parameter names @return the generic type extends clause, or a blank string if not generic or no extends, not null
[ "Gets", "the", "extends", "clause", "of", "the", "parameterisation", "of", "the", "bean", "such", "as", "{" ]
train
https://github.com/JodaOrg/joda-beans/blob/f07dbe42947150b23a173f35984c6ab33c5529bf/src/main/java/org/joda/beans/gen/BeanData.java#L913-L922
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/interfaces/NicInterfaceCriteria.java
NicInterfaceCriteria.isAcceptable
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { """ {@inheritDoc} @return <code>address</code> if the {@link #getAcceptableName() acceptable name} equals <code>networkInterface</code>'s {@link NetworkInterface#getName() name}. ...
java
@Override protected InetAddress isAcceptable(NetworkInterface networkInterface, InetAddress address) throws SocketException { if( name.equals(networkInterface.getName()) ) return address; return null; }
[ "@", "Override", "protected", "InetAddress", "isAcceptable", "(", "NetworkInterface", "networkInterface", ",", "InetAddress", "address", ")", "throws", "SocketException", "{", "if", "(", "name", ".", "equals", "(", "networkInterface", ".", "getName", "(", ")", ")"...
{@inheritDoc} @return <code>address</code> if the {@link #getAcceptableName() acceptable name} equals <code>networkInterface</code>'s {@link NetworkInterface#getName() name}.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/interfaces/NicInterfaceCriteria.java#L69-L75
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/csl/CitationIDIndexPair.java
CitationIDIndexPair.fromJson
public static CitationIDIndexPair fromJson(List<?> arr) { """ Converts a JSON array to a CitationIDIndexPair object. @param arr the JSON array to convert @return the converted CitationIDIndexPair object """ String citationId = (String)arr.get(0); int noteIndex = ((Number)arr.get(1)).intValue(); return ...
java
public static CitationIDIndexPair fromJson(List<?> arr) { String citationId = (String)arr.get(0); int noteIndex = ((Number)arr.get(1)).intValue(); return new CitationIDIndexPair(citationId, noteIndex); }
[ "public", "static", "CitationIDIndexPair", "fromJson", "(", "List", "<", "?", ">", "arr", ")", "{", "String", "citationId", "=", "(", "String", ")", "arr", ".", "get", "(", "0", ")", ";", "int", "noteIndex", "=", "(", "(", "Number", ")", "arr", ".", ...
Converts a JSON array to a CitationIDIndexPair object. @param arr the JSON array to convert @return the converted CitationIDIndexPair object
[ "Converts", "a", "JSON", "array", "to", "a", "CitationIDIndexPair", "object", "." ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/csl/CitationIDIndexPair.java#L74-L78
syphr42/prom
src/main/java/org/syphr/prom/PropertiesManager.java
PropertiesManager.setProperty
public void setProperty(T property, String value) throws IllegalArgumentException { """ Set the given property using a string. This will not write the new value to the file system. @see #saveProperty(Object, String) @param property the property whose value is being set @param value the value to set @thr...
java
public void setProperty(T property, String value) throws IllegalArgumentException { if (value == null) { throw new IllegalArgumentException("Cannot set a null value, use reset instead"); } String propertyName = getTranslator().getPropertyName(property); i...
[ "public", "void", "setProperty", "(", "T", "property", ",", "String", "value", ")", "throws", "IllegalArgumentException", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Cannot set a null value, use reset instead\""...
Set the given property using a string. This will not write the new value to the file system. @see #saveProperty(Object, String) @param property the property whose value is being set @param value the value to set @throws IllegalArgumentException if a <code>null</code> value is given (see {@link #resetProperty(Object)}...
[ "Set", "the", "given", "property", "using", "a", "string", ".", "This", "will", "not", "write", "the", "new", "value", "to", "the", "file", "system", "." ]
train
https://github.com/syphr42/prom/blob/074d67c4ebb3afb0b163fcb0bc4826ee577ac803/src/main/java/org/syphr/prom/PropertiesManager.java#L939-L951
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/vod/VodClient.java
VodClient.reTranscode
public ReTranscodeResponse reTranscode(ReTranscodeRequest request) { """ Transcode the media again. Only status is FAILED or PUBLISHED media can use. @param request The request object containing mediaid @return """ checkStringNotEmpty(request.getMediaId(), "Media ID should not be null or empty!");...
java
public ReTranscodeResponse reTranscode(ReTranscodeRequest request) { checkStringNotEmpty(request.getMediaId(), "Media ID should not be null or empty!"); InternalRequest internalRequest = createRequest(HttpMethodName.PUT, request, PATH_MEDIA, request.getMediaId()); internalReque...
[ "public", "ReTranscodeResponse", "reTranscode", "(", "ReTranscodeRequest", "request", ")", "{", "checkStringNotEmpty", "(", "request", ".", "getMediaId", "(", ")", ",", "\"Media ID should not be null or empty!\"", ")", ";", "InternalRequest", "internalRequest", "=", "crea...
Transcode the media again. Only status is FAILED or PUBLISHED media can use. @param request The request object containing mediaid @return
[ "Transcode", "the", "media", "again", ".", "Only", "status", "is", "FAILED", "or", "PUBLISHED", "media", "can", "use", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vod/VodClient.java#L887-L896
hdbeukel/james-extensions
src/main/java/org/jamesframework/ext/problems/objectives/evaluations/WeightedIndexEvaluation.java
WeightedIndexEvaluation.addEvaluation
public void addEvaluation(Objective obj, Evaluation eval, double weight) { """ Add an evaluation produced by an objective, specifying its weight. @param obj objective @param eval produced evaluation @param weight assigned weight """ evaluations.put(obj, eval); // update weighted sum ...
java
public void addEvaluation(Objective obj, Evaluation eval, double weight){ evaluations.put(obj, eval); // update weighted sum weightedSum += weight * eval.getValue(); }
[ "public", "void", "addEvaluation", "(", "Objective", "obj", ",", "Evaluation", "eval", ",", "double", "weight", ")", "{", "evaluations", ".", "put", "(", "obj", ",", "eval", ")", ";", "// update weighted sum", "weightedSum", "+=", "weight", "*", "eval", ".",...
Add an evaluation produced by an objective, specifying its weight. @param obj objective @param eval produced evaluation @param weight assigned weight
[ "Add", "an", "evaluation", "produced", "by", "an", "objective", "specifying", "its", "weight", "." ]
train
https://github.com/hdbeukel/james-extensions/blob/37a43aa6ac4d67575cabc7aed25fd96c91d4c7b2/src/main/java/org/jamesframework/ext/problems/objectives/evaluations/WeightedIndexEvaluation.java#L54-L58
sagiegurari/fax4j
src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java
ProcessFaxClientSpi.formatTemplate
protected String formatTemplate(String template,FaxJob faxJob) { """ This function formats the provided template. @param template The template @param faxJob The fax job object @return The formatted template """ return SpiUtil.formatTemplate(template,faxJob,null,false,true); }
java
protected String formatTemplate(String template,FaxJob faxJob) { return SpiUtil.formatTemplate(template,faxJob,null,false,true); }
[ "protected", "String", "formatTemplate", "(", "String", "template", ",", "FaxJob", "faxJob", ")", "{", "return", "SpiUtil", ".", "formatTemplate", "(", "template", ",", "faxJob", ",", "null", ",", "false", ",", "true", ")", ";", "}" ]
This function formats the provided template. @param template The template @param faxJob The fax job object @return The formatted template
[ "This", "function", "formats", "the", "provided", "template", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/process/ProcessFaxClientSpi.java#L509-L512
msteiger/jxmapviewer2
jxmapviewer2/src/main/java/org/jxmapviewer/util/ShapeUtils.java
ShapeUtils.generatePolygon
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius) { """ Generates a polygon @param sides number of sides @param outsideRadius the outside radius @param insideRadius the inside radius @return the generated shape """ if (sides < 3) { return new Ellipse2D....
java
public static Shape generatePolygon(int sides, int outsideRadius, int insideRadius) { if (sides < 3) { return new Ellipse2D.Float(0, 0, 10, 10); } AffineTransform trans = new AffineTransform(); Polygon poly = new Polygon(); for (int i = 0; i < sides; i++) { ...
[ "public", "static", "Shape", "generatePolygon", "(", "int", "sides", ",", "int", "outsideRadius", ",", "int", "insideRadius", ")", "{", "if", "(", "sides", "<", "3", ")", "{", "return", "new", "Ellipse2D", ".", "Float", "(", "0", ",", "0", ",", "10", ...
Generates a polygon @param sides number of sides @param outsideRadius the outside radius @param insideRadius the inside radius @return the generated shape
[ "Generates", "a", "polygon" ]
train
https://github.com/msteiger/jxmapviewer2/blob/82639273b0aac983b6026fb90aa925c0cf596410/jxmapviewer2/src/main/java/org/jxmapviewer/util/ShapeUtils.java#L85-L104
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/codec/TIFFDirectory.java
TIFFDirectory.getFieldAsDouble
public double getFieldAsDouble(int tag, int index) { """ Returns the value of a particular index of a given tag as a double. The caller is responsible for ensuring that the tag is present and has numeric type (all but TIFF_UNDEFINED and TIFF_ASCII). """ Integer i = (Integer)fieldIndex.get(Integer.v...
java
public double getFieldAsDouble(int tag, int index) { Integer i = (Integer)fieldIndex.get(Integer.valueOf(tag)); return fields[i.intValue()].getAsDouble(index); }
[ "public", "double", "getFieldAsDouble", "(", "int", "tag", ",", "int", "index", ")", "{", "Integer", "i", "=", "(", "Integer", ")", "fieldIndex", ".", "get", "(", "Integer", ".", "valueOf", "(", "tag", ")", ")", ";", "return", "fields", "[", "i", "."...
Returns the value of a particular index of a given tag as a double. The caller is responsible for ensuring that the tag is present and has numeric type (all but TIFF_UNDEFINED and TIFF_ASCII).
[ "Returns", "the", "value", "of", "a", "particular", "index", "of", "a", "given", "tag", "as", "a", "double", ".", "The", "caller", "is", "responsible", "for", "ensuring", "that", "the", "tag", "is", "present", "and", "has", "numeric", "type", "(", "all",...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/codec/TIFFDirectory.java#L509-L512
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/remote/AbstractRemoteConnector.java
AbstractRemoteConnector.parseResponse
private JsonParser parseResponse(Response response) throws IOException { """ Parses the given response. The response's input stream doesn't have to be closed. The caller will already do this. @param response the HTTP response to parse @return the parsed result @throws IOException if the response could not be r...
java
private JsonParser parseResponse(Response response) throws IOException { InputStream is = response.getInputStream(); Reader r = new BufferedReader(new InputStreamReader(is, "UTF-8")); return new JsonParser(new JsonLexer(r)); }
[ "private", "JsonParser", "parseResponse", "(", "Response", "response", ")", "throws", "IOException", "{", "InputStream", "is", "=", "response", ".", "getInputStream", "(", ")", ";", "Reader", "r", "=", "new", "BufferedReader", "(", "new", "InputStreamReader", "(...
Parses the given response. The response's input stream doesn't have to be closed. The caller will already do this. @param response the HTTP response to parse @return the parsed result @throws IOException if the response could not be read
[ "Parses", "the", "given", "response", ".", "The", "response", "s", "input", "stream", "doesn", "t", "have", "to", "be", "closed", ".", "The", "caller", "will", "already", "do", "this", "." ]
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/remote/AbstractRemoteConnector.java#L205-L209
strator-dev/greenpepper
greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Repository.java
Repository.removeRequirement
public void removeRequirement(Requirement requirement) throws GreenPepperServerException { """ <p>removeRequirement.</p> @param requirement a {@link com.greenpepper.server.domain.Requirement} object. @throws com.greenpepper.server.GreenPepperServerException if any. """ if(!requirements.contains(req...
java
public void removeRequirement(Requirement requirement) throws GreenPepperServerException { if(!requirements.contains(requirement) ) throw new GreenPepperServerException( GreenPepperServerErrorKey.REQUIREMENT_NOT_FOUND, "Requirement not found"); requirements.remove(requirement); ...
[ "public", "void", "removeRequirement", "(", "Requirement", "requirement", ")", "throws", "GreenPepperServerException", "{", "if", "(", "!", "requirements", ".", "contains", "(", "requirement", ")", ")", "throw", "new", "GreenPepperServerException", "(", "GreenPepperSe...
<p>removeRequirement.</p> @param requirement a {@link com.greenpepper.server.domain.Requirement} object. @throws com.greenpepper.server.GreenPepperServerException if any.
[ "<p", ">", "removeRequirement", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-client/src/main/java/com/greenpepper/server/domain/Repository.java#L363-L370
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/persistence/xml/internal/StringPool.java
StringPool.contentEquals
private static boolean contentEquals(String s, char[] chars, int start, int length) { """ Content equals. @param s the s @param chars the chars @param start the start @param length the length @return true, if successful """ if (s.length() != length) { return false; } for (int i = 0; i < length;...
java
private static boolean contentEquals(String s, char[] chars, int start, int length) { if (s.length() != length) { return false; } for (int i = 0; i < length; i++) { if (chars[start + i] != s.charAt(i)) { return false; } } return true; }
[ "private", "static", "boolean", "contentEquals", "(", "String", "s", ",", "char", "[", "]", "chars", ",", "int", "start", ",", "int", "length", ")", "{", "if", "(", "s", ".", "length", "(", ")", "!=", "length", ")", "{", "return", "false", ";", "}"...
Content equals. @param s the s @param chars the chars @param start the start @param length the length @return true, if successful
[ "Content", "equals", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/persistence/xml/internal/StringPool.java#L39-L49
bitcoinj/bitcoinj
core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java
StoredPaymentChannelClientStates.getUsableChannelForServerID
@Nullable StoredClientChannel getUsableChannelForServerID(Sha256Hash id) { """ Finds an inactive channel with the given id and returns it, or returns null. """ lock.lock(); try { Set<StoredClientChannel> setChannels = mapChannels.get(id); for (StoredClientChannel cha...
java
@Nullable StoredClientChannel getUsableChannelForServerID(Sha256Hash id) { lock.lock(); try { Set<StoredClientChannel> setChannels = mapChannels.get(id); for (StoredClientChannel channel : setChannels) { synchronized (channel) { // Check if...
[ "@", "Nullable", "StoredClientChannel", "getUsableChannelForServerID", "(", "Sha256Hash", "id", ")", "{", "lock", ".", "lock", "(", ")", ";", "try", "{", "Set", "<", "StoredClientChannel", ">", "setChannels", "=", "mapChannels", ".", "get", "(", "id", ")", "...
Finds an inactive channel with the given id and returns it, or returns null.
[ "Finds", "an", "inactive", "channel", "with", "the", "given", "id", "and", "returns", "it", "or", "returns", "null", "." ]
train
https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/protocols/channels/StoredPaymentChannelClientStates.java#L139-L164
alipay/sofa-rpc
extension-impl/remoting-bolt/src/main/java/com/alipay/sofa/rpc/transport/bolt/BoltClientTransport.java
BoltClientTransport.afterSend
protected void afterSend(RpcInternalContext context, InvokeContext invokeContext, SofaRequest request) { """ 调用后设置一些属性(注意,在异步的情况较多下) @param context RPC上下文 @param invokeContext bolt调用上下文 @param request 请求对象 """ currentRequests.decrementAndGet(); if (RpcInternalContext.isAttachme...
java
protected void afterSend(RpcInternalContext context, InvokeContext invokeContext, SofaRequest request) { currentRequests.decrementAndGet(); if (RpcInternalContext.isAttachmentEnable()) { putToContextIfNotNull(invokeContext, InvokeContext.CLIENT_CONN_CREATETIME, context, RpcCo...
[ "protected", "void", "afterSend", "(", "RpcInternalContext", "context", ",", "InvokeContext", "invokeContext", ",", "SofaRequest", "request", ")", "{", "currentRequests", ".", "decrementAndGet", "(", ")", ";", "if", "(", "RpcInternalContext", ".", "isAttachmentEnable"...
调用后设置一些属性(注意,在异步的情况较多下) @param context RPC上下文 @param invokeContext bolt调用上下文 @param request 请求对象
[ "调用后设置一些属性(注意,在异步的情况较多下)" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/remoting-bolt/src/main/java/com/alipay/sofa/rpc/transport/bolt/BoltClientTransport.java#L397-L406
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/AnnotationUtility.java
AnnotationUtility.forEachAnnotations
public static void forEachAnnotations(Element currentElement, AnnotationFilter filter, AnnotationFoundListener listener) { """ Iterate over annotations of currentElement. Accept only annotation in accepted set. @param currentElement the current element @param filter the filter @param listener the listener ...
java
public static void forEachAnnotations(Element currentElement, AnnotationFilter filter, AnnotationFoundListener listener) { final Elements elementUtils=BaseProcessor.elementUtils; List<? extends AnnotationMirror> annotationList = elementUtils.getAllAnnotationMirrors(currentElement); String annotationClassName; /...
[ "public", "static", "void", "forEachAnnotations", "(", "Element", "currentElement", ",", "AnnotationFilter", "filter", ",", "AnnotationFoundListener", "listener", ")", "{", "final", "Elements", "elementUtils", "=", "BaseProcessor", ".", "elementUtils", ";", "List", "<...
Iterate over annotations of currentElement. Accept only annotation in accepted set. @param currentElement the current element @param filter the filter @param listener the listener
[ "Iterate", "over", "annotations", "of", "currentElement", ".", "Accept", "only", "annotation", "in", "accepted", "set", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/core/reflect/AnnotationUtility.java#L145-L173
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/servicefactory/ServiceFactory.java
ServiceFactory.createForNames
public <T> void createForNames(String[] names, T[] objectOutput) { """ Example USage: <code> StructureFinder[] finders = new StructureFinder[sources.length]; ServiceFactory.getInstance().createForNames(sources,finders); </code> @param names the object/service names @param objectOutput array to place results...
java
public <T> void createForNames(String[] names, T[] objectOutput) { if(objectOutput == null || objectOutput.length == 0) throw new IllegalArgumentException("Non empty objectOutput"); if(names ==null || names.length == 0) { return; } String name = null; Object...
[ "public", "<", "T", ">", "void", "createForNames", "(", "String", "[", "]", "names", ",", "T", "[", "]", "objectOutput", ")", "{", "if", "(", "objectOutput", "==", "null", "||", "objectOutput", ".", "length", "==", "0", ")", "throw", "new", "IllegalArg...
Example USage: <code> StructureFinder[] finders = new StructureFinder[sources.length]; ServiceFactory.getInstance().createForNames(sources,finders); </code> @param names the object/service names @param objectOutput array to place results @param <T> the type class
[ "Example", "USage", ":", "<code", ">", "StructureFinder", "[]", "finders", "=", "new", "StructureFinder", "[", "sources", ".", "length", "]", ";", "ServiceFactory", ".", "getInstance", "()", ".", "createForNames", "(", "sources", "finders", ")", ";", "<", "/...
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/patterns/servicefactory/ServiceFactory.java#L198-L228
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineImagesInner.java
VirtualMachineImagesInner.listAsync
public Observable<List<VirtualMachineImageResourceInner>> listAsync(String location, String publisherName, String offer, String skus, String filter, Integer top, String orderby) { """ Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. @param location The nam...
java
public Observable<List<VirtualMachineImageResourceInner>> listAsync(String location, String publisherName, String offer, String skus, String filter, Integer top, String orderby) { return listWithServiceResponseAsync(location, publisherName, offer, skus, filter, top, orderby).map(new Func1<ServiceResponse<List<V...
[ "public", "Observable", "<", "List", "<", "VirtualMachineImageResourceInner", ">", ">", "listAsync", "(", "String", "location", ",", "String", "publisherName", ",", "String", "offer", ",", "String", "skus", ",", "String", "filter", ",", "Integer", "top", ",", ...
Gets a list of all virtual machine image versions for the specified location, publisher, offer, and SKU. @param location The name of a supported Azure region. @param publisherName A valid image publisher. @param offer A valid image publisher offer. @param skus A valid image SKU. @param filter The filter to apply on th...
[ "Gets", "a", "list", "of", "all", "virtual", "machine", "image", "versions", "for", "the", "specified", "location", "publisher", "offer", "and", "SKU", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineImagesInner.java#L330-L337
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/SystemIDResolver.java
SystemIDResolver.getAbsoluteURI
public static String getAbsoluteURI(String urlString, String base) throws TransformerException { """ Take a SystemID string and try to turn it into a good absolute URI. @param urlString SystemID string @param base The URI string used as the base for resolving the systemID @return The resolved abso...
java
public static String getAbsoluteURI(String urlString, String base) throws TransformerException { if (base == null) return getAbsoluteURI(urlString); String absoluteBase = getAbsoluteURI(base); URI uri = null; try { URI baseURI = new URI(absoluteBase); uri = new URI(bas...
[ "public", "static", "String", "getAbsoluteURI", "(", "String", "urlString", ",", "String", "base", ")", "throws", "TransformerException", "{", "if", "(", "base", "==", "null", ")", "return", "getAbsoluteURI", "(", "urlString", ")", ";", "String", "absoluteBase",...
Take a SystemID string and try to turn it into a good absolute URI. @param urlString SystemID string @param base The URI string used as the base for resolving the systemID @return The resolved absolute URI @throws TransformerException thrown if the string can't be turned into a URI.
[ "Take", "a", "SystemID", "string", "and", "try", "to", "turn", "it", "into", "a", "good", "absolute", "URI", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/utils/SystemIDResolver.java#L272-L291
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java
TileBoundingBoxUtils.getWGS84BoundingBox
public static BoundingBox getWGS84BoundingBox(TileGrid tileGrid, int zoom) { """ Get the WGS84 tile bounding box from the tile grid and zoom level @param tileGrid tile grid @param zoom zoom @return wgs84 bounding box @since 1.2.0 """ int tilesPerLat = tilesPerWGS84LatSide(zoom); int tilesPerLon ...
java
public static BoundingBox getWGS84BoundingBox(TileGrid tileGrid, int zoom) { int tilesPerLat = tilesPerWGS84LatSide(zoom); int tilesPerLon = tilesPerWGS84LonSide(zoom); double tileSizeLat = tileSizeLatPerWGS84Side(tilesPerLat); double tileSizeLon = tileSizeLonPerWGS84Side(tilesPerLon); double minLon = (-1 ...
[ "public", "static", "BoundingBox", "getWGS84BoundingBox", "(", "TileGrid", "tileGrid", ",", "int", "zoom", ")", "{", "int", "tilesPerLat", "=", "tilesPerWGS84LatSide", "(", "zoom", ")", ";", "int", "tilesPerLon", "=", "tilesPerWGS84LonSide", "(", "zoom", ")", ";...
Get the WGS84 tile bounding box from the tile grid and zoom level @param tileGrid tile grid @param zoom zoom @return wgs84 bounding box @since 1.2.0
[ "Get", "the", "WGS84", "tile", "bounding", "box", "from", "the", "tile", "grid", "and", "zoom", "level" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/tiles/TileBoundingBoxUtils.java#L1177-L1197
datacleaner/DataCleaner
desktop/ui/src/main/java/org/datacleaner/widgets/tabs/Packer.java
Packer.setInsetTop
public Packer setInsetTop(final int val) { """ sets top Insets on the constraints for the current component to the value specified. """ Insets i = gc.insets; if (i == null) { i = new Insets(0, 0, 0, 0); } gc.insets = new Insets(val, i.left, i.bottom, i.right); ...
java
public Packer setInsetTop(final int val) { Insets i = gc.insets; if (i == null) { i = new Insets(0, 0, 0, 0); } gc.insets = new Insets(val, i.left, i.bottom, i.right); setConstraints(comp, gc); return this; }
[ "public", "Packer", "setInsetTop", "(", "final", "int", "val", ")", "{", "Insets", "i", "=", "gc", ".", "insets", ";", "if", "(", "i", "==", "null", ")", "{", "i", "=", "new", "Insets", "(", "0", ",", "0", ",", "0", ",", "0", ")", ";", "}", ...
sets top Insets on the constraints for the current component to the value specified.
[ "sets", "top", "Insets", "on", "the", "constraints", "for", "the", "current", "component", "to", "the", "value", "specified", "." ]
train
https://github.com/datacleaner/DataCleaner/blob/9aa01fdac3560cef51c55df3cb2ac5c690b57639/desktop/ui/src/main/java/org/datacleaner/widgets/tabs/Packer.java#L815-L823
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.createEvent
public void createEvent(Map<String, Object> eventParams) throws OAuthSystemException, OAuthProblemException, URISyntaxException { """ Create an event in the OneLogin event log. @param eventParams Event Data (event_type_id, account_id, actor_system, actor_user_id, actor_user_name, app_id, assuming_acting_user_...
java
public void createEvent(Map<String, Object> eventParams) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); OneloginURLConnectionClient httpClient = new OneloginURLConnectionClient(); OAuthClient oAuthClient = new OAuthClient(httpClient); URIBuilder url = ...
[ "public", "void", "createEvent", "(", "Map", "<", "String", ",", "Object", ">", "eventParams", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";", "Onelo...
Create an event in the OneLogin event log. @param eventParams Event Data (event_type_id, account_id, actor_system, actor_user_id, actor_user_name, app_id, assuming_acting_user_id, custom_message, directory_sync_run_id, group_id, group_name, ipaddr, otp_device_id, otp_device_name, policy_id, policy_name, role_id, role_...
[ "Create", "an", "event", "in", "the", "OneLogin", "event", "log", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L2163-L2186
aws/aws-sdk-java
aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/CreateIntegrationResponseResult.java
CreateIntegrationResponseResult.withResponseTemplates
public CreateIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) { """ <p> The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the...
java
public CreateIntegrationResponseResult withResponseTemplates(java.util.Map<String, String> responseTemplates) { setResponseTemplates(responseTemplates); return this; }
[ "public", "CreateIntegrationResponseResult", "withResponseTemplates", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "responseTemplates", ")", "{", "setResponseTemplates", "(", "responseTemplates", ")", ";", "return", "this", ";", "}" ]
<p> The collection of response templates for the integration response as a string-to-string map of key-value pairs. Response templates are represented as a key/value map, with a content-type as the key and a template as the value. </p> @param responseTemplates The collection of response templates for the integration r...
[ "<p", ">", "The", "collection", "of", "response", "templates", "for", "the", "integration", "response", "as", "a", "string", "-", "to", "-", "string", "map", "of", "key", "-", "value", "pairs", ".", "Response", "templates", "are", "represented", "as", "a",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/CreateIntegrationResponseResult.java#L448-L451
tropo/tropo-webapi-java
src/main/java/com/voxeo/tropo/Key.java
Key.SAY_OF_ASK
public static Key SAY_OF_ASK(com.voxeo.tropo.actions.AskAction.Say... says) { """ <p> This determines what is played or sent to the caller. This can be a single object or an array of objects. When say is a part of an ask, it takes an event key. This determines if the prompt will be played based on a particular...
java
public static Key SAY_OF_ASK(com.voxeo.tropo.actions.AskAction.Say... says) { return createKey("say", says); }
[ "public", "static", "Key", "SAY_OF_ASK", "(", "com", ".", "voxeo", ".", "tropo", ".", "actions", ".", "AskAction", ".", "Say", "...", "says", ")", "{", "return", "createKey", "(", "\"say\"", ",", "says", ")", ";", "}" ]
<p> This determines what is played or sent to the caller. This can be a single object or an array of objects. When say is a part of an ask, it takes an event key. This determines if the prompt will be played based on a particular event; the possible events are: </p> <ul> <li><strong>nomatch</strong> -- Returned if the ...
[ "<p", ">", "This", "determines", "what", "is", "played", "or", "sent", "to", "the", "caller", ".", "This", "can", "be", "a", "single", "object", "or", "an", "array", "of", "objects", ".", "When", "say", "is", "a", "part", "of", "an", "ask", "it", "...
train
https://github.com/tropo/tropo-webapi-java/blob/96af1fa292c1d4b6321d85a559d9718d33eec7e0/src/main/java/com/voxeo/tropo/Key.java#L600-L603
di2e/Argo
CLClient/src/main/java/ws/argo/CLClient/listener/ResponseListener.java
ResponseListener.startServer
public static HttpServer startServer(URI listenerURI, SSLContextConfigurator sslContextConfigurator) throws IOException { """ Start the ResponseListener client. This largely includes starting at Grizzly 2 server. @param listenerURI the uri of the listener for the http server @return a new HttpServer @throws ...
java
public static HttpServer startServer(URI listenerURI, SSLContextConfigurator sslContextConfigurator) throws IOException { String scheme = listenerURI.getScheme(); if (scheme.equals("http")) return startUnsecureServer(listenerURI); else return startSecureServer(listenerURI, sslContextCo...
[ "public", "static", "HttpServer", "startServer", "(", "URI", "listenerURI", ",", "SSLContextConfigurator", "sslContextConfigurator", ")", "throws", "IOException", "{", "String", "scheme", "=", "listenerURI", ".", "getScheme", "(", ")", ";", "if", "(", "scheme", "....
Start the ResponseListener client. This largely includes starting at Grizzly 2 server. @param listenerURI the uri of the listener for the http server @return a new HttpServer @throws IOException if something goes wrong creating the http server
[ "Start", "the", "ResponseListener", "client", ".", "This", "largely", "includes", "starting", "at", "Grizzly", "2", "server", "." ]
train
https://github.com/di2e/Argo/blob/f537a03d2d25fdfecda7999ec10e1da67dc3b8f3/CLClient/src/main/java/ws/argo/CLClient/listener/ResponseListener.java#L78-L87
alipay/sofa-rpc
extension-impl/extension-common/src/main/java/com/alipay/sofa/rpc/registry/utils/RegistryUtils.java
RegistryUtils.initOrAddList
public static <K, V> void initOrAddList(Map<K, List<V>> orginMap, K key, V needAdd) { """ Init or add list. @param <K> the key parameter @param <V> the value parameter @param orginMap the orgin map @param key the key @param needAdd the need add """ List<V> listeners = orginMap.get(key); ...
java
public static <K, V> void initOrAddList(Map<K, List<V>> orginMap, K key, V needAdd) { List<V> listeners = orginMap.get(key); if (listeners == null) { listeners = new CopyOnWriteArrayList<V>(); listeners.add(needAdd); orginMap.put(key, listeners); } else { ...
[ "public", "static", "<", "K", ",", "V", ">", "void", "initOrAddList", "(", "Map", "<", "K", ",", "List", "<", "V", ">", ">", "orginMap", ",", "K", "key", ",", "V", "needAdd", ")", "{", "List", "<", "V", ">", "listeners", "=", "orginMap", ".", "...
Init or add list. @param <K> the key parameter @param <V> the value parameter @param orginMap the orgin map @param key the key @param needAdd the need add
[ "Init", "or", "add", "list", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/extension-common/src/main/java/com/alipay/sofa/rpc/registry/utils/RegistryUtils.java#L252-L261
googleapis/google-http-java-client
google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java
GenericUrl.toURL
public final URL toURL(String relativeUrl) { """ Constructs the URL based on {@link URL#URL(URL, String)} with this URL representation from {@link #toURL()} and a relative url. <p>Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. @return new URL instance @since 1.14 "...
java
public final URL toURL(String relativeUrl) { try { URL url = toURL(); return new URL(url, relativeUrl); } catch (MalformedURLException e) { throw new IllegalArgumentException(e); } }
[ "public", "final", "URL", "toURL", "(", "String", "relativeUrl", ")", "{", "try", "{", "URL", "url", "=", "toURL", "(", ")", ";", "return", "new", "URL", "(", "url", ",", "relativeUrl", ")", ";", "}", "catch", "(", "MalformedURLException", "e", ")", ...
Constructs the URL based on {@link URL#URL(URL, String)} with this URL representation from {@link #toURL()} and a relative url. <p>Any {@link MalformedURLException} is wrapped in an {@link IllegalArgumentException}. @return new URL instance @since 1.14
[ "Constructs", "the", "URL", "based", "on", "{", "@link", "URL#URL", "(", "URL", "String", ")", "}", "with", "this", "URL", "representation", "from", "{", "@link", "#toURL", "()", "}", "and", "a", "relative", "url", "." ]
train
https://github.com/googleapis/google-http-java-client/blob/0988ae4e0f26a80f579b6adb2b276dd8254928de/google-http-client/src/main/java/com/google/api/client/http/GenericUrl.java#L403-L410
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addIdInCommaSeparatedListCondition
protected void addIdInCommaSeparatedListCondition(final Expression<?> property, final String value) throws NumberFormatException { """ Add a Field Search Condition that will check if the id field exists in a comma separated list of ids. eg. {@code field IN (value)} @param property The name of the field id as d...
java
protected void addIdInCommaSeparatedListCondition(final Expression<?> property, final String value) throws NumberFormatException { addIdInArrayCondition(property, value.split(",")); }
[ "protected", "void", "addIdInCommaSeparatedListCondition", "(", "final", "Expression", "<", "?", ">", "property", ",", "final", "String", "value", ")", "throws", "NumberFormatException", "{", "addIdInArrayCondition", "(", "property", ",", "value", ".", "split", "(",...
Add a Field Search Condition that will check if the id field exists in a comma separated list of ids. eg. {@code field IN (value)} @param property The name of the field id as defined in the Entity mapping class. @param value The comma separated list of ids. @throws NumberFormatException Thrown if one of the Str...
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "check", "if", "the", "id", "field", "exists", "in", "a", "comma", "separated", "list", "of", "ids", ".", "eg", ".", "{", "@code", "field", "IN", "(", "value", ")", "}" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L359-L361
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/authentication/AuthenticationApi.java
AuthenticationApi.getJwtUserInfo
public ModelApiResponse getJwtUserInfo(String authorization) throws AuthenticationApiException { """ getJwtInfo @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Authorization: bea...
java
public ModelApiResponse getJwtUserInfo(String authorization) throws AuthenticationApiException { try { return authenticationApi.getJwtInfoUsingGET(authorization); } catch (ApiException e) { throw new AuthenticationApiException("Error getting jwt userinfo", e); } }
[ "public", "ModelApiResponse", "getJwtUserInfo", "(", "String", "authorization", ")", "throws", "AuthenticationApiException", "{", "try", "{", "return", "authenticationApi", ".", "getJwtInfoUsingGET", "(", "authorization", ")", ";", "}", "catch", "(", "ApiException", "...
getJwtInfo @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff06e\&quot; (required) @return ModelApiResponse @throws AuthenticationA...
[ "getJwtInfo" ]
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/authentication/AuthenticationApi.java#L134-L140
app55/app55-java
src/support/java/org/apache/harmony/beans/internal/nls/Messages.java
Messages.getString
static public String getString(String msg, int arg) { """ Retrieves a message which takes 1 integer argument. @param msg String the key to look up. @param arg int the integer to insert in the formatted output. @return String the message for that key in the system message bundle. """ return getString(m...
java
static public String getString(String msg, int arg) { return getString(msg, new Object[] { Integer.toString(arg) }); }
[ "static", "public", "String", "getString", "(", "String", "msg", ",", "int", "arg", ")", "{", "return", "getString", "(", "msg", ",", "new", "Object", "[", "]", "{", "Integer", ".", "toString", "(", "arg", ")", "}", ")", ";", "}" ]
Retrieves a message which takes 1 integer argument. @param msg String the key to look up. @param arg int the integer to insert in the formatted output. @return String the message for that key in the system message bundle.
[ "Retrieves", "a", "message", "which", "takes", "1", "integer", "argument", "." ]
train
https://github.com/app55/app55-java/blob/73e51d0f3141a859dfbd37ca9becef98477e553e/src/support/java/org/apache/harmony/beans/internal/nls/Messages.java#L89-L92
OpenTSDB/opentsdb
src/tsd/HttpSerializer.java
HttpSerializer.formatJVMStatsV1
public ChannelBuffer formatJVMStatsV1(final Map<String, Map<String, Object>> map) { """ Format a list of JVM statistics @param map The JVM stats list to format @return A ChannelBuffer object to pass on to the caller @throws BadRequestException if the plugin has not implemented this method @since 2.2 """ ...
java
public ChannelBuffer formatJVMStatsV1(final Map<String, Map<String, Object>> map) { throw new BadRequestException(HttpResponseStatus.NOT_IMPLEMENTED, "The requested API endpoint has not been implemented", this.getClass().getCanonicalName() + " has not implemented formatJVMStatsV1"); }
[ "public", "ChannelBuffer", "formatJVMStatsV1", "(", "final", "Map", "<", "String", ",", "Map", "<", "String", ",", "Object", ">", ">", "map", ")", "{", "throw", "new", "BadRequestException", "(", "HttpResponseStatus", ".", "NOT_IMPLEMENTED", ",", "\"The requeste...
Format a list of JVM statistics @param map The JVM stats list to format @return A ChannelBuffer object to pass on to the caller @throws BadRequestException if the plugin has not implemented this method @since 2.2
[ "Format", "a", "list", "of", "JVM", "statistics" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpSerializer.java#L754-L759
timehop/sticky-headers-recyclerview
library/src/main/java/com/timehop/stickyheadersrecyclerview/calculation/DimensionCalculator.java
DimensionCalculator.initMargins
public void initMargins(Rect margins, View view) { """ Populates {@link Rect} with margins for any view. @param margins rect to populate @param view for which to get margins """ LayoutParams layoutParams = view.getLayoutParams(); if (layoutParams instanceof MarginLayoutParams) { MarginLayo...
java
public void initMargins(Rect margins, View view) { LayoutParams layoutParams = view.getLayoutParams(); if (layoutParams instanceof MarginLayoutParams) { MarginLayoutParams marginLayoutParams = (MarginLayoutParams) layoutParams; initMarginRect(margins, marginLayoutParams); } else { margi...
[ "public", "void", "initMargins", "(", "Rect", "margins", ",", "View", "view", ")", "{", "LayoutParams", "layoutParams", "=", "view", ".", "getLayoutParams", "(", ")", ";", "if", "(", "layoutParams", "instanceof", "MarginLayoutParams", ")", "{", "MarginLayoutPara...
Populates {@link Rect} with margins for any view. @param margins rect to populate @param view for which to get margins
[ "Populates", "{", "@link", "Rect", "}", "with", "margins", "for", "any", "view", "." ]
train
https://github.com/timehop/sticky-headers-recyclerview/blob/f5a9e9b8f5d96734e20439b0a41381865fa52fb7/library/src/main/java/com/timehop/stickyheadersrecyclerview/calculation/DimensionCalculator.java#L21-L30
Netflix/zuul
zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java
FilterVerifier.verifyFilter
public FilterInfo verifyFilter(String sFilterCode) throws org.codehaus.groovy.control.CompilationFailedException, IllegalAccessException, InstantiationException { """ verifies compilation, instanciation and that it is a ZuulFilter @param sFilterCode @return a FilterInfo object representing that code @throws o...
java
public FilterInfo verifyFilter(String sFilterCode) throws org.codehaus.groovy.control.CompilationFailedException, IllegalAccessException, InstantiationException { Class groovyClass = compileGroovy(sFilterCode); Object instance = instanciateClass(groovyClass); checkZuulFilterInstance(instance); ...
[ "public", "FilterInfo", "verifyFilter", "(", "String", "sFilterCode", ")", "throws", "org", ".", "codehaus", ".", "groovy", ".", "control", ".", "CompilationFailedException", ",", "IllegalAccessException", ",", "InstantiationException", "{", "Class", "groovyClass", "=...
verifies compilation, instanciation and that it is a ZuulFilter @param sFilterCode @return a FilterInfo object representing that code @throws org.codehaus.groovy.control.CompilationFailedException @throws IllegalAccessException @throws InstantiationException
[ "verifies", "compilation", "instanciation", "and", "that", "it", "is", "a", "ZuulFilter" ]
train
https://github.com/Netflix/zuul/blob/01bc777cf05e3522d37c9ed902ae13eb38a19692/zuul-core/src/main/java/com/netflix/zuul/scriptManager/FilterVerifier.java#L56-L66
Metatavu/edelphi
edelphi/src/main/java/fi/metatavu/edelphi/utils/AuthUtils.java
AuthUtils.getOAuthAccessToken
public static OAuthAccessToken getOAuthAccessToken(RequestContext requestContext, String provider, String... scopes) { """ Returns OAuth previously stored access token from HTTP session Null is returned if token is present but does not have requested scopes or the token has been expired @param requestContex...
java
public static OAuthAccessToken getOAuthAccessToken(RequestContext requestContext, String provider, String... scopes) { HttpSession session = requestContext.getRequest().getSession(); OAuthAccessToken[] accessTokens = (OAuthAccessToken[]) session.getAttribute(String.format(PROVIDER_ACCESS_TOKENS, provider))...
[ "public", "static", "OAuthAccessToken", "getOAuthAccessToken", "(", "RequestContext", "requestContext", ",", "String", "provider", ",", "String", "...", "scopes", ")", "{", "HttpSession", "session", "=", "requestContext", ".", "getRequest", "(", ")", ".", "getSessio...
Returns OAuth previously stored access token from HTTP session Null is returned if token is present but does not have requested scopes or the token has been expired @param requestContext request context @param provider token provider @param scopes required scopes @return OAuth previously stored access token from HTTP...
[ "Returns", "OAuth", "previously", "stored", "access", "token", "from", "HTTP", "session" ]
train
https://github.com/Metatavu/edelphi/blob/d91a0b54f954b33b4ee674a1bdf03612d76c3305/edelphi/src/main/java/fi/metatavu/edelphi/utils/AuthUtils.java#L173-L193
exoplatform/jcr
applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
BackupClientImpl.getRepositoryEntry
private RepositoryEntry getRepositoryEntry(InputStream wEntryStream, String repositoryName) throws FileNotFoundException, JiBXException, RepositoryConfigurationException { """ getRepositoryEntry. @param wEntryStream InputStream, the workspace configuration @return RepositoryEntry return the work...
java
private RepositoryEntry getRepositoryEntry(InputStream wEntryStream, String repositoryName) throws FileNotFoundException, JiBXException, RepositoryConfigurationException { IBindingFactory factory = BindingDirectory.getFactory(RepositoryServiceConfiguration.class); IUnmarshallingContext uc...
[ "private", "RepositoryEntry", "getRepositoryEntry", "(", "InputStream", "wEntryStream", ",", "String", "repositoryName", ")", "throws", "FileNotFoundException", ",", "JiBXException", ",", "RepositoryConfigurationException", "{", "IBindingFactory", "factory", "=", "BindingDire...
getRepositoryEntry. @param wEntryStream InputStream, the workspace configuration @return RepositoryEntry return the workspace entry @throws FileNotFoundException will be generated the FileNotFoundException @throws JiBXException will be generated the JiBXException @throws RepositoryConfigurationException will be genera...
[ "getRepositoryEntry", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java#L1187-L1196
fcrepo3/fcrepo
fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ResponseCacheImpl.java
ResponseCacheImpl.hashAttribute
private static void hashAttribute(Attribute a, MessageDigest dig) { """ Utility function to add an attribute to the hash digest. @param a the attribute to hash """ dig.update(a.getId().toString().getBytes()); dig.update(a.getType().toString().getBytes()); dig.update(a.getValue().enc...
java
private static void hashAttribute(Attribute a, MessageDigest dig) { dig.update(a.getId().toString().getBytes()); dig.update(a.getType().toString().getBytes()); dig.update(a.getValue().encode().getBytes()); if (a.getIssuer() != null) { dig.update(a.getIssuer().getBytes()); ...
[ "private", "static", "void", "hashAttribute", "(", "Attribute", "a", ",", "MessageDigest", "dig", ")", "{", "dig", ".", "update", "(", "a", ".", "getId", "(", ")", ".", "toString", "(", ")", ".", "getBytes", "(", ")", ")", ";", "dig", ".", "update", ...
Utility function to add an attribute to the hash digest. @param a the attribute to hash
[ "Utility", "function", "to", "add", "an", "attribute", "to", "the", "hash", "digest", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-security/fcrepo-security-pep/src/main/java/org/fcrepo/server/security/xacml/pep/ResponseCacheImpl.java#L303-L313
Stratio/deep-spark
deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java
UtilAerospike.getAerospikeRecordFromObject
public static <T> Pair<Object, AerospikeRecord> getAerospikeRecordFromObject(T t) throws IllegalAccessException, InstantiationException, InvocationTargetException { """ Converts from an entity class with deep's anotations to AerospikeRecord. @param t an instance of an object of type T to convert t...
java
public static <T> Pair<Object, AerospikeRecord> getAerospikeRecordFromObject(T t) throws IllegalAccessException, InstantiationException, InvocationTargetException { Field[] fields = AnnotationUtils.filterDeepFields(t.getClass()); Pair<Field[], Field[]> keysAndFields = AnnotationUtils.filterK...
[ "public", "static", "<", "T", ">", "Pair", "<", "Object", ",", "AerospikeRecord", ">", "getAerospikeRecordFromObject", "(", "T", "t", ")", "throws", "IllegalAccessException", ",", "InstantiationException", ",", "InvocationTargetException", "{", "Field", "[", "]", ...
Converts from an entity class with deep's anotations to AerospikeRecord. @param t an instance of an object of type T to convert to AerospikeRecord. @param <T> the type of the object to convert. @return A pair with the Record key and the Record itself. @throws IllegalAccessException @throws InstantiationException @th...
[ "Converts", "from", "an", "entity", "class", "with", "deep", "s", "anotations", "to", "AerospikeRecord", "." ]
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java#L133-L163
moparisthebest/beehive
beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/DefaultResultSetMapper.java
DefaultResultSetMapper.mapToResultType
public Object mapToResultType(ControlBeanContext context, Method m, ResultSet resultSet, Calendar cal) { """ Maps a ResultSet to a ResultSet. The default implementation is a NOOP. @param context A ControlBeanContext instance. @param m Method assoicated with this call. @param resultSet Result set to...
java
public Object mapToResultType(ControlBeanContext context, Method m, ResultSet resultSet, Calendar cal) { return resultSet; }
[ "public", "Object", "mapToResultType", "(", "ControlBeanContext", "context", ",", "Method", "m", ",", "ResultSet", "resultSet", ",", "Calendar", "cal", ")", "{", "return", "resultSet", ";", "}" ]
Maps a ResultSet to a ResultSet. The default implementation is a NOOP. @param context A ControlBeanContext instance. @param m Method assoicated with this call. @param resultSet Result set to map. @param cal A Calendar instance for resolving date/time values. @return An object.
[ "Maps", "a", "ResultSet", "to", "a", "ResultSet", ".", "The", "default", "implementation", "is", "a", "NOOP", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-jdbc-control/src/main/java/org/apache/beehive/controls/system/jdbc/DefaultResultSetMapper.java#L42-L44
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.isPropertyInherited
@SuppressWarnings("rawtypes") public static boolean isPropertyInherited(Class clz, String propertyName) { """ Checks whether the specified property is inherited from a super class @param clz The class to check @param propertyName The property name @return true if the property is inherited """ ...
java
@SuppressWarnings("rawtypes") public static boolean isPropertyInherited(Class clz, String propertyName) { if (clz == null) return false; Assert.isTrue(StringUtils.hasText(propertyName), "Argument [propertyName] cannot be null or blank"); Class<?> superClass = clz.getSuperclass(); P...
[ "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "public", "static", "boolean", "isPropertyInherited", "(", "Class", "clz", ",", "String", "propertyName", ")", "{", "if", "(", "clz", "==", "null", ")", "return", "false", ";", "Assert", ".", "isTrue", "(", ...
Checks whether the specified property is inherited from a super class @param clz The class to check @param propertyName The property name @return true if the property is inherited
[ "Checks", "whether", "the", "specified", "property", "is", "inherited", "from", "a", "super", "class" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L691-L703
google/closure-compiler
src/com/google/javascript/refactoring/RefactoringDriver.java
RefactoringDriver.drive
public List<SuggestedFix> drive(Scanner scanner, Pattern includeFilePattern) { """ Run a refactoring and return any suggested fixes as a result. """ JsFlumeCallback callback = new JsFlumeCallback(scanner, includeFilePattern); NodeTraversal.traverse(compiler, rootNode, callback); List<SuggestedFix> ...
java
public List<SuggestedFix> drive(Scanner scanner, Pattern includeFilePattern) { JsFlumeCallback callback = new JsFlumeCallback(scanner, includeFilePattern); NodeTraversal.traverse(compiler, rootNode, callback); List<SuggestedFix> fixes = callback.getFixes(); fixes.addAll(scanner.processAllMatches(callbac...
[ "public", "List", "<", "SuggestedFix", ">", "drive", "(", "Scanner", "scanner", ",", "Pattern", "includeFilePattern", ")", "{", "JsFlumeCallback", "callback", "=", "new", "JsFlumeCallback", "(", "scanner", ",", "includeFilePattern", ")", ";", "NodeTraversal", ".",...
Run a refactoring and return any suggested fixes as a result.
[ "Run", "a", "refactoring", "and", "return", "any", "suggested", "fixes", "as", "a", "result", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/refactoring/RefactoringDriver.java#L59-L65
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.loadBalancing_serviceName_importCustomSsl_POST
public OvhLoadBalancingTask loadBalancing_serviceName_importCustomSsl_POST(String serviceName, String certificate, String chain, String key) throws IOException { """ Import your own ssl certificate on your IP load balancing. Ssl option is needed to use this url. REST: POST /ip/loadBalancing/{serviceName}/import...
java
public OvhLoadBalancingTask loadBalancing_serviceName_importCustomSsl_POST(String serviceName, String certificate, String chain, String key) throws IOException { String qPath = "/ip/loadBalancing/{serviceName}/importCustomSsl"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<St...
[ "public", "OvhLoadBalancingTask", "loadBalancing_serviceName_importCustomSsl_POST", "(", "String", "serviceName", ",", "String", "certificate", ",", "String", "chain", ",", "String", "key", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/loadBalancing/{s...
Import your own ssl certificate on your IP load balancing. Ssl option is needed to use this url. REST: POST /ip/loadBalancing/{serviceName}/importCustomSsl @param chain [required] certificate chain @param key [required] certificate key @param certificate [required] certificate @param serviceName [required] The interna...
[ "Import", "your", "own", "ssl", "certificate", "on", "your", "IP", "load", "balancing", ".", "Ssl", "option", "is", "needed", "to", "use", "this", "url", "." ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1276-L1285
OpenLiberty/open-liberty
dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java
LifecycleCallbackHelper.getMethodNameFromDD
public String getMethodNameFromDD(List<LifecycleCallback> callbacks, String classname) { """ Gets the lifecycle callback method name from the application client module deployment descriptor @param callbacks a list of lifecycle-callback in the application client module deployment descriptor @param classname the...
java
public String getMethodNameFromDD(List<LifecycleCallback> callbacks, String classname) { String methodName = null; for (LifecycleCallback callback : callbacks) { // lifecycle-callback-class default to the enclosing component class Client String callbackClassName; call...
[ "public", "String", "getMethodNameFromDD", "(", "List", "<", "LifecycleCallback", ">", "callbacks", ",", "String", "classname", ")", "{", "String", "methodName", "=", "null", ";", "for", "(", "LifecycleCallback", "callback", ":", "callbacks", ")", "{", "// lifec...
Gets the lifecycle callback method name from the application client module deployment descriptor @param callbacks a list of lifecycle-callback in the application client module deployment descriptor @param classname the Class name @return the Mehtod name
[ "Gets", "the", "lifecycle", "callback", "method", "name", "from", "the", "application", "client", "module", "deployment", "descriptor" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.clientcontainer/src/com/ibm/ws/clientcontainer/internal/LifecycleCallbackHelper.java#L220-L238
alkacon/opencms-core
src/org/opencms/gwt/CmsCoreService.java
CmsCoreService.getCategoriesForSitePathStatic
public static List<CmsCategoryTreeEntry> getCategoriesForSitePathStatic(CmsObject cms, String sitePath) throws CmsException { """ Helper method for getting the category beans for the given site path.<p> @param cms the CMS context to use @param sitePath the site path @return the list of category beans @...
java
public static List<CmsCategoryTreeEntry> getCategoriesForSitePathStatic(CmsObject cms, String sitePath) throws CmsException { return getCategoriesForSitePathStatic(cms, sitePath, null); }
[ "public", "static", "List", "<", "CmsCategoryTreeEntry", ">", "getCategoriesForSitePathStatic", "(", "CmsObject", "cms", ",", "String", "sitePath", ")", "throws", "CmsException", "{", "return", "getCategoriesForSitePathStatic", "(", "cms", ",", "sitePath", ",", "null"...
Helper method for getting the category beans for the given site path.<p> @param cms the CMS context to use @param sitePath the site path @return the list of category beans @throws CmsException if something goes wrong
[ "Helper", "method", "for", "getting", "the", "category", "beans", "for", "the", "given", "site", "path", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/gwt/CmsCoreService.java#L165-L169
apereo/cas
support/cas-server-support-aup-core/src/main/java/org/apereo/cas/aup/AcceptableUsagePolicyStatus.java
AcceptableUsagePolicyStatus.addProperty
public AcceptableUsagePolicyStatus addProperty(final String name, final Object value) { """ Add property. @param name the name @param value the value @return the acceptable usage policy status """ this.properties.put(name, value); return this; }
java
public AcceptableUsagePolicyStatus addProperty(final String name, final Object value) { this.properties.put(name, value); return this; }
[ "public", "AcceptableUsagePolicyStatus", "addProperty", "(", "final", "String", "name", ",", "final", "Object", "value", ")", "{", "this", ".", "properties", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Add property. @param name the name @param value the value @return the acceptable usage policy status
[ "Add", "property", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-aup-core/src/main/java/org/apereo/cas/aup/AcceptableUsagePolicyStatus.java#L78-L81
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.maxLength
public static Validator<CharSequence> maxLength(@NonNull final CharSequence errorMessage, final int maxLength) { """ Creates and returns a validator, which allows to validate texts to ensure, that they are not longer than a specific length. @param errorMessag...
java
public static Validator<CharSequence> maxLength(@NonNull final CharSequence errorMessage, final int maxLength) { return new MaxLengthValidator(errorMessage, maxLength); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "maxLength", "(", "@", "NonNull", "final", "CharSequence", "errorMessage", ",", "final", "int", "maxLength", ")", "{", "return", "new", "MaxLengthValidator", "(", "errorMessage", ",", "maxLength", ")", "...
Creates and returns a validator, which allows to validate texts to ensure, that they are not longer than a specific length. @param errorMessage The error message, which should be shown, if the validation fails, as an instance of the type {@link CharSequence}. The error message may not be null @param maxLength The maxi...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "are", "not", "longer", "than", "a", "specific", "length", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L461-L464