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
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLocalizationPersistenceImpl.java
CPDefinitionLocalizationPersistenceImpl.fetchByCPDefinitionId_LanguageId
@Override public CPDefinitionLocalization fetchByCPDefinitionId_LanguageId( long CPDefinitionId, String languageId) { """ Returns the cp definition localization where CPDefinitionId = &#63; and languageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitio...
java
@Override public CPDefinitionLocalization fetchByCPDefinitionId_LanguageId( long CPDefinitionId, String languageId) { return fetchByCPDefinitionId_LanguageId(CPDefinitionId, languageId, true); }
[ "@", "Override", "public", "CPDefinitionLocalization", "fetchByCPDefinitionId_LanguageId", "(", "long", "CPDefinitionId", ",", "String", "languageId", ")", "{", "return", "fetchByCPDefinitionId_LanguageId", "(", "CPDefinitionId", ",", "languageId", ",", "true", ")", ";", ...
Returns the cp definition localization where CPDefinitionId = &#63; and languageId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache. @param CPDefinitionId the cp definition ID @param languageId the language ID @return the matching cp definition localization, or <code>null</code> if ...
[ "Returns", "the", "cp", "definition", "localization", "where", "CPDefinitionId", "=", "&#63", ";", "and", "languageId", "=", "&#63", ";", "or", "returns", "<code", ">", "null<", "/", "code", ">", "if", "it", "could", "not", "be", "found", ".", "Uses", "t...
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLocalizationPersistenceImpl.java#L676-L680
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java
JsonUtil.getInt
public static int getInt(JsonObject object, String field) { """ Returns a field in a Json object as an int. Throws IllegalArgumentException if the field value is null. @param object the Json Object @param field the field in the Json object to return @return the Json field value as an int """ fina...
java
public static int getInt(JsonObject object, String field) { final JsonValue value = object.get(field); throwExceptionIfNull(value, field); return value.asInt(); }
[ "public", "static", "int", "getInt", "(", "JsonObject", "object", ",", "String", "field", ")", "{", "final", "JsonValue", "value", "=", "object", ".", "get", "(", "field", ")", ";", "throwExceptionIfNull", "(", "value", ",", "field", ")", ";", "return", ...
Returns a field in a Json object as an int. Throws IllegalArgumentException if the field value is null. @param object the Json Object @param field the field in the Json object to return @return the Json field value as an int
[ "Returns", "a", "field", "in", "a", "Json", "object", "as", "an", "int", ".", "Throws", "IllegalArgumentException", "if", "the", "field", "value", "is", "null", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/JsonUtil.java#L45-L49
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/impl/edir/NmasCrFactory.java
NmasCrFactory.readAssignedChallengeSet
public static ChallengeSet readAssignedChallengeSet( final ChaiProvider provider, final ChaiPasswordPolicy passwordPolicy, final Locale locale ) throws ChaiUnavailableException, ChaiOperationException, ChaiValidationException { """ <p>Read the theUser's configure...
java
public static ChallengeSet readAssignedChallengeSet( final ChaiProvider provider, final ChaiPasswordPolicy passwordPolicy, final Locale locale ) throws ChaiUnavailableException, ChaiOperationException, ChaiValidationException { final String challengeSetDN;...
[ "public", "static", "ChallengeSet", "readAssignedChallengeSet", "(", "final", "ChaiProvider", "provider", ",", "final", "ChaiPasswordPolicy", "passwordPolicy", ",", "final", "Locale", "locale", ")", "throws", "ChaiUnavailableException", ",", "ChaiOperationException", ",", ...
<p>Read the theUser's configured ChallengeSet from the directory. Operations are performed according to the ChaiConfiguration found by looking at the ChaiProvider underlying the ChaiEntry. For example, the setting {@link com.novell.ldapchai.provider.ChaiSetting#EDIRECTORY_ENABLE_NMAS} determines if NMAS calls are use...
[ "<p", ">", "Read", "the", "theUser", "s", "configured", "ChallengeSet", "from", "the", "directory", ".", "Operations", "are", "performed", "according", "to", "the", "ChaiConfiguration", "found", "by", "looking", "at", "the", "ChaiProvider", "underlying", "the", ...
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/impl/edir/NmasCrFactory.java#L125-L152
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/database/CmsHtmlImportDialog.java
CmsHtmlImportDialog.getDialogParameter
protected CmsWidgetDialogParameter getDialogParameter(String property, I_CmsWidget widget) { """ This function creates a <code> {@link CmsWidgetDialogParameter} </code> Object based on the given properties.<p> @param property the base object property to map the parameter to / from @param widget the widget use...
java
protected CmsWidgetDialogParameter getDialogParameter(String property, I_CmsWidget widget) { return new CmsWidgetDialogParameter(m_htmlimport, property, PAGES[0], widget); }
[ "protected", "CmsWidgetDialogParameter", "getDialogParameter", "(", "String", "property", ",", "I_CmsWidget", "widget", ")", "{", "return", "new", "CmsWidgetDialogParameter", "(", "m_htmlimport", ",", "property", ",", "PAGES", "[", "0", "]", ",", "widget", ")", ";...
This function creates a <code> {@link CmsWidgetDialogParameter} </code> Object based on the given properties.<p> @param property the base object property to map the parameter to / from @param widget the widget used for this dialog-parameter @return a <code> {@link CmsWidgetDialogParameter} </code> Object
[ "This", "function", "creates", "a", "<code", ">", "{", "@link", "CmsWidgetDialogParameter", "}", "<", "/", "code", ">", "Object", "based", "on", "the", "given", "properties", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/database/CmsHtmlImportDialog.java#L421-L424
sdl/odata
odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java
EntityDataModelUtil.isSingletonEntity
public static boolean isSingletonEntity(EntityDataModel entityDataModel, Object entity) throws ODataEdmException { """ Check if the given entity is a Singleton entity. @param entityDataModel The Entity Data Model. @param entity The given entity. @return true if singleton, false if not @throws ODataE...
java
public static boolean isSingletonEntity(EntityDataModel entityDataModel, Object entity) throws ODataEdmException { // Get the entity type EntityType entityType = getAndCheckEntityType(entityDataModel, entity.getClass()); boolean isSingletonEntity = false; for (Singleton singleton : enti...
[ "public", "static", "boolean", "isSingletonEntity", "(", "EntityDataModel", "entityDataModel", ",", "Object", "entity", ")", "throws", "ODataEdmException", "{", "// Get the entity type", "EntityType", "entityType", "=", "getAndCheckEntityType", "(", "entityDataModel", ",", ...
Check if the given entity is a Singleton entity. @param entityDataModel The Entity Data Model. @param entity The given entity. @return true if singleton, false if not @throws ODataEdmException if unable to determine if entity is singleton
[ "Check", "if", "the", "given", "entity", "is", "a", "Singleton", "entity", "." ]
train
https://github.com/sdl/odata/blob/eb747d73e9af0f4e59a25b82ed656e526a7e2189/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java#L520-L533
pippo-java/pippo
pippo-core/src/main/java/ro/pippo/core/route/Route.java
Route.POST
public static Route POST(String uriPattern, RouteHandler routeHandler) { """ Create a {@code POST} route. @param uriPattern @param routeHandler @return """ return new Route(HttpConstants.Method.POST, uriPattern, routeHandler); }
java
public static Route POST(String uriPattern, RouteHandler routeHandler) { return new Route(HttpConstants.Method.POST, uriPattern, routeHandler); }
[ "public", "static", "Route", "POST", "(", "String", "uriPattern", ",", "RouteHandler", "routeHandler", ")", "{", "return", "new", "Route", "(", "HttpConstants", ".", "Method", ".", "POST", ",", "uriPattern", ",", "routeHandler", ")", ";", "}" ]
Create a {@code POST} route. @param uriPattern @param routeHandler @return
[ "Create", "a", "{", "@code", "POST", "}", "route", "." ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-core/src/main/java/ro/pippo/core/route/Route.java#L81-L83
mapbox/mapbox-navigation-android
libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/DistanceFormatter.java
DistanceFormatter.roundToDecimalPlace
private String roundToDecimalPlace(double distance, int decimalPlace) { """ Rounds given number to the given decimal place @param distance to round @param decimalPlace number of decimal places to round @return distance rounded to given decimal places """ numberFormat.setMaximumFractionDigits(decim...
java
private String roundToDecimalPlace(double distance, int decimalPlace) { numberFormat.setMaximumFractionDigits(decimalPlace); return numberFormat.format(distance); }
[ "private", "String", "roundToDecimalPlace", "(", "double", "distance", ",", "int", "decimalPlace", ")", "{", "numberFormat", ".", "setMaximumFractionDigits", "(", "decimalPlace", ")", ";", "return", "numberFormat", ".", "format", "(", "distance", ")", ";", "}" ]
Rounds given number to the given decimal place @param distance to round @param decimalPlace number of decimal places to round @return distance rounded to given decimal places
[ "Rounds", "given", "number", "to", "the", "given", "decimal", "place" ]
train
https://github.com/mapbox/mapbox-navigation-android/blob/375a89c017d360b9defc2c90d0c03468165162ec/libandroid-navigation/src/main/java/com/mapbox/services/android/navigation/v5/utils/DistanceFormatter.java#L141-L145
h2oai/h2o-3
h2o-core/src/main/java/water/parser/DecryptionTool.java
DecryptionTool.make
public static DecryptionTool make(DecryptionSetup ds) { """ Instantiates a Decryption Tool using a given Decryption Setup and installs it in DKV. @param ds decryption setup @return instance of a Decryption Tool """ if (ds._decrypt_tool_id == null) ds._decrypt_tool_id = Key.make(); try { C...
java
public static DecryptionTool make(DecryptionSetup ds) { if (ds._decrypt_tool_id == null) ds._decrypt_tool_id = Key.make(); try { Class<?> dtClass = DecryptionTool.class.getClassLoader().loadClass(ds._decrypt_impl); if (! DecryptionTool.class.isAssignableFrom(dtClass)) { throw new Illeg...
[ "public", "static", "DecryptionTool", "make", "(", "DecryptionSetup", "ds", ")", "{", "if", "(", "ds", ".", "_decrypt_tool_id", "==", "null", ")", "ds", ".", "_decrypt_tool_id", "=", "Key", ".", "make", "(", ")", ";", "try", "{", "Class", "<", "?", ">"...
Instantiates a Decryption Tool using a given Decryption Setup and installs it in DKV. @param ds decryption setup @return instance of a Decryption Tool
[ "Instantiates", "a", "Decryption", "Tool", "using", "a", "given", "Decryption", "Setup", "and", "installs", "it", "in", "DKV", "." ]
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/parser/DecryptionTool.java#L89-L108
dhanji/sitebricks
sitebricks/src/main/java/com/google/sitebricks/Localizer.java
Localizer.defaultLocalizationFor
public static Localization defaultLocalizationFor(Class<?> iface) { """ Returns a localization value object describing the defaults specified in the @Message annotations of the methods on the given i18n interface. The locale used is the system default. """ Map<String, String> defaultMessages = Maps.newHa...
java
public static Localization defaultLocalizationFor(Class<?> iface) { Map<String, String> defaultMessages = Maps.newHashMap(); for (Method method : iface.getMethods()) { Message msg = method.getAnnotation(Message.class); if (null != msg) { defaultMessages.put(method.getName(), msg.message());...
[ "public", "static", "Localization", "defaultLocalizationFor", "(", "Class", "<", "?", ">", "iface", ")", "{", "Map", "<", "String", ",", "String", ">", "defaultMessages", "=", "Maps", ".", "newHashMap", "(", ")", ";", "for", "(", "Method", "method", ":", ...
Returns a localization value object describing the defaults specified in the @Message annotations of the methods on the given i18n interface. The locale used is the system default.
[ "Returns", "a", "localization", "value", "object", "describing", "the", "defaults", "specified", "in", "the" ]
train
https://github.com/dhanji/sitebricks/blob/8682029a78bd48fb8566173d970800499e9e5d97/sitebricks/src/main/java/com/google/sitebricks/Localizer.java#L256-L267
demidenko05/beigesoft-orm
src/main/java/org/beigesoft/orm/service/ASrvOrm.java
ASrvOrm.evalWhereForUpdate
public final <T> String evalWhereForUpdate( final T pEntity, final ColumnsValues pColumnsValues) throws Exception { """ <p>Evaluate Where conditions the entity.</p> @param <T> entity type @param pEntity entity @param pColumnsValues columns values @return where conditions e.g. "itsId=1 AND itsVersion=2" @t...
java
public final <T> String evalWhereForUpdate( final T pEntity, final ColumnsValues pColumnsValues) throws Exception { if (pColumnsValues.ifContains(ISrvOrm.VERSION_NAME)) { return evalWhereId(pEntity, pColumnsValues) + " and " + ISrvOrm .VERSION_NAME.toUpperCase() + "=" + pColumnsValues .e...
[ "public", "final", "<", "T", ">", "String", "evalWhereForUpdate", "(", "final", "T", "pEntity", ",", "final", "ColumnsValues", "pColumnsValues", ")", "throws", "Exception", "{", "if", "(", "pColumnsValues", ".", "ifContains", "(", "ISrvOrm", ".", "VERSION_NAME",...
<p>Evaluate Where conditions the entity.</p> @param <T> entity type @param pEntity entity @param pColumnsValues columns values @return where conditions e.g. "itsId=1 AND itsVersion=2" @throws Exception an exception
[ "<p", ">", "Evaluate", "Where", "conditions", "the", "entity", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-orm/blob/f1b2c70701a111741a436911ca24ef9d38eba0b9/src/main/java/org/beigesoft/orm/service/ASrvOrm.java#L1231-L1240
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java
SimpleClientHttpRequestFactory.openConnection
protected HttpURLConnection openConnection(URL url, Proxy proxy) throws IOException { """ Opens and returns a connection to the given URL. <p>The default implementation uses the given {@linkplain #setProxy(java.net.Proxy) proxy} - if any - to open a connection. @param url the URL to open a connection to @param...
java
protected HttpURLConnection openConnection(URL url, Proxy proxy) throws IOException { URLConnection urlConnection = (proxy != null ? url.openConnection(proxy) : url.openConnection()); Assert.isInstanceOf(HttpURLConnection.class, urlConnection); return (HttpURLConnection) urlConnection; }
[ "protected", "HttpURLConnection", "openConnection", "(", "URL", "url", ",", "Proxy", "proxy", ")", "throws", "IOException", "{", "URLConnection", "urlConnection", "=", "(", "proxy", "!=", "null", "?", "url", ".", "openConnection", "(", "proxy", ")", ":", "url"...
Opens and returns a connection to the given URL. <p>The default implementation uses the given {@linkplain #setProxy(java.net.Proxy) proxy} - if any - to open a connection. @param url the URL to open a connection to @param proxy the proxy to use, may be {@code null} @return the opened connection @throws IOException in c...
[ "Opens", "and", "returns", "a", "connection", "to", "the", "given", "URL", ".", "<p", ">", "The", "default", "implementation", "uses", "the", "given", "{" ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/http/client/SimpleClientHttpRequestFactory.java#L165-L169
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Completable.java
Completable.unsubscribeOn
@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable unsubscribeOn(final Scheduler scheduler) { """ Returns a Completable which makes sure when a subscriber disposes the subscription, the dispose is called on the specified scheduler. <p> <img width="640" height="716" src...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.CUSTOM) public final Completable unsubscribeOn(final Scheduler scheduler) { ObjectHelper.requireNonNull(scheduler, "scheduler is null"); return RxJavaPlugins.onAssembly(new CompletableDisposeOn(this, scheduler)); }
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "CUSTOM", ")", "public", "final", "Completable", "unsubscribeOn", "(", "final", "Scheduler", "scheduler", ")", "{", "ObjectHelper", ".", "requireNonNull", "(", "scheduler", ",", "\"sched...
Returns a Completable which makes sure when a subscriber disposes the subscription, the dispose is called on the specified scheduler. <p> <img width="640" height="716" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.unsubscribeOn.png" alt=""> <dl> <dt><b>Scheduler:</b></dt> <dd>{@code ...
[ "Returns", "a", "Completable", "which", "makes", "sure", "when", "a", "subscriber", "disposes", "the", "subscription", "the", "dispose", "is", "called", "on", "the", "specified", "scheduler", ".", "<p", ">", "<img", "width", "=", "640", "height", "=", "716",...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Completable.java#L2598-L2603
hankcs/HanLP
src/main/java/com/hankcs/hanlp/HanLP.java
HanLP.extractWords
public static List<WordInfo> extractWords(BufferedReader reader, int size, boolean newWordsOnly) throws IOException { """ 提取词语(新词发现) @param reader 从reader获取文本 @param size 需要提取词语的数量 @param newWordsOnly 是否只提取词典中没有的词语 @return 一个词语列表 """ NewWordDiscover discover = new NewWordDiscover(4,...
java
public static List<WordInfo> extractWords(BufferedReader reader, int size, boolean newWordsOnly) throws IOException { NewWordDiscover discover = new NewWordDiscover(4, 0.0f, .5f, 100f, newWordsOnly); return discover.discover(reader, size); }
[ "public", "static", "List", "<", "WordInfo", ">", "extractWords", "(", "BufferedReader", "reader", ",", "int", "size", ",", "boolean", "newWordsOnly", ")", "throws", "IOException", "{", "NewWordDiscover", "discover", "=", "new", "NewWordDiscover", "(", "4", ",",...
提取词语(新词发现) @param reader 从reader获取文本 @param size 需要提取词语的数量 @param newWordsOnly 是否只提取词典中没有的词语 @return 一个词语列表
[ "提取词语(新词发现)" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/HanLP.java#L771-L775
cdk/cdk
display/render/src/main/java/org/openscience/cdk/renderer/color/PartialAtomicChargeColors.java
PartialAtomicChargeColors.getAtomColor
@Override public Color getAtomColor(IAtom atom, Color defaultColor) { """ Returns the a color reflecting the given atom's partial charge, or defaults to the given color if no color is defined. @param atom IAtom to get a color for @param defaultColor Color returned if this scheme does not define a...
java
@Override public Color getAtomColor(IAtom atom, Color defaultColor) { Color color = defaultColor; if (atom.getCharge() == null) return defaultColor; double charge = atom.getCharge(); if (charge > 0.0) { if (charge < 1.0) { int index = 255 - (int) (charge *...
[ "@", "Override", "public", "Color", "getAtomColor", "(", "IAtom", "atom", ",", "Color", "defaultColor", ")", "{", "Color", "color", "=", "defaultColor", ";", "if", "(", "atom", ".", "getCharge", "(", ")", "==", "null", ")", "return", "defaultColor", ";", ...
Returns the a color reflecting the given atom's partial charge, or defaults to the given color if no color is defined. @param atom IAtom to get a color for @param defaultColor Color returned if this scheme does not define a color for the passed IAtom @return the color for the given atom.
[ "Returns", "the", "a", "color", "reflecting", "the", "given", "atom", "s", "partial", "charge", "or", "defaults", "to", "the", "given", "color", "if", "no", "color", "is", "defined", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/display/render/src/main/java/org/openscience/cdk/renderer/color/PartialAtomicChargeColors.java#L59-L80
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/WidgetUtil.java
WidgetUtil.createTransparentFlashContainer
public static HTML createTransparentFlashContainer ( String ident, String movie, int width, int height, String flashVars) { """ Creates the HTML to display a transparent Flash movie for the browser on which we're running. @param flashVars a pre-URLEncoded string containing flash variables, or null. htt...
java
public static HTML createTransparentFlashContainer ( String ident, String movie, int width, int height, String flashVars) { FlashObject obj = new FlashObject(ident, movie, width, height, flashVars); obj.transparent = true; return createContainer(obj); }
[ "public", "static", "HTML", "createTransparentFlashContainer", "(", "String", "ident", ",", "String", "movie", ",", "int", "width", ",", "int", "height", ",", "String", "flashVars", ")", "{", "FlashObject", "obj", "=", "new", "FlashObject", "(", "ident", ",", ...
Creates the HTML to display a transparent Flash movie for the browser on which we're running. @param flashVars a pre-URLEncoded string containing flash variables, or null. http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_16417
[ "Creates", "the", "HTML", "to", "display", "a", "transparent", "Flash", "movie", "for", "the", "browser", "on", "which", "we", "re", "running", "." ]
train
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/WidgetUtil.java#L113-L119
jbundle/osgi
core/src/main/java/org/jbundle/util/osgi/finder/ClassServiceUtility.java
ClassServiceUtility.getBundleClassLoader
public ClassLoader getBundleClassLoader(String packageName, String version) throws ClassNotFoundException { """ Get the bundle classloader for this package. @param string The class name to find the bundle for. @return The class loader. @throws ClassNotFoundException """ if ((packageName == null) || ...
java
public ClassLoader getBundleClassLoader(String packageName, String version) throws ClassNotFoundException { if ((packageName == null) || (packageName.length() == 0)) return null; ClassLoader classLoader = null; if (this.getClassFinder(null) != null) classLoader = this....
[ "public", "ClassLoader", "getBundleClassLoader", "(", "String", "packageName", ",", "String", "version", ")", "throws", "ClassNotFoundException", "{", "if", "(", "(", "packageName", "==", "null", ")", "||", "(", "packageName", ".", "length", "(", ")", "==", "0...
Get the bundle classloader for this package. @param string The class name to find the bundle for. @return The class loader. @throws ClassNotFoundException
[ "Get", "the", "bundle", "classloader", "for", "this", "package", "." ]
train
https://github.com/jbundle/osgi/blob/beb02aef78736a4f799aaac001c8f0327bf0536c/core/src/main/java/org/jbundle/util/osgi/finder/ClassServiceUtility.java#L263-L273
jbundle/osgi
core/src/main/java/org/jbundle/util/osgi/finder/BaseClassFinderService.java
BaseClassFinderService.startBaseBundle
public boolean startBaseBundle(BundleContext context, String interfaceClassName, String dependentServiceClassName, String versionRange, Dictionary<String,String> filter, int secsToWait) { """ Start up a basebundle service. Note: You will probably want to call this from a thread and attach a service listener sinc...
java
public boolean startBaseBundle(BundleContext context, String interfaceClassName, String dependentServiceClassName, String versionRange, Dictionary<String,String> filter, int secsToWait) { ServiceReference ServiceReference = getClassServiceReference((bundleContext != null) ? bundleContext : context, interfac...
[ "public", "boolean", "startBaseBundle", "(", "BundleContext", "context", ",", "String", "interfaceClassName", ",", "String", "dependentServiceClassName", ",", "String", "versionRange", ",", "Dictionary", "<", "String", ",", "String", ">", "filter", ",", "int", "secs...
Start up a basebundle service. Note: You will probably want to call this from a thread and attach a service listener since this may take some time. @param versionRange version @param secsToWait Time to wait for startup 0=0, -1=default @param className @return true If I'm up already @return false If I had a problem.
[ "Start", "up", "a", "basebundle", "service", ".", "Note", ":", "You", "will", "probably", "want", "to", "call", "this", "from", "a", "thread", "and", "attach", "a", "service", "listener", "since", "this", "may", "take", "some", "time", "." ]
train
https://github.com/jbundle/osgi/blob/beb02aef78736a4f799aaac001c8f0327bf0536c/core/src/main/java/org/jbundle/util/osgi/finder/BaseClassFinderService.java#L531-L540
aws/aws-sdk-java
aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java
WeeklyAutoScalingSchedule.withFriday
public WeeklyAutoScalingSchedule withFriday(java.util.Map<String, String> friday) { """ <p> The schedule for Friday. </p> @param friday The schedule for Friday. @return Returns a reference to this object so that method calls can be chained together. """ setFriday(friday); return this; ...
java
public WeeklyAutoScalingSchedule withFriday(java.util.Map<String, String> friday) { setFriday(friday); return this; }
[ "public", "WeeklyAutoScalingSchedule", "withFriday", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "friday", ")", "{", "setFriday", "(", "friday", ")", ";", "return", "this", ";", "}" ]
<p> The schedule for Friday. </p> @param friday The schedule for Friday. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "schedule", "for", "Friday", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-opsworks/src/main/java/com/amazonaws/services/opsworks/model/WeeklyAutoScalingSchedule.java#L393-L396
BranchMetrics/android-branch-deep-linking
Branch-SDK/src/io/branch/referral/ShareLinkManager.java
ShareLinkManager.shareLink
public Dialog shareLink(Branch.ShareLinkBuilder builder) { """ Creates an application selector and shares a link on user selecting the application. @param builder A {@link io.branch.referral.Branch.ShareLinkBuilder} instance to build share link. @return Instance of the {@link Dialog} holding the share view. Nu...
java
public Dialog shareLink(Branch.ShareLinkBuilder builder) { builder_ = builder; context_ = builder.getActivity(); callback_ = builder.getCallback(); channelPropertiesCallback_ = builder.getChannelPropertiesCallback(); shareLinkIntent_ = new Intent(Intent.ACTION_SEND); shar...
[ "public", "Dialog", "shareLink", "(", "Branch", ".", "ShareLinkBuilder", "builder", ")", "{", "builder_", "=", "builder", ";", "context_", "=", "builder", ".", "getActivity", "(", ")", ";", "callback_", "=", "builder", ".", "getCallback", "(", ")", ";", "c...
Creates an application selector and shares a link on user selecting the application. @param builder A {@link io.branch.referral.Branch.ShareLinkBuilder} instance to build share link. @return Instance of the {@link Dialog} holding the share view. Null if sharing dialog is not created due to any error.
[ "Creates", "an", "application", "selector", "and", "shares", "a", "link", "on", "user", "selecting", "the", "application", "." ]
train
https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/ShareLinkManager.java#L69-L91
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConnectionImpl.java
ConnectionImpl.checkTemporary
private void checkTemporary(DestinationHandler destination, boolean mqinterop) throws SITemporaryDestinationNotFoundException { """ Checks to see if the destination is temporary and the connection used to create the temp destination is the same as the one trying to access it. Checking ski...
java
private void checkTemporary(DestinationHandler destination, boolean mqinterop) throws SITemporaryDestinationNotFoundException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "checkTemporary", new Object[] { destination, Boolean.valueOf(mqin...
[ "private", "void", "checkTemporary", "(", "DestinationHandler", "destination", ",", "boolean", "mqinterop", ")", "throws", "SITemporaryDestinationNotFoundException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled...
Checks to see if the destination is temporary and the connection used to create the temp destination is the same as the one trying to access it. Checking skipped if this is a mqinterop request @param destination @param mqinterop @throws SITemporaryDestinationNotFoundException If the temp destination wasn't created us...
[ "Checks", "to", "see", "if", "the", "destination", "is", "temporary", "and", "the", "connection", "used", "to", "create", "the", "temp", "destination", "is", "the", "same", "as", "the", "one", "trying", "to", "access", "it", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ConnectionImpl.java#L1228-L1257
liferay/com-liferay-commerce
commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java
CommerceAccountPersistenceImpl.findAll
@Override public List<CommerceAccount> findAll(int start, int end) { """ Returns a range of all the commerce accounts. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. ...
java
@Override public List<CommerceAccount> findAll(int start, int end) { return findAll(start, end, null); }
[ "@", "Override", "public", "List", "<", "CommerceAccount", ">", "findAll", "(", "int", "start", ",", "int", "end", ")", "{", "return", "findAll", "(", "start", ",", "end", ",", "null", ")", ";", "}" ]
Returns a range of all the commerce accounts. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>sta...
[ "Returns", "a", "range", "of", "all", "the", "commerce", "accounts", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-account-service/src/main/java/com/liferay/commerce/account/service/persistence/impl/CommerceAccountPersistenceImpl.java#L2760-L2763
alkacon/opencms-core
src/org/opencms/ui/apps/A_CmsWorkplaceApp.java
A_CmsWorkplaceApp.addParamToState
public static String addParamToState(String state, String paramName, String value) { """ Adds a parameter value to the given state.<p> @param state the state @param paramName the parameter name @param value the parameter value @return the state """ return state + PARAM_SEPARATOR + paramName + ...
java
public static String addParamToState(String state, String paramName, String value) { return state + PARAM_SEPARATOR + paramName + PARAM_ASSIGN + CmsEncoder.encode(value, CmsEncoder.ENCODING_UTF_8); }
[ "public", "static", "String", "addParamToState", "(", "String", "state", ",", "String", "paramName", ",", "String", "value", ")", "{", "return", "state", "+", "PARAM_SEPARATOR", "+", "paramName", "+", "PARAM_ASSIGN", "+", "CmsEncoder", ".", "encode", "(", "val...
Adds a parameter value to the given state.<p> @param state the state @param paramName the parameter name @param value the parameter value @return the state
[ "Adds", "a", "parameter", "value", "to", "the", "given", "state", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/A_CmsWorkplaceApp.java#L170-L173
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/component/UIComponent.java
UIComponent.restoreTransientState
public void restoreTransientState(FacesContext context, Object state) { """ <p class="changed_added_2_1">For components that need to support the concept of transient state, this method will restore any state saved on a prior call to {@link #saveTransientState}.</p> @since 2.1 """ boolean forceCrea...
java
public void restoreTransientState(FacesContext context, Object state) { boolean forceCreate = (state != null); TransientStateHelper helper = getTransientStateHelper(forceCreate); if (helper != null) { helper.restoreTransientState(context, state); } }
[ "public", "void", "restoreTransientState", "(", "FacesContext", "context", ",", "Object", "state", ")", "{", "boolean", "forceCreate", "=", "(", "state", "!=", "null", ")", ";", "TransientStateHelper", "helper", "=", "getTransientStateHelper", "(", "forceCreate", ...
<p class="changed_added_2_1">For components that need to support the concept of transient state, this method will restore any state saved on a prior call to {@link #saveTransientState}.</p> @since 2.1
[ "<p", "class", "=", "changed_added_2_1", ">", "For", "components", "that", "need", "to", "support", "the", "concept", "of", "transient", "state", "this", "method", "will", "restore", "any", "state", "saved", "on", "a", "prior", "call", "to", "{", "@link", ...
train
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/component/UIComponent.java#L652-L660
google/closure-compiler
src/com/google/javascript/jscomp/SymbolTable.java
SymbolTable.getParameterInFunction
public Symbol getParameterInFunction(Symbol sym, String paramName) { """ If {@code sym} is a function, try to find a Symbol for a parameter with the given name. <p>Returns null if we couldn't find one. <p>Notice that this just makes a best effort, and may not be able to find parameters for non-conventional ...
java
public Symbol getParameterInFunction(Symbol sym, String paramName) { SymbolScope scope = getScopeInFunction(sym); if (scope != null) { Symbol param = scope.getSlot(paramName); if (param != null && param.scope == scope) { return param; } } return null; }
[ "public", "Symbol", "getParameterInFunction", "(", "Symbol", "sym", ",", "String", "paramName", ")", "{", "SymbolScope", "scope", "=", "getScopeInFunction", "(", "sym", ")", ";", "if", "(", "scope", "!=", "null", ")", "{", "Symbol", "param", "=", "scope", ...
If {@code sym} is a function, try to find a Symbol for a parameter with the given name. <p>Returns null if we couldn't find one. <p>Notice that this just makes a best effort, and may not be able to find parameters for non-conventional function definitions. For example, we would not be able to find "y" in this code: <...
[ "If", "{", "@code", "sym", "}", "is", "a", "function", "try", "to", "find", "a", "Symbol", "for", "a", "parameter", "with", "the", "given", "name", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/SymbolTable.java#L217-L226
apache/incubator-gobblin
gobblin-api/src/main/java/org/apache/gobblin/dataset/DatasetDescriptor.java
DatasetDescriptor.fromDataMap
@Deprecated public static DatasetDescriptor fromDataMap(Map<String, String> dataMap) { """ Deserialize a {@link DatasetDescriptor} from a string map @deprecated use {@link Descriptor#deserialize(String)} """ DatasetDescriptor descriptor = new DatasetDescriptor(dataMap.get(PLATFORM_KEY), dataMap.get(NA...
java
@Deprecated public static DatasetDescriptor fromDataMap(Map<String, String> dataMap) { DatasetDescriptor descriptor = new DatasetDescriptor(dataMap.get(PLATFORM_KEY), dataMap.get(NAME_KEY)); dataMap.forEach((key, value) -> { if (!key.equals(PLATFORM_KEY) && !key.equals(NAME_KEY)) { descriptor.ad...
[ "@", "Deprecated", "public", "static", "DatasetDescriptor", "fromDataMap", "(", "Map", "<", "String", ",", "String", ">", "dataMap", ")", "{", "DatasetDescriptor", "descriptor", "=", "new", "DatasetDescriptor", "(", "dataMap", ".", "get", "(", "PLATFORM_KEY", ")...
Deserialize a {@link DatasetDescriptor} from a string map @deprecated use {@link Descriptor#deserialize(String)}
[ "Deserialize", "a", "{", "@link", "DatasetDescriptor", "}", "from", "a", "string", "map" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-api/src/main/java/org/apache/gobblin/dataset/DatasetDescriptor.java#L116-L125
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java
ClientFactory.acceptSessionFromConnectionStringAsync
public static CompletableFuture<IMessageSession> acceptSessionFromConnectionStringAsync(String amqpConnectionString, String sessionId) { """ Accept a {@link IMessageSession} in default {@link ReceiveMode#PEEKLOCK} mode asynchronously from service bus connection string with specified session id. Session Id can be n...
java
public static CompletableFuture<IMessageSession> acceptSessionFromConnectionStringAsync(String amqpConnectionString, String sessionId) { return acceptSessionFromConnectionStringAsync(amqpConnectionString, sessionId, DEFAULTRECEIVEMODE); }
[ "public", "static", "CompletableFuture", "<", "IMessageSession", ">", "acceptSessionFromConnectionStringAsync", "(", "String", "amqpConnectionString", ",", "String", "sessionId", ")", "{", "return", "acceptSessionFromConnectionStringAsync", "(", "amqpConnectionString", ",", "...
Accept a {@link IMessageSession} in default {@link ReceiveMode#PEEKLOCK} mode asynchronously from service bus connection string with specified session id. Session Id can be null, if null, service will return the first available session. @param amqpConnectionString the connection string @param sessionId sess...
[ "Accept", "a", "{", "@link", "IMessageSession", "}", "in", "default", "{", "@link", "ReceiveMode#PEEKLOCK", "}", "mode", "asynchronously", "from", "service", "bus", "connection", "string", "with", "specified", "session", "id", ".", "Session", "Id", "can", "be", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L622-L624
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorLab.java
ColorLab.rgbToLab
public static <T extends ImageGray<T>> void rgbToLab(Planar<T> rgb , Planar<GrayF32> lab ) { """ Convert a 3-channel {@link Planar} image from RGB into LAB. RGB is assumed to have a range from 0:255 NOTE: Input and output image can be the same instance. @param rgb (Input) RGB encoded image @param lab (Ou...
java
public static <T extends ImageGray<T>> void rgbToLab(Planar<T> rgb , Planar<GrayF32> lab ) { lab.reshape(rgb.width,rgb.height,3); if( rgb.getBandType() == GrayU8.class ) { if (BoofConcurrency.USE_CONCURRENT) { ImplColorLab_MT.rgbToLab_U8((Planar<GrayU8>) rgb, lab); } else { ImplColorLab.rgbToLab_U8(...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "void", "rgbToLab", "(", "Planar", "<", "T", ">", "rgb", ",", "Planar", "<", "GrayF32", ">", "lab", ")", "{", "lab", ".", "reshape", "(", "rgb", ".", "width", ",", "rgb", "...
Convert a 3-channel {@link Planar} image from RGB into LAB. RGB is assumed to have a range from 0:255 NOTE: Input and output image can be the same instance. @param rgb (Input) RGB encoded image @param lab (Output) LAB encoded image. L = channel 0, A = channel 1, B = channel 2
[ "Convert", "a", "3", "-", "channel", "{", "@link", "Planar", "}", "image", "from", "RGB", "into", "LAB", ".", "RGB", "is", "assumed", "to", "have", "a", "range", "from", "0", ":", "255" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorLab.java#L126-L145
liyiorg/weixin-popular
src/main/java/weixin/popular/api/MediaAPI.java
MediaAPI.mediaUpload
public static Media mediaUpload(String access_token,MediaType mediaType,InputStream inputStream) { """ 新增临时素材 媒体文件在后台保存时间为3天,即3天后media_id失效。 @param access_token access_token @param mediaType mediaType @param inputStream 多媒体文件有格式和大小限制,如下: 图片(image): 2M,支持bmp/png/jpeg/jpg/gif格式 语音(voice):2M,播放长度不超过60s,支持AMR\...
java
public static Media mediaUpload(String access_token,MediaType mediaType,InputStream inputStream){ HttpPost httpPost = new HttpPost(BASE_URI+"/cgi-bin/media/upload"); byte[] data = null; try { data = StreamUtils.copyToByteArray(inputStream); } catch (IOException e) { logger.error("", e); } HttpEntity r...
[ "public", "static", "Media", "mediaUpload", "(", "String", "access_token", ",", "MediaType", "mediaType", ",", "InputStream", "inputStream", ")", "{", "HttpPost", "httpPost", "=", "new", "HttpPost", "(", "BASE_URI", "+", "\"/cgi-bin/media/upload\"", ")", ";", "byt...
新增临时素材 媒体文件在后台保存时间为3天,即3天后media_id失效。 @param access_token access_token @param mediaType mediaType @param inputStream 多媒体文件有格式和大小限制,如下: 图片(image): 2M,支持bmp/png/jpeg/jpg/gif格式 语音(voice):2M,播放长度不超过60s,支持AMR\MP3格式 视频(video):10MB,支持MP4格式 缩略图(thumb):64KB,支持JPG格式 @return Media
[ "新增临时素材", "媒体文件在后台保存时间为3天,即3天后media_id失效。" ]
train
https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/MediaAPI.java#L84-L99
mattprecious/telescope
telescope/src/main/java/com/mattprecious/telescope/Lens.java
Lens.onCapture
public void onCapture(@Nullable Bitmap screenshot, @NonNull BitmapProcessorListener listener) { """ Called when a capture is triggered but not yet saved to a {@link File}, enabling additional processing before saving. The default implementation immediately calls the {@code listener} with the original screenshot....
java
public void onCapture(@Nullable Bitmap screenshot, @NonNull BitmapProcessorListener listener) { listener.onBitmapReady(screenshot); }
[ "public", "void", "onCapture", "(", "@", "Nullable", "Bitmap", "screenshot", ",", "@", "NonNull", "BitmapProcessorListener", "listener", ")", "{", "listener", ".", "onBitmapReady", "(", "screenshot", ")", ";", "}" ]
Called when a capture is triggered but not yet saved to a {@link File}, enabling additional processing before saving. The default implementation immediately calls the {@code listener} with the original screenshot. @param screenshot A reference to the screenshot that was captured. Can be null if screenshots were disabl...
[ "Called", "when", "a", "capture", "is", "triggered", "but", "not", "yet", "saved", "to", "a", "{", "@link", "File", "}", "enabling", "additional", "processing", "before", "saving", ".", "The", "default", "implementation", "immediately", "calls", "the", "{", ...
train
https://github.com/mattprecious/telescope/blob/ce5e2710fb16ee214026fc25b091eb946fdbbb3c/telescope/src/main/java/com/mattprecious/telescope/Lens.java#L24-L26
apache/incubator-gobblin
gobblin-utility/src/main/java/org/apache/gobblin/util/io/StreamUtils.java
StreamUtils.dirToTarArchiveOutputStream
private static void dirToTarArchiveOutputStream(Path destDir, TarArchiveOutputStream tarArchiveOutputStream) throws IOException { """ Helper method for {@link #tar(FileSystem, FileSystem, Path, Path)} that adds a directory entry to a given {@link TarArchiveOutputStream}. """ TarArchiveEntry tarArchi...
java
private static void dirToTarArchiveOutputStream(Path destDir, TarArchiveOutputStream tarArchiveOutputStream) throws IOException { TarArchiveEntry tarArchiveEntry = new TarArchiveEntry(formatPathToDir(destDir)); tarArchiveEntry.setModTime(System.currentTimeMillis()); tarArchiveOutputStream.putArchiveEn...
[ "private", "static", "void", "dirToTarArchiveOutputStream", "(", "Path", "destDir", ",", "TarArchiveOutputStream", "tarArchiveOutputStream", ")", "throws", "IOException", "{", "TarArchiveEntry", "tarArchiveEntry", "=", "new", "TarArchiveEntry", "(", "formatPathToDir", "(", ...
Helper method for {@link #tar(FileSystem, FileSystem, Path, Path)} that adds a directory entry to a given {@link TarArchiveOutputStream}.
[ "Helper", "method", "for", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/io/StreamUtils.java#L157-L163
xqbase/util
util/src/main/java/com/xqbase/util/Numbers.java
Numbers.parseLong
public static long parseLong(String s, long l) { """ Parse a <b>long</b> with a given default value <b>l</b> @return default value if null or not parsable """ if (s == null) { return l; } try { return Long.parseLong(s.trim()); } catch (NumberFormatException e) { return l; } }
java
public static long parseLong(String s, long l) { if (s == null) { return l; } try { return Long.parseLong(s.trim()); } catch (NumberFormatException e) { return l; } }
[ "public", "static", "long", "parseLong", "(", "String", "s", ",", "long", "l", ")", "{", "if", "(", "s", "==", "null", ")", "{", "return", "l", ";", "}", "try", "{", "return", "Long", ".", "parseLong", "(", "s", ".", "trim", "(", ")", ")", ";",...
Parse a <b>long</b> with a given default value <b>l</b> @return default value if null or not parsable
[ "Parse", "a", "<b", ">", "long<", "/", "b", ">", "with", "a", "given", "default", "value", "<b", ">", "l<", "/", "b", ">" ]
train
https://github.com/xqbase/util/blob/e7b9167b6c701b9eec988a9d1e68446cef5ef420/util/src/main/java/com/xqbase/util/Numbers.java#L74-L83
inferred/FreeBuilder
src/main/java/org/inferred/freebuilder/processor/source/FunctionalType.java
FunctionalType.functionalTypesAcceptedByMethod
public static List<FunctionalType> functionalTypesAcceptedByMethod( DeclaredType type, String methodName, Elements elements, Types types) { """ Returns the functional types accepted by {@code methodName} on {@code type}. """ TypeElement typeElement = asElement(type); return meth...
java
public static List<FunctionalType> functionalTypesAcceptedByMethod( DeclaredType type, String methodName, Elements elements, Types types) { TypeElement typeElement = asElement(type); return methodsOn(typeElement, elements, errorType -> { }) .stream() .filter(method -> met...
[ "public", "static", "List", "<", "FunctionalType", ">", "functionalTypesAcceptedByMethod", "(", "DeclaredType", "type", ",", "String", "methodName", ",", "Elements", "elements", ",", "Types", "types", ")", "{", "TypeElement", "typeElement", "=", "asElement", "(", ...
Returns the functional types accepted by {@code methodName} on {@code type}.
[ "Returns", "the", "functional", "types", "accepted", "by", "{" ]
train
https://github.com/inferred/FreeBuilder/blob/d5a222f90648aece135da4b971c55a60afe8649c/src/main/java/org/inferred/freebuilder/processor/source/FunctionalType.java#L149-L166
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.getOSUpgradeHistoryWithServiceResponseAsync
public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> getOSUpgradeHistoryWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { """ Gets list of OS upgrades on a VM scale set instance. @param resourceGroupName The name of the resource group. @param...
java
public Observable<ServiceResponse<Page<UpgradeOperationHistoricalStatusInfoInner>>> getOSUpgradeHistoryWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { return getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName) .concatMap(new Func1<ServiceResp...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "UpgradeOperationHistoricalStatusInfoInner", ">", ">", ">", "getOSUpgradeHistoryWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "vmScaleSetName", ")", "{", "r...
Gets list of OS upgrades on a VM scale set instance. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;UpgradeOperationHistoricalStatusInfoInne...
[ "Gets", "list", "of", "OS", "upgrades", "on", "a", "VM", "scale", "set", "instance", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineScaleSetsInner.java#L1811-L1823
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.getKeysForKeyNameAsync
public Observable<SharedAccessSignatureAuthorizationRuleInner> getKeysForKeyNameAsync(String resourceGroupName, String resourceName, String keyName) { """ Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Get a shared...
java
public Observable<SharedAccessSignatureAuthorizationRuleInner> getKeysForKeyNameAsync(String resourceGroupName, String resourceName, String keyName) { return getKeysForKeyNameWithServiceResponseAsync(resourceGroupName, resourceName, keyName).map(new Func1<ServiceResponse<SharedAccessSignatureAuthorizationRuleIn...
[ "public", "Observable", "<", "SharedAccessSignatureAuthorizationRuleInner", ">", "getKeysForKeyNameAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "keyName", ")", "{", "return", "getKeysForKeyNameWithServiceResponseAsync", "(", "resou...
Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security. @param resourceGroupName ...
[ "Get", "a", "shared", "access", "policy", "by", "name", "from", "an", "IoT", "hub", ".", "For", "more", "information", "see", ":", "https", ":", "//", "docs", ".", "microsoft", ".", "com", "/", "azure", "/", "iot", "-", "hub", "/", "iot", "-", "hub...
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#L2999-L3006
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java
OverviewPlot.embedOrThumbnail
private Visualization embedOrThumbnail(final int thumbsize, PlotItem it, VisualizationTask task, Element parent) { """ Produce thumbnail for a visualizer. @param thumbsize Thumbnail size @param it Plot item @param task Task @param parent Parent element to draw to """ final Visualization vis; if(!...
java
private Visualization embedOrThumbnail(final int thumbsize, PlotItem it, VisualizationTask task, Element parent) { final Visualization vis; if(!single) { vis = task.getFactory().makeVisualizationOrThumbnail(context, task, plot, it.w, it.h, it.proj, thumbsize); } else { vis = task.getFactory(...
[ "private", "Visualization", "embedOrThumbnail", "(", "final", "int", "thumbsize", ",", "PlotItem", "it", ",", "VisualizationTask", "task", ",", "Element", "parent", ")", "{", "final", "Visualization", "vis", ";", "if", "(", "!", "single", ")", "{", "vis", "=...
Produce thumbnail for a visualizer. @param thumbsize Thumbnail size @param it Plot item @param task Task @param parent Parent element to draw to
[ "Produce", "thumbnail", "for", "a", "visualizer", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/gui/overview/OverviewPlot.java#L401-L418
hawkular/hawkular-inventory
hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/Interest.java
Interest.matches
public boolean matches(Action<?, ?> action, Object object) { """ Checks whether given object is of interest to this interest instance. @param action the action to be performed on the object @param object the object to check @return true if the object is of interest to this, false otherwise """ ret...
java
public boolean matches(Action<?, ?> action, Object object) { return this.action == action && object != null && entityType.isAssignableFrom(object.getClass()); }
[ "public", "boolean", "matches", "(", "Action", "<", "?", ",", "?", ">", "action", ",", "Object", "object", ")", "{", "return", "this", ".", "action", "==", "action", "&&", "object", "!=", "null", "&&", "entityType", ".", "isAssignableFrom", "(", "object"...
Checks whether given object is of interest to this interest instance. @param action the action to be performed on the object @param object the object to check @return true if the object is of interest to this, false otherwise
[ "Checks", "whether", "given", "object", "is", "of", "interest", "to", "this", "interest", "instance", "." ]
train
https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/Interest.java#L56-L58
aicer/hibiscus-http-client
src/main/java/org/aicer/hibiscus/util/HashGenerator.java
HashGenerator.getMD5Hash
public static String getMD5Hash(final String input) throws HibiscusException { """ Returns the MD5 hash of the input string @param input Input string @return String The md5 hash of the input string @throws HibiscusException """ String hashValue = null; try { final MessageDig...
java
public static String getMD5Hash(final String input) throws HibiscusException { String hashValue = null; try { final MessageDigest messageDigest = MessageDigest.getInstance(MESSAGE_DIGEST_ALGORITHM_MD5); byte[] md5Hash = new byte[BYTE_LENGTH_MD5]; messageDigest.up...
[ "public", "static", "String", "getMD5Hash", "(", "final", "String", "input", ")", "throws", "HibiscusException", "{", "String", "hashValue", "=", "null", ";", "try", "{", "final", "MessageDigest", "messageDigest", "=", "MessageDigest", ".", "getInstance", "(", "...
Returns the MD5 hash of the input string @param input Input string @return String The md5 hash of the input string @throws HibiscusException
[ "Returns", "the", "MD5", "hash", "of", "the", "input", "string" ]
train
https://github.com/aicer/hibiscus-http-client/blob/a037e3cf8d4bb862d38a55a090778736a48d67cc/src/main/java/org/aicer/hibiscus/util/HashGenerator.java#L117-L138
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnit.java
HiveRegistrationUnit.setSerDeProp
public void setSerDeProp(String key, Object value) { """ Set a serde parameter for a table/partition. <p> When using {@link org.apache.gobblin.hive.metastore.HiveMetaStoreBasedRegister}, since it internally use {@link org.apache.hadoop.hive.metastore.api.Table} and {@link org.apache.hadoop.hive.metastore.api....
java
public void setSerDeProp(String key, Object value) { this.serDeProps.setProp(key, value); updateSerDeFields(this.serDeProps, key, value); }
[ "public", "void", "setSerDeProp", "(", "String", "key", ",", "Object", "value", ")", "{", "this", ".", "serDeProps", ".", "setProp", "(", "key", ",", "value", ")", ";", "updateSerDeFields", "(", "this", ".", "serDeProps", ",", "key", ",", "value", ")", ...
Set a serde parameter for a table/partition. <p> When using {@link org.apache.gobblin.hive.metastore.HiveMetaStoreBasedRegister}, since it internally use {@link org.apache.hadoop.hive.metastore.api.Table} and {@link org.apache.hadoop.hive.metastore.api.Partition} which distinguishes between table/partition parameters,...
[ "Set", "a", "serde", "parameter", "for", "a", "table", "/", "partition", "." ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnit.java#L209-L212
OpenLiberty/open-liberty
dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java
TwitterEndpointServices.checkForEmptyResponse
public <T extends Object> Map<String, Object> checkForEmptyResponse(String endpoint, @Sensitive String responseBody, @Sensitive Map<String, T> responseValues) { """ Checks that the provided response body includes at least one parameter. @param endpoint @param responseBody May contain token secrets, so has bee...
java
public <T extends Object> Map<String, Object> checkForEmptyResponse(String endpoint, @Sensitive String responseBody, @Sensitive Map<String, T> responseValues) { if (responseValues == null || responseValues.isEmpty()) { return createErrorResponse("TWITTER_RESPONSE_HAS_NO_PARAMS", new Object[] { endpo...
[ "public", "<", "T", "extends", "Object", ">", "Map", "<", "String", ",", "Object", ">", "checkForEmptyResponse", "(", "String", "endpoint", ",", "@", "Sensitive", "String", "responseBody", ",", "@", "Sensitive", "Map", "<", "String", ",", "T", ">", "respon...
Checks that the provided response body includes at least one parameter. @param endpoint @param responseBody May contain token secrets, so has been annotated as @Sensitive. @param responseValues May contain token secrets, so has been annotated as @Sensitive. @return {@code null} if the response contained at least one p...
[ "Checks", "that", "the", "provided", "response", "body", "includes", "at", "least", "one", "parameter", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.social/src/com/ibm/ws/security/social/twitter/TwitterEndpointServices.java#L562-L567
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.createGraphics
public java.awt.Graphics2D createGraphics(float width, float height, FontMapper fontMapper) { """ Gets a <CODE>Graphics2D</CODE> to write on. The graphics are translated to PDF commands. @param width the width of the panel @param height the height of the panel @param fontMapper the mapping from awt fonts to <C...
java
public java.awt.Graphics2D createGraphics(float width, float height, FontMapper fontMapper) { return new PdfGraphics2D(this, width, height, fontMapper, false, false, 0); }
[ "public", "java", ".", "awt", ".", "Graphics2D", "createGraphics", "(", "float", "width", ",", "float", "height", ",", "FontMapper", "fontMapper", ")", "{", "return", "new", "PdfGraphics2D", "(", "this", ",", "width", ",", "height", ",", "fontMapper", ",", ...
Gets a <CODE>Graphics2D</CODE> to write on. The graphics are translated to PDF commands. @param width the width of the panel @param height the height of the panel @param fontMapper the mapping from awt fonts to <CODE>BaseFont</CODE> @return a <CODE>Graphics2D</CODE>
[ "Gets", "a", "<CODE", ">", "Graphics2D<", "/", "CODE", ">", "to", "write", "on", ".", "The", "graphics", "are", "translated", "to", "PDF", "commands", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L2884-L2886
GII/broccoli
broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java
OWLValueObject.buildAsResultFromObject
public static OWLValueObject buildAsResultFromObject(OWLModel model, Object object) throws NotYetImplementedException, OWLTranslationException { """ Builds an instance @param model @param object @return @throws NotYetImplementedException @throws OWLTranslationException """ if (ObjectOWLSTranslator...
java
public static OWLValueObject buildAsResultFromObject(OWLModel model, Object object) throws NotYetImplementedException, OWLTranslationException { if (ObjectOWLSTranslator.isJenaBean(object)) { try { return new OWLValueObject( model, OWLU...
[ "public", "static", "OWLValueObject", "buildAsResultFromObject", "(", "OWLModel", "model", ",", "Object", "object", ")", "throws", "NotYetImplementedException", ",", "OWLTranslationException", "{", "if", "(", "ObjectOWLSTranslator", ".", "isJenaBean", "(", "object", ")"...
Builds an instance @param model @param object @return @throws NotYetImplementedException @throws OWLTranslationException
[ "Builds", "an", "instance" ]
train
https://github.com/GII/broccoli/blob/a3033a90322cbcee4dc0f1719143b84b822bc4ba/broccoli-owls/src/main/java/com/hi3project/broccoli/bsdf/impl/owl/OWLValueObject.java#L174-L187
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.writeLine
public static void writeLine(BufferedWriter writer, String line) throws IOException { """ Write the text and append a newline (using the platform's line-ending). @param writer a BufferedWriter @param line the line to write @throws IOException if an IOException occurs. @since 1.0 """ writer.writ...
java
public static void writeLine(BufferedWriter writer, String line) throws IOException { writer.write(line); writer.newLine(); }
[ "public", "static", "void", "writeLine", "(", "BufferedWriter", "writer", ",", "String", "line", ")", "throws", "IOException", "{", "writer", ".", "write", "(", "line", ")", ";", "writer", ".", "newLine", "(", ")", ";", "}" ]
Write the text and append a newline (using the platform's line-ending). @param writer a BufferedWriter @param line the line to write @throws IOException if an IOException occurs. @since 1.0
[ "Write", "the", "text", "and", "append", "a", "newline", "(", "using", "the", "platform", "s", "line", "-", "ending", ")", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L925-L928
zaproxy/zaproxy
src/org/zaproxy/zap/spider/URLResolver.java
URLResolver.resolveUrl
public static String resolveUrl(final String baseUrl, final String relativeUrl) { """ Resolves a given relative URL against a base URL. See <a href="http://www.faqs.org/rfcs/rfc1808.html">RFC1808</a> Section 4 for more details. @param baseUrl The base URL in which to resolve the specification. @param relative...
java
public static String resolveUrl(final String baseUrl, final String relativeUrl) { // Parameter check if (baseUrl == null) { throw new IllegalArgumentException("Base URL must not be null"); } if (relativeUrl == null) { throw new IllegalArgumentException("Relative URL must not be null"); } final Url url...
[ "public", "static", "String", "resolveUrl", "(", "final", "String", "baseUrl", ",", "final", "String", "relativeUrl", ")", "{", "// Parameter check", "if", "(", "baseUrl", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Base URL must no...
Resolves a given relative URL against a base URL. See <a href="http://www.faqs.org/rfcs/rfc1808.html">RFC1808</a> Section 4 for more details. @param baseUrl The base URL in which to resolve the specification. @param relativeUrl The relative URL to resolve against the base URL. @return the resolved specification.
[ "Resolves", "a", "given", "relative", "URL", "against", "a", "base", "URL", ".", "See", "<a", "href", "=", "http", ":", "//", "www", ".", "faqs", ".", "org", "/", "rfcs", "/", "rfc1808", ".", "html", ">", "RFC1808<", "/", "a", ">", "Section", "4", ...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/URLResolver.java#L40-L51
wmdietl/jsr308-langtools
src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java
SourceToHTMLConverter.addLine
private void addLine(Content pre, String line, int currentLineNo) { """ Add a line from source to the HTML file that is generated. @param pre the content tree to which the line will be added. @param line the string to format. @param currentLineNo the current number. """ if (line != null) { ...
java
private void addLine(Content pre, String line, int currentLineNo) { if (line != null) { pre.addContent(Util.replaceTabs(configuration, line)); Content anchor = HtmlTree.A_NAME("line." + Integer.toString(currentLineNo)); pre.addContent(anchor); pre.addContent(NEW_L...
[ "private", "void", "addLine", "(", "Content", "pre", ",", "String", "line", ",", "int", "currentLineNo", ")", "{", "if", "(", "line", "!=", "null", ")", "{", "pre", ".", "addContent", "(", "Util", ".", "replaceTabs", "(", "configuration", ",", "line", ...
Add a line from source to the HTML file that is generated. @param pre the content tree to which the line will be added. @param line the string to format. @param currentLineNo the current number.
[ "Add", "a", "line", "from", "source", "to", "the", "HTML", "file", "that", "is", "generated", "." ]
train
https://github.com/wmdietl/jsr308-langtools/blob/8812d28c20f4de070a0dd6de1b45602431379834/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java#L270-L277
atomix/atomix
core/src/main/java/io/atomix/core/impl/CoreTransactionService.java
CoreTransactionService.recoverTransaction
private void recoverTransaction(TransactionId transactionId, TransactionInfo transactionInfo) { """ Recovers and completes the given transaction. @param transactionId the transaction identifier @param transactionInfo the transaction info """ switch (transactionInfo.state) { case PREPARING: ...
java
private void recoverTransaction(TransactionId transactionId, TransactionInfo transactionInfo) { switch (transactionInfo.state) { case PREPARING: completePreparingTransaction(transactionId); break; case COMMITTING: completeCommittingTransaction(transactionId); break; ...
[ "private", "void", "recoverTransaction", "(", "TransactionId", "transactionId", ",", "TransactionInfo", "transactionInfo", ")", "{", "switch", "(", "transactionInfo", ".", "state", ")", "{", "case", "PREPARING", ":", "completePreparingTransaction", "(", "transactionId",...
Recovers and completes the given transaction. @param transactionId the transaction identifier @param transactionInfo the transaction info
[ "Recovers", "and", "completes", "the", "given", "transaction", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/core/src/main/java/io/atomix/core/impl/CoreTransactionService.java#L212-L226
DDTH/ddth-zookeeper
src/main/java/com/github/ddth/zookeeper/ZooKeeperClient.java
ZooKeeperClient.createNode
public boolean createNode(String path, byte[] value) throws ZooKeeperException { """ Creates a node, with initial values. <p> Note: nodes are created recursively (parent nodes are created if needed). </p> @param path @param value @return @throws ZooKeeperException """ return _create(path, va...
java
public boolean createNode(String path, byte[] value) throws ZooKeeperException { return _create(path, value, CreateMode.PERSISTENT); }
[ "public", "boolean", "createNode", "(", "String", "path", ",", "byte", "[", "]", "value", ")", "throws", "ZooKeeperException", "{", "return", "_create", "(", "path", ",", "value", ",", "CreateMode", ".", "PERSISTENT", ")", ";", "}" ]
Creates a node, with initial values. <p> Note: nodes are created recursively (parent nodes are created if needed). </p> @param path @param value @return @throws ZooKeeperException
[ "Creates", "a", "node", "with", "initial", "values", "." ]
train
https://github.com/DDTH/ddth-zookeeper/blob/0994eea8b25fa3d885f3da4579768b7d08c1c32b/src/main/java/com/github/ddth/zookeeper/ZooKeeperClient.java#L453-L455
grpc/grpc-java
api/src/main/java/io/grpc/InternalLogId.java
InternalLogId.allocate
public static InternalLogId allocate(String typeName, @Nullable String details) { """ Creates a log id. @param typeName the "Type" to be used when logging this id. @param details a short, human readable string that describes the object the id is attached to. Typically this will be an address or target. ""...
java
public static InternalLogId allocate(String typeName, @Nullable String details) { return new InternalLogId(typeName, details, getNextId()); }
[ "public", "static", "InternalLogId", "allocate", "(", "String", "typeName", ",", "@", "Nullable", "String", "details", ")", "{", "return", "new", "InternalLogId", "(", "typeName", ",", "details", ",", "getNextId", "(", ")", ")", ";", "}" ]
Creates a log id. @param typeName the "Type" to be used when logging this id. @param details a short, human readable string that describes the object the id is attached to. Typically this will be an address or target.
[ "Creates", "a", "log", "id", "." ]
train
https://github.com/grpc/grpc-java/blob/973885457f9609de232d2553b82c67f6c3ff57bf/api/src/main/java/io/grpc/InternalLogId.java#L54-L56
finmath/finmath-lib
src/main/java6/net/finmath/functions/AnalyticFormulas.java
AnalyticFormulas.sabrAlphaApproximation
public static double sabrAlphaApproximation(double normalVolatility, double beta, double rho, double nu, double displacement, double underlying, double maturity) { """ Return the parameter alpha (initial value of the stochastic vol process) of a SABR model using the to match the given at-the-money volatility. ...
java
public static double sabrAlphaApproximation(double normalVolatility, double beta, double rho, double nu, double displacement, double underlying, double maturity) { // Apply displacement. Displaced model is just a shift on underlying and strike. underlying += displacement; // ATM case. double forwardStrikeAver...
[ "public", "static", "double", "sabrAlphaApproximation", "(", "double", "normalVolatility", ",", "double", "beta", ",", "double", "rho", ",", "double", "nu", ",", "double", "displacement", ",", "double", "underlying", ",", "double", "maturity", ")", "{", "// Appl...
Return the parameter alpha (initial value of the stochastic vol process) of a SABR model using the to match the given at-the-money volatility. @param normalVolatility ATM volatility to match. @param beta CEV parameter of the SABR model. @param rho Correlation (leverages) of the stochastic volatility. @param nu Volatil...
[ "Return", "the", "parameter", "alpha", "(", "initial", "value", "of", "the", "stochastic", "vol", "process", ")", "of", "a", "SABR", "model", "using", "the", "to", "match", "the", "given", "at", "-", "the", "-", "money", "volatility", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java6/net/finmath/functions/AnalyticFormulas.java#L1175-L1200
EMCECS/nfs-client-java
src/main/java/com/emc/ecs/nfsclient/rpc/Xdr.java
Xdr.getBytes
public void getBytes(int lengthToCopy, byte[] copyArray, int copyOffset) { """ Get bytes from the xdr buffer to the input buffer @param lengthToCopy Number of bytes to copy. @param copyArray Array to hold the copied data. @param copyOffset Where to start the copy. """ if (lengthToCopy > 0) { ...
java
public void getBytes(int lengthToCopy, byte[] copyArray, int copyOffset) { if (lengthToCopy > 0) { System.arraycopy(_buffer, _offset, copyArray, copyOffset, lengthToCopy); skip(lengthToCopy); } }
[ "public", "void", "getBytes", "(", "int", "lengthToCopy", ",", "byte", "[", "]", "copyArray", ",", "int", "copyOffset", ")", "{", "if", "(", "lengthToCopy", ">", "0", ")", "{", "System", ".", "arraycopy", "(", "_buffer", ",", "_offset", ",", "copyArray",...
Get bytes from the xdr buffer to the input buffer @param lengthToCopy Number of bytes to copy. @param copyArray Array to hold the copied data. @param copyOffset Where to start the copy.
[ "Get", "bytes", "from", "the", "xdr", "buffer", "to", "the", "input", "buffer" ]
train
https://github.com/EMCECS/nfs-client-java/blob/7ba25bad5052b95cd286052745327729288b2843/src/main/java/com/emc/ecs/nfsclient/rpc/Xdr.java#L308-L314
ThreeTen/threeten-extra
src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java
Symmetry010Chronology.dateYearDay
@Override public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) { """ Obtains a local date in Symmetry010 calendar system from the era, year-of-era and day-of-year fields. @param era the Symmetry010 era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @r...
java
@Override public Symmetry010Date dateYearDay(Era era, int yearOfEra, int dayOfYear) { return dateYearDay(prolepticYear(era, yearOfEra), dayOfYear); }
[ "@", "Override", "public", "Symmetry010Date", "dateYearDay", "(", "Era", "era", ",", "int", "yearOfEra", ",", "int", "dayOfYear", ")", "{", "return", "dateYearDay", "(", "prolepticYear", "(", "era", ",", "yearOfEra", ")", ",", "dayOfYear", ")", ";", "}" ]
Obtains a local date in Symmetry010 calendar system from the era, year-of-era and day-of-year fields. @param era the Symmetry010 era, not null @param yearOfEra the year-of-era @param dayOfYear the day-of-year @return the Symmetry010 local date, not null @throws DateTimeException if unable to create the date @throws...
[ "Obtains", "a", "local", "date", "in", "Symmetry010", "calendar", "system", "from", "the", "era", "year", "-", "of", "-", "era", "and", "day", "-", "of", "-", "year", "fields", "." ]
train
https://github.com/ThreeTen/threeten-extra/blob/e94ecd3592ef70e54d6eea21095239ea9ffbab78/src/main/java/org/threeten/extra/chrono/Symmetry010Chronology.java#L287-L290
lucee/Lucee
core/src/main/java/lucee/commons/io/IOUtil.java
IOUtil._getReader
private static Reader _getReader(InputStream is, Charset charset) throws IOException { """ returns a Reader for the given InputStream @param is @param charset @return Reader @throws IOException """ if (charset == null) charset = SystemUtil.getCharset(); return new BufferedReader(new InputStreamReader(i...
java
private static Reader _getReader(InputStream is, Charset charset) throws IOException { if (charset == null) charset = SystemUtil.getCharset(); return new BufferedReader(new InputStreamReader(is, charset)); }
[ "private", "static", "Reader", "_getReader", "(", "InputStream", "is", ",", "Charset", "charset", ")", "throws", "IOException", "{", "if", "(", "charset", "==", "null", ")", "charset", "=", "SystemUtil", ".", "getCharset", "(", ")", ";", "return", "new", "...
returns a Reader for the given InputStream @param is @param charset @return Reader @throws IOException
[ "returns", "a", "Reader", "for", "the", "given", "InputStream" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/IOUtil.java#L667-L670
Azure/azure-sdk-for-java
datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java
AccountsInner.listStorageAccountsAsync
public Observable<Page<StorageAccountInfoInner>> listStorageAccountsAsync(final String resourceGroupName, final String accountName) { """ Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param reso...
java
public Observable<Page<StorageAccountInfoInner>> listStorageAccountsAsync(final String resourceGroupName, final String accountName) { return listStorageAccountsWithServiceResponseAsync(resourceGroupName, accountName) .map(new Func1<ServiceResponse<Page<StorageAccountInfoInner>>, Page<StorageAccountI...
[ "public", "Observable", "<", "Page", "<", "StorageAccountInfoInner", ">", ">", "listStorageAccountsAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ")", "{", "return", "listStorageAccountsWithServiceResponseAsync", "(", "resource...
Gets the first page of Azure Storage accounts, if any, linked to the specified Data Lake Analytics account. The response includes a link to the next page, if any. @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. @param accountName The name of the Data Lake An...
[ "Gets", "the", "first", "page", "of", "Azure", "Storage", "accounts", "if", "any", "linked", "to", "the", "specified", "Data", "Lake", "Analytics", "account", ".", "The", "response", "includes", "a", "link", "to", "the", "next", "page", "if", "any", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakeanalytics/resource-manager/v2015_10_01_preview/src/main/java/com/microsoft/azure/management/datalakeanalytics/v2015_10_01_preview/implementation/AccountsInner.java#L1270-L1278
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/CollectionUtils.java
CollectionUtils.sampleWithoutReplacement
public static <E> Collection<E> sampleWithoutReplacement(Collection<E> c, int n) { """ Samples without replacement from a collection. @param c The collection to be sampled from @param n The number of samples to take @return a new collection with the sample """ return sampleWithoutReplacement(c, n, ...
java
public static <E> Collection<E> sampleWithoutReplacement(Collection<E> c, int n) { return sampleWithoutReplacement(c, n, new Random()); }
[ "public", "static", "<", "E", ">", "Collection", "<", "E", ">", "sampleWithoutReplacement", "(", "Collection", "<", "E", ">", "c", ",", "int", "n", ")", "{", "return", "sampleWithoutReplacement", "(", "c", ",", "n", ",", "new", "Random", "(", ")", ")",...
Samples without replacement from a collection. @param c The collection to be sampled from @param n The number of samples to take @return a new collection with the sample
[ "Samples", "without", "replacement", "from", "a", "collection", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/CollectionUtils.java#L331-L333
cdk/cdk
base/core/src/main/java/org/openscience/cdk/graph/Cycles.java
Cycles._invoke
private static Cycles _invoke(CycleFinder finder, IAtomContainer container, int length) { """ Internal method to wrap cycle computations which <i>should</i> be tractable. That is they currently won't throw the exception - if the method does throw an exception an internal error is triggered as a sanity check. ...
java
private static Cycles _invoke(CycleFinder finder, IAtomContainer container, int length) { try { return finder.find(container, length); } catch (Intractable e) { throw new RuntimeException("Cycle computation should not be intractable: ", e); } }
[ "private", "static", "Cycles", "_invoke", "(", "CycleFinder", "finder", ",", "IAtomContainer", "container", ",", "int", "length", ")", "{", "try", "{", "return", "finder", ".", "find", "(", "container", ",", "length", ")", ";", "}", "catch", "(", "Intracta...
Internal method to wrap cycle computations which <i>should</i> be tractable. That is they currently won't throw the exception - if the method does throw an exception an internal error is triggered as a sanity check. @param finder the cycle finding method @param container the molecule to find the cycles of @param le...
[ "Internal", "method", "to", "wrap", "cycle", "computations", "which", "<i", ">", "should<", "/", "i", ">", "be", "tractable", ".", "That", "is", "they", "currently", "won", "t", "throw", "the", "exception", "-", "if", "the", "method", "does", "throw", "a...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/graph/Cycles.java#L706-L712
grails/grails-core
grails-core/src/main/groovy/grails/util/GrailsClassUtils.java
GrailsClassUtils.getPropertyOrStaticPropertyOrFieldValue
public static Object getPropertyOrStaticPropertyOrFieldValue(Object obj, String name) throws BeansException { """ <p>Looks for a property of the reference instance with a given name.</p> <p>If found its value is returned. We follow the Java bean conventions with augmentation for groovy support and static fields/...
java
public static Object getPropertyOrStaticPropertyOrFieldValue(Object obj, String name) throws BeansException { BeanWrapper ref = new BeanWrapperImpl(obj); return getPropertyOrStaticPropertyOrFieldValue(ref, obj, name); }
[ "public", "static", "Object", "getPropertyOrStaticPropertyOrFieldValue", "(", "Object", "obj", ",", "String", "name", ")", "throws", "BeansException", "{", "BeanWrapper", "ref", "=", "new", "BeanWrapperImpl", "(", "obj", ")", ";", "return", "getPropertyOrStaticPropert...
<p>Looks for a property of the reference instance with a given name.</p> <p>If found its value is returned. We follow the Java bean conventions with augmentation for groovy support and static fields/properties. We will therefore match, in this order: </p> <ol> <li>Standard public bean property (with getter or just publ...
[ "<p", ">", "Looks", "for", "a", "property", "of", "the", "reference", "instance", "with", "a", "given", "name", ".", "<", "/", "p", ">", "<p", ">", "If", "found", "its", "value", "is", "returned", ".", "We", "follow", "the", "Java", "bean", "conventi...
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L626-L629
korpling/ANNIS
annis-service/src/main/java/annis/administration/AdministrationDao.java
AdministrationDao.getOperators
private void getOperators(List<ExampleQuery> exQueries, String regex) { """ Fetches operators used in the {@link ExampleQuery#getExampleQuery()} with a given regex. @param exQueries Set the used operators property of each member. @param regex The regex to search operators. """ Pattern opsRegex = Patt...
java
private void getOperators(List<ExampleQuery> exQueries, String regex) { Pattern opsRegex = Pattern.compile(regex); for (ExampleQuery eQ : exQueries) { List<String> ops = new ArrayList<>(); Matcher m = opsRegex.matcher(eQ.getExampleQuery().replaceAll("\\s", "")); while (m.find()) ...
[ "private", "void", "getOperators", "(", "List", "<", "ExampleQuery", ">", "exQueries", ",", "String", "regex", ")", "{", "Pattern", "opsRegex", "=", "Pattern", ".", "compile", "(", "regex", ")", ";", "for", "(", "ExampleQuery", "eQ", ":", "exQueries", ")",...
Fetches operators used in the {@link ExampleQuery#getExampleQuery()} with a given regex. @param exQueries Set the used operators property of each member. @param regex The regex to search operators.
[ "Fetches", "operators", "used", "in", "the", "{", "@link", "ExampleQuery#getExampleQuery", "()", "}", "with", "a", "given", "regex", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-service/src/main/java/annis/administration/AdministrationDao.java#L2191-L2207
shrinkwrap/resolver
maven/impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/bootstrap/MavenManagerBuilder.java
MavenManagerBuilder.dependencyGraphTransformer
public DependencyGraphTransformer dependencyGraphTransformer() { """ Gets a dependency graph transformer. This one handles scope changes @return """ DependencyGraphTransformer transformer = new ConflictResolver(new NearestVersionSelector(), new JavaScopeSelector(), ...
java
public DependencyGraphTransformer dependencyGraphTransformer() { DependencyGraphTransformer transformer = new ConflictResolver(new NearestVersionSelector(), new JavaScopeSelector(), new SimpleOptionalitySelector(), new JavaScopeDeriver()); return new ChainedDepen...
[ "public", "DependencyGraphTransformer", "dependencyGraphTransformer", "(", ")", "{", "DependencyGraphTransformer", "transformer", "=", "new", "ConflictResolver", "(", "new", "NearestVersionSelector", "(", ")", ",", "new", "JavaScopeSelector", "(", ")", ",", "new", "Simp...
Gets a dependency graph transformer. This one handles scope changes @return
[ "Gets", "a", "dependency", "graph", "transformer", ".", "This", "one", "handles", "scope", "changes" ]
train
https://github.com/shrinkwrap/resolver/blob/e881a84b8cff5b0a014f2a5ebf612be3eb9db01f/maven/impl-maven/src/main/java/org/jboss/shrinkwrap/resolver/impl/maven/bootstrap/MavenManagerBuilder.java#L254-L260
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java
CQLTranslator.buildWhereClause
public void buildWhereClause(StringBuilder builder, String field, Field member, Object entity) { """ Build where clause with @ EQ_CLAUSE} clause. @param builder the builder @param field the field @param member the member @param entity the entity """ // builder = ensureCase(builder, field, fal...
java
public void buildWhereClause(StringBuilder builder, String field, Field member, Object entity) { // builder = ensureCase(builder, field, false); // builder.append(EQ_CLAUSE); // appendColumnValue(builder, entity, member); // builder.append(AND_CLAUSE); Object value = Property...
[ "public", "void", "buildWhereClause", "(", "StringBuilder", "builder", ",", "String", "field", ",", "Field", "member", ",", "Object", "entity", ")", "{", "// builder = ensureCase(builder, field, false);", "// builder.append(EQ_CLAUSE);", "// appendColumnValue(builder, entity, m...
Build where clause with @ EQ_CLAUSE} clause. @param builder the builder @param field the field @param member the member @param entity the entity
[ "Build", "where", "clause", "with", "@", "EQ_CLAUSE", "}", "clause", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/thrift/CQLTranslator.java#L838-L846
kpelykh/docker-java
src/main/java/com/kpelykh/docker/client/DockerClient.java
DockerClient.importImage
public ImageCreateResponse importImage(String repository, String tag, InputStream imageStream) throws DockerException { """ Create an image by importing the given stream of a tar file. @param repository the repository to import to @param tag any tag for this image @param imageStream the InputStream o...
java
public ImageCreateResponse importImage(String repository, String tag, InputStream imageStream) throws DockerException { Preconditions.checkNotNull(repository, "Repository was not specified"); Preconditions.checkNotNull(imageStream, "imageStream was not provided"); MultivaluedMap<String, String> params = new Mult...
[ "public", "ImageCreateResponse", "importImage", "(", "String", "repository", ",", "String", "tag", ",", "InputStream", "imageStream", ")", "throws", "DockerException", "{", "Preconditions", ".", "checkNotNull", "(", "repository", ",", "\"Repository was not specified\"", ...
Create an image by importing the given stream of a tar file. @param repository the repository to import to @param tag any tag for this image @param imageStream the InputStream of the tar file @return an {@link ImageCreateResponse} containing the id of the imported image @throws DockerException if the import f...
[ "Create", "an", "image", "by", "importing", "the", "given", "stream", "of", "a", "tar", "file", "." ]
train
https://github.com/kpelykh/docker-java/blob/26b4069bb1985a8c293a016aaf9b56979771d75b/src/main/java/com/kpelykh/docker/client/DockerClient.java#L335-L357
javagl/ND
nd-tuples/src/main/java/de/javagl/nd/tuples/d/DoubleTuples.java
DoubleTuples.createSubTuple
static DoubleTuple createSubTuple( DoubleTuple parent, int fromIndex, int toIndex) { """ Creates a new tuple that is a <i>view</i> on the specified portion of the given parent. Changes in the parent will be visible in the returned tuple. @param parent The parent tuple @param fromIndex The start inde...
java
static DoubleTuple createSubTuple( DoubleTuple parent, int fromIndex, int toIndex) { return new SubDoubleTuple(parent, fromIndex, toIndex); }
[ "static", "DoubleTuple", "createSubTuple", "(", "DoubleTuple", "parent", ",", "int", "fromIndex", ",", "int", "toIndex", ")", "{", "return", "new", "SubDoubleTuple", "(", "parent", ",", "fromIndex", ",", "toIndex", ")", ";", "}" ]
Creates a new tuple that is a <i>view</i> on the specified portion of the given parent. Changes in the parent will be visible in the returned tuple. @param parent The parent tuple @param fromIndex The start index in the parent, inclusive @param toIndex The end index in the parent, exclusive @throws NullPointerExceptio...
[ "Creates", "a", "new", "tuple", "that", "is", "a", "<i", ">", "view<", "/", "i", ">", "on", "the", "specified", "portion", "of", "the", "given", "parent", ".", "Changes", "in", "the", "parent", "will", "be", "visible", "in", "the", "returned", "tuple",...
train
https://github.com/javagl/ND/blob/bcb655aaf5fc88af6194f73a27cca079186ff559/nd-tuples/src/main/java/de/javagl/nd/tuples/d/DoubleTuples.java#L227-L231
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/IDNA.java
IDNA.convertIDNToUnicode
@Deprecated public static StringBuffer convertIDNToUnicode(UCharacterIterator src, int options) throws StringPrepParseException { """ IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC. This operation is done on complete domain names, e.g: "www.example...
java
@Deprecated public static StringBuffer convertIDNToUnicode(UCharacterIterator src, int options) throws StringPrepParseException{ return convertIDNToUnicode(src.getText(), options); }
[ "@", "Deprecated", "public", "static", "StringBuffer", "convertIDNToUnicode", "(", "UCharacterIterator", "src", ",", "int", "options", ")", "throws", "StringPrepParseException", "{", "return", "convertIDNToUnicode", "(", "src", ".", "getText", "(", ")", ",", "option...
IDNA2003: Convenience function that implements the IDNToUnicode operation as defined in the IDNA RFC. This operation is done on complete domain names, e.g: "www.example.com". <b>Note:</b> IDNA RFC specifies that a conformant application should divide a domain name into separate labels, decide whether to apply allowUna...
[ "IDNA2003", ":", "Convenience", "function", "that", "implements", "the", "IDNToUnicode", "operation", "as", "defined", "in", "the", "IDNA", "RFC", ".", "This", "operation", "is", "done", "on", "complete", "domain", "names", "e", ".", "g", ":", "www", ".", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/IDNA.java#L780-L784
mapsforge/mapsforge
mapsforge-map/src/main/java/org/mapsforge/map/datastore/MultiMapDataStore.java
MultiMapDataStore.addMapDataStore
public void addMapDataStore(MapDataStore mapDataStore, boolean useStartZoomLevel, boolean useStartPosition) { """ adds another mapDataStore @param mapDataStore the mapDataStore to add @param useStartZoomLevel if true, use the start zoom level of this mapDataStore as the start zoom level @param useStartPo...
java
public void addMapDataStore(MapDataStore mapDataStore, boolean useStartZoomLevel, boolean useStartPosition) { if (this.mapDatabases.contains(mapDataStore)) { throw new IllegalArgumentException("Duplicate map database"); } this.mapDatabases.add(mapDataStore); if (useStartZoomL...
[ "public", "void", "addMapDataStore", "(", "MapDataStore", "mapDataStore", ",", "boolean", "useStartZoomLevel", ",", "boolean", "useStartPosition", ")", "{", "if", "(", "this", ".", "mapDatabases", ".", "contains", "(", "mapDataStore", ")", ")", "{", "throw", "ne...
adds another mapDataStore @param mapDataStore the mapDataStore to add @param useStartZoomLevel if true, use the start zoom level of this mapDataStore as the start zoom level @param useStartPosition if true, use the start position of this mapDataStore as the start position
[ "adds", "another", "mapDataStore" ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map/src/main/java/org/mapsforge/map/datastore/MultiMapDataStore.java#L65-L81
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java
JBBPDslBuilder.NewLineComment
public JBBPDslBuilder NewLineComment(final String text) { """ Add comment which will be placed on new line. @param text text of comment, can be null @return the builder instance, must not be null @since 1.4.1 """ this.addItem(new ItemComment(text == null ? "" : text, true)); return this; }
java
public JBBPDslBuilder NewLineComment(final String text) { this.addItem(new ItemComment(text == null ? "" : text, true)); return this; }
[ "public", "JBBPDslBuilder", "NewLineComment", "(", "final", "String", "text", ")", "{", "this", ".", "addItem", "(", "new", "ItemComment", "(", "text", "==", "null", "?", "\"\"", ":", "text", ",", "true", ")", ")", ";", "return", "this", ";", "}" ]
Add comment which will be placed on new line. @param text text of comment, can be null @return the builder instance, must not be null @since 1.4.1
[ "Add", "comment", "which", "will", "be", "placed", "on", "new", "line", "." ]
train
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/utils/JBBPDslBuilder.java#L1313-L1316
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/validation/fieldvalidation/AbstractArrayFieldValidator.java
AbstractArrayFieldValidator.error
public void error(final ArrayCellField<E> cellField, final String messageKey, final Map<String, Object> messageVariables) { """ メッセージキーを指定して、エラー情報を追加します。 @param cellField フィールド情報 @param messageKey メッセージキー @param messageVariables メッセージ中の変数 @throws IllegalArgumentException {@literal cellField == null or messageK...
java
public void error(final ArrayCellField<E> cellField, final String messageKey, final Map<String, Object> messageVariables) { ArgUtils.notEmpty(messageKey, "messageKey"); ArgUtils.notNull(cellField, "cellField"); ArgUtils.notNull(messageVariables, "messageVariables"); cellField.rejec...
[ "public", "void", "error", "(", "final", "ArrayCellField", "<", "E", ">", "cellField", ",", "final", "String", "messageKey", ",", "final", "Map", "<", "String", ",", "Object", ">", "messageVariables", ")", "{", "ArgUtils", ".", "notEmpty", "(", "messageKey",...
メッセージキーを指定して、エラー情報を追加します。 @param cellField フィールド情報 @param messageKey メッセージキー @param messageVariables メッセージ中の変数 @throws IllegalArgumentException {@literal cellField == null or messageKey == null or messageVariables == null} @throws IllegalArgumentException {@literal messageKey.length() == 0}
[ "メッセージキーを指定して、エラー情報を追加します。" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/validation/fieldvalidation/AbstractArrayFieldValidator.java#L114-L121
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java
ApplicationGatewaysInner.backendHealthAsync
public Observable<ApplicationGatewayBackendHealthInner> backendHealthAsync(String resourceGroupName, String applicationGatewayName, String expand) { """ Gets the backend health of the specified application gateway in a resource group. @param resourceGroupName The name of the resource group. @param applicationG...
java
public Observable<ApplicationGatewayBackendHealthInner> backendHealthAsync(String resourceGroupName, String applicationGatewayName, String expand) { return backendHealthWithServiceResponseAsync(resourceGroupName, applicationGatewayName, expand).map(new Func1<ServiceResponse<ApplicationGatewayBackendHealthInner>...
[ "public", "Observable", "<", "ApplicationGatewayBackendHealthInner", ">", "backendHealthAsync", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ",", "String", "expand", ")", "{", "return", "backendHealthWithServiceResponseAsync", "(", "resourceGro...
Gets the backend health of the specified application gateway in a resource group. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @param expand Expands BackendAddressPool and BackendHttpSettings referenced in backend health. @throws IllegalArg...
[ "Gets", "the", "backend", "health", "of", "the", "specified", "application", "gateway", "in", "a", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ApplicationGatewaysInner.java#L1500-L1507
lagom/lagom
service/javadsl/server/src/main/java/com/lightbend/lagom/javadsl/server/status/Latency.java
Latency.withPercentile98th
public final Latency withPercentile98th(double value) { """ Copy the current immutable object by setting a value for the {@link AbstractLatency#getPercentile98th() percentile98th} attribute. @param value A new value for percentile98th @return A modified copy of the {@code this} object """ double newValue...
java
public final Latency withPercentile98th(double value) { double newValue = value; return new Latency(this.median, newValue, this.percentile99th, this.percentile999th, this.mean, this.min, this.max); }
[ "public", "final", "Latency", "withPercentile98th", "(", "double", "value", ")", "{", "double", "newValue", "=", "value", ";", "return", "new", "Latency", "(", "this", ".", "median", ",", "newValue", ",", "this", ".", "percentile99th", ",", "this", ".", "p...
Copy the current immutable object by setting a value for the {@link AbstractLatency#getPercentile98th() percentile98th} attribute. @param value A new value for percentile98th @return A modified copy of the {@code this} object
[ "Copy", "the", "current", "immutable", "object", "by", "setting", "a", "value", "for", "the", "{" ]
train
https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/server/src/main/java/com/lightbend/lagom/javadsl/server/status/Latency.java#L137-L140
voldemort/voldemort
src/java/voldemort/store/stats/StoreStats.java
StoreStats.recordPutTimeAndSize
public void recordPutTimeAndSize(long timeNS, long valueSize, long keySize) { """ Record the duration of a put operation, along with the size of the values returned. """ recordTime(Tracked.PUT, timeNS, 0, valueSize, keySize, 0); }
java
public void recordPutTimeAndSize(long timeNS, long valueSize, long keySize) { recordTime(Tracked.PUT, timeNS, 0, valueSize, keySize, 0); }
[ "public", "void", "recordPutTimeAndSize", "(", "long", "timeNS", ",", "long", "valueSize", ",", "long", "keySize", ")", "{", "recordTime", "(", "Tracked", ".", "PUT", ",", "timeNS", ",", "0", ",", "valueSize", ",", "keySize", ",", "0", ")", ";", "}" ]
Record the duration of a put operation, along with the size of the values returned.
[ "Record", "the", "duration", "of", "a", "put", "operation", "along", "with", "the", "size", "of", "the", "values", "returned", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/stats/StoreStats.java#L104-L106
ngageoint/geopackage-core-java
src/main/java/mil/nga/geopackage/extension/CrsWktExtension.java
CrsWktExtension.updateDefinition
public void updateDefinition(long srsId, String definition) { """ Update the extension definition @param srsId srs id @param definition definition """ connection.execSQL("UPDATE " + SpatialReferenceSystem.TABLE_NAME + " SET " + COLUMN_NAME + " = '" + definition + "' WHERE " + SpatialReferenceSy...
java
public void updateDefinition(long srsId, String definition) { connection.execSQL("UPDATE " + SpatialReferenceSystem.TABLE_NAME + " SET " + COLUMN_NAME + " = '" + definition + "' WHERE " + SpatialReferenceSystem.COLUMN_SRS_ID + " = " + srsId); }
[ "public", "void", "updateDefinition", "(", "long", "srsId", ",", "String", "definition", ")", "{", "connection", ".", "execSQL", "(", "\"UPDATE \"", "+", "SpatialReferenceSystem", ".", "TABLE_NAME", "+", "\" SET \"", "+", "COLUMN_NAME", "+", "\" = '\"", "+", "de...
Update the extension definition @param srsId srs id @param definition definition
[ "Update", "the", "extension", "definition" ]
train
https://github.com/ngageoint/geopackage-core-java/blob/6431c3b041a45b7f3802904ea4156b4082a72daa/src/main/java/mil/nga/geopackage/extension/CrsWktExtension.java#L110-L114
ggrandes/packer
src/main/java/org/javastack/packer/Packer.java
Packer.getStringMap
@SuppressWarnings( { """ Get Map<String, String> stored in UTF-8 format @param clazz to instantiate @return @see #putStringMap(Map) """ "unchecked", "rawtypes" }) public Map<String, String> getStringMap(final Class<? extends Map> clazz) { try { final Map<String, String> map = clazz.newInstance(...
java
@SuppressWarnings({ "unchecked", "rawtypes" }) public Map<String, String> getStringMap(final Class<? extends Map> clazz) { try { final Map<String, String> map = clazz.newInstance(); final int len = getVInt(); for (int i = 0; i < len; i++) { map.put(getString(), getString()); } return map; } ...
[ "@", "SuppressWarnings", "(", "{", "\"unchecked\"", ",", "\"rawtypes\"", "}", ")", "public", "Map", "<", "String", ",", "String", ">", "getStringMap", "(", "final", "Class", "<", "?", "extends", "Map", ">", "clazz", ")", "{", "try", "{", "final", "Map", ...
Get Map<String, String> stored in UTF-8 format @param clazz to instantiate @return @see #putStringMap(Map)
[ "Get", "Map<String", "String", ">", "stored", "in", "UTF", "-", "8", "format" ]
train
https://github.com/ggrandes/packer/blob/0b37b286a3d0555050eb2e65419dd74f8d8d3e78/src/main/java/org/javastack/packer/Packer.java#L1196-L1212
tvesalainen/util
util/src/main/java/org/vesalainen/nio/file/attribute/UserAttrs.java
UserAttrs.getIntAttribute
public static final int getIntAttribute(Path path, String attribute, LinkOption... options) throws IOException { """ Returns user-defined-attribute -1 if not found. @param path @param attribute @param options @return @throws IOException """ return getIntAttribute(path, attribute, -1, options); ...
java
public static final int getIntAttribute(Path path, String attribute, LinkOption... options) throws IOException { return getIntAttribute(path, attribute, -1, options); }
[ "public", "static", "final", "int", "getIntAttribute", "(", "Path", "path", ",", "String", "attribute", ",", "LinkOption", "...", "options", ")", "throws", "IOException", "{", "return", "getIntAttribute", "(", "path", ",", "attribute", ",", "-", "1", ",", "o...
Returns user-defined-attribute -1 if not found. @param path @param attribute @param options @return @throws IOException
[ "Returns", "user", "-", "defined", "-", "attribute", "-", "1", "if", "not", "found", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/file/attribute/UserAttrs.java#L160-L163
threerings/narya
core/src/main/java/com/threerings/crowd/client/LocationDirector.java
LocationDirector.didMoveTo
public void didMoveTo (int placeId, PlaceConfig config) { """ This can be called by cooperating directors that need to coopt the moving process to extend it in some way or other. In such situations, they will be responsible for receiving the successful move response and they should let the location director know...
java
public void didMoveTo (int placeId, PlaceConfig config) { if (_moveListener != null) { _moveListener.requestCompleted(config); _moveListener = null; } // keep track of our previous place id _previousPlaceId = _placeId; // clear out our last request t...
[ "public", "void", "didMoveTo", "(", "int", "placeId", ",", "PlaceConfig", "config", ")", "{", "if", "(", "_moveListener", "!=", "null", ")", "{", "_moveListener", ".", "requestCompleted", "(", "config", ")", ";", "_moveListener", "=", "null", ";", "}", "//...
This can be called by cooperating directors that need to coopt the moving process to extend it in some way or other. In such situations, they will be responsible for receiving the successful move response and they should let the location director know that the move has been effected. @param placeId the place oid of ou...
[ "This", "can", "be", "called", "by", "cooperating", "directors", "that", "need", "to", "coopt", "the", "moving", "process", "to", "extend", "it", "in", "some", "way", "or", "other", ".", "In", "such", "situations", "they", "will", "be", "responsible", "for...
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/client/LocationDirector.java#L282-L317
mkotsur/restito
src/main/java/com/xebialabs/restito/semantics/Condition.java
Condition.withPostBodyContainingJsonPath
public static Condition withPostBodyContainingJsonPath(final String pattern, final Object value) { """ With Valid Json Path. Check to see if incoming path has a valid string value selected via a <a href="https://github.com/jayway/JsonPath/"> JSONPath</a> expression. """ return new Condition(input -> ...
java
public static Condition withPostBodyContainingJsonPath(final String pattern, final Object value) { return new Condition(input -> value.equals(JsonPath.parse(input.getPostBody()).read(pattern))); }
[ "public", "static", "Condition", "withPostBodyContainingJsonPath", "(", "final", "String", "pattern", ",", "final", "Object", "value", ")", "{", "return", "new", "Condition", "(", "input", "->", "value", ".", "equals", "(", "JsonPath", ".", "parse", "(", "inpu...
With Valid Json Path. Check to see if incoming path has a valid string value selected via a <a href="https://github.com/jayway/JsonPath/"> JSONPath</a> expression.
[ "With", "Valid", "Json", "Path", ".", "Check", "to", "see", "if", "incoming", "path", "has", "a", "valid", "string", "value", "selected", "via", "a", "<a", "href", "=", "https", ":", "//", "github", ".", "com", "/", "jayway", "/", "JsonPath", "/", ">...
train
https://github.com/mkotsur/restito/blob/b999293616ca84fdea1ffe929e92a5db29c7e415/src/main/java/com/xebialabs/restito/semantics/Condition.java#L168-L170
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NotificationHubsInner.java
NotificationHubsInner.createOrUpdate
public NotificationHubResourceInner createOrUpdate(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParameters parameters) { """ Creates/Update a NotificationHub in a namespace. @param resourceGroupName The name of the resource group. @param namespaceName...
java
public NotificationHubResourceInner createOrUpdate(String resourceGroupName, String namespaceName, String notificationHubName, NotificationHubCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, notificationHubName, parameters).toBlocking().singl...
[ "public", "NotificationHubResourceInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ",", "String", "notificationHubName", ",", "NotificationHubCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceRespon...
Creates/Update a NotificationHub in a namespace. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @param notificationHubName The notification hub name. @param parameters Parameters supplied to the create/update a NotificationHub Resource. @throws IllegalArgumentExceptio...
[ "Creates", "/", "Update", "a", "NotificationHub", "in", "a", "namespace", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2017_04_01/implementation/NotificationHubsInner.java#L244-L246
javalite/activejdbc
activejdbc/src/main/java/org/javalite/activejdbc/Model.java
Model.findFirst
public static <T extends Model> T findFirst(String subQuery, Object... params) { """ Synonym of {@link #first(String, Object...)}. @param subQuery selection criteria, example: <pre> Person johnTheTeenager = Person.findFirst("name = ? and age &gt 13 and age &lt 19 order by age", "John") </pre> Sometimes a qu...
java
public static <T extends Model> T findFirst(String subQuery, Object... params) { return ModelDelegate.findFirst(Model.<T>modelClass(), subQuery, params); }
[ "public", "static", "<", "T", "extends", "Model", ">", "T", "findFirst", "(", "String", "subQuery", ",", "Object", "...", "params", ")", "{", "return", "ModelDelegate", ".", "findFirst", "(", "Model", ".", "<", "T", ">", "modelClass", "(", ")", ",", "s...
Synonym of {@link #first(String, Object...)}. @param subQuery selection criteria, example: <pre> Person johnTheTeenager = Person.findFirst("name = ? and age &gt 13 and age &lt 19 order by age", "John") </pre> Sometimes a query might be just a clause like this: <pre> Person oldest = Person.findFirst("order by age desc"...
[ "Synonym", "of", "{", "@link", "#first", "(", "String", "Object", "...", ")", "}", "." ]
train
https://github.com/javalite/activejdbc/blob/ffcf5457cace19622a8f71e856cbbbe9e7dd5fcc/activejdbc/src/main/java/org/javalite/activejdbc/Model.java#L2461-L2463
groovy/groovy-core
src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java
StaticTypeCheckingVisitor.getGenericsResolvedTypeOfFieldOrProperty
private ClassNode getGenericsResolvedTypeOfFieldOrProperty(AnnotatedNode an, ClassNode type) { """ resolves a Field or Property node generics by using the current class and the declaring class to extract the right meaning of the generics symbols @param an a FieldNode or PropertyNode @param type the origin type ...
java
private ClassNode getGenericsResolvedTypeOfFieldOrProperty(AnnotatedNode an, ClassNode type) { if (!type.isUsingGenerics()) return type; Map<String, GenericsType> connections = new HashMap(); //TODO: inner classes mean a different this-type. This is ignored here! extractGenericsConnectio...
[ "private", "ClassNode", "getGenericsResolvedTypeOfFieldOrProperty", "(", "AnnotatedNode", "an", ",", "ClassNode", "type", ")", "{", "if", "(", "!", "type", ".", "isUsingGenerics", "(", ")", ")", "return", "type", ";", "Map", "<", "String", ",", "GenericsType", ...
resolves a Field or Property node generics by using the current class and the declaring class to extract the right meaning of the generics symbols @param an a FieldNode or PropertyNode @param type the origin type @return the new ClassNode with corrected generics
[ "resolves", "a", "Field", "or", "Property", "node", "generics", "by", "using", "the", "current", "class", "and", "the", "declaring", "class", "to", "extract", "the", "right", "meaning", "of", "the", "generics", "symbols" ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/transform/stc/StaticTypeCheckingVisitor.java#L4000-L4007
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/handlers/RequestHandler.java
RequestHandler.executeFilter
protected Response executeFilter(List<Annotation> annotations, Response response) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { """ Executes all filters on controller and method level @param annotations An array of @FilterWith annotated classes and methods @param response @...
java
protected Response executeFilter(List<Annotation> annotations, Response response) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { for (final Annotation annotation : annotations) { final FilterWith filterWith = (FilterWith) annotation; for (final Class<?>...
[ "protected", "Response", "executeFilter", "(", "List", "<", "Annotation", ">", "annotations", ",", "Response", "response", ")", "throws", "NoSuchMethodException", ",", "IllegalAccessException", ",", "InvocationTargetException", "{", "for", "(", "final", "Annotation", ...
Executes all filters on controller and method level @param annotations An array of @FilterWith annotated classes and methods @param response @return True if the request should continue after filter execution, false otherwise @throws NoSuchMethodException @throws IllegalAccessException @throws InvocationTargetExceptio...
[ "Executes", "all", "filters", "on", "controller", "and", "method", "level" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/handlers/RequestHandler.java#L291-L305
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/internal/config/ConfigValidator.java
ConfigValidator.checkAndLogPropertyDeprecated
public static boolean checkAndLogPropertyDeprecated(HazelcastProperties properties, HazelcastProperty hazelcastProperty) { """ Checks if given group property is defined within given Hazelcast properties. Logs a warning when the property is defied. @return {@code true} when the property is defined """ ...
java
public static boolean checkAndLogPropertyDeprecated(HazelcastProperties properties, HazelcastProperty hazelcastProperty) { if (properties.containsKey(hazelcastProperty)) { LOGGER.warning( "Property " + hazelcastProperty.getName() + " is deprecated. Use configuration object/elemen...
[ "public", "static", "boolean", "checkAndLogPropertyDeprecated", "(", "HazelcastProperties", "properties", ",", "HazelcastProperty", "hazelcastProperty", ")", "{", "if", "(", "properties", ".", "containsKey", "(", "hazelcastProperty", ")", ")", "{", "LOGGER", ".", "war...
Checks if given group property is defined within given Hazelcast properties. Logs a warning when the property is defied. @return {@code true} when the property is defined
[ "Checks", "if", "given", "group", "property", "is", "defined", "within", "given", "Hazelcast", "properties", ".", "Logs", "a", "warning", "when", "the", "property", "is", "defied", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/internal/config/ConfigValidator.java#L511-L518
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java
OgmEntityPersister.determineBatchSize
private static int determineBatchSize(boolean canGridDialectDoMultiget, int classBatchSize, int configuredDefaultBatchSize) { """ Returns the effective batch size. If the dialect is multiget capable and a batch size has been configured, use that one, otherwise the default. """ // if the dialect does not sup...
java
private static int determineBatchSize(boolean canGridDialectDoMultiget, int classBatchSize, int configuredDefaultBatchSize) { // if the dialect does not support it, don't batch so that we can avoid skewing the ORM fetch statistics if ( !canGridDialectDoMultiget ) { return -1; } else if ( classBatchSize != -1...
[ "private", "static", "int", "determineBatchSize", "(", "boolean", "canGridDialectDoMultiget", ",", "int", "classBatchSize", ",", "int", "configuredDefaultBatchSize", ")", "{", "// if the dialect does not support it, don't batch so that we can avoid skewing the ORM fetch statistics", ...
Returns the effective batch size. If the dialect is multiget capable and a batch size has been configured, use that one, otherwise the default.
[ "Returns", "the", "effective", "batch", "size", ".", "If", "the", "dialect", "is", "multiget", "capable", "and", "a", "batch", "size", "has", "been", "configured", "use", "that", "one", "otherwise", "the", "default", "." ]
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/persister/impl/OgmEntityPersister.java#L354-L368
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/transport/BaseTransport.java
BaseTransport.setProperty
public void setProperty(String strProperty, String strValue) { """ Set this comand property. @param strParam The param name. @param strValue The param value. """ if (strValue == null) strValue = NULL; if (strValue != null) m_properties.setProperty(strProperty, strValue...
java
public void setProperty(String strProperty, String strValue) { if (strValue == null) strValue = NULL; if (strValue != null) m_properties.setProperty(strProperty, strValue); else m_properties.remove(strProperty); }
[ "public", "void", "setProperty", "(", "String", "strProperty", ",", "String", "strValue", ")", "{", "if", "(", "strValue", "==", "null", ")", "strValue", "=", "NULL", ";", "if", "(", "strValue", "!=", "null", ")", "m_properties", ".", "setProperty", "(", ...
Set this comand property. @param strParam The param name. @param strValue The param value.
[ "Set", "this", "comand", "property", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/transport/BaseTransport.java#L70-L78
steveash/jopenfst
src/main/java/com/github/steveash/jopenfst/operations/ArcSort.java
ArcSort.sortBy
public static void sortBy(MutableFst fst, Comparator<Arc> comparator) { """ Applies the ArcSort on the provided fst. Sorting can be applied either on input or output label based on the provided comparator. @param fst the fst to sort it's arcs @param comparator the provided Comparator """ int numStates...
java
public static void sortBy(MutableFst fst, Comparator<Arc> comparator) { int numStates = fst.getStateCount(); for (int i = 0; i < numStates; i++) { MutableState s = fst.getState(i); s.arcSort(comparator); } }
[ "public", "static", "void", "sortBy", "(", "MutableFst", "fst", ",", "Comparator", "<", "Arc", ">", "comparator", ")", "{", "int", "numStates", "=", "fst", ".", "getStateCount", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numStat...
Applies the ArcSort on the provided fst. Sorting can be applied either on input or output label based on the provided comparator. @param fst the fst to sort it's arcs @param comparator the provided Comparator
[ "Applies", "the", "ArcSort", "on", "the", "provided", "fst", ".", "Sorting", "can", "be", "applied", "either", "on", "input", "or", "output", "label", "based", "on", "the", "provided", "comparator", "." ]
train
https://github.com/steveash/jopenfst/blob/4c675203015c1cfad2072556cb532b6edc73261d/src/main/java/com/github/steveash/jopenfst/operations/ArcSort.java#L59-L65
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java
AttributeDefinition.addCapabilityRequirements
public void addCapabilityRequirements(OperationContext context, Resource resource, ModelNode attributeValue) { """ Based on the given attribute value, add capability requirements. If this definition is for an attribute whose value is or contains a reference to the name of some capability, this method should reco...
java
public void addCapabilityRequirements(OperationContext context, Resource resource, ModelNode attributeValue) { @SuppressWarnings("deprecation") CapabilityReferenceRecorder refRecorder = getReferenceRecorder(); if (refRecorder != null) { // We can't process expressions if ...
[ "public", "void", "addCapabilityRequirements", "(", "OperationContext", "context", ",", "Resource", "resource", ",", "ModelNode", "attributeValue", ")", "{", "@", "SuppressWarnings", "(", "\"deprecation\"", ")", "CapabilityReferenceRecorder", "refRecorder", "=", "getRefer...
Based on the given attribute value, add capability requirements. If this definition is for an attribute whose value is or contains a reference to the name of some capability, this method should record the addition of a requirement for the capability. <p> This is a no-op in this base class. Subclasses that support attri...
[ "Based", "on", "the", "given", "attribute", "value", "add", "capability", "requirements", ".", "If", "this", "definition", "is", "for", "an", "attribute", "whose", "value", "is", "or", "contains", "a", "reference", "to", "the", "name", "of", "some", "capabil...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/AttributeDefinition.java#L1059-L1069
marklogic/java-client-api
marklogic-client-api/src/main/java/com/marklogic/client/util/EditableNamespaceContext.java
EditableNamespaceContext.setNamespaceURI
public void setNamespaceURI(String prefix, String namespaceURI) { """ Specifies a binding between a prefix and a namespace URI. @param prefix the prefix for the binding @param namespaceURI the URI for the namespace """ if (prefix == null) throw new IllegalArgumentException("Cannot bind null prefix"...
java
public void setNamespaceURI(String prefix, String namespaceURI) { if (prefix == null) throw new IllegalArgumentException("Cannot bind null prefix"); if (namespaceURI == null) throw new IllegalArgumentException("Cannot set prefix to null namespace URI"); // no need to store if (XMLConstants....
[ "public", "void", "setNamespaceURI", "(", "String", "prefix", ",", "String", "namespaceURI", ")", "{", "if", "(", "prefix", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Cannot bind null prefix\"", ")", ";", "if", "(", "namespaceURI", "=...
Specifies a binding between a prefix and a namespace URI. @param prefix the prefix for the binding @param namespaceURI the URI for the namespace
[ "Specifies", "a", "binding", "between", "a", "prefix", "and", "a", "namespace", "URI", "." ]
train
https://github.com/marklogic/java-client-api/blob/acf60229a928abd4a8cc4b21b641d56957467da7/marklogic-client-api/src/main/java/com/marklogic/client/util/EditableNamespaceContext.java#L87-L98
borball/weixin-sdk
weixin-mp/src/main/java/com/riversoft/weixin/mp/template/Templates.java
Templates.send
public long send(String toUser, String templateId, String url, MiniProgram miniProgram, Map<String, Data> messages) { """ 发送模板消息 url和miniprogram都是非必填字段,若都不传则模板无跳转; 若都传,会优先跳转至小程序。 开发者可根据实际需要选择其中一种跳转方式即可。 当用户的微信客户端版本不支持跳小程序时,将会跳转至url @param toUser @param templateId @param url @param miniProgram @param m...
java
public long send(String toUser, String templateId, String url, MiniProgram miniProgram, Map<String, Data> messages) { String sendUrl = WxEndpoint.get("url.template.send"); MessageWrapper messageWrapper = new MessageWrapper(); messageWrapper.setToUser(toUser); messageWrapper.setTempla...
[ "public", "long", "send", "(", "String", "toUser", ",", "String", "templateId", ",", "String", "url", ",", "MiniProgram", "miniProgram", ",", "Map", "<", "String", ",", "Data", ">", "messages", ")", "{", "String", "sendUrl", "=", "WxEndpoint", ".", "get", ...
发送模板消息 url和miniprogram都是非必填字段,若都不传则模板无跳转; 若都传,会优先跳转至小程序。 开发者可根据实际需要选择其中一种跳转方式即可。 当用户的微信客户端版本不支持跳小程序时,将会跳转至url @param toUser @param templateId @param url @param miniProgram @param messages @return 消息ID
[ "发送模板消息" ]
train
https://github.com/borball/weixin-sdk/blob/32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7/weixin-mp/src/main/java/com/riversoft/weixin/mp/template/Templates.java#L150-L175
dbracewell/mango
src/main/java/com/davidbracewell/reflection/ReflectionUtils.java
ReflectionUtils.bestMatchingMethod
public static Method bestMatchingMethod(Collection<Method> methods, String methodName, Class[] types) { """ Finds the best Method match for a given method name and types against a collection of methods. @param methods The collections of methods to choose from @param methodName The name of the method we want...
java
public static Method bestMatchingMethod(Collection<Method> methods, String methodName, Class[] types) { if (methods == null || StringUtils.isNullOrBlank(methodName) || types == null) { return null; } for (Method method : methods) { if (method.getName().equals(methodName) && typesMatc...
[ "public", "static", "Method", "bestMatchingMethod", "(", "Collection", "<", "Method", ">", "methods", ",", "String", "methodName", ",", "Class", "[", "]", "types", ")", "{", "if", "(", "methods", "==", "null", "||", "StringUtils", ".", "isNullOrBlank", "(", ...
Finds the best Method match for a given method name and types against a collection of methods. @param methods The collections of methods to choose from @param methodName The name of the method we want to match @param types The types that we want to pass to the method. @return Null if there is no match, otherwi...
[ "Finds", "the", "best", "Method", "match", "for", "a", "given", "method", "name", "and", "types", "against", "a", "collection", "of", "methods", "." ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/reflection/ReflectionUtils.java#L58-L68
derari/cthul
xml/src/main/java/org/cthul/resolve/UriMappingResolver.java
UriMappingResolver.addResource
public UriMappingResolver addResource(String uri, String resource) { """ Adds a single resource that can be looked-up by its uri. @param uri @param resource @return this """ uriMap.put(uri, resource); return this; }
java
public UriMappingResolver addResource(String uri, String resource) { uriMap.put(uri, resource); return this; }
[ "public", "UriMappingResolver", "addResource", "(", "String", "uri", ",", "String", "resource", ")", "{", "uriMap", ".", "put", "(", "uri", ",", "resource", ")", ";", "return", "this", ";", "}" ]
Adds a single resource that can be looked-up by its uri. @param uri @param resource @return this
[ "Adds", "a", "single", "resource", "that", "can", "be", "looked", "-", "up", "by", "its", "uri", "." ]
train
https://github.com/derari/cthul/blob/74a31e3cb6a94f5f25cc5253d1dbd42e19a17ebc/xml/src/main/java/org/cthul/resolve/UriMappingResolver.java#L86-L89
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/data/MetadataCache.java
MetadataCache.findTrackIdAtOffset
private static int findTrackIdAtOffset(SlotReference slot, Client client, int offset) throws IOException { """ As part of checking whether a metadata cache can be auto-mounted for a particular media slot, this method looks up the track at the specified offset within the player's track list, and returns its rekord...
java
private static int findTrackIdAtOffset(SlotReference slot, Client client, int offset) throws IOException { Message entry = client.renderMenuItems(Message.MenuIdentifier.MAIN_MENU, slot.slot, CdjStatus.TrackType.REKORDBOX, offset, 1).get(0); if (entry.getMenuItemType() == Message.MenuItemType.UNKNOWN) { ...
[ "private", "static", "int", "findTrackIdAtOffset", "(", "SlotReference", "slot", ",", "Client", "client", ",", "int", "offset", ")", "throws", "IOException", "{", "Message", "entry", "=", "client", ".", "renderMenuItems", "(", "Message", ".", "MenuIdentifier", "...
As part of checking whether a metadata cache can be auto-mounted for a particular media slot, this method looks up the track at the specified offset within the player's track list, and returns its rekordbox ID. @param slot the slot being considered for auto-attaching a metadata cache @param client the connection to th...
[ "As", "part", "of", "checking", "whether", "a", "metadata", "cache", "can", "be", "auto", "-", "mounted", "for", "a", "particular", "media", "slot", "this", "method", "looks", "up", "the", "track", "at", "the", "specified", "offset", "within", "the", "play...
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/data/MetadataCache.java#L1036-L1042
baratine/baratine
kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java
SegmentServiceImpl.writeMetaContinuation
private void writeMetaContinuation() { """ Writes a continuation entry, which points to a new meta-data segment. """ TempBuffer tBuf = TempBuffer.create(); byte []buffer = tBuf.buffer(); int metaLength = _segmentMeta[0].size(); SegmentExtent extent = new SegmentExtent(0, _addressTail,...
java
private void writeMetaContinuation() { TempBuffer tBuf = TempBuffer.create(); byte []buffer = tBuf.buffer(); int metaLength = _segmentMeta[0].size(); SegmentExtent extent = new SegmentExtent(0, _addressTail, metaLength); _metaExtents.add(extent); _addressTail += metaLength;...
[ "private", "void", "writeMetaContinuation", "(", ")", "{", "TempBuffer", "tBuf", "=", "TempBuffer", ".", "create", "(", ")", ";", "byte", "[", "]", "buffer", "=", "tBuf", ".", "buffer", "(", ")", ";", "int", "metaLength", "=", "_segmentMeta", "[", "0", ...
Writes a continuation entry, which points to a new meta-data segment.
[ "Writes", "a", "continuation", "entry", "which", "points", "to", "a", "new", "meta", "-", "data", "segment", "." ]
train
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/kraken/src/main/java/com/caucho/v5/kelp/segment/SegmentServiceImpl.java#L547-L584
samskivert/samskivert
src/main/java/com/samskivert/jdbc/TransitionRepository.java
TransitionRepository.noteTransition
public boolean noteTransition (Class<?> clazz, final String name) throws PersistenceException { """ Note in the database that a particular transition has been applied. @return true if the transition was noted, false if it could not be noted because another process noted it first. """ final ...
java
public boolean noteTransition (Class<?> clazz, final String name) throws PersistenceException { final String cname = clazz.getName(); return executeUpdate(new Operation<Boolean>() { public Boolean invoke (Connection conn, DatabaseLiaison liaison) throws SQLExcepti...
[ "public", "boolean", "noteTransition", "(", "Class", "<", "?", ">", "clazz", ",", "final", "String", "name", ")", "throws", "PersistenceException", "{", "final", "String", "cname", "=", "clazz", ".", "getName", "(", ")", ";", "return", "executeUpdate", "(", ...
Note in the database that a particular transition has been applied. @return true if the transition was noted, false if it could not be noted because another process noted it first.
[ "Note", "in", "the", "database", "that", "a", "particular", "transition", "has", "been", "applied", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/jdbc/TransitionRepository.java#L120-L153
aws/aws-sdk-java
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/ListTagsForVaultResult.java
ListTagsForVaultResult.withTags
public ListTagsForVaultResult withTags(java.util.Map<String, String> tags) { """ <p> The tags attached to the vault. Each tag is composed of a key and a value. </p> @param tags The tags attached to the vault. Each tag is composed of a key and a value. @return Returns a reference to this object so that metho...
java
public ListTagsForVaultResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "ListTagsForVaultResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags attached to the vault. Each tag is composed of a key and a value. </p> @param tags The tags attached to the vault. Each tag is composed of a key and a value. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "tags", "attached", "to", "the", "vault", ".", "Each", "tag", "is", "composed", "of", "a", "key", "and", "a", "value", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/ListTagsForVaultResult.java#L68-L71
HsiangLeekwok/hlklib
hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/SlidingTabLayout.java
SlidingTabLayout.setTabText
public void setTabText(int index, String text) { """ Set the text on the specified tab's TextView. @param index the index of the tab whose TextView you want to update @param text the text to display on the specified tab's TextView """ TextView tv = (TextView) mTabTitleViews.get(index); if...
java
public void setTabText(int index, String text) { TextView tv = (TextView) mTabTitleViews.get(index); if (tv != null) { tv.setText(text); } }
[ "public", "void", "setTabText", "(", "int", "index", ",", "String", "text", ")", "{", "TextView", "tv", "=", "(", "TextView", ")", "mTabTitleViews", ".", "get", "(", "index", ")", ";", "if", "(", "tv", "!=", "null", ")", "{", "tv", ".", "setText", ...
Set the text on the specified tab's TextView. @param index the index of the tab whose TextView you want to update @param text the text to display on the specified tab's TextView
[ "Set", "the", "text", "on", "the", "specified", "tab", "s", "TextView", "." ]
train
https://github.com/HsiangLeekwok/hlklib/blob/b122f6dcab7cec60c8e5455e0c31613d08bec6ad/hlklib/src/main/java/com/hlk/hlklib/lib/datetimepicker/SlidingTabLayout.java#L247-L253
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PnPLepetitEPnP.java
PnPLepetitEPnP.process
public void process( List<Point3D_F64> worldPts , List<Point2D_F64> observed , Se3_F64 solutionModel ) { """ Compute camera motion given a set of features with observations and 3D locations @param worldPts Known location of features in 3D world coordinates @param observed Observed location of features in norma...
java
public void process( List<Point3D_F64> worldPts , List<Point2D_F64> observed , Se3_F64 solutionModel ) { if( worldPts.size() < 4 ) throw new IllegalArgumentException("Must provide at least 4 points"); if( worldPts.size() != observed.size() ) throw new IllegalArgumentException("Must have the same number of ob...
[ "public", "void", "process", "(", "List", "<", "Point3D_F64", ">", "worldPts", ",", "List", "<", "Point2D_F64", ">", "observed", ",", "Se3_F64", "solutionModel", ")", "{", "if", "(", "worldPts", ".", "size", "(", ")", "<", "4", ")", "throw", "new", "Il...
Compute camera motion given a set of features with observations and 3D locations @param worldPts Known location of features in 3D world coordinates @param observed Observed location of features in normalized camera coordinates @param solutionModel Output: Storage for the found solution.
[ "Compute", "camera", "motion", "given", "a", "set", "of", "features", "with", "observations", "and", "3D", "locations" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/pose/PnPLepetitEPnP.java#L210-L252
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java
JournalRecoveryLog.logHeaderInfo
public void logHeaderInfo(Map<String, String> parameters) { """ Concrete sub-classes should call this method from their constructor, or as soon as the log is ready for writing. """ StringBuffer buffer = new StringBuffer("Recovery parameters:"); for (Iterator<String> keys = parameters.keySet()....
java
public void logHeaderInfo(Map<String, String> parameters) { StringBuffer buffer = new StringBuffer("Recovery parameters:"); for (Iterator<String> keys = parameters.keySet().iterator(); keys .hasNext();) { Object key = keys.next(); Object value = parameters.get(key...
[ "public", "void", "logHeaderInfo", "(", "Map", "<", "String", ",", "String", ">", "parameters", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", "\"Recovery parameters:\"", ")", ";", "for", "(", "Iterator", "<", "String", ">", "keys", "="...
Concrete sub-classes should call this method from their constructor, or as soon as the log is ready for writing.
[ "Concrete", "sub", "-", "classes", "should", "call", "this", "method", "from", "their", "constructor", "or", "as", "soon", "as", "the", "log", "is", "ready", "for", "writing", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L129-L138
fnklabs/draenei
src/main/java/com/fnklabs/draenei/orm/DataProvider.java
DataProvider.removeAsync
public ListenableFuture<Boolean> removeAsync(@NotNull V entity) { """ Remove entity asynchronously @param entity Target entity @return Operation status result """ Timer removeAsyncTimer = METRICS.getTimer(MetricsType.DATA_PROVIDER_REMOVE.name()); Delete from = QueryBuilder.delete() ...
java
public ListenableFuture<Boolean> removeAsync(@NotNull V entity) { Timer removeAsyncTimer = METRICS.getTimer(MetricsType.DATA_PROVIDER_REMOVE.name()); Delete from = QueryBuilder.delete() .from(getEntityMetadata().getTableName()); int primaryKeysSize = getEntity...
[ "public", "ListenableFuture", "<", "Boolean", ">", "removeAsync", "(", "@", "NotNull", "V", "entity", ")", "{", "Timer", "removeAsyncTimer", "=", "METRICS", ".", "getTimer", "(", "MetricsType", ".", "DATA_PROVIDER_REMOVE", ".", "name", "(", ")", ")", ";", "D...
Remove entity asynchronously @param entity Target entity @return Operation status result
[ "Remove", "entity", "asynchronously" ]
train
https://github.com/fnklabs/draenei/blob/0a8cac54f1f635be3e2950375a23291d38453ae8/src/main/java/com/fnklabs/draenei/orm/DataProvider.java#L155-L210
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java
Contract.inBounds
public static void inBounds(final Integer input, final Integer min, final Integer max, final String inputName) { """ Checks that the input value is within the bounds of a maximum or minimum value @param input the input to check @param min the minimum value of the input (if null, input is not bound by minimum val...
java
public static void inBounds(final Integer input, final Integer min, final Integer max, final String inputName) { notNull(input, inputName); if ((min != null) && (input < min)) { throw new IndexOutOfBoundsException("a value of " + input.toString() + " was unexpected for " + maskNullArgument(...
[ "public", "static", "void", "inBounds", "(", "final", "Integer", "input", ",", "final", "Integer", "min", ",", "final", "Integer", "max", ",", "final", "String", "inputName", ")", "{", "notNull", "(", "input", ",", "inputName", ")", ";", "if", "(", "(", ...
Checks that the input value is within the bounds of a maximum or minimum value @param input the input to check @param min the minimum value of the input (if null, input is not bound by minimum value) @param max the maximum value of the input (if null, input is not bound by maximum value) @param inputName the name of th...
[ "Checks", "that", "the", "input", "value", "is", "within", "the", "bounds", "of", "a", "maximum", "or", "minimum", "value" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java#L145-L155
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/distort/mls/ImageDeformPointMLS_F32.java
ImageDeformPointMLS_F32.addControl
public int addControl( float x , float y ) { """ Adds a new control point at the specified location. Initially the distorted and undistorted location will be set to the same @param x coordinate x-axis in image pixels @param y coordinate y-axis in image pixels @return Index of control point """ Control...
java
public int addControl( float x , float y ) { Control c = controls.grow(); c.q.set(x,y); setUndistorted(controls.size()-1,x,y); return controls.size()-1; }
[ "public", "int", "addControl", "(", "float", "x", ",", "float", "y", ")", "{", "Control", "c", "=", "controls", ".", "grow", "(", ")", ";", "c", ".", "q", ".", "set", "(", "x", ",", "y", ")", ";", "setUndistorted", "(", "controls", ".", "size", ...
Adds a new control point at the specified location. Initially the distorted and undistorted location will be set to the same @param x coordinate x-axis in image pixels @param y coordinate y-axis in image pixels @return Index of control point
[ "Adds", "a", "new", "control", "point", "at", "the", "specified", "location", ".", "Initially", "the", "distorted", "and", "undistorted", "location", "will", "be", "set", "to", "the", "same" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/distort/mls/ImageDeformPointMLS_F32.java#L137-L142
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/JShell.java
JShell.messageFormat
String messageFormat(String key, Object... args) { """ Format using resource bundle look-up using MessageFormat @param key the resource key @param args """ if (outputRB == null) { try { outputRB = ResourceBundle.getBundle(L10N_RB_NAME); } catch (MissingResour...
java
String messageFormat(String key, Object... args) { if (outputRB == null) { try { outputRB = ResourceBundle.getBundle(L10N_RB_NAME); } catch (MissingResourceException mre) { throw new InternalError("Cannot find ResourceBundle: " + L10N_RB_NAME); ...
[ "String", "messageFormat", "(", "String", "key", ",", "Object", "...", "args", ")", "{", "if", "(", "outputRB", "==", "null", ")", "{", "try", "{", "outputRB", "=", "ResourceBundle", ".", "getBundle", "(", "L10N_RB_NAME", ")", ";", "}", "catch", "(", "...
Format using resource bundle look-up using MessageFormat @param key the resource key @param args
[ "Format", "using", "resource", "bundle", "look", "-", "up", "using", "MessageFormat" ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/JShell.java#L895-L910
litsec/swedish-eid-shibboleth-base
shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java
AbstractExternalAuthenticationController.initializeServices
protected void initializeServices(ProfileRequestContext<?, ?> profileRequestContext) throws ExternalAutenticationErrorCodeException { """ Initializes the services for the controller. Subclasses should override this method to initialize their own services. @param profileRequestContext the request context @thr...
java
protected void initializeServices(ProfileRequestContext<?, ?> profileRequestContext) throws ExternalAutenticationErrorCodeException { this.authnContextService.initializeContext(profileRequestContext); this.signSupportService.initializeContext(profileRequestContext); }
[ "protected", "void", "initializeServices", "(", "ProfileRequestContext", "<", "?", ",", "?", ">", "profileRequestContext", ")", "throws", "ExternalAutenticationErrorCodeException", "{", "this", ".", "authnContextService", ".", "initializeContext", "(", "profileRequestContex...
Initializes the services for the controller. Subclasses should override this method to initialize their own services. @param profileRequestContext the request context @throws ExternalAutenticationErrorCodeException for errors during initialization
[ "Initializes", "the", "services", "for", "the", "controller", ".", "Subclasses", "should", "override", "this", "method", "to", "initialize", "their", "own", "services", "." ]
train
https://github.com/litsec/swedish-eid-shibboleth-base/blob/aaaa467ff61f07d7dfa31627fb36851a37da6804/shibboleth-base/shibboleth-extensions/src/main/java/se/litsec/shibboleth/idp/authn/controller/AbstractExternalAuthenticationController.java#L212-L215
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/entity/PolicyLimit.java
PolicyLimit.getLimitByUserAndCounter
public static double getLimitByUserAndCounter(EntityManager em, PrincipalUser user, PolicyCounter counter) { """ Retrieves the limit for a given user-counter combination. @param em The EntityManager to use. @param user The user for which to retrieve the policy limit. @param counter The counte...
java
public static double getLimitByUserAndCounter(EntityManager em, PrincipalUser user, PolicyCounter counter) { PolicyLimit pLimit = findPolicyLimitByUserAndCounter(em, user, counter); if (pLimit != null) { return pLimit.getLimit(); } return counter.getDefaultValue(); }
[ "public", "static", "double", "getLimitByUserAndCounter", "(", "EntityManager", "em", ",", "PrincipalUser", "user", ",", "PolicyCounter", "counter", ")", "{", "PolicyLimit", "pLimit", "=", "findPolicyLimitByUserAndCounter", "(", "em", ",", "user", ",", "counter", ")...
Retrieves the limit for a given user-counter combination. @param em The EntityManager to use. @param user The user for which to retrieve the policy limit. @param counter The counter for which to retrieve the policy limit. @return The limit for the given user-counter combination. Default value of the...
[ "Retrieves", "the", "limit", "for", "a", "given", "user", "-", "counter", "combination", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/entity/PolicyLimit.java#L150-L157
Azure/azure-sdk-for-java
sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.java
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.createOrUpdate
public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List<DatabaseVulnerabilityAssessmentRuleBaselineItem> baselineResults) { """ Creates or updates a ...
java
public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List<DatabaseVulnerabilityAssessmentRuleBaselineItem> baselineResults) { return createOrUpdateW...
[ "public", "DatabaseVulnerabilityAssessmentRuleBaselineInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "managedInstanceName", ",", "String", "databaseName", ",", "String", "ruleId", ",", "VulnerabilityAssessmentPolicyBaselineName", "baselineName", ",",...
Creates or updates a database's vulnerability assessment rule baseline. @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 managedInstanceName The name of the managed instance. @param databaseName The n...
[ "Creates", "or", "updates", "a", "database", "s", "vulnerability", "assessment", "rule", "baseline", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.java#L197-L199
sahan/RoboZombie
robozombie/src/main/java/com/lonepulse/robozombie/executor/ConfigurationService.java
ConfigurationService.getDefault
@Override public Configuration getDefault() { """ <p>The <i>out-of-the-box</i> configuration for an instance of {@link HttpClient} which will be used for executing all endpoint requests. Below is a detailed description of all configured properties.</p> <br> <ul> <li> <p><b>HttpClient</b></p> <br> <p>It reg...
java
@Override public Configuration getDefault() { return new Configuration() { @Override public HttpClient httpClient() { try { HttpParams params = new BasicHttpParams(); HttpClientParams.setRedirecting(params, true); HttpConnectionParams.setConnectionTimeout(params, 30 * 1000); ...
[ "@", "Override", "public", "Configuration", "getDefault", "(", ")", "{", "return", "new", "Configuration", "(", ")", "{", "@", "Override", "public", "HttpClient", "httpClient", "(", ")", "{", "try", "{", "HttpParams", "params", "=", "new", "BasicHttpParams", ...
<p>The <i>out-of-the-box</i> configuration for an instance of {@link HttpClient} which will be used for executing all endpoint requests. Below is a detailed description of all configured properties.</p> <br> <ul> <li> <p><b>HttpClient</b></p> <br> <p>It registers two {@link Scheme}s:</p> <br> <ol> <li><b>HTTP</b> on po...
[ "<p", ">", "The", "<i", ">", "out", "-", "of", "-", "the", "-", "box<", "/", "i", ">", "configuration", "for", "an", "instance", "of", "{", "@link", "HttpClient", "}", "which", "will", "be", "used", "for", "executing", "all", "endpoint", "requests", ...
train
https://github.com/sahan/RoboZombie/blob/2e02f0d41647612e9d89360c5c48811ea86b33c8/robozombie/src/main/java/com/lonepulse/robozombie/executor/ConfigurationService.java#L84-L115