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
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java
FirewallClient.insertFirewall
@BetaApi public final Operation insertFirewall(String project, Firewall firewallResource) { """ Creates a firewall rule in the specified project using the data included in the request. <p>Sample code: <pre><code> try (FirewallClient firewallClient = FirewallClient.create()) { ProjectName project = Projec...
java
@BetaApi public final Operation insertFirewall(String project, Firewall firewallResource) { InsertFirewallHttpRequest request = InsertFirewallHttpRequest.newBuilder() .setProject(project) .setFirewallResource(firewallResource) .build(); return insertFirewall(reques...
[ "@", "BetaApi", "public", "final", "Operation", "insertFirewall", "(", "String", "project", ",", "Firewall", "firewallResource", ")", "{", "InsertFirewallHttpRequest", "request", "=", "InsertFirewallHttpRequest", ".", "newBuilder", "(", ")", ".", "setProject", "(", ...
Creates a firewall rule in the specified project using the data included in the request. <p>Sample code: <pre><code> try (FirewallClient firewallClient = FirewallClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); Firewall firewallResource = Firewall.newBuilder().build(); Operation response = firewa...
[ "Creates", "a", "firewall", "rule", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/FirewallClient.java#L395-L404
otto-de/edison-microservice
edison-mongo/src/main/java/de/otto/edison/mongo/AbstractMongoRepository.java
AbstractMongoRepository.updateIfMatch
public UpdateIfMatchResult updateIfMatch(final V value, final String eTag) { """ Updates the document if the document's ETAG is matching the given etag (conditional put). <p> Using this method requires that the document contains an "etag" field that is updated if the document is changed. </p> @param value t...
java
public UpdateIfMatchResult updateIfMatch(final V value, final String eTag) { return updateIfMatch(value, eTag, mongoProperties.getDefaultWriteTimeout(), TimeUnit.MILLISECONDS); }
[ "public", "UpdateIfMatchResult", "updateIfMatch", "(", "final", "V", "value", ",", "final", "String", "eTag", ")", "{", "return", "updateIfMatch", "(", "value", ",", "eTag", ",", "mongoProperties", ".", "getDefaultWriteTimeout", "(", ")", ",", "TimeUnit", ".", ...
Updates the document if the document's ETAG is matching the given etag (conditional put). <p> Using this method requires that the document contains an "etag" field that is updated if the document is changed. </p> @param value the new value @param eTag the etag used for conditional update @return {@link UpdateIfMatchR...
[ "Updates", "the", "document", "if", "the", "document", "s", "ETAG", "is", "matching", "the", "given", "etag", "(", "conditional", "put", ")", ".", "<p", ">", "Using", "this", "method", "requires", "that", "the", "document", "contains", "an", "etag", "field...
train
https://github.com/otto-de/edison-microservice/blob/89ecf0a0dee40977f004370b0b474a36c699e8a2/edison-mongo/src/main/java/de/otto/edison/mongo/AbstractMongoRepository.java#L230-L232
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java
AppServicePlansInner.updateVnetRouteAsync
public Observable<VnetRouteInner> updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { """ Create or update a Virtual Network route in an App Service plan. Create or update a Virtual Network route in an App Service plan. @param resourceGroupName...
java
public Observable<VnetRouteInner> updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { return updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).map(new Func1<ServiceResponse<VnetRouteInner>, VnetRouteInn...
[ "public", "Observable", "<", "VnetRouteInner", ">", "updateVnetRouteAsync", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "vnetName", ",", "String", "routeName", ",", "VnetRouteInner", "route", ")", "{", "return", "updateVnetRouteWithServic...
Create or update a Virtual Network route in an App Service plan. Create or update a Virtual Network route in an App Service plan. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service plan. @param vnetName Name of the Virtual Network. @param routeName Na...
[ "Create", "or", "update", "a", "Virtual", "Network", "route", "in", "an", "App", "Service", "plan", ".", "Create", "or", "update", "a", "Virtual", "Network", "route", "in", "an", "App", "Service", "plan", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L3844-L3851
chhh/MSFTBX
MSFileToolbox/src/main/java/umich/ms/datatypes/scancollection/impl/ScanCollectionDefault.java
ScanCollectionDefault.getNextScanAtMsLevel
@Override public IScan getNextScanAtMsLevel(int scanNum, int msLevel) { """ Finds the next scan at the same MS level, as the scan with scanNum. If the scan number provided is not in the map, this method will find the next existing one. @param scanNum Scan number @param msLevel MS Level at which to search fo...
java
@Override public IScan getNextScanAtMsLevel(int scanNum, int msLevel) { TreeMap<Integer, IScan> msLevelMap = getMapMsLevel2index().get(msLevel).getNum2scan(); if (msLevelMap == null) { return null; } Map.Entry<Integer, IScan> entry = msLevelMap.ceilingEntry(scanNum + 1); if (entry != null) {...
[ "@", "Override", "public", "IScan", "getNextScanAtMsLevel", "(", "int", "scanNum", ",", "int", "msLevel", ")", "{", "TreeMap", "<", "Integer", ",", "IScan", ">", "msLevelMap", "=", "getMapMsLevel2index", "(", ")", ".", "get", "(", "msLevel", ")", ".", "get...
Finds the next scan at the same MS level, as the scan with scanNum. If the scan number provided is not in the map, this method will find the next existing one. @param scanNum Scan number @param msLevel MS Level at which to search for that scan number. That MS level must be present in the collection, otherwise an NPE i...
[ "Finds", "the", "next", "scan", "at", "the", "same", "MS", "level", "as", "the", "scan", "with", "scanNum", ".", "If", "the", "scan", "number", "provided", "is", "not", "in", "the", "map", "this", "method", "will", "find", "the", "next", "existing", "o...
train
https://github.com/chhh/MSFTBX/blob/e53ae6be982e2de3123292be7d5297715bec70bb/MSFileToolbox/src/main/java/umich/ms/datatypes/scancollection/impl/ScanCollectionDefault.java#L624-L635
googleads/googleads-java-lib
modules/ads_lib/src/main/java/com/google/api/ads/common/lib/factory/AdsServiceClientFactory.java
AdsServiceClientFactory.getServiceClient
public synchronized <T> T getServiceClient(S adsSession, Class<T> interfaceClass) throws ServiceException { """ Gets a client given a session and the class of the desired stub interface. @param <T> the service type @param adsSession the session associated with the desired client @param interfaceClass t...
java
public synchronized <T> T getServiceClient(S adsSession, Class<T> interfaceClass) throws ServiceException { adsServiceFactoryHelper.checkServiceClientPreconditions(adsSession, interfaceClass); String version = adsServiceFactoryHelper.determineVersion(interfaceClass); D adsServiceDescriptor = a...
[ "public", "synchronized", "<", "T", ">", "T", "getServiceClient", "(", "S", "adsSession", ",", "Class", "<", "T", ">", "interfaceClass", ")", "throws", "ServiceException", "{", "adsServiceFactoryHelper", ".", "checkServiceClientPreconditions", "(", "adsSession", ","...
Gets a client given a session and the class of the desired stub interface. @param <T> the service type @param adsSession the session associated with the desired client @param interfaceClass the class type of the desired client @return a client for the specified ads service @throws ServiceException if the service clien...
[ "Gets", "a", "client", "given", "a", "session", "and", "the", "class", "of", "the", "desired", "stub", "interface", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/modules/ads_lib/src/main/java/com/google/api/ads/common/lib/factory/AdsServiceClientFactory.java#L69-L78
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/MetricFilterWithInteralReducerTransform.java
MetricFilterWithInteralReducerTransform.sortByValue
public static Map<Metric, String> sortByValue(Map<Metric, String> map, final String reducerType) { """ Sorts a metric. @param map The metrics to sort. @param reducerType Sort key / reducer to use @return The sorted metrics. """ List<Map.Entry<Metric, String>> list = new LinkedList<>(map.entrySet())...
java
public static Map<Metric, String> sortByValue(Map<Metric, String> map, final String reducerType) { List<Map.Entry<Metric, String>> list = new LinkedList<>(map.entrySet()); Collections.sort(list, new Comparator<Map.Entry<Metric, String>>() { @Override public int compare(Map.Entry<Metric, String> o1, Map.Entr...
[ "public", "static", "Map", "<", "Metric", ",", "String", ">", "sortByValue", "(", "Map", "<", "Metric", ",", "String", ">", "map", ",", "final", "String", "reducerType", ")", "{", "List", "<", "Map", ".", "Entry", "<", "Metric", ",", "String", ">", "...
Sorts a metric. @param map The metrics to sort. @param reducerType Sort key / reducer to use @return The sorted metrics.
[ "Sorts", "a", "metric", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/MetricFilterWithInteralReducerTransform.java#L144-L167
Fleker/ChannelSurfer
library/src/main/java/com/felkertech/channelsurfer/model/Channel.java
Channel.setLogoDrawable
public Channel setLogoDrawable(String id, String yourPackageName) { """ If the logo is local, you can provide a drawable instead of a URL Provide the id from R.drawable.{id} as a String @param id resource name of your logo @param yourPackageName Package name of your app (should be a temporary thing) @return It...
java
public Channel setLogoDrawable(String id, String yourPackageName) { String endpoint = "android.resource://"+id+"/drawable/"; this.logoUrl = endpoint + id; return this; }
[ "public", "Channel", "setLogoDrawable", "(", "String", "id", ",", "String", "yourPackageName", ")", "{", "String", "endpoint", "=", "\"android.resource://\"", "+", "id", "+", "\"/drawable/\"", ";", "this", ".", "logoUrl", "=", "endpoint", "+", "id", ";", "retu...
If the logo is local, you can provide a drawable instead of a URL Provide the id from R.drawable.{id} as a String @param id resource name of your logo @param yourPackageName Package name of your app (should be a temporary thing) @return Itself
[ "If", "the", "logo", "is", "local", "you", "can", "provide", "a", "drawable", "instead", "of", "a", "URL", "Provide", "the", "id", "from", "R", ".", "drawable", ".", "{", "id", "}", "as", "a", "String" ]
train
https://github.com/Fleker/ChannelSurfer/blob/f677beae37112f463c0c4783967fdb8fa97eb633/library/src/main/java/com/felkertech/channelsurfer/model/Channel.java#L87-L91
liyiorg/weixin-popular
src/main/java/weixin/popular/api/PayMchAPI.java
PayMchAPI.payProfitsharingaddreceiver
public static MchBaseResult payProfitsharingaddreceiver(PayProfitsharingOperation payProfitsharingOperation,String key) { """ 分账-添加分账接收方 @since 2.8.25 @param payProfitsharingOperation payProfitsharingOperation @param key key @return MchBaseResult """ Map<String,String> map = MapUtil.objectToMap(payProfit...
java
public static MchBaseResult payProfitsharingaddreceiver(PayProfitsharingOperation payProfitsharingOperation,String key){ Map<String,String> map = MapUtil.objectToMap(payProfitsharingOperation, "receiver"); if(payProfitsharingOperation.getReceiver() != null){ map.put("receiver", JsonUtil.toJSONString(payProfitsha...
[ "public", "static", "MchBaseResult", "payProfitsharingaddreceiver", "(", "PayProfitsharingOperation", "payProfitsharingOperation", ",", "String", "key", ")", "{", "Map", "<", "String", ",", "String", ">", "map", "=", "MapUtil", ".", "objectToMap", "(", "payProfitshari...
分账-添加分账接收方 @since 2.8.25 @param payProfitsharingOperation payProfitsharingOperation @param key key @return MchBaseResult
[ "分账", "-", "添加分账接收方" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/PayMchAPI.java#L819-L833
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java
DBService.addParams
private void addParams(Map<String, Object> dbServiceParams) { """ Add/override parameters defined for this DBService with those in the given map. """ if (dbServiceParams != null) { for (String paramName : dbServiceParams.keySet()) { m_serviceParamMap.put(paramName, dbServ...
java
private void addParams(Map<String, Object> dbServiceParams) { if (dbServiceParams != null) { for (String paramName : dbServiceParams.keySet()) { m_serviceParamMap.put(paramName, dbServiceParams.get(paramName)); } } }
[ "private", "void", "addParams", "(", "Map", "<", "String", ",", "Object", ">", "dbServiceParams", ")", "{", "if", "(", "dbServiceParams", "!=", "null", ")", "{", "for", "(", "String", "paramName", ":", "dbServiceParams", ".", "keySet", "(", ")", ")", "{"...
Add/override parameters defined for this DBService with those in the given map.
[ "Add", "/", "override", "parameters", "defined", "for", "this", "DBService", "with", "those", "in", "the", "given", "map", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/db/DBService.java#L344-L350
Coveros/selenified
src/main/java/com/coveros/selenified/application/WaitFor.java
WaitFor.cookieEquals
public void cookieEquals(double seconds, String cookieName, String expectedCookieValue) { """ Waits up to the provided wait time for a cookies with the provided name has a value equal to the expected value. This information will be logged and recorded, with a screenshot for traceability and added debugging suppo...
java
public void cookieEquals(double seconds, String cookieName, String expectedCookieValue) { double end = System.currentTimeMillis() + (seconds * 1000); while (app.is().cookiePresent(cookieName) && System.currentTimeMillis() < end) ; if (app.is().cookiePresent(cookieName)) { while (!app...
[ "public", "void", "cookieEquals", "(", "double", "seconds", ",", "String", "cookieName", ",", "String", "expectedCookieValue", ")", "{", "double", "end", "=", "System", ".", "currentTimeMillis", "(", ")", "+", "(", "seconds", "*", "1000", ")", ";", "while", ...
Waits up to the provided wait time for a cookies with the provided name has a value equal to the expected value. This information will be logged and recorded, with a screenshot for traceability and added debugging support. @param cookieName the name of the cookie @param expectedCookieValue the expected value ...
[ "Waits", "up", "to", "the", "provided", "wait", "time", "for", "a", "cookies", "with", "the", "provided", "name", "has", "a", "value", "equal", "to", "the", "expected", "value", ".", "This", "information", "will", "be", "logged", "and", "recorded", "with",...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/application/WaitFor.java#L725-L733
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java
SARLOperationHelper._hasSideEffects
protected Boolean _hasSideEffects(XTryCatchFinallyExpression expression, ISideEffectContext context) { """ Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects. """ final L...
java
protected Boolean _hasSideEffects(XTryCatchFinallyExpression expression, ISideEffectContext context) { final List<Map<String, List<XExpression>>> buffers = new ArrayList<>(); Map<String, List<XExpression>> buffer = context.createVariableAssignmentBufferForBranch(); if (hasSideEffects(expression.getExpression(), c...
[ "protected", "Boolean", "_hasSideEffects", "(", "XTryCatchFinallyExpression", "expression", ",", "ISideEffectContext", "context", ")", "{", "final", "List", "<", "Map", "<", "String", ",", "List", "<", "XExpression", ">", ">", ">", "buffers", "=", "new", "ArrayL...
Test if the given expression has side effects. @param expression the expression. @param context the list of context expressions. @return {@code true} if the expression has side effects.
[ "Test", "if", "the", "given", "expression", "has", "side", "effects", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/typesystem/SARLOperationHelper.java#L359-L380
astrapi69/mystic-crypt
crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyPairFactory.java
KeyPairFactory.newKeyPair
public static KeyPair newKeyPair(final Algorithm algorithm, final KeySize keySize) throws NoSuchAlgorithmException, NoSuchProviderException { """ Factory method for creating a new {@link KeyPair} from the given algorithm and {@link KeySize} @param algorithm the algorithm @param keySize the key size as enu...
java
public static KeyPair newKeyPair(final Algorithm algorithm, final KeySize keySize) throws NoSuchAlgorithmException, NoSuchProviderException { return newKeyPair(algorithm.getAlgorithm(), keySize.getKeySize()); }
[ "public", "static", "KeyPair", "newKeyPair", "(", "final", "Algorithm", "algorithm", ",", "final", "KeySize", "keySize", ")", "throws", "NoSuchAlgorithmException", ",", "NoSuchProviderException", "{", "return", "newKeyPair", "(", "algorithm", ".", "getAlgorithm", "(",...
Factory method for creating a new {@link KeyPair} from the given algorithm and {@link KeySize} @param algorithm the algorithm @param keySize the key size as enum @return the new {@link KeyPair} from the given salt and iteration count @throws NoSuchAlgorithmException is thrown if no Provider supports a KeyPairGenerato...
[ "Factory", "method", "for", "creating", "a", "new", "{", "@link", "KeyPair", "}", "from", "the", "given", "algorithm", "and", "{", "@link", "KeySize", "}" ]
train
https://github.com/astrapi69/mystic-crypt/blob/7f51ef5e4457e24de7ff391f10bfc5609e6f1a34/crypt-data/src/main/java/de/alpharogroup/crypto/factories/KeyPairFactory.java#L68-L72
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java
FeatureShapes.getFeatureShape
private FeatureShape getFeatureShape(Map<Long, FeatureShape> featureIds, long featureId) { """ Get the map shapes for the feature ids and feature id @param featureIds feature ids @param featureId feature id @return feature shape """ FeatureShape featureShape = featureIds.get(featureId); ...
java
private FeatureShape getFeatureShape(Map<Long, FeatureShape> featureIds, long featureId) { FeatureShape featureShape = featureIds.get(featureId); if (featureShape == null) { featureShape = new FeatureShape(featureId); featureIds.put(featureId, featureShape); } re...
[ "private", "FeatureShape", "getFeatureShape", "(", "Map", "<", "Long", ",", "FeatureShape", ">", "featureIds", ",", "long", "featureId", ")", "{", "FeatureShape", "featureShape", "=", "featureIds", ".", "get", "(", "featureId", ")", ";", "if", "(", "featureSha...
Get the map shapes for the feature ids and feature id @param featureIds feature ids @param featureId feature id @return feature shape
[ "Get", "the", "map", "shapes", "for", "the", "feature", "ids", "and", "feature", "id" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/FeatureShapes.java#L162-L170
EdwardRaff/JSAT
JSAT/src/jsat/utils/ListUtils.java
ListUtils.randomSample
public static <T> void randomSample(List<T> source, List<T> dest, int samples, Random rand) { """ Obtains a random sample without replacement from a source list and places it in the destination list. This is done without modifying the source list. @param <T> the list content type involved @param source the so...
java
public static <T> void randomSample(List<T> source, List<T> dest, int samples, Random rand) { randomSample((Collection<T>)source, dest, samples, rand); }
[ "public", "static", "<", "T", ">", "void", "randomSample", "(", "List", "<", "T", ">", "source", ",", "List", "<", "T", ">", "dest", ",", "int", "samples", ",", "Random", "rand", ")", "{", "randomSample", "(", "(", "Collection", "<", "T", ">", ")",...
Obtains a random sample without replacement from a source list and places it in the destination list. This is done without modifying the source list. @param <T> the list content type involved @param source the source of values to randomly sample from @param dest the list to store the random samples in. The list does n...
[ "Obtains", "a", "random", "sample", "without", "replacement", "from", "a", "source", "list", "and", "places", "it", "in", "the", "destination", "list", ".", "This", "is", "done", "without", "modifying", "the", "source", "list", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/utils/ListUtils.java#L185-L188
tvesalainen/util
util/src/main/java/org/vesalainen/util/navi/Velocity.java
Velocity.getThere
public Date getThere(Date start, Distance distance) { """ Returns the time we are there if we started at start @param start Starting time @param distance Distance to meve @return """ TimeSpan timeSpan = getTimeSpan(distance); return timeSpan.addDate(start); }
java
public Date getThere(Date start, Distance distance) { TimeSpan timeSpan = getTimeSpan(distance); return timeSpan.addDate(start); }
[ "public", "Date", "getThere", "(", "Date", "start", ",", "Distance", "distance", ")", "{", "TimeSpan", "timeSpan", "=", "getTimeSpan", "(", "distance", ")", ";", "return", "timeSpan", ".", "addDate", "(", "start", ")", ";", "}" ]
Returns the time we are there if we started at start @param start Starting time @param distance Distance to meve @return
[ "Returns", "the", "time", "we", "are", "there", "if", "we", "started", "at", "start" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/navi/Velocity.java#L74-L78
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Project.java
Project.getTotalToDo
public Double getTotalToDo(WorkitemFilter filter, boolean includeChildProjects) { """ Retrieves the total to do for all workitems in this project optionally filtered. @param filter Criteria to filter workitems on. @param includeChildProjects If true, include open sub projects, otherwise only in...
java
public Double getTotalToDo(WorkitemFilter filter, boolean includeChildProjects) { filter = (filter != null) ? filter : new WorkitemFilter(); return getRollup("Workitems", "ToDo", filter, includeChildProjects); }
[ "public", "Double", "getTotalToDo", "(", "WorkitemFilter", "filter", ",", "boolean", "includeChildProjects", ")", "{", "filter", "=", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "WorkitemFilter", "(", ")", ";", "return", "getRollup", "(", "\...
Retrieves the total to do for all workitems in this project optionally filtered. @param filter Criteria to filter workitems on. @param includeChildProjects If true, include open sub projects, otherwise only include this project. @return total to do of selected Workitems.
[ "Retrieves", "the", "total", "to", "do", "for", "all", "workitems", "in", "this", "project", "optionally", "filtered", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Project.java#L1129-L1133
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ling/WordLemmaTagFactory.java
WordLemmaTagFactory.newLabel
public Label newLabel(String labelStr, int options) { """ Make a new label with this <code>String</code> as a value component. Any other fields of the label would normally be null. @param labelStr The String that will be used for value @param options what to make (use labelStr as word, lemma or tag) @return...
java
public Label newLabel(String labelStr, int options) { if (options == TAG_LABEL) { return new WordLemmaTag(null, null, labelStr); } else if (options == LEMMA_LABEL) { return new WordLemmaTag(null, labelStr, null); } else { return new WordLemmaTag(labelStr); } }
[ "public", "Label", "newLabel", "(", "String", "labelStr", ",", "int", "options", ")", "{", "if", "(", "options", "==", "TAG_LABEL", ")", "{", "return", "new", "WordLemmaTag", "(", "null", ",", "null", ",", "labelStr", ")", ";", "}", "else", "if", "(", ...
Make a new label with this <code>String</code> as a value component. Any other fields of the label would normally be null. @param labelStr The String that will be used for value @param options what to make (use labelStr as word, lemma or tag) @return The new WordLemmaTag (word or lemma or tag will be <code>null</code...
[ "Make", "a", "new", "label", "with", "this", "<code", ">", "String<", "/", "code", ">", "as", "a", "value", "component", ".", "Any", "other", "fields", "of", "the", "label", "would", "normally", "be", "null", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ling/WordLemmaTagFactory.java#L61-L70
arxanchain/java-common
src/main/java/com/arxanfintech/common/crypto/core/ECKey.java
ECKey.signatureToKeyBytes
public static byte[] signatureToKeyBytes(byte[] messageHash, String signatureBase64) throws SignatureException { """ Given a piece of text and a message signature encoded in base64, returns an ECKey containing the public key that was used to sign it. This can then be compared to the expected public key to determ...
java
public static byte[] signatureToKeyBytes(byte[] messageHash, String signatureBase64) throws SignatureException { byte[] signatureEncoded; try { signatureEncoded = Base64.decode(signatureBase64); } catch (RuntimeException e) { // This is what you get back from Bouncy Castl...
[ "public", "static", "byte", "[", "]", "signatureToKeyBytes", "(", "byte", "[", "]", "messageHash", ",", "String", "signatureBase64", ")", "throws", "SignatureException", "{", "byte", "[", "]", "signatureEncoded", ";", "try", "{", "signatureEncoded", "=", "Base64...
Given a piece of text and a message signature encoded in base64, returns an ECKey containing the public key that was used to sign it. This can then be compared to the expected public key to determine if the signature was correct. @param messageHash a piece of human readable text that was signed @param signatureBase64 ...
[ "Given", "a", "piece", "of", "text", "and", "a", "message", "signature", "encoded", "in", "base64", "returns", "an", "ECKey", "containing", "the", "public", "key", "that", "was", "used", "to", "sign", "it", ".", "This", "can", "then", "be", "compared", "...
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ECKey.java#L829-L844
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java
Calendar.getDateTimeFormat
public DateFormat getDateTimeFormat(int dateStyle, int timeStyle, Locale loc) { """ <strong>[icu]</strong> Returns a <code>DateFormat</code> appropriate to this calendar. Subclasses wishing to specialize this behavior should override {@link #handleGetDateFormat}. """ return formatHelper(this, ULocale...
java
public DateFormat getDateTimeFormat(int dateStyle, int timeStyle, Locale loc) { return formatHelper(this, ULocale.forLocale(loc), dateStyle, timeStyle); }
[ "public", "DateFormat", "getDateTimeFormat", "(", "int", "dateStyle", ",", "int", "timeStyle", ",", "Locale", "loc", ")", "{", "return", "formatHelper", "(", "this", ",", "ULocale", ".", "forLocale", "(", "loc", ")", ",", "dateStyle", ",", "timeStyle", ")", ...
<strong>[icu]</strong> Returns a <code>DateFormat</code> appropriate to this calendar. Subclasses wishing to specialize this behavior should override {@link #handleGetDateFormat}.
[ "<strong", ">", "[", "icu", "]", "<", "/", "strong", ">", "Returns", "a", "<code", ">", "DateFormat<", "/", "code", ">", "appropriate", "to", "this", "calendar", ".", "Subclasses", "wishing", "to", "specialize", "this", "behavior", "should", "override", "{...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/Calendar.java#L3332-L3334
Harium/keel
src/main/java/com/harium/keel/catalano/math/distance/Distance.java
Distance.ChiSquare
public static double ChiSquare(double[] histogram1, double[] histogram2) { """ Gets the Chi Square distance between two normalized histograms. @param histogram1 Histogram. @param histogram2 Histogram. @return The Chi Square distance between x and y. """ double r = 0; for (int i = 0; i < hi...
java
public static double ChiSquare(double[] histogram1, double[] histogram2) { double r = 0; for (int i = 0; i < histogram1.length; i++) { double t = histogram1[i] + histogram2[i]; if (t != 0) r += Math.pow(histogram1[i] - histogram2[i], 2) / t; } ret...
[ "public", "static", "double", "ChiSquare", "(", "double", "[", "]", "histogram1", ",", "double", "[", "]", "histogram2", ")", "{", "double", "r", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "histogram1", ".", "length", ";", "i",...
Gets the Chi Square distance between two normalized histograms. @param histogram1 Histogram. @param histogram2 Histogram. @return The Chi Square distance between x and y.
[ "Gets", "the", "Chi", "Square", "distance", "between", "two", "normalized", "histograms", "." ]
train
https://github.com/Harium/keel/blob/0369ae674f9e664bccc5f9e161ae7e7a3b949a1e/src/main/java/com/harium/keel/catalano/math/distance/Distance.java#L265-L274
tzaeschke/zoodb
src/org/zoodb/internal/query/QueryTreeNode.java
QueryTreeNode.cloneTrunk
private QueryTreeNode cloneTrunk(QueryTreeNode stop, QueryTreeNode stopClone) { """ Clones a tree upwards to the root, except for the branch that starts with 'stop', which is replaced by 'stopClone'. @param stop @param stopClone @return A cloned branch of the query tree """ QueryTreeNode node1 = null; ...
java
private QueryTreeNode cloneTrunk(QueryTreeNode stop, QueryTreeNode stopClone) { QueryTreeNode node1 = null; if (n1 != null) { node1 = (n1 == stop ? stopClone : n1.cloneBranch()); } QueryTreeNode node2 = null; if (n2 != null) { node2 = n2 == stop ? stopClone : n2.cloneBranch(); } QueryTr...
[ "private", "QueryTreeNode", "cloneTrunk", "(", "QueryTreeNode", "stop", ",", "QueryTreeNode", "stopClone", ")", "{", "QueryTreeNode", "node1", "=", "null", ";", "if", "(", "n1", "!=", "null", ")", "{", "node1", "=", "(", "n1", "==", "stop", "?", "stopClone...
Clones a tree upwards to the root, except for the branch that starts with 'stop', which is replaced by 'stopClone'. @param stop @param stopClone @return A cloned branch of the query tree
[ "Clones", "a", "tree", "upwards", "to", "the", "root", "except", "for", "the", "branch", "that", "starts", "with", "stop", "which", "is", "replaced", "by", "stopClone", "." ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/query/QueryTreeNode.java#L255-L271
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java
PatternBox.hasNonSelfEffect
public static Pattern hasNonSelfEffect() { """ Pattern for detecting PhysicalEntity that controls a Conversion whose participants are not associated with the EntityReference of the initial PhysicalEntity. @return the pattern """ Pattern p = new Pattern(PhysicalEntity.class, "SPE"); p.add(peToER(), "SPE",...
java
public static Pattern hasNonSelfEffect() { Pattern p = new Pattern(PhysicalEntity.class, "SPE"); p.add(peToER(), "SPE", "ER"); p.add(linkToComplex(), "SPE", "PE"); p.add(peToControl(), "PE", "Control"); p.add(controlToInter(), "Control", "Inter"); p.add(new NOT(participantER()), "Inter", "ER"); return p;...
[ "public", "static", "Pattern", "hasNonSelfEffect", "(", ")", "{", "Pattern", "p", "=", "new", "Pattern", "(", "PhysicalEntity", ".", "class", ",", "\"SPE\"", ")", ";", "p", ".", "add", "(", "peToER", "(", ")", ",", "\"SPE\"", ",", "\"ER\"", ")", ";", ...
Pattern for detecting PhysicalEntity that controls a Conversion whose participants are not associated with the EntityReference of the initial PhysicalEntity. @return the pattern
[ "Pattern", "for", "detecting", "PhysicalEntity", "that", "controls", "a", "Conversion", "whose", "participants", "are", "not", "associated", "with", "the", "EntityReference", "of", "the", "initial", "PhysicalEntity", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L844-L853
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
MethodBuilder.buildMethodDoc
public void buildMethodDoc(XMLNode node, Content memberDetailsTree) { """ Build the method documentation. @param node the XML element that specifies which components to document @param memberDetailsTree the content tree to which the documentation will be added """ if (writer == null) { ...
java
public void buildMethodDoc(XMLNode node, Content memberDetailsTree) { if (writer == null) { return; } int size = methods.size(); if (size > 0) { Content methodDetailsTree = writer.getMethodDetailsTreeHeader( classDoc, memberDetailsTree); ...
[ "public", "void", "buildMethodDoc", "(", "XMLNode", "node", ",", "Content", "memberDetailsTree", ")", "{", "if", "(", "writer", "==", "null", ")", "{", "return", ";", "}", "int", "size", "=", "methods", ".", "size", "(", ")", ";", "if", "(", "size", ...
Build the method documentation. @param node the XML element that specifies which components to document @param memberDetailsTree the content tree to which the documentation will be added
[ "Build", "the", "method", "documentation", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java#L155-L175
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/RegionForwardingRuleId.java
RegionForwardingRuleId.of
public static RegionForwardingRuleId of(String region, String rule) { """ Returns a region forwarding rule identity given the region and rule names. The forwarding rule name must be 1-63 characters long and comply with RFC1035. Specifically, the name must match the regular expression {@code [a-z]([-a-z0-9]*[a-z0...
java
public static RegionForwardingRuleId of(String region, String rule) { return new RegionForwardingRuleId(null, region, rule); }
[ "public", "static", "RegionForwardingRuleId", "of", "(", "String", "region", ",", "String", "rule", ")", "{", "return", "new", "RegionForwardingRuleId", "(", "null", ",", "region", ",", "rule", ")", ";", "}" ]
Returns a region forwarding rule identity given the region and rule names. The forwarding rule name must be 1-63 characters long and comply with RFC1035. Specifically, the name must match the regular expression {@code [a-z]([-a-z0-9]*[a-z0-9])?} which means the first character must be a lowercase letter, and all follow...
[ "Returns", "a", "region", "forwarding", "rule", "identity", "given", "the", "region", "and", "rule", "names", ".", "The", "forwarding", "rule", "name", "must", "be", "1", "-", "63", "characters", "long", "and", "comply", "with", "RFC1035", ".", "Specifically...
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/deprecated/RegionForwardingRuleId.java#L128-L130
JOML-CI/JOML
src/org/joml/sampling/SpiralSampling.java
SpiralSampling.createEquiAngle
public void createEquiAngle(float radius, int numRotations, int numSamples, float jitter, Callback2d callback) { """ Create <code>numSamples</code> number of samples on a spiral with maximum radius <code>radius</code> around the center using <code>numRotations</code> number of rotations along the spiral, and call...
java
public void createEquiAngle(float radius, int numRotations, int numSamples, float jitter, Callback2d callback) { float spacing = radius / numRotations; for (int sample = 0; sample < numSamples; sample++) { float angle = 2.0f * (float) Math.PI * (sample * numRotations) / numSamples; ...
[ "public", "void", "createEquiAngle", "(", "float", "radius", ",", "int", "numRotations", ",", "int", "numSamples", ",", "float", "jitter", ",", "Callback2d", "callback", ")", "{", "float", "spacing", "=", "radius", "/", "numRotations", ";", "for", "(", "int"...
Create <code>numSamples</code> number of samples on a spiral with maximum radius <code>radius</code> around the center using <code>numRotations</code> number of rotations along the spiral, and call the given <code>callback</code> for each sample generated. <p> The generated sample points are distributed with equal angl...
[ "Create", "<code", ">", "numSamples<", "/", "code", ">", "number", "of", "samples", "on", "a", "spiral", "with", "maximum", "radius", "<code", ">", "radius<", "/", "code", ">", "around", "the", "center", "using", "<code", ">", "numRotations<", "/", "code",...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/sampling/SpiralSampling.java#L90-L99
michaelliao/jsonstream
src/main/java/com/itranswarp/jsonstream/JsonBuilder.java
JsonBuilder.createReader
public JsonReader createReader(InputStream input) { """ Create a JsonReader by providing an InputStream. @param input The InputStream object. @return JsonReader object. """ try { return createReader(new InputStreamReader(input, "UTF-8")); } catch (UnsupportedEncodingExce...
java
public JsonReader createReader(InputStream input) { try { return createReader(new InputStreamReader(input, "UTF-8")); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } }
[ "public", "JsonReader", "createReader", "(", "InputStream", "input", ")", "{", "try", "{", "return", "createReader", "(", "new", "InputStreamReader", "(", "input", ",", "\"UTF-8\"", ")", ")", ";", "}", "catch", "(", "UnsupportedEncodingException", "e", ")", "{...
Create a JsonReader by providing an InputStream. @param input The InputStream object. @return JsonReader object.
[ "Create", "a", "JsonReader", "by", "providing", "an", "InputStream", "." ]
train
https://github.com/michaelliao/jsonstream/blob/50adcff2e1293e655462eef5fc5f1b59277de514/src/main/java/com/itranswarp/jsonstream/JsonBuilder.java#L102-L109
killbill/killbill
invoice/src/main/java/org/killbill/billing/invoice/usage/SubscriptionUsageInArrear.java
SubscriptionUsageInArrear.computeMissingUsageInvoiceItems
public SubscriptionUsageInArrearItemsAndNextNotificationDate computeMissingUsageInvoiceItems(final List<InvoiceItem> existingUsage, final InvoiceItemGeneratorLogger invoiceItemGeneratorLogger) throws CatalogApiException, InvoiceApiException { """ Based on billing events, (@code existingUsage} and targetDate, figur...
java
public SubscriptionUsageInArrearItemsAndNextNotificationDate computeMissingUsageInvoiceItems(final List<InvoiceItem> existingUsage, final InvoiceItemGeneratorLogger invoiceItemGeneratorLogger) throws CatalogApiException, InvoiceApiException { final SubscriptionUsageInArrearItemsAndNextNotificationDate result = ...
[ "public", "SubscriptionUsageInArrearItemsAndNextNotificationDate", "computeMissingUsageInvoiceItems", "(", "final", "List", "<", "InvoiceItem", ">", "existingUsage", ",", "final", "InvoiceItemGeneratorLogger", "invoiceItemGeneratorLogger", ")", "throws", "CatalogApiException", ",",...
Based on billing events, (@code existingUsage} and targetDate, figure out what remains to be billed. @param existingUsage the existing on disk usage items. @throws CatalogApiException
[ "Based", "on", "billing", "events", "(", "@code", "existingUsage", "}", "and", "targetDate", "figure", "out", "what", "remains", "to", "be", "billed", "." ]
train
https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/invoice/src/main/java/org/killbill/billing/invoice/usage/SubscriptionUsageInArrear.java#L119-L132
Wikidata/Wikidata-Toolkit
wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/ApiConnection.java
ApiConnection.sendJsonRequest
public JsonNode sendJsonRequest(String requestMethod, Map<String,String> parameters) throws IOException, MediaWikiApiErrorException { """ Sends a request to the API with the given parameters and the given request method and returns the result JSON tree. It automatically fills the cookie map with cookies in the r...
java
public JsonNode sendJsonRequest(String requestMethod, Map<String,String> parameters) throws IOException, MediaWikiApiErrorException { parameters.put(ApiConnection.PARAM_FORMAT, "json"); if (loggedIn) { parameters.put(ApiConnection.ASSERT_PARAMETER, "user"); } try (InputStream response = sendRequest(requestMe...
[ "public", "JsonNode", "sendJsonRequest", "(", "String", "requestMethod", ",", "Map", "<", "String", ",", "String", ">", "parameters", ")", "throws", "IOException", ",", "MediaWikiApiErrorException", "{", "parameters", ".", "put", "(", "ApiConnection", ".", "PARAM_...
Sends a request to the API with the given parameters and the given request method and returns the result JSON tree. It automatically fills the cookie map with cookies in the result header after the request. It logs the request warnings and adds makes sure that "format": "json" parameter is set. @param requestMethod ei...
[ "Sends", "a", "request", "to", "the", "API", "with", "the", "given", "parameters", "and", "the", "given", "request", "method", "and", "returns", "the", "result", "JSON", "tree", ".", "It", "automatically", "fills", "the", "cookie", "map", "with", "cookies", ...
train
https://github.com/Wikidata/Wikidata-Toolkit/blob/7732851dda47e1febff406fba27bfec023f4786e/wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/ApiConnection.java#L399-L410
structr/structr
structr-core/src/main/java/org/structr/schema/export/StructrSchema.java
StructrSchema.createFromDatabase
public static JsonSchema createFromDatabase(final App app, final List<String> types) throws FrameworkException, URISyntaxException { """ Creates JsonSchema instance from the current schema in Structr, including only a subset of schema nodes. @param app @param types @return the current Structr schema @th...
java
public static JsonSchema createFromDatabase(final App app, final List<String> types) throws FrameworkException, URISyntaxException { try (final Tx tx = app.tx()) { final JsonSchema schema = StructrSchemaDefinition.initializeFromDatabase(app, types); tx.success(); return schema; } }
[ "public", "static", "JsonSchema", "createFromDatabase", "(", "final", "App", "app", ",", "final", "List", "<", "String", ">", "types", ")", "throws", "FrameworkException", ",", "URISyntaxException", "{", "try", "(", "final", "Tx", "tx", "=", "app", ".", "tx"...
Creates JsonSchema instance from the current schema in Structr, including only a subset of schema nodes. @param app @param types @return the current Structr schema @throws FrameworkException @throws URISyntaxException
[ "Creates", "JsonSchema", "instance", "from", "the", "current", "schema", "in", "Structr", "including", "only", "a", "subset", "of", "schema", "nodes", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-core/src/main/java/org/structr/schema/export/StructrSchema.java#L75-L85
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MMCIFFileTools.java
MMCIFFileTools.toMMCIF
public static <T> String toMMCIF(List<T> list, Class<T> klass) { """ Converts a list of mmCIF beans (see {@link org.biojava.nbio.structure.io.mmcif.model} to a String representing them in mmCIF loop format with one record per line. @param list @return """ if (list.isEmpty()) throw new IllegalArgumentExcep...
java
public static <T> String toMMCIF(List<T> list, Class<T> klass) { if (list.isEmpty()) throw new IllegalArgumentException("List of beans is empty!"); Field[] fields = getFields(klass); int[] sizes = getFieldSizes(list,fields); StringBuilder sb = new StringBuilder(); for (T o:list) { sb.append(toSingleLoop...
[ "public", "static", "<", "T", ">", "String", "toMMCIF", "(", "List", "<", "T", ">", "list", ",", "Class", "<", "T", ">", "klass", ")", "{", "if", "(", "list", ".", "isEmpty", "(", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"List of ...
Converts a list of mmCIF beans (see {@link org.biojava.nbio.structure.io.mmcif.model} to a String representing them in mmCIF loop format with one record per line. @param list @return
[ "Converts", "a", "list", "of", "mmCIF", "beans", "(", "see", "{" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/io/mmcif/MMCIFFileTools.java#L211-L226
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addIdInArrayCondition
protected void addIdInArrayCondition(final Expression<?> property, final String[] values) throws NumberFormatException { """ Add a Field Search Condition that will check if the id field exists in an array of id values that are represented as a String. eg. {@code field IN (values)} @param property The field id ...
java
protected void addIdInArrayCondition(final Expression<?> property, final String[] values) throws NumberFormatException { final Set<Integer> idValues = new HashSet<Integer>(); for (final String value : values) { idValues.add(Integer.parseInt(value.trim())); } addIdInCollection...
[ "protected", "void", "addIdInArrayCondition", "(", "final", "Expression", "<", "?", ">", "property", ",", "final", "String", "[", "]", "values", ")", "throws", "NumberFormatException", "{", "final", "Set", "<", "Integer", ">", "idValues", "=", "new", "HashSet"...
Add a Field Search Condition that will check if the id field exists in an array of id values that are represented as a String. eg. {@code field IN (values)} @param property The field id as defined in the Entity mapping class. @param values The array of Ids to be compared to. @throws NumberFormatException Thrown if o...
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "check", "if", "the", "id", "field", "exists", "in", "an", "array", "of", "id", "values", "that", "are", "represented", "as", "a", "String", ".", "eg", ".", "{", "@code", "field", "IN", "(", ...
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L331-L337
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java
HashMap.compareComparables
@SuppressWarnings( { """ Returns k.compareTo(x) if x matches kc (k's screened comparable class), else 0. """"rawtypes","unchecked"}) // for cast to Comparable static int compareComparables(Class<?> kc, Object k, Object x) { return (x == null || x.getClass() != kc ? 0 : ((Comparable...
java
@SuppressWarnings({"rawtypes","unchecked"}) // for cast to Comparable static int compareComparables(Class<?> kc, Object k, Object x) { return (x == null || x.getClass() != kc ? 0 : ((Comparable)k).compareTo(x)); }
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "// for cast to Comparable", "static", "int", "compareComparables", "(", "Class", "<", "?", ">", "kc", ",", "Object", "k", ",", "Object", "x", ")", "{", "return", "(", "x", ...
Returns k.compareTo(x) if x matches kc (k's screened comparable class), else 0.
[ "Returns", "k", ".", "compareTo", "(", "x", ")", "if", "x", "matches", "kc", "(", "k", "s", "screened", "comparable", "class", ")", "else", "0", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/HashMap.java#L374-L378
resilience4j/resilience4j
resilience4j-metrics/src/main/java/io/github/resilience4j/metrics/RateLimiterMetrics.java
RateLimiterMetrics.ofIterable
public static RateLimiterMetrics ofIterable(String prefix, Iterable<RateLimiter> rateLimiters) { """ Creates a new instance {@link RateLimiterMetrics} with an {@link Iterable} of rate limiters as a source. @param rateLimiters the rate limiters """ return new RateLimiterMetrics(prefix, rateLimiters)...
java
public static RateLimiterMetrics ofIterable(String prefix, Iterable<RateLimiter> rateLimiters) { return new RateLimiterMetrics(prefix, rateLimiters); }
[ "public", "static", "RateLimiterMetrics", "ofIterable", "(", "String", "prefix", ",", "Iterable", "<", "RateLimiter", ">", "rateLimiters", ")", "{", "return", "new", "RateLimiterMetrics", "(", "prefix", ",", "rateLimiters", ")", ";", "}" ]
Creates a new instance {@link RateLimiterMetrics} with an {@link Iterable} of rate limiters as a source. @param rateLimiters the rate limiters
[ "Creates", "a", "new", "instance", "{", "@link", "RateLimiterMetrics", "}", "with", "an", "{", "@link", "Iterable", "}", "of", "rate", "limiters", "as", "a", "source", "." ]
train
https://github.com/resilience4j/resilience4j/blob/fa843d30f531c00f0c3dc218b65a7f2bb51af336/resilience4j-metrics/src/main/java/io/github/resilience4j/metrics/RateLimiterMetrics.java#L102-L104
strator-dev/greenpepper-open
extensions-external/php/src/main/java/com/greenpepper/phpsud/container/PHPClassDescriptor.java
PHPClassDescriptor.getClassDescriptor
public static PHPClassDescriptor getClassDescriptor(String className, PHPContainer container, Hashtable<String, PHPClassDescriptor> classCache) throws PHPException { """ <p>getClassDescriptor.</p> @param className a {@link java.lang.String} object. @param container a {@link com.greenpepper.phpsud.container.PHP...
java
public static PHPClassDescriptor getClassDescriptor(String className, PHPContainer container, Hashtable<String, PHPClassDescriptor> classCache) throws PHPException { PHPClassDescriptor c = classCache.get(className.toLowerCase()); if (c != null) { return c; } Object o = container.getObjectParser().parse("clas...
[ "public", "static", "PHPClassDescriptor", "getClassDescriptor", "(", "String", "className", ",", "PHPContainer", "container", ",", "Hashtable", "<", "String", ",", "PHPClassDescriptor", ">", "classCache", ")", "throws", "PHPException", "{", "PHPClassDescriptor", "c", ...
<p>getClassDescriptor.</p> @param className a {@link java.lang.String} object. @param container a {@link com.greenpepper.phpsud.container.PHPContainer} object. @param classCache a {@link java.util.Hashtable} object. @return a {@link com.greenpepper.phpsud.container.PHPClassDescriptor} object. @throws com.greenpepper.p...
[ "<p", ">", "getClassDescriptor", ".", "<", "/", "p", ">" ]
train
https://github.com/strator-dev/greenpepper-open/blob/71fd244b4989e9cd2d07ae62dd954a1f2a269a92/extensions-external/php/src/main/java/com/greenpepper/phpsud/container/PHPClassDescriptor.java#L165-L181
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java
MetadataFinder.requestPlaylistItemsFrom
public List<Message> requestPlaylistItemsFrom(final int player, final CdjStatus.TrackSourceSlot slot, final int sortOrder, final int playlistOrFolderId, final boolean folder) throws Exception { """ Ask t...
java
public List<Message> requestPlaylistItemsFrom(final int player, final CdjStatus.TrackSourceSlot slot, final int sortOrder, final int playlistOrFolderId, final boolean folder) throws Exception { Connec...
[ "public", "List", "<", "Message", ">", "requestPlaylistItemsFrom", "(", "final", "int", "player", ",", "final", "CdjStatus", ".", "TrackSourceSlot", "slot", ",", "final", "int", "sortOrder", ",", "final", "int", "playlistOrFolderId", ",", "final", "boolean", "fo...
Ask the specified player's dbserver for the playlist entries of the specified playlist (if {@code folder} is {@code false}, or the list of playlists and folders inside the specified playlist folder (if {@code folder} is {@code true}. @param player the player number whose playlist entries are of interest @param slot th...
[ "Ask", "the", "specified", "player", "s", "dbserver", "for", "the", "playlist", "entries", "of", "the", "specified", "playlist", "(", "if", "{", "@code", "folder", "}", "is", "{", "@code", "false", "}", "or", "the", "list", "of", "playlists", "and", "fol...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataFinder.java#L294-L306
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/ExampleDataUtil.java
ExampleDataUtil.createExampleData
public static List<PersonBean> createExampleData(final int rows, final int documents) { """ Creates the example data. @param rows the number of rows to create @param documents the number of documents to add to each person @return the example data. """ List<PersonBean> data = new ArrayList<>(rows); Da...
java
public static List<PersonBean> createExampleData(final int rows, final int documents) { List<PersonBean> data = new ArrayList<>(rows); Date date1 = DateUtilities.createDate(1, 2, 1973); Date date2 = DateUtilities.createDate(2, 3, 1985); Date date3 = DateUtilities.createDate(3, 4, 2004); for (int i = 1; i <=...
[ "public", "static", "List", "<", "PersonBean", ">", "createExampleData", "(", "final", "int", "rows", ",", "final", "int", "documents", ")", "{", "List", "<", "PersonBean", ">", "data", "=", "new", "ArrayList", "<>", "(", "rows", ")", ";", "Date", "date1...
Creates the example data. @param rows the number of rows to create @param documents the number of documents to add to each person @return the example data.
[ "Creates", "the", "example", "data", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/table/ExampleDataUtil.java#L121-L145
Alexey1Gavrilov/ExpectIt
expectit-core/src/main/java/net/sf/expectit/ExpectBuilder.java
ExpectBuilder.withEchoInput
public final ExpectBuilder withEchoInput(Appendable firstInput, Appendable... otherInputs) { """ Enables printing of all the received data. Useful for debugging to monitor I/O activity. Optional, by default is unset. <p/> If the only {@code firstInput} is specified then the data received from all the inputs is ...
java
public final ExpectBuilder withEchoInput(Appendable firstInput, Appendable... otherInputs) { this.echoInput = firstInput; this.echoInputs = otherInputs; return this; }
[ "public", "final", "ExpectBuilder", "withEchoInput", "(", "Appendable", "firstInput", ",", "Appendable", "...", "otherInputs", ")", "{", "this", ".", "echoInput", "=", "firstInput", ";", "this", ".", "echoInputs", "=", "otherInputs", ";", "return", "this", ";", ...
Enables printing of all the received data. Useful for debugging to monitor I/O activity. Optional, by default is unset. <p/> If the only {@code firstInput} is specified then the data received from all the inputs is echoed to it. <p/> The build method throws an {@link java.lang.IllegalArgumentException} if the number of...
[ "Enables", "printing", "of", "all", "the", "received", "data", ".", "Useful", "for", "debugging", "to", "monitor", "I", "/", "O", "activity", ".", "Optional", "by", "default", "is", "unset", ".", "<p", "/", ">", "If", "the", "only", "{", "@code", "firs...
train
https://github.com/Alexey1Gavrilov/ExpectIt/blob/5acbe1f8f895fe1dbd63e29bf3ab8e5bbf0873c3/expectit-core/src/main/java/net/sf/expectit/ExpectBuilder.java#L177-L181
Jasig/uPortal
uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java
UrlStringBuilder.setParameters
public UrlStringBuilder setParameters(String namespace, Map<String, List<String>> parameters) { """ Removes all existing parameters and sets the contents of the specified Map as the parameters. @param namespace String to prepend to each parameter name in the Map @param parameters Map of parameters to set @ret...
java
public UrlStringBuilder setParameters(String namespace, Map<String, List<String>> parameters) { for (final String name : parameters.keySet()) { Validate.notNull(name, "parameter map cannot contain any null keys"); } this.parameters.clear(); this.addParameters(namespace, para...
[ "public", "UrlStringBuilder", "setParameters", "(", "String", "namespace", ",", "Map", "<", "String", ",", "List", "<", "String", ">", ">", "parameters", ")", "{", "for", "(", "final", "String", "name", ":", "parameters", ".", "keySet", "(", ")", ")", "{...
Removes all existing parameters and sets the contents of the specified Map as the parameters. @param namespace String to prepend to each parameter name in the Map @param parameters Map of parameters to set @return this
[ "Removes", "all", "existing", "parameters", "and", "sets", "the", "contents", "of", "the", "specified", "Map", "as", "the", "parameters", "." ]
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-url/src/main/java/org/apereo/portal/url/UrlStringBuilder.java#L174-L182
gallandarakhneorg/afc
core/util/src/main/java/org/arakhne/afc/progress/ProgressionUtil.java
ProgressionUtil.setValue
public static void setValue(Progression model, int value, String comment) { """ Set the value of the given task progression, if not <code>null</code>. The value must be greater than the current progression value. @param model is the progression to change @param value is the value to add to the progression va...
java
public static void setValue(Progression model, int value, String comment) { if (model != null && value > model.getValue()) { model.setValue(value, comment); } }
[ "public", "static", "void", "setValue", "(", "Progression", "model", ",", "int", "value", ",", "String", "comment", ")", "{", "if", "(", "model", "!=", "null", "&&", "value", ">", "model", ".", "getValue", "(", ")", ")", "{", "model", ".", "setValue", ...
Set the value of the given task progression, if not <code>null</code>. The value must be greater than the current progression value. @param model is the progression to change @param value is the value to add to the progression value. @param comment is the comment associated to the progression.
[ "Set", "the", "value", "of", "the", "given", "task", "progression", "if", "not", "<code", ">", "null<", "/", "code", ">", ".", "The", "value", "must", "be", "greater", "than", "the", "current", "progression", "value", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/util/src/main/java/org/arakhne/afc/progress/ProgressionUtil.java#L327-L331
aboutsip/pkts
pkts-core/src/main/java/io/pkts/packet/impl/MACPacketImpl.java
MACPacketImpl.setMacAddress
private void setMacAddress(final String macAddress, final boolean setSourceMacAddress) throws IllegalArgumentException { """ Helper method for setting the mac address in the header buffer. @param macAddress the mac address to parse @param setSourceMacAddress whether this is to bet set as the sour...
java
private void setMacAddress(final String macAddress, final boolean setSourceMacAddress) throws IllegalArgumentException { if (macAddress == null || macAddress.isEmpty()) { throw new IllegalArgumentException("Null or empty string cannot be a valid MAC Address."); } // very ...
[ "private", "void", "setMacAddress", "(", "final", "String", "macAddress", ",", "final", "boolean", "setSourceMacAddress", ")", "throws", "IllegalArgumentException", "{", "if", "(", "macAddress", "==", "null", "||", "macAddress", ".", "isEmpty", "(", ")", ")", "{...
Helper method for setting the mac address in the header buffer. @param macAddress the mac address to parse @param setSourceMacAddress whether this is to bet set as the source mac address or not. False implies destination mac address of course. @throws IllegalArgumentException
[ "Helper", "method", "for", "setting", "the", "mac", "address", "in", "the", "header", "buffer", "." ]
train
https://github.com/aboutsip/pkts/blob/0f06bb0dac76c812187829f580a8d476ca99a1a1/pkts-core/src/main/java/io/pkts/packet/impl/MACPacketImpl.java#L169-L186
Appendium/objectlabkit
datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ExcelDateUtil.java
ExcelDateUtil.getJavaDateOnly
public static Date getJavaDateOnly(final double excelDate, final boolean use1904windowing) { """ Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. @param excelDate The Excel date. @param use1904windowing true if date uses 1904 windowing, or false if using 1900 dat...
java
public static Date getJavaDateOnly(final double excelDate, final boolean use1904windowing) { final Calendar javaCalendar = getJavaCalendar(excelDate, use1904windowing); if (javaCalendar == null) { return null; } return Utils.blastTime(javaCalendar).getTime(); }
[ "public", "static", "Date", "getJavaDateOnly", "(", "final", "double", "excelDate", ",", "final", "boolean", "use1904windowing", ")", "{", "final", "Calendar", "javaCalendar", "=", "getJavaCalendar", "(", "excelDate", ",", "use1904windowing", ")", ";", "if", "(", ...
Given an Excel date with either 1900 or 1904 date windowing, converts it to a java.util.Date. @param excelDate The Excel date. @param use1904windowing true if date uses 1904 windowing, or false if using 1900 date windowing. @return Java representation of the date without any time. @see java.util.TimeZone
[ "Given", "an", "Excel", "date", "with", "either", "1900", "or", "1904", "date", "windowing", "converts", "it", "to", "a", "java", ".", "util", ".", "Date", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/datecalc-common/src/main/java/net/objectlab/kit/datecalc/common/ExcelDateUtil.java#L120-L126
looly/hutool
hutool-cron/src/main/java/cn/hutool/cron/pattern/CronPatternUtil.java
CronPatternUtil.matchedDates
public static List<Date> matchedDates(String patternStr, Date start, Date end, int count, boolean isMatchSecond) { """ 列举指定日期范围内所有匹配表达式的日期 @param patternStr 表达式字符串 @param start 起始时间 @param end 结束时间 @param count 列举数量 @param isMatchSecond 是否匹配秒 @return 日期列表 """ return matchedDates(patternStr, start.ge...
java
public static List<Date> matchedDates(String patternStr, Date start, Date end, int count, boolean isMatchSecond) { return matchedDates(patternStr, start.getTime(), end.getTime(), count, isMatchSecond); }
[ "public", "static", "List", "<", "Date", ">", "matchedDates", "(", "String", "patternStr", ",", "Date", "start", ",", "Date", "end", ",", "int", "count", ",", "boolean", "isMatchSecond", ")", "{", "return", "matchedDates", "(", "patternStr", ",", "start", ...
列举指定日期范围内所有匹配表达式的日期 @param patternStr 表达式字符串 @param start 起始时间 @param end 结束时间 @param count 列举数量 @param isMatchSecond 是否匹配秒 @return 日期列表
[ "列举指定日期范围内所有匹配表达式的日期" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-cron/src/main/java/cn/hutool/cron/pattern/CronPatternUtil.java#L42-L44
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.router_new_duration_GET
public OvhOrder router_new_duration_GET(String duration, String vrack) throws IOException { """ Get prices and contracts information REST: GET /order/router/new/{duration} @param vrack [required] The name of your vrack @param duration [required] Duration """ String qPath = "/order/router/new/{duration}"...
java
public OvhOrder router_new_duration_GET(String duration, String vrack) throws IOException { String qPath = "/order/router/new/{duration}"; StringBuilder sb = path(qPath, duration); query(sb, "vrack", vrack); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhOrder.class); }
[ "public", "OvhOrder", "router_new_duration_GET", "(", "String", "duration", ",", "String", "vrack", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/router/new/{duration}\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",", "duration",...
Get prices and contracts information REST: GET /order/router/new/{duration} @param vrack [required] The name of your vrack @param duration [required] Duration
[ "Get", "prices", "and", "contracts", "information" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L925-L931
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/RepairingHandler.java
RepairingHandler.checkOrRepairSequence
public void checkOrRepairSequence(final int partition, final long nextSequence, final boolean viaAntiEntropy) { """ multiple threads can concurrently call this method: one is anti-entropy, other one is event service thread """ assert nextSequence > 0; MetaDataContainer metaData = getMetaDataCo...
java
public void checkOrRepairSequence(final int partition, final long nextSequence, final boolean viaAntiEntropy) { assert nextSequence > 0; MetaDataContainer metaData = getMetaDataContainer(partition); while (true) { final long currentSequence = metaData.getSequence(); if (...
[ "public", "void", "checkOrRepairSequence", "(", "final", "int", "partition", ",", "final", "long", "nextSequence", ",", "final", "boolean", "viaAntiEntropy", ")", "{", "assert", "nextSequence", ">", "0", ";", "MetaDataContainer", "metaData", "=", "getMetaDataContain...
multiple threads can concurrently call this method: one is anti-entropy, other one is event service thread
[ "multiple", "threads", "can", "concurrently", "call", "this", "method", ":", "one", "is", "anti", "-", "entropy", "other", "one", "is", "event", "service", "thread" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/nearcache/impl/invalidation/RepairingHandler.java#L173-L200
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.objectDeepCopyWithBlackList
public static <T> T objectDeepCopyWithBlackList(Object from, Class<T> toClass, String... blockFields) { """ Object deep copy with black list t. @param <T> the type parameter @param from the from @param toClass the to class @param blockFields the block fields @return the t """ ...
java
public static <T> T objectDeepCopyWithBlackList(Object from, Class<T> toClass, String... blockFields) { Object to = getNewInstance(toClass); return objectDeepCopyWithBlackList(from, to, blockFields); }
[ "public", "static", "<", "T", ">", "T", "objectDeepCopyWithBlackList", "(", "Object", "from", ",", "Class", "<", "T", ">", "toClass", ",", "String", "...", "blockFields", ")", "{", "Object", "to", "=", "getNewInstance", "(", "toClass", ")", ";", "return", ...
Object deep copy with black list t. @param <T> the type parameter @param from the from @param toClass the to class @param blockFields the block fields @return the t
[ "Object", "deep", "copy", "with", "black", "list", "t", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L455-L458
goshippo/shippo-java-client
src/main/java/com/shippo/model/Batch.java
Batch.removeShipments
public static Batch removeShipments(String id, String[] shipmentIds) throws AuthenticationException, InvalidRequestException, APIConnectionException, APIException { """ Remove shipments to an existing batch provided by id. This method corresponds to https://api.goshippo.com/batches/<i>BATCH OBJECT ID</i>/remov...
java
public static Batch removeShipments(String id, String[] shipmentIds) throws AuthenticationException, InvalidRequestException, APIConnectionException, APIException { Map<String, Object> params = new HashMap<String, Object>(); params.put("__list", shipmentIds); return request(RequestMethod.POST, instanceURL(Batc...
[ "public", "static", "Batch", "removeShipments", "(", "String", "id", ",", "String", "[", "]", "shipmentIds", ")", "throws", "AuthenticationException", ",", "InvalidRequestException", ",", "APIConnectionException", ",", "APIException", "{", "Map", "<", "String", ",",...
Remove shipments to an existing batch provided by id. This method corresponds to https://api.goshippo.com/batches/<i>BATCH OBJECT ID</i>/remove_shipments endpoint defined in https://goshippo.com/docs/reference#batches-remove-shipments @param id Batch object ID @param shipmentIds Array of shipment Ids to be removed fro...
[ "Remove", "shipments", "to", "an", "existing", "batch", "provided", "by", "id", ".", "This", "method", "corresponds", "to", "https", ":", "//", "api", ".", "goshippo", ".", "com", "/", "batches", "/", "<i", ">", "BATCH", "OBJECT", "ID<", "/", "i", ">",...
train
https://github.com/goshippo/shippo-java-client/blob/eecf801c7e07a627c3677a331c0cfcf36cb1678b/src/main/java/com/shippo/model/Batch.java#L294-L300
Cornutum/tcases
tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleCombiner.java
TupleCombiner.getOnceTupleDefs
private Set<Tuple> getOnceTupleDefs( final List<VarDef> combinedVars) { """ Returns the set of once-only tuple definitions for this combiner. """ try { return new HashSet<Tuple>( IteratorUtils.toList( IteratorUtils.transformedIterator( getOnceTuples()...
java
private Set<Tuple> getOnceTupleDefs( final List<VarDef> combinedVars) { try { return new HashSet<Tuple>( IteratorUtils.toList( IteratorUtils.transformedIterator( getOnceTuples(), tupleRef -> toTuple( combinedVars, tupleRef)))); } ca...
[ "private", "Set", "<", "Tuple", ">", "getOnceTupleDefs", "(", "final", "List", "<", "VarDef", ">", "combinedVars", ")", "{", "try", "{", "return", "new", "HashSet", "<", "Tuple", ">", "(", "IteratorUtils", ".", "toList", "(", "IteratorUtils", ".", "transfo...
Returns the set of once-only tuple definitions for this combiner.
[ "Returns", "the", "set", "of", "once", "-", "only", "tuple", "definitions", "for", "this", "combiner", "." ]
train
https://github.com/Cornutum/tcases/blob/21e15cf107fa149620c40f4bda1829c1224fcfb1/tcases-lib/src/main/java/org/cornutum/tcases/generator/TupleCombiner.java#L342-L357
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java
IotHubResourcesInner.updateAsync
public Observable<IotHubDescriptionInner> updateAsync(String resourceGroupName, String resourceName) { """ Update an existing IoT Hubs tags. Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. @param resourceGroupName Resource group identifier. @param resourceName Name of io...
java
public Observable<IotHubDescriptionInner> updateAsync(String resourceGroupName, String resourceName) { return updateWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<IotHubDescriptionInner>, IotHubDescriptionInner>() { @Override public IotHubDescript...
[ "public", "Observable", "<", "IotHubDescriptionInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "updateWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "map", "(", "ne...
Update an existing IoT Hubs tags. Update an existing IoT Hub tags. to update other fields use the CreateOrUpdate method. @param resourceGroupName Resource group identifier. @param resourceName Name of iot hub to update. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable fo...
[ "Update", "an", "existing", "IoT", "Hubs", "tags", ".", "Update", "an", "existing", "IoT", "Hub", "tags", ".", "to", "update", "other", "fields", "use", "the", "CreateOrUpdate", "method", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/IotHubResourcesInner.java#L705-L712
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/system/SystemProperties.java
SystemProperties.setPropertyValue
@Nonnull public static EChange setPropertyValue (@Nonnull final String sKey, @Nullable final String sValue) { """ Set a system property value under consideration of an eventually present {@link SecurityManager}. @param sKey The key of the system property. May not be <code>null</code>. @param sValue The va...
java
@Nonnull public static EChange setPropertyValue (@Nonnull final String sKey, @Nullable final String sValue) { boolean bChanged; if (sValue == null) { // Was something removed? bChanged = removePropertyValue (sKey) != null; } else { final String sOld = IPrivilegedAction.syst...
[ "@", "Nonnull", "public", "static", "EChange", "setPropertyValue", "(", "@", "Nonnull", "final", "String", "sKey", ",", "@", "Nullable", "final", "String", "sValue", ")", "{", "boolean", "bChanged", ";", "if", "(", "sValue", "==", "null", ")", "{", "// Was...
Set a system property value under consideration of an eventually present {@link SecurityManager}. @param sKey The key of the system property. May not be <code>null</code>. @param sValue The value of the system property. If the value is <code>null</code> the property is removed. @return {@link EChange}
[ "Set", "a", "system", "property", "value", "under", "consideration", "of", "an", "eventually", "present", "{", "@link", "SecurityManager", "}", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/system/SystemProperties.java#L196-L213
wcm-io/wcm-io-handler
link/src/main/java/io/wcm/handler/link/type/helpers/InternalLinkResolver.java
InternalLinkResolver.recursiveResolveLink
private Link recursiveResolveLink(Page redirectPage, Link link) { """ Resolves link of redirect or integrator page. Those pages contain the link reference information in their content resource (jcr:content node). This information is used to resolve the link. @param redirectPage Redirect or integrator page @para...
java
private Link recursiveResolveLink(Page redirectPage, Link link) { // set link reference to content resource of redirect page, keep other parameters LinkRequest linkRequest = link.getLinkRequest(); LinkRequest redirectLinkRequest = new LinkRequest( redirectPage.getContentResource(), null, ...
[ "private", "Link", "recursiveResolveLink", "(", "Page", "redirectPage", ",", "Link", "link", ")", "{", "// set link reference to content resource of redirect page, keep other parameters", "LinkRequest", "linkRequest", "=", "link", ".", "getLinkRequest", "(", ")", ";", "Link...
Resolves link of redirect or integrator page. Those pages contain the link reference information in their content resource (jcr:content node). This information is used to resolve the link. @param redirectPage Redirect or integrator page @param link Link metadata @return Link metadata
[ "Resolves", "link", "of", "redirect", "or", "integrator", "page", ".", "Those", "pages", "contain", "the", "link", "reference", "information", "in", "their", "content", "resource", "(", "jcr", ":", "content", "node", ")", ".", "This", "information", "is", "u...
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/link/src/main/java/io/wcm/handler/link/type/helpers/InternalLinkResolver.java#L210-L236
jenkinsci/jenkins
core/src/main/java/hudson/util/XStream2.java
XStream2.toXMLUTF8
public void toXMLUTF8(Object obj, OutputStream out) throws IOException { """ Serializes to a byte stream. Uses UTF-8 encoding and specifies that in the XML encoding declaration. @since 1.504 """ Writer w = new OutputStreamWriter(out, Charset.forName("UTF-8")); w.write("<?xml version=\"1.1\" e...
java
public void toXMLUTF8(Object obj, OutputStream out) throws IOException { Writer w = new OutputStreamWriter(out, Charset.forName("UTF-8")); w.write("<?xml version=\"1.1\" encoding=\"UTF-8\"?>\n"); toXML(obj, w); }
[ "public", "void", "toXMLUTF8", "(", "Object", "obj", ",", "OutputStream", "out", ")", "throws", "IOException", "{", "Writer", "w", "=", "new", "OutputStreamWriter", "(", "out", ",", "Charset", ".", "forName", "(", "\"UTF-8\"", ")", ")", ";", "w", ".", "w...
Serializes to a byte stream. Uses UTF-8 encoding and specifies that in the XML encoding declaration. @since 1.504
[ "Serializes", "to", "a", "byte", "stream", ".", "Uses", "UTF", "-", "8", "encoding", "and", "specifies", "that", "in", "the", "XML", "encoding", "declaration", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/util/XStream2.java#L310-L314
Omertron/api-omdb
src/main/java/com/omertron/omdbapi/tools/OmdbUrlBuilder.java
OmdbUrlBuilder.appendParam
private static void appendParam(final OmdbParameters params, final Param key, StringBuilder sb) { """ Append a parameter and value to the URL line @param params The parameter list @param key The parameter to add @param sb The StringBuilder instance to use """ if (params.has(key)) { sb....
java
private static void appendParam(final OmdbParameters params, final Param key, StringBuilder sb) { if (params.has(key)) { sb.append(DELIMITER_SUBSEQUENT).append(key.getValue()).append(params.get(key)); } }
[ "private", "static", "void", "appendParam", "(", "final", "OmdbParameters", "params", ",", "final", "Param", "key", ",", "StringBuilder", "sb", ")", "{", "if", "(", "params", ".", "has", "(", "key", ")", ")", "{", "sb", ".", "append", "(", "DELIMITER_SUB...
Append a parameter and value to the URL line @param params The parameter list @param key The parameter to add @param sb The StringBuilder instance to use
[ "Append", "a", "parameter", "and", "value", "to", "the", "URL", "line" ]
train
https://github.com/Omertron/api-omdb/blob/acb506ded2d7b8a4159b48161ffab8cb5b7bad44/src/main/java/com/omertron/omdbapi/tools/OmdbUrlBuilder.java#L121-L125
lucee/Lucee
core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java
TagLibFactory.loadFromDirectory
public static TagLib[] loadFromDirectory(Resource dir, Identification id) throws TagLibException { """ Laedt mehrere TagLib's die innerhalb eines Verzeichnisses liegen. @param dir Verzeichnis im dem die TagLib's liegen. @param saxParser Definition des Sax Parser mit dem die TagLib's eingelesen werden sollen. ...
java
public static TagLib[] loadFromDirectory(Resource dir, Identification id) throws TagLibException { if (!dir.isDirectory()) return new TagLib[0]; ArrayList<TagLib> arr = new ArrayList<TagLib>(); Resource[] files = dir.listResources(new ExtensionResourceFilter(new String[] { "tld", "tldx" })); for (int i = 0; i < fi...
[ "public", "static", "TagLib", "[", "]", "loadFromDirectory", "(", "Resource", "dir", ",", "Identification", "id", ")", "throws", "TagLibException", "{", "if", "(", "!", "dir", ".", "isDirectory", "(", ")", ")", "return", "new", "TagLib", "[", "0", "]", "...
Laedt mehrere TagLib's die innerhalb eines Verzeichnisses liegen. @param dir Verzeichnis im dem die TagLib's liegen. @param saxParser Definition des Sax Parser mit dem die TagLib's eingelesen werden sollen. @return TagLib's als Array @throws TagLibException
[ "Laedt", "mehrere", "TagLib", "s", "die", "innerhalb", "eines", "Verzeichnisses", "liegen", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibFactory.java#L469-L479
Graylog2/graylog2-server
graylog2-server/src/main/java/org/graylog2/plugin/Version.java
Version.fromPluginProperties
public static Version fromPluginProperties(Class<?> pluginClass, String path, String propertyName, Version defaultVersion) { """ Try to read the version from the {@literal graylog-plugin.properties} file included in a plugin. @param pluginClass Class where the class loader should be obtained from. @param p...
java
public static Version fromPluginProperties(Class<?> pluginClass, String path, String propertyName, Version defaultVersion) { return fromClasspathProperties(pluginClass, path, propertyName, null, null, defaultVersion); }
[ "public", "static", "Version", "fromPluginProperties", "(", "Class", "<", "?", ">", "pluginClass", ",", "String", "path", ",", "String", "propertyName", ",", "Version", "defaultVersion", ")", "{", "return", "fromClasspathProperties", "(", "pluginClass", ",", "path...
Try to read the version from the {@literal graylog-plugin.properties} file included in a plugin. @param pluginClass Class where the class loader should be obtained from. @param path Path of the properties file on the classpath which contains the version information. @param propertyName The name of th...
[ "Try", "to", "read", "the", "version", "from", "the", "{", "@literal", "graylog", "-", "plugin", ".", "properties", "}", "file", "included", "in", "a", "plugin", "." ]
train
https://github.com/Graylog2/graylog2-server/blob/50b565dcead6e0a372236d5c2f8530dc5726fa9b/graylog2-server/src/main/java/org/graylog2/plugin/Version.java#L162-L164
google/closure-compiler
src/com/google/javascript/jscomp/AstFactory.java
AstFactory.createThisAliasDeclarationForFunction
Node createThisAliasDeclarationForFunction(String aliasName, Node functionNode) { """ Creates a statement declaring a const alias for "this" to be used in the given function node. <p>e.g. `const aliasName = this;` """ return createSingleConstNameDeclaration( aliasName, createThis(getTypeOfThisFo...
java
Node createThisAliasDeclarationForFunction(String aliasName, Node functionNode) { return createSingleConstNameDeclaration( aliasName, createThis(getTypeOfThisForFunctionNode(functionNode))); }
[ "Node", "createThisAliasDeclarationForFunction", "(", "String", "aliasName", ",", "Node", "functionNode", ")", "{", "return", "createSingleConstNameDeclaration", "(", "aliasName", ",", "createThis", "(", "getTypeOfThisForFunctionNode", "(", "functionNode", ")", ")", ")", ...
Creates a statement declaring a const alias for "this" to be used in the given function node. <p>e.g. `const aliasName = this;`
[ "Creates", "a", "statement", "declaring", "a", "const", "alias", "for", "this", "to", "be", "used", "in", "the", "given", "function", "node", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstFactory.java#L322-L325
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java
QueryImpl.bindValue
public void bindValue(String varName, Value value) throws IllegalArgumentException, RepositoryException { """ Binds the given <code>value</code> to the variable named <code>varName</code>. @param varName name of variable in query @param value value to bind @throws IllegalArgumentException if <code>var...
java
public void bindValue(String varName, Value value) throws IllegalArgumentException, RepositoryException { checkInitialized(); query.bindValue(session.getLocationFactory().parseJCRName(varName).getInternalName(), value); }
[ "public", "void", "bindValue", "(", "String", "varName", ",", "Value", "value", ")", "throws", "IllegalArgumentException", ",", "RepositoryException", "{", "checkInitialized", "(", ")", ";", "query", ".", "bindValue", "(", "session", ".", "getLocationFactory", "("...
Binds the given <code>value</code> to the variable named <code>varName</code>. @param varName name of variable in query @param value value to bind @throws IllegalArgumentException if <code>varName</code> is not a valid variable in this query. @throws javax.jcr.RepositoryException if an error occurs.
[ "Binds", "the", "given", "<code", ">", "value<", "/", "code", ">", "to", "the", "variable", "named", "<code", ">", "varName<", "/", "code", ">", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/QueryImpl.java#L290-L294
Azure/autorest-clientruntime-for-java
azure-arm-client-runtime/src/main/java/com/microsoft/azure/arm/resources/collection/implementation/ExternalChildResourceCollectionImpl.java
ExternalChildResourceCollectionImpl.commitAndGetAllAsync
public Observable<List<FluentModelTImpl>> commitAndGetAllAsync() { """ Commits the changes in the external child resource childCollection. <p/> This method returns a observable stream, either its observer's onError will be called with {@link CompositeException} if some resources failed to commit or onNext will ...
java
public Observable<List<FluentModelTImpl>> commitAndGetAllAsync() { return commitAsync().collect( new Func0<List<FluentModelTImpl>>() { public List<FluentModelTImpl> call() { return new ArrayList<>(); } }, ...
[ "public", "Observable", "<", "List", "<", "FluentModelTImpl", ">", ">", "commitAndGetAllAsync", "(", ")", "{", "return", "commitAsync", "(", ")", ".", "collect", "(", "new", "Func0", "<", "List", "<", "FluentModelTImpl", ">", ">", "(", ")", "{", "public", ...
Commits the changes in the external child resource childCollection. <p/> This method returns a observable stream, either its observer's onError will be called with {@link CompositeException} if some resources failed to commit or onNext will be called if all resources committed successfully. @return the observable stre...
[ "Commits", "the", "changes", "in", "the", "external", "child", "resource", "childCollection", ".", "<p", "/", ">", "This", "method", "returns", "a", "observable", "stream", "either", "its", "observer", "s", "onError", "will", "be", "called", "with", "{", "@l...
train
https://github.com/Azure/autorest-clientruntime-for-java/blob/04621e07dbb0456dd5459dd641f06a9fd4f3abad/azure-arm-client-runtime/src/main/java/com/microsoft/azure/arm/resources/collection/implementation/ExternalChildResourceCollectionImpl.java#L273-L285
codeprimate-software/cp-elements
src/main/java/org/cp/elements/beans/AbstractBean.java
AbstractBean.processChange
@SuppressWarnings("unchecked") protected void processChange(String propertyName, Object oldValue, Object newValue, StateChangeCallback callback) { """ Processes the change in state to the particular property of this Bean. A PropertyChangeEvent is created to notify all listeners of the state change. First, Vet...
java
@SuppressWarnings("unchecked") protected void processChange(String propertyName, Object oldValue, Object newValue, StateChangeCallback callback) { try { PropertyChangeEvent event = newPropertyChangeEvent(propertyName, oldValue, newValue); fireVetoableChange(event); if (callback != null) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "void", "processChange", "(", "String", "propertyName", ",", "Object", "oldValue", ",", "Object", "newValue", ",", "StateChangeCallback", "callback", ")", "{", "try", "{", "PropertyChangeEvent", "event...
Processes the change in state to the particular property of this Bean. A PropertyChangeEvent is created to notify all listeners of the state change. First, VetoableChangeListeners are notified of the pending change in order to validate the change and veto any undesired change to the specified property. Next, the sta...
[ "Processes", "the", "change", "in", "state", "to", "the", "particular", "property", "of", "this", "Bean", ".", "A", "PropertyChangeEvent", "is", "created", "to", "notify", "all", "listeners", "of", "the", "state", "change", ".", "First", "VetoableChangeListeners...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/beans/AbstractBean.java#L666-L691
cycorp/api-suite
core-api/src/main/java/com/cyc/session/exception/OpenCycUnsupportedFeatureException.java
OpenCycUnsupportedFeatureException.fromThrowable
public static OpenCycUnsupportedFeatureException fromThrowable(String message, Throwable cause) { """ Converts a Throwable to a OpenCycUnsupportedFeatureException with the specified detail message. If the Throwable is a OpenCycUnsupportedFeatureException and if the Throwable's message is identical to the one sup...
java
public static OpenCycUnsupportedFeatureException fromThrowable(String message, Throwable cause) { return (cause instanceof OpenCycUnsupportedFeatureException && Objects.equals(message, cause.getMessage())) ? (OpenCycUnsupportedFeatureException) cause : new OpenCycUnsupportedFea...
[ "public", "static", "OpenCycUnsupportedFeatureException", "fromThrowable", "(", "String", "message", ",", "Throwable", "cause", ")", "{", "return", "(", "cause", "instanceof", "OpenCycUnsupportedFeatureException", "&&", "Objects", ".", "equals", "(", "message", ",", "...
Converts a Throwable to a OpenCycUnsupportedFeatureException with the specified detail message. If the Throwable is a OpenCycUnsupportedFeatureException and if the Throwable's message is identical to the one supplied, the Throwable will be passed through unmodified; otherwise, it will be wrapped in a new OpenCycUnsuppo...
[ "Converts", "a", "Throwable", "to", "a", "OpenCycUnsupportedFeatureException", "with", "the", "specified", "detail", "message", ".", "If", "the", "Throwable", "is", "a", "OpenCycUnsupportedFeatureException", "and", "if", "the", "Throwable", "s", "message", "is", "id...
train
https://github.com/cycorp/api-suite/blob/1d52affabc4635e3715a059e38741712cbdbf2d5/core-api/src/main/java/com/cyc/session/exception/OpenCycUnsupportedFeatureException.java#L63-L67
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/parse/AbstractContextGenerator.java
AbstractContextGenerator.getFrontierNodes
protected void getFrontierNodes(final List<Parse> rf, final Parse[] nodes) { """ Populates specified nodes array with left-most right frontier node with a unique head. If the right frontier doesn't contain enough nodes, then nulls are placed in the array elements. @param rf The current right frontier. @para...
java
protected void getFrontierNodes(final List<Parse> rf, final Parse[] nodes) { int leftIndex = 0; int prevHeadIndex = -1; for (int fi = 0; fi < rf.size(); fi++) { final Parse fn = rf.get(fi); final int headIndex = fn.getHeadIndex(); if (headIndex != prevHeadIndex) { nodes[leftIndex]...
[ "protected", "void", "getFrontierNodes", "(", "final", "List", "<", "Parse", ">", "rf", ",", "final", "Parse", "[", "]", "nodes", ")", "{", "int", "leftIndex", "=", "0", ";", "int", "prevHeadIndex", "=", "-", "1", ";", "for", "(", "int", "fi", "=", ...
Populates specified nodes array with left-most right frontier node with a unique head. If the right frontier doesn't contain enough nodes, then nulls are placed in the array elements. @param rf The current right frontier. @param nodes The array to be populated.
[ "Populates", "specified", "nodes", "array", "with", "left", "-", "most", "right", "frontier", "node", "with", "a", "unique", "head", ".", "If", "the", "right", "frontier", "doesn", "t", "contain", "enough", "nodes", "then", "nulls", "are", "placed", "in", ...
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/parse/AbstractContextGenerator.java#L559-L578
aspectran/aspectran
core/src/main/java/com/aspectran/core/util/ExceptionUtils.java
ExceptionUtils.getStacktrace
public static String getStacktrace(Throwable throwable) { """ Gets the stack trace from a Throwable as a String. <p>The result of this method vary by JDK version as this method uses {@link Throwable#printStackTrace(java.io.PrintWriter)}. On JDK1.3 and earlier, the cause exception will not be shown unless the...
java
public static String getStacktrace(Throwable throwable) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw, true); throwable.printStackTrace(pw); return sw.getBuffer().toString().trim(); }
[ "public", "static", "String", "getStacktrace", "(", "Throwable", "throwable", ")", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "PrintWriter", "pw", "=", "new", "PrintWriter", "(", "sw", ",", "true", ")", ";", "throwable", ".", "pr...
Gets the stack trace from a Throwable as a String. <p>The result of this method vary by JDK version as this method uses {@link Throwable#printStackTrace(java.io.PrintWriter)}. On JDK1.3 and earlier, the cause exception will not be shown unless the specified throwable alters printStackTrace.</p> @param throwable the {...
[ "Gets", "the", "stack", "trace", "from", "a", "Throwable", "as", "a", "String", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/util/ExceptionUtils.java#L60-L65
Esri/spatial-framework-for-hadoop
hive/src/main/java/com/esri/hadoop/hive/BinUtils.java
BinUtils.queryEnvelope
public void queryEnvelope(double x, double y, Envelope envelope) { """ Gets the envelope for the bin that contains the x,y coords. @param x @param y @param envelope """ double down = (extentMax - y) / binSize; double over = (x - extentMin) / binSize; double xmin = extentMin + (over * binSize)...
java
public void queryEnvelope(double x, double y, Envelope envelope) { double down = (extentMax - y) / binSize; double over = (x - extentMin) / binSize; double xmin = extentMin + (over * binSize); double xmax = xmin + binSize; double ymax = extentMax - (down * binSize); double ymin = ymax - binSize; ...
[ "public", "void", "queryEnvelope", "(", "double", "x", ",", "double", "y", ",", "Envelope", "envelope", ")", "{", "double", "down", "=", "(", "extentMax", "-", "y", ")", "/", "binSize", ";", "double", "over", "=", "(", "x", "-", "extentMin", ")", "/"...
Gets the envelope for the bin that contains the x,y coords. @param x @param y @param envelope
[ "Gets", "the", "envelope", "for", "the", "bin", "that", "contains", "the", "x", "y", "coords", "." ]
train
https://github.com/Esri/spatial-framework-for-hadoop/blob/00959d6b4465313c934aaa8aaf17b52d6c9c60d4/hive/src/main/java/com/esri/hadoop/hive/BinUtils.java#L65-L75
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/internal/PageFlowTagUtils.java
PageFlowTagUtils.getToken
public static String getToken(HttpServletRequest request, String action) { """ Get or generate a token used to prevent double submits to an action. The token is stored in the session, and checked (and removed) when processing an action with the <code>preventDoubleSubmit</code> attribute set to <code>true</code>...
java
public static String getToken(HttpServletRequest request, String action) { FlowController flowController = PageFlowUtils.getCurrentPageFlow(request); if (flowController != null) { MappingAndController mac = getActionMapping(request, flowController, action); if (mac != null) ...
[ "public", "static", "String", "getToken", "(", "HttpServletRequest", "request", ",", "String", "action", ")", "{", "FlowController", "flowController", "=", "PageFlowUtils", ".", "getCurrentPageFlow", "(", "request", ")", ";", "if", "(", "flowController", "!=", "nu...
Get or generate a token used to prevent double submits to an action. The token is stored in the session, and checked (and removed) when processing an action with the <code>preventDoubleSubmit</code> attribute set to <code>true</code>.
[ "Get", "or", "generate", "a", "token", "used", "to", "prevent", "double", "submits", "to", "an", "action", ".", "The", "token", "is", "stored", "in", "the", "session", "and", "checked", "(", "and", "removed", ")", "when", "processing", "an", "action", "w...
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/internal/PageFlowTagUtils.java#L144-L154
gallandarakhneorg/afc
core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java
GraphPath.splitAfter
public GP splitAfter(ST obj, PT startPoint) { """ Split this path and retains the first part of the part in this object and reply the second part. The first occurrence of specified element will be in the first part. <p>This function removes until the <i>last occurence</i> of the given object. @param obj ...
java
public GP splitAfter(ST obj, PT startPoint) { return splitAt(indexOf(obj, startPoint), false); }
[ "public", "GP", "splitAfter", "(", "ST", "obj", ",", "PT", "startPoint", ")", "{", "return", "splitAt", "(", "indexOf", "(", "obj", ",", "startPoint", ")", ",", "false", ")", ";", "}" ]
Split this path and retains the first part of the part in this object and reply the second part. The first occurrence of specified element will be in the first part. <p>This function removes until the <i>last occurence</i> of the given object. @param obj the reference segment. @param startPoint is the starting point ...
[ "Split", "this", "path", "and", "retains", "the", "first", "part", "of", "the", "part", "in", "this", "object", "and", "reply", "the", "second", "part", ".", "The", "first", "occurrence", "of", "specified", "element", "will", "be", "in", "the", "first", ...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgraph/src/main/java/org/arakhne/afc/math/graph/GraphPath.java#L1234-L1236
camunda/camunda-bpmn-model
src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractThrowEventBuilder.java
AbstractThrowEventBuilder.messageEventDefinition
public MessageEventDefinitionBuilder messageEventDefinition(String id) { """ Creates an empty message event definition with the given id and returns a builder for the message event definition. @param id the id of the message event definition @return the message event definition builder object """ Mess...
java
public MessageEventDefinitionBuilder messageEventDefinition(String id) { MessageEventDefinition messageEventDefinition = createEmptyMessageEventDefinition(); if (id != null) { messageEventDefinition.setId(id); } element.getEventDefinitions().add(messageEventDefinition); return new MessageEven...
[ "public", "MessageEventDefinitionBuilder", "messageEventDefinition", "(", "String", "id", ")", "{", "MessageEventDefinition", "messageEventDefinition", "=", "createEmptyMessageEventDefinition", "(", ")", ";", "if", "(", "id", "!=", "null", ")", "{", "messageEventDefinitio...
Creates an empty message event definition with the given id and returns a builder for the message event definition. @param id the id of the message event definition @return the message event definition builder object
[ "Creates", "an", "empty", "message", "event", "definition", "with", "the", "given", "id", "and", "returns", "a", "builder", "for", "the", "message", "event", "definition", "." ]
train
https://github.com/camunda/camunda-bpmn-model/blob/debcadf041d10fa62b799de0307b832cea84e5d4/src/main/java/org/camunda/bpm/model/bpmn/builder/AbstractThrowEventBuilder.java#L66-L74
forge/core
ui/api/src/main/java/org/jboss/forge/addon/ui/util/Categories.java
Categories.create
public static UICategory create(UICategory category, String... categories) { """ Using the given {@link UICategory} as a parent, produce a hierarchical {@link UICategory} instance from the given sub-category names. """ Assert.notNull(category, "Parent UICategory must not be null."); Assert.notNull...
java
public static UICategory create(UICategory category, String... categories) { Assert.notNull(category, "Parent UICategory must not be null."); Assert.notNull(categories, "Sub categories must not be null."); List<String> args = new ArrayList<>(); args.add(category.getName()); args.addAll(...
[ "public", "static", "UICategory", "create", "(", "UICategory", "category", ",", "String", "...", "categories", ")", "{", "Assert", ".", "notNull", "(", "category", ",", "\"Parent UICategory must not be null.\"", ")", ";", "Assert", ".", "notNull", "(", "categories...
Using the given {@link UICategory} as a parent, produce a hierarchical {@link UICategory} instance from the given sub-category names.
[ "Using", "the", "given", "{" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/ui/api/src/main/java/org/jboss/forge/addon/ui/util/Categories.java#L38-L46
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/MatrixIO.java
MatrixIO.readMatrix
public static Matrix readMatrix(File matrix, Format format, Type matrixType, boolean transposeOnRead) throws IOException { """ Converts the contents of a matrix file as a {@link Matrix} object, using the provided type description as a hint for what kind to create....
java
public static Matrix readMatrix(File matrix, Format format, Type matrixType, boolean transposeOnRead) throws IOException { try { switch(format) { case DENSE_TEXT: return readDenseTextMatrix(matrix, matrixType, transposeO...
[ "public", "static", "Matrix", "readMatrix", "(", "File", "matrix", ",", "Format", "format", ",", "Type", "matrixType", ",", "boolean", "transposeOnRead", ")", "throws", "IOException", "{", "try", "{", "switch", "(", "format", ")", "{", "case", "DENSE_TEXT", ...
Converts the contents of a matrix file as a {@link Matrix} object, using the provided type description as a hint for what kind to create. The type of {@code Matrix} object created will be based on an estimate of whether the data will fit into the available memory. Note that the returned {@link Matrix} instance is not...
[ "Converts", "the", "contents", "of", "a", "matrix", "file", "as", "a", "{", "@link", "Matrix", "}", "object", "using", "the", "provided", "type", "description", "as", "a", "hint", "for", "what", "kind", "to", "create", ".", "The", "type", "of", "{", "@...
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/MatrixIO.java#L789-L828
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java
AbstractBeanDefinition.findBeanForConstructorArgument
@SuppressWarnings("WeakerAccess") @Internal protected final Optional findBeanForConstructorArgument(BeanResolutionContext resolutionContext, BeanContext context, @SuppressWarnings("unused") ConstructorInjectionPoint<T> constructorInjectionPoint, Argument argument) { """ Obtains all bean definitions for a c...
java
@SuppressWarnings("WeakerAccess") @Internal protected final Optional findBeanForConstructorArgument(BeanResolutionContext resolutionContext, BeanContext context, @SuppressWarnings("unused") ConstructorInjectionPoint<T> constructorInjectionPoint, Argument argument) { return resolveBeanWithGenericsFromCon...
[ "@", "SuppressWarnings", "(", "\"WeakerAccess\"", ")", "@", "Internal", "protected", "final", "Optional", "findBeanForConstructorArgument", "(", "BeanResolutionContext", "resolutionContext", ",", "BeanContext", "context", ",", "@", "SuppressWarnings", "(", "\"unused\"", "...
Obtains all bean definitions for a constructor argument at the given index <p> Warning: this method is used by internal generated code and should not be called by user code. @param resolutionContext The resolution context @param context The context @param constructorInjectionPoint The constru...
[ "Obtains", "all", "bean", "definitions", "for", "a", "constructor", "argument", "at", "the", "given", "index", "<p", ">", "Warning", ":", "this", "method", "is", "used", "by", "internal", "generated", "code", "and", "should", "not", "be", "called", "by", "...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/context/AbstractBeanDefinition.java#L1124-L1130
mpetazzoni/ttorrent
ttorrent-client/src/main/java/com/turn/ttorrent/client/CommunicationManager.java
CommunicationManager.addTorrent
public TorrentManager addTorrent(String dotTorrentFilePath, String downloadDirPath) throws IOException { """ Adds torrent to storage, validate downloaded files and start seeding and leeching the torrent @param dotTorrentFilePath path to torrent metadata file @param downloadDirPath path to directory where do...
java
public TorrentManager addTorrent(String dotTorrentFilePath, String downloadDirPath) throws IOException { return addTorrent(dotTorrentFilePath, downloadDirPath, FairPieceStorageFactory.INSTANCE); }
[ "public", "TorrentManager", "addTorrent", "(", "String", "dotTorrentFilePath", ",", "String", "downloadDirPath", ")", "throws", "IOException", "{", "return", "addTorrent", "(", "dotTorrentFilePath", ",", "downloadDirPath", ",", "FairPieceStorageFactory", ".", "INSTANCE", ...
Adds torrent to storage, validate downloaded files and start seeding and leeching the torrent @param dotTorrentFilePath path to torrent metadata file @param downloadDirPath path to directory where downloaded files are placed @return {@link TorrentManager} instance for monitoring torrent state @throws IOException if...
[ "Adds", "torrent", "to", "storage", "validate", "downloaded", "files", "and", "start", "seeding", "and", "leeching", "the", "torrent" ]
train
https://github.com/mpetazzoni/ttorrent/blob/ecd0e6caf853b63393c4ab63cfd8f20114f73f70/ttorrent-client/src/main/java/com/turn/ttorrent/client/CommunicationManager.java#L129-L131
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/analysis/AnnotationValue.java
AnnotationValue.getAnnotationVisitor
public AnnotationVisitor getAnnotationVisitor() { """ Get an AnnotationVisitor which can populate this AnnotationValue object. """ return new AnnotationVisitor(FindBugsASM.ASM_VERSION) { @Override public void visit(String name, Object value) { name = canonicalStr...
java
public AnnotationVisitor getAnnotationVisitor() { return new AnnotationVisitor(FindBugsASM.ASM_VERSION) { @Override public void visit(String name, Object value) { name = canonicalString(name); valueMap.put(name, value); } /* ...
[ "public", "AnnotationVisitor", "getAnnotationVisitor", "(", ")", "{", "return", "new", "AnnotationVisitor", "(", "FindBugsASM", ".", "ASM_VERSION", ")", "{", "@", "Override", "public", "void", "visit", "(", "String", "name", ",", "Object", "value", ")", "{", "...
Get an AnnotationVisitor which can populate this AnnotationValue object.
[ "Get", "an", "AnnotationVisitor", "which", "can", "populate", "this", "AnnotationValue", "object", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/analysis/AnnotationValue.java#L113-L174
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/nfs/nfs3/Nfs3.java
Nfs3.checkForBlank
private void checkForBlank(String value, String name) { """ Convenience method to check String parameters that cannot be blank. @param value The parameter value. @param name The parameter name, for exception messages. """ if (StringUtils.isBlank(value)) { throw new IllegalArgumentExcept...
java
private void checkForBlank(String value, String name) { if (StringUtils.isBlank(value)) { throw new IllegalArgumentException(name + " cannot be empty"); } }
[ "private", "void", "checkForBlank", "(", "String", "value", ",", "String", "name", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "value", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "name", "+", "\" cannot be empty\"", ")", ";"...
Convenience method to check String parameters that cannot be blank. @param value The parameter value. @param name The parameter name, for exception messages.
[ "Convenience", "method", "to", "check", "String", "parameters", "that", "cannot", "be", "blank", "." ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/nfs/nfs3/Nfs3.java#L272-L276
EdwardRaff/JSAT
JSAT/src/jsat/regression/StochasticGradientBoosting.java
StochasticGradientBoosting.getDerivativeFunc
private Function1D getDerivativeFunc(final RegressionDataSet backingResidsList, final Regressor h) { """ Returns a function object that approximates the derivative of the squared error of the Regressor as a function of the constant factor multiplied on the Regressor's output. @param backingResidsList the Data...
java
private Function1D getDerivativeFunc(final RegressionDataSet backingResidsList, final Regressor h) { final Function1D fhPrime = (double x) -> { double c1 = x;//c2=c1-eps double eps = 1e-5; double c1Pc2 = c1 * 2 - eps;//c1+c2 = c1+c1-eps double result =...
[ "private", "Function1D", "getDerivativeFunc", "(", "final", "RegressionDataSet", "backingResidsList", ",", "final", "Regressor", "h", ")", "{", "final", "Function1D", "fhPrime", "=", "(", "double", "x", ")", "->", "{", "double", "c1", "=", "x", ";", "//c2=c1-e...
Returns a function object that approximates the derivative of the squared error of the Regressor as a function of the constant factor multiplied on the Regressor's output. @param backingResidsList the DataPointPair list of residuals @param h the regressor that is having the error of its output minimized @return a Func...
[ "Returns", "a", "function", "object", "that", "approximates", "the", "derivative", "of", "the", "squared", "error", "of", "the", "Regressor", "as", "a", "function", "of", "the", "constant", "factor", "multiplied", "on", "the", "Regressor", "s", "output", "." ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/regression/StochasticGradientBoosting.java#L320-L365
Whiley/WhileyCompiler
src/main/java/wyil/type/util/TypeSubtractor.java
TypeSubtractor.countFieldMatches
private int countFieldMatches(Tuple<Type.Field> lhsFields, Tuple<Type.Field> rhsFields) { """ Simply count the number of fields in the lhs which match a field in the rhs. This provides critical information. For example, when subtracting <code>{int f, int g}</code> from <code>{int f, int h}</code> it is apparent ...
java
private int countFieldMatches(Tuple<Type.Field> lhsFields, Tuple<Type.Field> rhsFields) { int matches = 0; for (int i = 0; i != lhsFields.size(); ++i) { Type.Field lhsField = lhsFields.get(i); Identifier lhsFieldName = lhsField.getName(); for (int j = 0; j != rhsFields.size(); ++j) { Type.Field rhsFiel...
[ "private", "int", "countFieldMatches", "(", "Tuple", "<", "Type", ".", "Field", ">", "lhsFields", ",", "Tuple", "<", "Type", ".", "Field", ">", "rhsFields", ")", "{", "int", "matches", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "!="...
Simply count the number of fields in the lhs which match a field in the rhs. This provides critical information. For example, when subtracting <code>{int f, int g}</code> from <code>{int f, int h}</code> it is apparent that not all fields in the lhs are matched. @param lhsFields @param rhsFields @return
[ "Simply", "count", "the", "number", "of", "fields", "in", "the", "lhs", "which", "match", "a", "field", "in", "the", "rhs", ".", "This", "provides", "critical", "information", ".", "For", "example", "when", "subtracting", "<code", ">", "{", "int", "f", "...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/type/util/TypeSubtractor.java#L155-L170
ibm-bluemix-mobile-services/bms-clientsdk-android-core
lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java
AuthorizationRequestManager.sendRequest
public void sendRequest(String path, RequestOptions options) throws IOException, JSONException { """ Assembles the request path from root and path to authorization endpoint and sends the request. @param path Path to authorization endpoint @param options BaseRequest options @throws IOException @throws JSON...
java
public void sendRequest(String path, RequestOptions options) throws IOException, JSONException { String rootUrl; if (path == null) { throw new IllegalArgumentException("'path' parameter can't be null."); } if (path.indexOf(BMSClient.HTTP_SCHEME) == 0 && path.contains(":")) ...
[ "public", "void", "sendRequest", "(", "String", "path", ",", "RequestOptions", "options", ")", "throws", "IOException", ",", "JSONException", "{", "String", "rootUrl", ";", "if", "(", "path", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", ...
Assembles the request path from root and path to authorization endpoint and sends the request. @param path Path to authorization endpoint @param options BaseRequest options @throws IOException @throws JSONException
[ "Assembles", "the", "request", "path", "from", "root", "and", "path", "to", "authorization", "endpoint", "and", "sends", "the", "request", "." ]
train
https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-android-core/blob/8db4f00d0d564792397bfc0e5bd57d52a238b858/lib/src/main/java/com/ibm/mobilefirstplatform/clientsdk/android/security/mca/internal/AuthorizationRequestManager.java#L158-L197
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java
MeshGenerator.generateCrosshairs
public static void generateCrosshairs(TFloatList positions, TIntList indices, float length) { """ Generates a crosshairs shaped wireframe in 3D. The center is at the intersection point of the three lines. @param positions Where to save the position information @param indices Where to save the indices @param l...
java
public static void generateCrosshairs(TFloatList positions, TIntList indices, float length) { /* * \ | * \| * ----O----- * |\ * | \ */ length /= 2; // Add the x axis line addAll(positions, -length, 0, 0, length, 0, 0); ...
[ "public", "static", "void", "generateCrosshairs", "(", "TFloatList", "positions", ",", "TIntList", "indices", ",", "float", "length", ")", "{", "/*\n * \\ |\n * \\|\n * ----O-----\n * |\\\n * | \\\n */", "length", "/=", ...
Generates a crosshairs shaped wireframe in 3D. The center is at the intersection point of the three lines. @param positions Where to save the position information @param indices Where to save the indices @param length The length for the three lines
[ "Generates", "a", "crosshairs", "shaped", "wireframe", "in", "3D", ".", "The", "center", "is", "at", "the", "intersection", "point", "of", "the", "three", "lines", "." ]
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/util/MeshGenerator.java#L504-L522
gallandarakhneorg/afc
advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/GeomFactory2ifx.java
GeomFactory2ifx.newPoint
@SuppressWarnings("static-method") public Point2ifx newPoint(IntegerProperty x, IntegerProperty y) { """ Create a point with properties. @param x the x property. @param y the y property. @return the vector. """ return new Point2ifx(x, y); }
java
@SuppressWarnings("static-method") public Point2ifx newPoint(IntegerProperty x, IntegerProperty y) { return new Point2ifx(x, y); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "public", "Point2ifx", "newPoint", "(", "IntegerProperty", "x", ",", "IntegerProperty", "y", ")", "{", "return", "new", "Point2ifx", "(", "x", ",", "y", ")", ";", "}" ]
Create a point with properties. @param x the x property. @param y the y property. @return the vector.
[ "Create", "a", "point", "with", "properties", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/GeomFactory2ifx.java#L106-L109
cogroo/cogroo4
lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/MessageBox.java
MessageBox.showMessageBox
public short showMessageBox(XWindowPeer _xParentWindowPeer, String _sTitle, String _sMessage, String _aType, int _aButtons) { """ Shows an messagebox @param _xParentWindowPeer the windowpeer of the parent window @param _sTitle the title of the messagebox @param _sMessage the message of the messagebox @param _a...
java
public short showMessageBox(XWindowPeer _xParentWindowPeer, String _sTitle, String _sMessage, String _aType, int _aButtons) { short nResult = -1; XComponent xComponent = null; try { Object oToolkit = m_xMCF.createInstanceWithContext("com.sun.star.awt.Toolkit", m_xContext); ...
[ "public", "short", "showMessageBox", "(", "XWindowPeer", "_xParentWindowPeer", ",", "String", "_sTitle", ",", "String", "_sMessage", ",", "String", "_aType", ",", "int", "_aButtons", ")", "{", "short", "nResult", "=", "-", "1", ";", "XComponent", "xComponent", ...
Shows an messagebox @param _xParentWindowPeer the windowpeer of the parent window @param _sTitle the title of the messagebox @param _sMessage the message of the messagebox @param _aType string which determines the message box type: (infobox|warningbox|errorbox|querybox|messbox) @param _aButtons MessageBoxButtons which ...
[ "Shows", "an", "messagebox" ]
train
https://github.com/cogroo/cogroo4/blob/b6228900c20c6b37eac10a03708a9669dd562f52/lang/pt_br/cogroo-addon/src/org/cogroo/addon/dialogs/MessageBox.java#L58-L80
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java
CPDefinitionPersistenceImpl.removeByC_S
@Override public void removeByC_S(long CProductId, int status) { """ Removes all the cp definitions where CProductId = &#63; and status = &#63; from the database. @param CProductId the c product ID @param status the status """ for (CPDefinition cpDefinition : findByC_S(CProductId, status, QueryUtil....
java
@Override public void removeByC_S(long CProductId, int status) { for (CPDefinition cpDefinition : findByC_S(CProductId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinition); } }
[ "@", "Override", "public", "void", "removeByC_S", "(", "long", "CProductId", ",", "int", "status", ")", "{", "for", "(", "CPDefinition", "cpDefinition", ":", "findByC_S", "(", "CProductId", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", "...
Removes all the cp definitions where CProductId = &#63; and status = &#63; from the database. @param CProductId the c product ID @param status the status
[ "Removes", "all", "the", "cp", "definitions", "where", "CProductId", "=", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionPersistenceImpl.java#L4548-L4554
NoraUi/NoraUi
src/main/java/com/github/noraui/application/steps/Step.java
Step.updateRadioList
protected void updateRadioList(PageElement pageElement, String valueOrKey) throws TechnicalException, FailureException { """ Update html radio button by text "input". @param pageElement Is concerned element @param valueOrKey Is the value (value or value in context (after a save)) use for selection @throws T...
java
protected void updateRadioList(PageElement pageElement, String valueOrKey) throws TechnicalException, FailureException { final String value = Context.getValue(valueOrKey) != null ? Context.getValue(valueOrKey) : valueOrKey; try { final List<WebElement> radioButtons = Context.waitUntil(Exp...
[ "protected", "void", "updateRadioList", "(", "PageElement", "pageElement", ",", "String", "valueOrKey", ")", "throws", "TechnicalException", ",", "FailureException", "{", "final", "String", "value", "=", "Context", ".", "getValue", "(", "valueOrKey", ")", "!=", "n...
Update html radio button by text "input". @param pageElement Is concerned element @param valueOrKey Is the value (value or value in context (after a save)) use for selection @throws TechnicalException is thrown if you have a technical error (format, configuration, datas, ...) in NoraUi. Failure with {@value com.github...
[ "Update", "html", "radio", "button", "by", "text", "input", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/application/steps/Step.java#L658-L671
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqlifnull
public static void sqlifnull(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ ifnull translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ twoArgumentsFunctionCall(buf, "coalesce(", "ifnull"...
java
public static void sqlifnull(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { twoArgumentsFunctionCall(buf, "coalesce(", "ifnull", parsedArgs); }
[ "public", "static", "void", "sqlifnull", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "twoArgumentsFunctionCall", "(", "buf", ",", "\"coalesce(\"", ",", "\"ifnull\"", ",", "...
ifnull translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "ifnull", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L626-L628
meltmedia/cadmium
cli/src/main/java/com/meltmedia/cadmium/cli/UpdateCommand.java
UpdateCommand.isValidBranchName
public static boolean isValidBranchName(String branch, String prefix) throws Exception { """ Validates the branch name that will be sent to the given prefix. @param branch @param prefix @return """ if(StringUtils.isNotBlank(prefix) && StringUtils.isNotBlank(branch)) { if(StringUtils.startsWithIg...
java
public static boolean isValidBranchName(String branch, String prefix) throws Exception { if(StringUtils.isNotBlank(prefix) && StringUtils.isNotBlank(branch)) { if(StringUtils.startsWithIgnoreCase(branch, prefix + "-")) { return true; } else { System.err.println("Branch name must start wi...
[ "public", "static", "boolean", "isValidBranchName", "(", "String", "branch", ",", "String", "prefix", ")", "throws", "Exception", "{", "if", "(", "StringUtils", ".", "isNotBlank", "(", "prefix", ")", "&&", "StringUtils", ".", "isNotBlank", "(", "branch", ")", ...
Validates the branch name that will be sent to the given prefix. @param branch @param prefix @return
[ "Validates", "the", "branch", "name", "that", "will", "be", "sent", "to", "the", "given", "prefix", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/cli/src/main/java/com/meltmedia/cadmium/cli/UpdateCommand.java#L253-L264
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.projectiveToMetricKnownK
public static void projectiveToMetricKnownK( DMatrixRMaj cameraMatrix , DMatrixRMaj H , DMatrixRMaj K, Se3_F64 worldToView ) { """ Convert the projective camera matrix into a metric transform given the rectifying homography and a known calibration matrix. {@code P = K*[R|T]*H} where H...
java
public static void projectiveToMetricKnownK( DMatrixRMaj cameraMatrix , DMatrixRMaj H , DMatrixRMaj K, Se3_F64 worldToView ) { DMatrixRMaj tmp = new DMatrixRMaj(3,4); CommonOps_DDRM.mult(cameraMatrix,H,tmp); DMatrixRMaj K_inv = new DMatrixRMaj(3,3); CommonOps_DDRM.invert(K,K_inv); ...
[ "public", "static", "void", "projectiveToMetricKnownK", "(", "DMatrixRMaj", "cameraMatrix", ",", "DMatrixRMaj", "H", ",", "DMatrixRMaj", "K", ",", "Se3_F64", "worldToView", ")", "{", "DMatrixRMaj", "tmp", "=", "new", "DMatrixRMaj", "(", "3", ",", "4", ")", ";"...
Convert the projective camera matrix into a metric transform given the rectifying homography and a known calibration matrix. {@code P = K*[R|T]*H} where H is the inverse of the rectifying homography. @param cameraMatrix (Input) camera matrix. 3x4 @param H (Input) Rectifying homography. 4x4 @param K (Input) Known cali...
[ "Convert", "the", "projective", "camera", "matrix", "into", "a", "metric", "transform", "given", "the", "rectifying", "homography", "and", "a", "known", "calibration", "matrix", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1378-L1410
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java
FindBugs2.logRecoverableException
private void logRecoverableException(ClassDescriptor classDescriptor, Detector2 detector, Throwable e) { """ Report an exception that occurred while analyzing a class with a detector. @param classDescriptor class being analyzed @param detector detector doing the analysis @param e the exception """ ...
java
private void logRecoverableException(ClassDescriptor classDescriptor, Detector2 detector, Throwable e) { bugReporter.logError( "Exception analyzing " + classDescriptor.toDottedClassName() + " using detector " + detector.getDetectorClassName(), e); }
[ "private", "void", "logRecoverableException", "(", "ClassDescriptor", "classDescriptor", ",", "Detector2", "detector", ",", "Throwable", "e", ")", "{", "bugReporter", ".", "logError", "(", "\"Exception analyzing \"", "+", "classDescriptor", ".", "toDottedClassName", "("...
Report an exception that occurred while analyzing a class with a detector. @param classDescriptor class being analyzed @param detector detector doing the analysis @param e the exception
[ "Report", "an", "exception", "that", "occurred", "while", "analyzing", "a", "class", "with", "a", "detector", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/FindBugs2.java#L1159-L1163
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/utils/GrassLegacyUtilities.java
GrassLegacyUtilities.ByteBufferImage
public static BufferedImage ByteBufferImage( byte[] data, int width, int height ) { """ create a buffered image from a set of color triplets @param data @param width @param height @return """ int[] bandoffsets = {0, 1, 2, 3}; DataBufferByte dbb = new DataBufferByte(data, data.length); ...
java
public static BufferedImage ByteBufferImage( byte[] data, int width, int height ) { int[] bandoffsets = {0, 1, 2, 3}; DataBufferByte dbb = new DataBufferByte(data, data.length); WritableRaster wr = Raster.createInterleavedRaster(dbb, width, height, width * 4, 4, bandoffsets, null); int[]...
[ "public", "static", "BufferedImage", "ByteBufferImage", "(", "byte", "[", "]", "data", ",", "int", "width", ",", "int", "height", ")", "{", "int", "[", "]", "bandoffsets", "=", "{", "0", ",", "1", ",", "2", ",", "3", "}", ";", "DataBufferByte", "dbb"...
create a buffered image from a set of color triplets @param data @param width @param height @return
[ "create", "a", "buffered", "image", "from", "a", "set", "of", "color", "triplets" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/utils/GrassLegacyUtilities.java#L322-L332
infinispan/infinispan
remote-query/remote-query-server/src/main/java/org/infinispan/query/remote/impl/LifecycleManager.java
LifecycleManager.cacheStarting
@Override public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) { """ Registers the remote value wrapper interceptor in the cache before it gets started. """ BasicComponentRegistry gcr = cr.getGlobalComponentRegistry().getComponent(BasicComponentRegistry.class); In...
java
@Override public void cacheStarting(ComponentRegistry cr, Configuration cfg, String cacheName) { BasicComponentRegistry gcr = cr.getGlobalComponentRegistry().getComponent(BasicComponentRegistry.class); InternalCacheRegistry icr = gcr.getComponent(InternalCacheRegistry.class).running(); if (!icr.isI...
[ "@", "Override", "public", "void", "cacheStarting", "(", "ComponentRegistry", "cr", ",", "Configuration", "cfg", ",", "String", "cacheName", ")", "{", "BasicComponentRegistry", "gcr", "=", "cr", ".", "getGlobalComponentRegistry", "(", ")", ".", "getComponent", "("...
Registers the remote value wrapper interceptor in the cache before it gets started.
[ "Registers", "the", "remote", "value", "wrapper", "interceptor", "in", "the", "cache", "before", "it", "gets", "started", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/remote-query/remote-query-server/src/main/java/org/infinispan/query/remote/impl/LifecycleManager.java#L167-L181
PrashamTrivedi/SharedPreferenceInspector
sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java
SharedPreferenceUtils.isDebugHandled
public boolean isDebugHandled(Context context, MenuItem item) { """ Checks if debug menu item clicked or not. @param context : context to start activity if debug item handled. @param item : Menu item whose click is to be checked. @return : <code>true</code> if debug menu item is clicked, it will automatic...
java
public boolean isDebugHandled(Context context, MenuItem item) { int id = item.getItemId(); if (id == R.id.action_debug) { startActivity(context); return true; } return false; }
[ "public", "boolean", "isDebugHandled", "(", "Context", "context", ",", "MenuItem", "item", ")", "{", "int", "id", "=", "item", ".", "getItemId", "(", ")", ";", "if", "(", "id", "==", "R", ".", "id", ".", "action_debug", ")", "{", "startActivity", "(", ...
Checks if debug menu item clicked or not. @param context : context to start activity if debug item handled. @param item : Menu item whose click is to be checked. @return : <code>true</code> if debug menu item is clicked, it will automatically Start the SharedPrefsBrowser activity. If debug menu item is not clicked, y...
[ "Checks", "if", "debug", "menu", "item", "clicked", "or", "not", "." ]
train
https://github.com/PrashamTrivedi/SharedPreferenceInspector/blob/c04d567c4d0fc5e0f8cda308ca85df19c6b3b838/sharedpreferenceinspector/src/main/java/com/ceelites/sharedpreferenceinspector/Utils/SharedPreferenceUtils.java#L182-L189
JodaOrg/joda-time
src/main/java/org/joda/time/format/PeriodFormatter.java
PeriodFormatter.withParseType
public PeriodFormatter withParseType(PeriodType type) { """ Returns a new formatter with a different PeriodType for parsing. <p> A PeriodFormatter is immutable, so a new instance is returned, and the original is unaltered and still usable. @param type the type to use in parsing @return the new formatter ...
java
public PeriodFormatter withParseType(PeriodType type) { if (type == iParseType) { return this; } return new PeriodFormatter(iPrinter, iParser, iLocale, type); }
[ "public", "PeriodFormatter", "withParseType", "(", "PeriodType", "type", ")", "{", "if", "(", "type", "==", "iParseType", ")", "{", "return", "this", ";", "}", "return", "new", "PeriodFormatter", "(", "iPrinter", ",", "iParser", ",", "iLocale", ",", "type", ...
Returns a new formatter with a different PeriodType for parsing. <p> A PeriodFormatter is immutable, so a new instance is returned, and the original is unaltered and still usable. @param type the type to use in parsing @return the new formatter
[ "Returns", "a", "new", "formatter", "with", "a", "different", "PeriodType", "for", "parsing", ".", "<p", ">", "A", "PeriodFormatter", "is", "immutable", "so", "a", "new", "instance", "is", "returned", "and", "the", "original", "is", "unaltered", "and", "stil...
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/PeriodFormatter.java#L190-L195
geomajas/geomajas-project-server
api/src/main/java/org/geomajas/layer/feature/attribute/AssociationValue.java
AssociationValue.setUrlAttribute
public void setUrlAttribute(String name, String value) { """ Sets the specified URL attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0 """ ensureAttributes(); Attribute attribute = new UrlAttribute(value); attribute.setEditable(isEdit...
java
public void setUrlAttribute(String name, String value) { ensureAttributes(); Attribute attribute = new UrlAttribute(value); attribute.setEditable(isEditable(name)); getAllAttributes().put(name, attribute); }
[ "public", "void", "setUrlAttribute", "(", "String", "name", ",", "String", "value", ")", "{", "ensureAttributes", "(", ")", ";", "Attribute", "attribute", "=", "new", "UrlAttribute", "(", "value", ")", ";", "attribute", ".", "setEditable", "(", "isEditable", ...
Sets the specified URL attribute to the specified value. @param name name of the attribute @param value value of the attribute @since 1.9.0
[ "Sets", "the", "specified", "URL", "attribute", "to", "the", "specified", "value", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/AssociationValue.java#L365-L371
apereo/cas
support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/ChainingAWSCredentialsProvider.java
ChainingAWSCredentialsProvider.getInstance
public static AWSCredentialsProvider getInstance(final String credentialAccessKey, final String credentialSecretKey, final Resource credentialPropertiesFile) { """ Gets instance. @param credentialAccessKey the credential access key @param credentialSecr...
java
public static AWSCredentialsProvider getInstance(final String credentialAccessKey, final String credentialSecretKey, final Resource credentialPropertiesFile) { return getInstance(credentialAccessKey, credentialSecretKey, credentialPropertiesFile, null, null);...
[ "public", "static", "AWSCredentialsProvider", "getInstance", "(", "final", "String", "credentialAccessKey", ",", "final", "String", "credentialSecretKey", ",", "final", "Resource", "credentialPropertiesFile", ")", "{", "return", "getInstance", "(", "credentialAccessKey", ...
Gets instance. @param credentialAccessKey the credential access key @param credentialSecretKey the credential secret key @param credentialPropertiesFile the credential properties file @return the instance
[ "Gets", "instance", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-aws/src/main/java/org/apereo/cas/aws/ChainingAWSCredentialsProvider.java#L65-L68
alkacon/opencms-core
src/org/opencms/flex/CmsFlexController.java
CmsFlexController.setController
public static void setController(ServletRequest req, CmsFlexController controller) { """ Stores the given controller in the given request (using a request attribute).<p> @param req the request where to store the controller in @param controller the controller to store """ req.setAttribute(CmsFlexCo...
java
public static void setController(ServletRequest req, CmsFlexController controller) { req.setAttribute(CmsFlexController.ATTRIBUTE_NAME, controller); }
[ "public", "static", "void", "setController", "(", "ServletRequest", "req", ",", "CmsFlexController", "controller", ")", "{", "req", ".", "setAttribute", "(", "CmsFlexController", ".", "ATTRIBUTE_NAME", ",", "controller", ")", ";", "}" ]
Stores the given controller in the given request (using a request attribute).<p> @param req the request where to store the controller in @param controller the controller to store
[ "Stores", "the", "given", "controller", "in", "the", "given", "request", "(", "using", "a", "request", "attribute", ")", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/flex/CmsFlexController.java#L318-L321
mygreen/super-csv-annotation
src/main/java/com/github/mygreen/supercsv/util/ArgUtils.java
ArgUtils.notNull
public static void notNull(final Object arg, final String name) { """ 値がnullでないかどうか検証する。 @param arg 検証対象の値 @param name 検証対象の引数の名前 @throws NullPointerException {@literal arg == null.} """ if(arg == null) { throw new NullPointerException(String.format("%s should not be null.", name)); ...
java
public static void notNull(final Object arg, final String name) { if(arg == null) { throw new NullPointerException(String.format("%s should not be null.", name)); } }
[ "public", "static", "void", "notNull", "(", "final", "Object", "arg", ",", "final", "String", "name", ")", "{", "if", "(", "arg", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "String", ".", "format", "(", "\"%s should not be null.\"",...
値がnullでないかどうか検証する。 @param arg 検証対象の値 @param name 検証対象の引数の名前 @throws NullPointerException {@literal arg == null.}
[ "値がnullでないかどうか検証する。" ]
train
https://github.com/mygreen/super-csv-annotation/blob/9910320cb6dc143be972c7d10d9ab5ffb09c3b84/src/main/java/com/github/mygreen/supercsv/util/ArgUtils.java#L21-L25
apache/incubator-gobblin
gobblin-data-management/src/main/java/org/apache/gobblin/data/management/version/finder/DateTimeDatasetVersionFinder.java
DateTimeDatasetVersionFinder.getDatasetVersion
@Override public TimestampedDatasetVersion getDatasetVersion(Path pathRelativeToDatasetRoot, FileStatus versionFileStatus) { """ Parse {@link org.joda.time.DateTime} from {@link org.apache.hadoop.fs.Path} using datetime pattern. """ String dateTimeString = null; try { // pathRelativeToDatasetR...
java
@Override public TimestampedDatasetVersion getDatasetVersion(Path pathRelativeToDatasetRoot, FileStatus versionFileStatus) { String dateTimeString = null; try { // pathRelativeToDatasetRoot can be daily/2016/03/02 or 2016/03/02. In either case we need to pick 2016/03/02 as version dateTimeString ...
[ "@", "Override", "public", "TimestampedDatasetVersion", "getDatasetVersion", "(", "Path", "pathRelativeToDatasetRoot", ",", "FileStatus", "versionFileStatus", ")", "{", "String", "dateTimeString", "=", "null", ";", "try", "{", "// pathRelativeToDatasetRoot can be daily/2016/0...
Parse {@link org.joda.time.DateTime} from {@link org.apache.hadoop.fs.Path} using datetime pattern.
[ "Parse", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-data-management/src/main/java/org/apache/gobblin/data/management/version/finder/DateTimeDatasetVersionFinder.java#L120-L139
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/TimeSpan.java
TimeSpan.insideRange
public boolean insideRange(long startDate, long endDate) { """ Returns {@code true} if the end date occurs after the start date during the period of time represented by this time span. """ Calendar c1 = Calendar.getInstance(); Calendar c2 = Calendar.getInstance(); c1.setTimeInMillis(startDate); c2.setTime...
java
public boolean insideRange(long startDate, long endDate) { Calendar c1 = Calendar.getInstance(); Calendar c2 = Calendar.getInstance(); c1.setTimeInMillis(startDate); c2.setTimeInMillis(endDate); return isInRange(c1, c2); }
[ "public", "boolean", "insideRange", "(", "long", "startDate", ",", "long", "endDate", ")", "{", "Calendar", "c1", "=", "Calendar", ".", "getInstance", "(", ")", ";", "Calendar", "c2", "=", "Calendar", ".", "getInstance", "(", ")", ";", "c1", ".", "setTim...
Returns {@code true} if the end date occurs after the start date during the period of time represented by this time span.
[ "Returns", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/TimeSpan.java#L358-L364
Azure/azure-sdk-for-java
sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobVersionsInner.java
JobVersionsInner.listByJobAsync
public Observable<Page<JobVersionInner>> listByJobAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName) { """ Gets all versions of a job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from t...
java
public Observable<Page<JobVersionInner>> listByJobAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName) { return listByJobWithServiceResponseAsync(resourceGroupName, serverName, jobAgentName, jobName) .map(new Func1<ServiceResponse<Page<JobVe...
[ "public", "Observable", "<", "Page", "<", "JobVersionInner", ">", ">", "listByJobAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "serverName", ",", "final", "String", "jobAgentName", ",", "final", "String", "jobName", ")", "{", "retu...
Gets all versions of a job. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param jobAgentName The name of the job agent. @param jobName The name of the job to get...
[ "Gets", "all", "versions", "of", "a", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobVersionsInner.java#L129-L137
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/TransparentDataEncryptionsInner.java
TransparentDataEncryptionsInner.getAsync
public Observable<TransparentDataEncryptionInner> getAsync(String resourceGroupName, String serverName, String databaseName) { """ Gets a database's transparent data encryption configuration. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the A...
java
public Observable<TransparentDataEncryptionInner> getAsync(String resourceGroupName, String serverName, String databaseName) { return getWithServiceResponseAsync(resourceGroupName, serverName, databaseName).map(new Func1<ServiceResponse<TransparentDataEncryptionInner>, TransparentDataEncryptionInner>() { ...
[ "public", "Observable", "<", "TransparentDataEncryptionInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ...
Gets a database's transparent data encryption configuration. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param databaseName The name of the database for which ...
[ "Gets", "a", "database", "s", "transparent", "data", "encryption", "configuration", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/TransparentDataEncryptionsInner.java#L296-L303
JodaOrg/joda-time
src/main/java/org/joda/time/Seconds.java
Seconds.secondsBetween
public static Seconds secondsBetween(ReadableInstant start, ReadableInstant end) { """ Creates a <code>Seconds</code> representing the number of whole seconds between the two specified datetimes. @param start the start instant, must not be null @param end the end instant, must not be null @return the perio...
java
public static Seconds secondsBetween(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.seconds()); return Seconds.seconds(amount); }
[ "public", "static", "Seconds", "secondsBetween", "(", "ReadableInstant", "start", ",", "ReadableInstant", "end", ")", "{", "int", "amount", "=", "BaseSingleFieldPeriod", ".", "between", "(", "start", ",", "end", ",", "DurationFieldType", ".", "seconds", "(", ")"...
Creates a <code>Seconds</code> representing the number of whole seconds between the two specified datetimes. @param start the start instant, must not be null @param end the end instant, must not be null @return the period in seconds @throws IllegalArgumentException if the instants are null or invalid
[ "Creates", "a", "<code", ">", "Seconds<", "/", "code", ">", "representing", "the", "number", "of", "whole", "seconds", "between", "the", "two", "specified", "datetimes", "." ]
train
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/Seconds.java#L100-L103
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/ObjectUpdater.java
ObjectUpdater.mergeAllFieldValues
private void mergeAllFieldValues(DBObject srcDBObj, DBObject tgtDBObj) { """ fields are replaced. MV fields acquire the results of add/remove processing. """ for (String fieldName : srcDBObj.getUpdatedFieldNames()) { FieldDefinition fieldDef = m_tableDef.getFieldDef(fieldName); ...
java
private void mergeAllFieldValues(DBObject srcDBObj, DBObject tgtDBObj) { for (String fieldName : srcDBObj.getUpdatedFieldNames()) { FieldDefinition fieldDef = m_tableDef.getFieldDef(fieldName); if (fieldDef != null && (fieldDef.isCollection() || fieldDef.isLinkField())) { ...
[ "private", "void", "mergeAllFieldValues", "(", "DBObject", "srcDBObj", ",", "DBObject", "tgtDBObj", ")", "{", "for", "(", "String", "fieldName", ":", "srcDBObj", ".", "getUpdatedFieldNames", "(", ")", ")", "{", "FieldDefinition", "fieldDef", "=", "m_tableDef", "...
fields are replaced. MV fields acquire the results of add/remove processing.
[ "fields", "are", "replaced", ".", "MV", "fields", "acquire", "the", "results", "of", "add", "/", "remove", "processing", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/ObjectUpdater.java#L291-L306
jayantk/jklol
src/com/jayantkrish/jklol/tensor/SparseTensor.java
SparseTensor.relabelDimensions
@Override public SparseTensor relabelDimensions(Map<Integer, Integer> relabeling) { """ Relabels the dimensions of {@code this}. Each dimension is relabeled to its value in {@code relabeling}. {@code relabeling} must contain a unique value for each of {@code this.getDimensionNumbers()}. @param relabeling ...
java
@Override public SparseTensor relabelDimensions(Map<Integer, Integer> relabeling) { int[] newDimensions = new int[numDimensions()]; int[] dimensionNums = getDimensionNumbers(); for (int i = 0; i < dimensionNums.length; i++) { Preconditions.checkArgument(relabeling.containsKey(dimensionNums[i]), ...
[ "@", "Override", "public", "SparseTensor", "relabelDimensions", "(", "Map", "<", "Integer", ",", "Integer", ">", "relabeling", ")", "{", "int", "[", "]", "newDimensions", "=", "new", "int", "[", "numDimensions", "(", ")", "]", ";", "int", "[", "]", "dime...
Relabels the dimensions of {@code this}. Each dimension is relabeled to its value in {@code relabeling}. {@code relabeling} must contain a unique value for each of {@code this.getDimensionNumbers()}. @param relabeling @see #relabelDimensions(int[]) @return
[ "Relabels", "the", "dimensions", "of", "{", "@code", "this", "}", ".", "Each", "dimension", "is", "relabeled", "to", "its", "value", "in", "{", "@code", "relabeling", "}", ".", "{", "@code", "relabeling", "}", "must", "contain", "a", "unique", "value", "...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/tensor/SparseTensor.java#L1023-L1033
Azure/azure-sdk-for-java
streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/OutputsInner.java
OutputsInner.getAsync
public Observable<OutputInner> getAsync(String resourceGroupName, String jobName, String outputName) { """ Gets details about the specified output. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @p...
java
public Observable<OutputInner> getAsync(String resourceGroupName, String jobName, String outputName) { return getWithServiceResponseAsync(resourceGroupName, jobName, outputName).map(new Func1<ServiceResponseWithHeaders<OutputInner, OutputsGetHeaders>, OutputInner>() { @Override public Ou...
[ "public", "Observable", "<", "OutputInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "jobName", ",", "String", "outputName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "jobName", ",", "outputName", ")...
Gets details about the specified output. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param jobName The name of the streaming job. @param outputName The name of the output. @throws IllegalArgumentExcept...
[ "Gets", "details", "about", "the", "specified", "output", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/streamanalytics/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/streamanalytics/v2016_03_01/implementation/OutputsInner.java#L641-L648
netty/netty
codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java
HAProxyMessage.ipBytesToString
private static String ipBytesToString(ByteBuf header, int addressLen) { """ Convert ip address bytes to string representation @param header buffer containing ip address bytes @param addressLen number of bytes to read (4 bytes for IPv4, 16 bytes for IPv6) @return string representation of the ip a...
java
private static String ipBytesToString(ByteBuf header, int addressLen) { StringBuilder sb = new StringBuilder(); if (addressLen == 4) { sb.append(header.readByte() & 0xff); sb.append('.'); sb.append(header.readByte() & 0xff); sb.append('.'); sb....
[ "private", "static", "String", "ipBytesToString", "(", "ByteBuf", "header", ",", "int", "addressLen", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "addressLen", "==", "4", ")", "{", "sb", ".", "append", "(", "he...
Convert ip address bytes to string representation @param header buffer containing ip address bytes @param addressLen number of bytes to read (4 bytes for IPv4, 16 bytes for IPv6) @return string representation of the ip address
[ "Convert", "ip", "address", "bytes", "to", "string", "representation" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/codec-haproxy/src/main/java/io/netty/handler/codec/haproxy/HAProxyMessage.java#L359-L387