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
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeColor
@Pure public static int getAttributeColor(Node document, String... path) { """ Replies the color that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives. @param do...
java
@Pure public static int getAttributeColor(Node document, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeColorWithDefault(document, true, 0, path); }
[ "@", "Pure", "public", "static", "int", "getAttributeColor", "(", "Node", "document", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0", ")", ";", "return", "getAttributeColorWi...
Replies the color that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. Be careful about the fact that the names are case sensitives. @param document is the XML document to explore. @param path is the list of and ended by the attribut...
[ "Replies", "the", "color", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L437-L441
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java
JobScheduleOperations.disableJobSchedule
public void disableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Disables the specified job schedule. Disabled schedules do not create new jobs, but may be re-enabled later. @param jobScheduleId The ID of the job schedule. @pa...
java
public void disableJobSchedule(String jobScheduleId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobScheduleDisableOptions options = new JobScheduleDisableOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);...
[ "public", "void", "disableJobSchedule", "(", "String", "jobScheduleId", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "JobScheduleDisableOptions", "options", "=", "new", "JobSchedule...
Disables the specified job schedule. Disabled schedules do not create new jobs, but may be re-enabled later. @param jobScheduleId The ID of the job schedule. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Excep...
[ "Disables", "the", "specified", "job", "schedule", ".", "Disabled", "schedules", "do", "not", "create", "new", "jobs", "but", "may", "be", "re", "-", "enabled", "later", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobScheduleOperations.java#L293-L299
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.getMessageLogger
public static <T> T getMessageLogger(Class<T> type, String category) { """ Get a typed logger which implements the given interface. The current default locale will be used for the new logger. @param type the interface to implement @param category the logger category @param <T> the logger type @return the ty...
java
public static <T> T getMessageLogger(Class<T> type, String category) { return getMessageLogger(type, category, Locale.getDefault()); }
[ "public", "static", "<", "T", ">", "T", "getMessageLogger", "(", "Class", "<", "T", ">", "type", ",", "String", "category", ")", "{", "return", "getMessageLogger", "(", "type", ",", "category", ",", "Locale", ".", "getDefault", "(", ")", ")", ";", "}" ...
Get a typed logger which implements the given interface. The current default locale will be used for the new logger. @param type the interface to implement @param category the logger category @param <T> the logger type @return the typed logger
[ "Get", "a", "typed", "logger", "which", "implements", "the", "given", "interface", ".", "The", "current", "default", "locale", "will", "be", "used", "for", "the", "new", "logger", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L2506-L2508
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/tenant/TenantService.java
TenantService.modifyTenantProperties
private void modifyTenantProperties(TenantDefinition oldTenantDef, TenantDefinition newTenantDef) { """ Set required properties in a new Tenant Definition. @param oldTenantDef Old {@link TenantDefinition}. @param newTenantDef New {@link TenantDefinition}. """ // _CreatedOn must be the same. _...
java
private void modifyTenantProperties(TenantDefinition oldTenantDef, TenantDefinition newTenantDef) { // _CreatedOn must be the same. _ModifiedOn must be updated. newTenantDef.setProperty(CREATED_ON_PROP, oldTenantDef.getProperty(CREATED_ON_PROP)); newTenantDef.setProperty(MODIFIED_ON_PROP, Utils....
[ "private", "void", "modifyTenantProperties", "(", "TenantDefinition", "oldTenantDef", ",", "TenantDefinition", "newTenantDef", ")", "{", "// _CreatedOn must be the same. _ModifiedOn must be updated.", "newTenantDef", ".", "setProperty", "(", "CREATED_ON_PROP", ",", "oldTenantDef"...
Set required properties in a new Tenant Definition. @param oldTenantDef Old {@link TenantDefinition}. @param newTenantDef New {@link TenantDefinition}.
[ "Set", "required", "properties", "in", "a", "new", "Tenant", "Definition", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/tenant/TenantService.java#L396-L400
paypal/SeLion
dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java
ReflectionUtils.instantiateWrapperObject
public static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) { """ This helper method facilitates creation of Wrapper data type object and initialize it with the provided value. @param type The type to instantiate. It has to be only a Wrapper data type [ such as...
java
public static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) { logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign }); validateParams(type, objectToInvokeUpon, valueToAssign); checkArgument(ClassUtils.isPrimitiveWrapper(type), ...
[ "public", "static", "Object", "instantiateWrapperObject", "(", "Class", "<", "?", ">", "type", ",", "Object", "objectToInvokeUpon", ",", "String", "valueToAssign", ")", "{", "logger", ".", "entering", "(", "new", "Object", "[", "]", "{", "type", ",", "object...
This helper method facilitates creation of Wrapper data type object and initialize it with the provided value. @param type The type to instantiate. It has to be only a Wrapper data type [ such as Integer, Float, Boolean etc.,] @param objectToInvokeUpon The object upon which the invocation is to be carried out. @param ...
[ "This", "helper", "method", "facilitates", "creation", "of", "Wrapper", "data", "type", "object", "and", "initialize", "it", "with", "the", "provided", "value", "." ]
train
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java#L254-L268
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.getSensitiveWordList
public SensitiveWordListResult getSensitiveWordList(int start, int count) throws APIConnectionException, APIRequestException { """ Get sensitive word list @param start the begin of the list @param count the count of the list @return SensitiveWordListResult @throws APIConnectionException connect exc...
java
public SensitiveWordListResult getSensitiveWordList(int start, int count) throws APIConnectionException, APIRequestException { return _sensitiveWordClient.getSensitiveWordList(start, count); }
[ "public", "SensitiveWordListResult", "getSensitiveWordList", "(", "int", "start", ",", "int", "count", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "return", "_sensitiveWordClient", ".", "getSensitiveWordList", "(", "start", ",", "count", ")...
Get sensitive word list @param start the begin of the list @param count the count of the list @return SensitiveWordListResult @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Get", "sensitive", "word", "list" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L745-L748
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/checksum/ChecksumExtensions.java
ChecksumExtensions.getChecksum
public static String getChecksum(final Algorithm algorithm, final byte[]... byteArrays) throws NoSuchAlgorithmException { """ Gets the checksum from the given byte arrays with the given algorithm @param algorithm the algorithm to get the checksum. This could be for instance "MD4", "MD5", "SHA-1", "SHA-256",...
java
public static String getChecksum(final Algorithm algorithm, final byte[]... byteArrays) throws NoSuchAlgorithmException { StringBuilder sb = new StringBuilder(); for (byte[] byteArray : byteArrays) { sb.append(getChecksum(byteArray, algorithm.getAlgorithm())); } return sb.toString(); }
[ "public", "static", "String", "getChecksum", "(", "final", "Algorithm", "algorithm", ",", "final", "byte", "[", "]", "...", "byteArrays", ")", "throws", "NoSuchAlgorithmException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "for", ...
Gets the checksum from the given byte arrays with the given algorithm @param algorithm the algorithm to get the checksum. This could be for instance "MD4", "MD5", "SHA-1", "SHA-256", "SHA-384" or "SHA-512". @param byteArrays the array of byte arrays @return The checksum from the given byte arrays as a String object. @...
[ "Gets", "the", "checksum", "from", "the", "given", "byte", "arrays", "with", "the", "given", "algorithm" ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/checksum/ChecksumExtensions.java#L80-L89
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/Method.java
Method.withRequestModels
public Method withRequestModels(java.util.Map<String, String> requestModels) { """ <p> A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request payloads of given content types (as the mapping key). </p> @param requestModels A key-value map specifyi...
java
public Method withRequestModels(java.util.Map<String, String> requestModels) { setRequestModels(requestModels); return this; }
[ "public", "Method", "withRequestModels", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "requestModels", ")", "{", "setRequestModels", "(", "requestModels", ")", ";", "return", "this", ";", "}" ]
<p> A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request payloads of given content types (as the mapping key). </p> @param requestModels A key-value map specifying data schemas, represented by <a>Model</a> resources, (as the mapped value) of the request p...
[ "<p", ">", "A", "key", "-", "value", "map", "specifying", "data", "schemas", "represented", "by", "<a", ">", "Model<", "/", "a", ">", "resources", "(", "as", "the", "mapped", "value", ")", "of", "the", "request", "payloads", "of", "given", "content", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/Method.java#L616-L619
super-csv/super-csv
super-csv/src/main/java/org/supercsv/cellprocessor/constraint/LMinMax.java
LMinMax.checkPreconditions
private static void checkPreconditions(final long min, final long max) { """ Checks the preconditions for creating a new LMinMax processor. @param min the minimum value (inclusive) @param max the maximum value (inclusive) @throws IllegalArgumentException if {@code max < min} """ if( max < min ) { ...
java
private static void checkPreconditions(final long min, final long max) { if( max < min ) { throw new IllegalArgumentException(String.format("max (%d) should not be < min (%d)", max, min)); } }
[ "private", "static", "void", "checkPreconditions", "(", "final", "long", "min", ",", "final", "long", "max", ")", "{", "if", "(", "max", "<", "min", ")", "{", "throw", "new", "IllegalArgumentException", "(", "String", ".", "format", "(", "\"max (%d) should n...
Checks the preconditions for creating a new LMinMax processor. @param min the minimum value (inclusive) @param max the maximum value (inclusive) @throws IllegalArgumentException if {@code max < min}
[ "Checks", "the", "preconditions", "for", "creating", "a", "new", "LMinMax", "processor", "." ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv/src/main/java/org/supercsv/cellprocessor/constraint/LMinMax.java#L125-L129
umeding/fuzzer
src/main/java/com/uwemeding/fuzzer/Member.java
Member.calculateEndPoints
public void calculateEndPoints(double start, double stop) { """ Adjust the point list so we have values at the end points <p> @param start start interval @param stop end interval """ Point p1 = points.get(0); if (p1.getX().doubleValue() != start) { points.add(0, new Point(start, p1.getY())); } ...
java
public void calculateEndPoints(double start, double stop) { Point p1 = points.get(0); if (p1.getX().doubleValue() != start) { points.add(0, new Point(start, p1.getY())); } int end = points.size(); Point p2 = points.get(end - 1); if (p2.getY().doubleValue() != stop) { points.add(end, new Point(stop, ...
[ "public", "void", "calculateEndPoints", "(", "double", "start", ",", "double", "stop", ")", "{", "Point", "p1", "=", "points", ".", "get", "(", "0", ")", ";", "if", "(", "p1", ".", "getX", "(", ")", ".", "doubleValue", "(", ")", "!=", "start", ")",...
Adjust the point list so we have values at the end points <p> @param start start interval @param stop end interval
[ "Adjust", "the", "point", "list", "so", "we", "have", "values", "at", "the", "end", "points", "<p", ">" ]
train
https://github.com/umeding/fuzzer/blob/e8aa46313bb1d1328865f26f99455124aede828c/src/main/java/com/uwemeding/fuzzer/Member.java#L255-L267
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/RepeaterExampleWithStaticIDs.java
RepeaterExampleWithStaticIDs.fetchDataList
private static List<ContactDetails> fetchDataList() { """ Retrieves dummy data used by this example. @return the list of data for this example. """ List<ContactDetails> list = new ArrayList<>(); list.add(new ContactDetails("David", "1234", new String[]{"a", "b"})); list.add(new ContactDetails("Jun", "...
java
private static List<ContactDetails> fetchDataList() { List<ContactDetails> list = new ArrayList<>(); list.add(new ContactDetails("David", "1234", new String[]{"a", "b"})); list.add(new ContactDetails("Jun", "1111", new String[]{"c"})); list.add(new ContactDetails("Martin", null, new String[]{"b"})); return li...
[ "private", "static", "List", "<", "ContactDetails", ">", "fetchDataList", "(", ")", "{", "List", "<", "ContactDetails", ">", "list", "=", "new", "ArrayList", "<>", "(", ")", ";", "list", ".", "add", "(", "new", "ContactDetails", "(", "\"David\"", ",", "\...
Retrieves dummy data used by this example. @return the list of data for this example.
[ "Retrieves", "dummy", "data", "used", "by", "this", "example", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/repeater/RepeaterExampleWithStaticIDs.java#L360-L366
petrbouda/joyrest
joyrest-core/src/main/java/org/joyrest/routing/PathComparator.java
PathComparator.compareParts
private static boolean compareParts(RoutePart<?> routePart, String pathPart) { """ Compares the route part (part which is configured) and the path part (part which is gained from the client). If it is just string path, so this method will compare the value of the strings. <p> If it is param path, so method wi...
java
private static boolean compareParts(RoutePart<?> routePart, String pathPart) { switch (routePart.getType()) { case PATH: return routePart.getValue().equals(pathPart); case PARAM: return routePart.getVariableType().isAssignableFromString(pathPart); ...
[ "private", "static", "boolean", "compareParts", "(", "RoutePart", "<", "?", ">", "routePart", ",", "String", "pathPart", ")", "{", "switch", "(", "routePart", ".", "getType", "(", ")", ")", "{", "case", "PATH", ":", "return", "routePart", ".", "getValue", ...
Compares the route part (part which is configured) and the path part (part which is gained from the client). If it is just string path, so this method will compare the value of the strings. <p> If it is param path, so method will find out whether is possible to cast the object or not. @param routePart configured part...
[ "Compares", "the", "route", "part", "(", "part", "which", "is", "configured", ")", "and", "the", "path", "part", "(", "part", "which", "is", "gained", "from", "the", "client", ")", "." ]
train
https://github.com/petrbouda/joyrest/blob/58903f06fb7f0b8fdf1ef91318fb48a88bf970e0/joyrest-core/src/main/java/org/joyrest/routing/PathComparator.java#L46-L55
lightbend/config
config/src/main/java/com/typesafe/config/ConfigFactory.java
ConfigFactory.parseResourcesAnySyntax
public static Config parseResourcesAnySyntax(Class<?> klass, String resourceBasename) { """ Like {@link #parseResourcesAnySyntax(Class,String,ConfigParseOptions)} but always uses default parse options. @param klass <code>klass.getClassLoader()</code> will be used to load resources, and non-absolute resource ...
java
public static Config parseResourcesAnySyntax(Class<?> klass, String resourceBasename) { return parseResourcesAnySyntax(klass, resourceBasename, ConfigParseOptions.defaults()); }
[ "public", "static", "Config", "parseResourcesAnySyntax", "(", "Class", "<", "?", ">", "klass", ",", "String", "resourceBasename", ")", "{", "return", "parseResourcesAnySyntax", "(", "klass", ",", "resourceBasename", ",", "ConfigParseOptions", ".", "defaults", "(", ...
Like {@link #parseResourcesAnySyntax(Class,String,ConfigParseOptions)} but always uses default parse options. @param klass <code>klass.getClassLoader()</code> will be used to load resources, and non-absolute resource names will have this class's package added @param resourceBasename a resource name as in {@link java.l...
[ "Like", "{", "@link", "#parseResourcesAnySyntax", "(", "Class", "String", "ConfigParseOptions", ")", "}", "but", "always", "uses", "default", "parse", "options", "." ]
train
https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigFactory.java#L907-L909
adorsys/hbci4java-adorsys
src/main/java/org/kapott/hbci/manager/HBCIUtils.java
HBCIUtils.checkAccountCRC
public static boolean checkAccountCRC(String blz, String number) { """ <p>Überprüft, ob gegebene BLZ und Kontonummer zueinander passen. Bei diesem Test wird wird die in die Kontonummer "eingebaute" Prüziffer verifiziert. Anhand der BLZ wird ermittelt, welches Prüfzifferverfahren zur Überprüfung eingesetzt werde...
java
public static boolean checkAccountCRC(String blz, String number) { BankInfo info = getBankInfo(blz); String alg = info != null ? info.getChecksumMethod() : null; // Im Zweifel lassen wir die Bankverbindung lieber durch if (alg == null || alg.length() != 2) { LoggerFactory.ge...
[ "public", "static", "boolean", "checkAccountCRC", "(", "String", "blz", ",", "String", "number", ")", "{", "BankInfo", "info", "=", "getBankInfo", "(", "blz", ")", ";", "String", "alg", "=", "info", "!=", "null", "?", "info", ".", "getChecksumMethod", "(",...
<p>Überprüft, ob gegebene BLZ und Kontonummer zueinander passen. Bei diesem Test wird wird die in die Kontonummer "eingebaute" Prüziffer verifiziert. Anhand der BLZ wird ermittelt, welches Prüfzifferverfahren zur Überprüfung eingesetzt werden muss.</p> <p>Ein positives Ergebnis dieser Routine bedeutet <em>nicht</em>, d...
[ "<p", ">", "Überprüft", "ob", "gegebene", "BLZ", "und", "Kontonummer", "zueinander", "passen", ".", "Bei", "diesem", "Test", "wird", "wird", "die", "in", "die", "Kontonummer", "eingebaute", "Prüziffer", "verifiziert", ".", "Anhand", "der", "BLZ", "wird", "ermi...
train
https://github.com/adorsys/hbci4java-adorsys/blob/5e24f7e429d6b555e1d993196b4cf1adda6433cf/src/main/java/org/kapott/hbci/manager/HBCIUtils.java#L550-L562
dnsjava/dnsjava
org/xbill/DNS/Cache.java
Cache.findAnyRecords
public RRset [] findAnyRecords(Name name, int type) { """ Looks up Records in the Cache (a wrapper around lookupRecords). Unlike lookupRecords, this given no indication of why failure occurred. @param name The name to look up @param type The type to look up @return An array of RRsets, or null @see Credibilit...
java
public RRset [] findAnyRecords(Name name, int type) { return findRecords(name, type, Credibility.GLUE); }
[ "public", "RRset", "[", "]", "findAnyRecords", "(", "Name", "name", ",", "int", "type", ")", "{", "return", "findRecords", "(", "name", ",", "type", ",", "Credibility", ".", "GLUE", ")", ";", "}" ]
Looks up Records in the Cache (a wrapper around lookupRecords). Unlike lookupRecords, this given no indication of why failure occurred. @param name The name to look up @param type The type to look up @return An array of RRsets, or null @see Credibility
[ "Looks", "up", "Records", "in", "the", "Cache", "(", "a", "wrapper", "around", "lookupRecords", ")", ".", "Unlike", "lookupRecords", "this", "given", "no", "indication", "of", "why", "failure", "occurred", "." ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/Cache.java#L546-L549
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.getCertificate
public AppServiceCertificateResourceInner getCertificate(String resourceGroupName, String certificateOrderName, String name) { """ Get the certificate associated with a certificate order. Get the certificate associated with a certificate order. @param resourceGroupName Name of the resource group to which the r...
java
public AppServiceCertificateResourceInner getCertificate(String resourceGroupName, String certificateOrderName, String name) { return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().body(); }
[ "public", "AppServiceCertificateResourceInner", "getCertificate", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ",", "String", "name", ")", "{", "return", "getCertificateWithServiceResponseAsync", "(", "resourceGroupName", ",", "certificateOrderName...
Get the certificate associated with a certificate order. Get the certificate associated with a certificate order. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @param name Name of the certificate. @throws IllegalArgumentExc...
[ "Get", "the", "certificate", "associated", "with", "a", "certificate", "order", ".", "Get", "the", "certificate", "associated", "with", "a", "certificate", "order", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1091-L1093
sshtools/j2ssh-maverick
j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java
SftpSubsystemChannel.openDirectory
public SftpFile openDirectory(String path) throws SftpStatusException, SshException { """ Open a directory. @param path @return sftpfile @throws SftpStatusException , SshException """ String absolutePath = getAbsolutePath(path); SftpFileAttributes attrs = getAttributes(absolutePath); if (!att...
java
public SftpFile openDirectory(String path) throws SftpStatusException, SshException { String absolutePath = getAbsolutePath(path); SftpFileAttributes attrs = getAttributes(absolutePath); if (!attrs.isDirectory()) { throw new SftpStatusException(SftpStatusException.SSH_FX_FAILURE, path + " is not a d...
[ "public", "SftpFile", "openDirectory", "(", "String", "path", ")", "throws", "SftpStatusException", ",", "SshException", "{", "String", "absolutePath", "=", "getAbsolutePath", "(", "path", ")", ";", "SftpFileAttributes", "attrs", "=", "getAttributes", "(", "absolute...
Open a directory. @param path @return sftpfile @throws SftpStatusException , SshException
[ "Open", "a", "directory", "." ]
train
https://github.com/sshtools/j2ssh-maverick/blob/ce11ceaf0aa0b129b54327a6891973e1e34689f7/j2ssh-maverick/src/main/java/com/sshtools/sftp/SftpSubsystemChannel.java#L1597-L1630
Terracotta-OSS/offheap-store
src/main/java/org/terracotta/offheapstore/paging/UpfrontAllocatingPageSource.java
UpfrontAllocatingPageSource.removeAllocationThreshold
public synchronized Runnable removeAllocationThreshold(ThresholdDirection direction, long threshold) { """ Removes an allocation threshold action. <p> Removes the allocation threshold action for the given level and direction. @param direction registered actions direction @param threshold registered actions t...
java
public synchronized Runnable removeAllocationThreshold(ThresholdDirection direction, long threshold) { switch (direction) { case RISING: return risingThresholds.remove(threshold); case FALLING: return fallingThresholds.remove(threshold); } throw new AssertionError()...
[ "public", "synchronized", "Runnable", "removeAllocationThreshold", "(", "ThresholdDirection", "direction", ",", "long", "threshold", ")", "{", "switch", "(", "direction", ")", "{", "case", "RISING", ":", "return", "risingThresholds", ".", "remove", "(", "threshold",...
Removes an allocation threshold action. <p> Removes the allocation threshold action for the given level and direction. @param direction registered actions direction @param threshold registered actions threshold level @return the removed condition or {@code null} if no action was present.
[ "Removes", "an", "allocation", "threshold", "action", ".", "<p", ">", "Removes", "the", "allocation", "threshold", "action", "for", "the", "given", "level", "and", "direction", "." ]
train
https://github.com/Terracotta-OSS/offheap-store/blob/600486cddb33c0247025c0cb69eff289eb6d7d93/src/main/java/org/terracotta/offheapstore/paging/UpfrontAllocatingPageSource.java#L462-L470
lucasr/probe
library/src/main/java/org/lucasr/probe/Interceptor.java
Interceptor.invokeOnLayout
protected final void invokeOnLayout(View view, boolean changed, int l, int t, int r, int b) { """ Performs an {@link View#onLayout(boolean, int, int, int, int)} call on the given {@link View}. """ final ViewProxy proxy = (ViewProxy) view; proxy.invokeOnLayout(changed, l, t, r, b); }
java
protected final void invokeOnLayout(View view, boolean changed, int l, int t, int r, int b) { final ViewProxy proxy = (ViewProxy) view; proxy.invokeOnLayout(changed, l, t, r, b); }
[ "protected", "final", "void", "invokeOnLayout", "(", "View", "view", ",", "boolean", "changed", ",", "int", "l", ",", "int", "t", ",", "int", "r", ",", "int", "b", ")", "{", "final", "ViewProxy", "proxy", "=", "(", "ViewProxy", ")", "view", ";", "pro...
Performs an {@link View#onLayout(boolean, int, int, int, int)} call on the given {@link View}.
[ "Performs", "an", "{" ]
train
https://github.com/lucasr/probe/blob/cd15cc04383a1bf85de2f4c345d2018415b9ddc9/library/src/main/java/org/lucasr/probe/Interceptor.java#L75-L78
davidmoten/ppk
ppk/src/main/java/com/github/davidmoten/security/PPK.java
PPK.privateKey
public static final Builder privateKey(Class<?> cls, String resource) { """ Returns a builder having loaded the private key from the classpath relative to the classloader used by {@code cls}. @param cls the class whose classloader is used to load the resource @param resource the resource path @return the P...
java
public static final Builder privateKey(Class<?> cls, String resource) { return new Builder().privateKey(cls, resource); }
[ "public", "static", "final", "Builder", "privateKey", "(", "Class", "<", "?", ">", "cls", ",", "String", "resource", ")", "{", "return", "new", "Builder", "(", ")", ".", "privateKey", "(", "cls", ",", "resource", ")", ";", "}" ]
Returns a builder having loaded the private key from the classpath relative to the classloader used by {@code cls}. @param cls the class whose classloader is used to load the resource @param resource the resource path @return the PPK builder
[ "Returns", "a", "builder", "having", "loaded", "the", "private", "key", "from", "the", "classpath", "relative", "to", "the", "classloader", "used", "by", "{", "@code", "cls", "}", "." ]
train
https://github.com/davidmoten/ppk/blob/7506ed490445927fbdeec2fe9c70b4a589a951cb/ppk/src/main/java/com/github/davidmoten/security/PPK.java#L115-L117
radkovo/Pdf2Dom
src/main/java/org/fit/cssbox/pdf/CSSBoxTree.java
CSSBoxTree.createTextBox
protected TextBox createTextBox(BlockBox contblock, Text n) { """ Creates a text box with the given parent and text node assigned. @param contblock The parent node (and the containing block in the same time) @param n The corresponding text node in the DOM tree. @return The new text box. """ TextBox ...
java
protected TextBox createTextBox(BlockBox contblock, Text n) { TextBox text = new TextBox(n, (Graphics2D) contblock.getGraphics().create(), contblock.getVisualContext().create()); text.setOrder(next_order++); text.setContainingBlockBox(contblock); text.setClipBlock(contblock); ...
[ "protected", "TextBox", "createTextBox", "(", "BlockBox", "contblock", ",", "Text", "n", ")", "{", "TextBox", "text", "=", "new", "TextBox", "(", "n", ",", "(", "Graphics2D", ")", "contblock", ".", "getGraphics", "(", ")", ".", "create", "(", ")", ",", ...
Creates a text box with the given parent and text node assigned. @param contblock The parent node (and the containing block in the same time) @param n The corresponding text node in the DOM tree. @return The new text box.
[ "Creates", "a", "text", "box", "with", "the", "given", "parent", "and", "text", "node", "assigned", "." ]
train
https://github.com/radkovo/Pdf2Dom/blob/12e52b80eca7f57fc41e6ed895bf1db72c38da53/src/main/java/org/fit/cssbox/pdf/CSSBoxTree.java#L315-L324
Azure/azure-sdk-for-java
iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java
AppsInner.createOrUpdateAsync
public Observable<AppInner> createOrUpdateAsync(String resourceGroupName, String resourceName, AppInner app) { """ Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them wit...
java
public Observable<AppInner> createOrUpdateAsync(String resourceGroupName, String resourceName, AppInner app) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, app).map(new Func1<ServiceResponse<AppInner>, AppInner>() { @Override public AppInner call(Service...
[ "public", "Observable", "<", "AppInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "AppInner", "app", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", "...
Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. @param resourceGroupName The name of the res...
[ "Create", "or", "update", "the", "metadata", "of", "an", "IoT", "Central", "application", ".", "The", "usual", "pattern", "to", "modify", "a", "property", "is", "to", "retrieve", "the", "IoT", "Central", "application", "metadata", "and", "security", "metadata"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java#L245-L252
undertow-io/undertow
core/src/main/java/io/undertow/util/WorkerUtils.java
WorkerUtils.executeAfter
public static XnioExecutor.Key executeAfter(XnioIoThread thread, Runnable task, long timeout, TimeUnit timeUnit) { """ Schedules a task for future execution. If the execution is rejected because the worker is shutting down then it is logged at debug level and the exception is not re-thrown @param thread The IO...
java
public static XnioExecutor.Key executeAfter(XnioIoThread thread, Runnable task, long timeout, TimeUnit timeUnit) { try { return thread.executeAfter(task, timeout, timeUnit); } catch (RejectedExecutionException e) { if(thread.getWorker().isShutdown()) { UndertowLog...
[ "public", "static", "XnioExecutor", ".", "Key", "executeAfter", "(", "XnioIoThread", "thread", ",", "Runnable", "task", ",", "long", "timeout", ",", "TimeUnit", "timeUnit", ")", "{", "try", "{", "return", "thread", ".", "executeAfter", "(", "task", ",", "tim...
Schedules a task for future execution. If the execution is rejected because the worker is shutting down then it is logged at debug level and the exception is not re-thrown @param thread The IO thread @param task The task to execute @param timeout The timeout @param timeUnit The time unit
[ "Schedules", "a", "task", "for", "future", "execution", ".", "If", "the", "execution", "is", "rejected", "because", "the", "worker", "is", "shutting", "down", "then", "it", "is", "logged", "at", "debug", "level", "and", "the", "exception", "is", "not", "re...
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/WorkerUtils.java#L44-L61
hawkular/hawkular-apm
client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java
FragmentBuilder.popNode
protected Node popNode(Stack<Node> stack, Class<? extends Node> cls, String uri) { """ This method pops a node of the defined class and optional uri from the stack. If the uri is not defined, then the latest node of the approach class will be chosen. @param stack The stack @param cls The node type @param ur...
java
protected Node popNode(Stack<Node> stack, Class<? extends Node> cls, String uri) { Node top = stack.isEmpty() ? null : stack.peek(); if (top != null) { if (nodeMatches(top, cls, uri)) { Node node = stack.pop(); poppedNodes.push(node); return n...
[ "protected", "Node", "popNode", "(", "Stack", "<", "Node", ">", "stack", ",", "Class", "<", "?", "extends", "Node", ">", "cls", ",", "String", "uri", ")", "{", "Node", "top", "=", "stack", ".", "isEmpty", "(", ")", "?", "null", ":", "stack", ".", ...
This method pops a node of the defined class and optional uri from the stack. If the uri is not defined, then the latest node of the approach class will be chosen. @param stack The stack @param cls The node type @param uri The optional uri to match @return The node, or null if no suitable candidate is found
[ "This", "method", "pops", "a", "node", "of", "the", "defined", "class", "and", "optional", "uri", "from", "the", "stack", ".", "If", "the", "uri", "is", "not", "defined", "then", "the", "latest", "node", "of", "the", "approach", "class", "will", "be", ...
train
https://github.com/hawkular/hawkular-apm/blob/57a4df0611b359597626563ea5f9ac64d4bb2533/client/collector/src/main/java/org/hawkular/apm/client/collector/internal/FragmentBuilder.java#L315-L337
openengsb/openengsb
api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java
TransformationDescription.lengthField
public void lengthField(String sourceField, String targetField, String function) { """ Adds a length step to the transformation description. The step takes the object from the source field and calculate the length through the given method function (which needs to be implemented by the object). The result will be...
java
public void lengthField(String sourceField, String targetField, String function) { TransformationStep step = new TransformationStep(); step.setSourceFields(sourceField); step.setTargetField(targetField); step.setOperationParameter(TransformationConstants.LENGTH_FUNCTION_PARAM, function);...
[ "public", "void", "lengthField", "(", "String", "sourceField", ",", "String", "targetField", ",", "String", "function", ")", "{", "TransformationStep", "step", "=", "new", "TransformationStep", "(", ")", ";", "step", ".", "setSourceFields", "(", "sourceField", "...
Adds a length step to the transformation description. The step takes the object from the source field and calculate the length through the given method function (which needs to be implemented by the object). The result will be written in the target field. If the function is null, then "length" will be taken as standard...
[ "Adds", "a", "length", "step", "to", "the", "transformation", "description", ".", "The", "step", "takes", "the", "object", "from", "the", "source", "field", "and", "calculate", "the", "length", "through", "the", "given", "method", "function", "(", "which", "...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L165-L172
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java
OpenShiftManagedClustersInner.beginUpdateTags
public OpenShiftManagedClusterInner beginUpdateTags(String resourceGroupName, String resourceName) { """ Updates tags on an OpenShift managed cluster. Updates an OpenShift managed cluster with the specified tags. @param resourceGroupName The name of the resource group. @param resourceName The name of the Open...
java
public OpenShiftManagedClusterInner beginUpdateTags(String resourceGroupName, String resourceName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName).toBlocking().single().body(); }
[ "public", "OpenShiftManagedClusterInner", "beginUpdateTags", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "toBlocking", "(", ")", ...
Updates tags on an OpenShift managed cluster. Updates an OpenShift managed cluster with the specified tags. @param resourceGroupName The name of the resource group. @param resourceName The name of the OpenShift managed cluster resource. @throws IllegalArgumentException thrown if parameters fail the validation @throws ...
[ "Updates", "tags", "on", "an", "OpenShift", "managed", "cluster", ".", "Updates", "an", "OpenShift", "managed", "cluster", "with", "the", "specified", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/OpenShiftManagedClustersInner.java#L770-L772
osglworks/java-tool
src/main/java/org/osgl/Lang.java
Comparator.thenComparing
public <U extends Comparable<? super U>> Comparator<T> thenComparing( Function<? super T, ? extends U> keyExtractor, java.util.Comparator<? super U> keyComparator ) { """ See <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#thenComparing-java.util...
java
public <U extends Comparable<? super U>> Comparator<T> thenComparing( Function<? super T, ? extends U> keyExtractor, java.util.Comparator<? super U> keyComparator ) { return thenComparing(F.comparing(keyExtractor, keyComparator)); }
[ "public", "<", "U", "extends", "Comparable", "<", "?", "super", "U", ">", ">", "Comparator", "<", "T", ">", "thenComparing", "(", "Function", "<", "?", "super", "T", ",", "?", "extends", "U", ">", "keyExtractor", ",", "java", ".", "util", ".", "Compa...
See <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html#thenComparing-java.util.function.Function-java.util.Comparator-">Java 8 doc</a> @param keyExtractor The function to extract the key for comparison @param keyComparator The function to compare the extracted key @param <U> the generic type ...
[ "See", "<a", "href", "=", "https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "8", "/", "docs", "/", "api", "/", "java", "/", "util", "/", "Comparator", ".", "html#thenComparing", "-", "java", ".", "util", ".", "function", "....
train
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/Lang.java#L2093-L2098
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java
AbstractValidateableView.createFocusChangeListener
private OnFocusChangeListener createFocusChangeListener() { """ Creates and returns a listener, which allows to validate the value of the view, when the view loses its focus. @return The listener, which has been created, as an instance of the type {@link OnFocusChangeListener} """ return new OnFoc...
java
private OnFocusChangeListener createFocusChangeListener() { return new OnFocusChangeListener() { @Override public final void onFocusChange(final View view, final boolean hasFocus) { if (!hasFocus && isValidatedOnFocusLost()) { validate(); ...
[ "private", "OnFocusChangeListener", "createFocusChangeListener", "(", ")", "{", "return", "new", "OnFocusChangeListener", "(", ")", "{", "@", "Override", "public", "final", "void", "onFocusChange", "(", "final", "View", "view", ",", "final", "boolean", "hasFocus", ...
Creates and returns a listener, which allows to validate the value of the view, when the view loses its focus. @return The listener, which has been created, as an instance of the type {@link OnFocusChangeListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "validate", "the", "value", "of", "the", "view", "when", "the", "view", "loses", "its", "focus", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/AbstractValidateableView.java#L349-L360
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.notEquals
@Throws(IllegalEqualException.class) public static void notEquals(final boolean condition, final boolean expected, final boolean check, @Nonnull final String message) { """ Ensures that a passed boolean is not equal to another boolean. The comparison is made using <code>expected == check</code>. @param condit...
java
@Throws(IllegalEqualException.class) public static void notEquals(final boolean condition, final boolean expected, final boolean check, @Nonnull final String message) { if (condition) { Check.notEquals(expected, check, message); } }
[ "@", "Throws", "(", "IllegalEqualException", ".", "class", ")", "public", "static", "void", "notEquals", "(", "final", "boolean", "condition", ",", "final", "boolean", "expected", ",", "final", "boolean", "check", ",", "@", "Nonnull", "final", "String", "messa...
Ensures that a passed boolean is not equal to another boolean. The comparison is made using <code>expected == check</code>. @param condition condition must be {@code true}^ so that the check will be performed @param expected Expected value @param check boolean to be checked @param message an error message describing w...
[ "Ensures", "that", "a", "passed", "boolean", "is", "not", "equal", "to", "another", "boolean", ".", "The", "comparison", "is", "made", "using", "<code", ">", "expected", "==", "check<", "/", "code", ">", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L1488-L1493
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java
WTableRenderer.doPaintRows
private void doPaintRows(final WTable table, final WebXmlRenderContext renderContext) { """ Override paintRow so that we only paint the first-level nodes for tree-tables. @param table the table to paint the rows for. @param renderContext the RenderContext to paint to. """ TableRepeater repeater = table.g...
java
private void doPaintRows(final WTable table, final WebXmlRenderContext renderContext) { TableRepeater repeater = table.getRepeater(); WComponent row = repeater.getRepeatedComponent(); List<RowIdWrapper> wrappers = repeater.getBeanList(); Set<?> otherSelectedRows = new HashSet<>(table.getSelectedRows()); i...
[ "private", "void", "doPaintRows", "(", "final", "WTable", "table", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "TableRepeater", "repeater", "=", "table", ".", "getRepeater", "(", ")", ";", "WComponent", "row", "=", "repeater", ".", "getRepeat...
Override paintRow so that we only paint the first-level nodes for tree-tables. @param table the table to paint the rows for. @param renderContext the RenderContext to paint to.
[ "Override", "paintRow", "so", "that", "we", "only", "paint", "the", "first", "-", "level", "nodes", "for", "tree", "-", "tables", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WTableRenderer.java#L371-L409
alkacon/opencms-core
src/org/opencms/util/CmsXsltUtil.java
CmsXsltUtil.isFormattingInformation
private static boolean isFormattingInformation(String formatString, String delimiter) { """ Tests if the given string is a <code>delimiter</code> separated list of formatting information.<p> @param formatString the string to check @param delimiter the list separators @return true if the string is a <code>de...
java
private static boolean isFormattingInformation(String formatString, String delimiter) { String[] formatStrings = formatString.split(delimiter); for (int i = 0; i < formatStrings.length; i++) { if (!formatStrings[i].trim().matches("[lcr]")) { return false; } ...
[ "private", "static", "boolean", "isFormattingInformation", "(", "String", "formatString", ",", "String", "delimiter", ")", "{", "String", "[", "]", "formatStrings", "=", "formatString", ".", "split", "(", "delimiter", ")", ";", "for", "(", "int", "i", "=", "...
Tests if the given string is a <code>delimiter</code> separated list of formatting information.<p> @param formatString the string to check @param delimiter the list separators @return true if the string is a <code>delimiter</code> separated list of Formatting Information
[ "Tests", "if", "the", "given", "string", "is", "a", "<code", ">", "delimiter<", "/", "code", ">", "separated", "list", "of", "formatting", "information", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsXsltUtil.java#L285-L294
apache/incubator-shardingsphere
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/encrypt/ShardingEncryptorStrategy.java
ShardingEncryptorStrategy.getShardingEncryptor
public Optional<ShardingEncryptor> getShardingEncryptor(final String logicTableName, final String columnName) { """ Get sharding encryptor. @param logicTableName logic table name @param columnName column name @return optional of sharding encryptor """ return Collections2.filter(columns, new Predic...
java
public Optional<ShardingEncryptor> getShardingEncryptor(final String logicTableName, final String columnName) { return Collections2.filter(columns, new Predicate<ColumnNode>() { @Override public boolean apply(final ColumnNode input) { return input.equals(new ...
[ "public", "Optional", "<", "ShardingEncryptor", ">", "getShardingEncryptor", "(", "final", "String", "logicTableName", ",", "final", "String", "columnName", ")", "{", "return", "Collections2", ".", "filter", "(", "columns", ",", "new", "Predicate", "<", "ColumnNod...
Get sharding encryptor. @param logicTableName logic table name @param columnName column name @return optional of sharding encryptor
[ "Get", "sharding", "encryptor", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/encrypt/ShardingEncryptorStrategy.java#L74-L82
naver/android-utilset
UtilSet/src/com/navercorp/utilset/network/NetworkMonitor.java
NetworkMonitor.isWifiFake
public boolean isWifiFake(String ipAddress, int port) { """ Checks if currently connected Access Point is either rogue or incapable of routing packet @param ipAddress Any valid IP addresses will work to check if the device is connected to properly working AP @param port Port number bound with ipAddress par...
java
public boolean isWifiFake(String ipAddress, int port) { SocketChannel socketChannel = null; try { socketChannel = SocketChannel.open(); socketChannel.connect(new InetSocketAddress(ipAddress, port)); } catch (IOException e) { Log.d(TAG, "Current Wifi is stupid!!! by IOException"); return true; } catc...
[ "public", "boolean", "isWifiFake", "(", "String", "ipAddress", ",", "int", "port", ")", "{", "SocketChannel", "socketChannel", "=", "null", ";", "try", "{", "socketChannel", "=", "SocketChannel", ".", "open", "(", ")", ";", "socketChannel", ".", "connect", "...
Checks if currently connected Access Point is either rogue or incapable of routing packet @param ipAddress Any valid IP addresses will work to check if the device is connected to properly working AP @param port Port number bound with ipAddress parameter @return true if currently connected AP is not working normally; f...
[ "Checks", "if", "currently", "connected", "Access", "Point", "is", "either", "rogue", "or", "incapable", "of", "routing", "packet" ]
train
https://github.com/naver/android-utilset/blob/4af5f821466bc5bec4ea221ca6d87e0ac9b87e0b/UtilSet/src/com/navercorp/utilset/network/NetworkMonitor.java#L756-L776
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/util/StringUtils.java
StringUtils.addEnd
public static String addEnd(String str, String add) { """ <p>Adds a substring only if the source string does not already end with the substring, otherwise returns the source string.</p> <p/> <p>A {@code null} source string will return {@code null}. An empty ("") source string will return the empty string. A {...
java
public static String addEnd(String str, String add) { if (isNullOrEmpty(add)) { return str; } if (isNullOrEmpty(str)) { return add; } if (!str.endsWith(add)) { return str + add; } return str; }
[ "public", "static", "String", "addEnd", "(", "String", "str", ",", "String", "add", ")", "{", "if", "(", "isNullOrEmpty", "(", "add", ")", ")", "{", "return", "str", ";", "}", "if", "(", "isNullOrEmpty", "(", "str", ")", ")", "{", "return", "add", ...
<p>Adds a substring only if the source string does not already end with the substring, otherwise returns the source string.</p> <p/> <p>A {@code null} source string will return {@code null}. An empty ("") source string will return the empty string. A {@code null} search string will return the source string.</p> <p/> <p...
[ "<p", ">", "Adds", "a", "substring", "only", "if", "the", "source", "string", "does", "not", "already", "end", "with", "the", "substring", "otherwise", "returns", "the", "source", "string", ".", "<", "/", "p", ">", "<p", "/", ">", "<p", ">", "A", "{"...
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/util/StringUtils.java#L179-L193
apache/predictionio-sdk-java
client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java
EventClient.deleteItem
public String deleteItem(String iid, DateTime eventTime) throws ExecutionException, InterruptedException, IOException { """ Deletes a item. @param iid ID of the item @param eventTime timestamp of the event @return ID of this event """ return createEvent(deleteItemAsFuture(iid, eventTime)); }
java
public String deleteItem(String iid, DateTime eventTime) throws ExecutionException, InterruptedException, IOException { return createEvent(deleteItemAsFuture(iid, eventTime)); }
[ "public", "String", "deleteItem", "(", "String", "iid", ",", "DateTime", "eventTime", ")", "throws", "ExecutionException", ",", "InterruptedException", ",", "IOException", "{", "return", "createEvent", "(", "deleteItemAsFuture", "(", "iid", ",", "eventTime", ")", ...
Deletes a item. @param iid ID of the item @param eventTime timestamp of the event @return ID of this event
[ "Deletes", "a", "item", "." ]
train
https://github.com/apache/predictionio-sdk-java/blob/16052c96b136340c175c3f9c2692e720850df219/client/src/main/java/org/apache/predictionio/sdk/java/EventClient.java#L588-L591
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/ssl/SSLHandlerFactory.java
SSLHandlerFactory.buildClientSSLEngine
public SSLEngine buildClientSSLEngine(String host, int port) { """ Build ssl engine for client side. @param host peer host @param port peer port @return client ssl engine """ SSLEngine engine = sslContext.createSSLEngine(host, port); engine.setUseClientMode(true); return addCommonC...
java
public SSLEngine buildClientSSLEngine(String host, int port) { SSLEngine engine = sslContext.createSSLEngine(host, port); engine.setUseClientMode(true); return addCommonConfigs(engine); }
[ "public", "SSLEngine", "buildClientSSLEngine", "(", "String", "host", ",", "int", "port", ")", "{", "SSLEngine", "engine", "=", "sslContext", ".", "createSSLEngine", "(", "host", ",", "port", ")", ";", "engine", ".", "setUseClientMode", "(", "true", ")", ";"...
Build ssl engine for client side. @param host peer host @param port peer port @return client ssl engine
[ "Build", "ssl", "engine", "for", "client", "side", "." ]
train
https://github.com/wso2/transport-http/blob/c51aa715b473db6c1b82a7d7b22f6e65f74df4c9/components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/ssl/SSLHandlerFactory.java#L217-L221
lightblue-platform/lightblue-migrator
migrator/src/main/java/com/redhat/lightblue/migrator/Utils.java
Utils.fastCompareDocs
public static boolean fastCompareDocs(JsonNode sourceDocument, JsonNode destinationDocument, List<String> exclusionPaths, boolean ignoreTimestampMSDiffs) { """ Compare two docs fast if they are the same, excluding exclusions @return true if documents are different """ try { JsonDiff diff...
java
public static boolean fastCompareDocs(JsonNode sourceDocument, JsonNode destinationDocument, List<String> exclusionPaths, boolean ignoreTimestampMSDiffs) { try { JsonDiff diff = new JsonDiff(); diff.setOption(JsonDiff.Option.ARRAY_ORDER_INSIGNIFICANT); diff.setOption(JsonDiff...
[ "public", "static", "boolean", "fastCompareDocs", "(", "JsonNode", "sourceDocument", ",", "JsonNode", "destinationDocument", ",", "List", "<", "String", ">", "exclusionPaths", ",", "boolean", "ignoreTimestampMSDiffs", ")", "{", "try", "{", "JsonDiff", "diff", "=", ...
Compare two docs fast if they are the same, excluding exclusions @return true if documents are different
[ "Compare", "two", "docs", "fast", "if", "they", "are", "the", "same", "excluding", "exclusions" ]
train
https://github.com/lightblue-platform/lightblue-migrator/blob/ec20748557b40d1f7851e1816d1b76dae48d2027/migrator/src/main/java/com/redhat/lightblue/migrator/Utils.java#L132-L155
alkacon/opencms-core
src/org/opencms/widgets/A_CmsFormatterWidget.java
A_CmsFormatterWidget.getWidgetOptionForFormatter
public static CmsSelectWidgetOption getWidgetOptionForFormatter(CmsObject cms, I_CmsFormatterBean formatter) throws Exception { """ Creates a widget option corresponding to a formatter bean for an external formatter.<p> @param cms the current CMS context @param formatter the formatter bean @return the s...
java
public static CmsSelectWidgetOption getWidgetOptionForFormatter(CmsObject cms, I_CmsFormatterBean formatter) throws Exception { String name = formatter.getNiceName(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms)) + " " + formatter.getResourceTypeNames().toString() ...
[ "public", "static", "CmsSelectWidgetOption", "getWidgetOptionForFormatter", "(", "CmsObject", "cms", ",", "I_CmsFormatterBean", "formatter", ")", "throws", "Exception", "{", "String", "name", "=", "formatter", ".", "getNiceName", "(", "OpenCms", ".", "getWorkplaceManage...
Creates a widget option corresponding to a formatter bean for an external formatter.<p> @param cms the current CMS context @param formatter the formatter bean @return the select option which was created @throws Exception in case reading the formatter configuration file fails
[ "Creates", "a", "widget", "option", "corresponding", "to", "a", "formatter", "bean", "for", "an", "external", "formatter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/widgets/A_CmsFormatterWidget.java#L98-L113
zeromq/jeromq
src/main/java/org/zeromq/ZSocket.java
ZSocket.sendFrame
public boolean sendFrame(ZFrame frame, int flags) { """ Send a frame @param frame @param flags @return return true if successful """ final byte[] data = frame.getData(); final Msg msg = new Msg(data); if (socketBase.send(msg, flags)) { return true; } may...
java
public boolean sendFrame(ZFrame frame, int flags) { final byte[] data = frame.getData(); final Msg msg = new Msg(data); if (socketBase.send(msg, flags)) { return true; } mayRaise(); return false; }
[ "public", "boolean", "sendFrame", "(", "ZFrame", "frame", ",", "int", "flags", ")", "{", "final", "byte", "[", "]", "data", "=", "frame", ".", "getData", "(", ")", ";", "final", "Msg", "msg", "=", "new", "Msg", "(", "data", ")", ";", "if", "(", "...
Send a frame @param frame @param flags @return return true if successful
[ "Send", "a", "frame" ]
train
https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/org/zeromq/ZSocket.java#L167-L176
SonarSource/sonarqube
server/sonar-server-common/src/main/java/org/sonar/server/es/SearchOptions.java
SearchOptions.setPage
public SearchOptions setPage(int page, int pageSize) { """ Set offset and limit according to page approach. If pageSize is negative, then {@link #MAX_LIMIT} is used. """ checkArgument(page >= 1, "Page must be greater or equal to 1 (got " + page + ")"); int lastResultIndex = page * pageSize; checkA...
java
public SearchOptions setPage(int page, int pageSize) { checkArgument(page >= 1, "Page must be greater or equal to 1 (got " + page + ")"); int lastResultIndex = page * pageSize; checkArgument(lastResultIndex <= MAX_RETURNABLE_RESULTS, "Can return only the first %s results. %sth result asked.", MAX_RETURNABLE...
[ "public", "SearchOptions", "setPage", "(", "int", "page", ",", "int", "pageSize", ")", "{", "checkArgument", "(", "page", ">=", "1", ",", "\"Page must be greater or equal to 1 (got \"", "+", "page", "+", "\")\"", ")", ";", "int", "lastResultIndex", "=", "page", ...
Set offset and limit according to page approach. If pageSize is negative, then {@link #MAX_LIMIT} is used.
[ "Set", "offset", "and", "limit", "according", "to", "page", "approach", ".", "If", "pageSize", "is", "negative", "then", "{" ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-server-common/src/main/java/org/sonar/server/es/SearchOptions.java#L69-L76
VoltDB/voltdb
third_party/java/src/com/google_voltpatches/common/primitives/Ints.java
Ints.fromByteArray
@GwtIncompatible // doesn't work public static int fromByteArray(byte[] bytes) { """ Returns the {@code int} value whose big-endian representation is stored in the first 4 bytes of {@code bytes}; equivalent to {@code ByteBuffer.wrap(bytes).getInt()}. For example, the input byte array {@code {0x12, 0x13, 0x14, ...
java
@GwtIncompatible // doesn't work public static int fromByteArray(byte[] bytes) { checkArgument(bytes.length >= BYTES, "array too small: %s < %s", bytes.length, BYTES); return fromBytes(bytes[0], bytes[1], bytes[2], bytes[3]); }
[ "@", "GwtIncompatible", "// doesn't work", "public", "static", "int", "fromByteArray", "(", "byte", "[", "]", "bytes", ")", "{", "checkArgument", "(", "bytes", ".", "length", ">=", "BYTES", ",", "\"array too small: %s < %s\"", ",", "bytes", ".", "length", ",", ...
Returns the {@code int} value whose big-endian representation is stored in the first 4 bytes of {@code bytes}; equivalent to {@code ByteBuffer.wrap(bytes).getInt()}. For example, the input byte array {@code {0x12, 0x13, 0x14, 0x15, 0x33}} would yield the {@code int} value {@code 0x12131415}. <p>Arguably, it's preferab...
[ "Returns", "the", "{", "@code", "int", "}", "value", "whose", "big", "-", "endian", "representation", "is", "stored", "in", "the", "first", "4", "bytes", "of", "{", "@code", "bytes", "}", ";", "equivalent", "to", "{", "@code", "ByteBuffer", ".", "wrap", ...
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/com/google_voltpatches/common/primitives/Ints.java#L307-L311
sothawo/mapjfx
src/main/java/com/sothawo/mapjfx/MapView.java
JavaConnector.processLabelClicked
private void processLabelClicked(final String name, final ClickType clickType) { """ called when a label was clicked. @param name name of the lael @param clickType the type of click """ if (logger.isTraceEnabled()) { logger.trace("JS reports label {} clicked {}", name, clickTy...
java
private void processLabelClicked(final String name, final ClickType clickType) { if (logger.isTraceEnabled()) { logger.trace("JS reports label {} clicked {}", name, clickType); } synchronized (mapCoordinateElements) { if (mapCoordinateElements.contains...
[ "private", "void", "processLabelClicked", "(", "final", "String", "name", ",", "final", "ClickType", "clickType", ")", "{", "if", "(", "logger", ".", "isTraceEnabled", "(", ")", ")", "{", "logger", ".", "trace", "(", "\"JS reports label {} clicked {}\"", ",", ...
called when a label was clicked. @param name name of the lael @param clickType the type of click
[ "called", "when", "a", "label", "was", "clicked", "." ]
train
https://github.com/sothawo/mapjfx/blob/202091de492ab7a8b000c77efd833029f7f0ef92/src/main/java/com/sothawo/mapjfx/MapView.java#L1588-L1624
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/ListDisplayPanel.java
ListDisplayPanel.addItem
public synchronized void addItem( final JComponent panel , final String name ) { """ Displays a new JPanel in the list. @param panel The panel being displayed @param name Name of the image. Shown in the list. """ Dimension panelD = panel.getPreferredSize(); final boolean sizeChanged = bodyWidth != p...
java
public synchronized void addItem( final JComponent panel , final String name ) { Dimension panelD = panel.getPreferredSize(); final boolean sizeChanged = bodyWidth != panelD.width || bodyHeight != panelD.height; // make the preferred size large enough to hold all the images bodyWidth = (int)Math.max(bodyWidt...
[ "public", "synchronized", "void", "addItem", "(", "final", "JComponent", "panel", ",", "final", "String", "name", ")", "{", "Dimension", "panelD", "=", "panel", ".", "getPreferredSize", "(", ")", ";", "final", "boolean", "sizeChanged", "=", "bodyWidth", "!=", ...
Displays a new JPanel in the list. @param panel The panel being displayed @param name Name of the image. Shown in the list.
[ "Displays", "a", "new", "JPanel", "in", "the", "list", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/ListDisplayPanel.java#L115-L146
chrisjenx/Calligraphy
calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyUtils.java
CalligraphyUtils.pullFontPathFromTextAppearance
static String pullFontPathFromTextAppearance(final Context context, AttributeSet attrs, int[] attributeId) { """ Tries to pull the Font Path from the Text Appearance. @param context Activity Context @param attrs View Attributes @param attributeId if -1 returns null. @return returns null if attribut...
java
static String pullFontPathFromTextAppearance(final Context context, AttributeSet attrs, int[] attributeId) { if (attributeId == null || attrs == null) { return null; } int textAppearanceId = -1; final TypedArray typedArrayAttr = context.obtainStyledAttributes(attrs, ANDROID_...
[ "static", "String", "pullFontPathFromTextAppearance", "(", "final", "Context", "context", ",", "AttributeSet", "attrs", ",", "int", "[", "]", "attributeId", ")", "{", "if", "(", "attributeId", "==", "null", "||", "attrs", "==", "null", ")", "{", "return", "n...
Tries to pull the Font Path from the Text Appearance. @param context Activity Context @param attrs View Attributes @param attributeId if -1 returns null. @return returns null if attribute is not defined or if no TextAppearance is found.
[ "Tries", "to", "pull", "the", "Font", "Path", "from", "the", "Text", "Appearance", "." ]
train
https://github.com/chrisjenx/Calligraphy/blob/085e441954d787bd4ef31f245afe5f2f2a311ea5/calligraphy/src/main/java/uk/co/chrisjenx/calligraphy/CalligraphyUtils.java#L212-L242
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/revisions/RevisionUtils.java
RevisionUtils.getDiscussionArchiveRevisionsForArticleRevision
public List<Revision> getDiscussionArchiveRevisionsForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException { """ For a given article revision, the method returns the revisions of the archived article discussion pages which were available at the time of the article revision @param ...
java
public List<Revision> getDiscussionArchiveRevisionsForArticleRevision(int revisionId) throws WikiApiException, WikiPageNotFoundException{ List<Revision> result = new LinkedList<Revision>(); //get article revision Revision rev = revApi.getRevision(revisionId); Timestamp revTime = rev.getTimeStamp(); /...
[ "public", "List", "<", "Revision", ">", "getDiscussionArchiveRevisionsForArticleRevision", "(", "int", "revisionId", ")", "throws", "WikiApiException", ",", "WikiPageNotFoundException", "{", "List", "<", "Revision", ">", "result", "=", "new", "LinkedList", "<", "Revis...
For a given article revision, the method returns the revisions of the archived article discussion pages which were available at the time of the article revision @param revisionId revision of the article for which the talk page archive revisions should be retrieved @return the revisions of the talk page archives that w...
[ "For", "a", "given", "article", "revision", "the", "method", "returns", "the", "revisions", "of", "the", "archived", "article", "discussion", "pages", "which", "were", "available", "at", "the", "time", "of", "the", "article", "revision" ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/revisions/RevisionUtils.java#L104-L140
aws/aws-sdk-java
aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java
XpathUtils.asNode
public static Node asNode(String nodeName, Node node, XPath xpath) throws XPathExpressionException { """ Same as {@link #asNode(String, Node)} but allows an xpath to be passed in explicitly for reuse. """ if (node == null) return null; return (Node) xpath.evaluate(nodeName, node, X...
java
public static Node asNode(String nodeName, Node node, XPath xpath) throws XPathExpressionException { if (node == null) return null; return (Node) xpath.evaluate(nodeName, node, XPathConstants.NODE); }
[ "public", "static", "Node", "asNode", "(", "String", "nodeName", ",", "Node", "node", ",", "XPath", "xpath", ")", "throws", "XPathExpressionException", "{", "if", "(", "node", "==", "null", ")", "return", "null", ";", "return", "(", "Node", ")", "xpath", ...
Same as {@link #asNode(String, Node)} but allows an xpath to be passed in explicitly for reuse.
[ "Same", "as", "{" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L552-L556
samskivert/pythagoras
src/main/java/pythagoras/d/Vectors.java
Vectors.isEpsilonZero
public static boolean isEpsilonZero (double x, double y, double epsilon) { """ Returns true if the supplied vector's x and y components are {@code epsilon} close to zero magnitude. """ return Math.abs(x) <= epsilon && Math.abs(y) <= epsilon; }
java
public static boolean isEpsilonZero (double x, double y, double epsilon) { return Math.abs(x) <= epsilon && Math.abs(y) <= epsilon; }
[ "public", "static", "boolean", "isEpsilonZero", "(", "double", "x", ",", "double", "y", ",", "double", "epsilon", ")", "{", "return", "Math", ".", "abs", "(", "x", ")", "<=", "epsilon", "&&", "Math", ".", "abs", "(", "y", ")", "<=", "epsilon", ";", ...
Returns true if the supplied vector's x and y components are {@code epsilon} close to zero magnitude.
[ "Returns", "true", "if", "the", "supplied", "vector", "s", "x", "and", "y", "components", "are", "{" ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/Vectors.java#L75-L77
box/box-java-sdk
src/main/java/com/box/sdk/BoxUser.java
BoxUser.getCurrentUser
public static BoxUser getCurrentUser(BoxAPIConnection api) { """ Gets the current user. @param api the API connection of the current user. @return the current user. """ URL url = GET_ME_URL.build(api.getBaseURL()); BoxAPIRequest request = new BoxAPIRequest(api, url, "GET"); BoxJS...
java
public static BoxUser getCurrentUser(BoxAPIConnection api) { URL url = GET_ME_URL.build(api.getBaseURL()); BoxAPIRequest request = new BoxAPIRequest(api, url, "GET"); BoxJSONResponse response = (BoxJSONResponse) request.send(); JsonObject jsonObject = JsonObject.readFrom(response.getJSON...
[ "public", "static", "BoxUser", "getCurrentUser", "(", "BoxAPIConnection", "api", ")", "{", "URL", "url", "=", "GET_ME_URL", ".", "build", "(", "api", ".", "getBaseURL", "(", ")", ")", ";", "BoxAPIRequest", "request", "=", "new", "BoxAPIRequest", "(", "api", ...
Gets the current user. @param api the API connection of the current user. @return the current user.
[ "Gets", "the", "current", "user", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxUser.java#L165-L171
OpenTSDB/opentsdb
src/core/Tags.java
Tags.resolveAll
public static ArrayList<byte[]> resolveAll(final TSDB tsdb, final Map<String, String> tags) throws NoSuchUniqueName { """ Resolves all the tags (name=value) into the a sorted byte arrays. This function is the opposite of {@link #resolveIds}. @param tsdb The TSDB to use f...
java
public static ArrayList<byte[]> resolveAll(final TSDB tsdb, final Map<String, String> tags) throws NoSuchUniqueName { try { return resolveAllInternal(tsdb, tags, false); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new Runt...
[ "public", "static", "ArrayList", "<", "byte", "[", "]", ">", "resolveAll", "(", "final", "TSDB", "tsdb", ",", "final", "Map", "<", "String", ",", "String", ">", "tags", ")", "throws", "NoSuchUniqueName", "{", "try", "{", "return", "resolveAllInternal", "("...
Resolves all the tags (name=value) into the a sorted byte arrays. This function is the opposite of {@link #resolveIds}. @param tsdb The TSDB to use for UniqueId lookups. @param tags The tags to resolve. @return an array of sorted tags (tag id, tag name). @throws NoSuchUniqueName if one of the elements in the map contai...
[ "Resolves", "all", "the", "tags", "(", "name", "=", "value", ")", "into", "the", "a", "sorted", "byte", "arrays", ".", "This", "function", "is", "the", "opposite", "of", "{" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/core/Tags.java#L576-L586
facebookarchive/hadoop-20
src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/LoadManager.java
LoadManager.getMaxSlots
public int getMaxSlots(TaskTrackerStatus status, TaskType type) { """ Obtain the overall number of the slots limit of a tasktracker @param status The status of the tasktracker @param type The type of the task @return The number of maximum slots """ return (type == TaskType.MAP) ? status.getMaxMapSlots()...
java
public int getMaxSlots(TaskTrackerStatus status, TaskType type) { return (type == TaskType.MAP) ? status.getMaxMapSlots() : status.getMaxReduceSlots(); }
[ "public", "int", "getMaxSlots", "(", "TaskTrackerStatus", "status", ",", "TaskType", "type", ")", "{", "return", "(", "type", "==", "TaskType", ".", "MAP", ")", "?", "status", ".", "getMaxMapSlots", "(", ")", ":", "status", ".", "getMaxReduceSlots", "(", "...
Obtain the overall number of the slots limit of a tasktracker @param status The status of the tasktracker @param type The type of the task @return The number of maximum slots
[ "Obtain", "the", "overall", "number", "of", "the", "slots", "limit", "of", "a", "tasktracker" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/LoadManager.java#L107-L110
elvishew/xLog
library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java
PatternFlattener.parseDateParameter
static DateFiller parseDateParameter(String wrappedParameter, String trimmedParameter) { """ Try to create a date filler if the given parameter is a date parameter. @return created date filler, or null if the given parameter is not a date parameter """ if (trimmedParameter.startsWith(PARAMETER_DATE + " ...
java
static DateFiller parseDateParameter(String wrappedParameter, String trimmedParameter) { if (trimmedParameter.startsWith(PARAMETER_DATE + " ") && trimmedParameter.length() > PARAMETER_DATE.length() + 1) { String dateFormat = trimmedParameter.substring(PARAMETER_DATE.length() + 1); return new Dat...
[ "static", "DateFiller", "parseDateParameter", "(", "String", "wrappedParameter", ",", "String", "trimmedParameter", ")", "{", "if", "(", "trimmedParameter", ".", "startsWith", "(", "PARAMETER_DATE", "+", "\" \"", ")", "&&", "trimmedParameter", ".", "length", "(", ...
Try to create a date filler if the given parameter is a date parameter. @return created date filler, or null if the given parameter is not a date parameter
[ "Try", "to", "create", "a", "date", "filler", "if", "the", "given", "parameter", "is", "a", "date", "parameter", "." ]
train
https://github.com/elvishew/xLog/blob/c6fb95555ce619d3e527f5ba6c45d4d247c5a838/library/src/main/java/com/elvishew/xlog/flattener/PatternFlattener.java#L191-L200
plume-lib/options
src/main/java/org/plumelib/options/Options.java
Options.maxOptionLength
private int maxOptionLength(List<OptionInfo> optList, boolean showUnpublicized) { """ Return the length of the longest synopsis message in a list of options. Useful for aligning options in usage strings. @param optList the options whose synopsis messages to measure @param showUnpublicized if true, include unp...
java
private int maxOptionLength(List<OptionInfo> optList, boolean showUnpublicized) { int maxLength = 0; for (OptionInfo oi : optList) { if (oi.unpublicized && !showUnpublicized) { continue; } int len = oi.synopsis().length(); if (len > maxLength) { maxLength = len; } ...
[ "private", "int", "maxOptionLength", "(", "List", "<", "OptionInfo", ">", "optList", ",", "boolean", "showUnpublicized", ")", "{", "int", "maxLength", "=", "0", ";", "for", "(", "OptionInfo", "oi", ":", "optList", ")", "{", "if", "(", "oi", ".", "unpubli...
Return the length of the longest synopsis message in a list of options. Useful for aligning options in usage strings. @param optList the options whose synopsis messages to measure @param showUnpublicized if true, include unpublicized options in the computation @return the length of the longest synopsis message in a li...
[ "Return", "the", "length", "of", "the", "longest", "synopsis", "message", "in", "a", "list", "of", "options", ".", "Useful", "for", "aligning", "options", "in", "usage", "strings", "." ]
train
https://github.com/plume-lib/options/blob/1bdd0ac7a1794bdf9dd373e279f69d43395154f0/src/main/java/org/plumelib/options/Options.java#L1230-L1242
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/JobsInner.java
JobsInner.updateAsync
public Observable<JobInner> updateAsync(String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { """ Update Job. Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued or Scheduled and depending on th...
java
public Observable<JobInner> updateAsync(String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters).map(new Func1<ServiceResponse<JobInner>, JobInner>() { ...
[ "public", "Observable", "<", "JobInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "transformName", ",", "String", "jobName", ",", "JobInner", "parameters", ")", "{", "return", "updateWithServiceResponseAsync"...
Update Job. Update is only supported for description and priority. Updating Priority will take effect when the Job state is Queued or Scheduled and depending on the timing the priority update may be ignored. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The M...
[ "Update", "Job", ".", "Update", "is", "only", "supported", "for", "description", "and", "priority", ".", "Updating", "Priority", "will", "take", "effect", "when", "the", "Job", "state", "is", "Queued", "or", "Scheduled", "and", "depending", "on", "the", "tim...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/JobsInner.java#L741-L748
dita-ot/dita-ot
src/main/java/org/dita/dost/writer/KeyrefPaser.java
KeyrefPaser.normalizeHrefValue
private static URI normalizeHrefValue(final URI keyName, final String tail) { """ change elementId into topicId if there is no topicId in key definition. """ if (keyName.getFragment() == null) { return toURI(keyName + tail.replaceAll(SLASH, SHARP)); } return toURI(keyName + ...
java
private static URI normalizeHrefValue(final URI keyName, final String tail) { if (keyName.getFragment() == null) { return toURI(keyName + tail.replaceAll(SLASH, SHARP)); } return toURI(keyName + tail); }
[ "private", "static", "URI", "normalizeHrefValue", "(", "final", "URI", "keyName", ",", "final", "String", "tail", ")", "{", "if", "(", "keyName", ".", "getFragment", "(", ")", "==", "null", ")", "{", "return", "toURI", "(", "keyName", "+", "tail", ".", ...
change elementId into topicId if there is no topicId in key definition.
[ "change", "elementId", "into", "topicId", "if", "there", "is", "no", "topicId", "in", "key", "definition", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/writer/KeyrefPaser.java#L735-L740
google/allocation-instrumenter
src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java
AllocationMethodAdapter.visitIntInsn
@Override public void visitIntInsn(int opcode, int operand) { """ newarray shows up as an instruction taking an int operand (the primitive element type of the array) so we hook it here. """ if (opcode == Opcodes.NEWARRAY) { // instack: ... count // outstack: ... aref if (operand >= 4 &...
java
@Override public void visitIntInsn(int opcode, int operand) { if (opcode == Opcodes.NEWARRAY) { // instack: ... count // outstack: ... aref if (operand >= 4 && operand <= 11) { super.visitInsn(Opcodes.DUP); // -> stack: ... count count super.visitIntInsn(opcode, operand); // -> s...
[ "@", "Override", "public", "void", "visitIntInsn", "(", "int", "opcode", ",", "int", "operand", ")", "{", "if", "(", "opcode", "==", "Opcodes", ".", "NEWARRAY", ")", "{", "// instack: ... count", "// outstack: ... aref", "if", "(", "operand", ">=", "4", "&&"...
newarray shows up as an instruction taking an int operand (the primitive element type of the array) so we hook it here.
[ "newarray", "shows", "up", "as", "an", "instruction", "taking", "an", "int", "operand", "(", "the", "primitive", "element", "type", "of", "the", "array", ")", "so", "we", "hook", "it", "here", "." ]
train
https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationMethodAdapter.java#L122-L142
jbundle/jbundle
base/message/service/src/main/java/org/jbundle/base/message/service/BaseServiceMessageTransport.java
BaseServiceMessageTransport.createExternalMessage
public ExternalMessage createExternalMessage(BaseMessage message, Object rawData) { """ Get the external message container for this Internal message. Typically, the overriding class supplies a default format for the transport type. <br/>NOTE: The message header from the internal message is copies, but not the me...
java
public ExternalMessage createExternalMessage(BaseMessage message, Object rawData) { ExternalMessage externalTrxMessageOut = super.createExternalMessage(message, rawData); if (externalTrxMessageOut == null) { if (MessageTypeModel.MESSAGE_IN.equalsIgnoreCase((String)message.get(Trx...
[ "public", "ExternalMessage", "createExternalMessage", "(", "BaseMessage", "message", ",", "Object", "rawData", ")", "{", "ExternalMessage", "externalTrxMessageOut", "=", "super", ".", "createExternalMessage", "(", "message", ",", "rawData", ")", ";", "if", "(", "ext...
Get the external message container for this Internal message. Typically, the overriding class supplies a default format for the transport type. <br/>NOTE: The message header from the internal message is copies, but not the message itself. @param The internalTrxMessage that I will convert to this external format. @retur...
[ "Get", "the", "external", "message", "container", "for", "this", "Internal", "message", ".", "Typically", "the", "overriding", "class", "supplies", "a", "default", "format", "for", "the", "transport", "type", ".", "<br", "/", ">", "NOTE", ":", "The", "messag...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/service/src/main/java/org/jbundle/base/message/service/BaseServiceMessageTransport.java#L127-L138
vincentk/joptimizer
src/main/java/com/joptimizer/util/ColtUtils.java
ColtUtils.replaceValues
public static final DoubleMatrix1D replaceValues(DoubleMatrix1D v, double oldValue, double newValue) { """ Return a new array with all the occurences of oldValue replaced by newValue. """ if(v == null){ return null; } DoubleFactory1D F1 = (v instanceof SparseDoubleMatrix1D)? DoubleFactory1D.sparse...
java
public static final DoubleMatrix1D replaceValues(DoubleMatrix1D v, double oldValue, double newValue) { if(v == null){ return null; } DoubleFactory1D F1 = (v instanceof SparseDoubleMatrix1D)? DoubleFactory1D.sparse : DoubleFactory1D.dense; DoubleMatrix1D ret = F1.make(v.size()); for (int i = 0; i <...
[ "public", "static", "final", "DoubleMatrix1D", "replaceValues", "(", "DoubleMatrix1D", "v", ",", "double", "oldValue", ",", "double", "newValue", ")", "{", "if", "(", "v", "==", "null", ")", "{", "return", "null", ";", "}", "DoubleFactory1D", "F1", "=", "(...
Return a new array with all the occurences of oldValue replaced by newValue.
[ "Return", "a", "new", "array", "with", "all", "the", "occurences", "of", "oldValue", "replaced", "by", "newValue", "." ]
train
https://github.com/vincentk/joptimizer/blob/65064c1bb0b26c7261358021e4c93d06dd43564f/src/main/java/com/joptimizer/util/ColtUtils.java#L477-L493
RestComm/jss7
isup/isup-impl/src/main/java/org/restcomm/protocols/ss7/isup/util/BcdHelper.java
BcdHelper.bcdToHexString
public static String bcdToHexString(int encodingScheme, byte bcdByte) throws UnsupportedEncodingException { """ Converts single BCD encoded byte into String Hex representation. @param bcdByte @return String representation of BCD digits (two hex digits returned) """ StringBuilder sb = new StringBuil...
java
public static String bcdToHexString(int encodingScheme, byte bcdByte) throws UnsupportedEncodingException { StringBuilder sb = new StringBuilder(); byte leftNibble = (byte) (bcdByte & 0xf0); leftNibble = (byte) (leftNibble >>> 4); leftNibble = (byte) (leftNibble & 0x0f); byte rig...
[ "public", "static", "String", "bcdToHexString", "(", "int", "encodingScheme", ",", "byte", "bcdByte", ")", "throws", "UnsupportedEncodingException", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "byte", "leftNibble", "=", "(", "byte", "...
Converts single BCD encoded byte into String Hex representation. @param bcdByte @return String representation of BCD digits (two hex digits returned)
[ "Converts", "single", "BCD", "encoded", "byte", "into", "String", "Hex", "representation", "." ]
train
https://github.com/RestComm/jss7/blob/402b4b3984e581c581e309cb5f6a858fde6dbc33/isup/isup-impl/src/main/java/org/restcomm/protocols/ss7/isup/util/BcdHelper.java#L134-L151
js-lib-com/net-client
src/main/java/js/net/client/HttpRmiTransaction.java
HttpRmiTransaction.readJsonObject
private static Object readJsonObject(InputStream stream, Type type) throws IOException { """ Read JSON object from input stream and return initialized object instance. @param stream input stream, @param type expected type. @return object instance of requested type. @throws IOException if stream reading or JS...
java
private static Object readJsonObject(InputStream stream, Type type) throws IOException { BufferedReader reader = null; Json json = Classes.loadService(Json.class); try { reader = Files.createBufferedReader(stream); return json.parse(reader, type); } finally { // do not use Files.close because we...
[ "private", "static", "Object", "readJsonObject", "(", "InputStream", "stream", ",", "Type", "type", ")", "throws", "IOException", "{", "BufferedReader", "reader", "=", "null", ";", "Json", "json", "=", "Classes", ".", "loadService", "(", "Json", ".", "class", ...
Read JSON object from input stream and return initialized object instance. @param stream input stream, @param type expected type. @return object instance of requested type. @throws IOException if stream reading or JSON parsing fails.
[ "Read", "JSON", "object", "from", "input", "stream", "and", "return", "initialized", "object", "instance", "." ]
train
https://github.com/js-lib-com/net-client/blob/0489f85d8baa1be1ff115aa79929e0cf05d4c72d/src/main/java/js/net/client/HttpRmiTransaction.java#L564-L576
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java
DataService.sendEmailAsync
public <T extends IEntity> void sendEmailAsync(T entity, String email, CallbackHandler callbackHandler) throws FMSException { """ Method to send the entity to email for the given id in asynchronous fashion @param entity the entity @param email the mail string @param callbackHandler the callback handler @t...
java
public <T extends IEntity> void sendEmailAsync(T entity, String email, CallbackHandler callbackHandler) throws FMSException { if(!isAvailableToEmail(entity)) { throw new FMSException("Following entity: " + entity.getClass().getSimpleName() + " cannot send as email (Async) " ); } Intu...
[ "public", "<", "T", "extends", "IEntity", ">", "void", "sendEmailAsync", "(", "T", "entity", ",", "String", "email", ",", "CallbackHandler", "callbackHandler", ")", "throws", "FMSException", "{", "if", "(", "!", "isAvailableToEmail", "(", "entity", ")", ")", ...
Method to send the entity to email for the given id in asynchronous fashion @param entity the entity @param email the mail string @param callbackHandler the callback handler @throws FMSException throws FMSException
[ "Method", "to", "send", "the", "entity", "to", "email", "for", "the", "given", "id", "in", "asynchronous", "fashion" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L942-L953
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java
ClustersInner.update
public ClusterInner update(String resourceGroupName, String clusterName) { """ Patch HDInsight cluster with the specified parameters. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation ...
java
public ClusterInner update(String resourceGroupName, String clusterName) { return updateWithServiceResponseAsync(resourceGroupName, clusterName).toBlocking().single().body(); }
[ "public", "ClusterInner", "update", "(", "String", "resourceGroupName", ",", "String", "clusterName", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", "."...
Patch HDInsight cluster with the specified parameters. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws Runtim...
[ "Patch", "HDInsight", "cluster", "with", "the", "specified", "parameters", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ClustersInner.java#L335-L337
MenoData/Time4J
base/src/main/java/net/time4j/range/Quarters.java
Quarters.between
public static Quarters between(CalendarQuarter q1, CalendarQuarter q2) { """ /*[deutsch] <p>Bestimmt die Differenz zwischen den angegebenen Quartalen. </p> @param q1 first quarter year @param q2 second quarter year @return difference in quarter years """ PlainDate d1 = q1.atDayOfQuarter(1...
java
public static Quarters between(CalendarQuarter q1, CalendarQuarter q2) { PlainDate d1 = q1.atDayOfQuarter(1); PlainDate d2 = q2.atDayOfQuarter(1); return Quarters.between(d1, d2); }
[ "public", "static", "Quarters", "between", "(", "CalendarQuarter", "q1", ",", "CalendarQuarter", "q2", ")", "{", "PlainDate", "d1", "=", "q1", ".", "atDayOfQuarter", "(", "1", ")", ";", "PlainDate", "d2", "=", "q2", ".", "atDayOfQuarter", "(", "1", ")", ...
/*[deutsch] <p>Bestimmt die Differenz zwischen den angegebenen Quartalen. </p> @param q1 first quarter year @param q2 second quarter year @return difference in quarter years
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Bestimmt", "die", "Differenz", "zwischen", "den", "angegebenen", "Quartalen", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/Quarters.java#L139-L145
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBC.java
LSDBC.isLocalMaximum
private boolean isLocalMaximum(double kdist, DBIDs neighbors, WritableDoubleDataStore kdists) { """ Test if a point is a local density maximum. @param kdist k-distance of current @param neighbors Neighbor points @param kdists kNN distances @return {@code true} when the point is a local maximum """ fo...
java
private boolean isLocalMaximum(double kdist, DBIDs neighbors, WritableDoubleDataStore kdists) { for(DBIDIter it = neighbors.iter(); it.valid(); it.advance()) { if(kdists.doubleValue(it) < kdist) { return false; } } return true; }
[ "private", "boolean", "isLocalMaximum", "(", "double", "kdist", ",", "DBIDs", "neighbors", ",", "WritableDoubleDataStore", "kdists", ")", "{", "for", "(", "DBIDIter", "it", "=", "neighbors", ".", "iter", "(", ")", ";", "it", ".", "valid", "(", ")", ";", ...
Test if a point is a local density maximum. @param kdist k-distance of current @param neighbors Neighbor points @param kdists kNN distances @return {@code true} when the point is a local maximum
[ "Test", "if", "a", "point", "is", "a", "local", "density", "maximum", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/gdbscan/LSDBC.java#L222-L229
jboss/jboss-jstl-api_spec
src/main/java/javax/servlet/jsp/jstl/fmt/LocaleSupport.java
LocaleSupport.getLocalizedMessage
public static String getLocalizedMessage(PageContext pageContext, String key) { """ Retrieves the localized message corresponding to the given key. <p> The given key is looked up in the resource bundle of the default I18N localization context, which is retrieved from ...
java
public static String getLocalizedMessage(PageContext pageContext, String key) { return getLocalizedMessage(pageContext, key, null, null); }
[ "public", "static", "String", "getLocalizedMessage", "(", "PageContext", "pageContext", ",", "String", "key", ")", "{", "return", "getLocalizedMessage", "(", "pageContext", ",", "key", ",", "null", ",", "null", ")", ";", "}" ]
Retrieves the localized message corresponding to the given key. <p> The given key is looked up in the resource bundle of the default I18N localization context, which is retrieved from the <tt>javax.servlet.jsp.jstl.fmt.localizationContext</tt> configuration setting. <p> If the configuration setting is empty, or the def...
[ "Retrieves", "the", "localized", "message", "corresponding", "to", "the", "given", "key", ".", "<p", ">", "The", "given", "key", "is", "looked", "up", "in", "the", "resource", "bundle", "of", "the", "default", "I18N", "localization", "context", "which", "is"...
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/javax/servlet/jsp/jstl/fmt/LocaleSupport.java#L55-L58
greatman/craftconomy3
src/main/java/com/greatmancode/craftconomy3/Common.java
Common.sendConsoleMessage
public void sendConsoleMessage(Level level, String msg) { """ Sends a message to the console through the Logge.r @param level The log level to show. @param msg The message to send. """ if (!(getServerCaller() instanceof UnitTestServerCaller)) { getLogger().log(level, msg); } ...
java
public void sendConsoleMessage(Level level, String msg) { if (!(getServerCaller() instanceof UnitTestServerCaller)) { getLogger().log(level, msg); } }
[ "public", "void", "sendConsoleMessage", "(", "Level", "level", ",", "String", "msg", ")", "{", "if", "(", "!", "(", "getServerCaller", "(", ")", "instanceof", "UnitTestServerCaller", ")", ")", "{", "getLogger", "(", ")", ".", "log", "(", "level", ",", "m...
Sends a message to the console through the Logge.r @param level The log level to show. @param msg The message to send.
[ "Sends", "a", "message", "to", "the", "console", "through", "the", "Logge", ".", "r" ]
train
https://github.com/greatman/craftconomy3/blob/51b1b3de7d039e20c7418d1e70b8c4b02b8cf840/src/main/java/com/greatmancode/craftconomy3/Common.java#L245-L249
rhuss/jolokia
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
HttpRequestHandler.handlePostRequest
public JSONAware handlePostRequest(String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]> pParameterMap) throws IOException { """ Handle the input stream as given by a POST request @param pUri URI leading to this request @param pInputStream input stream of the post reques...
java
public JSONAware handlePostRequest(String pUri, InputStream pInputStream, String pEncoding, Map<String, String[]> pParameterMap) throws IOException { if (backendManager.isDebug()) { logHandler.debug("URI: " + pUri); } Object jsonRequest = extractJsonRequest(pInputStream...
[ "public", "JSONAware", "handlePostRequest", "(", "String", "pUri", ",", "InputStream", "pInputStream", ",", "String", "pEncoding", ",", "Map", "<", "String", ",", "String", "[", "]", ">", "pParameterMap", ")", "throws", "IOException", "{", "if", "(", "backendM...
Handle the input stream as given by a POST request @param pUri URI leading to this request @param pInputStream input stream of the post request @param pEncoding optional encoding for the stream. If null, the default encoding is used @param pParameterMap additional processing parameters @return the JSON object contain...
[ "Handle", "the", "input", "stream", "as", "given", "by", "a", "POST", "request" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java#L115-L141
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java
SvgGraphicsContext.setController
public void setController(Object object, GraphicsController controller) { """ Set the controller on an element of this <code>GraphicsContext</code> so it can react to events. @param object the element on which the controller should be set. @param controller The new <code>GraphicsController</code> """ i...
java
public void setController(Object object, GraphicsController controller) { if (isAttached()) { helper.setController(object, controller); } }
[ "public", "void", "setController", "(", "Object", "object", ",", "GraphicsController", "controller", ")", "{", "if", "(", "isAttached", "(", ")", ")", "{", "helper", ".", "setController", "(", "object", ",", "controller", ")", ";", "}", "}" ]
Set the controller on an element of this <code>GraphicsContext</code> so it can react to events. @param object the element on which the controller should be set. @param controller The new <code>GraphicsController</code>
[ "Set", "the", "controller", "on", "an", "element", "of", "this", "<code", ">", "GraphicsContext<", "/", "code", ">", "so", "it", "can", "react", "to", "events", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/SvgGraphicsContext.java#L615-L619
albfernandez/itext2
src/main/java/com/lowagie/text/rtf/list/RtfListItem.java
RtfListItem.inheritListSettings
public void inheritListSettings(int listNumber, int listLevel) { """ Inherit the list settings from the parent list to RtfLists that are contained in this RtfListItem. @param listNumber The list number to inherit. @param listLevel The list level to inherit. """ for(int i = 0; i < chunks.size(); i+...
java
public void inheritListSettings(int listNumber, int listLevel) { for(int i = 0; i < chunks.size(); i++) { RtfBasicElement rtfElement = (RtfBasicElement) chunks.get(i); if(rtfElement instanceof RtfList) { ((RtfList) rtfElement).setListNumber(listNumber); se...
[ "public", "void", "inheritListSettings", "(", "int", "listNumber", ",", "int", "listLevel", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "chunks", ".", "size", "(", ")", ";", "i", "++", ")", "{", "RtfBasicElement", "rtfElement", "=", "(...
Inherit the list settings from the parent list to RtfLists that are contained in this RtfListItem. @param listNumber The list number to inherit. @param listLevel The list level to inherit.
[ "Inherit", "the", "list", "settings", "from", "the", "parent", "list", "to", "RtfLists", "that", "are", "contained", "in", "this", "RtfListItem", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/list/RtfListItem.java#L167-L176
junit-team/junit4
src/main/java/junit/framework/Assert.java
Assert.assertEquals
static public void assertEquals(String message, boolean expected, boolean actual) { """ Asserts that two booleans are equal. If they are not an AssertionFailedError is thrown with the given message. """ assertEquals(message, Boolean.valueOf(expected), Boolean.valueOf(actual)); }
java
static public void assertEquals(String message, boolean expected, boolean actual) { assertEquals(message, Boolean.valueOf(expected), Boolean.valueOf(actual)); }
[ "static", "public", "void", "assertEquals", "(", "String", "message", ",", "boolean", "expected", ",", "boolean", "actual", ")", "{", "assertEquals", "(", "message", ",", "Boolean", ".", "valueOf", "(", "expected", ")", ",", "Boolean", ".", "valueOf", "(", ...
Asserts that two booleans are equal. If they are not an AssertionFailedError is thrown with the given message.
[ "Asserts", "that", "two", "booleans", "are", "equal", ".", "If", "they", "are", "not", "an", "AssertionFailedError", "is", "thrown", "with", "the", "given", "message", "." ]
train
https://github.com/junit-team/junit4/blob/d9861ecdb6e487f6c352437ee823879aca3b81d4/src/main/java/junit/framework/Assert.java#L173-L175
Azure/azure-sdk-for-java
iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java
AppsInner.beginCreateOrUpdate
public AppInner beginCreateOrUpdate(String resourceGroupName, String resourceName, AppInner app) { """ Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modifi...
java
public AppInner beginCreateOrUpdate(String resourceGroupName, String resourceName, AppInner app) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, app).toBlocking().single().body(); }
[ "public", "AppInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "AppInner", "app", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ",", "app", ")", "."...
Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then combine them with the modified values in a new body to update the IoT Central application. @param resourceGroupName The name of the res...
[ "Create", "or", "update", "the", "metadata", "of", "an", "IoT", "Central", "application", ".", "The", "usual", "pattern", "to", "modify", "a", "property", "is", "to", "retrieve", "the", "IoT", "Central", "application", "metadata", "and", "security", "metadata"...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iotcentral/resource-manager/v2017_07_01_privatepreview/src/main/java/com/microsoft/azure/management/iotcentral/v2017_07_01_privatepreview/implementation/AppsInner.java#L295-L297
meltmedia/cadmium
servlets/src/main/java/com/meltmedia/cadmium/servlets/jersey/error/ErrorUtil.java
ErrorUtil.internalError
public static Response internalError(Throwable throwable, UriInfo uriInfo) { """ Creates Jersey response corresponding to internal error @param throwable {@link Throwable} object representing an error @param uriInfo {@link UriInfo} object used for forming links @return {@link Response} Jersey response object co...
java
public static Response internalError(Throwable throwable, UriInfo uriInfo) { GenericError error = new GenericError( ExceptionUtils.getRootCauseMessage(throwable), ErrorCode.INTERNAL.getCode(), uriInfo.getAbsolutePath().toString()); if (!isProduction()) { error.setStack(ExceptionU...
[ "public", "static", "Response", "internalError", "(", "Throwable", "throwable", ",", "UriInfo", "uriInfo", ")", "{", "GenericError", "error", "=", "new", "GenericError", "(", "ExceptionUtils", ".", "getRootCauseMessage", "(", "throwable", ")", ",", "ErrorCode", "....
Creates Jersey response corresponding to internal error @param throwable {@link Throwable} object representing an error @param uriInfo {@link UriInfo} object used for forming links @return {@link Response} Jersey response object containing JSON representation of the error.
[ "Creates", "Jersey", "response", "corresponding", "to", "internal", "error" ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/servlets/src/main/java/com/meltmedia/cadmium/servlets/jersey/error/ErrorUtil.java#L51-L65
groovy/groovy-core
src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java
StringGroovyMethods.getAt
public static Object getAt(Matcher matcher, int idx) { """ Support the subscript operator, e.g.&#160;matcher[index], for a regex Matcher. <p> For an example using no group match, <pre> def p = /ab[d|f]/ def m = "abcabdabeabf" =~ p assert 2 == m.count assert 2 == m.size() // synonym for m.getCount() assert ...
java
public static Object getAt(Matcher matcher, int idx) { try { int count = getCount(matcher); if (idx < -count || idx >= count) { throw new IndexOutOfBoundsException("index is out of range " + (-count) + ".." + (count - 1) + " (index = " + idx + ")"); } ...
[ "public", "static", "Object", "getAt", "(", "Matcher", "matcher", ",", "int", "idx", ")", "{", "try", "{", "int", "count", "=", "getCount", "(", "matcher", ")", ";", "if", "(", "idx", "<", "-", "count", "||", "idx", ">=", "count", ")", "{", "throw"...
Support the subscript operator, e.g.&#160;matcher[index], for a regex Matcher. <p> For an example using no group match, <pre> def p = /ab[d|f]/ def m = "abcabdabeabf" =~ p assert 2 == m.count assert 2 == m.size() // synonym for m.getCount() assert ! m.hasGroup() assert 0 == m.groupCount() def matches = ["abd", "abf"] f...
[ "Support", "the", "subscript", "operator", "e", ".", "g", ".", "&#160", ";", "matcher", "[", "index", "]", "for", "a", "regex", "Matcher", ".", "<p", ">", "For", "an", "example", "using", "no", "group", "match", "<pre", ">", "def", "p", "=", "/", "...
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java#L1376-L1394
podio/podio-java
src/main/java/com/podio/task/TaskAPI.java
TaskAPI.assignTask
public void assignTask(int taskId, int responsible) { """ Assigns the task to another user. This makes the user responsible for the task and its completion. @param taskId The id of the task to assign @param responsible The id of the user the task should be assigned to """ getResourceFactory() .get...
java
public void assignTask(int taskId, int responsible) { getResourceFactory() .getApiResource("/task/" + taskId + "/assign") .entity(new AssignValue(responsible), MediaType.APPLICATION_JSON_TYPE).post(); }
[ "public", "void", "assignTask", "(", "int", "taskId", ",", "int", "responsible", ")", "{", "getResourceFactory", "(", ")", ".", "getApiResource", "(", "\"/task/\"", "+", "taskId", "+", "\"/assign\"", ")", ".", "entity", "(", "new", "AssignValue", "(", "respo...
Assigns the task to another user. This makes the user responsible for the task and its completion. @param taskId The id of the task to assign @param responsible The id of the user the task should be assigned to
[ "Assigns", "the", "task", "to", "another", "user", ".", "This", "makes", "the", "user", "responsible", "for", "the", "task", "and", "its", "completion", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/task/TaskAPI.java#L77-L82
google/jimfs
jimfs/src/main/java/com/google/common/jimfs/AttributeProvider.java
AttributeProvider.unsettable
protected static RuntimeException unsettable(String view, String attribute, boolean create) { """ Throws a runtime exception indicating that the given attribute cannot be set. """ // This matches the behavior of the real file system implementations: if the attempt to set the // attribute is being made ...
java
protected static RuntimeException unsettable(String view, String attribute, boolean create) { // This matches the behavior of the real file system implementations: if the attempt to set the // attribute is being made during file creation, throw UOE even though the attribute is one // that cannot be set unde...
[ "protected", "static", "RuntimeException", "unsettable", "(", "String", "view", ",", "String", "attribute", ",", "boolean", "create", ")", "{", "// This matches the behavior of the real file system implementations: if the attempt to set the", "// attribute is being made during file c...
Throws a runtime exception indicating that the given attribute cannot be set.
[ "Throws", "a", "runtime", "exception", "indicating", "that", "the", "given", "attribute", "cannot", "be", "set", "." ]
train
https://github.com/google/jimfs/blob/3eadff747a3afa7b498030f420d2d04ce700534a/jimfs/src/main/java/com/google/common/jimfs/AttributeProvider.java#L129-L135
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/ReferenceField.java
ReferenceField.setReference
public int setReference(Record record, boolean bDisplayOption, int iMoveMode) { """ Make this field a reference to the current object in this record info class. @param record tour.db.Record The current record to set this field to reference. @param bDisplayOption If true, display changes. @param iMoveMode The mo...
java
public int setReference(Record record, boolean bDisplayOption, int iMoveMode) { return this.moveFieldToThis((BaseField)record.getCounterField(), bDisplayOption, iMoveMode); }
[ "public", "int", "setReference", "(", "Record", "record", ",", "boolean", "bDisplayOption", ",", "int", "iMoveMode", ")", "{", "return", "this", ".", "moveFieldToThis", "(", "(", "BaseField", ")", "record", ".", "getCounterField", "(", ")", ",", "bDisplayOptio...
Make this field a reference to the current object in this record info class. @param record tour.db.Record The current record to set this field to reference. @param bDisplayOption If true, display changes. @param iMoveMode The move mode. @return The error code (or NORMAL_RETURN).
[ "Make", "this", "field", "a", "reference", "to", "the", "current", "object", "in", "this", "record", "info", "class", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/ReferenceField.java#L167-L170
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/util/NodeLocatorHelper.java
NodeLocatorHelper.activeNodeForId
public InetAddress activeNodeForId(final String id) { """ Returns the target active node {@link InetAddress} for a given document ID on the bucket. @param id the document id to convert. @return the node for the given document id. """ BucketConfig config = bucketConfig.get(); if (config ins...
java
public InetAddress activeNodeForId(final String id) { BucketConfig config = bucketConfig.get(); if (config instanceof CouchbaseBucketConfig) { return nodeForIdOnCouchbaseBucket(id, (CouchbaseBucketConfig) config); } else if (config instanceof MemcachedBucketConfig) { ret...
[ "public", "InetAddress", "activeNodeForId", "(", "final", "String", "id", ")", "{", "BucketConfig", "config", "=", "bucketConfig", ".", "get", "(", ")", ";", "if", "(", "config", "instanceof", "CouchbaseBucketConfig", ")", "{", "return", "nodeForIdOnCouchbaseBucke...
Returns the target active node {@link InetAddress} for a given document ID on the bucket. @param id the document id to convert. @return the node for the given document id.
[ "Returns", "the", "target", "active", "node", "{", "@link", "InetAddress", "}", "for", "a", "given", "document", "ID", "on", "the", "bucket", "." ]
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/util/NodeLocatorHelper.java#L101-L111
reactor/reactor-netty
src/main/java/reactor/netty/udp/UdpServer.java
UdpServer.doOnBind
public final UdpServer doOnBind(Consumer<? super Bootstrap> doOnBind) { """ Setup a callback called when {@link io.netty.channel.Channel} is about to bind. @param doOnBind a consumer observing server start event @return a new {@link UdpServer} """ Objects.requireNonNull(doOnBind, "doOnBind"); return...
java
public final UdpServer doOnBind(Consumer<? super Bootstrap> doOnBind) { Objects.requireNonNull(doOnBind, "doOnBind"); return new UdpServerDoOn(this, doOnBind, null, null); }
[ "public", "final", "UdpServer", "doOnBind", "(", "Consumer", "<", "?", "super", "Bootstrap", ">", "doOnBind", ")", "{", "Objects", ".", "requireNonNull", "(", "doOnBind", ",", "\"doOnBind\"", ")", ";", "return", "new", "UdpServerDoOn", "(", "this", ",", "doO...
Setup a callback called when {@link io.netty.channel.Channel} is about to bind. @param doOnBind a consumer observing server start event @return a new {@link UdpServer}
[ "Setup", "a", "callback", "called", "when", "{", "@link", "io", ".", "netty", ".", "channel", ".", "Channel", "}", "is", "about", "to", "bind", "." ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/udp/UdpServer.java#L180-L184
astrapi69/jaulp-wicket
jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/application/BaseWebApplication.java
BaseWebApplication.mountPage
public <T extends Page> void mountPage(final String path, final Class<T> pageClass, final IPageParametersEncoder pageParametersEncoder) { """ Mounts a page class to the given path with the given {@link IPageParametersEncoder}. @param <T> type of page @param path the path to mount the page class on @para...
java
public <T extends Page> void mountPage(final String path, final Class<T> pageClass, final IPageParametersEncoder pageParametersEncoder) { mount(new MountedMapper(path, pageClass, pageParametersEncoder)); }
[ "public", "<", "T", "extends", "Page", ">", "void", "mountPage", "(", "final", "String", "path", ",", "final", "Class", "<", "T", ">", "pageClass", ",", "final", "IPageParametersEncoder", "pageParametersEncoder", ")", "{", "mount", "(", "new", "MountedMapper",...
Mounts a page class to the given path with the given {@link IPageParametersEncoder}. @param <T> type of page @param path the path to mount the page class on @param pageClass the page class to be mounted @param pageParametersEncoder the encoder for the page parameter to be mounted
[ "Mounts", "a", "page", "class", "to", "the", "given", "path", "with", "the", "given", "{", "@link", "IPageParametersEncoder", "}", "." ]
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-base/src/main/java/de/alpharogroup/wicket/base/application/BaseWebApplication.java#L159-L163
wildfly/wildfly-core
request-controller/src/main/java/org/wildfly/extension/requestcontroller/RequestController.java
RequestController.getControlPoint
public synchronized ControlPoint getControlPoint(final String deploymentName, final String entryPointName) { """ Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled this will return null. Entry points are reference counted. If this metho...
java
public synchronized ControlPoint getControlPoint(final String deploymentName, final String entryPointName) { ControlPointIdentifier id = new ControlPointIdentifier(deploymentName, entryPointName); ControlPoint ep = entryPoints.get(id); if (ep == null) { ep = new ControlPoint(this, de...
[ "public", "synchronized", "ControlPoint", "getControlPoint", "(", "final", "String", "deploymentName", ",", "final", "String", "entryPointName", ")", "{", "ControlPointIdentifier", "id", "=", "new", "ControlPointIdentifier", "(", "deploymentName", ",", "entryPointName", ...
Gets an entry point for the given deployment. If one does not exist it will be created. If the request controller is disabled this will return null. Entry points are reference counted. If this method is called n times then {@link #removeControlPoint(ControlPoint)} must also be called n times to clean up the entry poin...
[ "Gets", "an", "entry", "point", "for", "the", "given", "deployment", ".", "If", "one", "does", "not", "exist", "it", "will", "be", "created", ".", "If", "the", "request", "controller", "is", "disabled", "this", "will", "return", "null", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/request-controller/src/main/java/org/wildfly/extension/requestcontroller/RequestController.java#L267-L276
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfFileSpecification.java
PdfFileSpecification.fileEmbedded
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore[], int compressionLevel) throws IOException { """ Creates a file specification with the file embedded. The file may come from the file system or from a byte array. The data is flate compressed. @...
java
public static PdfFileSpecification fileEmbedded(PdfWriter writer, String filePath, String fileDisplay, byte fileStore[], int compressionLevel) throws IOException { return fileEmbedded(writer, filePath, fileDisplay, fileStore, null, null, compressionLevel); }
[ "public", "static", "PdfFileSpecification", "fileEmbedded", "(", "PdfWriter", "writer", ",", "String", "filePath", ",", "String", "fileDisplay", ",", "byte", "fileStore", "[", "]", ",", "int", "compressionLevel", ")", "throws", "IOException", "{", "return", "fileE...
Creates a file specification with the file embedded. The file may come from the file system or from a byte array. The data is flate compressed. @param writer the <CODE>PdfWriter</CODE> @param filePath the file path @param fileDisplay the file information that is presented to the user @param fileStore the byte array wit...
[ "Creates", "a", "file", "specification", "with", "the", "file", "embedded", ".", "The", "file", "may", "come", "from", "the", "file", "system", "or", "from", "a", "byte", "array", ".", "The", "data", "is", "flate", "compressed", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfFileSpecification.java#L113-L115
Azure/azure-sdk-for-java
policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java
PolicyStatesInner.listQueryResultsForSubscription
public PolicyStatesQueryResultsInner listQueryResultsForSubscription(PolicyStatesResource policyStatesResource, String subscriptionId) { """ Queries policy states for the resources under the subscription. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, '...
java
public PolicyStatesQueryResultsInner listQueryResultsForSubscription(PolicyStatesResource policyStatesResource, String subscriptionId) { return listQueryResultsForSubscriptionWithServiceResponseAsync(policyStatesResource, subscriptionId).toBlocking().single().body(); }
[ "public", "PolicyStatesQueryResultsInner", "listQueryResultsForSubscription", "(", "PolicyStatesResource", "policyStatesResource", ",", "String", "subscriptionId", ")", "{", "return", "listQueryResultsForSubscriptionWithServiceResponseAsync", "(", "policyStatesResource", ",", "subscr...
Queries policy states for the resources under the subscription. @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy state(s). Possible values include: 'default', 'latest' @param...
[ "Queries", "policy", "states", "for", "the", "resources", "under", "the", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policyinsights/resource-manager/v2018_04_04/src/main/java/com/microsoft/azure/management/policyinsights/v2018_04_04/implementation/PolicyStatesInner.java#L516-L518
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_easyHunting_serviceName_hunting_queue_POST
public OvhOvhPabxHuntingQueue billingAccount_easyHunting_serviceName_hunting_queue_POST(String billingAccount, String serviceName, OvhOvhPabxQueueActionEnum actionOnClosure, String actionOnClosureParam, OvhOvhPabxQueueActionEnum actionOnOverflow, String actionOnOverflowParam, Boolean askForRecordDisabling, String descr...
java
public OvhOvhPabxHuntingQueue billingAccount_easyHunting_serviceName_hunting_queue_POST(String billingAccount, String serviceName, OvhOvhPabxQueueActionEnum actionOnClosure, String actionOnClosureParam, OvhOvhPabxQueueActionEnum actionOnOverflow, String actionOnOverflowParam, Boolean askForRecordDisabling, String descr...
[ "public", "OvhOvhPabxHuntingQueue", "billingAccount_easyHunting_serviceName_hunting_queue_POST", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "OvhOvhPabxQueueActionEnum", "actionOnClosure", ",", "String", "actionOnClosureParam", ",", "OvhOvhPabxQueueActionEnum"...
Create a new queue REST: POST /telephony/{billingAccount}/easyHunting/{serviceName}/hunting/queue @param maxMember [required] The maximum of people waiting in the queue @param recordDisablingLanguage [required] Language of the sound played to the caller to inform that he can disable record @param description [required...
[ "Create", "a", "new", "queue" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L3187-L3206
QSFT/Doradus
doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java
SpiderSession.createBatchResult
private BatchResult createBatchResult(RESTResponse response, DBObjectBatch dbObjBatch) { """ Extract the BatchResult from the given RESTResponse. Could be an error. """ // See what kind of message payload, if any, we received. BatchResult result = null; if (response.getCode().isError...
java
private BatchResult createBatchResult(RESTResponse response, DBObjectBatch dbObjBatch) { // See what kind of message payload, if any, we received. BatchResult result = null; if (response.getCode().isError()) { String errMsg = response.getBody(); if (errMsg.length() =...
[ "private", "BatchResult", "createBatchResult", "(", "RESTResponse", "response", ",", "DBObjectBatch", "dbObjBatch", ")", "{", "// See what kind of message payload, if any, we received.\r", "BatchResult", "result", "=", "null", ";", "if", "(", "response", ".", "getCode", "...
Extract the BatchResult from the given RESTResponse. Could be an error.
[ "Extract", "the", "BatchResult", "from", "the", "given", "RESTResponse", ".", "Could", "be", "an", "error", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-client/src/main/java/com/dell/doradus/client/SpiderSession.java#L534-L548
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/LocaleData.java
LocaleData.getInteger
public static final Integer getInteger(Locale locale, String key) { """ Convenience method for retrieving an Integer resource. @param locale locale identifier @param key resource key @return resource value """ ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale); ...
java
public static final Integer getInteger(Locale locale, String key) { ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale); return ((Integer) bundle.getObject(key)); }
[ "public", "static", "final", "Integer", "getInteger", "(", "Locale", "locale", ",", "String", "key", ")", "{", "ResourceBundle", "bundle", "=", "ResourceBundle", ".", "getBundle", "(", "LocaleData", ".", "class", ".", "getName", "(", ")", ",", "locale", ")",...
Convenience method for retrieving an Integer resource. @param locale locale identifier @param key resource key @return resource value
[ "Convenience", "method", "for", "retrieving", "an", "Integer", "resource", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/LocaleData.java#L125-L129
cdapio/tephra
tephra-core/src/main/java/co/cask/tephra/visibility/VisibilityFence.java
VisibilityFence.prepareWait
public static FenceWait prepareWait(byte[] fenceId, TransactionSystemClient txClient) throws TransactionFailureException, InterruptedException, TimeoutException { """ Used by a writer to wait on a fence so that changes are visible to all readers with in-progress transactions. @param fenceId uniquely identif...
java
public static FenceWait prepareWait(byte[] fenceId, TransactionSystemClient txClient) throws TransactionFailureException, InterruptedException, TimeoutException { return new DefaultFenceWait(new TransactionContext(txClient, new WriteFence(fenceId))); }
[ "public", "static", "FenceWait", "prepareWait", "(", "byte", "[", "]", "fenceId", ",", "TransactionSystemClient", "txClient", ")", "throws", "TransactionFailureException", ",", "InterruptedException", ",", "TimeoutException", "{", "return", "new", "DefaultFenceWait", "(...
Used by a writer to wait on a fence so that changes are visible to all readers with in-progress transactions. @param fenceId uniquely identifies the data that this fence is used to synchronize. If the data is a table cell then this id can be composed of the table name, row key and column key for the data. @return {@li...
[ "Used", "by", "a", "writer", "to", "wait", "on", "a", "fence", "so", "that", "changes", "are", "visible", "to", "all", "readers", "with", "in", "-", "progress", "transactions", "." ]
train
https://github.com/cdapio/tephra/blob/082c56c15c6ece15002631ff6f89206a00d8915c/tephra-core/src/main/java/co/cask/tephra/visibility/VisibilityFence.java#L134-L137
geomajas/geomajas-project-server
plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/HsqlGeometryUserType.java
HsqlGeometryUserType.convert2JTS
public Geometry convert2JTS(Object object) { """ Converts the native geometry object to a JTS <code>Geometry</code>. @param object native database geometry object (depends on the JDBC spatial extension of the database) @return JTS geometry corresponding to geomObj. """ if (object == null) { return n...
java
public Geometry convert2JTS(Object object) { if (object == null) { return null; } String data = (String) object; int srid = Integer.parseInt(data.substring(0, data.indexOf("|"))); Geometry geom; try { WKTReader reader = new WKTReader(); geom = reader.read(data.substring(data.indexOf("|") + 1)); }...
[ "public", "Geometry", "convert2JTS", "(", "Object", "object", ")", "{", "if", "(", "object", "==", "null", ")", "{", "return", "null", ";", "}", "String", "data", "=", "(", "String", ")", "object", ";", "int", "srid", "=", "Integer", ".", "parseInt", ...
Converts the native geometry object to a JTS <code>Geometry</code>. @param object native database geometry object (depends on the JDBC spatial extension of the database) @return JTS geometry corresponding to geomObj.
[ "Converts", "the", "native", "geometry", "object", "to", "a", "JTS", "<code", ">", "Geometry<", "/", "code", ">", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/HsqlGeometryUserType.java#L45-L60
RestComm/sip-servlets
sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookSignatureUtil.java
FacebookSignatureUtil.verifySignature
public static boolean verifySignature(EnumMap<FacebookParam, CharSequence> params, String secret) { """ Verifies that a signature received matches the expected value. Removes FacebookParam.SIGNATURE from params if present. @param params a map of parameters and their values, such as one obtained from extractFace...
java
public static boolean verifySignature(EnumMap<FacebookParam, CharSequence> params, String secret) { if (null == params || params.isEmpty() ) return false; CharSequence sigParam = params.remove(FacebookParam.SIGNATURE); return (null == sigParam) ? false : verifySignature(params, secret, sigParam.toStri...
[ "public", "static", "boolean", "verifySignature", "(", "EnumMap", "<", "FacebookParam", ",", "CharSequence", ">", "params", ",", "String", "secret", ")", "{", "if", "(", "null", "==", "params", "||", "params", ".", "isEmpty", "(", ")", ")", "return", "fals...
Verifies that a signature received matches the expected value. Removes FacebookParam.SIGNATURE from params if present. @param params a map of parameters and their values, such as one obtained from extractFacebookParams; expected to the expected signature as the FacebookParam.SIGNATURE parameter @param secret @return a ...
[ "Verifies", "that", "a", "signature", "received", "matches", "the", "expected", "value", ".", "Removes", "FacebookParam", ".", "SIGNATURE", "from", "params", "if", "present", "." ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookSignatureUtil.java#L146-L151
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/regularization/L2Regularizer.java
L2Regularizer.estimatePenalty
public static <K> double estimatePenalty(double l2, Map<K, Double> weights) { """ Estimates the penalty by adding the L2 regularization. @param l2 @param weights @param <K> @return """ double penalty = 0.0; if(l2 > 0.0) { double sumWeightsSquared = 0.0; for(double ...
java
public static <K> double estimatePenalty(double l2, Map<K, Double> weights) { double penalty = 0.0; if(l2 > 0.0) { double sumWeightsSquared = 0.0; for(double w : weights.values()) { sumWeightsSquared += w*w; } penalty = l2*sumWeightsSquared...
[ "public", "static", "<", "K", ">", "double", "estimatePenalty", "(", "double", "l2", ",", "Map", "<", "K", ",", "Double", ">", "weights", ")", "{", "double", "penalty", "=", "0.0", ";", "if", "(", "l2", ">", "0.0", ")", "{", "double", "sumWeightsSqua...
Estimates the penalty by adding the L2 regularization. @param l2 @param weights @param <K> @return
[ "Estimates", "the", "penalty", "by", "adding", "the", "L2", "regularization", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/regularization/L2Regularizer.java#L53-L63
citrusframework/citrus
modules/citrus-ws/src/main/java/com/consol/citrus/ws/addressing/WsAddressingHeaders.java
WsAddressingHeaders.setAction
public void setAction(String action) { """ Sets the action from uri string. @param action the action to set """ try { this.action = new URI(action); } catch (URISyntaxException e) { throw new CitrusRuntimeException("Invalid action uri", e); } }
java
public void setAction(String action) { try { this.action = new URI(action); } catch (URISyntaxException e) { throw new CitrusRuntimeException("Invalid action uri", e); } }
[ "public", "void", "setAction", "(", "String", "action", ")", "{", "try", "{", "this", ".", "action", "=", "new", "URI", "(", "action", ")", ";", "}", "catch", "(", "URISyntaxException", "e", ")", "{", "throw", "new", "CitrusRuntimeException", "(", "\"Inv...
Sets the action from uri string. @param action the action to set
[ "Sets", "the", "action", "from", "uri", "string", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-ws/src/main/java/com/consol/citrus/ws/addressing/WsAddressingHeaders.java#L90-L96
JOML-CI/JOML
src/org/joml/Intersectionf.java
Intersectionf.intersectLineSegmentAab
public static int intersectLineSegmentAab(LineSegmentf lineSegment, AABBf aabb, Vector2f result) { """ Determine whether the given undirected line segment intersects the given axis-aligned box, and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + p0 * (p1 - p0)</i> of the near an...
java
public static int intersectLineSegmentAab(LineSegmentf lineSegment, AABBf aabb, Vector2f result) { return intersectLineSegmentAab(lineSegment.aX, lineSegment.aY, lineSegment.aZ, lineSegment.bX, lineSegment.bY, lineSegment.bZ, aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ, result); }
[ "public", "static", "int", "intersectLineSegmentAab", "(", "LineSegmentf", "lineSegment", ",", "AABBf", "aabb", ",", "Vector2f", "result", ")", "{", "return", "intersectLineSegmentAab", "(", "lineSegment", ".", "aX", ",", "lineSegment", ".", "aY", ",", "lineSegmen...
Determine whether the given undirected line segment intersects the given axis-aligned box, and return the values of the parameter <i>t</i> in the ray equation <i>p(t) = origin + p0 * (p1 - p0)</i> of the near and far point of intersection. <p> This method returns <code>true</code> for a line segment whose either end po...
[ "Determine", "whether", "the", "given", "undirected", "line", "segment", "intersects", "the", "given", "axis", "-", "aligned", "box", "and", "return", "the", "values", "of", "the", "parameter", "<i", ">", "t<", "/", "i", ">", "in", "the", "ray", "equation"...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectionf.java#L2597-L2599
knowm/XChange
xchange-therock/src/main/java/org/knowm/xchange/therock/service/TheRockTradeService.java
TheRockTradeService.cancelOrder
@Override public boolean cancelOrder(String orderId) throws IOException { """ Not available from exchange since TheRock needs currency pair in order to cancel an order """ CurrencyPair cp = (CurrencyPair) exchange .getExchangeSpecification() .getExchang...
java
@Override public boolean cancelOrder(String orderId) throws IOException { CurrencyPair cp = (CurrencyPair) exchange .getExchangeSpecification() .getExchangeSpecificParameters() .get(TheRockExchange.CURRENCY_PAIR); if (cp == null) { thro...
[ "@", "Override", "public", "boolean", "cancelOrder", "(", "String", "orderId", ")", "throws", "IOException", "{", "CurrencyPair", "cp", "=", "(", "CurrencyPair", ")", "exchange", ".", "getExchangeSpecification", "(", ")", ".", "getExchangeSpecificParameters", "(", ...
Not available from exchange since TheRock needs currency pair in order to cancel an order
[ "Not", "available", "from", "exchange", "since", "TheRock", "needs", "currency", "pair", "in", "order", "to", "cancel", "an", "order" ]
train
https://github.com/knowm/XChange/blob/e45f437ac8e0b89cd66cdcb3258bdb1bf3d88186/xchange-therock/src/main/java/org/knowm/xchange/therock/service/TheRockTradeService.java#L90-L103
TimeAndSpaceIO/SmoothieMap
src/main/java/net/openhft/smoothie/SmoothieMap.java
SmoothieMap.forEachWhile
@SuppressWarnings("unused") public final boolean forEachWhile(BiPredicate<? super K, ? super V> predicate) { """ Checks the given {@code predicate} on each entry in this map until all entries have been processed or the predicate returns false for some entry, or throws an Exception. Exceptions thrown by the p...
java
@SuppressWarnings("unused") public final boolean forEachWhile(BiPredicate<? super K, ? super V> predicate) { Objects.requireNonNull(predicate); boolean interrupted = false; int mc = this.modCount; Segment<K, V> segment; for (long segmentIndex = 0; segmentIndex >= 0; ...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "final", "boolean", "forEachWhile", "(", "BiPredicate", "<", "?", "super", "K", ",", "?", "super", "V", ">", "predicate", ")", "{", "Objects", ".", "requireNonNull", "(", "predicate", ")", ";", "bo...
Checks the given {@code predicate} on each entry in this map until all entries have been processed or the predicate returns false for some entry, or throws an Exception. Exceptions thrown by the predicate are relayed to the caller. <p>The entries will be processed in the same order as the entry set iterator, and {@lin...
[ "Checks", "the", "given", "{", "@code", "predicate", "}", "on", "each", "entry", "in", "this", "map", "until", "all", "entries", "have", "been", "processed", "or", "the", "predicate", "returns", "false", "for", "some", "entry", "or", "throws", "an", "Excep...
train
https://github.com/TimeAndSpaceIO/SmoothieMap/blob/c798f6cae1d377f6913e8821a1fcf5bf45ee0412/src/main/java/net/openhft/smoothie/SmoothieMap.java#L1079-L1095
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java
ReferenceDataUrl.getBehaviorCategoryUrl
public static MozuUrl getBehaviorCategoryUrl(Integer categoryId, String responseFields) { """ Get Resource Url for GetBehaviorCategory @param categoryId Unique identifier of the category to modify. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned ...
java
public static MozuUrl getBehaviorCategoryUrl(Integer categoryId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/platform/reference/behaviors/categories/{categoryId}?responseFields={responseFields}"); formatter.formatUrl("categoryId", categoryId); formatter.formatUrl("responseFields"...
[ "public", "static", "MozuUrl", "getBehaviorCategoryUrl", "(", "Integer", "categoryId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/platform/reference/behaviors/categories/{categoryId}?responseFields={responseFie...
Get Resource Url for GetBehaviorCategory @param categoryId Unique identifier of the category to modify. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data ...
[ "Get", "Resource", "Url", "for", "GetBehaviorCategory" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/platform/ReferenceDataUrl.java#L62-L68
anotheria/moskito
moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/parser/StatusData.java
StatusData.put
public void put(T key, Object value) { """ Stores given key-value mapping if no restrictions are violated by them. @param key mapping key. @param value mapping value. @throws IllegalArgumentException if the given key is {@code null} or if value is neither of correct type nor of String type. """ data...
java
public void put(T key, Object value) { data.put(key, ensureValueCorrectness(key, value)); }
[ "public", "void", "put", "(", "T", "key", ",", "Object", "value", ")", "{", "data", ".", "put", "(", "key", ",", "ensureValueCorrectness", "(", "key", ",", "value", ")", ")", ";", "}" ]
Stores given key-value mapping if no restrictions are violated by them. @param key mapping key. @param value mapping value. @throws IllegalArgumentException if the given key is {@code null} or if value is neither of correct type nor of String type.
[ "Stores", "given", "key", "-", "value", "mapping", "if", "no", "restrictions", "are", "violated", "by", "them", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-extensions/moskito-monitoring-plugin/src/main/java/net/anotheria/moskito/extensions/monitoring/parser/StatusData.java#L31-L33
lagom/lagom
service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/Descriptor.java
Descriptor.withPathParamSerializer
public <T> Descriptor withPathParamSerializer(Class<T> pathParamType, PathParamSerializer<T> pathParamSerializer) { """ Provide a custom path param serializer for the given path param type. @param pathParamType The path param type. @param pathParamSerializer The path param serializer. @return A copy of this d...
java
public <T> Descriptor withPathParamSerializer(Class<T> pathParamType, PathParamSerializer<T> pathParamSerializer) { return withPathParamSerializer((Type) pathParamType, pathParamSerializer); }
[ "public", "<", "T", ">", "Descriptor", "withPathParamSerializer", "(", "Class", "<", "T", ">", "pathParamType", ",", "PathParamSerializer", "<", "T", ">", "pathParamSerializer", ")", "{", "return", "withPathParamSerializer", "(", "(", "Type", ")", "pathParamType",...
Provide a custom path param serializer for the given path param type. @param pathParamType The path param type. @param pathParamSerializer The path param serializer. @return A copy of this descriptor.
[ "Provide", "a", "custom", "path", "param", "serializer", "for", "the", "given", "path", "param", "type", "." ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/Descriptor.java#L667-L669
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaEventElapsedTime
public static int cudaEventElapsedTime(float ms[], cudaEvent_t start, cudaEvent_t end) { """ Computes the elapsed time between events. <pre> cudaError_t cudaEventElapsedTime ( float* ms, cudaEvent_t start, cudaEvent_t end ) </pre> <div> <p>Computes the elapsed time between events. Computes the elapsed t...
java
public static int cudaEventElapsedTime(float ms[], cudaEvent_t start, cudaEvent_t end) { return checkResult(cudaEventElapsedTimeNative(ms, start, end)); }
[ "public", "static", "int", "cudaEventElapsedTime", "(", "float", "ms", "[", "]", ",", "cudaEvent_t", "start", ",", "cudaEvent_t", "end", ")", "{", "return", "checkResult", "(", "cudaEventElapsedTimeNative", "(", "ms", ",", "start", ",", "end", ")", ")", ";",...
Computes the elapsed time between events. <pre> cudaError_t cudaEventElapsedTime ( float* ms, cudaEvent_t start, cudaEvent_t end ) </pre> <div> <p>Computes the elapsed time between events. Computes the elapsed time between two events (in milliseconds with a resolution of around 0.5 microseconds). </p> <p>If either eve...
[ "Computes", "the", "elapsed", "time", "between", "events", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L7300-L7303
camunda/camunda-xml-model
src/main/java/org/camunda/bpm/model/xml/impl/util/IoUtil.java
IoUtil.transformDocumentToXml
public static void transformDocumentToXml(DomDocument document, StreamResult result) { """ Transforms a {@link DomDocument} to XML output. @param document the DOM document to transform @param result the {@link StreamResult} to write to """ TransformerFactory transformerFactory = TransformerFactory.ne...
java
public static void transformDocumentToXml(DomDocument document, StreamResult result) { TransformerFactory transformerFactory = TransformerFactory.newInstance(); try { Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); tra...
[ "public", "static", "void", "transformDocumentToXml", "(", "DomDocument", "document", ",", "StreamResult", "result", ")", "{", "TransformerFactory", "transformerFactory", "=", "TransformerFactory", ".", "newInstance", "(", ")", ";", "try", "{", "Transformer", "transfo...
Transforms a {@link DomDocument} to XML output. @param document the DOM document to transform @param result the {@link StreamResult} to write to
[ "Transforms", "a", "{", "@link", "DomDocument", "}", "to", "XML", "output", "." ]
train
https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/util/IoUtil.java#L124-L140
aws/aws-sdk-java
aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/AdvancedOptionsStatus.java
AdvancedOptionsStatus.withOptions
public AdvancedOptionsStatus withOptions(java.util.Map<String, String> options) { """ <p> Specifies the status of advanced options for the specified Elasticsearch domain. </p> @param options Specifies the status of advanced options for the specified Elasticsearch domain. @return Returns a reference to this ...
java
public AdvancedOptionsStatus withOptions(java.util.Map<String, String> options) { setOptions(options); return this; }
[ "public", "AdvancedOptionsStatus", "withOptions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "options", ")", "{", "setOptions", "(", "options", ")", ";", "return", "this", ";", "}" ]
<p> Specifies the status of advanced options for the specified Elasticsearch domain. </p> @param options Specifies the status of advanced options for the specified Elasticsearch domain. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "Specifies", "the", "status", "of", "advanced", "options", "for", "the", "specified", "Elasticsearch", "domain", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticsearch/src/main/java/com/amazonaws/services/elasticsearch/model/AdvancedOptionsStatus.java#L90-L93
elki-project/elki
elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java
BundleWriter.ensureBuffer
private ByteBuffer ensureBuffer(int size, ByteBuffer buffer, WritableByteChannel output) throws IOException { """ Ensure the buffer is large enough. @param size Required size to add @param buffer Existing buffer @param output Output channel @return Buffer, eventually resized @throws IOException on IO errors...
java
private ByteBuffer ensureBuffer(int size, ByteBuffer buffer, WritableByteChannel output) throws IOException { if(buffer.remaining() >= size) { return buffer; } flushBuffer(buffer, output); if(buffer.remaining() >= size) { return buffer; } // Aggressively grow the buffer return By...
[ "private", "ByteBuffer", "ensureBuffer", "(", "int", "size", ",", "ByteBuffer", "buffer", ",", "WritableByteChannel", "output", ")", "throws", "IOException", "{", "if", "(", "buffer", ".", "remaining", "(", ")", ">=", "size", ")", "{", "return", "buffer", ";...
Ensure the buffer is large enough. @param size Required size to add @param buffer Existing buffer @param output Output channel @return Buffer, eventually resized @throws IOException on IO errors
[ "Ensure", "the", "buffer", "is", "large", "enough", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-api/src/main/java/de/lmu/ifi/dbs/elki/datasource/bundle/BundleWriter.java#L142-L152
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/javac/comp/ConstFold.java
ConstFold.fold1
Type fold1(int opcode, Type operand) { """ Fold unary operation. @param opcode The operation's opcode instruction (usually a byte code), as entered by class Symtab. opcode's ifeq to ifge are for postprocessing xcmp; ifxx pairs of instructions. @param operand The operation's operand type. Argument types ...
java
Type fold1(int opcode, Type operand) { try { Object od = operand.constValue(); switch (opcode) { case nop: return operand; case ineg: // unary - return syms.intType.constType(-intValue(od)); case ixor: // ~ ...
[ "Type", "fold1", "(", "int", "opcode", ",", "Type", "operand", ")", "{", "try", "{", "Object", "od", "=", "operand", ".", "constValue", "(", ")", ";", "switch", "(", "opcode", ")", "{", "case", "nop", ":", "return", "operand", ";", "case", "ineg", ...
Fold unary operation. @param opcode The operation's opcode instruction (usually a byte code), as entered by class Symtab. opcode's ifeq to ifge are for postprocessing xcmp; ifxx pairs of instructions. @param operand The operation's operand type. Argument types are assumed to have non-null constValue's.
[ "Fold", "unary", "operation", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/javac/comp/ConstFold.java#L103-L145