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
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java
SphereUtil.crossTrackDistanceDeg
public static double crossTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ) { """ Compute the cross-track distance. <p> XTD = asin(sin(dist_1Q)*sin(crs_1Q-crs_12)) @param lat1 Latitude of starting point. @param lon1 Longitude of starting point. @param lat2 Latitu...
java
public static double crossTrackDistanceDeg(double lat1, double lon1, double lat2, double lon2, double latQ, double lonQ) { return crossTrackDistanceRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2), deg2rad(latQ), deg2rad(lonQ)); }
[ "public", "static", "double", "crossTrackDistanceDeg", "(", "double", "lat1", ",", "double", "lon1", ",", "double", "lat2", ",", "double", "lon2", ",", "double", "latQ", ",", "double", "lonQ", ")", "{", "return", "crossTrackDistanceRad", "(", "deg2rad", "(", ...
Compute the cross-track distance. <p> XTD = asin(sin(dist_1Q)*sin(crs_1Q-crs_12)) @param lat1 Latitude of starting point. @param lon1 Longitude of starting point. @param lat2 Latitude of destination point. @param lon2 Longitude of destination point. @param latQ Latitude of query point. @param lonQ Longitude of query p...
[ "Compute", "the", "cross", "-", "track", "distance", ".", "<p", ">", "XTD", "=", "asin", "(", "sin", "(", "dist_1Q", ")", "*", "sin", "(", "crs_1Q", "-", "crs_12", "))" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geodesy/SphereUtil.java#L419-L421
OpenLiberty/open-liberty
dev/wlp-bndPlugins/src/com/ibm/ws/build/bnd/plugins/ImportlessPackager.java
ImportlessPackager.collectClassDependencies
private void collectClassDependencies (Clazz classInstance, Analyzer analyzer) throws Exception { """ Collect the imports from a class and add the imported classes to the map of all known classes importedReferencedTypes is updated to contain newly added imports allReferencedTypes is updated to avoid the duplicat...
java
private void collectClassDependencies (Clazz classInstance, Analyzer analyzer) throws Exception { // retrieve the imports from the known class path Set<TypeRef> importedClasses = classInstance.parseClassFile(); for (TypeRef importedClass:importedClasses) { if (canBeSkipped(importedClass)) // validate the impo...
[ "private", "void", "collectClassDependencies", "(", "Clazz", "classInstance", ",", "Analyzer", "analyzer", ")", "throws", "Exception", "{", "// retrieve the imports from the known class path", "Set", "<", "TypeRef", ">", "importedClasses", "=", "classInstance", ".", "pars...
Collect the imports from a class and add the imported classes to the map of all known classes importedReferencedTypes is updated to contain newly added imports allReferencedTypes is updated to avoid the duplicated process @param classInstance @param analyzer @throws Exception
[ "Collect", "the", "imports", "from", "a", "class", "and", "add", "the", "imported", "classes", "to", "the", "map", "of", "all", "known", "classes", "importedReferencedTypes", "is", "updated", "to", "contain", "newly", "added", "imports", "allReferencedTypes", "i...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/wlp-bndPlugins/src/com/ibm/ws/build/bnd/plugins/ImportlessPackager.java#L239-L256
google/closure-templates
java/src/com/google/template/soy/jbcsrc/TemplateFactoryCompiler.java
TemplateFactoryCompiler.generateCreateMethod
private void generateCreateMethod(ClassVisitor cv, TypeInfo factoryType) { """ Writes the {@link CompiledTemplate.Factory#create} method, which directly delegates to the constructor of the {@link #template}. """ final Label start = new Label(); final Label end = new Label(); final LocalVariable th...
java
private void generateCreateMethod(ClassVisitor cv, TypeInfo factoryType) { final Label start = new Label(); final Label end = new Label(); final LocalVariable thisVar = createThisVar(factoryType, start, end); final LocalVariable paramsVar = createLocal("params", 1, SOY_RECORD_TYPE, start, end); fina...
[ "private", "void", "generateCreateMethod", "(", "ClassVisitor", "cv", ",", "TypeInfo", "factoryType", ")", "{", "final", "Label", "start", "=", "new", "Label", "(", ")", ";", "final", "Label", "end", "=", "new", "Label", "(", ")", ";", "final", "LocalVaria...
Writes the {@link CompiledTemplate.Factory#create} method, which directly delegates to the constructor of the {@link #template}.
[ "Writes", "the", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/TemplateFactoryCompiler.java#L130-L149
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/slider/Slider.java
Slider.setValues
public Slider setValues(Integer value1, Integer value2) { """ This option can be used to specify multiple handles. If range is set to true, the length of 'values' should be 2. @param value1 @param value2 @return instance of the current component """ if (value1 != null && value2 != null) { ArrayIte...
java
public Slider setValues(Integer value1, Integer value2) { if (value1 != null && value2 != null) { ArrayItemOptions<IntegerItemOptions> options = new ArrayItemOptions<IntegerItemOptions>(); options.add(new IntegerItemOptions(value1)); options.add(new IntegerItemOptions(value2)); this.options.put("va...
[ "public", "Slider", "setValues", "(", "Integer", "value1", ",", "Integer", "value2", ")", "{", "if", "(", "value1", "!=", "null", "&&", "value2", "!=", "null", ")", "{", "ArrayItemOptions", "<", "IntegerItemOptions", ">", "options", "=", "new", "ArrayItemOpt...
This option can be used to specify multiple handles. If range is set to true, the length of 'values' should be 2. @param value1 @param value2 @return instance of the current component
[ "This", "option", "can", "be", "used", "to", "specify", "multiple", "handles", ".", "If", "range", "is", "set", "to", "true", "the", "length", "of", "values", "should", "be", "2", "." ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/slider/Slider.java#L428-L439
looly/hutool
hutool-setting/src/main/java/cn/hutool/setting/GroupedSet.java
GroupedSet.contains
public boolean contains(String group, String value, String... otherValues) { """ 是否在给定分组的集合中包含指定值<br> 如果给定分组对应集合不存在,则返回false @param group 分组名 @param value 测试的值 @param otherValues 其他值 @return 是否包含 """ if (ArrayUtil.isNotEmpty(otherValues)) { // 需要测试多个值的情况 final List<String> valueList = Arrays....
java
public boolean contains(String group, String value, String... otherValues) { if (ArrayUtil.isNotEmpty(otherValues)) { // 需要测试多个值的情况 final List<String> valueList = Arrays.asList(otherValues); valueList.add(value); return contains(group, valueList); } else { // 测试单个值 final LinkedHashSet<Stri...
[ "public", "boolean", "contains", "(", "String", "group", ",", "String", "value", ",", "String", "...", "otherValues", ")", "{", "if", "(", "ArrayUtil", ".", "isNotEmpty", "(", "otherValues", ")", ")", "{", "// 需要测试多个值的情况\r", "final", "List", "<", "String", ...
是否在给定分组的集合中包含指定值<br> 如果给定分组对应集合不存在,则返回false @param group 分组名 @param value 测试的值 @param otherValues 其他值 @return 是否包含
[ "是否在给定分组的集合中包含指定值<br", ">", "如果给定分组对应集合不存在,则返回false" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-setting/src/main/java/cn/hutool/setting/GroupedSet.java#L282-L297
h2oai/h2o-3
h2o-core/src/main/java/water/Value.java
Value.read_lock
boolean read_lock() { """ Bump the read lock, once per pending-GET or pending-Invalidate """ while( true ) { // Repeat, in case racing GETs are bumping the counter int old = _rwlock.get(); if( old == -1 ) return false; // Write-locked; no new replications. Read fails to read *this* value ...
java
boolean read_lock() { while( true ) { // Repeat, in case racing GETs are bumping the counter int old = _rwlock.get(); if( old == -1 ) return false; // Write-locked; no new replications. Read fails to read *this* value assert old >= 0; // Not negative if( RW_CAS(old,old+1,"r...
[ "boolean", "read_lock", "(", ")", "{", "while", "(", "true", ")", "{", "// Repeat, in case racing GETs are bumping the counter", "int", "old", "=", "_rwlock", ".", "get", "(", ")", ";", "if", "(", "old", "==", "-", "1", ")", "return", "false", ";", "// Wri...
Bump the read lock, once per pending-GET or pending-Invalidate
[ "Bump", "the", "read", "lock", "once", "per", "pending", "-", "GET", "or", "pending", "-", "Invalidate" ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/Value.java#L468-L475
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/url/URLHelper.java
URLHelper.getURLString
@Nullable public static String getURLString (@Nullable final String sPath, @Nullable final List <? extends URLParameter> aQueryParams, @Nullable final String sAnchor, @Nullable final Charset aParameterCharse...
java
@Nullable public static String getURLString (@Nullable final String sPath, @Nullable final List <? extends URLParameter> aQueryParams, @Nullable final String sAnchor, @Nullable final Charset aParameterCharse...
[ "@", "Nullable", "public", "static", "String", "getURLString", "(", "@", "Nullable", "final", "String", "sPath", ",", "@", "Nullable", "final", "List", "<", "?", "extends", "URLParameter", ">", "aQueryParams", ",", "@", "Nullable", "final", "String", "sAnchor"...
Get the final representation of the URL using the specified elements. @param sPath The main path. May be <code>null</code>. @param aQueryParams The list of parameters to be appended. May be <code>null</code>. @param sAnchor An optional anchor to be added. May be <code>null</code>. @param aParameterCharset If not <code...
[ "Get", "the", "final", "representation", "of", "the", "URL", "using", "the", "specified", "elements", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/url/URLHelper.java#L730-L739
openengsb/openengsb
components/util/src/main/java/org/openengsb/core/util/OsgiUtils.java
OsgiUtils.getFilterForLocation
public static Filter getFilterForLocation(String location, String context) throws IllegalArgumentException { """ returns a filter that matches services with the given location in both the given context and the root-context @throws IllegalArgumentException if the location contains special characters that prevent...
java
public static Filter getFilterForLocation(String location, String context) throws IllegalArgumentException { String filter = makeLocationFilterString(location, context); try { return FrameworkUtil.createFilter(filter); } catch (InvalidSyntaxException e) { throw new Illega...
[ "public", "static", "Filter", "getFilterForLocation", "(", "String", "location", ",", "String", "context", ")", "throws", "IllegalArgumentException", "{", "String", "filter", "=", "makeLocationFilterString", "(", "location", ",", "context", ")", ";", "try", "{", "...
returns a filter that matches services with the given location in both the given context and the root-context @throws IllegalArgumentException if the location contains special characters that prevent the filter from compiling
[ "returns", "a", "filter", "that", "matches", "services", "with", "the", "given", "location", "in", "both", "the", "given", "context", "and", "the", "root", "-", "context" ]
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/util/src/main/java/org/openengsb/core/util/OsgiUtils.java#L63-L70
netty/netty
codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java
WeightedFairQueueByteDistributor.distributeToChildren
private int distributeToChildren(int maxBytes, Writer writer, State state) throws Http2Exception { """ It is a pre-condition that {@code state.poll()} returns a non-{@code null} value. This is a result of the way the allocation algorithm is structured and can be explained in the following cases: <h3>For the recu...
java
private int distributeToChildren(int maxBytes, Writer writer, State state) throws Http2Exception { long oldTotalQueuedWeights = state.totalQueuedWeights; State childState = state.pollPseudoTimeQueue(); State nextChildState = state.peekPseudoTimeQueue(); childState.setDistributing(); ...
[ "private", "int", "distributeToChildren", "(", "int", "maxBytes", ",", "Writer", "writer", ",", "State", "state", ")", "throws", "Http2Exception", "{", "long", "oldTotalQueuedWeights", "=", "state", ".", "totalQueuedWeights", ";", "State", "childState", "=", "stat...
It is a pre-condition that {@code state.poll()} returns a non-{@code null} value. This is a result of the way the allocation algorithm is structured and can be explained in the following cases: <h3>For the recursive case</h3> If a stream has no children (in the allocation tree) than that node must be active or it will ...
[ "It", "is", "a", "pre", "-", "condition", "that", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-http2/src/main/java/io/netty/handler/codec/http2/WeightedFairQueueByteDistributor.java#L316-L343
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java
ApiOvhDedicatedserver.serviceName_statistics_chart_GET
public OvhChartReturn serviceName_statistics_chart_GET(String serviceName, OvhRtmChartPeriodEnum period, OvhRtmChartTypeEnum type) throws IOException { """ Retrieve RTM graph values REST: GET /dedicated/server/{serviceName}/statistics/chart @param type [required] RTM chart type @param period [required] chart ...
java
public OvhChartReturn serviceName_statistics_chart_GET(String serviceName, OvhRtmChartPeriodEnum period, OvhRtmChartTypeEnum type) throws IOException { String qPath = "/dedicated/server/{serviceName}/statistics/chart"; StringBuilder sb = path(qPath, serviceName); query(sb, "period", period); query(sb, "type", t...
[ "public", "OvhChartReturn", "serviceName_statistics_chart_GET", "(", "String", "serviceName", ",", "OvhRtmChartPeriodEnum", "period", ",", "OvhRtmChartTypeEnum", "type", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicated/server/{serviceName}/statistics/cha...
Retrieve RTM graph values REST: GET /dedicated/server/{serviceName}/statistics/chart @param type [required] RTM chart type @param period [required] chart period @param serviceName [required] The internal name of your dedicated server
[ "Retrieve", "RTM", "graph", "values" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedserver/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedserver.java#L1528-L1535
Stratio/stratio-cassandra
src/java/org/apache/cassandra/repair/StreamingRepairTask.java
StreamingRepairTask.onSuccess
public void onSuccess(StreamState state) { """ If we succeeded on both stream in and out, reply back to the initiator. """ logger.info(String.format("[repair #%s] streaming task succeed, returning response to %s", desc.sessionId, request.initiator)); MessagingService.instance().sendOneWay(new S...
java
public void onSuccess(StreamState state) { logger.info(String.format("[repair #%s] streaming task succeed, returning response to %s", desc.sessionId, request.initiator)); MessagingService.instance().sendOneWay(new SyncComplete(desc, request.src, request.dst, true).createMessage(), request.initiator)...
[ "public", "void", "onSuccess", "(", "StreamState", "state", ")", "{", "logger", ".", "info", "(", "String", ".", "format", "(", "\"[repair #%s] streaming task succeed, returning response to %s\"", ",", "desc", ".", "sessionId", ",", "request", ".", "initiator", ")",...
If we succeeded on both stream in and out, reply back to the initiator.
[ "If", "we", "succeeded", "on", "both", "stream", "in", "and", "out", "reply", "back", "to", "the", "initiator", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/repair/StreamingRepairTask.java#L94-L98
apache/incubator-heron
heron/packing/src/java/org/apache/heron/packing/utils/PackingUtils.java
PackingUtils.computeTotalResourceChange
public static Resource computeTotalResourceChange(TopologyAPI.Topology topology, Map<String, Integer> componentChanges, Resource defaultInstanceResources, ScalingDi...
java
public static Resource computeTotalResourceChange(TopologyAPI.Topology topology, Map<String, Integer> componentChanges, Resource defaultInstanceResources, ScalingDi...
[ "public", "static", "Resource", "computeTotalResourceChange", "(", "TopologyAPI", ".", "Topology", "topology", ",", "Map", "<", "String", ",", "Integer", ">", "componentChanges", ",", "Resource", "defaultInstanceResources", ",", "ScalingDirection", "scalingDirection", "...
Identifies the resources reclaimed by the components that will be scaled down @return Total resources reclaimed
[ "Identifies", "the", "resources", "reclaimed", "by", "the", "components", "that", "will", "be", "scaled", "down" ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/packing/src/java/org/apache/heron/packing/utils/PackingUtils.java#L128-L149
apache/incubator-heron
heron/spi/src/java/org/apache/heron/spi/packing/PackingPlan.java
PackingPlan.getMaxContainerResources
public Resource getMaxContainerResources() { """ Computes the maximum of all the resources required by the containers in the packing plan. If the PackingPlan has already been scheduled, the scheduled resources will be used over the required resources. @return maximum Resources found in all containers. """...
java
public Resource getMaxContainerResources() { double maxCpu = 0; ByteAmount maxRam = ByteAmount.ZERO; ByteAmount maxDisk = ByteAmount.ZERO; for (ContainerPlan containerPlan : getContainers()) { Resource containerResource = containerPlan.getScheduledResource().or(containerPlan.getRequiredR...
[ "public", "Resource", "getMaxContainerResources", "(", ")", "{", "double", "maxCpu", "=", "0", ";", "ByteAmount", "maxRam", "=", "ByteAmount", ".", "ZERO", ";", "ByteAmount", "maxDisk", "=", "ByteAmount", ".", "ZERO", ";", "for", "(", "ContainerPlan", "contain...
Computes the maximum of all the resources required by the containers in the packing plan. If the PackingPlan has already been scheduled, the scheduled resources will be used over the required resources. @return maximum Resources found in all containers.
[ "Computes", "the", "maximum", "of", "all", "the", "resources", "required", "by", "the", "containers", "in", "the", "packing", "plan", ".", "If", "the", "PackingPlan", "has", "already", "been", "scheduled", "the", "scheduled", "resources", "will", "be", "used",...
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/spi/src/java/org/apache/heron/spi/packing/PackingPlan.java#L53-L66
hibernate/hibernate-ogm
infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedDatastoreProvider.java
InfinispanEmbeddedDatastoreProvider.initializePersistenceStrategy
public void initializePersistenceStrategy(CacheMappingType cacheMappingType, Set<EntityKeyMetadata> entityTypes, Set<AssociationKeyMetadata> associationTypes, Set<IdSourceKeyMetadata> idSourceTypes, Iterable<Namespace> namespaces) { """ Initializes the persistence strategy to be used when accessing the datastore. ...
java
public void initializePersistenceStrategy(CacheMappingType cacheMappingType, Set<EntityKeyMetadata> entityTypes, Set<AssociationKeyMetadata> associationTypes, Set<IdSourceKeyMetadata> idSourceTypes, Iterable<Namespace> namespaces) { persistenceStrategy = PersistenceStrategy.getInstance( cacheMappingType, exte...
[ "public", "void", "initializePersistenceStrategy", "(", "CacheMappingType", "cacheMappingType", ",", "Set", "<", "EntityKeyMetadata", ">", "entityTypes", ",", "Set", "<", "AssociationKeyMetadata", ">", "associationTypes", ",", "Set", "<", "IdSourceKeyMetadata", ">", "id...
Initializes the persistence strategy to be used when accessing the datastore. In particular, all the required caches will be configured and initialized. @param cacheMappingType the {@link org.hibernate.ogm.datastore.keyvalue.options.CacheMappingType} to be used @param entityTypes meta-data of all the entity types regi...
[ "Initializes", "the", "persistence", "strategy", "to", "be", "used", "when", "accessing", "the", "datastore", ".", "In", "particular", "all", "the", "required", "caches", "will", "be", "configured", "and", "initialized", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/infinispan-embedded/src/main/java/org/hibernate/ogm/datastore/infinispan/impl/InfinispanEmbeddedDatastoreProvider.java#L108-L136
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSRepeated.java
JSRepeated.setBounds
public void setBounds(int minOccurs, int maxOccurs) { """ Set the bounds (default is {0, unbounded}). Use maxOccurs=-1 to indicate "unbounded." """ if (minOccurs < 0 || maxOccurs < -1) throw new IllegalArgumentException("Bounds cannot be negative"); else if (maxOccurs > 0 && minOccurs > maxOccu...
java
public void setBounds(int minOccurs, int maxOccurs) { if (minOccurs < 0 || maxOccurs < -1) throw new IllegalArgumentException("Bounds cannot be negative"); else if (maxOccurs > 0 && minOccurs > maxOccurs) throw new IllegalArgumentException("Minimum bounds less than maximum bounds"); limits = new...
[ "public", "void", "setBounds", "(", "int", "minOccurs", ",", "int", "maxOccurs", ")", "{", "if", "(", "minOccurs", "<", "0", "||", "maxOccurs", "<", "-", "1", ")", "throw", "new", "IllegalArgumentException", "(", "\"Bounds cannot be negative\"", ")", ";", "e...
Set the bounds (default is {0, unbounded}). Use maxOccurs=-1 to indicate "unbounded."
[ "Set", "the", "bounds", "(", "default", "is", "{", "0", "unbounded", "}", ")", ".", "Use", "maxOccurs", "=", "-", "1", "to", "indicate", "unbounded", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSRepeated.java#L71-L77
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/TokenCachingStrategy.java
TokenCachingStrategy.putSource
public static void putSource(Bundle bundle, AccessTokenSource value) { """ Puts the enum indicating the source of the token into a Bundle. @param bundle A Bundle in which the enum should be stored. @param value enum indicating the source of the token @throws NullPointerException if the passed in Bundle is...
java
public static void putSource(Bundle bundle, AccessTokenSource value) { Validate.notNull(bundle, "bundle"); bundle.putSerializable(TOKEN_SOURCE_KEY, value); }
[ "public", "static", "void", "putSource", "(", "Bundle", "bundle", ",", "AccessTokenSource", "value", ")", "{", "Validate", ".", "notNull", "(", "bundle", ",", "\"bundle\"", ")", ";", "bundle", ".", "putSerializable", "(", "TOKEN_SOURCE_KEY", ",", "value", ")",...
Puts the enum indicating the source of the token into a Bundle. @param bundle A Bundle in which the enum should be stored. @param value enum indicating the source of the token @throws NullPointerException if the passed in Bundle is null
[ "Puts", "the", "enum", "indicating", "the", "source", "of", "the", "token", "into", "a", "Bundle", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/TokenCachingStrategy.java#L328-L331
teatrove/teatrove
trove/src/main/java/org/teatrove/trove/util/plugin/PluginContext.java
PluginContext.addPlugin
public void addPlugin(Plugin plugin) { """ Adds a Plugin to the PluginContext. Plugins that want to make themselves available to other Plugins should add themselves to the PluginContext through this method. All PluginListeners will be notified of the new addition. @param plugin the Plugin to be added. ""...
java
public void addPlugin(Plugin plugin) { if (!mPluginMap.containsKey(plugin.getName())) { mPluginMap.put(plugin.getName(), plugin); PluginEvent event = new PluginEvent(this, plugin); firePluginAddedEvent(event); } }
[ "public", "void", "addPlugin", "(", "Plugin", "plugin", ")", "{", "if", "(", "!", "mPluginMap", ".", "containsKey", "(", "plugin", ".", "getName", "(", ")", ")", ")", "{", "mPluginMap", ".", "put", "(", "plugin", ".", "getName", "(", ")", ",", "plugi...
Adds a Plugin to the PluginContext. Plugins that want to make themselves available to other Plugins should add themselves to the PluginContext through this method. All PluginListeners will be notified of the new addition. @param plugin the Plugin to be added.
[ "Adds", "a", "Plugin", "to", "the", "PluginContext", ".", "Plugins", "that", "want", "to", "make", "themselves", "available", "to", "other", "Plugins", "should", "add", "themselves", "to", "the", "PluginContext", "through", "this", "method", ".", "All", "Plugi...
train
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/trove/src/main/java/org/teatrove/trove/util/plugin/PluginContext.java#L86-L92
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ClassUtils.java
ClassUtils.getMethod
public static Method getMethod(Class<?> type, String methodName, Class<?>... parameterTypes) { """ Gets a Method object representing the named method on the specified class. This method will recursively search up the class hierarchy of the specified class until the Object class is reached. If the named method i...
java
public static Method getMethod(Class<?> type, String methodName, Class<?>... parameterTypes) { try { return type.getDeclaredMethod(methodName, parameterTypes); } catch (NoSuchMethodException cause) { if (type.getSuperclass() != null) { return getMethod(type.getSuperclass(), methodName,...
[ "public", "static", "Method", "getMethod", "(", "Class", "<", "?", ">", "type", ",", "String", "methodName", ",", "Class", "<", "?", ">", "...", "parameterTypes", ")", "{", "try", "{", "return", "type", ".", "getDeclaredMethod", "(", "methodName", ",", "...
Gets a Method object representing the named method on the specified class. This method will recursively search up the class hierarchy of the specified class until the Object class is reached. If the named method is found then a Method object representing the class method is returned, otherwise a NoSuchMethodException...
[ "Gets", "a", "Method", "object", "representing", "the", "named", "method", "on", "the", "specified", "class", ".", "This", "method", "will", "recursively", "search", "up", "the", "class", "hierarchy", "of", "the", "specified", "class", "until", "the", "Object"...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ClassUtils.java#L373-L386
finmath/finmath-lib
src/main/java6/net/finmath/time/daycount/DayCountConventionFactory.java
DayCountConventionFactory.getDaycount
public static double getDaycount(LocalDate startDate, LocalDate endDate, String convention) { """ Return the number of days between startDate and endDate given the specific daycount convention. @param startDate The start date given as a {@link org.threeten.bp.LocalDate}. @param endDate The end date given as a...
java
public static double getDaycount(LocalDate startDate, LocalDate endDate, String convention) { DayCountConventionInterface daycountConvention = getDayCountConvention(convention); return daycountConvention.getDaycount(startDate, endDate); }
[ "public", "static", "double", "getDaycount", "(", "LocalDate", "startDate", ",", "LocalDate", "endDate", ",", "String", "convention", ")", "{", "DayCountConventionInterface", "daycountConvention", "=", "getDayCountConvention", "(", "convention", ")", ";", "return", "d...
Return the number of days between startDate and endDate given the specific daycount convention. @param startDate The start date given as a {@link org.threeten.bp.LocalDate}. @param endDate The end date given as a {@link org.threeten.bp.LocalDate}. @param convention A convention string. @return The number of days withi...
[ "Return", "the", "number", "of", "days", "between", "startDate", "and", "endDate", "given", "the", "specific", "daycount", "convention", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/time/daycount/DayCountConventionFactory.java#L76-L79
finmath/finmath-lib
src/main/java6/net/finmath/time/ScheduleGenerator.java
ScheduleGenerator.createScheduleFromConventions
public static ScheduleInterface createScheduleFromConventions( LocalDate referenceDate, LocalDate tradeDate, int spotOffsetDays, String startOffsetString, String maturityString, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, Businessda...
java
public static ScheduleInterface createScheduleFromConventions( LocalDate referenceDate, LocalDate tradeDate, int spotOffsetDays, String startOffsetString, String maturityString, String frequency, String daycountConvention, String shortPeriodConvention, String dateRollConvention, Businessda...
[ "public", "static", "ScheduleInterface", "createScheduleFromConventions", "(", "LocalDate", "referenceDate", ",", "LocalDate", "tradeDate", ",", "int", "spotOffsetDays", ",", "String", "startOffsetString", ",", "String", "maturityString", ",", "String", "frequency", ",", ...
Simple schedule generation where startDate and maturityDate are calculated based on tradeDate, spotOffsetDays, startOffsetString and maturityString. The schedule generation considers short periods. Date rolling is ignored. @param referenceDate The date which is used in the schedule to internally convert dates to doub...
[ "Simple", "schedule", "generation", "where", "startDate", "and", "maturityDate", "are", "calculated", "based", "on", "tradeDate", "spotOffsetDays", "startOffsetString", "and", "maturityString", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/time/ScheduleGenerator.java#L521-L541
UrielCh/ovh-java-sdk
ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java
ApiOvhSaascsp2.serviceName_usageStatistics_GET
public ArrayList<OvhStatistics> serviceName_usageStatistics_GET(String serviceName, OvhLicensePeriodEnum timePeriod) throws IOException { """ Get the usage statistics over the chose period REST: GET /saas/csp2/{serviceName}/usageStatistics @param timePeriod [required] The period to query @param serviceName [r...
java
public ArrayList<OvhStatistics> serviceName_usageStatistics_GET(String serviceName, OvhLicensePeriodEnum timePeriod) throws IOException { String qPath = "/saas/csp2/{serviceName}/usageStatistics"; StringBuilder sb = path(qPath, serviceName); query(sb, "timePeriod", timePeriod); String resp = exec(qPath, "GET", ...
[ "public", "ArrayList", "<", "OvhStatistics", ">", "serviceName_usageStatistics_GET", "(", "String", "serviceName", ",", "OvhLicensePeriodEnum", "timePeriod", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/saas/csp2/{serviceName}/usageStatistics\"", ";", "Str...
Get the usage statistics over the chose period REST: GET /saas/csp2/{serviceName}/usageStatistics @param timePeriod [required] The period to query @param serviceName [required] The unique identifier of your Office service API beta
[ "Get", "the", "usage", "statistics", "over", "the", "chose", "period" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-saascsp2/src/main/java/net/minidev/ovh/api/ApiOvhSaascsp2.java#L323-L329
amzn/ion-java
src/com/amazon/ion/impl/BlockedBuffer.java
BlockedBuffer.insertInCurrOnly
private int insertInCurrOnly(Object caller, int version, bbBlock curr, int pos, int len) { """ this handles insert when there's enough room in the current block """ assert mutation_in_progress(caller, version); // the space we need is available right in the block assert curr.unusedBloc...
java
private int insertInCurrOnly(Object caller, int version, bbBlock curr, int pos, int len) { assert mutation_in_progress(caller, version); // the space we need is available right in the block assert curr.unusedBlockCapacity() >= len; System.arraycopy(curr._buffer, curr.blockOffsetFromA...
[ "private", "int", "insertInCurrOnly", "(", "Object", "caller", ",", "int", "version", ",", "bbBlock", "curr", ",", "int", "pos", ",", "int", "len", ")", "{", "assert", "mutation_in_progress", "(", "caller", ",", "version", ")", ";", "// the space we need is av...
this handles insert when there's enough room in the current block
[ "this", "handles", "insert", "when", "there", "s", "enough", "room", "in", "the", "current", "block" ]
train
https://github.com/amzn/ion-java/blob/4ce1f0f58c6a5a8e42d0425ccdb36e38be3e2270/src/com/amazon/ion/impl/BlockedBuffer.java#L564-L575
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java
CloudMe.getApiRequestInvoker
private RequestInvoker<CResponse> getApiRequestInvoker( HttpRequestBase request, CPath path ) { """ An invoker that checks response content type = XML : to be used by all API requests @param request API request @return a request invoker specific for API requests """ return new RequestInvoker<CRespo...
java
private RequestInvoker<CResponse> getApiRequestInvoker( HttpRequestBase request, CPath path ) { return new RequestInvoker<CResponse>( new HttpRequestor( request, path, sessionManager ), API_RESPONSE_VALIDATOR ); }
[ "private", "RequestInvoker", "<", "CResponse", ">", "getApiRequestInvoker", "(", "HttpRequestBase", "request", ",", "CPath", "path", ")", "{", "return", "new", "RequestInvoker", "<", "CResponse", ">", "(", "new", "HttpRequestor", "(", "request", ",", "path", ","...
An invoker that checks response content type = XML : to be used by all API requests @param request API request @return a request invoker specific for API requests
[ "An", "invoker", "that", "checks", "response", "content", "type", "=", "XML", ":", "to", "be", "used", "by", "all", "API", "requests" ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/providers/cloudme/CloudMe.java#L117-L121
vkostyukov/la4j
src/main/java/org/la4j/Matrix.java
Matrix.swapRows
public void swapRows(int i, int j) { """ Swaps the specified rows of this matrix. @param i the row index @param j the row index """ if (i != j) { Vector ii = getRow(i); Vector jj = getRow(j); setRow(i, jj); setRow(j, ii); } }
java
public void swapRows(int i, int j) { if (i != j) { Vector ii = getRow(i); Vector jj = getRow(j); setRow(i, jj); setRow(j, ii); } }
[ "public", "void", "swapRows", "(", "int", "i", ",", "int", "j", ")", "{", "if", "(", "i", "!=", "j", ")", "{", "Vector", "ii", "=", "getRow", "(", "i", ")", ";", "Vector", "jj", "=", "getRow", "(", "j", ")", ";", "setRow", "(", "i", ",", "j...
Swaps the specified rows of this matrix. @param i the row index @param j the row index
[ "Swaps", "the", "specified", "rows", "of", "this", "matrix", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Matrix.java#L473-L481
box/box-java-sdk
src/main/java/com/box/sdk/BoxInvite.java
BoxInvite.inviteUserToEnterprise
public static Info inviteUserToEnterprise(BoxAPIConnection api, String userLogin, String enterpriseID) { """ Invite a user to an enterprise. @param api the API connection to use for the request. @param userLogin the login of the user to invite. @param enterpriseID the ID of the enterprise to invite the user to....
java
public static Info inviteUserToEnterprise(BoxAPIConnection api, String userLogin, String enterpriseID) { URL url = INVITE_CREATION_URL_TEMPLATE.build(api.getBaseURL()); BoxJSONRequest request = new BoxJSONRequest(api, url, "POST"); JsonObject body = new JsonObject(); JsonObject enterp...
[ "public", "static", "Info", "inviteUserToEnterprise", "(", "BoxAPIConnection", "api", ",", "String", "userLogin", ",", "String", "enterpriseID", ")", "{", "URL", "url", "=", "INVITE_CREATION_URL_TEMPLATE", ".", "build", "(", "api", ".", "getBaseURL", "(", ")", "...
Invite a user to an enterprise. @param api the API connection to use for the request. @param userLogin the login of the user to invite. @param enterpriseID the ID of the enterprise to invite the user to. @return the invite info.
[ "Invite", "a", "user", "to", "an", "enterprise", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxInvite.java#L61-L82
jboss/jboss-el-api_spec
src/main/java/javax/el/BeanNameELResolver.java
BeanNameELResolver.isReadOnly
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { """ If the base is null and the property is a name resolvable by the BeanNameResolver, attempts to determine if the bean is writable. <p>If the name is resolvable by the BeanNameResolver, the <code>propertyResolved</cod...
java
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { if (context == null) { throw new NullPointerException(); } if (base == null && property instanceof String) { if (beanNameResolver.isNameResolved((String) property)) { ...
[ "@", "Override", "public", "boolean", "isReadOnly", "(", "ELContext", "context", ",", "Object", "base", ",", "Object", "property", ")", "{", "if", "(", "context", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "if", "...
If the base is null and the property is a name resolvable by the BeanNameResolver, attempts to determine if the bean is writable. <p>If the name is resolvable by the BeanNameResolver, the <code>propertyResolved</code> property of the <code>ELContext</code> object must be set to <code>true</code> by the resolver, befor...
[ "If", "the", "base", "is", "null", "and", "the", "property", "is", "a", "name", "resolvable", "by", "the", "BeanNameResolver", "attempts", "to", "determine", "if", "the", "bean", "is", "writable", "." ]
train
https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/BeanNameELResolver.java#L219-L232
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/seo/CmsAliasList.java
CmsAliasList.validateAliases
public void validateAliases( final CmsUUID uuid, final Map<String, String> aliasPaths, final AsyncCallback<Map<String, String>> callback) { """ Validates aliases. @param uuid The structure id for which the aliases should be valid @param aliasPaths a map from id strings to alias paths...
java
public void validateAliases( final CmsUUID uuid, final Map<String, String> aliasPaths, final AsyncCallback<Map<String, String>> callback) { CmsRpcAction<Map<String, String>> action = new CmsRpcAction<Map<String, String>>() { /** * @see org.opencms.gwt.c...
[ "public", "void", "validateAliases", "(", "final", "CmsUUID", "uuid", ",", "final", "Map", "<", "String", ",", "String", ">", "aliasPaths", ",", "final", "AsyncCallback", "<", "Map", "<", "String", ",", "String", ">", ">", "callback", ")", "{", "CmsRpcActi...
Validates aliases. @param uuid The structure id for which the aliases should be valid @param aliasPaths a map from id strings to alias paths @param callback the callback which should be called with the validation results
[ "Validates", "aliases", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/seo/CmsAliasList.java#L423-L452
b3log/latke
latke-core/src/main/java/org/b3log/latke/repository/jdbc/JdbcRepository.java
JdbcRepository.buildAddSql
private String buildAddSql(final JSONObject jsonObject, final List<Object> paramlist, final StringBuilder sql) throws Exception { """ buildAddSql. @param jsonObject jsonObject @param paramlist paramlist @param sql sql @return id @throws Exception exception """ String ret = null; ...
java
private String buildAddSql(final JSONObject jsonObject, final List<Object> paramlist, final StringBuilder sql) throws Exception { String ret = null; if (!jsonObject.has(Keys.OBJECT_ID)) { if (!(KEY_GEN instanceof DBKeyGenerator)) { ret = (String) KEY_GEN.gen(); ...
[ "private", "String", "buildAddSql", "(", "final", "JSONObject", "jsonObject", ",", "final", "List", "<", "Object", ">", "paramlist", ",", "final", "StringBuilder", "sql", ")", "throws", "Exception", "{", "String", "ret", "=", "null", ";", "if", "(", "!", "...
buildAddSql. @param jsonObject jsonObject @param paramlist paramlist @param sql sql @return id @throws Exception exception
[ "buildAddSql", "." ]
train
https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/b3log/latke/repository/jdbc/JdbcRepository.java#L170-L185
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/PhoneNumberUtil.java
PhoneNumberUtil.formatRfc3966
public final String formatRfc3966(final String pphoneNumber, final String pcountryCode) { """ format phone number in RFC 3966 format. @param pphoneNumber phone number to format @param pcountryCode iso code of country @return formated phone number as String """ return this.formatRfc3966(this.parsePhone...
java
public final String formatRfc3966(final String pphoneNumber, final String pcountryCode) { return this.formatRfc3966(this.parsePhoneNumber(pphoneNumber, pcountryCode)); }
[ "public", "final", "String", "formatRfc3966", "(", "final", "String", "pphoneNumber", ",", "final", "String", "pcountryCode", ")", "{", "return", "this", ".", "formatRfc3966", "(", "this", ".", "parsePhoneNumber", "(", "pphoneNumber", ",", "pcountryCode", ")", "...
format phone number in RFC 3966 format. @param pphoneNumber phone number to format @param pcountryCode iso code of country @return formated phone number as String
[ "format", "phone", "number", "in", "RFC", "3966", "format", "." ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/PhoneNumberUtil.java#L1070-L1072
ben-manes/caffeine
jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/CaffeineConfiguration.java
CaffeineConfiguration.setExpiryFactory
@SuppressWarnings("unchecked") public void setExpiryFactory(Optional<Factory<? extends Expiry<K, V>>> factory) { """ Set the {@link Factory} for the {@link Expiry}. @param factory the {@link Expiry} {@link Factory} """ expiryFactory = (Factory<Expiry<K, V>>) factory.orElse(null); }
java
@SuppressWarnings("unchecked") public void setExpiryFactory(Optional<Factory<? extends Expiry<K, V>>> factory) { expiryFactory = (Factory<Expiry<K, V>>) factory.orElse(null); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "void", "setExpiryFactory", "(", "Optional", "<", "Factory", "<", "?", "extends", "Expiry", "<", "K", ",", "V", ">", ">", ">", "factory", ")", "{", "expiryFactory", "=", "(", "Factory", "<", "...
Set the {@link Factory} for the {@link Expiry}. @param factory the {@link Expiry} {@link Factory}
[ "Set", "the", "{", "@link", "Factory", "}", "for", "the", "{", "@link", "Expiry", "}", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/jcache/src/main/java/com/github/benmanes/caffeine/jcache/configuration/CaffeineConfiguration.java#L363-L366
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Popups.java
Popups.errorBelow
public static InfoPopup errorBelow (String message, Widget source) { """ Displays error feedback to the user in a non-offensive way. The error feedback is displayed near the supplied component and if the component supports focus, it is focused. """ return error(message, Position.BELOW, source); }
java
public static InfoPopup errorBelow (String message, Widget source) { return error(message, Position.BELOW, source); }
[ "public", "static", "InfoPopup", "errorBelow", "(", "String", "message", ",", "Widget", "source", ")", "{", "return", "error", "(", "message", ",", "Position", ".", "BELOW", ",", "source", ")", ";", "}" ]
Displays error feedback to the user in a non-offensive way. The error feedback is displayed near the supplied component and if the component supports focus, it is focused.
[ "Displays", "error", "feedback", "to", "the", "user", "in", "a", "non", "-", "offensive", "way", ".", "The", "error", "feedback", "is", "displayed", "near", "the", "supplied", "component", "and", "if", "the", "component", "supports", "focus", "it", "is", "...
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Popups.java#L136-L139
google/closure-templates
java/src/com/google/template/soy/shared/internal/Sanitizers.java
Sanitizers.escapeJsValue
public static String escapeJsValue(SoyValue value) { """ Converts the input to a JavaScript expression. The resulting expression can be a boolean, number, string literal, or {@code null}. """ // We surround values with spaces so that they can't be interpolated into identifiers // by accident. We coul...
java
public static String escapeJsValue(SoyValue value) { // We surround values with spaces so that they can't be interpolated into identifiers // by accident. We could use parentheses but those might be interpreted as a function call. if (NullData.INSTANCE == value || value == null) { // The JS counterpa...
[ "public", "static", "String", "escapeJsValue", "(", "SoyValue", "value", ")", "{", "// We surround values with spaces so that they can't be interpolated into identifiers", "// by accident. We could use parentheses but those might be interpreted as a function call.", "if", "(", "NullData",...
Converts the input to a JavaScript expression. The resulting expression can be a boolean, number, string literal, or {@code null}.
[ "Converts", "the", "input", "to", "a", "JavaScript", "expression", ".", "The", "resulting", "expression", "can", "be", "a", "boolean", "number", "string", "literal", "or", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/shared/internal/Sanitizers.java#L406-L431
zerodhatech/javakiteconnect
kiteconnect/src/com/zerodhatech/models/User.java
User.parseResponse
public User parseResponse(JSONObject response) throws JSONException { """ Parses user details response from server. @param response is the json response from server. @throws JSONException is thrown when there is error while parsing response. @return User is the parsed data. """ GsonBuilder gsonBuild...
java
public User parseResponse(JSONObject response) throws JSONException { GsonBuilder gsonBuilder = new GsonBuilder(); gsonBuilder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() { @Override public Date deserialize(JsonElement jsonElement, Type type, JsonDeserialization...
[ "public", "User", "parseResponse", "(", "JSONObject", "response", ")", "throws", "JSONException", "{", "GsonBuilder", "gsonBuilder", "=", "new", "GsonBuilder", "(", ")", ";", "gsonBuilder", ".", "registerTypeAdapter", "(", "Date", ".", "class", ",", "new", "Json...
Parses user details response from server. @param response is the json response from server. @throws JSONException is thrown when there is error while parsing response. @return User is the parsed data.
[ "Parses", "user", "details", "response", "from", "server", "." ]
train
https://github.com/zerodhatech/javakiteconnect/blob/4a3f15ff2c8a1b3b6ec61799f8bb047e4dfeb92d/kiteconnect/src/com/zerodhatech/models/User.java#L52-L70
xiancloud/xian
xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/OutputAccessor.java
OutputAccessor.from
public static OutputAccessor from(OutputAccessorPoolHolder poolHolder, ByteBuffer byteBuffer) { """ Create an {@link OutputAccessor} for the given {@link ByteBuffer}. Instances are pooled within the thread scope. @param poolHolder @param byteBuffer @return """ ByteBufferOutputAccessor accessor = ...
java
public static OutputAccessor from(OutputAccessorPoolHolder poolHolder, ByteBuffer byteBuffer) { ByteBufferOutputAccessor accessor = poolHolder.getByteBufferOutputAccessor(); accessor.byteBuffer = byteBuffer; return accessor; }
[ "public", "static", "OutputAccessor", "from", "(", "OutputAccessorPoolHolder", "poolHolder", ",", "ByteBuffer", "byteBuffer", ")", "{", "ByteBufferOutputAccessor", "accessor", "=", "poolHolder", ".", "getByteBufferOutputAccessor", "(", ")", ";", "accessor", ".", "byteBu...
Create an {@link OutputAccessor} for the given {@link ByteBuffer}. Instances are pooled within the thread scope. @param poolHolder @param byteBuffer @return
[ "Create", "an", "{", "@link", "OutputAccessor", "}", "for", "the", "given", "{", "@link", "ByteBuffer", "}", ".", "Instances", "are", "pooled", "within", "the", "thread", "scope", "." ]
train
https://github.com/xiancloud/xian/blob/1948e088545553d2745b2c86d8b5a64988bb850e/xian-log/xian-gelf-common/src/main/java/biz/paluch/logging/gelf/intern/OutputAccessor.java#L49-L55
OpenLiberty/open-liberty
dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBindingBuilder.java
WebServiceRefBindingBuilder.createWebServiceRefBindingFromResource
static InjectionBinding<WebServiceRef> createWebServiceRefBindingFromResource(Resource resource, ComponentNameSpaceConfiguration cnsConfig, Class<?> serviceClass, String jndiName) throws InjectionException { """ This method will be u...
java
static InjectionBinding<WebServiceRef> createWebServiceRefBindingFromResource(Resource resource, ComponentNameSpaceConfiguration cnsConfig, Class<?> serviceClass, String jndiName) throws InjectionException { InjectionBinding<WebSe...
[ "static", "InjectionBinding", "<", "WebServiceRef", ">", "createWebServiceRefBindingFromResource", "(", "Resource", "resource", ",", "ComponentNameSpaceConfiguration", "cnsConfig", ",", "Class", "<", "?", ">", "serviceClass", ",", "String", "jndiName", ")", "throws", "I...
This method will be used to create an instance of a WebServiceRefBinding object that holds metadata obtained from an @Resource annotation. The @Resource annotation in this case would have been indicating a JAX-WS service type injection.
[ "This", "method", "will", "be", "used", "to", "create", "an", "instance", "of", "a", "WebServiceRefBinding", "object", "that", "holds", "metadata", "obtained", "from", "an" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jaxws.common/src/com/ibm/ws/jaxws/client/injection/WebServiceRefBindingBuilder.java#L167-L183
facebookarchive/hadoop-20
src/core/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java
MetricsRecordImpl.setTag
public void setTag(String tagName, long tagValue) { """ Sets the named tag to the specified value. @param tagName name of the tag @param tagValue new value of the tag @throws MetricsException if the tagName conflicts with the configuration """ tagTable.put(tagName, Long.valueOf(tagValue)); }
java
public void setTag(String tagName, long tagValue) { tagTable.put(tagName, Long.valueOf(tagValue)); }
[ "public", "void", "setTag", "(", "String", "tagName", ",", "long", "tagValue", ")", "{", "tagTable", ".", "put", "(", "tagName", ",", "Long", ".", "valueOf", "(", "tagValue", ")", ")", ";", "}" ]
Sets the named tag to the specified value. @param tagName name of the tag @param tagValue new value of the tag @throws MetricsException if the tagName conflicts with the configuration
[ "Sets", "the", "named", "tag", "to", "the", "specified", "value", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/metrics/spi/MetricsRecordImpl.java#L90-L92
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_happly.java
DZcs_happly.cs_happly
public static boolean cs_happly(DZcs V, int i, double beta, DZcsa x) { """ Applies a Householder reflection to a dense vector, x = (I - beta*v*v')*x. @param V column-compressed matrix of Householder vectors @param i v = V(:,i), the ith column of V @param beta scalar beta @param x vector x of size m @re...
java
public static boolean cs_happly(DZcs V, int i, double beta, DZcsa x) { int p, Vp[], Vi[] ; DZcsa Vx = new DZcsa() ; double[] tau = cs_czero() ; if (!CS_CSC (V) || x == null) return (false) ; /* check inputs */ Vp = V.p ; Vi = V.i ; Vx.x = V.x ; for (p = Vp [i] ; p < Vp [i+1] ; p++) /* tau = v'*x */...
[ "public", "static", "boolean", "cs_happly", "(", "DZcs", "V", ",", "int", "i", ",", "double", "beta", ",", "DZcsa", "x", ")", "{", "int", "p", ",", "Vp", "[", "]", ",", "Vi", "[", "]", ";", "DZcsa", "Vx", "=", "new", "DZcsa", "(", ")", ";", "...
Applies a Householder reflection to a dense vector, x = (I - beta*v*v')*x. @param V column-compressed matrix of Householder vectors @param i v = V(:,i), the ith column of V @param beta scalar beta @param x vector x of size m @return true if successful, false on error
[ "Applies", "a", "Householder", "reflection", "to", "a", "dense", "vector", "x", "=", "(", "I", "-", "beta", "*", "v", "*", "v", ")", "*", "x", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tdcomplex/DZcs_happly.java#L60-L77
apache/incubator-druid
extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java
ParquetGroupConverter.convertField
@Nullable Object convertField(Group g, String fieldName) { """ Convert a parquet group field as though it were a map. Logical types of 'list' and 'map' will be transformed into java lists and maps respectively ({@link ParquetGroupConverter#convertLogicalList} and {@link ParquetGroupConverter#convertLogicalMap}...
java
@Nullable Object convertField(Group g, String fieldName) { return convertField(g, fieldName, binaryAsString); }
[ "@", "Nullable", "Object", "convertField", "(", "Group", "g", ",", "String", "fieldName", ")", "{", "return", "convertField", "(", "g", ",", "fieldName", ",", "binaryAsString", ")", ";", "}" ]
Convert a parquet group field as though it were a map. Logical types of 'list' and 'map' will be transformed into java lists and maps respectively ({@link ParquetGroupConverter#convertLogicalList} and {@link ParquetGroupConverter#convertLogicalMap}), repeated fields will also be translated to lists, and primitive types...
[ "Convert", "a", "parquet", "group", "field", "as", "though", "it", "were", "a", "map", ".", "Logical", "types", "of", "list", "and", "map", "will", "be", "transformed", "into", "java", "lists", "and", "maps", "respectively", "(", "{" ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java#L484-L488
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeInteger.java
RedBlackTreeInteger.containsInstance
@Override public boolean containsInstance(int value, T instance) { """ Returns true if the given key exists in the tree and its associated value is the given element. Comparison of the element is using the == operator. """ if (root == null) return false; if (value < first.value) return false;...
java
@Override public boolean containsInstance(int value, T instance) { if (root == null) return false; if (value < first.value) return false; if (value > last.value) return false; if (value == first.value && instance == first.element) return true; if (value == last.value && instance == la...
[ "@", "Override", "public", "boolean", "containsInstance", "(", "int", "value", ",", "T", "instance", ")", "{", "if", "(", "root", "==", "null", ")", "return", "false", ";", "if", "(", "value", "<", "first", ".", "value", ")", "return", "false", ";", ...
Returns true if the given key exists in the tree and its associated value is the given element. Comparison of the element is using the == operator.
[ "Returns", "true", "if", "the", "given", "key", "exists", "in", "the", "tree", "and", "its", "associated", "value", "is", "the", "given", "element", ".", "Comparison", "of", "the", "element", "is", "using", "the", "==", "operator", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/collections/sort/RedBlackTreeInteger.java#L247-L255
phax/ph-css
ph-css/src/main/java/com/helger/css/utils/CSSNumberHelper.java
CSSNumberHelper.getValueWithUnit
@Nullable public static CSSSimpleValueWithUnit getValueWithUnit (@Nullable final String sCSSValue, final boolean bWithPerc) { """ Convert the passed string value with unit into a structured {@link CSSSimpleValueWithUnit}. Example: parsing <code>5px</code> will result in the numeric value <code>5</code> and the...
java
@Nullable public static CSSSimpleValueWithUnit getValueWithUnit (@Nullable final String sCSSValue, final boolean bWithPerc) { String sRealValue = StringHelper.trim (sCSSValue); if (StringHelper.hasText (sRealValue)) { // Special case for 0! if (sRealValue.equals ("0")) return new CSS...
[ "@", "Nullable", "public", "static", "CSSSimpleValueWithUnit", "getValueWithUnit", "(", "@", "Nullable", "final", "String", "sCSSValue", ",", "final", "boolean", "bWithPerc", ")", "{", "String", "sRealValue", "=", "StringHelper", ".", "trim", "(", "sCSSValue", ")"...
Convert the passed string value with unit into a structured {@link CSSSimpleValueWithUnit}. Example: parsing <code>5px</code> will result in the numeric value <code>5</code> and the unit <code>ECSSUnit.PX</code>. The special value "0" is returned with the unit "px". @param sCSSValue The value to be parsed. May be <cod...
[ "Convert", "the", "passed", "string", "value", "with", "unit", "into", "a", "structured", "{", "@link", "CSSSimpleValueWithUnit", "}", ".", "Example", ":", "parsing", "<code", ">", "5px<", "/", "code", ">", "will", "result", "in", "the", "numeric", "value", ...
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/utils/CSSNumberHelper.java#L187-L209
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java
KeyGroupRangeAssignment.computeKeyGroupRangeForOperatorIndex
public static KeyGroupRange computeKeyGroupRangeForOperatorIndex( int maxParallelism, int parallelism, int operatorIndex) { """ Computes the range of key-groups that are assigned to a given operator under the given parallelism and maximum parallelism. IMPORTANT: maxParallelism must be <= Short.MAX_VALUE ...
java
public static KeyGroupRange computeKeyGroupRangeForOperatorIndex( int maxParallelism, int parallelism, int operatorIndex) { checkParallelismPreconditions(parallelism); checkParallelismPreconditions(maxParallelism); Preconditions.checkArgument(maxParallelism >= parallelism, "Maximum parallelism must not...
[ "public", "static", "KeyGroupRange", "computeKeyGroupRangeForOperatorIndex", "(", "int", "maxParallelism", ",", "int", "parallelism", ",", "int", "operatorIndex", ")", "{", "checkParallelismPreconditions", "(", "parallelism", ")", ";", "checkParallelismPreconditions", "(", ...
Computes the range of key-groups that are assigned to a given operator under the given parallelism and maximum parallelism. IMPORTANT: maxParallelism must be <= Short.MAX_VALUE to avoid rounding problems in this method. If we ever want to go beyond this boundary, this method must perform arithmetic on long values. @p...
[ "Computes", "the", "range", "of", "key", "-", "groups", "that", "are", "assigned", "to", "a", "given", "operator", "under", "the", "given", "parallelism", "and", "maximum", "parallelism", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/state/KeyGroupRangeAssignment.java#L85-L99
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/util/CompareUtil.java
CompareUtil.elementIsContainedInArray
public static <T> boolean elementIsContainedInArray(T element, T... values) { """ Checks if the element is contained within the list of values. @param element to check @param values to check in @param <T> the type of the element @return {@code true} if the element and values are not {@code null} and the valu...
java
public static <T> boolean elementIsContainedInArray(T element, T... values) { if (element != null && values != null) { return elementIsContainedInList(element, Arrays.asList(values)); } else { return false; } }
[ "public", "static", "<", "T", ">", "boolean", "elementIsContainedInArray", "(", "T", "element", ",", "T", "...", "values", ")", "{", "if", "(", "element", "!=", "null", "&&", "values", "!=", "null", ")", "{", "return", "elementIsContainedInList", "(", "ele...
Checks if the element is contained within the list of values. @param element to check @param values to check in @param <T> the type of the element @return {@code true} if the element and values are not {@code null} and the values contain the element, {@code false} otherwise
[ "Checks", "if", "the", "element", "is", "contained", "within", "the", "list", "of", "values", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/util/CompareUtil.java#L139-L146
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/SnapshotInfo.java
SnapshotInfo.newBuilder
public static Builder newBuilder(SnapshotId snapshotId, DiskId source) { """ Returns a builder for a {@code SnapshotInfo} object given the snapshot identity and a source disk identity. """ return new BuilderImpl().setSnapshotId(snapshotId).setSourceDisk(source); }
java
public static Builder newBuilder(SnapshotId snapshotId, DiskId source) { return new BuilderImpl().setSnapshotId(snapshotId).setSourceDisk(source); }
[ "public", "static", "Builder", "newBuilder", "(", "SnapshotId", "snapshotId", ",", "DiskId", "source", ")", "{", "return", "new", "BuilderImpl", "(", ")", ".", "setSnapshotId", "(", "snapshotId", ")", ".", "setSourceDisk", "(", "source", ")", ";", "}" ]
Returns a builder for a {@code SnapshotInfo} object given the snapshot identity and a source disk identity.
[ "Returns", "a", "builder", "for", "a", "{" ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/SnapshotInfo.java#L444-L446
jenkinsci/jenkins
core/src/main/java/hudson/ProxyConfiguration.java
ProxyConfiguration.jenkins48775workaround
private void jenkins48775workaround(Proxy proxy, URL url) { """ If the first URL we try to access with a HTTP proxy is HTTPS then the authentication cache will not have been pre-populated, so we try to access at least one HTTP URL before the very first HTTPS url. @param proxy @param url the actual URL being ope...
java
private void jenkins48775workaround(Proxy proxy, URL url) { if ("https".equals(url.getProtocol()) && !authCacheSeeded && proxy != Proxy.NO_PROXY) { HttpURLConnection preAuth = null; try { // We do not care if there is anything at this URL, all we care is that it is using ...
[ "private", "void", "jenkins48775workaround", "(", "Proxy", "proxy", ",", "URL", "url", ")", "{", "if", "(", "\"https\"", ".", "equals", "(", "url", ".", "getProtocol", "(", ")", ")", "&&", "!", "authCacheSeeded", "&&", "proxy", "!=", "Proxy", ".", "NO_PR...
If the first URL we try to access with a HTTP proxy is HTTPS then the authentication cache will not have been pre-populated, so we try to access at least one HTTP URL before the very first HTTPS url. @param proxy @param url the actual URL being opened.
[ "If", "the", "first", "URL", "we", "try", "to", "access", "with", "a", "HTTP", "proxy", "is", "HTTPS", "then", "the", "authentication", "cache", "will", "not", "have", "been", "pre", "-", "populated", "so", "we", "try", "to", "access", "at", "least", "...
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/ProxyConfiguration.java#L301-L321
rzwitserloot/lombok
src/core/lombok/eclipse/handlers/HandleSetter.java
HandleSetter.generateSetterForField
public void generateSetterForField(EclipseNode fieldNode, EclipseNode sourceNode, AccessLevel level, List<Annotation> onMethod, List<Annotation> onParam) { """ Generates a setter on the stated field. Used by {@link HandleData}. The difference between this call and the handle method is as follows: If there...
java
public void generateSetterForField(EclipseNode fieldNode, EclipseNode sourceNode, AccessLevel level, List<Annotation> onMethod, List<Annotation> onParam) { if (hasAnnotation(Setter.class, fieldNode)) { //The annotation will make it happen, so we can skip it. return; } createSetterForField(level, fieldNode, ...
[ "public", "void", "generateSetterForField", "(", "EclipseNode", "fieldNode", ",", "EclipseNode", "sourceNode", ",", "AccessLevel", "level", ",", "List", "<", "Annotation", ">", "onMethod", ",", "List", "<", "Annotation", ">", "onParam", ")", "{", "if", "(", "h...
Generates a setter on the stated field. Used by {@link HandleData}. The difference between this call and the handle method is as follows: If there is a {@code lombok.Setter} annotation on the field, it is used and the same rules apply (e.g. warning if the method already exists, stated access level applies). If not, ...
[ "Generates", "a", "setter", "on", "the", "stated", "field", "." ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/eclipse/handlers/HandleSetter.java#L111-L117
messagebird/java-rest-api
api/src/main/java/com/messagebird/MessageBirdClient.java
MessageBirdClient.requestLookupHlr
public LookupHlr requestLookupHlr(final BigInteger phoneNumber, final String reference) throws UnauthorizedException, GeneralException { """ Request a Lookup HLR (lookup) @param phoneNumber phone number is for request hlr @param reference reference for request hlr @return lookupHlr @throws UnauthorizedExce...
java
public LookupHlr requestLookupHlr(final BigInteger phoneNumber, final String reference) throws UnauthorizedException, GeneralException { if (phoneNumber == null) { throw new IllegalArgumentException("Phonenumber must be specified."); } if (reference == null) { throw new I...
[ "public", "LookupHlr", "requestLookupHlr", "(", "final", "BigInteger", "phoneNumber", ",", "final", "String", "reference", ")", "throws", "UnauthorizedException", ",", "GeneralException", "{", "if", "(", "phoneNumber", "==", "null", ")", "{", "throw", "new", "Ille...
Request a Lookup HLR (lookup) @param phoneNumber phone number is for request hlr @param reference reference for request hlr @return lookupHlr @throws UnauthorizedException if client is unauthorized @throws GeneralException general exception
[ "Request", "a", "Lookup", "HLR", "(", "lookup", ")" ]
train
https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L486-L497
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/ScrollPanePainter.java
ScrollPanePainter.paintBorderFocused
private void paintBorderFocused(Graphics2D g, int width, int height) { """ DOCUMENT ME! @param g DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME! """ Shape s; s = shapeGenerator.createRoundRectangle(0, 0, width - 1, height - 1, CornerSize.OUTER_FOCUS); g.s...
java
private void paintBorderFocused(Graphics2D g, int width, int height) { Shape s; s = shapeGenerator.createRoundRectangle(0, 0, width - 1, height - 1, CornerSize.OUTER_FOCUS); g.setPaint(getFocusPaint(s, FocusType.OUTER_FOCUS, false)); g.draw(s); s = shapeGenerator.createRoundR...
[ "private", "void", "paintBorderFocused", "(", "Graphics2D", "g", ",", "int", "width", ",", "int", "height", ")", "{", "Shape", "s", ";", "s", "=", "shapeGenerator", ".", "createRoundRectangle", "(", "0", ",", "0", ",", "width", "-", "1", ",", "height", ...
DOCUMENT ME! @param g DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ScrollPanePainter.java#L129-L144
overturetool/overture
core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java
SyntaxReader.report
protected void report(LocatedException error, VDMToken[] after, VDMToken[] upto) { """ Raise a syntax error and attempt to recover. The error is added to the errors list, and if this exceeds 100 errors the parser is aborted. The "after" and "upto" lists of token types are then used to control the advance of t...
java
protected void report(LocatedException error, VDMToken[] after, VDMToken[] upto) { VDMError vdmerror = new VDMError(error); errors.add(vdmerror); if (errors.size() >= MAX - 1) { errors.add(new VDMError(9, "Too many syntax errors", error.location)); throw new InternalException(9, "Too many syntax erro...
[ "protected", "void", "report", "(", "LocatedException", "error", ",", "VDMToken", "[", "]", "after", ",", "VDMToken", "[", "]", "upto", ")", "{", "VDMError", "vdmerror", "=", "new", "VDMError", "(", "error", ")", ";", "errors", ".", "add", "(", "vdmerror...
Raise a syntax error and attempt to recover. The error is added to the errors list, and if this exceeds 100 errors the parser is aborted. The "after" and "upto" lists of token types are then used to control the advance of the parser to skip beyond the error. Tokens are read until one occurs in either list or EOF is rea...
[ "Raise", "a", "syntax", "error", "and", "attempt", "to", "recover", ".", "The", "error", "is", "added", "to", "the", "errors", "list", "and", "if", "this", "exceeds", "100", "errors", "the", "parser", "is", "aborted", ".", "The", "after", "and", "upto", ...
train
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/parser/src/main/java/org/overture/parser/syntax/SyntaxReader.java#L543-L579
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsSitesWebserverThread.java
CmsSitesWebserverThread.generateWebserverConfigName
private String generateWebserverConfigName(CmsSiteMatcher macther, String separator) { """ Generates the web server configuration filename for the given site.<p> @param macther the site matcher of the site to get the web server configuration filename for @param separator for the generated file name @return ...
java
private String generateWebserverConfigName(CmsSiteMatcher macther, String separator) { int port = macther.getServerPort(); String serverName = macther.getServerName(); String portPart = ((port != PORT_HTTP) && (port != PORT_HTTPS)) ? separator + port : ""; return serverName + portPart; ...
[ "private", "String", "generateWebserverConfigName", "(", "CmsSiteMatcher", "macther", ",", "String", "separator", ")", "{", "int", "port", "=", "macther", ".", "getServerPort", "(", ")", ";", "String", "serverName", "=", "macther", ".", "getServerName", "(", ")"...
Generates the web server configuration filename for the given site.<p> @param macther the site matcher of the site to get the web server configuration filename for @param separator for the generated file name @return the web server configuration filename
[ "Generates", "the", "web", "server", "configuration", "filename", "for", "the", "given", "site", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsSitesWebserverThread.java#L319-L325
alkacon/opencms-core
src/org/opencms/ade/galleries/CmsGalleryService.java
CmsGalleryService.getInitialSettings
public static CmsGalleryDataBean getInitialSettings(HttpServletRequest request, CmsGalleryConfiguration config) throws CmsRpcException { """ Returns the initial gallery settings.<p> @param request the current request @param config the gallery configuration @return the initial gallery settings @throws...
java
public static CmsGalleryDataBean getInitialSettings(HttpServletRequest request, CmsGalleryConfiguration config) throws CmsRpcException { CmsGalleryService srv = new CmsGalleryService(); srv.setCms(CmsFlexController.getCmsObject(request)); srv.setRequest(request); CmsGalleryDataBean ...
[ "public", "static", "CmsGalleryDataBean", "getInitialSettings", "(", "HttpServletRequest", "request", ",", "CmsGalleryConfiguration", "config", ")", "throws", "CmsRpcException", "{", "CmsGalleryService", "srv", "=", "new", "CmsGalleryService", "(", ")", ";", "srv", ".",...
Returns the initial gallery settings.<p> @param request the current request @param config the gallery configuration @return the initial gallery settings @throws CmsRpcException if something goes wrong
[ "Returns", "the", "initial", "gallery", "settings", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/galleries/CmsGalleryService.java#L434-L447
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java
XScreenField.printData
public boolean printData(PrintWriter out, int iPrintOptions) { """ Print this field's data in XML format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception. """ boolean bFieldsFound = false; String strFieldName =...
java
public boolean printData(PrintWriter out, int iPrintOptions) { boolean bFieldsFound = false; String strFieldName = this.getScreenField().getSFieldParam(); String strFieldData = this.getScreenField().getSFieldValue(true, false); if ((this.getScreenField().getConverter() != null) ...
[ "public", "boolean", "printData", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "boolean", "bFieldsFound", "=", "false", ";", "String", "strFieldName", "=", "this", ".", "getScreenField", "(", ")", ".", "getSFieldParam", "(", ")", ";", "S...
Print this field's data in XML format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception.
[ "Print", "this", "field", "s", "data", "in", "XML", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XScreenField.java#L112-L124
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/DataSet.java
DataSet.squishToRange
@Override public void squishToRange(double min, double max) { """ Squeezes input data to a max and a min @param min the min value to occur in the dataset @param max the max value to ccur in the dataset """ for (int i = 0; i < getFeatures().length(); i++) { double curr = (double) get...
java
@Override public void squishToRange(double min, double max) { for (int i = 0; i < getFeatures().length(); i++) { double curr = (double) getFeatures().getScalar(i).element(); if (curr < min) getFeatures().put(i, Nd4j.scalar(min)); else if (curr > max) ...
[ "@", "Override", "public", "void", "squishToRange", "(", "double", "min", ",", "double", "max", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "getFeatures", "(", ")", ".", "length", "(", ")", ";", "i", "++", ")", "{", "double", "curr...
Squeezes input data to a max and a min @param min the min value to occur in the dataset @param max the max value to ccur in the dataset
[ "Squeezes", "input", "data", "to", "a", "max", "and", "a", "min" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/DataSet.java#L486-L495
eclipse/hawkbit
hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java
MaintenanceScheduleHelper.validateMaintenanceSchedule
public static void validateMaintenanceSchedule(final String cronSchedule, final String duration, final String timezone) { """ Check if the maintenance schedule definition is valid in terms of validity of cron expression, duration and availability of at least one valid maintenance window. Further a ma...
java
public static void validateMaintenanceSchedule(final String cronSchedule, final String duration, final String timezone) { if (allNotEmpty(cronSchedule, duration, timezone)) { validateCronSchedule(cronSchedule); validateDuration(duration); // check if there is a wi...
[ "public", "static", "void", "validateMaintenanceSchedule", "(", "final", "String", "cronSchedule", ",", "final", "String", "duration", ",", "final", "String", "timezone", ")", "{", "if", "(", "allNotEmpty", "(", "cronSchedule", ",", "duration", ",", "timezone", ...
Check if the maintenance schedule definition is valid in terms of validity of cron expression, duration and availability of at least one valid maintenance window. Further a maintenance schedule is valid if either all the parameters: schedule, duration and time zone are valid or are null. @param cronSchedule is a cron ...
[ "Check", "if", "the", "maintenance", "schedule", "definition", "is", "valid", "in", "terms", "of", "validity", "of", "cron", "expression", "duration", "and", "availability", "of", "at", "least", "one", "valid", "maintenance", "window", ".", "Further", "a", "ma...
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/repository/MaintenanceScheduleHelper.java#L119-L134
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirth.java
JRebirth.runIntoJATSync
public static void runIntoJATSync(final JRebirthRunnable runnable, final long... timeout) { """ Run the task into the JavaFX Application Thread [JAT] <b>Synchronously</b>. @param runnable the task to run @param timeout the optional timeout value after which the thread will be released (default is 1000 ms) ...
java
public static void runIntoJATSync(final JRebirthRunnable runnable, final long... timeout) { final SyncRunnable sync = new SyncRunnable(runnable); if (Platform.isFxApplicationThread()) { // We are into a JAT so just run it synchronously sync.run(); // Be careful in th...
[ "public", "static", "void", "runIntoJATSync", "(", "final", "JRebirthRunnable", "runnable", ",", "final", "long", "...", "timeout", ")", "{", "final", "SyncRunnable", "sync", "=", "new", "SyncRunnable", "(", "runnable", ")", ";", "if", "(", "Platform", ".", ...
Run the task into the JavaFX Application Thread [JAT] <b>Synchronously</b>. @param runnable the task to run @param timeout the optional timeout value after which the thread will be released (default is 1000 ms)
[ "Run", "the", "task", "into", "the", "JavaFX", "Application", "Thread", "[", "JAT", "]", "<b", ">", "Synchronously<", "/", "b", ">", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/concurrent/JRebirth.java#L196-L210
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QrUpdate_DDRM.java
QrUpdate_DDRM.deleteRow
public void deleteRow(DMatrixRMaj Q , DMatrixRMaj R , int rowIndex , boolean resizeR ) { """ <p> Adjusts the values of the Q and R matrices to take in account the effects of removing a row from the 'A' matrix at the specified location. This operation requires about 6mn + O(n) flops. </p> <p> The adjustment...
java
public void deleteRow(DMatrixRMaj Q , DMatrixRMaj R , int rowIndex , boolean resizeR ) { setQR(Q,R,0); if( m - 1 < n ) { throw new IllegalArgumentException("Removing any row would make the system under determined."); } m_m = m - 1; U_tran.reshape(m,m, false); ...
[ "public", "void", "deleteRow", "(", "DMatrixRMaj", "Q", ",", "DMatrixRMaj", "R", ",", "int", "rowIndex", ",", "boolean", "resizeR", ")", "{", "setQR", "(", "Q", ",", "R", ",", "0", ")", ";", "if", "(", "m", "-", "1", "<", "n", ")", "{", "throw", ...
<p> Adjusts the values of the Q and R matrices to take in account the effects of removing a row from the 'A' matrix at the specified location. This operation requires about 6mn + O(n) flops. </p> <p> The adjustment is done by computing a series of planar Givens rotations that make the removed row in Q equal to [1 0 ....
[ "<p", ">", "Adjusts", "the", "values", "of", "the", "Q", "and", "R", "matrices", "to", "take", "in", "account", "the", "effects", "of", "removing", "a", "row", "from", "the", "A", "matrix", "at", "the", "specified", "location", ".", "This", "operation", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/decomposition/qr/QrUpdate_DDRM.java#L187-L206
jenkinsci/jenkins
core/src/main/java/jenkins/model/Jenkins.java
Jenkins.doCheckDisplayName
public FormValidation doCheckDisplayName(@QueryParameter String displayName, @QueryParameter String jobName) { """ Checks to see if the candidate displayName collides with any existing display names or project names @param displayName The display name to test @param jobName The name of the job the u...
java
public FormValidation doCheckDisplayName(@QueryParameter String displayName, @QueryParameter String jobName) { displayName = displayName.trim(); if(LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Current job name is " + jobName); } if(!isNameUnique(disp...
[ "public", "FormValidation", "doCheckDisplayName", "(", "@", "QueryParameter", "String", "displayName", ",", "@", "QueryParameter", "String", "jobName", ")", "{", "displayName", "=", "displayName", ".", "trim", "(", ")", ";", "if", "(", "LOGGER", ".", "isLoggable...
Checks to see if the candidate displayName collides with any existing display names or project names @param displayName The display name to test @param jobName The name of the job the user is configuring
[ "Checks", "to", "see", "if", "the", "candidate", "displayName", "collides", "with", "any", "existing", "display", "names", "or", "project", "names" ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/model/Jenkins.java#L4825-L4842
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/config/Config.java
Config.setCardinalityEstimatorConfigs
public Config setCardinalityEstimatorConfigs(Map<String, CardinalityEstimatorConfig> cardinalityEstimatorConfigs) { """ Sets the map of cardinality estimator configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param cardinalityE...
java
public Config setCardinalityEstimatorConfigs(Map<String, CardinalityEstimatorConfig> cardinalityEstimatorConfigs) { this.cardinalityEstimatorConfigs.clear(); this.cardinalityEstimatorConfigs.putAll(cardinalityEstimatorConfigs); for (Entry<String, CardinalityEstimatorConfig> entry : cardinalityEs...
[ "public", "Config", "setCardinalityEstimatorConfigs", "(", "Map", "<", "String", ",", "CardinalityEstimatorConfig", ">", "cardinalityEstimatorConfigs", ")", "{", "this", ".", "cardinalityEstimatorConfigs", ".", "clear", "(", ")", ";", "this", ".", "cardinalityEstimatorC...
Sets the map of cardinality estimator configurations, mapped by config name. The config name may be a pattern with which the configuration will be obtained in the future. @param cardinalityEstimatorConfigs the cardinality estimator configuration map to set @return this config instance
[ "Sets", "the", "map", "of", "cardinality", "estimator", "configurations", "mapped", "by", "config", "name", ".", "The", "config", "name", "may", "be", "a", "pattern", "with", "which", "the", "configuration", "will", "be", "obtained", "in", "the", "future", "...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/config/Config.java#L2239-L2246
wcm-io/wcm-io-tooling
maven/plugins/i18n-maven-plugin/src/main/java/io/wcm/maven/plugins/i18n/TransformMojo.java
TransformMojo.getTargetFile
private File getTargetFile(File sourceFile, OutputFormat selectedOutputFormat) throws IOException { """ Get the JSON file for source file. @param sourceFile the source file @param selectedOutputFormat Output format @return File with name and path based on file parameter @throws IOException """ File so...
java
private File getTargetFile(File sourceFile, OutputFormat selectedOutputFormat) throws IOException { File sourceDirectory = getSourceDirectory(); String relativePath = StringUtils.substringAfter(sourceFile.getAbsolutePath(), sourceDirectory.getAbsolutePath()); String relativeTargetPath = FileUtils.removeExt...
[ "private", "File", "getTargetFile", "(", "File", "sourceFile", ",", "OutputFormat", "selectedOutputFormat", ")", "throws", "IOException", "{", "File", "sourceDirectory", "=", "getSourceDirectory", "(", ")", ";", "String", "relativePath", "=", "StringUtils", ".", "su...
Get the JSON file for source file. @param sourceFile the source file @param selectedOutputFormat Output format @return File with name and path based on file parameter @throws IOException
[ "Get", "the", "JSON", "file", "for", "source", "file", "." ]
train
https://github.com/wcm-io/wcm-io-tooling/blob/1abcd01dd3ad4cc248f03b431f929573d84fa9b4/maven/plugins/i18n-maven-plugin/src/main/java/io/wcm/maven/plugins/i18n/TransformMojo.java#L244-L261
jhunters/jprotobuf
src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java
ProtobufIDLProxy.generateSource
public static void generateSource(InputStream is, File sourceOutputPath) throws IOException { """ Generate source. @param is the is @param sourceOutputPath the source output path @throws IOException Signals that an I/O exception has occurred. """ ProtoFile protoFile = ProtoSchemaParser.parseUtf8(D...
java
public static void generateSource(InputStream is, File sourceOutputPath) throws IOException { ProtoFile protoFile = ProtoSchemaParser.parseUtf8(DEFAULT_FILE_NAME, is); List<CodeDependent> cds = new ArrayList<CodeDependent>(); doCreate(protoFile, true, false, null, true, sourceOutputPath, cds, ne...
[ "public", "static", "void", "generateSource", "(", "InputStream", "is", ",", "File", "sourceOutputPath", ")", "throws", "IOException", "{", "ProtoFile", "protoFile", "=", "ProtoSchemaParser", ".", "parseUtf8", "(", "DEFAULT_FILE_NAME", ",", "is", ")", ";", "List",...
Generate source. @param is the is @param sourceOutputPath the source output path @throws IOException Signals that an I/O exception has occurred.
[ "Generate", "source", "." ]
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/ProtobufIDLProxy.java#L1429-L1433
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Graphics.java
Graphics.copyArea
public void copyArea(Image target, int x, int y) { """ Copy an area of the rendered screen into an image. The width and height of the area are assumed to match that of the image @param target The target image @param x The x position to copy from @param y The y position to copy from """ int format =...
java
public void copyArea(Image target, int x, int y) { int format = target.getTexture().hasAlpha() ? SGL.GL_RGBA : SGL.GL_RGB; target.bind(); GL.glCopyTexImage2D(SGL.GL_TEXTURE_2D, 0, format, x, screenHeight - (y + target.getHeight()), target.getTexture() .getTextureWidth(), target.getTexture().getTextur...
[ "public", "void", "copyArea", "(", "Image", "target", ",", "int", "x", ",", "int", "y", ")", "{", "int", "format", "=", "target", ".", "getTexture", "(", ")", ".", "hasAlpha", "(", ")", "?", "SGL", ".", "GL_RGBA", ":", "SGL", ".", "GL_RGB", ";", ...
Copy an area of the rendered screen into an image. The width and height of the area are assumed to match that of the image @param target The target image @param x The x position to copy from @param y The y position to copy from
[ "Copy", "an", "area", "of", "the", "rendered", "screen", "into", "an", "image", ".", "The", "width", "and", "height", "of", "the", "area", "are", "assumed", "to", "match", "that", "of", "the", "image" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Graphics.java#L1511-L1518
aws/aws-sdk-java
aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/DeploymentCanarySettings.java
DeploymentCanarySettings.withStageVariableOverrides
public DeploymentCanarySettings withStageVariableOverrides(java.util.Map<String, String> stageVariableOverrides) { """ <p> A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variab...
java
public DeploymentCanarySettings withStageVariableOverrides(java.util.Map<String, String> stageVariableOverrides) { setStageVariableOverrides(stageVariableOverrides); return this; }
[ "public", "DeploymentCanarySettings", "withStageVariableOverrides", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "stageVariableOverrides", ")", "{", "setStageVariableOverrides", "(", "stageVariableOverrides", ")", ";", "return", "this", ";"...
<p> A stage variable overrides used for the canary release deployment. They can override existing stage variables or add new stage variables for the canary release deployment. These stage variables are represented as a string-to-string map between stage variable names and their values. </p> @param stageVariableOverrid...
[ "<p", ">", "A", "stage", "variable", "overrides", "used", "for", "the", "canary", "release", "deployment", ".", "They", "can", "override", "existing", "stage", "variables", "or", "add", "new", "stage", "variables", "for", "the", "canary", "release", "deploymen...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/DeploymentCanarySettings.java#L136-L139
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java
ValueEnforcer.notEmpty
public static <T extends CharSequence> T notEmpty (final T aValue, final String sName) { """ Check that the passed String is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the value (e.g. the parameter name) @retu...
java
public static <T extends CharSequence> T notEmpty (final T aValue, final String sName) { if (isEnabled ()) return notEmpty (aValue, () -> sName); return aValue; }
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "notEmpty", "(", "final", "T", "aValue", ",", "final", "String", "sName", ")", "{", "if", "(", "isEnabled", "(", ")", ")", "return", "notEmpty", "(", "aValue", ",", "(", ")", "->", "s...
Check that the passed String is neither <code>null</code> nor empty. @param <T> Type to be checked and returned @param aValue The String to check. @param sName The name of the value (e.g. the parameter name) @return The passed value. @throws IllegalArgumentException if the passed value is empty
[ "Check", "that", "the", "passed", "String", "is", "neither", "<code", ">", "null<", "/", "code", ">", "nor", "empty", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/ValueEnforcer.java#L348-L353
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/deregistration/DeregistrationPanel.java
DeregistrationPanel.newMotivation
protected LabeledTextAreaPanel<String, DeregistrationModelBean> newMotivation(final String id, final IModel<DeregistrationModelBean> model) { """ Factory method for creating the LabeledTextAreaPanel. This method is invoked in the constructor from the derived classes and can be overridden so users can provide th...
java
protected LabeledTextAreaPanel<String, DeregistrationModelBean> newMotivation(final String id, final IModel<DeregistrationModelBean> model) { final IModel<String> labelModel = ResourceModelFactory.newResourceModel( ResourceBundleKey.builder().key("sem.main.feedback.deregistration.user.label") .defaultValue(...
[ "protected", "LabeledTextAreaPanel", "<", "String", ",", "DeregistrationModelBean", ">", "newMotivation", "(", "final", "String", "id", ",", "final", "IModel", "<", "DeregistrationModelBean", ">", "model", ")", "{", "final", "IModel", "<", "String", ">", "labelMod...
Factory method for creating the LabeledTextAreaPanel. This method is invoked in the constructor from the derived classes and can be overridden so users can provide their own version of a Form. @param id the id @param model the model @return the form
[ "Factory", "method", "for", "creating", "the", "LabeledTextAreaPanel", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "the", "derived", "classes", "and", "can", "be", "overridden", "so", "users", "can", "provide", "their", "own", "...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/deregistration/DeregistrationPanel.java#L202-L235
jayantk/jklol
src/com/jayantkrish/jklol/inference/JunctionTree.java
JunctionTree.computeMarginal
private static Factor computeMarginal(CliqueTree cliqueTree, int factorNum, boolean useSumProduct) { """ Computes the marginal distribution over the {@code factorNum}'th factor in {@code cliqueTree}. If {@code useSumProduct} is {@code true}, this computes marginals; otherwise, it computes max-marginals. Requires...
java
private static Factor computeMarginal(CliqueTree cliqueTree, int factorNum, boolean useSumProduct) { Set<Integer> factorNumsToCombine = Sets.newHashSet(cliqueTree.getNeighboringFactors(factorNum)); factorNumsToCombine.removeAll(cliqueTree.getFactorsInMarginal(factorNum)); List<Factor> factorsToCombine = Li...
[ "private", "static", "Factor", "computeMarginal", "(", "CliqueTree", "cliqueTree", ",", "int", "factorNum", ",", "boolean", "useSumProduct", ")", "{", "Set", "<", "Integer", ">", "factorNumsToCombine", "=", "Sets", ".", "newHashSet", "(", "cliqueTree", ".", "get...
Computes the marginal distribution over the {@code factorNum}'th factor in {@code cliqueTree}. If {@code useSumProduct} is {@code true}, this computes marginals; otherwise, it computes max-marginals. Requires that {@code cliqueTree} contains all of the inbound messages to factor {@code factorNum}. @param cliqueTree @p...
[ "Computes", "the", "marginal", "distribution", "over", "the", "{", "@code", "factorNum", "}", "th", "factor", "in", "{", "@code", "cliqueTree", "}", ".", "If", "{", "@code", "useSumProduct", "}", "is", "{", "@code", "true", "}", "this", "computes", "margin...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/inference/JunctionTree.java#L259-L276
ical4j/ical4j
src/main/java/net/fortuna/ical4j/model/Dur.java
Dur.negate
public final Dur negate() { """ Provides a negation of this instance. @return a Dur instance that represents a negation of this instance """ final Dur negated = new Dur(days, hours, minutes, seconds); negated.weeks = weeks; negated.negative = !negative; return negated; }
java
public final Dur negate() { final Dur negated = new Dur(days, hours, minutes, seconds); negated.weeks = weeks; negated.negative = !negative; return negated; }
[ "public", "final", "Dur", "negate", "(", ")", "{", "final", "Dur", "negated", "=", "new", "Dur", "(", "days", ",", "hours", ",", "minutes", ",", "seconds", ")", ";", "negated", ".", "weeks", "=", "weeks", ";", "negated", ".", "negative", "=", "!", ...
Provides a negation of this instance. @return a Dur instance that represents a negation of this instance
[ "Provides", "a", "negation", "of", "this", "instance", "." ]
train
https://github.com/ical4j/ical4j/blob/7ac4bd1ce2bb2e0a2906fb69a56fbd2d9d974156/src/main/java/net/fortuna/ical4j/model/Dur.java#L309-L314
TestFX/Monocle
src/main/java/com/sun/glass/ui/monocle/IntSet.java
IntSet.difference
void difference(IntSet dest, IntSet compared) { """ Adds to the set "dest" values that in this set but are not in the set "compared". """ int i = 0; int j = 0; while (i < size && j < compared.size) { int a = elements[i]; int b = compared.elements[j]; ...
java
void difference(IntSet dest, IntSet compared) { int i = 0; int j = 0; while (i < size && j < compared.size) { int a = elements[i]; int b = compared.elements[j]; if (a < b) { // our set has a value that is not in "compared" dest....
[ "void", "difference", "(", "IntSet", "dest", ",", "IntSet", "compared", ")", "{", "int", "i", "=", "0", ";", "int", "j", "=", "0", ";", "while", "(", "i", "<", "size", "&&", "j", "<", "compared", ".", "size", ")", "{", "int", "a", "=", "element...
Adds to the set "dest" values that in this set but are not in the set "compared".
[ "Adds", "to", "the", "set", "dest", "values", "that", "in", "this", "set", "but", "are", "not", "in", "the", "set", "compared", "." ]
train
https://github.com/TestFX/Monocle/blob/267ccba8889cab244bf8c562dbaa0345a612874c/src/main/java/com/sun/glass/ui/monocle/IntSet.java#L86-L110
steveash/jopenfst
src/main/java/com/github/steveash/jopenfst/io/Convert.java
Convert.importFst
public static MutableFst importFst(String basename, Semiring semiring) { """ Imports an openfst text format. You pass in the base path that can be loaded off of the classpath For example if you had classpath location data with files data/mymodel.fst.txt, data/mymodel.input.syms, and data/mymodel.output.syms then...
java
public static MutableFst importFst(String basename, Semiring semiring) { Optional<MutableSymbolTable> maybeInputs = importSymbols(basename + INPUT_SYMS); Optional<MutableSymbolTable> maybeOutputs = importSymbols(basename + OUTPUT_SYMS); Optional<MutableSymbolTable> maybeStates = importSymbols(basename + ST...
[ "public", "static", "MutableFst", "importFst", "(", "String", "basename", ",", "Semiring", "semiring", ")", "{", "Optional", "<", "MutableSymbolTable", ">", "maybeInputs", "=", "importSymbols", "(", "basename", "+", "INPUT_SYMS", ")", ";", "Optional", "<", "Muta...
Imports an openfst text format. You pass in the base path that can be loaded off of the classpath For example if you had classpath location data with files data/mymodel.fst.txt, data/mymodel.input.syms, and data/mymodel.output.syms then you would pass "data/mymodel" to this method @param basename the files' base name ...
[ "Imports", "an", "openfst", "text", "format", ".", "You", "pass", "in", "the", "base", "path", "that", "can", "be", "loaded", "off", "of", "the", "classpath", "For", "example", "if", "you", "had", "classpath", "location", "data", "with", "files", "data", ...
train
https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/io/Convert.java#L317-L325
rynr/launchpad
src/main/java/org/rjung/util/launchpad/Launchpad.java
Launchpad.send
@Override public void send(MidiMessage message, long timeStamp) { """ Please do not use this method. It's the internal implementation to receive midi commands. """ if (this.launchpadReceiver != null && message instanceof ShortMessage) { ShortMessage sm = (ShortMessage) message; Pad pad = Pad....
java
@Override public void send(MidiMessage message, long timeStamp) { if (this.launchpadReceiver != null && message instanceof ShortMessage) { ShortMessage sm = (ShortMessage) message; Pad pad = Pad.findMidi(sm); if (pad != null) { this.launchpadReceiver.receive(pad); } } }
[ "@", "Override", "public", "void", "send", "(", "MidiMessage", "message", ",", "long", "timeStamp", ")", "{", "if", "(", "this", ".", "launchpadReceiver", "!=", "null", "&&", "message", "instanceof", "ShortMessage", ")", "{", "ShortMessage", "sm", "=", "(", ...
Please do not use this method. It's the internal implementation to receive midi commands.
[ "Please", "do", "not", "use", "this", "method", ".", "It", "s", "the", "internal", "implementation", "to", "receive", "midi", "commands", "." ]
train
https://github.com/rynr/launchpad/blob/15460e2df0aaafacfbcc529d0e8c68ee48b0980b/src/main/java/org/rjung/util/launchpad/Launchpad.java#L99-L108
i-net-software/jlessc
src/com/inet/lib/less/CssFormatter.java
CssFormatter.addMixin
void addMixin( Rule mixin, Map<String, Expression> parameters, Map<String, Expression> variables ) { """ Add the scope of a mixin to the stack. @param mixin the mixin @param parameters the calling parameters @param variables the variables of the mixin """ int idx = state.stackIdx++; Scope sc...
java
void addMixin( Rule mixin, Map<String, Expression> parameters, Map<String, Expression> variables ) { int idx = state.stackIdx++; Scope scope; if( state.stack.size() <= idx ) { scope = new Scope(); state.stack.add( scope ); } else { scope = state.stack....
[ "void", "addMixin", "(", "Rule", "mixin", ",", "Map", "<", "String", ",", "Expression", ">", "parameters", ",", "Map", "<", "String", ",", "Expression", ">", "variables", ")", "{", "int", "idx", "=", "state", ".", "stackIdx", "++", ";", "Scope", "scope...
Add the scope of a mixin to the stack. @param mixin the mixin @param parameters the calling parameters @param variables the variables of the mixin
[ "Add", "the", "scope", "of", "a", "mixin", "to", "the", "stack", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/CssFormatter.java#L407-L420
braintree/browser-switch-android
browser-switch/src/main/java/com/braintreepayments/browserswitch/ChromeCustomTabs.java
ChromeCustomTabs.addChromeCustomTabsExtras
public static Intent addChromeCustomTabsExtras(Context context, Intent intent) { """ Adds the required extras and flags to an {@link Intent} for using Chrome Custom Tabs. If Chrome Custom Tabs are not available or supported no change will be made to the {@link Intent}. @param context @param intent The {@link ...
java
public static Intent addChromeCustomTabsExtras(Context context, Intent intent) { if (SDK_INT >= JELLY_BEAN_MR2 && ChromeCustomTabs.isAvailable(context)) { Bundle extras = new Bundle(); extras.putBinder("android.support.customtabs.extra.SESSION", null); intent.putExtras(extras...
[ "public", "static", "Intent", "addChromeCustomTabsExtras", "(", "Context", "context", ",", "Intent", "intent", ")", "{", "if", "(", "SDK_INT", ">=", "JELLY_BEAN_MR2", "&&", "ChromeCustomTabs", ".", "isAvailable", "(", "context", ")", ")", "{", "Bundle", "extras"...
Adds the required extras and flags to an {@link Intent} for using Chrome Custom Tabs. If Chrome Custom Tabs are not available or supported no change will be made to the {@link Intent}. @param context @param intent The {@link Intent} to add the extras and flags to for Chrome Custom Tabs. @return The {@link Intent} supp...
[ "Adds", "the", "required", "extras", "and", "flags", "to", "an", "{", "@link", "Intent", "}", "for", "using", "Chrome", "Custom", "Tabs", ".", "If", "Chrome", "Custom", "Tabs", "are", "not", "available", "or", "supported", "no", "change", "will", "be", "...
train
https://github.com/braintree/browser-switch-android/blob/d830de21bc732b51e658e7296aad7b9037842a19/browser-switch/src/main/java/com/braintreepayments/browserswitch/ChromeCustomTabs.java#L55-L64
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java
AttributeRenderer.renderDiv
public void renderDiv(DivTag.State state, TreeElement elem) { """ This method will render the values assocated with the div around a treeItem. @param state @param elem """ ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_DIV]; assert(al != null); if (al.size() == 0) ...
java
public void renderDiv(DivTag.State state, TreeElement elem) { ArrayList al = _lists[TreeHtmlAttributeInfo.HTML_LOCATION_DIV]; assert(al != null); if (al.size() == 0) return; int cnt = al.size(); for (int i = 0; i < cnt; i++) { TreeHtmlAttributeInfo a...
[ "public", "void", "renderDiv", "(", "DivTag", ".", "State", "state", ",", "TreeElement", "elem", ")", "{", "ArrayList", "al", "=", "_lists", "[", "TreeHtmlAttributeInfo", ".", "HTML_LOCATION_DIV", "]", ";", "assert", "(", "al", "!=", "null", ")", ";", "if"...
This method will render the values assocated with the div around a treeItem. @param state @param elem
[ "This", "method", "will", "render", "the", "values", "assocated", "with", "the", "div", "around", "a", "treeItem", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/tree/AttributeRenderer.java#L208-L221
ben-manes/caffeine
simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/linked/FrequentlyUsedPolicy.java
FrequentlyUsedPolicy.policies
public static Set<Policy> policies(Config config, EvictionPolicy policy) { """ Returns all variations of this policy based on the configuration parameters. """ BasicSettings settings = new BasicSettings(config); return settings.admission().stream().map(admission -> new FrequentlyUsedPolicy(admiss...
java
public static Set<Policy> policies(Config config, EvictionPolicy policy) { BasicSettings settings = new BasicSettings(config); return settings.admission().stream().map(admission -> new FrequentlyUsedPolicy(admission, policy, config) ).collect(toSet()); }
[ "public", "static", "Set", "<", "Policy", ">", "policies", "(", "Config", "config", ",", "EvictionPolicy", "policy", ")", "{", "BasicSettings", "settings", "=", "new", "BasicSettings", "(", "config", ")", ";", "return", "settings", ".", "admission", "(", ")"...
Returns all variations of this policy based on the configuration parameters.
[ "Returns", "all", "variations", "of", "this", "policy", "based", "on", "the", "configuration", "parameters", "." ]
train
https://github.com/ben-manes/caffeine/blob/4cf6d6e6a18ea2e8088f166261e5949343b0f2eb/simulator/src/main/java/com/github/benmanes/caffeine/cache/simulator/policy/linked/FrequentlyUsedPolicy.java#L62-L67
HeidelTime/heideltime
src/de/unihd/dbs/uima/annotator/heideltime/HeidelTime.java
HeidelTime.checkPosConstraint
public boolean checkPosConstraint(Sentence s, String posConstraint, MatchResult m, JCas jcas) { """ Check whether the part of speech constraint defined in a rule is satisfied. @param s @param posConstraint @param m @param jcas @return """ Pattern paConstraint = Pattern.compile("group\\(([0-9]+)\\):(.*?)...
java
public boolean checkPosConstraint(Sentence s, String posConstraint, MatchResult m, JCas jcas) { Pattern paConstraint = Pattern.compile("group\\(([0-9]+)\\):(.*?):"); for (MatchResult mr : Toolbox.findMatches(paConstraint,posConstraint)) { int groupNumber = Integer.parseInt(mr.group(1)); int tokenBegin = s.get...
[ "public", "boolean", "checkPosConstraint", "(", "Sentence", "s", ",", "String", "posConstraint", ",", "MatchResult", "m", ",", "JCas", "jcas", ")", "{", "Pattern", "paConstraint", "=", "Pattern", ".", "compile", "(", "\"group\\\\(([0-9]+)\\\\):(.*?):\"", ")", ";",...
Check whether the part of speech constraint defined in a rule is satisfied. @param s @param posConstraint @param m @param jcas @return
[ "Check", "whether", "the", "part", "of", "speech", "constraint", "defined", "in", "a", "rule", "is", "satisfied", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/de/unihd/dbs/uima/annotator/heideltime/HeidelTime.java#L2297-L2312
finmath/finmath-lib
src/main/java/net/finmath/montecarlo/interestrate/products/Bond.java
Bond.getValue
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { """ This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value c...
java
@Override public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException { double productToModelTimeOffset = 0; try { if(referenceDate != null) { productToModelTimeOffset = FloatingpointDate.getFloatingPointDateFromDate(model.getReferenceDate(),...
[ "@", "Override", "public", "RandomVariable", "getValue", "(", "double", "evaluationTime", ",", "LIBORModelMonteCarloSimulationModel", "model", ")", "throws", "CalculationException", "{", "double", "productToModelTimeOffset", "=", "0", ";", "try", "{", "if", "(", "refe...
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime...
[ "This", "method", "returns", "the", "value", "random", "variable", "of", "the", "product", "within", "the", "specified", "model", "evaluated", "at", "a", "given", "evalutationTime", ".", "Note", ":", "For", "a", "lattice", "this", "is", "often", "the", "valu...
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/montecarlo/interestrate/products/Bond.java#L54-L80
pietermartin/sqlg
sqlg-core/src/main/java/org/umlg/sqlg/predicate/FullText.java
FullText.fullTextMatch
public static P<String> fullTextMatch(String configuration, boolean plain, final List<String> columns, final String value) { """ Build full text matching predicate (use in where(...)) Uses several columns for text search. This assumes PostgreSQL and concatenates column names with a space in between just like we ...
java
public static P<String> fullTextMatch(String configuration, boolean plain, final List<String> columns, final String value){ StringBuilder query=new StringBuilder(); int count=1; for (String column : columns) { query.append("\""+column+"\""); if (count++ < columns.size()) { query.appen...
[ "public", "static", "P", "<", "String", ">", "fullTextMatch", "(", "String", "configuration", ",", "boolean", "plain", ",", "final", "List", "<", "String", ">", "columns", ",", "final", "String", "value", ")", "{", "StringBuilder", "query", "=", "new", "St...
Build full text matching predicate (use in where(...)) Uses several columns for text search. This assumes PostgreSQL and concatenates column names with a space in between just like we would by default build the index @param configuration the full text configuration to use @param plain should we use plain mode? @param c...
[ "Build", "full", "text", "matching", "predicate", "(", "use", "in", "where", "(", "...", "))", "Uses", "several", "columns", "for", "text", "search", ".", "This", "assumes", "PostgreSQL", "and", "concatenates", "column", "names", "with", "a", "space", "in", ...
train
https://github.com/pietermartin/sqlg/blob/c1845a1b31328a5ffda646873b0369ee72af56a7/sqlg-core/src/main/java/org/umlg/sqlg/predicate/FullText.java#L79-L89
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.extractDependentLibs
protected Collection<File> extractDependentLibs(final File cachedir) throws IOException { """ Extract the dependent libs and return the extracted jar files @return the collection of extracted files """ final Attributes attributes = getMainAttributes(); if (null == attributes) { d...
java
protected Collection<File> extractDependentLibs(final File cachedir) throws IOException { final Attributes attributes = getMainAttributes(); if (null == attributes) { debug("no manifest attributes"); return null; } final ArrayList<File> files = new ArrayList<File...
[ "protected", "Collection", "<", "File", ">", "extractDependentLibs", "(", "final", "File", "cachedir", ")", "throws", "IOException", "{", "final", "Attributes", "attributes", "=", "getMainAttributes", "(", ")", ";", "if", "(", "null", "==", "attributes", ")", ...
Extract the dependent libs and return the extracted jar files @return the collection of extracted files
[ "Extract", "the", "dependent", "libs", "and", "return", "the", "extracted", "jar", "files" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L492-L519
mgm-tp/jfunk
jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ModuleArchiver.java
ModuleArchiver.startArchiving
void startArchiving() { """ Starts archiving of the specified module, if archiving is enabled. """ if (isArchivingDisabled()) { return; } String archiveName = configuration.get(JFunkConstants.ARCHIVE_FILE); if (StringUtils.isBlank(archiveName)) { archiveName = String.format(DIR_PATTERN, moduleMe...
java
void startArchiving() { if (isArchivingDisabled()) { return; } String archiveName = configuration.get(JFunkConstants.ARCHIVE_FILE); if (StringUtils.isBlank(archiveName)) { archiveName = String.format(DIR_PATTERN, moduleMetaData.getModuleName(), Thread.currentThread().getName(), FORMAT.format(moduleM...
[ "void", "startArchiving", "(", ")", "{", "if", "(", "isArchivingDisabled", "(", ")", ")", "{", "return", ";", "}", "String", "archiveName", "=", "configuration", ".", "get", "(", "JFunkConstants", ".", "ARCHIVE_FILE", ")", ";", "if", "(", "StringUtils", "....
Starts archiving of the specified module, if archiving is enabled.
[ "Starts", "archiving", "of", "the", "specified", "module", "if", "archiving", "is", "enabled", "." ]
train
https://github.com/mgm-tp/jfunk/blob/5b9fecac5778b988bb458085ded39ea9a4c7c2ae/jfunk-core/src/main/java/com/mgmtp/jfunk/core/scripting/ModuleArchiver.java#L122-L142
geomajas/geomajas-project-client-gwt
common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java
HtmlBuilder.tdClassHtmlContent
public static String tdClassHtmlContent(String clazz, String... content) { """ Build a HTML TableRow with given CSS class for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param clazz class for tr element @param content content string...
java
public static String tdClassHtmlContent(String clazz, String... content) { return tagClassHtmlContent(Html.Tag.TD, clazz, content); }
[ "public", "static", "String", "tdClassHtmlContent", "(", "String", "clazz", ",", "String", "...", "content", ")", "{", "return", "tagClassHtmlContent", "(", "Html", ".", "Tag", ".", "TD", ",", "clazz", ",", "content", ")", ";", "}" ]
Build a HTML TableRow with given CSS class for a string. Use this method if given content contains HTML snippets, prepared with {@link HtmlBuilder#htmlEncode(String)}. @param clazz class for tr element @param content content string @return HTML tr element as string
[ "Build", "a", "HTML", "TableRow", "with", "given", "CSS", "class", "for", "a", "string", ".", "Use", "this", "method", "if", "given", "content", "contains", "HTML", "snippets", "prepared", "with", "{", "@link", "HtmlBuilder#htmlEncode", "(", "String", ")", "...
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/common-gwt-smartgwt/src/main/java/org/geomajas/gwt/client/util/HtmlBuilder.java#L165-L167
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.offer_reference_GET
public OvhPublicOffer offer_reference_GET(String reference) throws IOException { """ Display specified offer REST: GET /dbaas/logs/offer/{reference} @param reference [required] Reference """ String qPath = "/dbaas/logs/offer/{reference}"; StringBuilder sb = path(qPath, reference); String resp = exec(...
java
public OvhPublicOffer offer_reference_GET(String reference) throws IOException { String qPath = "/dbaas/logs/offer/{reference}"; StringBuilder sb = path(qPath, reference); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPublicOffer.class); }
[ "public", "OvhPublicOffer", "offer_reference_GET", "(", "String", "reference", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/offer/{reference}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "reference", ")", ";", "String"...
Display specified offer REST: GET /dbaas/logs/offer/{reference} @param reference [required] Reference
[ "Display", "specified", "offer" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L77-L82
xdcrafts/flower
flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java
MapApi.getOptionalUnsafe
public static <T> Optional<T> getOptionalUnsafe(final Map map, final Class<T> clazz, final Object... path) { """ Get optional value by path. @param <T> optional value type @param clazz type of value @param map subject @param path nodes to walk in map @return value """ return getUnsafe(map, Optiona...
java
public static <T> Optional<T> getOptionalUnsafe(final Map map, final Class<T> clazz, final Object... path) { return getUnsafe(map, Optional.class, path); }
[ "public", "static", "<", "T", ">", "Optional", "<", "T", ">", "getOptionalUnsafe", "(", "final", "Map", "map", ",", "final", "Class", "<", "T", ">", "clazz", ",", "final", "Object", "...", "path", ")", "{", "return", "getUnsafe", "(", "map", ",", "Op...
Get optional value by path. @param <T> optional value type @param clazz type of value @param map subject @param path nodes to walk in map @return value
[ "Get", "optional", "value", "by", "path", "." ]
train
https://github.com/xdcrafts/flower/blob/96a8e49102fea434bd383a3c7852f0ee9545f999/flower-tools/src/main/java/com/github/xdcrafts/flower/tools/map/MapApi.java#L295-L297
JOML-CI/JOML
src/org/joml/Matrix3x2f.java
Matrix3x2f.translateLocal
public Matrix3x2f translateLocal(Vector2fc offset, Matrix3x2f dest) { """ Pre-multiply a translation to this matrix by translating by the given number of units in x and y and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation matrix, then...
java
public Matrix3x2f translateLocal(Vector2fc offset, Matrix3x2f dest) { return translateLocal(offset.x(), offset.y(), dest); }
[ "public", "Matrix3x2f", "translateLocal", "(", "Vector2fc", "offset", ",", "Matrix3x2f", "dest", ")", "{", "return", "translateLocal", "(", "offset", ".", "x", "(", ")", ",", "offset", ".", "y", "(", ")", ",", "dest", ")", ";", "}" ]
Pre-multiply a translation to this matrix by translating by the given number of units in x and y and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>T</code> the translation matrix, then the new matrix will be <code>T * M</code>. So when transforming a vector <code>v</...
[ "Pre", "-", "multiply", "a", "translation", "to", "this", "matrix", "by", "translating", "by", "the", "given", "number", "of", "units", "in", "x", "and", "y", "and", "store", "the", "result", "in", "<code", ">", "dest<", "/", "code", ">", ".", "<p", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3x2f.java#L660-L662
liferay/com-liferay-commerce
commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java
CommerceCurrencyPersistenceImpl.findByG_P
@Override public List<CommerceCurrency> findByG_P(long groupId, boolean primary, int start, int end) { """ Returns a range of all the commerce currencies where groupId = &#63; and primary = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code>...
java
@Override public List<CommerceCurrency> findByG_P(long groupId, boolean primary, int start, int end) { return findByG_P(groupId, primary, start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceCurrency", ">", "findByG_P", "(", "long", "groupId", ",", "boolean", "primary", ",", "int", "start", ",", "int", "end", ")", "{", "return", "findByG_P", "(", "groupId", ",", "primary", ",", "start", ",", "...
Returns a range of all the commerce currencies where groupId = &#63; and primary = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the fir...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "currencies", "where", "groupId", "=", "&#63", ";", "and", "primary", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-currency-service/src/main/java/com/liferay/commerce/currency/service/persistence/impl/CommerceCurrencyPersistenceImpl.java#L2288-L2292
structurizr/java
structurizr-core/src/com/structurizr/documentation/Arc42DocumentationTemplate.java
Arc42DocumentationTemplate.addRisksAndTechnicalDebtSection
public Section addRisksAndTechnicalDebtSection(SoftwareSystem softwareSystem, File... files) throws IOException { """ Adds a "Risks and Technical Debt" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @...
java
public Section addRisksAndTechnicalDebtSection(SoftwareSystem softwareSystem, File... files) throws IOException { return addSection(softwareSystem, "Risks and Technical Debt", files); }
[ "public", "Section", "addRisksAndTechnicalDebtSection", "(", "SoftwareSystem", "softwareSystem", ",", "File", "...", "files", ")", "throws", "IOException", "{", "return", "addSection", "(", "softwareSystem", ",", "\"Risks and Technical Debt\"", ",", "files", ")", ";", ...
Adds a "Risks and Technical Debt" section relating to a {@link SoftwareSystem} from one or more files. @param softwareSystem the {@link SoftwareSystem} the documentation content relates to @param files one or more File objects that point to the documentation content @return a documentat...
[ "Adds", "a", "Risks", "and", "Technical", "Debt", "section", "relating", "to", "a", "{", "@link", "SoftwareSystem", "}", "from", "one", "or", "more", "files", "." ]
train
https://github.com/structurizr/java/blob/4b204f077877a24bcac363f5ecf0e129a0f9f4c5/structurizr-core/src/com/structurizr/documentation/Arc42DocumentationTemplate.java#L289-L291
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/FilePathProcessor.java
FilePathProcessor.processPath
public static void processPath(File path, FileFilter filter, FileProcessor processor) { """ Apply a function to the files under a given directory and perhaps its subdirectories. If the path is a directory then only files within the directory (perhaps recursively) that satisfy the filter are processed. If the ...
java
public static void processPath(File path, FileFilter filter, FileProcessor processor) { if (path.isDirectory()) { // if path is a directory, look into it File[] directoryListing = path.listFiles(filter); if (directoryListing == null) { throw new IllegalArgumentException("Directory acc...
[ "public", "static", "void", "processPath", "(", "File", "path", ",", "FileFilter", "filter", ",", "FileProcessor", "processor", ")", "{", "if", "(", "path", ".", "isDirectory", "(", ")", ")", "{", "// if path is a directory, look into it\r", "File", "[", "]", ...
Apply a function to the files under a given directory and perhaps its subdirectories. If the path is a directory then only files within the directory (perhaps recursively) that satisfy the filter are processed. If the <code>path</code>is a file, then that file is processed regardless of whether it satisfies the filte...
[ "Apply", "a", "function", "to", "the", "files", "under", "a", "given", "directory", "and", "perhaps", "its", "subdirectories", ".", "If", "the", "path", "is", "a", "directory", "then", "only", "files", "within", "the", "directory", "(", "perhaps", "recursive...
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/FilePathProcessor.java#L71-L86
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSectionRenderer.java
WSectionRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WSection. @param component the WSection to paint. @param renderContext the RenderContext to paint to. """ WSection section = (WSection) component; XmlStringBuilder xml = renderCon...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WSection section = (WSection) component; XmlStringBuilder xml = renderContext.getWriter(); boolean renderChildren = isRenderContent(section); xml.appendTagOpen("ui:section"); xml.appendAttribute("id", comp...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WSection", "section", "=", "(", "WSection", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderConte...
Paints the given WSection. @param component the WSection to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WSection", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WSectionRenderer.java#L25-L69
marvinlabs/android-intents
library/src/main/java/com/marvinlabs/intents/MediaIntents.java
MediaIntents.newPlayMediaIntent
public static Intent newPlayMediaIntent(String url, String type) { """ Open the media player to play the given media @param url The URL of the media to play. @param type The mime type @return the intent """ return newPlayMediaIntent(Uri.parse(url), type); }
java
public static Intent newPlayMediaIntent(String url, String type) { return newPlayMediaIntent(Uri.parse(url), type); }
[ "public", "static", "Intent", "newPlayMediaIntent", "(", "String", "url", ",", "String", "type", ")", "{", "return", "newPlayMediaIntent", "(", "Uri", ".", "parse", "(", "url", ")", ",", "type", ")", ";", "}" ]
Open the media player to play the given media @param url The URL of the media to play. @param type The mime type @return the intent
[ "Open", "the", "media", "player", "to", "play", "the", "given", "media" ]
train
https://github.com/marvinlabs/android-intents/blob/33e79c825188b6a97601869522533cc825801f6e/library/src/main/java/com/marvinlabs/intents/MediaIntents.java#L149-L151
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setRef
@Override public void setRef(int parameterIndex, Ref x) throws SQLException { """ Sets the designated parameter to the given REF(<structured-type>) value. """ checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
java
@Override public void setRef(int parameterIndex, Ref x) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setRef", "(", "int", "parameterIndex", ",", "Ref", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given REF(<structured-type>) value.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "REF", "(", "<structured", "-", "type", ">", ")", "value", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L518-L523
dkpro/dkpro-argumentation
dkpro-argumentation-misc/src/main/java/org/dkpro/argumentation/misc/uima/JCasUtil2.java
JCasUtil2.updateEnd
public static void updateEnd(final Annotation annotation, final int end) { """ Sets the end value of the annotation, updating indexes appropriately @param annotation the annotation @param end the new end value """ annotation.removeFromIndexes(); annotation.setEnd(end); annota...
java
public static void updateEnd(final Annotation annotation, final int end) { annotation.removeFromIndexes(); annotation.setEnd(end); annotation.addToIndexes(); }
[ "public", "static", "void", "updateEnd", "(", "final", "Annotation", "annotation", ",", "final", "int", "end", ")", "{", "annotation", ".", "removeFromIndexes", "(", ")", ";", "annotation", ".", "setEnd", "(", "end", ")", ";", "annotation", ".", "addToIndexe...
Sets the end value of the annotation, updating indexes appropriately @param annotation the annotation @param end the new end value
[ "Sets", "the", "end", "value", "of", "the", "annotation", "updating", "indexes", "appropriately" ]
train
https://github.com/dkpro/dkpro-argumentation/blob/57ce6f5e73d8075b7088aeeebb107c85b3d4bbcb/dkpro-argumentation-misc/src/main/java/org/dkpro/argumentation/misc/uima/JCasUtil2.java#L287-L292
dwdyer/uncommons-maths
core/src/java/main/org/uncommons/maths/Maths.java
Maths.restrictRange
public static int restrictRange(int value, int min, int max) { """ If the specified value is not greater than or equal to the specified minimum and less than or equal to the specified maximum, adjust it so that it is. @param value The value to check. @param min The minimum permitted value. @param max The maxim...
java
public static int restrictRange(int value, int min, int max) { return Math.min((Math.max(value, min)), max); }
[ "public", "static", "int", "restrictRange", "(", "int", "value", ",", "int", "min", ",", "int", "max", ")", "{", "return", "Math", ".", "min", "(", "(", "Math", ".", "max", "(", "value", ",", "min", ")", ")", ",", "max", ")", ";", "}" ]
If the specified value is not greater than or equal to the specified minimum and less than or equal to the specified maximum, adjust it so that it is. @param value The value to check. @param min The minimum permitted value. @param max The maximum permitted value. @return {@code value} if it is between the specified lim...
[ "If", "the", "specified", "value", "is", "not", "greater", "than", "or", "equal", "to", "the", "specified", "minimum", "and", "less", "than", "or", "equal", "to", "the", "specified", "maximum", "adjust", "it", "so", "that", "it", "is", "." ]
train
https://github.com/dwdyer/uncommons-maths/blob/b7ba13aea70625bb7f37c856783a29e17e354964/core/src/java/main/org/uncommons/maths/Maths.java#L170-L173
Alexey1Gavrilov/ExpectIt
expectit-ant/src/main/java/net/sf/expectit/ant/ExpectExec.java
ExpectExec.prepareExec
@Override protected Execute prepareExec() { """ {@inheritDoc} <p/> Upon creation, configure the input and output streams for the {@link ExpectSupportImpl} instance and call the {@link ExpectSupportImpl#execute()} method. @return an execute instance """ Execute original = super.prepareExec();...
java
@Override protected Execute prepareExec() { Execute original = super.prepareExec(); Execute exec = new Execute(this, createWatchdog()) { @Override protected void waitFor(Process process) { try { expectSupport.execute(); ...
[ "@", "Override", "protected", "Execute", "prepareExec", "(", ")", "{", "Execute", "original", "=", "super", ".", "prepareExec", "(", ")", ";", "Execute", "exec", "=", "new", "Execute", "(", "this", ",", "createWatchdog", "(", ")", ")", "{", "@", "Overrid...
{@inheritDoc} <p/> Upon creation, configure the input and output streams for the {@link ExpectSupportImpl} instance and call the {@link ExpectSupportImpl#execute()} method. @return an execute instance
[ "{", "@inheritDoc", "}", "<p", "/", ">", "Upon", "creation", "configure", "the", "input", "and", "output", "streams", "for", "the", "{", "@link", "ExpectSupportImpl", "}", "instance", "and", "call", "the", "{", "@link", "ExpectSupportImpl#execute", "()", "}", ...
train
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-ant/src/main/java/net/sf/expectit/ant/ExpectExec.java#L104-L128
JodaOrg/joda-time
src/main/java/org/joda/time/Period.java
Period.plusDays
public Period plusDays(int days) { """ Returns a new period plus the specified number of days added. <p> This period instance is immutable and unaffected by this method call. @param days the amount of days to add, may be negative @return the new period plus the increased days @throws UnsupportedOperationEx...
java
public Period plusDays(int days) { if (days == 0) { return this; } int[] values = getValues(); // cloned getPeriodType().addIndexedField(this, PeriodType.DAY_INDEX, values, days); return new Period(values, getPeriodType()); }
[ "public", "Period", "plusDays", "(", "int", "days", ")", "{", "if", "(", "days", "==", "0", ")", "{", "return", "this", ";", "}", "int", "[", "]", "values", "=", "getValues", "(", ")", ";", "// cloned", "getPeriodType", "(", ")", ".", "addIndexedFiel...
Returns a new period plus the specified number of days added. <p> This period instance is immutable and unaffected by this method call. @param days the amount of days to add, may be negative @return the new period plus the increased days @throws UnsupportedOperationException if the field is not supported
[ "Returns", "a", "new", "period", "plus", "the", "specified", "number", "of", "days", "added", ".", "<p", ">", "This", "period", "instance", "is", "immutable", "and", "unaffected", "by", "this", "method", "call", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Period.java#L1123-L1130
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/PieChart.java
PieChart.onSizeChanged
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { """ This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0. @param w Current width of this view. @param h Current height of t...
java
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); mGraph.setPivot(mGraphBounds.centerX(), mGraphBounds.centerY()); onDataChanged(); }
[ "@", "Override", "protected", "void", "onSizeChanged", "(", "int", "w", ",", "int", "h", ",", "int", "oldw", ",", "int", "oldh", ")", "{", "super", ".", "onSizeChanged", "(", "w", ",", "h", ",", "oldw", ",", "oldh", ")", ";", "mGraph", ".", "setPiv...
This is called during layout when the size of this view has changed. If you were just added to the view hierarchy, you're called with the old values of 0. @param w Current width of this view. @param h Current height of this view. @param oldw Old width of this view. @param oldh Old height of this view.
[ "This", "is", "called", "during", "layout", "when", "the", "size", "of", "this", "view", "has", "changed", ".", "If", "you", "were", "just", "added", "to", "the", "view", "hierarchy", "you", "re", "called", "with", "the", "old", "values", "of", "0", "....
train
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/PieChart.java#L588-L595
spring-projects/spring-hateoas
src/main/java/org/springframework/hateoas/server/core/LinkBuilderSupport.java
LinkBuilderSupport.withFreshBuilder
protected <S> S withFreshBuilder(Function<UriComponentsBuilder, S> function) { """ Executes the given {@link Function} using a freshly cloned {@link UriComponentsBuilder}. @param function must not be {@literal null}. @return """ Assert.notNull(function, "Function must not be null!"); return function....
java
protected <S> S withFreshBuilder(Function<UriComponentsBuilder, S> function) { Assert.notNull(function, "Function must not be null!"); return function.apply(builder.cloneBuilder()); }
[ "protected", "<", "S", ">", "S", "withFreshBuilder", "(", "Function", "<", "UriComponentsBuilder", ",", "S", ">", "function", ")", "{", "Assert", ".", "notNull", "(", "function", ",", "\"Function must not be null!\"", ")", ";", "return", "function", ".", "appl...
Executes the given {@link Function} using a freshly cloned {@link UriComponentsBuilder}. @param function must not be {@literal null}. @return
[ "Executes", "the", "given", "{", "@link", "Function", "}", "using", "a", "freshly", "cloned", "{", "@link", "UriComponentsBuilder", "}", "." ]
train
https://github.com/spring-projects/spring-hateoas/blob/70ebff9309f086cd8d6a97daf67e0dc215c87d9c/src/main/java/org/springframework/hateoas/server/core/LinkBuilderSupport.java#L177-L182
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.isNumber
@ArgumentsChecked @Throws( { """ Ensures that a String argument is a number. This overload supports all subclasses of {@code Number}. The number is first converted to a BigInteger @param condition condition must be {@code true}^ so that the check will be performed @param value value which must be a number ...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalNumberArgumentException.class }) public static <T extends Number> void isNumber(final boolean condition, @Nonnull final String value, @Nonnull final Class<T> type) { if (condition) { Check.isNumber(value, type); } }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalNumberArgumentException", ".", "class", "}", ")", "public", "static", "<", "T", "extends", "Number", ">", "void", "isNumber", "(", "final", "boolean", "c...
Ensures that a String argument is a number. This overload supports all subclasses of {@code Number}. The number is first converted to a BigInteger @param condition condition must be {@code true}^ so that the check will be performed @param value value which must be a number @param type requested return value type, must...
[ "Ensures", "that", "a", "String", "argument", "is", "a", "number", ".", "This", "overload", "supports", "all", "subclasses", "of", "{", "@code", "Number", "}", ".", "The", "number", "is", "first", "converted", "to", "a", "BigInteger" ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L835-L841
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcResultSet.java
WSJdbcResultSet.updateRef
public void updateRef(int columnIndex, java.sql.Ref r) throws SQLException { """ <p>Updates the designated column with a java.sql.Ref value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow ...
java
public void updateRef(int columnIndex, java.sql.Ref r) throws SQLException { try { rsetImpl.updateRef(columnIndex, r); } catch (SQLException ex) { FFDCFilter.processException(ex, "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateRef", "4152", this); throw WSJdbcUtil.m...
[ "public", "void", "updateRef", "(", "int", "columnIndex", ",", "java", ".", "sql", ".", "Ref", "r", ")", "throws", "SQLException", "{", "try", "{", "rsetImpl", ".", "updateRef", "(", "columnIndex", ",", "r", ")", ";", "}", "catch", "(", "SQLException", ...
<p>Updates the designated column with a java.sql.Ref value. The updater methods are used to update column values in the current row or the insert row. The updater methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. </p> @param columnIndex the fir...
[ "<p", ">", "Updates", "the", "designated", "column", "with", "a", "java", ".", "sql", ".", "Ref", "value", ".", "The", "updater", "methods", "are", "used", "to", "update", "column", "values", "in", "the", "current", "row", "or", "the", "insert", "row", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcResultSet.java#L4709-L4719
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/SliderThumbPainter.java
SliderThumbPainter.paintDiscrete
private void paintDiscrete(Graphics2D g, JComponent c, int width, int height) { """ DOCUMENT ME! @param g DOCUMENT ME! @param c DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME! """ boolean useToolBarColors = isInToolBar(c); Shape s; if (isFoc...
java
private void paintDiscrete(Graphics2D g, JComponent c, int width, int height) { boolean useToolBarColors = isInToolBar(c); Shape s; if (isFocused) { s = shapeGenerator.createSliderThumbDiscrete(0, 0, width, height, CornerSize.SLIDER_OUTER_FOCUS); g.setPaint(get...
[ "private", "void", "paintDiscrete", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "boolean", "useToolBarColors", "=", "isInToolBar", "(", "c", ")", ";", "Shape", "s", ";", "if", "(", "isFocused", ")"...
DOCUMENT ME! @param g DOCUMENT ME! @param c DOCUMENT ME! @param width DOCUMENT ME! @param height DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/SliderThumbPainter.java#L164-L189
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/microdom/AbstractMicroNode.java
AbstractMicroNode.onInsertAtIndex
@OverrideOnDemand protected void onInsertAtIndex (@Nonnegative final int nIndex, @Nonnull final AbstractMicroNode aChildNode) { """ Callback that is invoked once a child is to be inserted at the specified index. @param nIndex The index where the node should be inserted. @param aChildNode The new child nod...
java
@OverrideOnDemand protected void onInsertAtIndex (@Nonnegative final int nIndex, @Nonnull final AbstractMicroNode aChildNode) { throw new MicroException ("Cannot insert children in class " + getClass ().getName ()); }
[ "@", "OverrideOnDemand", "protected", "void", "onInsertAtIndex", "(", "@", "Nonnegative", "final", "int", "nIndex", ",", "@", "Nonnull", "final", "AbstractMicroNode", "aChildNode", ")", "{", "throw", "new", "MicroException", "(", "\"Cannot insert children in class \"", ...
Callback that is invoked once a child is to be inserted at the specified index. @param nIndex The index where the node should be inserted. @param aChildNode The new child node to be inserted.
[ "Callback", "that", "is", "invoked", "once", "a", "child", "is", "to", "be", "inserted", "at", "the", "specified", "index", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/microdom/AbstractMicroNode.java#L104-L108
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClientImpl.java
MarkLogicClientImpl.performUpdateQuery
public void performUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) { """ executes UpdateQuery @param queryString @param bindings @param tx @param includeInferred @param baseURI """ SPARQLQueryDefinition qdef = sparqlManager...
java
public void performUpdateQuery(String queryString, SPARQLQueryBindingSet bindings, Transaction tx, boolean includeInferred, String baseURI) { SPARQLQueryDefinition qdef = sparqlManager.newQueryDefinition(queryString); if(notNull(baseURI) && !baseURI.isEmpty()){ qdef.setBaseUri(baseURI);} if (not...
[ "public", "void", "performUpdateQuery", "(", "String", "queryString", ",", "SPARQLQueryBindingSet", "bindings", ",", "Transaction", "tx", ",", "boolean", "includeInferred", ",", "String", "baseURI", ")", "{", "SPARQLQueryDefinition", "qdef", "=", "sparqlManager", ".",...
executes UpdateQuery @param queryString @param bindings @param tx @param includeInferred @param baseURI
[ "executes", "UpdateQuery" ]
train
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/client/MarkLogicClientImpl.java#L253-L261
undertow-io/undertow
core/src/main/java/io/undertow/util/HttpString.java
HttpString.tryFromString
public static HttpString tryFromString(String string) { """ Attempt to convert a {@code String} to an {@code HttpString}. If the string cannot be converted, {@code null} is returned. @param string the string to try @return the HTTP string, or {@code null} if the string is not in a compatible encoding """...
java
public static HttpString tryFromString(String string) { HttpString cached = Headers.fromCache(string); if(cached != null) { return cached; } final int len = string.length(); final byte[] bytes = new byte[len]; for (int i = 0; i < len; i++) { char c...
[ "public", "static", "HttpString", "tryFromString", "(", "String", "string", ")", "{", "HttpString", "cached", "=", "Headers", ".", "fromCache", "(", "string", ")", ";", "if", "(", "cached", "!=", "null", ")", "{", "return", "cached", ";", "}", "final", "...
Attempt to convert a {@code String} to an {@code HttpString}. If the string cannot be converted, {@code null} is returned. @param string the string to try @return the HTTP string, or {@code null} if the string is not in a compatible encoding
[ "Attempt", "to", "convert", "a", "{", "@code", "String", "}", "to", "an", "{", "@code", "HttpString", "}", ".", "If", "the", "string", "cannot", "be", "converted", "{", "@code", "null", "}", "is", "returned", "." ]
train
https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/util/HttpString.java#L149-L164
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getDeletedKey
public DeletedKeyBundle getDeletedKey(String vaultBaseUrl, String keyName) { """ Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault...
java
public DeletedKeyBundle getDeletedKey(String vaultBaseUrl, String keyName) { return getDeletedKeyWithServiceResponseAsync(vaultBaseUrl, keyName).toBlocking().single().body(); }
[ "public", "DeletedKeyBundle", "getDeletedKey", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ")", "{", "return", "getDeletedKeyWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "keyName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", "."...
Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission. @param vaultBaseUrl The vault name,...
[ "Gets", "the", "public", "part", "of", "a", "deleted", "key", ".", "The", "Get", "Deleted", "Key", "operation", "is", "applicable", "for", "soft", "-", "delete", "enabled", "vaults", ".", "While", "the", "operation", "can", "be", "invoked", "on", "any", ...
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#L3058-L3060