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
wso2/transport-http
components/org.wso2.transport.http.netty/src/main/java/org/wso2/transport/http/netty/contractimpl/common/certificatevalidation/RevocationVerificationManager.java
RevocationVerificationManager.verifyRevocationStatus
public boolean verifyRevocationStatus(javax.security.cert.X509Certificate[] peerCertificates) throws CertificateVerificationException { """ This method first tries to verify the given certificate chain using OCSP since OCSP verification is faster. If that fails it tries to do the verification using C...
java
public boolean verifyRevocationStatus(javax.security.cert.X509Certificate[] peerCertificates) throws CertificateVerificationException { X509Certificate[] convertedCertificates = convert(peerCertificates); long start = System.currentTimeMillis(); // If not set by the user, def...
[ "public", "boolean", "verifyRevocationStatus", "(", "javax", ".", "security", ".", "cert", ".", "X509Certificate", "[", "]", "peerCertificates", ")", "throws", "CertificateVerificationException", "{", "X509Certificate", "[", "]", "convertedCertificates", "=", "convert",...
This method first tries to verify the given certificate chain using OCSP since OCSP verification is faster. If that fails it tries to do the verification using CRL. @param peerCertificates javax.security.cert.X509Certificate[] array of peer certificate chain from peer/client. @throws CertificateVerificationException O...
[ "This", "method", "first", "tries", "to", "verify", "the", "given", "certificate", "chain", "using", "OCSP", "since", "OCSP", "verification", "is", "faster", ".", "If", "that", "fails", "it", "tries", "to", "do", "the", "verification", "using", "CRL", "." ]
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/certificatevalidation/RevocationVerificationManager.java#L65-L95
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.classesAbsent
public static void classesAbsent(String fieldName,Class<?> aClass) { """ Thrown if the configured field hasn't classes parameter. @param fieldName name of the field @param aClass class's field """ throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorRelationalException2,fieldName, aClass.getSi...
java
public static void classesAbsent(String fieldName,Class<?> aClass){ throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorRelationalException2,fieldName, aClass.getSimpleName())); }
[ "public", "static", "void", "classesAbsent", "(", "String", "fieldName", ",", "Class", "<", "?", ">", "aClass", ")", "{", "throw", "new", "MappingErrorException", "(", "MSG", ".", "INSTANCE", ".", "message", "(", "mappingErrorRelationalException2", ",", "fieldNa...
Thrown if the configured field hasn't classes parameter. @param fieldName name of the field @param aClass class's field
[ "Thrown", "if", "the", "configured", "field", "hasn", "t", "classes", "parameter", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L558-L560
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java
DocBookBuildUtilities.setUniqueIdReferences
private static void setUniqueIdReferences(final Node node, final String id, final String fixedId) { """ ID attributes modified in the setUniqueIds() method may have been referenced locally in the XML. When an ID is updated, and attribute that referenced that ID is also updated. @param node The node to chec...
java
private static void setUniqueIdReferences(final Node node, final String id, final String fixedId) { final NamedNodeMap attributes = node.getAttributes(); if (attributes != null) { for (int i = 0; i < attributes.getLength(); ++i) { final Attr attr = (Attr) attributes.item(i); ...
[ "private", "static", "void", "setUniqueIdReferences", "(", "final", "Node", "node", ",", "final", "String", "id", ",", "final", "String", "fixedId", ")", "{", "final", "NamedNodeMap", "attributes", "=", "node", ".", "getAttributes", "(", ")", ";", "if", "(",...
ID attributes modified in the setUniqueIds() method may have been referenced locally in the XML. When an ID is updated, and attribute that referenced that ID is also updated. @param node The node to check for attributes @param id The old ID attribute value @param fixedId The new ID attribute
[ "ID", "attributes", "modified", "in", "the", "setUniqueIds", "()", "method", "may", "have", "been", "referenced", "locally", "in", "the", "XML", ".", "When", "an", "ID", "is", "updated", "and", "attribute", "that", "referenced", "that", "ID", "is", "also", ...
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java#L159-L178
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.txnPollReserve
public QueueItem txnPollReserve(long reservedOfferId, String transactionId) { """ Tries to obtain an item by removing the head of the queue or removing an item previously reserved by invoking {@link #txnOfferReserve(String)} with {@code reservedOfferId}. <p> If the queue item does not have data in-memory it wi...
java
public QueueItem txnPollReserve(long reservedOfferId, String transactionId) { QueueItem item = getItemQueue().peek(); if (item == null) { TxQueueItem txItem = txMap.remove(reservedOfferId); if (txItem == null) { return null; } item = new Qu...
[ "public", "QueueItem", "txnPollReserve", "(", "long", "reservedOfferId", ",", "String", "transactionId", ")", "{", "QueueItem", "item", "=", "getItemQueue", "(", ")", ".", "peek", "(", ")", ";", "if", "(", "item", "==", "null", ")", "{", "TxQueueItem", "tx...
Tries to obtain an item by removing the head of the queue or removing an item previously reserved by invoking {@link #txnOfferReserve(String)} with {@code reservedOfferId}. <p> If the queue item does not have data in-memory it will load the data from the queue store if the queue store is configured and enabled. @param...
[ "Tries", "to", "obtain", "an", "item", "by", "removing", "the", "head", "of", "the", "queue", "or", "removing", "an", "item", "previously", "reserved", "by", "invoking", "{", "@link", "#txnOfferReserve", "(", "String", ")", "}", "with", "{", "@code", "rese...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L182-L202
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.isExpired
public static boolean isExpired(Date startDate, DateField dateField, int timeLength, Date checkedDate) { """ 判定给定开始时间经过某段时间后是否过期 @param startDate 开始时间 @param dateField 时间单位 @param timeLength 时长 @param checkedDate 被比较的时间。如果经过时长后的时间晚于被检查的时间,就表示过期 @return 是否过期 @since 3.1.1 """ final Date endDate = offs...
java
public static boolean isExpired(Date startDate, DateField dateField, int timeLength, Date checkedDate) { final Date endDate = offset(startDate, dateField, timeLength); return endDate.after(checkedDate); }
[ "public", "static", "boolean", "isExpired", "(", "Date", "startDate", ",", "DateField", "dateField", ",", "int", "timeLength", ",", "Date", "checkedDate", ")", "{", "final", "Date", "endDate", "=", "offset", "(", "startDate", ",", "dateField", ",", "timeLength...
判定给定开始时间经过某段时间后是否过期 @param startDate 开始时间 @param dateField 时间单位 @param timeLength 时长 @param checkedDate 被比较的时间。如果经过时长后的时间晚于被检查的时间,就表示过期 @return 是否过期 @since 3.1.1
[ "判定给定开始时间经过某段时间后是否过期" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1561-L1564
Azure/azure-sdk-for-java
policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionsInner.java
PolicyDefinitionsInner.deleteAtManagementGroupAsync
public Observable<Void> deleteAtManagementGroupAsync(String policyDefinitionName, String managementGroupId) { """ Deletes a policy definition at management group level. @param policyDefinitionName The name of the policy definition to delete. @param managementGroupId The ID of the management group. @throws Ill...
java
public Observable<Void> deleteAtManagementGroupAsync(String policyDefinitionName, String managementGroupId) { return deleteAtManagementGroupWithServiceResponseAsync(policyDefinitionName, managementGroupId).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceR...
[ "public", "Observable", "<", "Void", ">", "deleteAtManagementGroupAsync", "(", "String", "policyDefinitionName", ",", "String", "managementGroupId", ")", "{", "return", "deleteAtManagementGroupWithServiceResponseAsync", "(", "policyDefinitionName", ",", "managementGroupId", "...
Deletes a policy definition at management group level. @param policyDefinitionName The name of the policy definition to delete. @param managementGroupId The ID of the management group. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Deletes", "a", "policy", "definition", "at", "management", "group", "level", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/policy/resource-manager/v2016_12_01/src/main/java/com/microsoft/azure/management/policy/v2016_12_01/implementation/PolicyDefinitionsInner.java#L564-L571
shrinkwrap/shrinkwrap
impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/MemoryMapArchiveBase.java
MemoryMapArchiveBase.removeNodeRecursively
private Node removeNodeRecursively(final NodeImpl node, final ArchivePath path) { """ Removes the specified node and its associated children from the contents of this archive. @param node the node to remove recursively @param path the path denoting the specified node @return the removed node itself """ ...
java
private Node removeNodeRecursively(final NodeImpl node, final ArchivePath path) { final NodeImpl parentNode = content.get(path.getParent()); if (parentNode != null) { parentNode.removeChild(node); } // Remove from nested archives if present nestedArchives.remove(path...
[ "private", "Node", "removeNodeRecursively", "(", "final", "NodeImpl", "node", ",", "final", "ArchivePath", "path", ")", "{", "final", "NodeImpl", "parentNode", "=", "content", ".", "get", "(", "path", ".", "getParent", "(", ")", ")", ";", "if", "(", "paren...
Removes the specified node and its associated children from the contents of this archive. @param node the node to remove recursively @param path the path denoting the specified node @return the removed node itself
[ "Removes", "the", "specified", "node", "and", "its", "associated", "children", "from", "the", "contents", "of", "this", "archive", "." ]
train
https://github.com/shrinkwrap/shrinkwrap/blob/3f8a1a6d344651428c709a63ebb52d35343c5387/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/MemoryMapArchiveBase.java#L303-L324
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/scope/AbstractVariableScope.java
AbstractVariableScope.setVariableLocalTransient
public void setVariableLocalTransient(String variableName, Object value) { """ Sets a variable in the local scope. In contrast to {@link #setVariableLocal(String, Object)}, the variable is transient that means it will not be stored in the data base. For example, a transient variable can be used for a result var...
java
public void setVariableLocalTransient(String variableName, Object value) { TypedValue typedValue = Variables.untypedValue(value, true); checkJavaSerialization(variableName, typedValue); CoreVariableInstance coreVariableInstance = getVariableInstanceFactory().build(variableName, typedValue, true); getV...
[ "public", "void", "setVariableLocalTransient", "(", "String", "variableName", ",", "Object", "value", ")", "{", "TypedValue", "typedValue", "=", "Variables", ".", "untypedValue", "(", "value", ",", "true", ")", ";", "checkJavaSerialization", "(", "variableName", "...
Sets a variable in the local scope. In contrast to {@link #setVariableLocal(String, Object)}, the variable is transient that means it will not be stored in the data base. For example, a transient variable can be used for a result variable that is only available for output mapping.
[ "Sets", "a", "variable", "in", "the", "local", "scope", ".", "In", "contrast", "to", "{" ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/core/variable/scope/AbstractVariableScope.java#L454-L461
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAvailabilityEstimatePersistenceImpl.java
CommerceAvailabilityEstimatePersistenceImpl.findByUUID_G
@Override public CommerceAvailabilityEstimate findByUUID_G(String uuid, long groupId) throws NoSuchAvailabilityEstimateException { """ Returns the commerce availability estimate where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchAvailabilityEstimateException} if it could not be found. @param uui...
java
@Override public CommerceAvailabilityEstimate findByUUID_G(String uuid, long groupId) throws NoSuchAvailabilityEstimateException { CommerceAvailabilityEstimate commerceAvailabilityEstimate = fetchByUUID_G(uuid, groupId); if (commerceAvailabilityEstimate == null) { StringBundler msg = new StringBundler(6)...
[ "@", "Override", "public", "CommerceAvailabilityEstimate", "findByUUID_G", "(", "String", "uuid", ",", "long", "groupId", ")", "throws", "NoSuchAvailabilityEstimateException", "{", "CommerceAvailabilityEstimate", "commerceAvailabilityEstimate", "=", "fetchByUUID_G", "(", "uui...
Returns the commerce availability estimate where uuid = &#63; and groupId = &#63; or throws a {@link NoSuchAvailabilityEstimateException} if it could not be found. @param uuid the uuid @param groupId the group ID @return the matching commerce availability estimate @throws NoSuchAvailabilityEstimateException if a match...
[ "Returns", "the", "commerce", "availability", "estimate", "where", "uuid", "=", "&#63", ";", "and", "groupId", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchAvailabilityEstimateException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceAvailabilityEstimatePersistenceImpl.java#L677-L704
aoindustries/aocode-public
src/main/java/com/aoindustries/util/StringUtility.java
StringUtility.removeChars
@Deprecated public static String removeChars(String S, char[] chars) { """ Removes all occurrences of a <code>char</code> from a <code>String</code> @deprecated this method is slow and no longer supported """ int pos; while((pos=indexOf(S, chars))!=-1) S=S.substring(0,pos)+S.substring(pos+1); return...
java
@Deprecated public static String removeChars(String S, char[] chars) { int pos; while((pos=indexOf(S, chars))!=-1) S=S.substring(0,pos)+S.substring(pos+1); return S; }
[ "@", "Deprecated", "public", "static", "String", "removeChars", "(", "String", "S", ",", "char", "[", "]", "chars", ")", "{", "int", "pos", ";", "while", "(", "(", "pos", "=", "indexOf", "(", "S", ",", "chars", ")", ")", "!=", "-", "1", ")", "S",...
Removes all occurrences of a <code>char</code> from a <code>String</code> @deprecated this method is slow and no longer supported
[ "Removes", "all", "occurrences", "of", "a", "<code", ">", "char<", "/", "code", ">", "from", "a", "<code", ">", "String<", "/", "code", ">" ]
train
https://github.com/aoindustries/aocode-public/blob/c7bc1d08aee1d02dfaeeb1421fad21aca1aad4c3/src/main/java/com/aoindustries/util/StringUtility.java#L673-L678
FudanNLP/fnlp
fnlp-core/src/main/java/org/fnlp/nlp/parser/dep/JointParser.java
JointParser.estimateActions
private Predict<String> estimateActions(JointParsingState state) { """ 动作预测 根据当前状态得到的特征,和训练好的模型,预测当前状态应采取的策略,用在测试中 @param featureAlphabet 特征名到特征ID的对应表,特征抽取时使用特征名,模型中使用特征ID, @param model 分类模型 @param features 当前状态的特征 @return 动作及其概率 [[动作1,概率1],[动作2,概率2],[动作3,概率3]] 动作: 1->LEFT; 2->RIGHT; 0->SHIFT """ ...
java
private Predict<String> estimateActions(JointParsingState state) { // 当前状态的特征 ArrayList<String> features = state.getFeatures(); Instance inst = new Instance(addFeature(fa, features, ysize)); Predict<Integer> ret = models.classify(inst,ysize); ret.normalize(); Predict<String> result =new Predict<Stri...
[ "private", "Predict", "<", "String", ">", "estimateActions", "(", "JointParsingState", "state", ")", "{", "// 当前状态的特征\r", "ArrayList", "<", "String", ">", "features", "=", "state", ".", "getFeatures", "(", ")", ";", "Instance", "inst", "=", "new", "Instance", ...
动作预测 根据当前状态得到的特征,和训练好的模型,预测当前状态应采取的策略,用在测试中 @param featureAlphabet 特征名到特征ID的对应表,特征抽取时使用特征名,模型中使用特征ID, @param model 分类模型 @param features 当前状态的特征 @return 动作及其概率 [[动作1,概率1],[动作2,概率2],[动作3,概率3]] 动作: 1->LEFT; 2->RIGHT; 0->SHIFT
[ "动作预测" ]
train
https://github.com/FudanNLP/fnlp/blob/ce258f3e4a5add2ba0b5e4cbac7cab2190af6659/fnlp-core/src/main/java/org/fnlp/nlp/parser/dep/JointParser.java#L158-L177
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/util/CollectionUtil.java
CollectionUtil.subArray
@SuppressWarnings( { """ Creates an array containing a subset of the original array. If the {@code pLength} parameter is negative, it will be ignored. If there are not {@code pLength} elements in the original array after {@code pStart}, the {@code pLength} parameter will be ignored. If the sub array is same l...
java
@SuppressWarnings({"SuspiciousSystemArraycopy"}) public static Object subArray(Object pArray, int pStart, int pLength) { Validate.notNull(pArray, "array"); // Get component type Class type; // Sanity check start index if (pStart < 0) { throw new ArrayIn...
[ "@", "SuppressWarnings", "(", "{", "\"SuspiciousSystemArraycopy\"", "}", ")", "public", "static", "Object", "subArray", "(", "Object", "pArray", ",", "int", "pStart", ",", "int", "pLength", ")", "{", "Validate", ".", "notNull", "(", "pArray", ",", "\"array\"",...
Creates an array containing a subset of the original array. If the {@code pLength} parameter is negative, it will be ignored. If there are not {@code pLength} elements in the original array after {@code pStart}, the {@code pLength} parameter will be ignored. If the sub array is same length as the original, the original...
[ "Creates", "an", "array", "containing", "a", "subset", "of", "the", "original", "array", ".", "If", "the", "{", "@code", "pLength", "}", "parameter", "is", "negative", "it", "will", "be", "ignored", ".", "If", "there", "are", "not", "{", "@code", "pLengt...
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/util/CollectionUtil.java#L314-L355
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java
MapComposedElement.getPointAt
@Pure public Point2d getPointAt(int groupIndex, int indexInGroup) { """ Replies the specified point at the given index in the specified group. @param groupIndex is the index of the group @param indexInGroup is the index of the point in the group (0 for the first point of the group...). @return the point @t...
java
@Pure public Point2d getPointAt(int groupIndex, int indexInGroup) { final int startIndex = firstInGroup(groupIndex); // Besure that the member's index is in the group index's range final int groupMemberCount = getPointCountInGroup(groupIndex); if (indexInGroup < 0) { throw new IndexOutOfBoundsException(ind...
[ "@", "Pure", "public", "Point2d", "getPointAt", "(", "int", "groupIndex", ",", "int", "indexInGroup", ")", "{", "final", "int", "startIndex", "=", "firstInGroup", "(", "groupIndex", ")", ";", "// Besure that the member's index is in the group index's range", "final", ...
Replies the specified point at the given index in the specified group. @param groupIndex is the index of the group @param indexInGroup is the index of the point in the group (0 for the first point of the group...). @return the point @throws IndexOutOfBoundsException in case of error.
[ "Replies", "the", "specified", "point", "at", "the", "given", "index", "in", "the", "specified", "group", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L890-L906
kiegroup/drools
drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java
DroolsStreamUtils.streamIn
public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException { """ This method reads the contents from the given input stream and returns the object. The contents in the given stream could be compressed or uncompressed depending...
java
public static Object streamIn(InputStream in, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException { if (compressed) in = new GZIPInputStream(in); return new DroolsObjectInputStream(in, classLoader).readObject(); }
[ "public", "static", "Object", "streamIn", "(", "InputStream", "in", ",", "ClassLoader", "classLoader", ",", "boolean", "compressed", ")", "throws", "IOException", ",", "ClassNotFoundException", "{", "if", "(", "compressed", ")", "in", "=", "new", "GZIPInputStream"...
This method reads the contents from the given input stream and returns the object. The contents in the given stream could be compressed or uncompressed depending on the given flag. It is assumed that the content stream was written by the corresponding streamOut methods of this class. @param in @return @throws IOExcep...
[ "This", "method", "reads", "the", "contents", "from", "the", "given", "input", "stream", "and", "returns", "the", "object", ".", "The", "contents", "in", "the", "given", "stream", "could", "be", "compressed", "or", "uncompressed", "depending", "on", "the", "...
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/util/DroolsStreamUtils.java#L201-L206
Axway/Grapes
utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java
GrapesClient.getModule
public Module getModule(final String name, final String version) throws GrapesCommunicationException { """ Send a get module request @param name @param version @return the targeted module @throws GrapesCommunicationException """ final Client client = getClient(); final WebResource resourc...
java
public Module getModule(final String name, final String version) throws GrapesCommunicationException { final Client client = getClient(); final WebResource resource = client.resource(serverURL).path(RequestUtils.getModulePath(name, version)); final ClientResponse response = resource.accept(Media...
[ "public", "Module", "getModule", "(", "final", "String", "name", ",", "final", "String", "version", ")", "throws", "GrapesCommunicationException", "{", "final", "Client", "client", "=", "getClient", "(", ")", ";", "final", "WebResource", "resource", "=", "client...
Send a get module request @param name @param version @return the targeted module @throws GrapesCommunicationException
[ "Send", "a", "get", "module", "request" ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/utils/src/main/java/org/axway/grapes/utils/client/GrapesClient.java#L225-L240
cdk/cdk
tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java
Polarizability.getNumberOfHydrogen
private int getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom) { """ Gets the numberOfHydrogen attribute of the Polarizability object. @param atomContainer Description of the Parameter @param atom Description of the Parameter @return The numberOfHydrogen value """ java.util....
java
private int getNumberOfHydrogen(IAtomContainer atomContainer, IAtom atom) { java.util.List<IBond> bonds = atomContainer.getConnectedBondsList(atom); IAtom connectedAtom; int hCounter = 0; for (IBond bond : bonds) { connectedAtom = bond.getOther(atom); if (connecte...
[ "private", "int", "getNumberOfHydrogen", "(", "IAtomContainer", "atomContainer", ",", "IAtom", "atom", ")", "{", "java", ".", "util", ".", "List", "<", "IBond", ">", "bonds", "=", "atomContainer", ".", "getConnectedBondsList", "(", "atom", ")", ";", "IAtom", ...
Gets the numberOfHydrogen attribute of the Polarizability object. @param atomContainer Description of the Parameter @param atom Description of the Parameter @return The numberOfHydrogen value
[ "Gets", "the", "numberOfHydrogen", "attribute", "of", "the", "Polarizability", "object", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/charges/src/main/java/org/openscience/cdk/charges/Polarizability.java#L298-L309
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbwlm_lbvserver_binding.java
lbwlm_lbvserver_binding.count_filtered
public static long count_filtered(nitro_service service, String wlmname, String filter) throws Exception { """ Use this API to count the filtered set of lbwlm_lbvserver_binding resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP". """ lbwlm_lbvserver_binding obj = new lbwlm_lbvse...
java
public static long count_filtered(nitro_service service, String wlmname, String filter) throws Exception{ lbwlm_lbvserver_binding obj = new lbwlm_lbvserver_binding(); obj.set_wlmname(wlmname); options option = new options(); option.set_count(true); option.set_filter(filter); lbwlm_lbvserver_binding[] respon...
[ "public", "static", "long", "count_filtered", "(", "nitro_service", "service", ",", "String", "wlmname", ",", "String", "filter", ")", "throws", "Exception", "{", "lbwlm_lbvserver_binding", "obj", "=", "new", "lbwlm_lbvserver_binding", "(", ")", ";", "obj", ".", ...
Use this API to count the filtered set of lbwlm_lbvserver_binding resources. filter string should be in JSON format.eg: "port:80,servicetype:HTTP".
[ "Use", "this", "API", "to", "count", "the", "filtered", "set", "of", "lbwlm_lbvserver_binding", "resources", ".", "filter", "string", "should", "be", "in", "JSON", "format", ".", "eg", ":", "port", ":", "80", "servicetype", ":", "HTTP", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbwlm_lbvserver_binding.java#L206-L217
bazaarvoice/emodb
sor/src/main/java/com/bazaarvoice/emodb/sor/db/astyanax/CqlDataReaderDAO.java
CqlDataReaderDAO.newRecordFromCql
private Record newRecordFromCql(Key key, Iterable<Row> rows) { """ Creates a Record instance for a given key and list of rows. All rows must be from the same Cassandra row; in other words, it is expected that row.getBytesUnsafe(ROW_KEY_RESULT_SET_COLUMN) returns the same value for each row in rows. """ ...
java
private Record newRecordFromCql(Key key, Iterable<Row> rows) { Iterator<Map.Entry<DeltaClusteringKey, Change>> changeIter = decodeChangesFromCql(rows.iterator()); Iterator<Map.Entry<DeltaClusteringKey, Compaction>> compactionIter = decodeCompactionsFromCql(rows.iterator()); Iterator<RecordEntryR...
[ "private", "Record", "newRecordFromCql", "(", "Key", "key", ",", "Iterable", "<", "Row", ">", "rows", ")", "{", "Iterator", "<", "Map", ".", "Entry", "<", "DeltaClusteringKey", ",", "Change", ">", ">", "changeIter", "=", "decodeChangesFromCql", "(", "rows", ...
Creates a Record instance for a given key and list of rows. All rows must be from the same Cassandra row; in other words, it is expected that row.getBytesUnsafe(ROW_KEY_RESULT_SET_COLUMN) returns the same value for each row in rows.
[ "Creates", "a", "Record", "instance", "for", "a", "given", "key", "and", "list", "of", "rows", ".", "All", "rows", "must", "be", "from", "the", "same", "Cassandra", "row", ";", "in", "other", "words", "it", "is", "expected", "that", "row", ".", "getByt...
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/sor/src/main/java/com/bazaarvoice/emodb/sor/db/astyanax/CqlDataReaderDAO.java#L288-L294
segmentio/analytics-android
analytics/src/main/java/com/segment/analytics/Options.java
Options.setIntegrationOptions
public Options setIntegrationOptions(String integrationKey, Map<String, Object> options) { """ Attach some integration specific options for this call. @param integrationKey The target integration key @param options A map of data that will be used by the integration @return This options object for chaining ...
java
public Options setIntegrationOptions(String integrationKey, Map<String, Object> options) { integrations.put(integrationKey, options); return this; }
[ "public", "Options", "setIntegrationOptions", "(", "String", "integrationKey", ",", "Map", "<", "String", ",", "Object", ">", "options", ")", "{", "integrations", ".", "put", "(", "integrationKey", ",", "options", ")", ";", "return", "this", ";", "}" ]
Attach some integration specific options for this call. @param integrationKey The target integration key @param options A map of data that will be used by the integration @return This options object for chaining
[ "Attach", "some", "integration", "specific", "options", "for", "this", "call", "." ]
train
https://github.com/segmentio/analytics-android/blob/93c7d5bb09b593440a2347a6089db3e9f74012da/analytics/src/main/java/com/segment/analytics/Options.java#L100-L103
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java
XmlStringTools.appendOpeningTag
public static StringBuffer appendOpeningTag(StringBuffer buffer, String tag) { """ Add an opening tag to a StringBuffer. If the buffer is null, a new one is created. @param buffer StringBuffer to fill @param tag the tag to open @return the buffer """ return appendOpeningTag(buffer, tag, EMPTY_MAP);...
java
public static StringBuffer appendOpeningTag(StringBuffer buffer, String tag) { return appendOpeningTag(buffer, tag, EMPTY_MAP); }
[ "public", "static", "StringBuffer", "appendOpeningTag", "(", "StringBuffer", "buffer", ",", "String", "tag", ")", "{", "return", "appendOpeningTag", "(", "buffer", ",", "tag", ",", "EMPTY_MAP", ")", ";", "}" ]
Add an opening tag to a StringBuffer. If the buffer is null, a new one is created. @param buffer StringBuffer to fill @param tag the tag to open @return the buffer
[ "Add", "an", "opening", "tag", "to", "a", "StringBuffer", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L352-L355
joinfaces/joinfaces
joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/javaxfaces/FacesServletAutoConfiguration.java
FacesServletAutoConfiguration.facesServletRegistrationBean
@Bean public ServletRegistrationBean<FacesServlet> facesServletRegistrationBean( FacesServletProperties facesServletProperties ) { """ This bean registers the {@link FacesServlet}. <p> This {@link ServletRegistrationBean} also sets two {@link ServletContext#setAttribute(String, Object) servlet-context attr...
java
@Bean public ServletRegistrationBean<FacesServlet> facesServletRegistrationBean( FacesServletProperties facesServletProperties ) { ServletRegistrationBean<FacesServlet> facesServletServletRegistrationBean = new ServletRegistrationBean<FacesServlet>(new FacesServlet()) { @Override protected ServletRegistrat...
[ "@", "Bean", "public", "ServletRegistrationBean", "<", "FacesServlet", ">", "facesServletRegistrationBean", "(", "FacesServletProperties", "facesServletProperties", ")", "{", "ServletRegistrationBean", "<", "FacesServlet", ">", "facesServletServletRegistrationBean", "=", "new",...
This bean registers the {@link FacesServlet}. <p> This {@link ServletRegistrationBean} also sets two {@link ServletContext#setAttribute(String, Object) servlet-context attributes} to inform Mojarra and MyFaces about the dynamically added Servlet. @param facesServletProperties The properties for the {@link FacesServlet...
[ "This", "bean", "registers", "the", "{", "@link", "FacesServlet", "}", ".", "<p", ">", "This", "{", "@link", "ServletRegistrationBean", "}", "also", "sets", "two", "{", "@link", "ServletContext#setAttribute", "(", "String", "Object", ")", "servlet", "-", "cont...
train
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-autoconfigure/src/main/java/org/joinfaces/autoconfigure/javaxfaces/FacesServletAutoConfiguration.java#L49-L73
Samsung/GearVRf
GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRRigidBody.java
GVRRigidBody.setAngularVelocity
public void setAngularVelocity(float x, float y, float z) { """ Sets an angular velocity [X, Y, Z] on this {@linkplain GVRRigidBody rigid body} @param x factor on the 'X' axis. @param y factor on the 'Y' axis. @param z factor on the 'Z' axis. """ Native3DRigidBody.setAngularVelocity(getNative(), x...
java
public void setAngularVelocity(float x, float y, float z) { Native3DRigidBody.setAngularVelocity(getNative(), x, y, z); }
[ "public", "void", "setAngularVelocity", "(", "float", "x", ",", "float", "y", ",", "float", "z", ")", "{", "Native3DRigidBody", ".", "setAngularVelocity", "(", "getNative", "(", ")", ",", "x", ",", "y", ",", "z", ")", ";", "}" ]
Sets an angular velocity [X, Y, Z] on this {@linkplain GVRRigidBody rigid body} @param x factor on the 'X' axis. @param y factor on the 'Y' axis. @param z factor on the 'Z' axis.
[ "Sets", "an", "angular", "velocity", "[", "X", "Y", "Z", "]", "on", "this", "{", "@linkplain", "GVRRigidBody", "rigid", "body", "}" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/gvrf-physics/src/main/java/org/gearvrf/physics/GVRRigidBody.java#L319-L321
crawljax/crawljax
core/src/main/java/com/crawljax/stateabstractions/visual/imagehashes/DHash.java
DHash.getDHash
public String getDHash(String object) { """ /* Returns the difference hashing (DHash for short) of the image. """ /* OpenCV does not work if you have encoded URLs (e.g., %20 instead of space in the path) * This fixes the following error: * CvException [org.opencv.core.CvException: cv::Exception: OpenC...
java
public String getDHash(String object) { /* OpenCV does not work if you have encoded URLs (e.g., %20 instead of space in the path) * This fixes the following error: * CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.3) ... * error: (-215:Assertion failed) !ssize.empty() in function 'resize...
[ "public", "String", "getDHash", "(", "String", "object", ")", "{", "/* OpenCV does not work if you have encoded URLs (e.g., %20 instead of space in the path)\n\t\t * This fixes the following error:\n\t\t * CvException [org.opencv.core.CvException: cv::Exception: OpenCV(3.4.3) ...\n\t\t * error: (-21...
/* Returns the difference hashing (DHash for short) of the image.
[ "/", "*", "Returns", "the", "difference", "hashing", "(", "DHash", "for", "short", ")", "of", "the", "image", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/stateabstractions/visual/imagehashes/DHash.java#L29-L88
rey5137/material
material/src/main/java/com/rey/material/widget/FloatingActionButton.java
FloatingActionButton.updateLocation
public void updateLocation(int x, int y, int gravity) { """ Update the location of this button. This method only work if it's already attached to a parent view. @param x The x value of anchor point. @param y The y value of anchor point. @param gravity The gravity apply with this button. @see Gravity """ ...
java
public void updateLocation(int x, int y, int gravity){ if(getParent() != null) updateParams(x, y, gravity, getLayoutParams()); else Log.v(FloatingActionButton.class.getSimpleName(), "updateLocation() is called without parent"); }
[ "public", "void", "updateLocation", "(", "int", "x", ",", "int", "y", ",", "int", "gravity", ")", "{", "if", "(", "getParent", "(", ")", "!=", "null", ")", "updateParams", "(", "x", ",", "y", ",", "gravity", ",", "getLayoutParams", "(", ")", ")", "...
Update the location of this button. This method only work if it's already attached to a parent view. @param x The x value of anchor point. @param y The y value of anchor point. @param gravity The gravity apply with this button. @see Gravity
[ "Update", "the", "location", "of", "this", "button", ".", "This", "method", "only", "work", "if", "it", "s", "already", "attached", "to", "a", "parent", "view", ".", "@param", "x", "The", "x", "value", "of", "anchor", "point", ".", "@param", "y", "The"...
train
https://github.com/rey5137/material/blob/1bbcac2686a0023ef7720d3fe455bb116d115af8/material/src/main/java/com/rey/material/widget/FloatingActionButton.java#L362-L367
marklogic/marklogic-contentpump
mapreduce/src/main/java/com/marklogic/mapreduce/ForestReader.java
ForestReader.setKey
protected void setKey(String uri, String sub, int line, int col) { """ Apply URI prefix and suffix configuration options and set the result as DocumentURI key. @param uri Source string of document URI. @param sub Sub-entry of the source of the document origin. @param line Line number in the source if applica...
java
protected void setKey(String uri, String sub, int line, int col) { if (srcId == null) { srcId = split.getPath().toString(); } // apply prefix and suffix for URI uri = URIUtil.applyUriReplace(uri, conf); uri = URIUtil.applyPrefixSuffix(uri, conf); if (key == nu...
[ "protected", "void", "setKey", "(", "String", "uri", ",", "String", "sub", ",", "int", "line", ",", "int", "col", ")", "{", "if", "(", "srcId", "==", "null", ")", "{", "srcId", "=", "split", ".", "getPath", "(", ")", ".", "toString", "(", ")", ";...
Apply URI prefix and suffix configuration options and set the result as DocumentURI key. @param uri Source string of document URI. @param sub Sub-entry of the source of the document origin. @param line Line number in the source if applicable; -1 otherwise. @param col Column number in the source if applicable; -1 other...
[ "Apply", "URI", "prefix", "and", "suffix", "configuration", "options", "and", "set", "the", "result", "as", "DocumentURI", "key", "." ]
train
https://github.com/marklogic/marklogic-contentpump/blob/4c41e4a953301f81a4c655efb2a847603dee8afc/mapreduce/src/main/java/com/marklogic/mapreduce/ForestReader.java#L195-L212
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/doc/DocClient.java
DocClient.listDocuments
public ListDocumentsResponse listDocuments(String status, String marker, int maxSize) { """ list all Document by status, marker. @param status document status @param marker the marker, can be "" @param maxSize the maxSize, should be (0, 200] @return A ListDocumentsResponse object containing the information r...
java
public ListDocumentsResponse listDocuments(String status, String marker, int maxSize) { ListDocumentsRequest request = new ListDocumentsRequest(); InternalRequest internalRequest = this.createRequest(HttpMethodName.GET, request, DOC); internalRequest.addParameter("status", status); if (m...
[ "public", "ListDocumentsResponse", "listDocuments", "(", "String", "status", ",", "String", "marker", ",", "int", "maxSize", ")", "{", "ListDocumentsRequest", "request", "=", "new", "ListDocumentsRequest", "(", ")", ";", "InternalRequest", "internalRequest", "=", "t...
list all Document by status, marker. @param status document status @param marker the marker, can be "" @param maxSize the maxSize, should be (0, 200] @return A ListDocumentsResponse object containing the information returned by Document.
[ "list", "all", "Document", "by", "status", "marker", ".", "@param", "status", "document", "status", "@param", "marker", "the", "marker", "can", "be", "@param", "maxSize", "the", "maxSize", "should", "be", "(", "0", "200", "]" ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/doc/DocClient.java#L593-L614
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/templates/TemplateEngineOrchestratorImpl.java
TemplateEngineOrchestratorImpl.mapEngine
private void mapEngine(Map<String, Provider<? extends TemplateEngine>> map, Provider<? extends TemplateEngine> engine) { """ Map the engine to all the content types it supports. If any kind of overlap exists, a race condition occurs @param map @param engine """ for (String type : engine.get().getCon...
java
private void mapEngine(Map<String, Provider<? extends TemplateEngine>> map, Provider<? extends TemplateEngine> engine) { for (String type : engine.get().getContentType()) { map.put(type, engine); } }
[ "private", "void", "mapEngine", "(", "Map", "<", "String", ",", "Provider", "<", "?", "extends", "TemplateEngine", ">", ">", "map", ",", "Provider", "<", "?", "extends", "TemplateEngine", ">", "engine", ")", "{", "for", "(", "String", "type", ":", "engin...
Map the engine to all the content types it supports. If any kind of overlap exists, a race condition occurs @param map @param engine
[ "Map", "the", "engine", "to", "all", "the", "content", "types", "it", "supports", ".", "If", "any", "kind", "of", "overlap", "exists", "a", "race", "condition", "occurs" ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/templates/TemplateEngineOrchestratorImpl.java#L101-L105
gallandarakhneorg/afc
core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java
MeasureUnitUtil.fromMetersPerSecond
@Pure public static double fromMetersPerSecond(double value, SpeedUnit outputUnit) { """ Convert the given value expressed in meters per second to the given unit. @param value is the value to convert @param outputUnit is the unit of result. @return the result of the convertion. """ switch (outputUnit) ...
java
@Pure public static double fromMetersPerSecond(double value, SpeedUnit outputUnit) { switch (outputUnit) { case KILOMETERS_PER_HOUR: return value / 3.6; case MILLIMETERS_PER_SECOND: return value * 1000.; case METERS_PER_SECOND: default: } return value; }
[ "@", "Pure", "public", "static", "double", "fromMetersPerSecond", "(", "double", "value", ",", "SpeedUnit", "outputUnit", ")", "{", "switch", "(", "outputUnit", ")", "{", "case", "KILOMETERS_PER_HOUR", ":", "return", "value", "/", "3.6", ";", "case", "MILLIMET...
Convert the given value expressed in meters per second to the given unit. @param value is the value to convert @param outputUnit is the unit of result. @return the result of the convertion.
[ "Convert", "the", "given", "value", "expressed", "in", "meters", "per", "second", "to", "the", "given", "unit", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathphysics/src/main/java/org/arakhne/afc/math/physics/MeasureUnitUtil.java#L658-L669
geomajas/geomajas-project-client-gwt
plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/contextmenu/JsGeometryContextMenuRegistry.java
JsGeometryContextMenuRegistry.addVertexAction
public void addVertexAction(final JsGeometryContextMenuAction action, String title) { """ Adds a vertex context menu action. @param action @param title """ delegate.addVertexAction(new GeometryContextMenuAction(title, null) { @Override public void onClick(MenuItemClickEvent event) { action.exe...
java
public void addVertexAction(final JsGeometryContextMenuAction action, String title) { delegate.addVertexAction(new GeometryContextMenuAction(title, null) { @Override public void onClick(MenuItemClickEvent event) { action.execute(JsGeometryContextMenuRegistry.this); } }); }
[ "public", "void", "addVertexAction", "(", "final", "JsGeometryContextMenuAction", "action", ",", "String", "title", ")", "{", "delegate", ".", "addVertexAction", "(", "new", "GeometryContextMenuAction", "(", "title", ",", "null", ")", "{", "@", "Override", "public...
Adds a vertex context menu action. @param action @param title
[ "Adds", "a", "vertex", "context", "menu", "action", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/editing/editing-javascript-api-gwt/src/main/java/org/geomajas/plugin/editing/jsapi/gwt/client/contextmenu/JsGeometryContextMenuRegistry.java#L60-L69
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathFunctionResolver.java
MapBasedXPathFunctionResolver.addUniqueFunction
@Nonnull public EChange addUniqueFunction (@Nonnull final QName aName, @Nonnegative final int nArity, @Nonnull final XPathFunction aFunction) { """ Add a new function. @param aName The qualified name of the function @param nArity The n...
java
@Nonnull public EChange addUniqueFunction (@Nonnull final QName aName, @Nonnegative final int nArity, @Nonnull final XPathFunction aFunction) { ValueEnforcer.notNull (aFunction, "Function"); final XPathFunctionKey aFunctionKey = new XP...
[ "@", "Nonnull", "public", "EChange", "addUniqueFunction", "(", "@", "Nonnull", "final", "QName", "aName", ",", "@", "Nonnegative", "final", "int", "nArity", ",", "@", "Nonnull", "final", "XPathFunction", "aFunction", ")", "{", "ValueEnforcer", ".", "notNull", ...
Add a new function. @param aName The qualified name of the function @param nArity The number of parameters of the function @param aFunction The function to be used. May not be <code>null</code>. @return {@link EChange}
[ "Add", "a", "new", "function", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/xpath/MapBasedXPathFunctionResolver.java#L104-L116
alkacon/opencms-core
src/org/opencms/ui/apps/git/CmsGitCheckin.java
CmsGitCheckin.readConfigFiles
private List<CmsGitConfiguration> readConfigFiles() { """ Read all configuration files. @return the list with all available configurations """ List<CmsGitConfiguration> configurations = new LinkedList<CmsGitConfiguration>(); // Default configuration file for backwards compatibility a...
java
private List<CmsGitConfiguration> readConfigFiles() { List<CmsGitConfiguration> configurations = new LinkedList<CmsGitConfiguration>(); // Default configuration file for backwards compatibility addConfigurationIfValid(configurations, new File(DEFAULT_CONFIG_FILE)); // All files in the...
[ "private", "List", "<", "CmsGitConfiguration", ">", "readConfigFiles", "(", ")", "{", "List", "<", "CmsGitConfiguration", ">", "configurations", "=", "new", "LinkedList", "<", "CmsGitConfiguration", ">", "(", ")", ";", "// Default configuration file for backwards compat...
Read all configuration files. @return the list with all available configurations
[ "Read", "all", "configuration", "files", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/git/CmsGitCheckin.java#L861-L876
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java
AccountsInner.listAsync
public Observable<Page<DataLakeAnalyticsAccountBasicInner>> listAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { """ Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link ...
java
public Observable<Page<DataLakeAnalyticsAccountBasicInner>> listAsync(final String filter, final Integer top, final Integer skip, final String select, final String orderby, final Boolean count) { return listWithServiceResponseAsync(filter, top, skip, select, orderby, count) .map(new Func1<ServiceRes...
[ "public", "Observable", "<", "Page", "<", "DataLakeAnalyticsAccountBasicInner", ">", ">", "listAsync", "(", "final", "String", "filter", ",", "final", "Integer", "top", ",", "final", "Integer", "skip", ",", "final", "String", "select", ",", "final", "String", ...
Gets the first page of Data Lake Analytics accounts, if any, within the current subscription. This includes a link to the next page, if any. @param filter OData filter. Optional. @param top The number of items to return. Optional. @param skip The number of items to skip over before returning elements. Optional. @param...
[ "Gets", "the", "first", "page", "of", "Data", "Lake", "Analytics", "accounts", "if", "any", "within", "the", "current", "subscription", ".", "This", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2016_11_01/implementation/AccountsInner.java#L289-L297
structr/structr
structr-core/src/main/java/org/structr/common/geo/GeoHelper.java
GeoHelper.geocode
public static GeoCodingResult geocode(final String street, final String house, String postalCode, final String city, final String state, final String country) throws FrameworkException { """ Tries do find a geo location for the given address using the GeoCodingProvider specified in the configuration file. @par...
java
public static GeoCodingResult geocode(final String street, final String house, String postalCode, final String city, final String state, final String country) throws FrameworkException { final String language = Settings.GeocodingLanguage.getValue(); final String cacheKey = cacheKey(street, house, postalCode, cit...
[ "public", "static", "GeoCodingResult", "geocode", "(", "final", "String", "street", ",", "final", "String", "house", ",", "String", "postalCode", ",", "final", "String", "city", ",", "final", "String", "state", ",", "final", "String", "country", ")", "throws",...
Tries do find a geo location for the given address using the GeoCodingProvider specified in the configuration file. @param country the country to search for, may be null @param state the state to search for, may be null @param city the city to search for, may be null @param street the street to search for, may be null...
[ "Tries", "do", "find", "a", "geo", "location", "for", "the", "given", "address", "using", "the", "GeoCodingProvider", "specified", "in", "the", "configuration", "file", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/common/geo/GeoHelper.java#L99-L129
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/ScreenField.java
ScreenField.handleCommand
public boolean handleCommand(String strCommand, ScreenField sourceSField, int iUseSameWindow) { """ Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't...
java
public boolean handleCommand(String strCommand, ScreenField sourceSField, int iUseSameWindow) { boolean bHandled = false; if (!(this instanceof BasePanel)) // BasePanel already called doCommand. bHandled = this.doCommand(strCommand, sourceSField, iUseSameWindow); // Do I handle it? ...
[ "public", "boolean", "handleCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iUseSameWindow", ")", "{", "boolean", "bHandled", "=", "false", ";", "if", "(", "!", "(", "this", "instanceof", "BasePanel", ")", ")", "// BaseP...
Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't process, pass to parent (with me as the source). <br />Note: Never pass to a parent or child that matches t...
[ "Process", "the", "command", ".", "<br", "/", ">", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "<br", "/", ">", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/ScreenField.java#L246-L257
likethecolor/Alchemy-API
src/main/java/com/likethecolor/alchemy/api/parser/json/AbstractParser.java
AbstractParser.getNonStandardBoolean
private Boolean getNonStandardBoolean(final String key, final JSONObject jsonObject) { """ This method differs from {@link #getBoolean(String, JSONObject)} in that the value is not be the standard JSON true/false but rather the string yes/no. @param key name of the field to fetch from the json object @param ...
java
private Boolean getNonStandardBoolean(final String key, final JSONObject jsonObject) { Boolean value = false; try { String stringValue = jsonObject.getString(key); LOGGER.debug("got value: {} for key {}", stringValue, key); if(isTruthy(stringValue)) { LOGGER.debug("value is truthy"); ...
[ "private", "Boolean", "getNonStandardBoolean", "(", "final", "String", "key", ",", "final", "JSONObject", "jsonObject", ")", "{", "Boolean", "value", "=", "false", ";", "try", "{", "String", "stringValue", "=", "jsonObject", ".", "getString", "(", "key", ")", ...
This method differs from {@link #getBoolean(String, JSONObject)} in that the value is not be the standard JSON true/false but rather the string yes/no. @param key name of the field to fetch from the json object @param jsonObject object from which to fetch the value @return boolean value corresponding to the key or fa...
[ "This", "method", "differs", "from", "{", "@link", "#getBoolean", "(", "String", "JSONObject", ")", "}", "in", "that", "the", "value", "is", "not", "be", "the", "standard", "JSON", "true", "/", "false", "but", "rather", "the", "string", "yes", "/", "no",...
train
https://github.com/likethecolor/Alchemy-API/blob/5208cfc92a878ceeaff052787af29da92d98db7e/src/main/java/com/likethecolor/alchemy/api/parser/json/AbstractParser.java#L105-L119
jayantk/jklol
src/com/jayantkrish/jklol/models/bayesnet/CptTableFactor.java
CptTableFactor.getTensorFromVariables
private static TensorBuilder getTensorFromVariables(VariableNumMap variables) { """ Constructs a tensor with one dimension per variable in {@code variables}. @param variables @return """ // Get the dimensions and dimension sizes for the tensor. int[] dimensions = variables.getVariableNumsArray(); ...
java
private static TensorBuilder getTensorFromVariables(VariableNumMap variables) { // Get the dimensions and dimension sizes for the tensor. int[] dimensions = variables.getVariableNumsArray(); int[] sizes = new int[dimensions.length]; List<DiscreteVariable> varTypes = variables.getDiscreteVariables(); ...
[ "private", "static", "TensorBuilder", "getTensorFromVariables", "(", "VariableNumMap", "variables", ")", "{", "// Get the dimensions and dimension sizes for the tensor.", "int", "[", "]", "dimensions", "=", "variables", ".", "getVariableNumsArray", "(", ")", ";", "int", "...
Constructs a tensor with one dimension per variable in {@code variables}. @param variables @return
[ "Constructs", "a", "tensor", "with", "one", "dimension", "per", "variable", "in", "{", "@code", "variables", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/models/bayesnet/CptTableFactor.java#L89-L98
goldmansachs/reladomo
reladomo/src/main/java/com/gs/fw/common/mithra/cache/ConcurrentFullUniqueIndex.java
ConcurrentFullUniqueIndex.forAllInParallel
public void forAllInParallel(final ParallelProcedure procedure) { """ does not allow concurrent iteration with additions to the index """ MithraCpuBoundThreadPool pool = MithraCpuBoundThreadPool.getInstance(); final Object[] set = this.table; ThreadChunkSize threadChunkSize = new Thr...
java
public void forAllInParallel(final ParallelProcedure procedure) { MithraCpuBoundThreadPool pool = MithraCpuBoundThreadPool.getInstance(); final Object[] set = this.table; ThreadChunkSize threadChunkSize = new ThreadChunkSize(pool.getThreads(), set.length - 2, 1); final ArrayBase...
[ "public", "void", "forAllInParallel", "(", "final", "ParallelProcedure", "procedure", ")", "{", "MithraCpuBoundThreadPool", "pool", "=", "MithraCpuBoundThreadPool", ".", "getInstance", "(", ")", ";", "final", "Object", "[", "]", "set", "=", "this", ".", "table", ...
does not allow concurrent iteration with additions to the index
[ "does", "not", "allow", "concurrent", "iteration", "with", "additions", "to", "the", "index" ]
train
https://github.com/goldmansachs/reladomo/blob/e9a069452eece7a6ef9551caf81a69d3d9a3d990/reladomo/src/main/java/com/gs/fw/common/mithra/cache/ConcurrentFullUniqueIndex.java#L839-L873
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/engine/path/NodeImpl.java
NodeImpl.createContainerElementNode
public static NodeImpl createContainerElementNode(final String name, final NodeImpl parent) { """ create container element node. @param name name of the node @param parent parent node @return new node implementation """ return new NodeImpl( // name, // parent, // false, // ...
java
public static NodeImpl createContainerElementNode(final String name, final NodeImpl parent) { return new NodeImpl( // name, // parent, // false, // null, // null, // ElementKind.CONTAINER_ELEMENT, // EMPTY_CLASS_ARRAY, // null, // null, // ...
[ "public", "static", "NodeImpl", "createContainerElementNode", "(", "final", "String", "name", ",", "final", "NodeImpl", "parent", ")", "{", "return", "new", "NodeImpl", "(", "//", "name", ",", "//", "parent", ",", "//", "false", ",", "//", "null", ",", "//...
create container element node. @param name name of the node @param parent parent node @return new node implementation
[ "create", "container", "element", "node", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/hibernate/validator/internal/engine/path/NodeImpl.java#L127-L141
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/SourceLineAnnotation.java
SourceLineAnnotation.fromVisitedInstruction
public static SourceLineAnnotation fromVisitedInstruction(ClassContext classContext, Method method, int pc) { """ Create from Method and bytecode offset in a visited class. @param classContext ClassContext of visited class @param method Method in visited class @param pc bytecode offset in visited method @...
java
public static SourceLineAnnotation fromVisitedInstruction(ClassContext classContext, Method method, int pc) { return fromVisitedInstruction(classContext.getJavaClass(), method, pc); }
[ "public", "static", "SourceLineAnnotation", "fromVisitedInstruction", "(", "ClassContext", "classContext", ",", "Method", "method", ",", "int", "pc", ")", "{", "return", "fromVisitedInstruction", "(", "classContext", ".", "getJavaClass", "(", ")", ",", "method", ","...
Create from Method and bytecode offset in a visited class. @param classContext ClassContext of visited class @param method Method in visited class @param pc bytecode offset in visited method @return SourceLineAnnotation describing visited instruction
[ "Create", "from", "Method", "and", "bytecode", "offset", "in", "a", "visited", "class", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/SourceLineAnnotation.java#L453-L455
taimos/dvalin
jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java
JaxRsAnnotationScanner.searchForAnnotation
public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) { """ Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses @param method the method to scan @param annotation the annotation to search for @par...
java
public static <T extends Annotation> List<T> searchForAnnotation(Method method, Class<T> annotation) { if (method == null) { return Lists.newArrayList(); } return searchClasses(method, annotation, method.getDeclaringClass()); }
[ "public", "static", "<", "T", "extends", "Annotation", ">", "List", "<", "T", ">", "searchForAnnotation", "(", "Method", "method", ",", "Class", "<", "T", ">", "annotation", ")", "{", "if", "(", "method", "==", "null", ")", "{", "return", "Lists", ".",...
Searches for all annotations of the given type on this method or on type level for all interfaces and superclasses @param method the method to scan @param annotation the annotation to search for @param <T> the type of the annotation @return the list of all method or type level annotations in the type hierar...
[ "Searches", "for", "all", "annotations", "of", "the", "given", "type", "on", "this", "method", "or", "on", "type", "level", "for", "all", "interfaces", "and", "superclasses" ]
train
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/JaxRsAnnotationScanner.java#L60-L65
tbrooks8/Precipice
precipice-core/src/main/java/net/uncontended/precipice/GuardRail.java
GuardRail.releasePermits
public void releasePermits(long number, Result result, long startNanos) { """ Release acquired permits with known result. Since there is a known result the result count object and latency will be updated. @param number of permits to release @param result of the execution @param startNanos of the exec...
java
public void releasePermits(long number, Result result, long startNanos) { releasePermits(number, result, startNanos, clock.nanoTime()); }
[ "public", "void", "releasePermits", "(", "long", "number", ",", "Result", "result", ",", "long", "startNanos", ")", "{", "releasePermits", "(", "number", ",", "result", ",", "startNanos", ",", "clock", ".", "nanoTime", "(", ")", ")", ";", "}" ]
Release acquired permits with known result. Since there is a known result the result count object and latency will be updated. @param number of permits to release @param result of the execution @param startNanos of the execution
[ "Release", "acquired", "permits", "with", "known", "result", ".", "Since", "there", "is", "a", "known", "result", "the", "result", "count", "object", "and", "latency", "will", "be", "updated", "." ]
train
https://github.com/tbrooks8/Precipice/blob/97fae467fd676b16a96b8d88b02569d8fc1f2681/precipice-core/src/main/java/net/uncontended/precipice/GuardRail.java#L139-L141
adessoAG/wicked-charts
highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/util/OptionsUtil.java
OptionsUtil.getSeriesIndex
public static int getSeriesIndex(final Options options, final int wickedChartsId) { """ Returns the (0-based) index of the series with the given wickedChartsId or null. @param options the options in which to search @param wickedChartsId the wickedChartsId of the series @return the index of the series ...
java
public static int getSeriesIndex(final Options options, final int wickedChartsId) { int index = 0; if (options.getSeries() == null) { throw new IllegalStateException("The given Options object does not contain any series!"); } for (Series<?> series : options.getSeries()) { ...
[ "public", "static", "int", "getSeriesIndex", "(", "final", "Options", "options", ",", "final", "int", "wickedChartsId", ")", "{", "int", "index", "=", "0", ";", "if", "(", "options", ".", "getSeries", "(", ")", "==", "null", ")", "{", "throw", "new", "...
Returns the (0-based) index of the series with the given wickedChartsId or null. @param options the options in which to search @param wickedChartsId the wickedChartsId of the series @return the index of the series with the given id. Returns 0 if no series was found.
[ "Returns", "the", "(", "0", "-", "based", ")", "index", "of", "the", "series", "with", "the", "given", "wickedChartsId", "or", "null", "." ]
train
https://github.com/adessoAG/wicked-charts/blob/498aceff025f612e22ba5135b26531afeabac03c/highcharts-wrapper/src/main/java/de/adesso/wickedcharts/highcharts/options/util/OptionsUtil.java#L231-L243
threerings/narya
core/src/main/java/com/threerings/bureau/server/BureauRegistry.java
BureauRegistry.setCommandGenerator
public void setCommandGenerator ( String bureauType, final CommandGenerator cmdGenerator, int timeout) { """ Registers a command generator for a given type. When an agent is started and no bureaus are running, the <code>bureauType</code> is used to determine the <code>CommandGenerator</code> instance to ...
java
public void setCommandGenerator ( String bureauType, final CommandGenerator cmdGenerator, int timeout) { setLauncher(bureauType, new Launcher() { public void launchBureau (String bureauId, String token) throws IOException { ProcessBuilder builder = new Pro...
[ "public", "void", "setCommandGenerator", "(", "String", "bureauType", ",", "final", "CommandGenerator", "cmdGenerator", ",", "int", "timeout", ")", "{", "setLauncher", "(", "bureauType", ",", "new", "Launcher", "(", ")", "{", "public", "void", "launchBureau", "(...
Registers a command generator for a given type. When an agent is started and no bureaus are running, the <code>bureauType</code> is used to determine the <code>CommandGenerator</code> instance to call. If the launched bureau does not connect within the given number of milliseconds, it will be logged as an error and fut...
[ "Registers", "a", "command", "generator", "for", "a", "given", "type", ".", "When", "an", "agent", "is", "started", "and", "no", "bureaus", "are", "running", "the", "<code", ">", "bureauType<", "/", "code", ">", "is", "used", "to", "determine", "the", "<...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/bureau/server/BureauRegistry.java#L187-L206
wildfly/wildfly-maven-plugin
core/src/main/java/org/wildfly/plugin/core/Assertions.java
Assertions.requiresNotNullOrNotEmptyParameter
static <E, T extends Collection<E>> T requiresNotNullOrNotEmptyParameter(final String name, final T value) throws IllegalArgumentException { """ Checks if the parameter is {@code null} or empty and throws an {@link IllegalArgumentException} if it is. @param name the name of the parameter @param value the valu...
java
static <E, T extends Collection<E>> T requiresNotNullOrNotEmptyParameter(final String name, final T value) throws IllegalArgumentException { Assert.checkNotNullParam(name, value); Assert.checkNotEmptyParam(name, value); return value; }
[ "static", "<", "E", ",", "T", "extends", "Collection", "<", "E", ">", ">", "T", "requiresNotNullOrNotEmptyParameter", "(", "final", "String", "name", ",", "final", "T", "value", ")", "throws", "IllegalArgumentException", "{", "Assert", ".", "checkNotNullParam", ...
Checks if the parameter is {@code null} or empty and throws an {@link IllegalArgumentException} if it is. @param name the name of the parameter @param value the value to check @return the parameter value @throws IllegalArgumentException if the object representing the parameter is {@code null}
[ "Checks", "if", "the", "parameter", "is", "{", "@code", "null", "}", "or", "empty", "and", "throws", "an", "{", "@link", "IllegalArgumentException", "}", "if", "it", "is", "." ]
train
https://github.com/wildfly/wildfly-maven-plugin/blob/c0e2d7ee28e511092561801959eae253b2b56def/core/src/main/java/org/wildfly/plugin/core/Assertions.java#L57-L61
js-lib-com/commons
src/main/java/js/util/Classes.java
Classes.getImplementation
public static Class<?> getImplementation(Map<Class<?>, Class<?>> implementationsRegistry, Type interfaceType) { """ Lookup implementation into given registry, throwing exception if not found. @param implementationsRegistry implementations registry, @param interfaceType interface to lookup into registry. @retu...
java
public static Class<?> getImplementation(Map<Class<?>, Class<?>> implementationsRegistry, Type interfaceType) { Class<?> implementation = implementationsRegistry.get(interfaceType); if(implementation == null) { throw new BugError("No registered implementation for type |%s|.", interfaceType); } ...
[ "public", "static", "Class", "<", "?", ">", "getImplementation", "(", "Map", "<", "Class", "<", "?", ">", ",", "Class", "<", "?", ">", ">", "implementationsRegistry", ",", "Type", "interfaceType", ")", "{", "Class", "<", "?", ">", "implementation", "=", ...
Lookup implementation into given registry, throwing exception if not found. @param implementationsRegistry implementations registry, @param interfaceType interface to lookup into registry. @return implementation for requested interface type. @throws BugError if implementation is not found into registry.
[ "Lookup", "implementation", "into", "given", "registry", "throwing", "exception", "if", "not", "found", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L1487-L1494
digipost/signature-api-client-java
src/main/java/no/digipost/signature/client/security/KeyStoreConfig.java
KeyStoreConfig.fromOrganizationCertificate
public static KeyStoreConfig fromOrganizationCertificate(final InputStream organizationCertificateStream, final String privatekeyPassword) { """ Create a {@link KeyStoreConfig} from an Organization Certificate (Virksomhetssertifikat). @param organizationCertificateStream A stream of the certificate in PKCS12 fo...
java
public static KeyStoreConfig fromOrganizationCertificate(final InputStream organizationCertificateStream, final String privatekeyPassword) { KeyStore ks = KeyStoreType.PKCS12.loadKeyStore(organizationCertificateStream, privatekeyPassword); Enumeration<String> aliases; try { aliases =...
[ "public", "static", "KeyStoreConfig", "fromOrganizationCertificate", "(", "final", "InputStream", "organizationCertificateStream", ",", "final", "String", "privatekeyPassword", ")", "{", "KeyStore", "ks", "=", "KeyStoreType", ".", "PKCS12", ".", "loadKeyStore", "(", "or...
Create a {@link KeyStoreConfig} from an Organization Certificate (Virksomhetssertifikat). @param organizationCertificateStream A stream of the certificate in PKCS12 format. The file should have .p12-file ending. @param privatekeyPassword The password for the private key of the organization certificate. @ret...
[ "Create", "a", "{", "@link", "KeyStoreConfig", "}", "from", "an", "Organization", "Certificate", "(", "Virksomhetssertifikat", ")", "." ]
train
https://github.com/digipost/signature-api-client-java/blob/246207571641fbac6beda5ffc585eec188825c45/src/main/java/no/digipost/signature/client/security/KeyStoreConfig.java#L121-L136
kohsuke/jcifs
src/jcifs/http/NtlmSsp.java
NtlmSsp.doAuthentication
public NtlmPasswordAuthentication doAuthentication( HttpServletRequest req, HttpServletResponse resp, byte[] challenge) throws IOException, ServletException { """ Calls the static {@link #authenticate(HttpServletRequest, HttpServletResponse, byte[])} method to perform NTLM authen...
java
public NtlmPasswordAuthentication doAuthentication( HttpServletRequest req, HttpServletResponse resp, byte[] challenge) throws IOException, ServletException { return authenticate(req, resp, challenge); }
[ "public", "NtlmPasswordAuthentication", "doAuthentication", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "resp", ",", "byte", "[", "]", "challenge", ")", "throws", "IOException", ",", "ServletException", "{", "return", "authenticate", "(", "req", ",",...
Calls the static {@link #authenticate(HttpServletRequest, HttpServletResponse, byte[])} method to perform NTLM authentication for the specified servlet request. @param req The request being serviced. @param resp The response. @param challenge The domain controller challenge. @throws IOException If an IO error occurs. ...
[ "Calls", "the", "static", "{", "@link", "#authenticate", "(", "HttpServletRequest", "HttpServletResponse", "byte", "[]", ")", "}", "method", "to", "perform", "NTLM", "authentication", "for", "the", "specified", "servlet", "request", "." ]
train
https://github.com/kohsuke/jcifs/blob/7751f4e4826c35614d237a70c2582553f95b58de/src/jcifs/http/NtlmSsp.java#L66-L70
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/normalization/KerasBatchNormalization.java
KerasBatchNormalization.getGammaRegularizerFromConfig
private void getGammaRegularizerFromConfig(Map<String, Object> layerConfig, boolean enforceTrainingConfig) throws UnsupportedKerasConfigurationException, InvalidKerasConfigurationException { """ Get BatchNormalization gamma regularizer from Keras layer configuration. Currently unsupported. @param la...
java
private void getGammaRegularizerFromConfig(Map<String, Object> layerConfig, boolean enforceTrainingConfig) throws UnsupportedKerasConfigurationException, InvalidKerasConfigurationException { Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf); i...
[ "private", "void", "getGammaRegularizerFromConfig", "(", "Map", "<", "String", ",", "Object", ">", "layerConfig", ",", "boolean", "enforceTrainingConfig", ")", "throws", "UnsupportedKerasConfigurationException", ",", "InvalidKerasConfigurationException", "{", "Map", "<", ...
Get BatchNormalization gamma regularizer from Keras layer configuration. Currently unsupported. @param layerConfig dictionary containing Keras layer configuration @return Batchnormalization gamma regularizer @throws InvalidKerasConfigurationException Invalid Keras config
[ "Get", "BatchNormalization", "gamma", "regularizer", "from", "Keras", "layer", "configuration", ".", "Currently", "unsupported", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/normalization/KerasBatchNormalization.java#L266-L276
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.removeEntryFromNavigation
private CmsSitemapChange removeEntryFromNavigation(CmsSitemapChange change) throws CmsException { """ Applys the given remove change.<p> @param change the change to apply @return the changed client sitemap entry or <code>null</code> @throws CmsException if something goes wrong """ CmsObject c...
java
private CmsSitemapChange removeEntryFromNavigation(CmsSitemapChange change) throws CmsException { CmsObject cms = getCmsObject(); CmsResource entryFolder = cms.readResource(change.getEntryId(), CmsResourceFilter.ONLY_VISIBLE_NO_DELETED); ensureLock(entryFolder); List<CmsProperty> proper...
[ "private", "CmsSitemapChange", "removeEntryFromNavigation", "(", "CmsSitemapChange", "change", ")", "throws", "CmsException", "{", "CmsObject", "cms", "=", "getCmsObject", "(", ")", ";", "CmsResource", "entryFolder", "=", "cms", ".", "readResource", "(", "change", "...
Applys the given remove change.<p> @param change the change to apply @return the changed client sitemap entry or <code>null</code> @throws CmsException if something goes wrong
[ "Applys", "the", "given", "remove", "change", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L2982-L2998
sporniket/core
sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java
XmlStringTools.getCdataSection
public static String getCdataSection(String cdataContent) { """ Create a string containing a Cdata section. @param cdataContent the cdata content. @return the closing tag. """ StringBuffer _result = new StringBuffer(); return doAppendCdataSection(_result, cdataContent).toString(); }
java
public static String getCdataSection(String cdataContent) { StringBuffer _result = new StringBuffer(); return doAppendCdataSection(_result, cdataContent).toString(); }
[ "public", "static", "String", "getCdataSection", "(", "String", "cdataContent", ")", "{", "StringBuffer", "_result", "=", "new", "StringBuffer", "(", ")", ";", "return", "doAppendCdataSection", "(", "_result", ",", "cdataContent", ")", ".", "toString", "(", ")",...
Create a string containing a Cdata section. @param cdataContent the cdata content. @return the closing tag.
[ "Create", "a", "string", "containing", "a", "Cdata", "section", "." ]
train
https://github.com/sporniket/core/blob/3480ebd72a07422fcc09971be2607ee25efb2c26/sporniket-core-ml/src/main/java/com/sporniket/libre/lang/xml/XmlStringTools.java#L540-L544
haraldk/TwelveMonkeys
common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java
StringUtil.getLastElement
public static String getLastElement(final String pSource, final String pDelimiter) { """ Gets the last element of a {@code String} containing string elements delimited by a given delimiter. <i>NB - Straightforward implementation!</i> <p/> @param pSource The source string. @param pDelimiter The delimiter ...
java
public static String getLastElement(final String pSource, final String pDelimiter) { if (pDelimiter == null) { throw new IllegalArgumentException("delimiter == null"); } if (StringUtil.isEmpty(pSource)) { return pSource; } int idx = pSource.lastIn...
[ "public", "static", "String", "getLastElement", "(", "final", "String", "pSource", ",", "final", "String", "pDelimiter", ")", "{", "if", "(", "pDelimiter", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"delimiter == null\"", ")", ";"...
Gets the last element of a {@code String} containing string elements delimited by a given delimiter. <i>NB - Straightforward implementation!</i> <p/> @param pSource The source string. @param pDelimiter The delimiter used in the source string. @return The last string element.
[ "Gets", "the", "last", "element", "of", "a", "{", "@code", "String", "}", "containing", "string", "elements", "delimited", "by", "a", "given", "delimiter", ".", "<i", ">", "NB", "-", "Straightforward", "implementation!<", "/", "i", ">", "<p", "/", ">" ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/common/common-lang/src/main/java/com/twelvemonkeys/lang/StringUtil.java#L1556-L1569
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/ArtFinder.java
ArtFinder.deliverAlbumArtUpdate
private void deliverAlbumArtUpdate(int player, AlbumArt art) { """ Send an album art update announcement to all registered listeners. """ if (!getAlbumArtListeners().isEmpty()) { final AlbumArtUpdate update = new AlbumArtUpdate(player, art); for (final AlbumArtListener listener ...
java
private void deliverAlbumArtUpdate(int player, AlbumArt art) { if (!getAlbumArtListeners().isEmpty()) { final AlbumArtUpdate update = new AlbumArtUpdate(player, art); for (final AlbumArtListener listener : getAlbumArtListeners()) { try { listener.album...
[ "private", "void", "deliverAlbumArtUpdate", "(", "int", "player", ",", "AlbumArt", "art", ")", "{", "if", "(", "!", "getAlbumArtListeners", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "final", "AlbumArtUpdate", "update", "=", "new", "AlbumArtUpdate", "(", ...
Send an album art update announcement to all registered listeners.
[ "Send", "an", "album", "art", "update", "announcement", "to", "all", "registered", "listeners", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/ArtFinder.java#L450-L462
lets-blade/blade
src/main/java/com/blade/kit/ConvertKit.java
ConvertKit.string2OutputStream
public static OutputStream string2OutputStream(final String string, final String charsetName) { """ string转outputStream按编码 @param string 字符串 @param charsetName 编码格式 @return 输入流 """ if (string == null || isSpace(charsetName)) return null; try { return bytes2OutputStream(str...
java
public static OutputStream string2OutputStream(final String string, final String charsetName) { if (string == null || isSpace(charsetName)) return null; try { return bytes2OutputStream(string.getBytes(charsetName)); } catch (UnsupportedEncodingException e) { e.printStackT...
[ "public", "static", "OutputStream", "string2OutputStream", "(", "final", "String", "string", ",", "final", "String", "charsetName", ")", "{", "if", "(", "string", "==", "null", "||", "isSpace", "(", "charsetName", ")", ")", "return", "null", ";", "try", "{",...
string转outputStream按编码 @param string 字符串 @param charsetName 编码格式 @return 输入流
[ "string转outputStream按编码" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/ConvertKit.java#L389-L397
GoogleCloudPlatform/bigdata-interop
gcsio/src/main/java/com/google/cloud/hadoop/gcsio/BatchHelper.java
BatchHelper.queue
public <T> void queue(StorageRequest<T> req, JsonBatchCallback<T> callback) throws IOException { """ Adds an additional request to the batch, and possibly flushes the current contents of the batch if {@code maxRequestsPerBatch} has been reached. """ checkState( !requestsExecutor.isShutdown() && !r...
java
public <T> void queue(StorageRequest<T> req, JsonBatchCallback<T> callback) throws IOException { checkState( !requestsExecutor.isShutdown() && !requestsExecutor.isTerminated(), "requestsExecutor should not be terminated to queue batch requests"); if (maxRequestsPerBatch == 1) { responseFut...
[ "public", "<", "T", ">", "void", "queue", "(", "StorageRequest", "<", "T", ">", "req", ",", "JsonBatchCallback", "<", "T", ">", "callback", ")", "throws", "IOException", "{", "checkState", "(", "!", "requestsExecutor", ".", "isShutdown", "(", ")", "&&", ...
Adds an additional request to the batch, and possibly flushes the current contents of the batch if {@code maxRequestsPerBatch} has been reached.
[ "Adds", "an", "additional", "request", "to", "the", "batch", "and", "possibly", "flushes", "the", "current", "contents", "of", "the", "batch", "if", "{" ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/gcsio/src/main/java/com/google/cloud/hadoop/gcsio/BatchHelper.java#L155-L171
morfologik/morfologik-stemming
morfologik-fsa-builders/src/main/java/morfologik/fsa/builders/FSABuilder.java
FSABuilder.compare
private static int compare(byte[] s1, int start1, int lens1, byte[] s2, int start2, int lens2) { """ Lexicographic order of input sequences. By default, consistent with the "C" sort (absolute value of bytes, 0-255). """ final int max = Math.min(lens1, lens2); for (int i = 0; i < max; i++) { fin...
java
private static int compare(byte[] s1, int start1, int lens1, byte[] s2, int start2, int lens2) { final int max = Math.min(lens1, lens2); for (int i = 0; i < max; i++) { final byte c1 = s1[start1++]; final byte c2 = s2[start2++]; if (c1 != c2) return (c1 & 0xff) - (c2 & 0xff); } ...
[ "private", "static", "int", "compare", "(", "byte", "[", "]", "s1", ",", "int", "start1", ",", "int", "lens1", ",", "byte", "[", "]", "s2", ",", "int", "start2", ",", "int", "lens2", ")", "{", "final", "int", "max", "=", "Math", ".", "min", "(", ...
Lexicographic order of input sequences. By default, consistent with the "C" sort (absolute value of bytes, 0-255).
[ "Lexicographic", "order", "of", "input", "sequences", ".", "By", "default", "consistent", "with", "the", "C", "sort", "(", "absolute", "value", "of", "bytes", "0", "-", "255", ")", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-fsa-builders/src/main/java/morfologik/fsa/builders/FSABuilder.java#L495-L506
box/box-java-sdk
src/main/java/com/box/sdk/BoxUser.java
BoxUser.createAppUser
public static BoxUser.Info createAppUser(BoxAPIConnection api, String name, CreateUserParams params) { """ Provisions a new app user in an enterprise with additional user information using Box Developer Edition. @param api the API connection to be used by the created user. @param name the name of ...
java
public static BoxUser.Info createAppUser(BoxAPIConnection api, String name, CreateUserParams params) { params.setIsPlatformAccessOnly(true); return createEnterpriseUser(api, null, name, params); }
[ "public", "static", "BoxUser", ".", "Info", "createAppUser", "(", "BoxAPIConnection", "api", ",", "String", "name", ",", "CreateUserParams", "params", ")", "{", "params", ".", "setIsPlatformAccessOnly", "(", "true", ")", ";", "return", "createEnterpriseUser", "(",...
Provisions a new app user in an enterprise with additional user information using Box Developer Edition. @param api the API connection to be used by the created user. @param name the name of the user. @param params additional user information. @return the created user's info.
[ "Provisions", "a", "new", "app", "user", "in", "an", "enterprise", "with", "additional", "user", "information", "using", "Box", "Developer", "Edition", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxUser.java#L94-L99
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/multipos/AsymmMultiPos.java
AsymmMultiPos.asymms
public E asymms(Integer leftPos, Integer rightPos) { """ The result with the given left position and right position which left and right tag is asymmetric will be involved in the operation @param leftPos @param rightPos @return """ return asymm(leftPos, rightPos).result(); }
java
public E asymms(Integer leftPos, Integer rightPos) { return asymm(leftPos, rightPos).result(); }
[ "public", "E", "asymms", "(", "Integer", "leftPos", ",", "Integer", "rightPos", ")", "{", "return", "asymm", "(", "leftPos", ",", "rightPos", ")", ".", "result", "(", ")", ";", "}" ]
The result with the given left position and right position which left and right tag is asymmetric will be involved in the operation @param leftPos @param rightPos @return
[ "The", "result", "with", "the", "given", "left", "position", "and", "right", "position", "which", "left", "and", "right", "tag", "is", "asymmetric", "will", "be", "involved", "in", "the", "operation" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/multipos/AsymmMultiPos.java#L29-L31
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.regenerateStorageAccountKey
public StorageBundle regenerateStorageAccountKey(String vaultBaseUrl, String storageAccountName, String keyName) { """ Regenerates the specified key value for the given storage account. This operation requires the storage/regeneratekey permission. @param vaultBaseUrl The vault name, for example https://myvault....
java
public StorageBundle regenerateStorageAccountKey(String vaultBaseUrl, String storageAccountName, String keyName) { return regenerateStorageAccountKeyWithServiceResponseAsync(vaultBaseUrl, storageAccountName, keyName).toBlocking().single().body(); }
[ "public", "StorageBundle", "regenerateStorageAccountKey", "(", "String", "vaultBaseUrl", ",", "String", "storageAccountName", ",", "String", "keyName", ")", "{", "return", "regenerateStorageAccountKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "storageAccountName", "...
Regenerates the specified key value for the given storage account. This operation requires the storage/regeneratekey permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param storageAccountName The name of the storage account. @param keyName The storage account key name. @thro...
[ "Regenerates", "the", "specified", "key", "value", "for", "the", "given", "storage", "account", ".", "This", "operation", "requires", "the", "storage", "/", "regeneratekey", "permission", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L10294-L10296
kazocsaba/imageviewer
src/main/java/hu/kazocsaba/imageviewer/ImageViewerUtil.java
ImageViewerUtil.synchronizeViewers
public static void synchronizeViewers(ImageViewer first, ImageViewer... others) { """ Synchronizes the view state of multiple image viewers with respect to scroll position and resize strategy, and other properties affecting display. @param first the first viewer @param others the other viewers """ Synchro...
java
public static void synchronizeViewers(ImageViewer first, ImageViewer... others) { Synchronizer mainSynchronizer=first.getSynchronizer(); for (ImageViewer other: others) { mainSynchronizer.add(other); } }
[ "public", "static", "void", "synchronizeViewers", "(", "ImageViewer", "first", ",", "ImageViewer", "...", "others", ")", "{", "Synchronizer", "mainSynchronizer", "=", "first", ".", "getSynchronizer", "(", ")", ";", "for", "(", "ImageViewer", "other", ":", "other...
Synchronizes the view state of multiple image viewers with respect to scroll position and resize strategy, and other properties affecting display. @param first the first viewer @param others the other viewers
[ "Synchronizes", "the", "view", "state", "of", "multiple", "image", "viewers", "with", "respect", "to", "scroll", "position", "and", "resize", "strategy", "and", "other", "properties", "affecting", "display", "." ]
train
https://github.com/kazocsaba/imageviewer/blob/59b8834c9dbf87bd9ca0898da3458ae592e3851e/src/main/java/hu/kazocsaba/imageviewer/ImageViewerUtil.java#L19-L24
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/FieldAccessorUtils.java
FieldAccessorUtils.getColumnPropertiesByName
public static List<FieldAccessor> getColumnPropertiesByName(final Class<?> targetClass, final AnnotationReader annoReader, final Configuration config, final String columnName) { """ アノテーション{@link XlsColumn}が付与されているBeanのプロパティ(フィールド、アクセッサメソッド)の一覧を取得します。 ただし、属性{@link XlsColumn#columnName()}の値が、指定した値と等しい...
java
public static List<FieldAccessor> getColumnPropertiesByName(final Class<?> targetClass, final AnnotationReader annoReader, final Configuration config, final String columnName) { return getPropertiesWithAnnotation(targetClass, annoReader, XlsColumn.class) .stream() ...
[ "public", "static", "List", "<", "FieldAccessor", ">", "getColumnPropertiesByName", "(", "final", "Class", "<", "?", ">", "targetClass", ",", "final", "AnnotationReader", "annoReader", ",", "final", "Configuration", "config", ",", "final", "String", "columnName", ...
アノテーション{@link XlsColumn}が付与されているBeanのプロパティ(フィールド、アクセッサメソッド)の一覧を取得します。 ただし、属性{@link XlsColumn#columnName()}の値が、指定した値と等しいか判定します。 @param targetClass 取得元のクラス情報 @param annoReader {@link AnnotationReader}のインスタンス。 @param config システム設定情報 @param columnName カラムの値 @return プロパティの一覧。存在しない場合は、空のリストを返す。 @throws IllegalArgumentExcept...
[ "アノテーション", "{", "@link", "XlsColumn", "}", "が付与されているBeanのプロパティ(フィールド、アクセッサメソッド)の一覧を取得します。", "ただし、属性", "{", "@link", "XlsColumn#columnName", "()", "}", "の値が、指定した値と等しいか判定します。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/FieldAccessorUtils.java#L82-L90
danhawkes/thresher
src/main/java/co/arcs/groove/thresher/Client.java
Client.login
public User login(final String username, final String password) throws IOException, GroovesharkException { """ Logs in as the given user, allowing access to various authentication-requiring methods in the {@link User} class. @param username @param password @return The logged in user. Also availab...
java
public User login(final String username, final String password) throws IOException, GroovesharkException { JsonNode node = sendRequest(new RequestBuilder("authenticateUser", true) { @Override void populateParameters(Session session, ObjectNode parameters) { p...
[ "public", "User", "login", "(", "final", "String", "username", ",", "final", "String", "password", ")", "throws", "IOException", ",", "GroovesharkException", "{", "JsonNode", "node", "=", "sendRequest", "(", "new", "RequestBuilder", "(", "\"authenticateUser\"", ",...
Logs in as the given user, allowing access to various authentication-requiring methods in the {@link User} class. @param username @param password @return The logged in user. Also available via {@link #getUser()}; @throws IOException @throws GroovesharkException
[ "Logs", "in", "as", "the", "given", "user", "allowing", "access", "to", "various", "authentication", "-", "requiring", "methods", "in", "the", "{", "@link", "User", "}", "class", "." ]
train
https://github.com/danhawkes/thresher/blob/30e5ca62ceca3be20e47a043eedc152f8914d6b4/src/main/java/co/arcs/groove/thresher/Client.java#L337-L352
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.line_offer_phones_GET
public ArrayList<OvhLinePhone> line_offer_phones_GET(OvhNumberCountryEnum country, String offer) throws IOException { """ Get all available phone brands compatible with lines REST: GET /telephony/line/offer/phones @param offer [required] The selected offer @param country [required] The country """ Strin...
java
public ArrayList<OvhLinePhone> line_offer_phones_GET(OvhNumberCountryEnum country, String offer) throws IOException { String qPath = "/telephony/line/offer/phones"; StringBuilder sb = path(qPath); query(sb, "country", country); query(sb, "offer", offer); String resp = execN(qPath, "GET", sb.toString(), null);...
[ "public", "ArrayList", "<", "OvhLinePhone", ">", "line_offer_phones_GET", "(", "OvhNumberCountryEnum", "country", ",", "String", "offer", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/telephony/line/offer/phones\"", ";", "StringBuilder", "sb", "=", "p...
Get all available phone brands compatible with lines REST: GET /telephony/line/offer/phones @param offer [required] The selected offer @param country [required] The country
[ "Get", "all", "available", "phone", "brands", "compatible", "with", "lines" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L8866-L8873
ludovicianul/selenium-on-steroids
src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java
WebDriverHelper.selectOptionFromDropdownByValue
public void selectOptionFromDropdownByValue(final By by, final String value) { """ Select a value from a drop down list based on the actual value, NOT DISPLAYED TEXT. @param by the method of identifying the drop-down @param value the value to select """ Select select = new Select(driver.findElement(by...
java
public void selectOptionFromDropdownByValue(final By by, final String value) { Select select = new Select(driver.findElement(by)); select.selectByValue(value); }
[ "public", "void", "selectOptionFromDropdownByValue", "(", "final", "By", "by", ",", "final", "String", "value", ")", "{", "Select", "select", "=", "new", "Select", "(", "driver", ".", "findElement", "(", "by", ")", ")", ";", "select", ".", "selectByValue", ...
Select a value from a drop down list based on the actual value, NOT DISPLAYED TEXT. @param by the method of identifying the drop-down @param value the value to select
[ "Select", "a", "value", "from", "a", "drop", "down", "list", "based", "on", "the", "actual", "value", "NOT", "DISPLAYED", "TEXT", "." ]
train
https://github.com/ludovicianul/selenium-on-steroids/blob/f89d91c59f686114f94624bfc55712f278005bfa/src/main/java/com/insidecoding/sos/webdriver/WebDriverHelper.java#L605-L608
dadoonet/elasticsearch-beyonder
src/main/java/fr/pilato/elasticsearch/tools/index/IndexSettingsReader.java
IndexSettingsReader.readSettings
public static String readSettings(String root, String index) throws IOException { """ Read index settings @param root dir within the classpath @param index index name @return Settings @throws IOException if connection with elasticsearch is failing """ if (root == null) { return readSettings(index); ...
java
public static String readSettings(String root, String index) throws IOException { if (root == null) { return readSettings(index); } return readSettings(root, index, Defaults.IndexSettingsFileName); }
[ "public", "static", "String", "readSettings", "(", "String", "root", ",", "String", "index", ")", "throws", "IOException", "{", "if", "(", "root", "==", "null", ")", "{", "return", "readSettings", "(", "index", ")", ";", "}", "return", "readSettings", "(",...
Read index settings @param root dir within the classpath @param index index name @return Settings @throws IOException if connection with elasticsearch is failing
[ "Read", "index", "settings" ]
train
https://github.com/dadoonet/elasticsearch-beyonder/blob/275bf63432b97169a90a266e983143cca9ad7629/src/main/java/fr/pilato/elasticsearch/tools/index/IndexSettingsReader.java#L57-L62
networknt/light-4j
balance/src/main/java/com/networknt/balance/LocalFirstLoadBalance.java
LocalFirstLoadBalance.select
@Override public URL select(List<URL> urls, String requestKey) { """ Local first requestKey is not used as it is ip on the localhost. It first needs to find a list of urls on the localhost for the service, and then round robin in the list to pick up one. Currently, this load balance is only used if you de...
java
@Override public URL select(List<URL> urls, String requestKey) { // search for a URL in the same ip first List<URL> localUrls = searchLocalUrls(urls, ip); if(localUrls.size() > 0) { if(localUrls.size() == 1) { return localUrls.get(0); } else { ...
[ "@", "Override", "public", "URL", "select", "(", "List", "<", "URL", ">", "urls", ",", "String", "requestKey", ")", "{", "// search for a URL in the same ip first", "List", "<", "URL", ">", "localUrls", "=", "searchLocalUrls", "(", "urls", ",", "ip", ")", ";...
Local first requestKey is not used as it is ip on the localhost. It first needs to find a list of urls on the localhost for the service, and then round robin in the list to pick up one. Currently, this load balance is only used if you deploy the service as standalone java process on data center hosts. We need to find ...
[ "Local", "first", "requestKey", "is", "not", "used", "as", "it", "is", "ip", "on", "the", "localhost", ".", "It", "first", "needs", "to", "find", "a", "list", "of", "urls", "on", "the", "localhost", "for", "the", "service", "and", "then", "round", "rob...
train
https://github.com/networknt/light-4j/blob/2a60257c60663684c8f6dc8b5ea3cf184e534db6/balance/src/main/java/com/networknt/balance/LocalFirstLoadBalance.java#L71-L86
spring-projects/spring-boot
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java
SpringApplication.configureProfiles
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) { """ Configure which profiles are active (or active by default) for this application environment. Additional profiles may be activated during configuration file processing via the {@code spring.profiles.active} property. @para...
java
protected void configureProfiles(ConfigurableEnvironment environment, String[] args) { environment.getActiveProfiles(); // ensure they are initialized // But these ones should go first (last wins in a property key clash) Set<String> profiles = new LinkedHashSet<>(this.additionalProfiles); profiles.addAll(Arrays...
[ "protected", "void", "configureProfiles", "(", "ConfigurableEnvironment", "environment", ",", "String", "[", "]", "args", ")", "{", "environment", ".", "getActiveProfiles", "(", ")", ";", "// ensure they are initialized", "// But these ones should go first (last wins in a pro...
Configure which profiles are active (or active by default) for this application environment. Additional profiles may be activated during configuration file processing via the {@code spring.profiles.active} property. @param environment this application's environment @param args arguments passed to the {@code run} method...
[ "Configure", "which", "profiles", "are", "active", "(", "or", "active", "by", "default", ")", "for", "this", "application", "environment", ".", "Additional", "profiles", "may", "be", "activated", "during", "configuration", "file", "processing", "via", "the", "{"...
train
https://github.com/spring-projects/spring-boot/blob/0b27f7c70e164b2b1a96477f1d9c1acba56790c1/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java#L540-L546
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java
MLEDependencyGrammar.expandDependency
protected void expandDependency(IntDependency dependency, double count) { """ The dependency arg is still in the full tag space. @param dependency An opbserved dependency @param count The weight of the dependency """ //if (Test.prunePunc && pruneTW(dependency.arg)) // return; if (dependency...
java
protected void expandDependency(IntDependency dependency, double count) { //if (Test.prunePunc && pruneTW(dependency.arg)) // return; if (dependency.head == null || dependency.arg == null) { return; } if (dependency.arg.word != STOP_WORD_INT) { expandArg(dependency, valenceBin(...
[ "protected", "void", "expandDependency", "(", "IntDependency", "dependency", ",", "double", "count", ")", "{", "//if (Test.prunePunc && pruneTW(dependency.arg))\r", "// return;\r", "if", "(", "dependency", ".", "head", "==", "null", "||", "dependency", ".", "arg", "=...
The dependency arg is still in the full tag space. @param dependency An opbserved dependency @param count The weight of the dependency
[ "The", "dependency", "arg", "is", "still", "in", "the", "full", "tag", "space", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java#L394-L405
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/accesslayer/QueryCustomizerDefaultImpl.java
QueryCustomizerDefaultImpl.customizeQuery
public Query customizeQuery(Object anObject, PersistenceBroker aBroker, CollectionDescriptor aCod, QueryByCriteria aQuery) { """ Default implementation returns unmodified original Query @see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery """ return aQuery; }
java
public Query customizeQuery(Object anObject, PersistenceBroker aBroker, CollectionDescriptor aCod, QueryByCriteria aQuery) { return aQuery; }
[ "public", "Query", "customizeQuery", "(", "Object", "anObject", ",", "PersistenceBroker", "aBroker", ",", "CollectionDescriptor", "aCod", ",", "QueryByCriteria", "aQuery", ")", "{", "return", "aQuery", ";", "}" ]
Default implementation returns unmodified original Query @see org.apache.ojb.broker.accesslayer.QueryCustomizer#customizeQuery
[ "Default", "implementation", "returns", "unmodified", "original", "Query" ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/accesslayer/QueryCustomizerDefaultImpl.java#L50-L53
ebourgeois/common-java
src/main/java/ca/jeb/common/infra/JReflectionUtils.java
JReflectionUtils.runSetter
public static Object runSetter(Object object, String method, Object arg, Class<? extends Object> argClazz) throws JException { """ Execute a "setter" on the provided <i>object</i> for the given <i>method</i> name. @param object - The Object to run the "setter" method @param method - The "setter" method name as...
java
public static Object runSetter(Object object, String method, Object arg, Class<? extends Object> argClazz) throws JException { try { if (argClazz == null) { argClazz = arg.getClass(); } final Method m = object.getClass().getMethod(method, argClazz); return m.invoke(objec...
[ "public", "static", "Object", "runSetter", "(", "Object", "object", ",", "String", "method", ",", "Object", "arg", ",", "Class", "<", "?", "extends", "Object", ">", "argClazz", ")", "throws", "JException", "{", "try", "{", "if", "(", "argClazz", "==", "n...
Execute a "setter" on the provided <i>object</i> for the given <i>method</i> name. @param object - The Object to run the "setter" method @param method - The "setter" method name as a string @param arg - The Object argument to set @param argClazz - The Class type of the "setter" argument @return Object - Returns the ob...
[ "Execute", "a", "setter", "on", "the", "provided", "<i", ">", "object<", "/", "i", ">", "for", "the", "given", "<i", ">", "method<", "/", "i", ">", "name", "." ]
train
https://github.com/ebourgeois/common-java/blob/8ba7e05b1228aad1ec2949b5707ac4b5e8889f92/src/main/java/ca/jeb/common/infra/JReflectionUtils.java#L100-L116
CloudBees-community/syslog-java-client
src/main/java/com/cloudbees/syslog/integration/jul/util/LogManagerHelper.java
LogManagerHelper.getIntProperty
public static int getIntProperty(@Nonnull LogManager manager, @Nullable String name, int defaultValue) { """ Visible version of {@link java.util.logging.LogManager#getIntProperty(String, int)}. Method to get an integer property. If the property is not defined or cannot be parsed we return the given default v...
java
public static int getIntProperty(@Nonnull LogManager manager, @Nullable String name, int defaultValue) { if (name == null) { return defaultValue; } String val = manager.getProperty(name); if (val == null) { return defaultValue; } try { ...
[ "public", "static", "int", "getIntProperty", "(", "@", "Nonnull", "LogManager", "manager", ",", "@", "Nullable", "String", "name", ",", "int", "defaultValue", ")", "{", "if", "(", "name", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "String"...
Visible version of {@link java.util.logging.LogManager#getIntProperty(String, int)}. Method to get an integer property. If the property is not defined or cannot be parsed we return the given default value.
[ "Visible", "version", "of", "{", "@link", "java", ".", "util", ".", "logging", ".", "LogManager#getIntProperty", "(", "String", "int", ")", "}", "." ]
train
https://github.com/CloudBees-community/syslog-java-client/blob/41e01206e4ce17c6d225ffb443bf19792a3f3c3a/src/main/java/com/cloudbees/syslog/integration/jul/util/LogManagerHelper.java#L136-L149
OpenLiberty/open-liberty
dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java
MethodFinder.typesEquivalent
private static boolean typesEquivalent(ParameterizedType typeToMatch, ParameterizedType type, ResolutionContext ctx) { """ Computes whether two ParameterizedTypes are equivalent. <p> This method will check the raw types and then recursively compare each of the type arguments using {@link #typesEquivalent(Type, T...
java
private static boolean typesEquivalent(ParameterizedType typeToMatch, ParameterizedType type, ResolutionContext ctx) { if (!typeToMatch.getRawType().equals(type.getRawType())) { return false; } Type[] typesA = typeToMatch.getActualTypeArguments(); Type[] typesB = type.getAct...
[ "private", "static", "boolean", "typesEquivalent", "(", "ParameterizedType", "typeToMatch", ",", "ParameterizedType", "type", ",", "ResolutionContext", "ctx", ")", "{", "if", "(", "!", "typeToMatch", ".", "getRawType", "(", ")", ".", "equals", "(", "type", ".", ...
Computes whether two ParameterizedTypes are equivalent. <p> This method will check the raw types and then recursively compare each of the type arguments using {@link #typesEquivalent(Type, Type, ResolutionContext)} @param typeToMatch the type to match against @param type the type to check, type variable resolution wil...
[ "Computes", "whether", "two", "ParameterizedTypes", "are", "equivalent", ".", "<p", ">", "This", "method", "will", "check", "the", "raw", "types", "and", "then", "recursively", "compare", "each", "of", "the", "type", "arguments", "using", "{", "@link", "#types...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.microprofile.faulttolerance.cdi/src/com/ibm/ws/microprofile/faulttolerance/cdi/config/MethodFinder.java#L203-L222
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java
CheckpointCoordinator.failUnacknowledgedPendingCheckpointsFor
public void failUnacknowledgedPendingCheckpointsFor(ExecutionAttemptID executionAttemptId, Throwable cause) { """ Fails all pending checkpoints which have not been acknowledged by the given execution attempt id. @param executionAttemptId for which to discard unacknowledged pending checkpoints @param cause of ...
java
public void failUnacknowledgedPendingCheckpointsFor(ExecutionAttemptID executionAttemptId, Throwable cause) { synchronized (lock) { Iterator<PendingCheckpoint> pendingCheckpointIterator = pendingCheckpoints.values().iterator(); while (pendingCheckpointIterator.hasNext()) { final PendingCheckpoint pendingCh...
[ "public", "void", "failUnacknowledgedPendingCheckpointsFor", "(", "ExecutionAttemptID", "executionAttemptId", ",", "Throwable", "cause", ")", "{", "synchronized", "(", "lock", ")", "{", "Iterator", "<", "PendingCheckpoint", ">", "pendingCheckpointIterator", "=", "pendingC...
Fails all pending checkpoints which have not been acknowledged by the given execution attempt id. @param executionAttemptId for which to discard unacknowledged pending checkpoints @param cause of the failure
[ "Fails", "all", "pending", "checkpoints", "which", "have", "not", "been", "acknowledged", "by", "the", "given", "execution", "attempt", "id", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinator.java#L964-L977
phax/ph-css
ph-css/src/main/java/com/helger/css/writer/CSSCompressor.java
CSSCompressor.getRewrittenCSS
@Nonnull public static String getRewrittenCSS (@Nonnull final String sOriginalCSS, @Nonnull final CSSWriterSettings aSettings) { """ Get the rewritten version of the passed CSS code. This is done by interpreting the CSS and than writing it again with the passed settings. This can e.g. be used to create a compr...
java
@Nonnull public static String getRewrittenCSS (@Nonnull final String sOriginalCSS, @Nonnull final CSSWriterSettings aSettings) { ValueEnforcer.notNull (sOriginalCSS, "OriginalCSS"); ValueEnforcer.notNull (aSettings, "Settings"); final CascadingStyleSheet aCSS = CSSReader.readFromString (sOriginalCSS, a...
[ "@", "Nonnull", "public", "static", "String", "getRewrittenCSS", "(", "@", "Nonnull", "final", "String", "sOriginalCSS", ",", "@", "Nonnull", "final", "CSSWriterSettings", "aSettings", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sOriginalCSS", ",", "\"Origina...
Get the rewritten version of the passed CSS code. This is done by interpreting the CSS and than writing it again with the passed settings. This can e.g. be used to create a compressed version of a CSS. @param sOriginalCSS The original CSS code to be compressed. @param aSettings The CSS writer settings to use. The vers...
[ "Get", "the", "rewritten", "version", "of", "the", "passed", "CSS", "code", ".", "This", "is", "done", "by", "interpreting", "the", "CSS", "and", "than", "writing", "it", "again", "with", "the", "passed", "settings", ".", "This", "can", "e", ".", "g", ...
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/writer/CSSCompressor.java#L98-L117
joniles/mpxj
src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java
MapFileGenerator.writeMapFile
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { """ Generate an IKVM map file. @param mapFileName map file name @param jarFile jar file containing code to be mapped @param mapClassMeth...
java
private void writeMapFile(String mapFileName, File jarFile, boolean mapClassMethods) throws IOException, XMLStreamException, ClassNotFoundException, IntrospectionException { FileWriter fw = new FileWriter(mapFileName); XMLOutputFactory xof = XMLOutputFactory.newInstance(); XMLStreamWriter writer = ...
[ "private", "void", "writeMapFile", "(", "String", "mapFileName", ",", "File", "jarFile", ",", "boolean", "mapClassMethods", ")", "throws", "IOException", ",", "XMLStreamException", ",", "ClassNotFoundException", ",", "IntrospectionException", "{", "FileWriter", "fw", ...
Generate an IKVM map file. @param mapFileName map file name @param jarFile jar file containing code to be mapped @param mapClassMethods true if we want to produce .Net style class method names @throws IOException @throws XMLStreamException @throws ClassNotFoundException @throws IntrospectionException
[ "Generate", "an", "IKVM", "map", "file", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ikvm/MapFileGenerator.java#L111-L132
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.deleteObjects
@Override public <T> long deleteObjects(Collection<T> coll) throws CpoException { """ Removes the Objects contained in the collection from the datasource. The assumption is that the object exists in the datasource. This method stores the objects contained in the collection in the datasource. The objects in the ...
java
@Override public <T> long deleteObjects(Collection<T> coll) throws CpoException { return processUpdateGroup(coll, CpoAdapter.DELETE_GROUP, null, null, null, null); }
[ "@", "Override", "public", "<", "T", ">", "long", "deleteObjects", "(", "Collection", "<", "T", ">", "coll", ")", "throws", "CpoException", "{", "return", "processUpdateGroup", "(", "coll", ",", "CpoAdapter", ".", "DELETE_GROUP", ",", "null", ",", "null", ...
Removes the Objects contained in the collection from the datasource. The assumption is that the object exists in the datasource. This method stores the objects contained in the collection in the datasource. The objects in the collection will be treated as one transaction, assuming the datasource supports transactions. ...
[ "Removes", "the", "Objects", "contained", "in", "the", "collection", "from", "the", "datasource", ".", "The", "assumption", "is", "that", "the", "object", "exists", "in", "the", "datasource", ".", "This", "method", "stores", "the", "objects", "contained", "in"...
train
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L573-L576
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/CartUrl.java
CartUrl.rejectSuggestedDiscountUrl
public static MozuUrl rejectSuggestedDiscountUrl(String cartId, Integer discountId, String responseFields) { """ Get Resource Url for RejectSuggestedDiscount @param cartId Identifier of the cart to delete. @param discountId discountId parameter description DOCUMENT_HERE @param responseFields Filtering syntax ap...
java
public static MozuUrl rejectSuggestedDiscountUrl(String cartId, Integer discountId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/{cartId}/rejectautodiscount/{discountId}?responseFields={responseFields}"); formatter.formatUrl("cartId", cartId); formatter.formatUrl("d...
[ "public", "static", "MozuUrl", "rejectSuggestedDiscountUrl", "(", "String", "cartId", ",", "Integer", "discountId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/carts/{cartId}/rejectautodiscount/{d...
Get Resource Url for RejectSuggestedDiscount @param cartId Identifier of the cart to delete. @param discountId discountId parameter description DOCUMENT_HERE @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 onl...
[ "Get", "Resource", "Url", "for", "RejectSuggestedDiscount" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/CartUrl.java#L89-L96
Impetus/Kundera
src/kundera-neo4j/src/main/java/com/impetus/client/neo4j/index/Neo4JIndexManager.java
Neo4JIndexManager.addNodeIndex
private void addNodeIndex(EntityMetadata entityMetadata, Node node, Index<Node> nodeIndex, MetamodelImpl metaModel) { """ Adds Node Index for all singular attributes (including ID) of a given entity @param entityMetadata @param node @param metaModel @param nodeIndex """ // MetamodelImpl metaModel...
java
private void addNodeIndex(EntityMetadata entityMetadata, Node node, Index<Node> nodeIndex, MetamodelImpl metaModel) { // MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel( // entityMetadata.getPersistenceUnit()); // ID attribute has to be ...
[ "private", "void", "addNodeIndex", "(", "EntityMetadata", "entityMetadata", ",", "Node", "node", ",", "Index", "<", "Node", ">", "nodeIndex", ",", "MetamodelImpl", "metaModel", ")", "{", "// MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetada...
Adds Node Index for all singular attributes (including ID) of a given entity @param entityMetadata @param node @param metaModel @param nodeIndex
[ "Adds", "Node", "Index", "for", "all", "singular", "attributes", "(", "including", "ID", ")", "of", "a", "given", "entity" ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-neo4j/src/main/java/com/impetus/client/neo4j/index/Neo4JIndexManager.java#L244-L264
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.TH
public static HtmlTree TH(String scope, Content body) { """ Generates a TH tag with scope attribute and some content. @param scope scope of the tag @param body content for the tag @return an HtmlTree object for the TH tag """ return TH(null, scope, body); }
java
public static HtmlTree TH(String scope, Content body) { return TH(null, scope, body); }
[ "public", "static", "HtmlTree", "TH", "(", "String", "scope", ",", "Content", "body", ")", "{", "return", "TH", "(", "null", ",", "scope", ",", "body", ")", ";", "}" ]
Generates a TH tag with scope attribute and some content. @param scope scope of the tag @param body content for the tag @return an HtmlTree object for the TH tag
[ "Generates", "a", "TH", "tag", "with", "scope", "attribute", "and", "some", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L821-L823
jeremiehuchet/acrachilisync
acrachilisync-core/src/main/java/fr/dudie/acrachilisync/utils/ConfigurationManager.java
ConfigurationManager.getURL
public URL getURL(final String pUrl) { """ Converts a String representing an URL to an {@link URL} or throw a {@link org.apache.commons.configuration.ConversionException}. @param pUrl a URL as a string @return an URL object """ try { return new URL(pUrl); } catch (final Malfo...
java
public URL getURL(final String pUrl) { try { return new URL(pUrl); } catch (final MalformedURLException e) { throw new ConversionException("Cannot parse URL from string " + pUrl, e); } }
[ "public", "URL", "getURL", "(", "final", "String", "pUrl", ")", "{", "try", "{", "return", "new", "URL", "(", "pUrl", ")", ";", "}", "catch", "(", "final", "MalformedURLException", "e", ")", "{", "throw", "new", "ConversionException", "(", "\"Cannot parse ...
Converts a String representing an URL to an {@link URL} or throw a {@link org.apache.commons.configuration.ConversionException}. @param pUrl a URL as a string @return an URL object
[ "Converts", "a", "String", "representing", "an", "URL", "to", "an", "{", "@link", "URL", "}", "or", "throw", "a", "{", "@link", "org", ".", "apache", ".", "commons", ".", "configuration", ".", "ConversionException", "}", "." ]
train
https://github.com/jeremiehuchet/acrachilisync/blob/4eadb0218623e77e0d92b5a08515eea2db51e988/acrachilisync-core/src/main/java/fr/dudie/acrachilisync/utils/ConfigurationManager.java#L114-L121
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java
UTF16.charAt
public static int charAt(String source, int offset16) { """ Extract a single UTF-32 value from a string. Used when iterating forwards or backwards (with <code>UTF16.getCharCount()</code>, as well as random access. If a validity check is required, use <code><a href="../lang/UCharacter.html#isLegal(char)"> UChara...
java
public static int charAt(String source, int offset16) { char single = source.charAt(offset16); if (single < LEAD_SURROGATE_MIN_VALUE) { return single; } return _charAt(source, offset16, single); }
[ "public", "static", "int", "charAt", "(", "String", "source", ",", "int", "offset16", ")", "{", "char", "single", "=", "source", ".", "charAt", "(", "offset16", ")", ";", "if", "(", "single", "<", "LEAD_SURROGATE_MIN_VALUE", ")", "{", "return", "single", ...
Extract a single UTF-32 value from a string. Used when iterating forwards or backwards (with <code>UTF16.getCharCount()</code>, as well as random access. If a validity check is required, use <code><a href="../lang/UCharacter.html#isLegal(char)"> UCharacter.isLegal()</a></code> on the return value. If the char retrieved...
[ "Extract", "a", "single", "UTF", "-", "32", "value", "from", "a", "string", ".", "Used", "when", "iterating", "forwards", "or", "backwards", "(", "with", "<code", ">", "UTF16", ".", "getCharCount", "()", "<", "/", "code", ">", "as", "well", "as", "rand...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/UTF16.java#L199-L205
OpenLiberty/open-liberty
dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/servlet/internal/RequestMessage.java
RequestMessage.mergeQueryParams
private void mergeQueryParams(Map<String, String[]> urlParams) { """ In certain cases, the URL will contain query string information and the POST body will as well. This method merges the two maps together. @param urlParams """ if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { ...
java
private void mergeQueryParams(Map<String, String[]> urlParams) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "mergeQueryParams: " + urlParams); } for (Entry<String, String[]> entry : urlParams.entrySet()) { String key = entry.getKey(); ...
[ "private", "void", "mergeQueryParams", "(", "Map", "<", "String", ",", "String", "[", "]", ">", "urlParams", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isDebugEnabled", "(", ")", ")", "{", "Tr", ".", ...
In certain cases, the URL will contain query string information and the POST body will as well. This method merges the two maps together. @param urlParams
[ "In", "certain", "cases", "the", "URL", "will", "contain", "query", "string", "information", "and", "the", "POST", "body", "will", "as", "well", ".", "This", "method", "merges", "the", "two", "maps", "together", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.httpservice/src/com/ibm/ws/httpsvc/servlet/internal/RequestMessage.java#L819-L843
VoltDB/voltdb
src/frontend/org/voltdb/plannodes/PlanNodeTree.java
PlanNodeTree.loadFromJSONPlan
public void loadFromJSONPlan(JSONObject jobj, Database db) throws JSONException { """ Load json plan. The plan must have either "PLAN_NODE" array in case of a statement without subqueries or "PLAN_NODES_LISTS" array of "PLAN_NODE" arrays for each sub statement. @param jobj @param db @throws JSONException ...
java
public void loadFromJSONPlan(JSONObject jobj, Database db) throws JSONException { if (jobj.has(Members.PLAN_NODES_LISTS)) { JSONArray jplanNodesArray = jobj.getJSONArray(Members.PLAN_NODES_LISTS); for (int i = 0; i < jplanNodesArray.length(); ++i) { JSONObject jplanNodes...
[ "public", "void", "loadFromJSONPlan", "(", "JSONObject", "jobj", ",", "Database", "db", ")", "throws", "JSONException", "{", "if", "(", "jobj", ".", "has", "(", "Members", ".", "PLAN_NODES_LISTS", ")", ")", "{", "JSONArray", "jplanNodesArray", "=", "jobj", "...
Load json plan. The plan must have either "PLAN_NODE" array in case of a statement without subqueries or "PLAN_NODES_LISTS" array of "PLAN_NODE" arrays for each sub statement. @param jobj @param db @throws JSONException
[ "Load", "json", "plan", ".", "The", "plan", "must", "have", "either", "PLAN_NODE", "array", "in", "case", "of", "a", "statement", "without", "subqueries", "or", "PLAN_NODES_LISTS", "array", "of", "PLAN_NODE", "arrays", "for", "each", "sub", "statement", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/plannodes/PlanNodeTree.java#L133-L156
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java
DiscreteDistributions.negativeBinomial
public static double negativeBinomial(int n, int r, double p) { """ Returns the probability of requiring n tries to achieve r successes with probability of success p @param n @param r @param p @return """ //tested its validity with http://www.mathcelebrity.com/binomialneg.php if(n<0 || r<...
java
public static double negativeBinomial(int n, int r, double p) { //tested its validity with http://www.mathcelebrity.com/binomialneg.php if(n<0 || r<0 || p<0) { throw new IllegalArgumentException("All the parameters must be positive."); } n = Math.max(n,r);//obvisouly the tota...
[ "public", "static", "double", "negativeBinomial", "(", "int", "n", ",", "int", "r", ",", "double", "p", ")", "{", "//tested its validity with http://www.mathcelebrity.com/binomialneg.php", "if", "(", "n", "<", "0", "||", "r", "<", "0", "||", "p", "<", "0", "...
Returns the probability of requiring n tries to achieve r successes with probability of success p @param n @param r @param p @return
[ "Returns", "the", "probability", "of", "requiring", "n", "tries", "to", "achieve", "r", "successes", "with", "probability", "of", "success", "p" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/distributions/DiscreteDistributions.java#L191-L201
overview/mime-types
src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java
MimeTypeDetector.detectMimeType
public String detectMimeType(String filename, Callable<byte[]> getBytes) throws GetBytesException { """ Synchronously detects a MIME type from a filename and bytes. <p> This method follows the Shared Mime Info database's <a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-lat...
java
public String detectMimeType(String filename, Callable<byte[]> getBytes) throws GetBytesException { Supplier<CompletionStage<byte[]>> supplier = () -> { try { return CompletableFuture.completedFuture(getBytes.call()); } catch (Exception ex) { throw new CompletionEx...
[ "public", "String", "detectMimeType", "(", "String", "filename", ",", "Callable", "<", "byte", "[", "]", ">", "getBytes", ")", "throws", "GetBytesException", "{", "Supplier", "<", "CompletionStage", "<", "byte", "[", "]", ">", ">", "supplier", "=", "(", ")...
Synchronously detects a MIME type from a filename and bytes. <p> This method follows the Shared Mime Info database's <a href="http://standards.freedesktop.org/shared-mime-info-spec/shared-mime-info-spec-latest.html#idm140625828606432">Recommended Checking Order</a>. The only difference: it tests for <tt>text/plain</tt...
[ "Synchronously", "detects", "a", "MIME", "type", "from", "a", "filename", "and", "bytes", "." ]
train
https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L192-L201
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/util/InstantiationUtils.java
InstantiationUtils.newInstanceOrNull
public static <T> T newInstanceOrNull(Class<? extends T> clazz, Object...params) { """ Create a new instance of a given class. It will search for a constructor matching passed parameters. If a matching constructor is not found then it returns null. Constructor is matching when it can be invoked with given para...
java
public static <T> T newInstanceOrNull(Class<? extends T> clazz, Object...params) { Constructor<T> constructor = selectMatchingConstructor(clazz, params); if (constructor == null) { return null; } try { return constructor.newInstance(params); } catch (Ille...
[ "public", "static", "<", "T", ">", "T", "newInstanceOrNull", "(", "Class", "<", "?", "extends", "T", ">", "clazz", ",", "Object", "...", "params", ")", "{", "Constructor", "<", "T", ">", "constructor", "=", "selectMatchingConstructor", "(", "clazz", ",", ...
Create a new instance of a given class. It will search for a constructor matching passed parameters. If a matching constructor is not found then it returns null. Constructor is matching when it can be invoked with given parameters. The order of parameters is significant. When a class constructor contains a primitive ...
[ "Create", "a", "new", "instance", "of", "a", "given", "class", ".", "It", "will", "search", "for", "a", "constructor", "matching", "passed", "parameters", ".", "If", "a", "matching", "constructor", "is", "not", "found", "then", "it", "returns", "null", "."...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/util/InstantiationUtils.java#L49-L63
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.get
public static boolean get(long[] v, int off) { """ Set bit number "off" in v. <p> Low-endian layout for the array. @param v Buffer @param off Offset to set """ final int wordindex = off >>> LONG_LOG2_SIZE; return (wordindex < v.length) && (v[wordindex] & (1L << off)) != 0; }
java
public static boolean get(long[] v, int off) { final int wordindex = off >>> LONG_LOG2_SIZE; return (wordindex < v.length) && (v[wordindex] & (1L << off)) != 0; }
[ "public", "static", "boolean", "get", "(", "long", "[", "]", "v", ",", "int", "off", ")", "{", "final", "int", "wordindex", "=", "off", ">>>", "LONG_LOG2_SIZE", ";", "return", "(", "wordindex", "<", "v", ".", "length", ")", "&&", "(", "v", "[", "wo...
Set bit number "off" in v. <p> Low-endian layout for the array. @param v Buffer @param off Offset to set
[ "Set", "bit", "number", "off", "in", "v", ".", "<p", ">", "Low", "-", "endian", "layout", "for", "the", "array", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L432-L435
jenkinsci/jenkins
core/src/main/java/hudson/model/ViewDescriptor.java
ViewDescriptor.checkDisplayName
@SuppressWarnings("unused") // expose utility check method to subclasses protected FormValidation checkDisplayName(@Nonnull View view, @CheckForNull String value) { """ Validation of the display name field. @param view the view to check the new display name of. @param value the proposed new display name. ...
java
@SuppressWarnings("unused") // expose utility check method to subclasses protected FormValidation checkDisplayName(@Nonnull View view, @CheckForNull String value) { if (StringUtils.isBlank(value)) { // no custom name, no need to check return FormValidation.ok(); } for...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "// expose utility check method to subclasses", "protected", "FormValidation", "checkDisplayName", "(", "@", "Nonnull", "View", "view", ",", "@", "CheckForNull", "String", "value", ")", "{", "if", "(", "StringUtils", "....
Validation of the display name field. @param view the view to check the new display name of. @param value the proposed new display name. @return the validation result. @since 2.37
[ "Validation", "of", "the", "display", "name", "field", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/ViewDescriptor.java#L140-L155
kaazing/java.client
amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java
AmqpChannel.getBasic
public AmqpChannel getBasic(String queue, boolean noAck) { """ Gets messages from the queue and dispatches it to the listener @param queue @param noAck @return AmqpChannel """ Object[] args = {0, queue, noAck}; WrappedByteBuffer bodyArg = null; HashMap<String, Object> headersArg = ...
java
public AmqpChannel getBasic(String queue, boolean noAck) { Object[] args = {0, queue, noAck}; WrappedByteBuffer bodyArg = null; HashMap<String, Object> headersArg = null; String methodName = "getBasic"; String methodId = "60" + "70"; AmqpMethod amqpMethod = MethodLookup....
[ "public", "AmqpChannel", "getBasic", "(", "String", "queue", ",", "boolean", "noAck", ")", "{", "Object", "[", "]", "args", "=", "{", "0", ",", "queue", ",", "noAck", "}", ";", "WrappedByteBuffer", "bodyArg", "=", "null", ";", "HashMap", "<", "String", ...
Gets messages from the queue and dispatches it to the listener @param queue @param noAck @return AmqpChannel
[ "Gets", "messages", "from", "the", "queue", "and", "dispatches", "it", "to", "the", "listener" ]
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java#L852-L863
JOML-CI/JOML
src/org/joml/Matrix4x3d.java
Matrix4x3d.orthoSymmetricLH
public Matrix4x3d orthoSymmetricLH(double width, double height, double zNear, double zFar, Matrix4x3d dest) { """ Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code...
java
public Matrix4x3d orthoSymmetricLH(double width, double height, double zNear, double zFar, Matrix4x3d dest) { return orthoSymmetricLH(width, height, zNear, zFar, false, dest); }
[ "public", "Matrix4x3d", "orthoSymmetricLH", "(", "double", "width", ",", "double", "height", ",", "double", "zNear", ",", "double", "zFar", ",", "Matrix4x3d", "dest", ")", "{", "return", "orthoSymmetricLH", "(", "width", ",", "height", ",", "zNear", ",", "zF...
Apply a symmetric orthographic projection transformation for a left-handed coordinate system using OpenGL's NDC z range of <code>[-1..+1]</code> to this matrix and store the result in <code>dest</code>. <p> This method is equivalent to calling {@link #orthoLH(double, double, double, double, double, double, Matrix4x3d) ...
[ "Apply", "a", "symmetric", "orthographic", "projection", "transformation", "for", "a", "left", "-", "handed", "coordinate", "system", "using", "OpenGL", "s", "NDC", "z", "range", "of", "<code", ">", "[", "-", "1", "..", "+", "1", "]", "<", "/", "code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4x3d.java#L7291-L7293
cchantep/acolyte
studio/src/main/java/acolyte/Configuration.java
Configuration.loadConfig
protected static void loadConfig(final Properties config, final File f) { """ Loads configuration from |file|. @param config Configuration container @param f File to be loaded """ InputStreamReader r = null; try { final FileInputStream in ...
java
protected static void loadConfig(final Properties config, final File f) { InputStreamReader r = null; try { final FileInputStream in = new FileInputStream(f); r = new InputStreamReader(in, "UTF-8"); config.load(r); } ca...
[ "protected", "static", "void", "loadConfig", "(", "final", "Properties", "config", ",", "final", "File", "f", ")", "{", "InputStreamReader", "r", "=", "null", ";", "try", "{", "final", "FileInputStream", "in", "=", "new", "FileInputStream", "(", "f", ")", ...
Loads configuration from |file|. @param config Configuration container @param f File to be loaded
[ "Loads", "configuration", "from", "|file|", "." ]
train
https://github.com/cchantep/acolyte/blob/a383dff20fadc08ec9306f2f1f24b2a7e0047449/studio/src/main/java/acolyte/Configuration.java#L22-L42
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/handler/ProxyHandler.java
ProxyHandler.customizeConnection
protected void customizeConnection(String pathInContext, String pathParams, HttpRequest request, Socket socket) throws IOException { """ Customize proxy Socket connection for CONNECT. Method to allow derived handlers to customize the tunnel sockets. """ }
java
protected void customizeConnection(String pathInContext, String pathParams, HttpRequest request, Socket socket) throws IOException { }
[ "protected", "void", "customizeConnection", "(", "String", "pathInContext", ",", "String", "pathParams", ",", "HttpRequest", "request", ",", "Socket", "socket", ")", "throws", "IOException", "{", "}" ]
Customize proxy Socket connection for CONNECT. Method to allow derived handlers to customize the tunnel sockets.
[ "Customize", "proxy", "Socket", "connection", "for", "CONNECT", ".", "Method", "to", "allow", "derived", "handlers", "to", "customize", "the", "tunnel", "sockets", "." ]
train
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/handler/ProxyHandler.java#L531-L533
radkovo/SwingBox
src/main/java/org/fit/cssbox/swingbox/util/DefaultHyperlinkHandler.java
DefaultHyperlinkHandler.loadPage
protected void loadPage(JEditorPane pane, HyperlinkEvent evt) { """ Loads given page as HyperlinkEvent. @param pane the pane @param evt the event """ // if some security, or other interaction is needed, override this // method try { pane.setPage(evt.getURL()); ...
java
protected void loadPage(JEditorPane pane, HyperlinkEvent evt) { // if some security, or other interaction is needed, override this // method try { pane.setPage(evt.getURL()); } catch (IOException e) { System.err.println(e.getLocalizedMessage())...
[ "protected", "void", "loadPage", "(", "JEditorPane", "pane", ",", "HyperlinkEvent", "evt", ")", "{", "// if some security, or other interaction is needed, override this", "// method", "try", "{", "pane", ".", "setPage", "(", "evt", ".", "getURL", "(", ")", ")", ";",...
Loads given page as HyperlinkEvent. @param pane the pane @param evt the event
[ "Loads", "given", "page", "as", "HyperlinkEvent", "." ]
train
https://github.com/radkovo/SwingBox/blob/ff370f3dc54d248e4c8852c17513618c83c25984/src/main/java/org/fit/cssbox/swingbox/util/DefaultHyperlinkHandler.java#L67-L78
gallandarakhneorg/afc
advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java
RoadNetworkConstants.setPreferredAttributeValueForRoadType
public static void setPreferredAttributeValueForRoadType(RoadType type, String value) { """ Set the preferred value of road type used in the attributes for the types of the roads. @param type a type @param value is the preferred name for the types of the roads. """ final Preferences prefs = Preferences....
java
public static void setPreferredAttributeValueForRoadType(RoadType type, String value) { final Preferences prefs = Preferences.userNodeForPackage(RoadNetworkConstants.class); if (prefs != null) { final String sysDef = getSystemDefault(type); if (value == null || "".equals(value) || sysDef.equalsIgnoreCase(valu...
[ "public", "static", "void", "setPreferredAttributeValueForRoadType", "(", "RoadType", "type", ",", "String", "value", ")", "{", "final", "Preferences", "prefs", "=", "Preferences", ".", "userNodeForPackage", "(", "RoadNetworkConstants", ".", "class", ")", ";", "if",...
Set the preferred value of road type used in the attributes for the types of the roads. @param type a type @param value is the preferred name for the types of the roads.
[ "Set", "the", "preferred", "value", "of", "road", "type", "used", "in", "the", "attributes", "for", "the", "types", "of", "the", "roads", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/primitive/RoadNetworkConstants.java#L720-L730
haifengl/smile
math/src/main/java/smile/stat/distribution/AbstractDistribution.java
AbstractDistribution.quantile
protected double quantile(double p, double xmin, double xmax, double eps) { """ Inversion of CDF by bisection numeric root finding of "cdf(x) = p" for continuous distribution. """ if (eps <= 0.0) { throw new IllegalArgumentException("Invalid epsilon: " + eps); } ...
java
protected double quantile(double p, double xmin, double xmax, double eps) { if (eps <= 0.0) { throw new IllegalArgumentException("Invalid epsilon: " + eps); } while (Math.abs(xmax - xmin) > eps) { double xmed = (xmax + xmin) / 2; if (cdf(x...
[ "protected", "double", "quantile", "(", "double", "p", ",", "double", "xmin", ",", "double", "xmax", ",", "double", "eps", ")", "{", "if", "(", "eps", "<=", "0.0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid epsilon: \"", "+", "ep...
Inversion of CDF by bisection numeric root finding of "cdf(x) = p" for continuous distribution.
[ "Inversion", "of", "CDF", "by", "bisection", "numeric", "root", "finding", "of", "cdf", "(", "x", ")", "=", "p", "for", "continuous", "distribution", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/stat/distribution/AbstractDistribution.java#L89-L104
Tristan971/EasyFXML
easyfxml/src/main/java/moe/tristan/easyfxml/model/beanmanagement/AbstractInstanceManager.java
AbstractInstanceManager.registerSingle
public V registerSingle(final K parent, final V instance) { """ Registers a single instance of type {@link V} under the {@link K} category. @param parent The parent of this instance @param instance The instance to register @return The instance registered """ return this.singletons.put(parent, ...
java
public V registerSingle(final K parent, final V instance) { return this.singletons.put(parent, instance); }
[ "public", "V", "registerSingle", "(", "final", "K", "parent", ",", "final", "V", "instance", ")", "{", "return", "this", ".", "singletons", ".", "put", "(", "parent", ",", "instance", ")", ";", "}" ]
Registers a single instance of type {@link V} under the {@link K} category. @param parent The parent of this instance @param instance The instance to register @return The instance registered
[ "Registers", "a", "single", "instance", "of", "type", "{", "@link", "V", "}", "under", "the", "{", "@link", "K", "}", "category", "." ]
train
https://github.com/Tristan971/EasyFXML/blob/f82cad1d54e62903ca5e4a250279ad315b028aef/easyfxml/src/main/java/moe/tristan/easyfxml/model/beanmanagement/AbstractInstanceManager.java#L46-L48
Baidu-AIP/java-sdk
src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java
AipImageSearch.similarSearchUrl
public JSONObject similarSearchUrl(String url, HashMap<String, String> options) { """ 相似图检索—检索接口 完成入库后,可使用该接口实现相似图检索。**支持传入指定分类维度(具体变量tags)进行检索,返回结果支持翻页(具体变量pn、rn)。****请注意,检索接口不返回原图,仅反馈当前填写的brief信息,请调用入库接口时尽量填写可关联至本地图库的图片id或者图片url等信息。** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边...
java
public JSONObject similarSearchUrl(String url, HashMap<String, String> options) { AipRequest request = new AipRequest(); preOperation(request); request.addBody("url", url); if (options != null) { request.addBody(options); } request.setUri(ImageSearchC...
[ "public", "JSONObject", "similarSearchUrl", "(", "String", "url", ",", "HashMap", "<", "String", ",", "String", ">", "options", ")", "{", "AipRequest", "request", "=", "new", "AipRequest", "(", ")", ";", "preOperation", "(", "request", ")", ";", "request", ...
相似图检索—检索接口 完成入库后,可使用该接口实现相似图检索。**支持传入指定分类维度(具体变量tags)进行检索,返回结果支持翻页(具体变量pn、rn)。****请注意,检索接口不返回原图,仅反馈当前填写的brief信息,请调用入库接口时尽量填写可关联至本地图库的图片id或者图片url等信息。** @param url - 图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式,当image字段存在时url字段失效 @param options - 可选参数对象,key: value都为string类型 optio...
[ "相似图检索—检索接口", "完成入库后,可使用该接口实现相似图检索。", "**", "支持传入指定分类维度(具体变量tags)进行检索,返回结果支持翻页(具体变量pn、rn)。", "****", "请注意,检索接口不返回原图,仅反馈当前填写的brief信息,请调用入库接口时尽量填写可关联至本地图库的图片id或者图片url等信息。", "**" ]
train
https://github.com/Baidu-AIP/java-sdk/blob/16bb8b7bb8f9bbcb7c8af62d0a67a1e79eecad90/src/main/java/com/baidu/aip/imagesearch/AipImageSearch.java#L491-L502
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_instance_GET
public ArrayList<OvhInstance> project_serviceName_instance_GET(String serviceName, String region) throws IOException { """ Get instances REST: GET /cloud/project/{serviceName}/instance @param region [required] Instance region @param serviceName [required] Project id """ String qPath = "/cloud/project/{s...
java
public ArrayList<OvhInstance> project_serviceName_instance_GET(String serviceName, String region) throws IOException { String qPath = "/cloud/project/{serviceName}/instance"; StringBuilder sb = path(qPath, serviceName); query(sb, "region", region); String resp = exec(qPath, "GET", sb.toString(), null); return...
[ "public", "ArrayList", "<", "OvhInstance", ">", "project_serviceName_instance_GET", "(", "String", "serviceName", ",", "String", "region", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/instance\"", ";", "StringBuilder", "sb", ...
Get instances REST: GET /cloud/project/{serviceName}/instance @param region [required] Instance region @param serviceName [required] Project id
[ "Get", "instances" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1766-L1772
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/util/ShapeGenerator.java
ShapeGenerator.createScrollCap
public Shape createScrollCap(int x, int y, int w, int h) { """ Return a path for a scroll bar cap. This is used when the buttons are placed together at the opposite end of the scroll bar. @param x the X coordinate of the upper-left corner of the cap @param y the Y coordinate of the upper-left corner of the ...
java
public Shape createScrollCap(int x, int y, int w, int h) { path.reset(); path.moveTo(x, y); path.lineTo(x, y + h); path.lineTo(x + w, y + h); addScrollGapPath(x, y, w, h, true); path.closePath(); return path; }
[ "public", "Shape", "createScrollCap", "(", "int", "x", ",", "int", "y", ",", "int", "w", ",", "int", "h", ")", "{", "path", ".", "reset", "(", ")", ";", "path", ".", "moveTo", "(", "x", ",", "y", ")", ";", "path", ".", "lineTo", "(", "x", ","...
Return a path for a scroll bar cap. This is used when the buttons are placed together at the opposite end of the scroll bar. @param x the X coordinate of the upper-left corner of the cap @param y the Y coordinate of the upper-left corner of the cap @param w the width of the cap @param h the height of the cap @ret...
[ "Return", "a", "path", "for", "a", "scroll", "bar", "cap", ".", "This", "is", "used", "when", "the", "buttons", "are", "placed", "together", "at", "the", "opposite", "end", "of", "the", "scroll", "bar", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/util/ShapeGenerator.java#L645-L654
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse3DLine.java
ST_Reverse3DLine.reverse3DLine
public static Geometry reverse3DLine(Geometry geometry, String order) { """ Returns a 1 dimension geometry with vertex order reversed according values ascending (asc) or descending (desc) @param geometry @param order @return """ if(geometry == null){ return null; } i...
java
public static Geometry reverse3DLine(Geometry geometry, String order) { if(geometry == null){ return null; } if (geometry instanceof LineString) { return reverse3D((LineString) geometry, order); } else if (geometry instanceof MultiLineString) { return ...
[ "public", "static", "Geometry", "reverse3DLine", "(", "Geometry", "geometry", ",", "String", "order", ")", "{", "if", "(", "geometry", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "geometry", "instanceof", "LineString", ")", "{", "return"...
Returns a 1 dimension geometry with vertex order reversed according values ascending (asc) or descending (desc) @param geometry @param order @return
[ "Returns", "a", "1", "dimension", "geometry", "with", "vertex", "order", "reversed", "according", "values", "ascending", "(", "asc", ")", "or", "descending", "(", "desc", ")" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/edit/ST_Reverse3DLine.java#L68-L78
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/comm/ApptentiveClient.java
ApptentiveClient.getErrorResponse
public static String getErrorResponse(HttpURLConnection connection, boolean isZipped) throws IOException { """ Reads error response and returns it as a string. Handles gzipped streams. @param connection Current connection @return Error response as String @throws IOException """ if (connection != null) {...
java
public static String getErrorResponse(HttpURLConnection connection, boolean isZipped) throws IOException { if (connection != null) { InputStream is = null; try { is = connection.getErrorStream(); if (is != null) { if (isZipped) { is = new GZIPInputStream(is); } } return Util.read...
[ "public", "static", "String", "getErrorResponse", "(", "HttpURLConnection", "connection", ",", "boolean", "isZipped", ")", "throws", "IOException", "{", "if", "(", "connection", "!=", "null", ")", "{", "InputStream", "is", "=", "null", ";", "try", "{", "is", ...
Reads error response and returns it as a string. Handles gzipped streams. @param connection Current connection @return Error response as String @throws IOException
[ "Reads", "error", "response", "and", "returns", "it", "as", "a", "string", ".", "Handles", "gzipped", "streams", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/comm/ApptentiveClient.java#L32-L48