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
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java
QrCodeUtil.encode
public static BitMatrix encode(String content, BarcodeFormat format, int width, int height) { """ 将文本内容编码为条形码或二维码 @param content 文本内容 @param format 格式枚举 @param width 宽度 @param height 高度 @return {@link BitMatrix} """ return encode(content, format, new QrConfig(width, height)); }
java
public static BitMatrix encode(String content, BarcodeFormat format, int width, int height) { return encode(content, format, new QrConfig(width, height)); }
[ "public", "static", "BitMatrix", "encode", "(", "String", "content", ",", "BarcodeFormat", "format", ",", "int", "width", ",", "int", "height", ")", "{", "return", "encode", "(", "content", ",", "format", ",", "new", "QrConfig", "(", "width", ",", "height"...
将文本内容编码为条形码或二维码 @param content 文本内容 @param format 格式枚举 @param width 宽度 @param height 高度 @return {@link BitMatrix}
[ "将文本内容编码为条形码或二维码" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java#L234-L236
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapPolyline.java
MapPolyline.toPath2D
@SuppressWarnings( { """ Replies the Path2D that corresponds to this polyline. If <var>startPosition</var> is greater to zero, the replied path will be clipped to ignore the part of the polyline before the given value. If <var>endPosition</var> is lower to the length of the polyline, the replied path will be ...
java
@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"}) @Pure public final Path2d toPath2D(double startPosition, double endPosition) { final Path2d path = new Path2d(); toPath2D(path, startPosition, endPosition); return path; }
[ "@", "SuppressWarnings", "(", "{", "\"checkstyle:cyclomaticcomplexity\"", ",", "\"checkstyle:npathcomplexity\"", "}", ")", "@", "Pure", "public", "final", "Path2d", "toPath2D", "(", "double", "startPosition", ",", "double", "endPosition", ")", "{", "final", "Path2d", ...
Replies the Path2D that corresponds to this polyline. If <var>startPosition</var> is greater to zero, the replied path will be clipped to ignore the part of the polyline before the given value. If <var>endPosition</var> is lower to the length of the polyline, the replied path will be clipped to ignore the part of the p...
[ "Replies", "the", "Path2D", "that", "corresponds", "to", "this", "polyline", ".", "If", "<var", ">", "startPosition<", "/", "var", ">", "is", "greater", "to", "zero", "the", "replied", "path", "will", "be", "clipped", "to", "ignore", "the", "part", "of", ...
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapPolyline.java#L518-L524
Whiley/WhileyCompiler
src/main/java/wyil/type/util/ConcreteTypeExtractor.java
ConcreteTypeExtractor.apply
@Override public Type apply(SemanticType type, LifetimeRelation lifetimes) { """ Extract an instance of <code>Type</code> from <code>SemanticType</code> which is the best possible approximation. @param type The semantic type being converted into a concrete type. @return """ switch (type.getOpcode()) {...
java
@Override public Type apply(SemanticType type, LifetimeRelation lifetimes) { switch (type.getOpcode()) { case SEMTYPE_array: return apply((SemanticType.Array) type, lifetimes); case SEMTYPE_reference: case SEMTYPE_staticreference: return apply((SemanticType.Reference) type, lifetimes); case SEMTYPE_rec...
[ "@", "Override", "public", "Type", "apply", "(", "SemanticType", "type", ",", "LifetimeRelation", "lifetimes", ")", "{", "switch", "(", "type", ".", "getOpcode", "(", ")", ")", "{", "case", "SEMTYPE_array", ":", "return", "apply", "(", "(", "SemanticType", ...
Extract an instance of <code>Type</code> from <code>SemanticType</code> which is the best possible approximation. @param type The semantic type being converted into a concrete type. @return
[ "Extract", "an", "instance", "of", "<code", ">", "Type<", "/", "code", ">", "from", "<code", ">", "SemanticType<", "/", "code", ">", "which", "is", "the", "best", "possible", "approximation", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/type/util/ConcreteTypeExtractor.java#L83-L103
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java
ReplicationLinksInner.beginFailoverAllowDataLoss
public void beginFailoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, String linkId) { """ Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss. @param resourceGroupName The name of the resou...
java
public void beginFailoverAllowDataLoss(String resourceGroupName, String serverName, String databaseName, String linkId) { beginFailoverAllowDataLossWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).toBlocking().single().body(); }
[ "public", "void", "beginFailoverAllowDataLoss", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "linkId", ")", "{", "beginFailoverAllowDataLossWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverNam...
Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName ...
[ "Sets", "which", "replica", "database", "is", "primary", "by", "failing", "over", "from", "the", "current", "primary", "replica", "database", ".", "This", "operation", "might", "result", "in", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java#L562-L564
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLIrreflexiveObjectPropertyAxiomImpl_CustomFieldSerializer.java
OWLIrreflexiveObjectPropertyAxiomImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLIrreflexiveObjectPropertyAxiomImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@l...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLIrreflexiveObjectPropertyAxiomImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLIrreflexiveObjectPropertyAxiomImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";",...
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLIrreflexiveObjectPropertyAxiomImpl_CustomFieldSerializer.java#L95-L98
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformprofile_binding.java
transformprofile_binding.get
public static transformprofile_binding get(nitro_service service, String name) throws Exception { """ Use this API to fetch transformprofile_binding resource of given name . """ transformprofile_binding obj = new transformprofile_binding(); obj.set_name(name); transformprofile_binding response = (transfo...
java
public static transformprofile_binding get(nitro_service service, String name) throws Exception{ transformprofile_binding obj = new transformprofile_binding(); obj.set_name(name); transformprofile_binding response = (transformprofile_binding) obj.get_resource(service); return response; }
[ "public", "static", "transformprofile_binding", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "transformprofile_binding", "obj", "=", "new", "transformprofile_binding", "(", ")", ";", "obj", ".", "set_name", "(", "...
Use this API to fetch transformprofile_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "transformprofile_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/transform/transformprofile_binding.java#L103-L108
alkacon/opencms-core
src-modules/org/opencms/workplace/search/CmsSearchResourcesCollector.java
CmsSearchResourcesCollector.getSearchBean
private CmsSearch getSearchBean(Map<String, String> params) { """ Returns the search bean object.<p> @param params the parameter map @return the used search bean """ if (m_searchBean == null) { m_searchBean = new CmsSearch(); m_searchBean.init(getWp().getCms()); ...
java
private CmsSearch getSearchBean(Map<String, String> params) { if (m_searchBean == null) { m_searchBean = new CmsSearch(); m_searchBean.init(getWp().getCms()); m_searchBean.setParameters(getSearchParameters(params)); if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_sea...
[ "private", "CmsSearch", "getSearchBean", "(", "Map", "<", "String", ",", "String", ">", "params", ")", "{", "if", "(", "m_searchBean", "==", "null", ")", "{", "m_searchBean", "=", "new", "CmsSearch", "(", ")", ";", "m_searchBean", ".", "init", "(", "getW...
Returns the search bean object.<p> @param params the parameter map @return the used search bean
[ "Returns", "the", "search", "bean", "object", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/search/CmsSearchResourcesCollector.java#L264-L291
Erudika/para
para-server/src/main/java/com/erudika/para/security/filters/PasswordAuthFilter.java
PasswordAuthFilter.getOrCreateUser
public UserAuthentication getOrCreateUser(App app, String accessToken) { """ Authenticates or creates a {@link User} using an email and password. Access token must be in the format: "email:full_name:password" or "email::password_hash" @param app the app where the user will be created, use null for root app @par...
java
public UserAuthentication getOrCreateUser(App app, String accessToken) { UserAuthentication userAuth = null; User user = new User(); if (accessToken != null && accessToken.contains(Config.SEPARATOR)) { String[] parts = accessToken.split(Config.SEPARATOR, 3); String email = parts[0]; String name = parts[1...
[ "public", "UserAuthentication", "getOrCreateUser", "(", "App", "app", ",", "String", "accessToken", ")", "{", "UserAuthentication", "userAuth", "=", "null", ";", "User", "user", "=", "new", "User", "(", ")", ";", "if", "(", "accessToken", "!=", "null", "&&",...
Authenticates or creates a {@link User} using an email and password. Access token must be in the format: "email:full_name:password" or "email::password_hash" @param app the app where the user will be created, use null for root app @param accessToken token in the format "email:full_name:password" or "email::password_has...
[ "Authenticates", "or", "creates", "a", "{" ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/security/filters/PasswordAuthFilter.java#L100-L135
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/JsMainImpl.java
JsMainImpl.stopMessagingEngine
private void stopMessagingEngine(String busName, String name, int mode) throws Exception { """ Stop a messaging engine @param busName @param name @param mode """ String thisMethodName = CLASS_NAME + ".stopMessagingEngine(String, String, int)"; ...
java
private void stopMessagingEngine(String busName, String name, int mode) throws Exception { String thisMethodName = CLASS_NAME + ".stopMessagingEngine(String, String, int)"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { ...
[ "private", "void", "stopMessagingEngine", "(", "String", "busName", ",", "String", "name", ",", "int", "mode", ")", "throws", "Exception", "{", "String", "thisMethodName", "=", "CLASS_NAME", "+", "\".stopMessagingEngine(String, String, int)\"", ";", "if", "(", "Trac...
Stop a messaging engine @param busName @param name @param mode
[ "Stop", "a", "messaging", "engine" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/admin/internal/JsMainImpl.java#L909-L935
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/Category.java
Category.forcedLog
protected void forcedLog(String fqcn, Priority level, Object message, Throwable t) { """ This method creates a new logging event and logs the event without further checks. """ callAppenders(new LoggingEvent(fqcn, this, level, message, t)); }
java
protected void forcedLog(String fqcn, Priority level, Object message, Throwable t) { callAppenders(new LoggingEvent(fqcn, this, level, message, t)); }
[ "protected", "void", "forcedLog", "(", "String", "fqcn", ",", "Priority", "level", ",", "Object", "message", ",", "Throwable", "t", ")", "{", "callAppenders", "(", "new", "LoggingEvent", "(", "fqcn", ",", "this", ",", "level", ",", "message", ",", "t", "...
This method creates a new logging event and logs the event without further checks.
[ "This", "method", "creates", "a", "new", "logging", "event", "and", "logs", "the", "event", "without", "further", "checks", "." ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/Category.java#L332-L334
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/model/PropertyHelper.java
PropertyHelper.toBoolean
public static boolean toBoolean(String value, boolean defaultValue) { """ Determines whether the boolean value of the given string value. @param value The value @param defaultValue The boolean value to use if the string value is neither 'true' nor 'false' @return The boolean value of the string """...
java
public static boolean toBoolean(String value, boolean defaultValue) { return "true".equals(value) ? true : ("false".equals(value) ? false : defaultValue); }
[ "public", "static", "boolean", "toBoolean", "(", "String", "value", ",", "boolean", "defaultValue", ")", "{", "return", "\"true\"", ".", "equals", "(", "value", ")", "?", "true", ":", "(", "\"false\"", ".", "equals", "(", "value", ")", "?", "false", ":",...
Determines whether the boolean value of the given string value. @param value The value @param defaultValue The boolean value to use if the string value is neither 'true' nor 'false' @return The boolean value of the string
[ "Determines", "whether", "the", "boolean", "value", "of", "the", "given", "string", "value", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/model/PropertyHelper.java#L256-L259
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java
PoolsImpl.evaluateAutoScale
public AutoScaleRun evaluateAutoScale(String poolId, String autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions) { """ Gets the result of evaluating an automatic scaling formula on the pool. This API is primarily for validating an autoscale formula, as it simply returns the result without ...
java
public AutoScaleRun evaluateAutoScale(String poolId, String autoScaleFormula, PoolEvaluateAutoScaleOptions poolEvaluateAutoScaleOptions) { return evaluateAutoScaleWithServiceResponseAsync(poolId, autoScaleFormula, poolEvaluateAutoScaleOptions).toBlocking().single().body(); }
[ "public", "AutoScaleRun", "evaluateAutoScale", "(", "String", "poolId", ",", "String", "autoScaleFormula", ",", "PoolEvaluateAutoScaleOptions", "poolEvaluateAutoScaleOptions", ")", "{", "return", "evaluateAutoScaleWithServiceResponseAsync", "(", "poolId", ",", "autoScaleFormula...
Gets the result of evaluating an automatic scaling formula on the pool. This API is primarily for validating an autoscale formula, as it simply returns the result without applying the formula to the pool. The pool must have auto scaling enabled in order to evaluate a formula. @param poolId The ID of the pool on which ...
[ "Gets", "the", "result", "of", "evaluating", "an", "automatic", "scaling", "formula", "on", "the", "pool", ".", "This", "API", "is", "primarily", "for", "validating", "an", "autoscale", "formula", "as", "it", "simply", "returns", "the", "result", "without", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/PoolsImpl.java#L2605-L2607
Impetus/Kundera
src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBDataHandler.java
KuduDBDataHandler.getEqualComparisonPredicate
public static KuduPredicate getEqualComparisonPredicate(ColumnSchema column, Type type, Object key) { """ Gets the equal comparison predicate. @param column the column @param type the type @param key the key @return the equal comparison predicate """ return getPredicate(column, KuduPredicate.C...
java
public static KuduPredicate getEqualComparisonPredicate(ColumnSchema column, Type type, Object key) { return getPredicate(column, KuduPredicate.ComparisonOp.EQUAL, type, key); }
[ "public", "static", "KuduPredicate", "getEqualComparisonPredicate", "(", "ColumnSchema", "column", ",", "Type", "type", ",", "Object", "key", ")", "{", "return", "getPredicate", "(", "column", ",", "KuduPredicate", ".", "ComparisonOp", ".", "EQUAL", ",", "type", ...
Gets the equal comparison predicate. @param column the column @param type the type @param key the key @return the equal comparison predicate
[ "Gets", "the", "equal", "comparison", "predicate", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-kudu/src/main/java/com/impetus/client/kudu/KuduDBDataHandler.java#L168-L172
landawn/AbacusUtil
src/com/landawn/abacus/util/Primitives.java
Primitives.unbox
public static short[] unbox(final Short[] a, final short valueForNull) { """ <p> Converts an array of object Short to primitives handling {@code null}. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code Short} array, may be {@code null} @param valueForNull ...
java
public static short[] unbox(final Short[] a, final short valueForNull) { if (a == null) { return null; } return unbox(a, 0, a.length, valueForNull); }
[ "public", "static", "short", "[", "]", "unbox", "(", "final", "Short", "[", "]", "a", ",", "final", "short", "valueForNull", ")", "{", "if", "(", "a", "==", "null", ")", "{", "return", "null", ";", "}", "return", "unbox", "(", "a", ",", "0", ",",...
<p> Converts an array of object Short to primitives handling {@code null}. </p> <p> This method returns {@code null} for a {@code null} input array. </p> @param a a {@code Short} array, may be {@code null} @param valueForNull the value to insert if {@code null} found @return a {@code byte} array, {@code null} if null...
[ "<p", ">", "Converts", "an", "array", "of", "object", "Short", "to", "primitives", "handling", "{", "@code", "null", "}", ".", "<", "/", "p", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/Primitives.java#L960-L966
larsga/Duke
duke-core/src/main/java/no/priv/garshol/duke/utils/StringUtils.java
StringUtils.normalizeWS
public static String normalizeWS(String value) { """ Removes trailing and leading whitespace, and also reduces each sequence of internal whitespace to a single space. """ char[] tmp = new char[value.length()]; int pos = 0; boolean prevws = false; for (int ix = 0; ix < tmp.length; ix++) { ...
java
public static String normalizeWS(String value) { char[] tmp = new char[value.length()]; int pos = 0; boolean prevws = false; for (int ix = 0; ix < tmp.length; ix++) { char ch = value.charAt(ix); if (ch != ' ' && ch != '\t' && ch != '\n' && ch != '\r') { if (prevws && pos != 0) ...
[ "public", "static", "String", "normalizeWS", "(", "String", "value", ")", "{", "char", "[", "]", "tmp", "=", "new", "char", "[", "value", ".", "length", "(", ")", "]", ";", "int", "pos", "=", "0", ";", "boolean", "prevws", "=", "false", ";", "for",...
Removes trailing and leading whitespace, and also reduces each sequence of internal whitespace to a single space.
[ "Removes", "trailing", "and", "leading", "whitespace", "and", "also", "reduces", "each", "sequence", "of", "internal", "whitespace", "to", "a", "single", "space", "." ]
train
https://github.com/larsga/Duke/blob/6263f9c6e984c26362a76241c7c7ea3bb4469bac/duke-core/src/main/java/no/priv/garshol/duke/utils/StringUtils.java#L31-L47
ManfredTremmel/gwt-bean-validators
mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/BeanPropertyReaderUtil.java
BeanPropertyReaderUtil.getNullSaveStringProperty
public static String getNullSaveStringProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { """ <p> Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. ...
java
public static String getNullSaveStringProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { String property; try { property = BeanUtils.getProperty(pbean, pname); } catch (final NestedNullException pexception) { p...
[ "public", "static", "String", "getNullSaveStringProperty", "(", "final", "Object", "pbean", ",", "final", "String", "pname", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", ",", "NoSuchMethodException", "{", "String", "property", ";", "try", ...
<p> Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. </p> <p> If there is a null value in path hierarchy, exception is cached and null returned. </p> @param pbean Bean whose property is to be extracted @param pname Possibly indexed and/or...
[ "<p", ">", "Return", "the", "value", "of", "the", "specified", "property", "of", "the", "specified", "bean", "no", "matter", "which", "property", "reference", "format", "is", "used", "as", "a", "String", ".", "<", "/", "p", ">", "<p", ">", "If", "there...
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/mt-bean-validators/src/main/java/de/knightsoftnet/validators/shared/util/BeanPropertyReaderUtil.java#L59-L68
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/images/ImageHandlerBuilder.java
ImageHandlerBuilder.uniqueImagename
String uniqueImagename(String folder, String filename) { """ Calculates a unique filename located in the image upload folder. WARNING: not threadsafe! Another file with the calculated name might very well get written onto disk first after this name is found @param filename @return Outputs the relative path ...
java
String uniqueImagename(String folder, String filename) { String buildFileName = filename;//.replace(' ', '_'); while ( (new File(folder , buildFileName)).exists()) buildFileName = fn.increment(); return buildFileName;//output.getPath(); }
[ "String", "uniqueImagename", "(", "String", "folder", ",", "String", "filename", ")", "{", "String", "buildFileName", "=", "filename", ";", "//.replace(' ', '_');", "while", "(", "(", "new", "File", "(", "folder", ",", "buildFileName", ")", ")", ".", "exists",...
Calculates a unique filename located in the image upload folder. WARNING: not threadsafe! Another file with the calculated name might very well get written onto disk first after this name is found @param filename @return Outputs the relative path of the calculated filename.
[ "Calculates", "a", "unique", "filename", "located", "in", "the", "image", "upload", "folder", "." ]
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/images/ImageHandlerBuilder.java#L327-L334
jmeetsma/Iglu-Http
src/main/java/org/ijsberg/iglu/server/http/filter/WebAppEntryPoint.java
WebAppEntryPoint.onSessionUpdate
public void onSessionUpdate(Request currentRequest, Session session) { """ Notification of a session registration event. @param session """ HttpServletResponse response = (HttpServletResponse)httpResponse.get(); storeSessionDataInCookie(SESSION_TOKEN_KEY, session.getToken(), response); if(session.getU...
java
public void onSessionUpdate(Request currentRequest, Session session) { HttpServletResponse response = (HttpServletResponse)httpResponse.get(); storeSessionDataInCookie(SESSION_TOKEN_KEY, session.getToken(), response); if(session.getUser(/*realm.getId()*/) != null) { storeSessionDataInCookie(USER_ID_KEY, ses...
[ "public", "void", "onSessionUpdate", "(", "Request", "currentRequest", ",", "Session", "session", ")", "{", "HttpServletResponse", "response", "=", "(", "HttpServletResponse", ")", "httpResponse", ".", "get", "(", ")", ";", "storeSessionDataInCookie", "(", "SESSION_...
Notification of a session registration event. @param session
[ "Notification", "of", "a", "session", "registration", "event", "." ]
train
https://github.com/jmeetsma/Iglu-Http/blob/5b5ed3b417285dc79b7aa013bf2340bb5ba1ffbe/src/main/java/org/ijsberg/iglu/server/http/filter/WebAppEntryPoint.java#L116-L128
alkacon/opencms-core
src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java
CmsSolrSpellchecker.getInstance
public static CmsSolrSpellchecker getInstance(CoreContainer container) { """ Return an instance of this class. @param container Solr CoreContainer container object in order to create a server object. @return instance of CmsSolrSpellchecker """ if (null == instance) { synchronized (Cm...
java
public static CmsSolrSpellchecker getInstance(CoreContainer container) { if (null == instance) { synchronized (CmsSolrSpellchecker.class) { if (null == instance) { @SuppressWarnings("resource") SolrCore spellcheckCore = container.getCore(CmsSo...
[ "public", "static", "CmsSolrSpellchecker", "getInstance", "(", "CoreContainer", "container", ")", "{", "if", "(", "null", "==", "instance", ")", "{", "synchronized", "(", "CmsSolrSpellchecker", ".", "class", ")", "{", "if", "(", "null", "==", "instance", ")", ...
Return an instance of this class. @param container Solr CoreContainer container object in order to create a server object. @return instance of CmsSolrSpellchecker
[ "Return", "an", "instance", "of", "this", "class", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L155-L175
infinispan/infinispan
lucene/lucene-directory/src/main/java/org/infinispan/lucene/directory/DirectoryBuilder.java
DirectoryBuilder.newDirectoryInstance
public static BuildContext newDirectoryInstance(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) { """ Starting point to create a Directory instance. @param metadataCache contains the metadata of stored elements @param chunksCache cache containing the bulk o...
java
public static BuildContext newDirectoryInstance(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) { validateIndexCaches(indexName, metadataCache, chunksCache, distLocksCache); return new DirectoryBuilderImpl(metadataCache, chunksCache, distLocksCache, indexNam...
[ "public", "static", "BuildContext", "newDirectoryInstance", "(", "Cache", "<", "?", ",", "?", ">", "metadataCache", ",", "Cache", "<", "?", ",", "?", ">", "chunksCache", ",", "Cache", "<", "?", ",", "?", ">", "distLocksCache", ",", "String", "indexName", ...
Starting point to create a Directory instance. @param metadataCache contains the metadata of stored elements @param chunksCache cache containing the bulk of the index; this is the larger part of data @param distLocksCache cache to store locks; should be replicated and not using a persistent CacheStore @param index...
[ "Starting", "point", "to", "create", "a", "Directory", "instance", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/lucene/lucene-directory/src/main/java/org/infinispan/lucene/directory/DirectoryBuilder.java#L35-L38
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java
SegmentAggregator.aggregateAppendOperation
private void aggregateAppendOperation(CachedStreamSegmentAppendOperation operation, AggregatedAppendOperation aggregatedAppend) { """ Aggregates the given operation by recording the fact that it exists in the current Aggregated Append. An Aggregated Append cannot exceed a certain size, so if the given operation d...
java
private void aggregateAppendOperation(CachedStreamSegmentAppendOperation operation, AggregatedAppendOperation aggregatedAppend) { long remainingLength = operation.getLength(); if (operation.getStreamSegmentOffset() < aggregatedAppend.getLastStreamSegmentOffset()) { // The given operation beg...
[ "private", "void", "aggregateAppendOperation", "(", "CachedStreamSegmentAppendOperation", "operation", ",", "AggregatedAppendOperation", "aggregatedAppend", ")", "{", "long", "remainingLength", "=", "operation", ".", "getLength", "(", ")", ";", "if", "(", "operation", "...
Aggregates the given operation by recording the fact that it exists in the current Aggregated Append. An Aggregated Append cannot exceed a certain size, so if the given operation doesn't fit, it will need to span multiple AggregatedAppends. When aggregating, the SequenceNumber of the AggregatedAppend is the sequence nu...
[ "Aggregates", "the", "given", "operation", "by", "recording", "the", "fact", "that", "it", "exists", "in", "the", "current", "Aggregated", "Append", ".", "An", "Aggregated", "Append", "cannot", "exceed", "a", "certain", "size", "so", "if", "the", "given", "o...
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/writer/SegmentAggregator.java#L463-L488
Coveros/selenified
src/main/java/com/coveros/selenified/utilities/Reporter.java
Reporter.recordStep
private void recordStep(String action, String expectedResult, String actualResult, Boolean screenshot, Success success) { """ Records the performed step to the output file. This includes the action taken if any, the expected result, and the actual result. If a screenshot is desired, indicate as such. If a 'real'...
java
private void recordStep(String action, String expectedResult, String actualResult, Boolean screenshot, Success success) { stepNum++; String imageLink = ""; if (screenshot && isRealBrowser()) { // get a screen shot of the action imageLink = captureEntirePageScreenshot(); ...
[ "private", "void", "recordStep", "(", "String", "action", ",", "String", "expectedResult", ",", "String", "actualResult", ",", "Boolean", "screenshot", ",", "Success", "success", ")", "{", "stepNum", "++", ";", "String", "imageLink", "=", "\"\"", ";", "if", ...
Records the performed step to the output file. This includes the action taken if any, the expected result, and the actual result. If a screenshot is desired, indicate as such. If a 'real' browser is not being used (not NONE or HTMLUNIT), then no screenshot will be taken @param action - the step that was perfor...
[ "Records", "the", "performed", "step", "to", "the", "output", "file", ".", "This", "includes", "the", "action", "taken", "if", "any", "the", "expected", "result", "and", "the", "actual", "result", ".", "If", "a", "screenshot", "is", "desired", "indicate", ...
train
https://github.com/Coveros/selenified/blob/396cc1f010dd69eed33cc5061c41253de246a4cd/src/main/java/com/coveros/selenified/utilities/Reporter.java#L462-L489
noties/Handle
handle-library/src/main/java/ru/noties/handle/Handle.java
Handle.postAtTime
public static void postAtTime(Object what, long uptimeMillis) { """ The same as {@link #post(Object)} but with a time when this event should be delivered @see SystemClock#elapsedRealtime() @see #post(Object) @param what an Object to be queued @param uptimeMillis the time when this event should be delivered ...
java
public static void postAtTime(Object what, long uptimeMillis) { Handle.getInstance().mHandler.postAtTime(what, uptimeMillis); }
[ "public", "static", "void", "postAtTime", "(", "Object", "what", ",", "long", "uptimeMillis", ")", "{", "Handle", ".", "getInstance", "(", ")", ".", "mHandler", ".", "postAtTime", "(", "what", ",", "uptimeMillis", ")", ";", "}" ]
The same as {@link #post(Object)} but with a time when this event should be delivered @see SystemClock#elapsedRealtime() @see #post(Object) @param what an Object to be queued @param uptimeMillis the time when this event should be delivered
[ "The", "same", "as", "{" ]
train
https://github.com/noties/Handle/blob/257c5e71334ce442b5c55b50bae6d5ae3a667ab9/handle-library/src/main/java/ru/noties/handle/Handle.java#L135-L137
milaboratory/milib
src/main/java/com/milaboratory/core/alignment/Alignment.java
Alignment.convertToSeq1Range
public Range convertToSeq1Range(Range rangeInSeq2) { """ Converts range in sequence2 to range in sequence1, or returns null if input range is not fully covered by alignment @param rangeInSeq2 range in sequence 2 @return range in sequence1 or null if rangeInSeq2 is not fully covered by alignment """ ...
java
public Range convertToSeq1Range(Range rangeInSeq2) { int from = aabs(convertToSeq1Position(rangeInSeq2.getFrom())); int to = aabs(convertToSeq1Position(rangeInSeq2.getTo())); if (from == -1 || to == -1) return null; return new Range(from, to); }
[ "public", "Range", "convertToSeq1Range", "(", "Range", "rangeInSeq2", ")", "{", "int", "from", "=", "aabs", "(", "convertToSeq1Position", "(", "rangeInSeq2", ".", "getFrom", "(", ")", ")", ")", ";", "int", "to", "=", "aabs", "(", "convertToSeq1Position", "("...
Converts range in sequence2 to range in sequence1, or returns null if input range is not fully covered by alignment @param rangeInSeq2 range in sequence 2 @return range in sequence1 or null if rangeInSeq2 is not fully covered by alignment
[ "Converts", "range", "in", "sequence2", "to", "range", "in", "sequence1", "or", "returns", "null", "if", "input", "range", "is", "not", "fully", "covered", "by", "alignment" ]
train
https://github.com/milaboratory/milib/blob/2349b3dccdd3c7948643760e570238d6e30d5a34/src/main/java/com/milaboratory/core/alignment/Alignment.java#L231-L239
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/util/cache/BucketImpl.java
BucketImpl.removeByKey
public Element removeByKey(Object key, boolean dropRef) { """ Remove the object associated with the specified key from the bucket. Returns the Element holding the removed object. Optionally drops a reference on the object before removing it @param key key of the object element to be removed. @param dropRef t...
java
public Element removeByKey(Object key, boolean dropRef) { int i = findIndexByKey(key); Element element = null; // Check if the object is in the cache if (i != -1) { element = (Element) get(i); // Objects must either be unpinned, or pinned only once ...
[ "public", "Element", "removeByKey", "(", "Object", "key", ",", "boolean", "dropRef", ")", "{", "int", "i", "=", "findIndexByKey", "(", "key", ")", ";", "Element", "element", "=", "null", ";", "// Check if the object is in the cache", "if", "(", "i", "!=", "-...
Remove the object associated with the specified key from the bucket. Returns the Element holding the removed object. Optionally drops a reference on the object before removing it @param key key of the object element to be removed. @param dropRef true indicates a reference should be dropped @return the Element holding ...
[ "Remove", "the", "object", "associated", "with", "the", "specified", "key", "from", "the", "bucket", ".", "Returns", "the", "Element", "holding", "the", "removed", "object", ".", "Optionally", "drops", "a", "reference", "on", "the", "object", "before", "removi...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/util/cache/BucketImpl.java#L157-L178
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.beginStart
public void beginStart(String resourceGroupName, String applicationGatewayName) { """ Starts the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalArgumentException thrown if parameters fail...
java
public void beginStart(String resourceGroupName, String applicationGatewayName) { beginStartWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().body(); }
[ "public", "void", "beginStart", "(", "String", "resourceGroupName", ",", "String", "applicationGatewayName", ")", "{", "beginStartWithServiceResponseAsync", "(", "resourceGroupName", ",", "applicationGatewayName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ...
Starts the specified application gateway. @param resourceGroupName The name of the resource group. @param applicationGatewayName The name of the application gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws Runt...
[ "Starts", "the", "specified", "application", "gateway", "." ]
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#L1170-L1172
xcesco/kripton
kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteEvent.java
SQLiteEvent.createInsertWithUid
public static SQLiteEvent createInsertWithUid(String result) { """ Creates the insert. @param result the result @return the SQ lite event """ return new SQLiteEvent(SqlModificationType.INSERT, null, null, result); }
java
public static SQLiteEvent createInsertWithUid(String result) { return new SQLiteEvent(SqlModificationType.INSERT, null, null, result); }
[ "public", "static", "SQLiteEvent", "createInsertWithUid", "(", "String", "result", ")", "{", "return", "new", "SQLiteEvent", "(", "SqlModificationType", ".", "INSERT", ",", "null", ",", "null", ",", "result", ")", ";", "}" ]
Creates the insert. @param result the result @return the SQ lite event
[ "Creates", "the", "insert", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-orm/src/main/java/com/abubusoft/kripton/android/sqlite/SQLiteEvent.java#L68-L70
actframework/actframework
src/main/java/act/data/ApacheMultipartParser.java
ApacheMultipartParser.getHeader
private final String getHeader(Map /* String, String */ headers, String name) { """ Returns the header with the specified name from the supplied map. The header lookup is case-insensitive. @param headers A <code>Map</code> containing the HTTP request headers. @param name The name of the header to return. ...
java
private final String getHeader(Map /* String, String */ headers, String name) { return (String) headers.get(name.toLowerCase()); }
[ "private", "final", "String", "getHeader", "(", "Map", "/* String, String */", "headers", ",", "String", "name", ")", "{", "return", "(", "String", ")", "headers", ".", "get", "(", "name", ".", "toLowerCase", "(", ")", ")", ";", "}" ]
Returns the header with the specified name from the supplied map. The header lookup is case-insensitive. @param headers A <code>Map</code> containing the HTTP request headers. @param name The name of the header to return. @return The value of specified header, or a comma-separated list if there were multiple header...
[ "Returns", "the", "header", "with", "the", "specified", "name", "from", "the", "supplied", "map", ".", "The", "header", "lookup", "is", "case", "-", "insensitive", "." ]
train
https://github.com/actframework/actframework/blob/55a8f8b45e71159a79ec6e157c02f71700f8cd54/src/main/java/act/data/ApacheMultipartParser.java#L322-L324
calrissian/mango
mango-core/src/main/java/org/calrissian/mango/batch/BatcherBuilder.java
BatcherBuilder.timeBound
public BatcherBuilder timeBound(long time, TimeUnit timeUnit) { """ Add a max time component for a batcher. If specified a batcher will call the {@link BatchListener} as soon as the time bound has been exceeded. NOTE: This interval is the time since successfully sending the last batch to the batchlistener. T...
java
public BatcherBuilder timeBound(long time, TimeUnit timeUnit) { checkState(this.interval == UNSET_INT, "Max time already set"); checkArgument(time > 0, "Required to have a time interval greater than 0"); requireNonNull(timeUnit); this.interval = timeUnit.toNanos(time); return thi...
[ "public", "BatcherBuilder", "timeBound", "(", "long", "time", ",", "TimeUnit", "timeUnit", ")", "{", "checkState", "(", "this", ".", "interval", "==", "UNSET_INT", ",", "\"Max time already set\"", ")", ";", "checkArgument", "(", "time", ">", "0", ",", "\"Requi...
Add a max time component for a batcher. If specified a batcher will call the {@link BatchListener} as soon as the time bound has been exceeded. NOTE: This interval is the time since successfully sending the last batch to the batchlistener. This means that if a blocking {@link BatcherBuilder#listenerService(ExecutorS...
[ "Add", "a", "max", "time", "component", "for", "a", "batcher", ".", "If", "specified", "a", "batcher", "will", "call", "the", "{", "@link", "BatchListener", "}", "as", "soon", "as", "the", "time", "bound", "has", "been", "exceeded", "." ]
train
https://github.com/calrissian/mango/blob/a95aa5e77af9aa0e629787228d80806560023452/mango-core/src/main/java/org/calrissian/mango/batch/BatcherBuilder.java#L72-L78
cloudfoundry/uaa
server/src/main/java/org/cloudfoundry/identity/uaa/authentication/BackwardsCompatibleTokenEndpointAuthenticationFilter.java
BackwardsCompatibleTokenEndpointAuthenticationFilter.extractCredentials
protected Authentication extractCredentials(HttpServletRequest request) { """ If the incoming request contains user credentials in headers or parameters then extract them here into an Authentication token that can be validated later. This implementation only recognises password grant requests and extracts the us...
java
protected Authentication extractCredentials(HttpServletRequest request) { String username = request.getParameter("username"); String password = request.getParameter("password"); UsernamePasswordAuthenticationToken credentials = new UsernamePasswordAuthenticationToken(username, password); ...
[ "protected", "Authentication", "extractCredentials", "(", "HttpServletRequest", "request", ")", "{", "String", "username", "=", "request", ".", "getParameter", "(", "\"username\"", ")", ";", "String", "password", "=", "request", ".", "getParameter", "(", "\"password...
If the incoming request contains user credentials in headers or parameters then extract them here into an Authentication token that can be validated later. This implementation only recognises password grant requests and extracts the username and password. @param request the incoming request, possibly with user credent...
[ "If", "the", "incoming", "request", "contains", "user", "credentials", "in", "headers", "or", "parameters", "then", "extract", "them", "here", "into", "an", "Authentication", "token", "that", "can", "be", "validated", "later", ".", "This", "implementation", "onl...
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/authentication/BackwardsCompatibleTokenEndpointAuthenticationFilter.java#L187-L193
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.getCount
public Long getCount(String type, Map<String, ?> terms) { """ Counts indexed objects matching a set of terms/values. @param type the type of object to search for. See {@link com.erudika.para.core.ParaObject#getType()} @param terms a list of terms (property values) @return the number of results found """ i...
java
public Long getCount(String type, Map<String, ?> terms) { if (terms == null) { return 0L; } MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); LinkedList<String> list = new LinkedList<>(); for (Map.Entry<String, ? extends Object> term : terms.entrySet()) { String key = term.getKey(); ...
[ "public", "Long", "getCount", "(", "String", "type", ",", "Map", "<", "String", ",", "?", ">", "terms", ")", "{", "if", "(", "terms", "==", "null", ")", "{", "return", "0L", ";", "}", "MultivaluedMap", "<", "String", ",", "String", ">", "params", "...
Counts indexed objects matching a set of terms/values. @param type the type of object to search for. See {@link com.erudika.para.core.ParaObject#getType()} @param terms a list of terms (property values) @return the number of results found
[ "Counts", "indexed", "objects", "matching", "a", "set", "of", "terms", "/", "values", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L888-L909
WiQuery/wiquery
wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/dialog/util/DialogUtilsBehavior.java
DialogUtilsBehavior.simpleDialog
public JsStatement simpleDialog(String title, String message) { """ Method creating a simple dialog @param title Title @param message Message @return the required {@link JsStatement} """ JsStatement statement = new JsStatement(); statement.append("$.ui.dialog.wiquery.simpleDialog("); statement.app...
java
public JsStatement simpleDialog(String title, String message) { JsStatement statement = new JsStatement(); statement.append("$.ui.dialog.wiquery.simpleDialog("); statement.append("" + Session.get().nextSequenceValue() + ", "); statement.append(DialogUtilsLanguages.getDialogUtilsLiteral(DialogUtilsLanguages ...
[ "public", "JsStatement", "simpleDialog", "(", "String", "title", ",", "String", "message", ")", "{", "JsStatement", "statement", "=", "new", "JsStatement", "(", ")", ";", "statement", ".", "append", "(", "\"$.ui.dialog.wiquery.simpleDialog(\"", ")", ";", "statemen...
Method creating a simple dialog @param title Title @param message Message @return the required {@link JsStatement}
[ "Method", "creating", "a", "simple", "dialog" ]
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/dialog/util/DialogUtilsBehavior.java#L372-L383
MorphiaOrg/morphia
morphia/src/main/java/dev/morphia/mapping/MappedField.java
MappedField.setFieldValue
public void setFieldValue(final Object instance, final Object value) { """ Sets the value for the java field @param instance the instance to update @param value the value to set """ try { field.set(instance, value); } catch (IllegalAccessException e) { throw new R...
java
public void setFieldValue(final Object instance, final Object value) { try { field.set(instance, value); } catch (IllegalAccessException e) { throw new RuntimeException(e); } }
[ "public", "void", "setFieldValue", "(", "final", "Object", "instance", ",", "final", "Object", "value", ")", "{", "try", "{", "field", ".", "set", "(", "instance", ",", "value", ")", ";", "}", "catch", "(", "IllegalAccessException", "e", ")", "{", "throw...
Sets the value for the java field @param instance the instance to update @param value the value to set
[ "Sets", "the", "value", "for", "the", "java", "field" ]
train
https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/mapping/MappedField.java#L450-L456
Stratio/bdt
src/main/java/com/stratio/qa/specs/SeleniumSpec.java
SeleniumSpec.seleniumIdFrame
@Given("^I switch to iframe with '([^:]*?):(.+?)'$") public void seleniumIdFrame(String method, String idframe) throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException { """ Swith to the iFrame where id matches idframe @param idframe iframe to swith to @throws IllegalAccessException exc...
java
@Given("^I switch to iframe with '([^:]*?):(.+?)'$") public void seleniumIdFrame(String method, String idframe) throws IllegalAccessException, NoSuchFieldException, ClassNotFoundException { assertThat(commonspec.locateElement(method, idframe, 1)); if (method.equals("id") || method.equals("name")) {...
[ "@", "Given", "(", "\"^I switch to iframe with '([^:]*?):(.+?)'$\"", ")", "public", "void", "seleniumIdFrame", "(", "String", "method", ",", "String", "idframe", ")", "throws", "IllegalAccessException", ",", "NoSuchFieldException", ",", "ClassNotFoundException", "{", "ass...
Swith to the iFrame where id matches idframe @param idframe iframe to swith to @throws IllegalAccessException exception @throws NoSuchFieldException exception @throws ClassNotFoundException exception
[ "Swith", "to", "the", "iFrame", "where", "id", "matches", "idframe" ]
train
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/SeleniumSpec.java#L132-L141
classgraph/classgraph
src/main/java/io/github/classgraph/ClasspathElement.java
ClasspathElement.maskClassfiles
void maskClassfiles(final int classpathIdx, final Set<String> classpathRelativePathsFound, final LogNode log) { """ Apply relative path masking within this classpath resource -- remove relative paths that were found in an earlier classpath element. @param classpathIdx the classpath index @param classpathRela...
java
void maskClassfiles(final int classpathIdx, final Set<String> classpathRelativePathsFound, final LogNode log) { if (!scanSpec.performScan) { // Should not happen throw new IllegalArgumentException("performScan is false"); } // Find relative paths that occur more than once...
[ "void", "maskClassfiles", "(", "final", "int", "classpathIdx", ",", "final", "Set", "<", "String", ">", "classpathRelativePathsFound", ",", "final", "LogNode", "log", ")", "{", "if", "(", "!", "scanSpec", ".", "performScan", ")", "{", "// Should not happen", "...
Apply relative path masking within this classpath resource -- remove relative paths that were found in an earlier classpath element. @param classpathIdx the classpath index @param classpathRelativePathsFound the classpath relative paths found @param log the log
[ "Apply", "relative", "path", "masking", "within", "this", "classpath", "resource", "--", "remove", "relative", "paths", "that", "were", "found", "in", "an", "earlier", "classpath", "element", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClasspathElement.java#L186-L225
spotify/sparkey-java
src/main/java/com/spotify/sparkey/Sparkey.java
Sparkey.createNew
public static SparkeyWriter createNew(File file, CompressionType compressionType, int compressionBlockSize) throws IOException { """ Creates a new sparkey writer with the specified compression This is not a thread-safe class, only use it from one thread. @param file File base to use, the actual file endings ...
java
public static SparkeyWriter createNew(File file, CompressionType compressionType, int compressionBlockSize) throws IOException { return SingleThreadedSparkeyWriter.createNew(file, compressionType, compressionBlockSize); }
[ "public", "static", "SparkeyWriter", "createNew", "(", "File", "file", ",", "CompressionType", "compressionType", ",", "int", "compressionBlockSize", ")", "throws", "IOException", "{", "return", "SingleThreadedSparkeyWriter", ".", "createNew", "(", "file", ",", "compr...
Creates a new sparkey writer with the specified compression This is not a thread-safe class, only use it from one thread. @param file File base to use, the actual file endings will be set to .spi and .spl @param compressionType @param compressionBlockSize The maximum compression block size in bytes @return a new writ...
[ "Creates", "a", "new", "sparkey", "writer", "with", "the", "specified", "compression" ]
train
https://github.com/spotify/sparkey-java/blob/77ed13b17b4b28f38d6e335610269fb135c3a1be/src/main/java/com/spotify/sparkey/Sparkey.java#L55-L57
openbaton/openbaton-client
sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java
NetworkServiceRecordAgent.upgradeVnfr
@Help(help = "Upgrades a VNFR to a defined VNFD in a running NSR with specific id") public void upgradeVnfr(final String idNsr, final String idVnfr, final String idVnfd) throws SDKException { """ Upgrades a VNFR of a defined VNFD in a running NSR. @param idNsr the ID of the NetworkServiceRecord @param ...
java
@Help(help = "Upgrades a VNFR to a defined VNFD in a running NSR with specific id") public void upgradeVnfr(final String idNsr, final String idVnfr, final String idVnfd) throws SDKException { HashMap<String, Serializable> jsonBody = new HashMap<>(); jsonBody.put("vnfdId", idVnfd); String url = idNsr...
[ "@", "Help", "(", "help", "=", "\"Upgrades a VNFR to a defined VNFD in a running NSR with specific id\"", ")", "public", "void", "upgradeVnfr", "(", "final", "String", "idNsr", ",", "final", "String", "idVnfr", ",", "final", "String", "idVnfd", ")", "throws", "SDKExce...
Upgrades a VNFR of a defined VNFD in a running NSR. @param idNsr the ID of the NetworkServiceRecord @param idVnfr the ID of the VNFR to be upgraded @param idVnfd the VNFD ID to which the VNFR shall be upgraded @throws SDKException if the request fails
[ "Upgrades", "a", "VNFR", "of", "a", "defined", "VNFD", "in", "a", "running", "NSR", "." ]
train
https://github.com/openbaton/openbaton-client/blob/6ca6dd6b62a23940d312213d6fa489d5b636061a/sdk/src/main/java/org/openbaton/sdk/api/rest/NetworkServiceRecordAgent.java#L691-L698
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listAppServicePlansWithServiceResponseAsync
public Observable<ServiceResponse<Page<AppServicePlanInner>>> listAppServicePlansWithServiceResponseAsync(final String resourceGroupName, final String name) { """ Get all App Service plans in an App Service Environment. Get all App Service plans in an App Service Environment. @param resourceGroupName Name of t...
java
public Observable<ServiceResponse<Page<AppServicePlanInner>>> listAppServicePlansWithServiceResponseAsync(final String resourceGroupName, final String name) { return listAppServicePlansSinglePageAsync(resourceGroupName, name) .concatMap(new Func1<ServiceResponse<Page<AppServicePlanInner>>, Observabl...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "AppServicePlanInner", ">", ">", ">", "listAppServicePlansWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listAppServicePlansSi...
Get all App Service plans in an App Service Environment. Get all App Service plans in an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Get", "all", "App", "Service", "plans", "in", "an", "App", "Service", "Environment", ".", "Get", "all", "App", "Service", "plans", "in", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L4127-L4139
super-csv/super-csv
super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtInterval.java
FmtInterval.execute
public Object execute(final Object value, final CsvContext context) { """ {@inheritDoc} @throws SuperCsvCellProcessorException if value is null or not a Interval """ validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, val...
java
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if (!(value instanceof Interval)) { throw new SuperCsvCellProcessorException(Interval.class, value, context, this); } final Interval interval = (Interval) value; final String result = interval.t...
[ "public", "Object", "execute", "(", "final", "Object", "value", ",", "final", "CsvContext", "context", ")", "{", "validateInputNotNull", "(", "value", ",", "context", ")", ";", "if", "(", "!", "(", "value", "instanceof", "Interval", ")", ")", "{", "throw",...
{@inheritDoc} @throws SuperCsvCellProcessorException if value is null or not a Interval
[ "{", "@inheritDoc", "}" ]
train
https://github.com/super-csv/super-csv/blob/f18db724674dc1c4116e25142c1b5403ebf43e96/super-csv-joda/src/main/java/org/supercsv/cellprocessor/joda/FmtInterval.java#L58-L67
looly/hutool
hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java
MailUtil.sendText
public static void sendText(Collection<String> tos, String subject, String content, File... files) { """ 使用配置文件中设置的账户发送文本邮件,发送给多人 @param tos 收件人列表 @param subject 标题 @param content 正文 @param files 附件列表 """ send(tos, subject, content, false, files); }
java
public static void sendText(Collection<String> tos, String subject, String content, File... files) { send(tos, subject, content, false, files); }
[ "public", "static", "void", "sendText", "(", "Collection", "<", "String", ">", "tos", ",", "String", "subject", ",", "String", "content", ",", "File", "...", "files", ")", "{", "send", "(", "tos", ",", "subject", ",", "content", ",", "false", ",", "fil...
使用配置文件中设置的账户发送文本邮件,发送给多人 @param tos 收件人列表 @param subject 标题 @param content 正文 @param files 附件列表
[ "使用配置文件中设置的账户发送文本邮件,发送给多人" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/mail/MailUtil.java#L85-L87
geomajas/geomajas-project-client-gwt
plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/MultiFeatureListGrid.java
MultiFeatureListGrid.addFeatures
public void addFeatures(Map<VectorLayer, List<Feature>> featureMap, Criterion criterion) { """ Add features in the widget for several layers. @param featureMap map of features per layer @param criterion the original request for this search """ if (showDetailsOnSingleResult && featureMap.size() == 1) { ...
java
public void addFeatures(Map<VectorLayer, List<Feature>> featureMap, Criterion criterion) { if (showDetailsOnSingleResult && featureMap.size() == 1) { // sorting is never needed if only 1 entry List<Feature> features = featureMap.values().iterator().next(); if (features.size() == 1) { showFeatureDetailWin...
[ "public", "void", "addFeatures", "(", "Map", "<", "VectorLayer", ",", "List", "<", "Feature", ">", ">", "featureMap", ",", "Criterion", "criterion", ")", "{", "if", "(", "showDetailsOnSingleResult", "&&", "featureMap", ".", "size", "(", ")", "==", "1", ")"...
Add features in the widget for several layers. @param featureMap map of features per layer @param criterion the original request for this search
[ "Add", "features", "in", "the", "widget", "for", "several", "layers", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/plugin/widget-searchandfilter/searchandfilter-gwt/src/main/java/org/geomajas/widget/searchandfilter/client/widget/multifeaturelistgrid/MultiFeatureListGrid.java#L168-L184
Appendium/objectlabkit
fxcalc/src/main/java/net/objectlab/kit/fxcalc/MajorCurrencyRankingImpl.java
MajorCurrencyRankingImpl.isMarketConvention
@Override public boolean isMarketConvention(final String ccy1, final String ccy2) { """ returns true if the ccy1 is the major one for the given currency pair. """ return selectMajorCurrency(ccy1, ccy2).equals(ccy1); }
java
@Override public boolean isMarketConvention(final String ccy1, final String ccy2) { return selectMajorCurrency(ccy1, ccy2).equals(ccy1); }
[ "@", "Override", "public", "boolean", "isMarketConvention", "(", "final", "String", "ccy1", ",", "final", "String", "ccy2", ")", "{", "return", "selectMajorCurrency", "(", "ccy1", ",", "ccy2", ")", ".", "equals", "(", "ccy1", ")", ";", "}" ]
returns true if the ccy1 is the major one for the given currency pair.
[ "returns", "true", "if", "the", "ccy1", "is", "the", "major", "one", "for", "the", "given", "currency", "pair", "." ]
train
https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/fxcalc/src/main/java/net/objectlab/kit/fxcalc/MajorCurrencyRankingImpl.java#L55-L58
OpenLiberty/open-liberty
dev/com.ibm.ws.injection/src/com/ibm/ws/injectionengine/osgi/internal/IndirectJndiLookupObjectFactory.java
IndirectJndiLookupObjectFactory.getJNDIServiceObjectInstance
@FFDCIgnore(PrivilegedActionException.class) private Object getJNDIServiceObjectInstance(final String className, final String bindingName, final Hashtable<?, ?> envmt) throws Exception { """ Try to get an object instance by looking in the OSGi service registry similar to how /com.ibm.ws.jndi/ implements the d...
java
@FFDCIgnore(PrivilegedActionException.class) private Object getJNDIServiceObjectInstance(final String className, final String bindingName, final Hashtable<?, ?> envmt) throws Exception { try { return AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() { @Overrid...
[ "@", "FFDCIgnore", "(", "PrivilegedActionException", ".", "class", ")", "private", "Object", "getJNDIServiceObjectInstance", "(", "final", "String", "className", ",", "final", "String", "bindingName", ",", "final", "Hashtable", "<", "?", ",", "?", ">", "envmt", ...
Try to get an object instance by looking in the OSGi service registry similar to how /com.ibm.ws.jndi/ implements the default namespace. @return the object instance, or null if an object could not be found
[ "Try", "to", "get", "an", "object", "instance", "by", "looking", "in", "the", "OSGi", "service", "registry", "similar", "to", "how", "/", "com", ".", "ibm", ".", "ws", ".", "jndi", "/", "implements", "the", "default", "namespace", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.injection/src/com/ibm/ws/injectionengine/osgi/internal/IndirectJndiLookupObjectFactory.java#L213-L229
zerodhatech/javakiteconnect
kiteconnect/src/com/zerodhatech/kiteconnect/KiteConnect.java
KiteConnect.convertPosition
public JSONObject convertPosition(String tradingSymbol, String exchange, String transactionType, String positionType, String oldProduct, String newProduct, int quantity) throws KiteException, JSONException, IOException { """ Modifies an open position's product type. Only an MIS, CNC, and NRML positions can be conv...
java
public JSONObject convertPosition(String tradingSymbol, String exchange, String transactionType, String positionType, String oldProduct, String newProduct, int quantity) throws KiteException, JSONException, IOException { Map<String, Object> params = new HashMap<>(); params.put("tradingsymbol", tradingSy...
[ "public", "JSONObject", "convertPosition", "(", "String", "tradingSymbol", ",", "String", "exchange", ",", "String", "transactionType", ",", "String", "positionType", ",", "String", "oldProduct", ",", "String", "newProduct", ",", "int", "quantity", ")", "throws", ...
Modifies an open position's product type. Only an MIS, CNC, and NRML positions can be converted. @param tradingSymbol Tradingsymbol of the instrument (ex. RELIANCE, INFY). @param exchange Exchange in which instrument is listed (NSE, BSE, NFO, BFO, CDS, MCX). @param transactionType Transaction type (BUY or SELL). @para...
[ "Modifies", "an", "open", "position", "s", "product", "type", ".", "Only", "an", "MIS", "CNC", "and", "NRML", "positions", "can", "be", "converted", "." ]
train
https://github.com/zerodhatech/javakiteconnect/blob/4a3f15ff2c8a1b3b6ec61799f8bb047e4dfeb92d/kiteconnect/src/com/zerodhatech/kiteconnect/KiteConnect.java#L458-L470
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/CorporationApi.java
CorporationApi.getCorporationsCorporationIdStructuresWithHttpInfo
public ApiResponse<List<CorporationStructuresResponse>> getCorporationsCorporationIdStructuresWithHttpInfo( Integer corporationId, String acceptLanguage, String datasource, String ifNoneMatch, String language, Integer page, String token) throws ApiException { """ Get corporation structures ...
java
public ApiResponse<List<CorporationStructuresResponse>> getCorporationsCorporationIdStructuresWithHttpInfo( Integer corporationId, String acceptLanguage, String datasource, String ifNoneMatch, String language, Integer page, String token) throws ApiException { com.squareup.okhttp.Call cal...
[ "public", "ApiResponse", "<", "List", "<", "CorporationStructuresResponse", ">", ">", "getCorporationsCorporationIdStructuresWithHttpInfo", "(", "Integer", "corporationId", ",", "String", "acceptLanguage", ",", "String", "datasource", ",", "String", "ifNoneMatch", ",", "S...
Get corporation structures Get a list of corporation structures. This route&#39;s version includes the changes to structures detailed in this blog: https://www.eveonline.com/article/upwell-2.0-structures-changes-coming -on-february-13th --- This route is cached for up to 3600 seconds --- Requires one of the following E...
[ "Get", "corporation", "structures", "Get", "a", "list", "of", "corporation", "structures", ".", "This", "route&#39", ";", "s", "version", "includes", "the", "changes", "to", "structures", "detailed", "in", "this", "blog", ":", "https", ":", "//", "www", ".",...
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/CorporationApi.java#L3556-L3564
haifengl/smile
core/src/main/java/smile/neighbor/MPLSH.java
MPLSH.learn
public void learn(RNNSearch<double[], double[]> range, double[][] samples, double radius, int Nz, double sigma) { """ Train the posteriori multiple probe algorithm. @param range the neighborhood search data structure. @param radius the radius for range search. @param Nz the number of quantized values. @param s...
java
public void learn(RNNSearch<double[], double[]> range, double[][] samples, double radius, int Nz, double sigma) { TrainSample[] training = new TrainSample[samples.length]; for (int i = 0; i < samples.length; i++) { training[i] = new TrainSample(); training[i].query = samples[i]; ...
[ "public", "void", "learn", "(", "RNNSearch", "<", "double", "[", "]", ",", "double", "[", "]", ">", "range", ",", "double", "[", "]", "[", "]", "samples", ",", "double", "radius", ",", "int", "Nz", ",", "double", "sigma", ")", "{", "TrainSample", "...
Train the posteriori multiple probe algorithm. @param range the neighborhood search data structure. @param radius the radius for range search. @param Nz the number of quantized values. @param sigma the Parzen window width.
[ "Train", "the", "posteriori", "multiple", "probe", "algorithm", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/neighbor/MPLSH.java#L869-L886
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java
ManagedClustersInner.getAccessProfile
public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName) { """ Gets an access profile of a managed cluster. Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. @param resourceGroupNam...
java
public ManagedClusterAccessProfileInner getAccessProfile(String resourceGroupName, String resourceName, String roleName) { return getAccessProfileWithServiceResponseAsync(resourceGroupName, resourceName, roleName).toBlocking().single().body(); }
[ "public", "ManagedClusterAccessProfileInner", "getAccessProfile", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "roleName", ")", "{", "return", "getAccessProfileWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ",", ...
Gets an access profile of a managed cluster. Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @param roleName The name of the role fo...
[ "Gets", "an", "access", "profile", "of", "a", "managed", "cluster", ".", "Gets", "the", "accessProfile", "for", "the", "specified", "role", "name", "of", "the", "managed", "cluster", "with", "a", "specified", "resource", "group", "and", "name", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L479-L481
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/KappaDistribution.java
KappaDistribution.logcdf
public static double logcdf(double val, double loc, double scale, double shape1, double shape2) { """ Cumulative density function. @param val Value @param loc Location @param scale Scale @param shape1 Shape parameter @param shape2 Shape parameter @return CDF """ return logcdf((val - loc) / scale, s...
java
public static double logcdf(double val, double loc, double scale, double shape1, double shape2) { return logcdf((val - loc) / scale, shape1, shape2); }
[ "public", "static", "double", "logcdf", "(", "double", "val", ",", "double", "loc", ",", "double", "scale", ",", "double", "shape1", ",", "double", "shape2", ")", "{", "return", "logcdf", "(", "(", "val", "-", "loc", ")", "/", "scale", ",", "shape1", ...
Cumulative density function. @param val Value @param loc Location @param scale Scale @param shape1 Shape parameter @param shape2 Shape parameter @return CDF
[ "Cumulative", "density", "function", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/KappaDistribution.java#L234-L236
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/cp/internal/raft/impl/RaftNodeImpl.java
RaftNodeImpl.registerFuture
public void registerFuture(long entryIndex, SimpleCompletableFuture future) { """ Registers the future for the appended entry with its {@code entryIndex}. """ SimpleCompletableFuture f = futures.put(entryIndex, future); assert f == null : "Future object is already registered for entry index: " ...
java
public void registerFuture(long entryIndex, SimpleCompletableFuture future) { SimpleCompletableFuture f = futures.put(entryIndex, future); assert f == null : "Future object is already registered for entry index: " + entryIndex; }
[ "public", "void", "registerFuture", "(", "long", "entryIndex", ",", "SimpleCompletableFuture", "future", ")", "{", "SimpleCompletableFuture", "f", "=", "futures", ".", "put", "(", "entryIndex", ",", "future", ")", ";", "assert", "f", "==", "null", ":", "\"Futu...
Registers the future for the appended entry with its {@code entryIndex}.
[ "Registers", "the", "future", "for", "the", "appended", "entry", "with", "its", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/cp/internal/raft/impl/RaftNodeImpl.java#L666-L669
shamanland/xdroid
lib-core/src/main/java/xdroid/core/ThreadUtils.java
ThreadUtils.stopThread
public static void stopThread(Handler handler, boolean asap) { """ Post the {@link Runnable} instance with the following code to the {@link Handler} provided: <pre> public void run() { Looper.myLooper().quit(); } </pre> @param handler target handler, can not be null @param asap if true then method {@li...
java
public static void stopThread(Handler handler, boolean asap) { Runnable stopper = sStopper; if (stopper == null) { stopper = new ThreadUtils(); sStopper = stopper; } if (asap) { handler.postAtFrontOfQueue(stopper); } else { handler...
[ "public", "static", "void", "stopThread", "(", "Handler", "handler", ",", "boolean", "asap", ")", "{", "Runnable", "stopper", "=", "sStopper", ";", "if", "(", "stopper", "==", "null", ")", "{", "stopper", "=", "new", "ThreadUtils", "(", ")", ";", "sStopp...
Post the {@link Runnable} instance with the following code to the {@link Handler} provided: <pre> public void run() { Looper.myLooper().quit(); } </pre> @param handler target handler, can not be null @param asap if true then method {@link Handler#postAtFrontOfQueue(Runnable)} will be used.
[ "Post", "the", "{", "@link", "Runnable", "}", "instance", "with", "the", "following", "code", "to", "the", "{", "@link", "Handler", "}", "provided", ":", "<pre", ">", "public", "void", "run", "()", "{", "Looper", ".", "myLooper", "()", ".", "quit", "()...
train
https://github.com/shamanland/xdroid/blob/5330811114afaf6a7b8f9a10f3bbe19d37995d89/lib-core/src/main/java/xdroid/core/ThreadUtils.java#L89-L101
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/async/publisher/Publishers.java
Publishers.convertPublisher
public static <T> T convertPublisher(Object object, Class<T> publisherType) { """ Attempts to convert the publisher to the given type. @param object The object to convert @param publisherType The publisher type @param <T> The generic type @return The Resulting in publisher """ Objects.requireNonN...
java
public static <T> T convertPublisher(Object object, Class<T> publisherType) { Objects.requireNonNull(object, "Invalid argument [object]: " + object); Objects.requireNonNull(object, "Invalid argument [publisherType]: " + publisherType); if (object instanceof CompletableFuture) { @Supp...
[ "public", "static", "<", "T", ">", "T", "convertPublisher", "(", "Object", "object", ",", "Class", "<", "T", ">", "publisherType", ")", "{", "Objects", ".", "requireNonNull", "(", "object", ",", "\"Invalid argument [object]: \"", "+", "object", ")", ";", "Ob...
Attempts to convert the publisher to the given type. @param object The object to convert @param publisherType The publisher type @param <T> The generic type @return The Resulting in publisher
[ "Attempts", "to", "convert", "the", "publisher", "to", "the", "given", "type", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/async/publisher/Publishers.java#L287-L298
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/checkouts/DestinationUrl.java
DestinationUrl.removeDestinationUrl
public static MozuUrl removeDestinationUrl(String checkoutId, String destinationId) { """ Get Resource Url for RemoveDestination @param checkoutId The unique identifier of the checkout. @param destinationId The unique identifier of the destination. @return String Resource Url """ UrlFormatter formatter...
java
public static MozuUrl removeDestinationUrl(String checkoutId, String destinationId) { UrlFormatter formatter = new UrlFormatter("/api/commerce/checkouts/{checkoutId}/destinations/{destinationId}"); formatter.formatUrl("checkoutId", checkoutId); formatter.formatUrl("destinationId", destinationId); return n...
[ "public", "static", "MozuUrl", "removeDestinationUrl", "(", "String", "checkoutId", ",", "String", "destinationId", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/checkouts/{checkoutId}/destinations/{destinationId}\"", ")", ";", "fo...
Get Resource Url for RemoveDestination @param checkoutId The unique identifier of the checkout. @param destinationId The unique identifier of the destination. @return String Resource Url
[ "Get", "Resource", "Url", "for", "RemoveDestination" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/checkouts/DestinationUrl.java#L80-L86
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/util/ClassHelper.java
ClassHelper.newInstance
public static Object newInstance(Class target, Class[] types, Object[] args) throws InstantiationException, IllegalAccessException, IllegalArg...
java
public static Object newInstance(Class target, Class[] types, Object[] args) throws InstantiationException, IllegalAccessException, IllegalArg...
[ "public", "static", "Object", "newInstance", "(", "Class", "target", ",", "Class", "[", "]", "types", ",", "Object", "[", "]", "args", ")", "throws", "InstantiationException", ",", "IllegalAccessException", ",", "IllegalArgumentException", ",", "InvocationTargetExce...
Returns a new instance of the given class, using the constructor with the specified parameter types. @param target The class to instantiate @param types The parameter types @param args The arguments @return The instance
[ "Returns", "a", "new", "instance", "of", "the", "given", "class", "using", "the", "constructor", "with", "the", "specified", "parameter", "types", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/util/ClassHelper.java#L180-L188
Azure/azure-sdk-for-java
sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ServerVulnerabilityAssessmentsInner.java
ServerVulnerabilityAssessmentsInner.getAsync
public Observable<ServerVulnerabilityAssessmentInner> getAsync(String resourceGroupName, String serverName) { """ Gets the server's vulnerability assessment. @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 p...
java
public Observable<ServerVulnerabilityAssessmentInner> getAsync(String resourceGroupName, String serverName) { return getWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerVulnerabilityAssessmentInner>, ServerVulnerabilityAssessmentInner>() { @Override ...
[ "public", "Observable", "<", "ServerVulnerabilityAssessmentInner", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".", "map", "(", "...
Gets the server's vulnerability assessment. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server for which the vulnerability assessment is defined. @throws IllegalArgumen...
[ "Gets", "the", "server", "s", "vulnerability", "assessment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/sql/v2018_06_01_preview/implementation/ServerVulnerabilityAssessmentsInner.java#L122-L129
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/SSLConfigManager.java
SSLConfigManager.checkURLHostNameVerificationProperty
public synchronized void checkURLHostNameVerificationProperty(boolean reinitialize) { """ * This method installs a hostname verification checker that defaults to not check the hostname. If it does not install this hostname verification checker, then any URL connections must have a certificate that matches the ...
java
public synchronized void checkURLHostNameVerificationProperty(boolean reinitialize) { // enable/disable hostname verification String urlHostNameVerification = getGlobalProperty(Constants.SSLPROP_URL_HOSTNAME_VERIFICATION); if (urlHostNameVerification == null || urlHostNameVerification.equalsIgn...
[ "public", "synchronized", "void", "checkURLHostNameVerificationProperty", "(", "boolean", "reinitialize", ")", "{", "// enable/disable hostname verification", "String", "urlHostNameVerification", "=", "getGlobalProperty", "(", "Constants", ".", "SSLPROP_URL_HOSTNAME_VERIFICATION", ...
* This method installs a hostname verification checker that defaults to not check the hostname. If it does not install this hostname verification checker, then any URL connections must have a certificate that matches the host that sent it. @param reinitialize *
[ "*", "This", "method", "installs", "a", "hostname", "verification", "checker", "that", "defaults", "to", "not", "check", "the", "hostname", ".", "If", "it", "does", "not", "install", "this", "hostname", "verification", "checker", "then", "any", "URL", "connect...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/config/SSLConfigManager.java#L1412-L1434
perwendel/spark
src/main/java/spark/Routable.java
Routable.afterAfter
public void afterAfter(String path, Filter filter) { """ Maps a filter to be executed after any matching routes even if the route throws any exception @param filter The filter """ addFilter(HttpMethod.afterafter, FilterImpl.create(path, filter)); }
java
public void afterAfter(String path, Filter filter) { addFilter(HttpMethod.afterafter, FilterImpl.create(path, filter)); }
[ "public", "void", "afterAfter", "(", "String", "path", ",", "Filter", "filter", ")", "{", "addFilter", "(", "HttpMethod", ".", "afterafter", ",", "FilterImpl", ".", "create", "(", "path", ",", "filter", ")", ")", ";", "}" ]
Maps a filter to be executed after any matching routes even if the route throws any exception @param filter The filter
[ "Maps", "a", "filter", "to", "be", "executed", "after", "any", "matching", "routes", "even", "if", "the", "route", "throws", "any", "exception" ]
train
https://github.com/perwendel/spark/blob/080fb1f9d6e580f6742e9589044c7420d3157b8b/src/main/java/spark/Routable.java#L322-L324
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/MessageMap.java
MessageMap.setChoices
private void setChoices(BigInteger multiChoice, JSchema schema, JSVariant var) { """ Set the choices implied by the multiChoice code or contribution to a single JSVariant """ for (int i = 0; i < var.getCaseCount(); i++) { BigInteger count = ((JSType)var.getCase(i)).getMultiChoiceCount(); if (mu...
java
private void setChoices(BigInteger multiChoice, JSchema schema, JSVariant var) { for (int i = 0; i < var.getCaseCount(); i++) { BigInteger count = ((JSType)var.getCase(i)).getMultiChoiceCount(); if (multiChoice.compareTo(count) >= 0) multiChoice = multiChoice.subtract(count); else { ...
[ "private", "void", "setChoices", "(", "BigInteger", "multiChoice", ",", "JSchema", "schema", ",", "JSVariant", "var", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "var", ".", "getCaseCount", "(", ")", ";", "i", "++", ")", "{", "BigInteg...
Set the choices implied by the multiChoice code or contribution to a single JSVariant
[ "Set", "the", "choices", "implied", "by", "the", "multiChoice", "code", "or", "contribution", "to", "a", "single", "JSVariant" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/MessageMap.java#L123-L139
infinispan/infinispan
core/src/main/java/org/infinispan/distribution/ch/impl/DefaultConsistentHash.java
DefaultConsistentHash.union
public DefaultConsistentHash union(DefaultConsistentHash dch2) { """ Merges two consistent hash objects that have the same number of segments, numOwners and hash function. For each segment, the primary owner of the first CH has priority, the other primary owners become backups. """ checkSameHashAndSegme...
java
public DefaultConsistentHash union(DefaultConsistentHash dch2) { checkSameHashAndSegments(dch2); if (numOwners != dch2.getNumOwners()) { throw new IllegalArgumentException("The consistent hash objects must have the same number of owners"); } List<Address> unionMembers = new ArrayList<>...
[ "public", "DefaultConsistentHash", "union", "(", "DefaultConsistentHash", "dch2", ")", "{", "checkSameHashAndSegments", "(", "dch2", ")", ";", "if", "(", "numOwners", "!=", "dch2", ".", "getNumOwners", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException"...
Merges two consistent hash objects that have the same number of segments, numOwners and hash function. For each segment, the primary owner of the first CH has priority, the other primary owners become backups.
[ "Merges", "two", "consistent", "hash", "objects", "that", "have", "the", "same", "number", "of", "segments", "numOwners", "and", "hash", "function", ".", "For", "each", "segment", "the", "primary", "owner", "of", "the", "first", "CH", "has", "priority", "the...
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/distribution/ch/impl/DefaultConsistentHash.java#L241-L258
pushtorefresh/storio
storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/operations/put/PutResult.java
PutResult.newInsertResult
@NonNull public static PutResult newInsertResult( long insertedId, @NonNull Set<String> affectedTables, @Nullable String... affectedTags ) { """ Creates {@link PutResult} of insert. @param insertedId id of new row. @param affectedTables tables that were affected....
java
@NonNull public static PutResult newInsertResult( long insertedId, @NonNull Set<String> affectedTables, @Nullable String... affectedTags ) { return newInsertResult(insertedId, affectedTables, nonNullSet(affectedTags)); }
[ "@", "NonNull", "public", "static", "PutResult", "newInsertResult", "(", "long", "insertedId", ",", "@", "NonNull", "Set", "<", "String", ">", "affectedTables", ",", "@", "Nullable", "String", "...", "affectedTags", ")", "{", "return", "newInsertResult", "(", ...
Creates {@link PutResult} of insert. @param insertedId id of new row. @param affectedTables tables that were affected. @param affectedTags notification tags that were affected. @return new {@link PutResult} instance.
[ "Creates", "{", "@link", "PutResult", "}", "of", "insert", "." ]
train
https://github.com/pushtorefresh/storio/blob/58f53d81bcc7b069c8bb271c46a90e37775abe8d/storio-sqlite/src/main/java/com/pushtorefresh/storio3/sqlite/operations/put/PutResult.java#L89-L96
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/distances/Distance.java
Distance.manhattanWeighted
public static double manhattanWeighted(AssociativeArray a1, AssociativeArray a2, Map<Object, Double> columnWeights) { """ Estimates the weighted manhattan distance of two Associative Arrays. @param a1 @param a2 @param columnWeights @return """ Map<Object, Double> columnDistances = columnDistances...
java
public static double manhattanWeighted(AssociativeArray a1, AssociativeArray a2, Map<Object, Double> columnWeights) { Map<Object, Double> columnDistances = columnDistances(a1, a2, columnWeights.keySet()); double distance = 0.0; for(Map.Entry<Object, Double> entry : columnDistances.entry...
[ "public", "static", "double", "manhattanWeighted", "(", "AssociativeArray", "a1", ",", "AssociativeArray", "a2", ",", "Map", "<", "Object", ",", "Double", ">", "columnWeights", ")", "{", "Map", "<", "Object", ",", "Double", ">", "columnDistances", "=", "column...
Estimates the weighted manhattan distance of two Associative Arrays. @param a1 @param a2 @param columnWeights @return
[ "Estimates", "the", "weighted", "manhattan", "distance", "of", "two", "Associative", "Arrays", "." ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/mathematics/distances/Distance.java#L94-L103
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java
AbstractMastersListener.relaunchOperation
public HandleErrorResult relaunchOperation(Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { """ After a failover that has bean done, relaunch the operation that was in progress. In case of special operation that crash server, doesn't relaunched it; @param method th...
java
public HandleErrorResult relaunchOperation(Method method, Object[] args) throws IllegalAccessException, InvocationTargetException { HandleErrorResult handleErrorResult = new HandleErrorResult(true); if (method != null) { switch (method.getName()) { case "executeQuery": if (args[2]...
[ "public", "HandleErrorResult", "relaunchOperation", "(", "Method", "method", ",", "Object", "[", "]", "args", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", "{", "HandleErrorResult", "handleErrorResult", "=", "new", "HandleErrorResult", "(", ...
After a failover that has bean done, relaunch the operation that was in progress. In case of special operation that crash server, doesn't relaunched it; @param method the methode accessed @param args the parameters @return An object that indicate the result or that the exception as to be thrown @throws IllegalAccess...
[ "After", "a", "failover", "that", "has", "bean", "done", "relaunch", "the", "operation", "that", "was", "in", "progress", ".", "In", "case", "of", "special", "operation", "that", "crash", "server", "doesn", "t", "relaunched", "it", ";" ]
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/internal/failover/AbstractMastersListener.java#L306-L351
springfox/springfox
springfox-spring-web/src/main/java/springfox/documentation/spring/web/paths/DefaultPathProvider.java
DefaultPathProvider.getResourceListingPath
@Override public String getResourceListingPath(String groupName, String apiDeclaration) { """ Corresponds to the path attribute of a swagger Resource Object (within a Resource Listing). <p> This method builds a URL based off of @param groupName the group name for this Resource Object e.g. 'default' @...
java
@Override public String getResourceListingPath(String groupName, String apiDeclaration) { String candidate = agnosticUriComponentBuilder(getDocumentationPath()) .pathSegment(groupName, apiDeclaration) .build() .toString(); return removeAdjacentForwardSlashes(candidate); }
[ "@", "Override", "public", "String", "getResourceListingPath", "(", "String", "groupName", ",", "String", "apiDeclaration", ")", "{", "String", "candidate", "=", "agnosticUriComponentBuilder", "(", "getDocumentationPath", "(", ")", ")", ".", "pathSegment", "(", "gro...
Corresponds to the path attribute of a swagger Resource Object (within a Resource Listing). <p> This method builds a URL based off of @param groupName the group name for this Resource Object e.g. 'default' @param apiDeclaration the identifier for the api declaration e.g 'business-controller' @return the resource...
[ "Corresponds", "to", "the", "path", "attribute", "of", "a", "swagger", "Resource", "Object", "(", "within", "a", "Resource", "Listing", ")", ".", "<p", ">", "This", "method", "builds", "a", "URL", "based", "off", "of" ]
train
https://github.com/springfox/springfox/blob/e40e2d6f4b345ffa35cd5c0ca7a12589036acaf7/springfox-spring-web/src/main/java/springfox/documentation/spring/web/paths/DefaultPathProvider.java#L71-L78
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/JobTracker.java
JobTracker.addJob
protected synchronized JobStatus addJob(JobID jobId, JobInProgress job) { """ Adds a job to the jobtracker. Make sure that the checks are inplace before adding a job. This is the core job submission logic @param jobId The id for the job submitted which needs to be added """ totalSubmissions++; synch...
java
protected synchronized JobStatus addJob(JobID jobId, JobInProgress job) { totalSubmissions++; synchronized (jobs) { synchronized (taskScheduler) { jobs.put(job.getProfile().getJobID(), job); for (JobInProgressListener listener : jobInProgressListeners) { try { listen...
[ "protected", "synchronized", "JobStatus", "addJob", "(", "JobID", "jobId", ",", "JobInProgress", "job", ")", "{", "totalSubmissions", "++", ";", "synchronized", "(", "jobs", ")", "{", "synchronized", "(", "taskScheduler", ")", "{", "jobs", ".", "put", "(", "...
Adds a job to the jobtracker. Make sure that the checks are inplace before adding a job. This is the core job submission logic @param jobId The id for the job submitted which needs to be added
[ "Adds", "a", "job", "to", "the", "jobtracker", ".", "Make", "sure", "that", "the", "checks", "are", "inplace", "before", "adding", "a", "job", ".", "This", "is", "the", "core", "job", "submission", "logic" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/JobTracker.java#L3173-L3200
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java
ST_AsGeoJSON.toGeojsonCoordinates
public static void toGeojsonCoordinates(Coordinate[] coords, StringBuilder sb) { """ Convert a jts array of coordinates to a GeoJSON coordinates representation. Syntax: [[X1,Y1],[X2,Y2]] @param coords @param sb """ sb.append("["); for (int i = 0; i < coords.length; i++) { ...
java
public static void toGeojsonCoordinates(Coordinate[] coords, StringBuilder sb) { sb.append("["); for (int i = 0; i < coords.length; i++) { toGeojsonCoordinate(coords[i], sb); if (i < coords.length - 1) { sb.append(","); } } sb.append("]...
[ "public", "static", "void", "toGeojsonCoordinates", "(", "Coordinate", "[", "]", "coords", ",", "StringBuilder", "sb", ")", "{", "sb", ".", "append", "(", "\"[\"", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "coords", ".", "length", ";...
Convert a jts array of coordinates to a GeoJSON coordinates representation. Syntax: [[X1,Y1],[X2,Y2]] @param coords @param sb
[ "Convert", "a", "jts", "array", "of", "coordinates", "to", "a", "GeoJSON", "coordinates", "representation", "." ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/io/geojson/ST_AsGeoJSON.java#L285-L294
liaochong/spring-boot-starter-converter
src/main/java/com/github/liaochong/converter/core/BeanConverter.java
BeanConverter.convert
public static <T, U> U convert(T source, Class<U> targetClass) { """ 单个Bean转换 @param source 被转换对象 @param targetClass 需要转换到的类型 @param <T> 转换前的类型 @param <U> 转换后的类型 @return 结果 """ return BeanConvertStrategy.convertBean(source, targetClass); }
java
public static <T, U> U convert(T source, Class<U> targetClass) { return BeanConvertStrategy.convertBean(source, targetClass); }
[ "public", "static", "<", "T", ",", "U", ">", "U", "convert", "(", "T", "source", ",", "Class", "<", "U", ">", "targetClass", ")", "{", "return", "BeanConvertStrategy", ".", "convertBean", "(", "source", ",", "targetClass", ")", ";", "}" ]
单个Bean转换 @param source 被转换对象 @param targetClass 需要转换到的类型 @param <T> 转换前的类型 @param <U> 转换后的类型 @return 结果
[ "单个Bean转换" ]
train
https://github.com/liaochong/spring-boot-starter-converter/blob/a36bea44bd23330a6f43b0372906a804a09285c5/src/main/java/com/github/liaochong/converter/core/BeanConverter.java#L125-L127
skuzzle/TinyPlugz
tiny-plugz/src/main/java/de/skuzzle/tinyplugz/util/ReflectionUtil.java
ReflectionUtil.createInstance
public static <T> T createInstance(Object source, Class<T> base, ClassLoader classLoader) { """ Creates or returns an instance of an arbitrary type which is a sub type of given {@code base} class. If the source object already is an instance of {@code base}, then it is returned. If the source object i...
java
public static <T> T createInstance(Object source, Class<T> base, ClassLoader classLoader) { Require.nonNull(source, "source"); Require.nonNull(base, "base"); Require.nonNull(classLoader, "classLoader"); if (source instanceof Class<?>) { return fromClass(base, (Cl...
[ "public", "static", "<", "T", ">", "T", "createInstance", "(", "Object", "source", ",", "Class", "<", "T", ">", "base", ",", "ClassLoader", "classLoader", ")", "{", "Require", ".", "nonNull", "(", "source", ",", "\"source\"", ")", ";", "Require", ".", ...
Creates or returns an instance of an arbitrary type which is a sub type of given {@code base} class. If the source object already is an instance of {@code base}, then it is returned. If the source object is a {@link Class} object, its no-argument default constructor will be called and the resulting object returned. If ...
[ "Creates", "or", "returns", "an", "instance", "of", "an", "arbitrary", "type", "which", "is", "a", "sub", "type", "of", "given", "{", "@code", "base", "}", "class", ".", "If", "the", "source", "object", "already", "is", "an", "instance", "of", "{", "@c...
train
https://github.com/skuzzle/TinyPlugz/blob/739858ed0ba5a0c75b6ccf18df9a4d5612374a4b/tiny-plugz/src/main/java/de/skuzzle/tinyplugz/util/ReflectionUtil.java#L36-L57
google/error-prone-javac
src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java
Module.isOpen
public boolean isOpen(String pn, String target) { """ Tests if the package of the given name is open to the target in a qualified fashion. """ return isOpen(pn) || opens.containsKey(pn) && opens.get(pn).contains(target); }
java
public boolean isOpen(String pn, String target) { return isOpen(pn) || opens.containsKey(pn) && opens.get(pn).contains(target); }
[ "public", "boolean", "isOpen", "(", "String", "pn", ",", "String", "target", ")", "{", "return", "isOpen", "(", "pn", ")", "||", "opens", ".", "containsKey", "(", "pn", ")", "&&", "opens", ".", "get", "(", "pn", ")", ".", "contains", "(", "target", ...
Tests if the package of the given name is open to the target in a qualified fashion.
[ "Tests", "if", "the", "package", "of", "the", "given", "name", "is", "open", "to", "the", "target", "in", "a", "qualified", "fashion", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java#L172-L175
jronrun/benayn
benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java
Uris.replaceHost
public static URI replaceHost(final URI uri, final String newHost, final boolean strict) throws URISyntaxException { """ Returns a new URI with the host portion replaced by the new host portion @param uri the uri to replace the host in @param newHost the new host to replace with @param strict whether or not t...
java
public static URI replaceHost(final URI uri, final String newHost, final boolean strict) throws URISyntaxException { final URI hostUri = newUri(newHost, strict); return newUri(uri.toString().replaceFirst(Pattern.quote(uri.getHost()), Matcher.quoteReplace...
[ "public", "static", "URI", "replaceHost", "(", "final", "URI", "uri", ",", "final", "String", "newHost", ",", "final", "boolean", "strict", ")", "throws", "URISyntaxException", "{", "final", "URI", "hostUri", "=", "newUri", "(", "newHost", ",", "strict", ")"...
Returns a new URI with the host portion replaced by the new host portion @param uri the uri to replace the host in @param newHost the new host to replace with @param strict whether or not to perform strict escaping. (defaults to false) @return the new URI with everything the same except for the host being replaced @th...
[ "Returns", "a", "new", "URI", "with", "the", "host", "portion", "replaced", "by", "the", "new", "host", "portion" ]
train
https://github.com/jronrun/benayn/blob/7585152e10e4cac07b4274c65f1c72ad7061ae69/benayn-ustyle/src/main/java/com/benayn/ustyle/thirdparty/Uris.java#L401-L405
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java
GVRPose.setWorldRotation
public boolean setWorldRotation(int boneindex, float x, float y, float z, float w) { """ Sets the world rotation for the designated bone. <p> This function recomputes the local bone rotation and the world bone position. @param boneindex zero based index of bone to set matrix for. @param x,y,z,w quaternion wi...
java
public boolean setWorldRotation(int boneindex, float x, float y, float z, float w) { if (mSkeleton.isLocked(boneindex)) { return false; } Bone bone = mBones[boneindex]; bone.setWorldRotation(x, y, z, w); bone.Changed |= WORLD_ROT; if (mSkeleton.ge...
[ "public", "boolean", "setWorldRotation", "(", "int", "boneindex", ",", "float", "x", ",", "float", "y", ",", "float", "z", ",", "float", "w", ")", "{", "if", "(", "mSkeleton", ".", "isLocked", "(", "boneindex", ")", ")", "{", "return", "false", ";", ...
Sets the world rotation for the designated bone. <p> This function recomputes the local bone rotation and the world bone position. @param boneindex zero based index of bone to set matrix for. @param x,y,z,w quaternion with new rotation. @see #getWorldRotation @see #setLocalRotation @see #getWorldMatrix @see #getWorld...
[ "Sets", "the", "world", "rotation", "for", "the", "designated", "bone", ".", "<p", ">", "This", "function", "recomputes", "the", "local", "bone", "rotation", "and", "the", "world", "bone", "position", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRPose.java#L453-L477
jenkinsci/jenkins
core/src/main/java/jenkins/diagnostics/SecurityIsOffMonitor.java
SecurityIsOffMonitor.doAct
@RequirePOST public void doAct(StaplerRequest req, StaplerResponse rsp) throws IOException { """ Depending on whether the user said "yes" or "no", send him to the right place. """ if(req.hasParameter("no")) { disable(true); rsp.sendRedirect(req.getContextPath()+"/manage"); ...
java
@RequirePOST public void doAct(StaplerRequest req, StaplerResponse rsp) throws IOException { if(req.hasParameter("no")) { disable(true); rsp.sendRedirect(req.getContextPath()+"/manage"); } else { rsp.sendRedirect(req.getContextPath()+"/configureSecurity"); ...
[ "@", "RequirePOST", "public", "void", "doAct", "(", "StaplerRequest", "req", ",", "StaplerResponse", "rsp", ")", "throws", "IOException", "{", "if", "(", "req", ".", "hasParameter", "(", "\"no\"", ")", ")", "{", "disable", "(", "true", ")", ";", "rsp", "...
Depending on whether the user said "yes" or "no", send him to the right place.
[ "Depending", "on", "whether", "the", "user", "said", "yes", "or", "no", "send", "him", "to", "the", "right", "place", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/jenkins/diagnostics/SecurityIsOffMonitor.java#L38-L46
liferay/com-liferay-commerce
commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPOptionValueWrapper.java
CPOptionValueWrapper.getName
@Override public String getName(String languageId, boolean useDefault) { """ Returns the localized name of this cp option value in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use...
java
@Override public String getName(String languageId, boolean useDefault) { return _cpOptionValue.getName(languageId, useDefault); }
[ "@", "Override", "public", "String", "getName", "(", "String", "languageId", ",", "boolean", "useDefault", ")", "{", "return", "_cpOptionValue", ".", "getName", "(", "languageId", ",", "useDefault", ")", ";", "}" ]
Returns the localized name of this cp option value in the language, optionally using the default language if no localization exists for the requested language. @param languageId the ID of the language @param useDefault whether to use the default language if no localization exists for the requested language @return the...
[ "Returns", "the", "localized", "name", "of", "this", "cp", "option", "value", "in", "the", "language", "optionally", "using", "the", "default", "language", "if", "no", "localization", "exists", "for", "the", "requested", "language", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPOptionValueWrapper.java#L341-L344
rhuss/jolokia
agent/core/src/main/java/org/jolokia/handler/ExecHandler.java
ExecHandler.verifyArguments
private void verifyArguments(JmxExecRequest request, OperationAndParamType pTypes, int pNrParams, List<Object> pArgs) { """ check whether the given arguments are compatible with the signature and if not so, raise an excepton """ if ( (pNrParams > 0 && pArgs == null) || (pArgs != null && pArgs.size() !=...
java
private void verifyArguments(JmxExecRequest request, OperationAndParamType pTypes, int pNrParams, List<Object> pArgs) { if ( (pNrParams > 0 && pArgs == null) || (pArgs != null && pArgs.size() != pNrParams)) { throw new IllegalArgumentException("Invalid number of operation arguments. Operation " + ...
[ "private", "void", "verifyArguments", "(", "JmxExecRequest", "request", ",", "OperationAndParamType", "pTypes", ",", "int", "pNrParams", ",", "List", "<", "Object", ">", "pArgs", ")", "{", "if", "(", "(", "pNrParams", ">", "0", "&&", "pArgs", "==", "null", ...
check whether the given arguments are compatible with the signature and if not so, raise an excepton
[ "check", "whether", "the", "given", "arguments", "are", "compatible", "with", "the", "signature", "and", "if", "not", "so", "raise", "an", "excepton" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/handler/ExecHandler.java#L102-L108
apache/incubator-atlas
client/src/main/java/org/apache/atlas/AtlasClient.java
AtlasClient.getEntityAuditEvents
public List<EntityAuditEvent> getEntityAuditEvents(String entityId, short numResults) throws AtlasServiceException { """ Get the latest numResults entity audit events in decreasing order of timestamp for the given entity id @param entityId entity id @param numResults number of results to be returned ...
java
public List<EntityAuditEvent> getEntityAuditEvents(String entityId, short numResults) throws AtlasServiceException { return getEntityAuditEvents(entityId, null, numResults); }
[ "public", "List", "<", "EntityAuditEvent", ">", "getEntityAuditEvents", "(", "String", "entityId", ",", "short", "numResults", ")", "throws", "AtlasServiceException", "{", "return", "getEntityAuditEvents", "(", "entityId", ",", "null", ",", "numResults", ")", ";", ...
Get the latest numResults entity audit events in decreasing order of timestamp for the given entity id @param entityId entity id @param numResults number of results to be returned @return list of audit events for the entity id @throws AtlasServiceException
[ "Get", "the", "latest", "numResults", "entity", "audit", "events", "in", "decreasing", "order", "of", "timestamp", "for", "the", "given", "entity", "id" ]
train
https://github.com/apache/incubator-atlas/blob/e0d2cdc27c32742ebecd24db4cca62dc04dcdf4b/client/src/main/java/org/apache/atlas/AtlasClient.java#L774-L777
albfernandez/itext2
src/main/java/com/lowagie/text/Table.java
Table.addCell
public void addCell(String content, Point location) throws BadElementException { """ Adds a <CODE>Cell</CODE> to the <CODE>Table</CODE>. <P> This is a shortcut for <CODE>addCell(Cell cell, Point location)</CODE>. The <CODE>String</CODE> will be converted to a <CODE>Cell</CODE>. @param content a...
java
public void addCell(String content, Point location) throws BadElementException { addCell(new Phrase(content), location); }
[ "public", "void", "addCell", "(", "String", "content", ",", "Point", "location", ")", "throws", "BadElementException", "{", "addCell", "(", "new", "Phrase", "(", "content", ")", ",", "location", ")", ";", "}" ]
Adds a <CODE>Cell</CODE> to the <CODE>Table</CODE>. <P> This is a shortcut for <CODE>addCell(Cell cell, Point location)</CODE>. The <CODE>String</CODE> will be converted to a <CODE>Cell</CODE>. @param content a <CODE>String</CODE> @param location a <CODE>Point</CODE> @throws BadElementE...
[ "Adds", "a", "<CODE", ">", "Cell<", "/", "CODE", ">", "to", "the", "<CODE", ">", "Table<", "/", "CODE", ">", ".", "<P", ">", "This", "is", "a", "shortcut", "for", "<CODE", ">", "addCell", "(", "Cell", "cell", "Point", "location", ")", "<", "/", "...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/Table.java#L785-L787
beihaifeiwu/dolphin
dolphin-mybatis-generator/src/main/java/com/freetmp/mbg/formatter/StringHelper.java
StringHelper.collapseQualifierBase
public static String collapseQualifierBase(String name, String qualifierBase) { """ Cross between {@link #collapse} and {@link #partiallyUnqualify}. Functions much like {@link #collapse} except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name 'org.hibernate.interna...
java
public static String collapseQualifierBase(String name, String qualifierBase) { if (name == null || !name.startsWith(qualifierBase)) { return collapse(name); } return collapseQualifier(qualifierBase, true) + name.substring(qualifierBase.length()); }
[ "public", "static", "String", "collapseQualifierBase", "(", "String", "name", ",", "String", "qualifierBase", ")", "{", "if", "(", "name", "==", "null", "||", "!", "name", ".", "startsWith", "(", "qualifierBase", ")", ")", "{", "return", "collapse", "(", "...
Cross between {@link #collapse} and {@link #partiallyUnqualify}. Functions much like {@link #collapse} except that only the qualifierBase is collapsed. For example, with a base of 'org.hibernate' the name 'org.hibernate.internal.util.StringHelper' would become 'o.h.util.StringHelper'. @param name The (poten...
[ "Cross", "between", "{", "@link", "#collapse", "}", "and", "{", "@link", "#partiallyUnqualify", "}", ".", "Functions", "much", "like", "{", "@link", "#collapse", "}", "except", "that", "only", "the", "qualifierBase", "is", "collapsed", ".", "For", "example", ...
train
https://github.com/beihaifeiwu/dolphin/blob/b100579cc6986dce5eba5593ebb5fbae7bad9d1a/dolphin-mybatis-generator/src/main/java/com/freetmp/mbg/formatter/StringHelper.java#L286-L291
spring-projects/spring-social
spring-social-web/src/main/java/org/springframework/social/connect/web/ProviderSignInController.java
ProviderSignInController.oauth1Callback
@RequestMapping(value="/ { """ Process the authentication callback from an OAuth 1 service provider. Called after the member authorizes the authentication, generally done once by having he or she click "Allow" in their web browser at the provider's site. Handles the provider sign-in callback by first determining...
java
@RequestMapping(value="/{providerId}", method=RequestMethod.GET, params="oauth_token") public RedirectView oauth1Callback(@PathVariable String providerId, NativeWebRequest request) { try { OAuth1ConnectionFactory<?> connectionFactory = (OAuth1ConnectionFactory<?>) connectionFactoryLocator.getConnectionFactory(pro...
[ "@", "RequestMapping", "(", "value", "=", "\"/{providerId}\"", ",", "method", "=", "RequestMethod", ".", "GET", ",", "params", "=", "\"oauth_token\"", ")", "public", "RedirectView", "oauth1Callback", "(", "@", "PathVariable", "String", "providerId", ",", "NativeWe...
Process the authentication callback from an OAuth 1 service provider. Called after the member authorizes the authentication, generally done once by having he or she click "Allow" in their web browser at the provider's site. Handles the provider sign-in callback by first determining if a local user account is associated...
[ "Process", "the", "authentication", "callback", "from", "an", "OAuth", "1", "service", "provider", ".", "Called", "after", "the", "member", "authorizes", "the", "authentication", "generally", "done", "once", "by", "having", "he", "or", "she", "click", "Allow", ...
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-web/src/main/java/org/springframework/social/connect/web/ProviderSignInController.java#L199-L209
lessthanoptimal/BoofCV
main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/ReidSolomonCodes.java
ReidSolomonCodes.computeECC
public void computeECC( GrowQueue_I8 input , GrowQueue_I8 output ) { """ Given the input message compute the error correction code for it @param input Input message. Modified internally then returned to its initial state @param output error correction code """ int N = generator.size-1; input.extend(inpu...
java
public void computeECC( GrowQueue_I8 input , GrowQueue_I8 output ) { int N = generator.size-1; input.extend(input.size+N); Arrays.fill(input.data,input.size-N,input.size,(byte)0); math.polyDivide(input,generator,tmp0,output); input.size -= N; }
[ "public", "void", "computeECC", "(", "GrowQueue_I8", "input", ",", "GrowQueue_I8", "output", ")", "{", "int", "N", "=", "generator", ".", "size", "-", "1", ";", "input", ".", "extend", "(", "input", ".", "size", "+", "N", ")", ";", "Arrays", ".", "fi...
Given the input message compute the error correction code for it @param input Input message. Modified internally then returned to its initial state @param output error correction code
[ "Given", "the", "input", "message", "compute", "the", "error", "correction", "code", "for", "it" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-recognition/src/main/java/boofcv/alg/fiducial/qrcode/ReidSolomonCodes.java#L62-L71
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/subsystem/KernelFeatureDefinitionImpl.java
KernelFeatureDefinitionImpl.getAllKernelFeatures
public static Collection<ProvisioningFeatureDefinition> getAllKernelFeatures(BundleContext ctx, WsLocationAdmin locationService) { """ Get ALL kernel feature definitions (in active use or not). Minify requires this to ensure that opt...
java
public static Collection<ProvisioningFeatureDefinition> getAllKernelFeatures(BundleContext ctx, WsLocationAdmin locationService) { return getKernelFeatures(ctx, locationService, true); }
[ "public", "static", "Collection", "<", "ProvisioningFeatureDefinition", ">", "getAllKernelFeatures", "(", "BundleContext", "ctx", ",", "WsLocationAdmin", "locationService", ")", "{", "return", "getKernelFeatures", "(", "ctx", ",", "locationService", ",", "true", ")", ...
Get ALL kernel feature definitions (in active use or not). Minify requires this to ensure that optional kernel features like binaryLogging are not minified out. This list is not cached. @param bundleContext @param locationService @return
[ "Get", "ALL", "kernel", "feature", "definitions", "(", "in", "active", "use", "or", "not", ")", ".", "Minify", "requires", "this", "to", "ensure", "that", "optional", "kernel", "features", "like", "binaryLogging", "are", "not", "minified", "out", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.feature.core/src/com/ibm/ws/kernel/feature/internal/subsystem/KernelFeatureDefinitionImpl.java#L83-L86
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfContentByte.java
PdfContentByte.setRGBColorFillF
public void setRGBColorFillF(float red, float green, float blue) { """ Changes the current color for filling paths (device dependent colors!). <P> Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space), and sets the color to use for filling paths.</P> <P> Following the PDF manual, eac...
java
public void setRGBColorFillF(float red, float green, float blue) { HelperRGB(red, green, blue); content.append(" rg").append_i(separator); }
[ "public", "void", "setRGBColorFillF", "(", "float", "red", ",", "float", "green", ",", "float", "blue", ")", "{", "HelperRGB", "(", "red", ",", "green", ",", "blue", ")", ";", "content", ".", "append", "(", "\" rg\"", ")", ".", "append_i", "(", "separa...
Changes the current color for filling paths (device dependent colors!). <P> Sets the color space to <B>DeviceRGB</B> (or the <B>DefaultRGB</B> color space), and sets the color to use for filling paths.</P> <P> Following the PDF manual, each operand must be a number between 0 (minimum intensity) and 1 (maximum intensity...
[ "Changes", "the", "current", "color", "for", "filling", "paths", "(", "device", "dependent", "colors!", ")", ".", "<P", ">", "Sets", "the", "color", "space", "to", "<B", ">", "DeviceRGB<", "/", "B", ">", "(", "or", "the", "<B", ">", "DefaultRGB<", "/",...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfContentByte.java#L568-L571
riversun/string-grabber
src/main/java/org/riversun/string_grabber/StringCropper.java
StringCropper.removeTail
public String removeTail(String srcStr, int charCount) { """ Return the rest of the string that is cropped the number of chars from the end of string @param srcStr @param charCount @return """ return getLeftOf(srcStr, srcStr.length() - charCount); }
java
public String removeTail(String srcStr, int charCount) { return getLeftOf(srcStr, srcStr.length() - charCount); }
[ "public", "String", "removeTail", "(", "String", "srcStr", ",", "int", "charCount", ")", "{", "return", "getLeftOf", "(", "srcStr", ",", "srcStr", ".", "length", "(", ")", "-", "charCount", ")", ";", "}" ]
Return the rest of the string that is cropped the number of chars from the end of string @param srcStr @param charCount @return
[ "Return", "the", "rest", "of", "the", "string", "that", "is", "cropped", "the", "number", "of", "chars", "from", "the", "end", "of", "string" ]
train
https://github.com/riversun/string-grabber/blob/b5aadc21fe15f50d35392188dec6ab81dcf8d464/src/main/java/org/riversun/string_grabber/StringCropper.java#L419-L421
census-instrumentation/opencensus-java
contrib/dropwizard/src/main/java/io/opencensus/contrib/dropwizard/DropWizardMetrics.java
DropWizardMetrics.collectMeter
private Metric collectMeter(String dropwizardName, Meter meter) { """ Returns a {@code Metric} collected from {@link Meter}. @param dropwizardName the metric name. @param meter the meter object to collect @return a {@code Metric}. """ String metricName = DropWizardUtils.generateFullMetricName(dropwiza...
java
private Metric collectMeter(String dropwizardName, Meter meter) { String metricName = DropWizardUtils.generateFullMetricName(dropwizardName, "meter"); String metricDescription = DropWizardUtils.generateFullMetricDescription(dropwizardName, meter); MetricDescriptor metricDescriptor = MetricDescripto...
[ "private", "Metric", "collectMeter", "(", "String", "dropwizardName", ",", "Meter", "meter", ")", "{", "String", "metricName", "=", "DropWizardUtils", ".", "generateFullMetricName", "(", "dropwizardName", ",", "\"meter\"", ")", ";", "String", "metricDescription", "=...
Returns a {@code Metric} collected from {@link Meter}. @param dropwizardName the metric name. @param meter the meter object to collect @return a {@code Metric}.
[ "Returns", "a", "{", "@code", "Metric", "}", "collected", "from", "{", "@link", "Meter", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/contrib/dropwizard/src/main/java/io/opencensus/contrib/dropwizard/DropWizardMetrics.java#L168-L186
lucee/Lucee
core/src/main/java/lucee/runtime/op/Caster.java
Caster.toList
public static List toList(Object o, List defaultValue) { """ cast a Object to a Array Object @param o Object to cast @param defaultValue @return casted Array """ return toList(o, false, defaultValue); }
java
public static List toList(Object o, List defaultValue) { return toList(o, false, defaultValue); }
[ "public", "static", "List", "toList", "(", "Object", "o", ",", "List", "defaultValue", ")", "{", "return", "toList", "(", "o", ",", "false", ",", "defaultValue", ")", ";", "}" ]
cast a Object to a Array Object @param o Object to cast @param defaultValue @return casted Array
[ "cast", "a", "Object", "to", "a", "Array", "Object" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L2195-L2197
zutnop/telekom-workflow-engine
telekom-workflow-engine/src/main/java/ee/telekom/workflow/graph/node/gateway/AbstractConditionalGateway.java
AbstractConditionalGateway.addCondition
public void addCondition( Condition condition, String transitionName ) { """ A <code>null</code> condition is interpreted as a <i>default</i> condition. """ conditions.add( Pair.of( condition, transitionName ) ); }
java
public void addCondition( Condition condition, String transitionName ){ conditions.add( Pair.of( condition, transitionName ) ); }
[ "public", "void", "addCondition", "(", "Condition", "condition", ",", "String", "transitionName", ")", "{", "conditions", ".", "add", "(", "Pair", ".", "of", "(", "condition", ",", "transitionName", ")", ")", ";", "}" ]
A <code>null</code> condition is interpreted as a <i>default</i> condition.
[ "A", "<code", ">", "null<", "/", "code", ">", "condition", "is", "interpreted", "as", "a", "<i", ">", "default<", "/", "i", ">", "condition", "." ]
train
https://github.com/zutnop/telekom-workflow-engine/blob/f471f1f94013b3e2d56b4c9380e86e3a92c2ee29/telekom-workflow-engine/src/main/java/ee/telekom/workflow/graph/node/gateway/AbstractConditionalGateway.java#L33-L35
alibaba/jstorm
jstorm-core/src/main/java/com/alibaba/jstorm/message/netty/StormClientHandler.java
StormClientHandler.channelConnected
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent event) { """ Sometime when connecting to a bad channel which isn't writable, this method will be called """ // register the newly established channel Channel channel = event.getChannel(); LOG.info("c...
java
@Override public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent event) { // register the newly established channel Channel channel = event.getChannel(); LOG.info("connection established to :{}, local port:{}", client.getRemoteAddr(), channel.getLocalAddress()); c...
[ "@", "Override", "public", "void", "channelConnected", "(", "ChannelHandlerContext", "ctx", ",", "ChannelStateEvent", "event", ")", "{", "// register the newly established channel", "Channel", "channel", "=", "event", ".", "getChannel", "(", ")", ";", "LOG", ".", "i...
Sometime when connecting to a bad channel which isn't writable, this method will be called
[ "Sometime", "when", "connecting", "to", "a", "bad", "channel", "which", "isn", "t", "writable", "this", "method", "will", "be", "called" ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/com/alibaba/jstorm/message/netty/StormClientHandler.java#L53-L61
zaproxy/zaproxy
src/org/parosproxy/paros/view/MainFooterPanel.java
MainFooterPanel.createAlertLabel
private JLabel createAlertLabel(String toolTipText, URL imageUrl) throws NullPointerException { """ Creates a {@code JLabel} with text "0", an {@code ImageIcon} created from the specified URL, the specified tool tip text and an empty border that takes up 5 pixels to the right and left of the {@code JLabel}. @...
java
private JLabel createAlertLabel(String toolTipText, URL imageUrl) throws NullPointerException { JLabel label = new JLabel("0", DisplayUtils.getScaledIcon(new ImageIcon(imageUrl)), JLabel.LEADING); label.setToolTipText(toolTipText); label.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5)); return label; ...
[ "private", "JLabel", "createAlertLabel", "(", "String", "toolTipText", ",", "URL", "imageUrl", ")", "throws", "NullPointerException", "{", "JLabel", "label", "=", "new", "JLabel", "(", "\"0\"", ",", "DisplayUtils", ".", "getScaledIcon", "(", "new", "ImageIcon", ...
Creates a {@code JLabel} with text "0", an {@code ImageIcon} created from the specified URL, the specified tool tip text and an empty border that takes up 5 pixels to the right and left of the {@code JLabel}. @param toolTipText the tool tip text, if toolTipText is {@code null} no tool tip is displayed @param imageUrl ...
[ "Creates", "a", "{", "@code", "JLabel", "}", "with", "text", "0", "an", "{", "@code", "ImageIcon", "}", "created", "from", "the", "specified", "URL", "the", "specified", "tool", "tip", "text", "and", "an", "empty", "border", "that", "takes", "up", "5", ...
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/MainFooterPanel.java#L221-L227
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java
AppServiceEnvironmentsInner.listCapacitiesAsync
public Observable<Page<StampCapacityInner>> listCapacitiesAsync(final String resourceGroupName, final String name) { """ Get the used, available, and total worker capacity an App Service Environment. Get the used, available, and total worker capacity an App Service Environment. @param resourceGroupName Name of...
java
public Observable<Page<StampCapacityInner>> listCapacitiesAsync(final String resourceGroupName, final String name) { return listCapacitiesWithServiceResponseAsync(resourceGroupName, name) .map(new Func1<ServiceResponse<Page<StampCapacityInner>>, Page<StampCapacityInner>>() { @Overrid...
[ "public", "Observable", "<", "Page", "<", "StampCapacityInner", ">", ">", "listCapacitiesAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "name", ")", "{", "return", "listCapacitiesWithServiceResponseAsync", "(", "resourceGroupName", ",", "...
Get the used, available, and total worker capacity an App Service Environment. Get the used, available, and total worker capacity an App Service Environment. @param resourceGroupName Name of the resource group to which the resource belongs. @param name Name of the App Service Environment. @throws IllegalArgumentExcept...
[ "Get", "the", "used", "available", "and", "total", "worker", "capacity", "an", "App", "Service", "Environment", ".", "Get", "the", "used", "available", "and", "total", "worker", "capacity", "an", "App", "Service", "Environment", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L1339-L1347
lucee/Lucee
core/src/main/java/lucee/runtime/coder/Base64Coder.java
Base64Coder.decodeToString
public static String decodeToString(String encoded, String charset) throws CoderException, UnsupportedEncodingException { """ decodes a Base64 String to a Plain String @param encoded @return @throws ExpressionException """ byte[] dec = decode(Caster.toString(encoded, null)); return new String(dec, chars...
java
public static String decodeToString(String encoded, String charset) throws CoderException, UnsupportedEncodingException { byte[] dec = decode(Caster.toString(encoded, null)); return new String(dec, charset); }
[ "public", "static", "String", "decodeToString", "(", "String", "encoded", ",", "String", "charset", ")", "throws", "CoderException", ",", "UnsupportedEncodingException", "{", "byte", "[", "]", "dec", "=", "decode", "(", "Caster", ".", "toString", "(", "encoded",...
decodes a Base64 String to a Plain String @param encoded @return @throws ExpressionException
[ "decodes", "a", "Base64", "String", "to", "a", "Plain", "String" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/coder/Base64Coder.java#L39-L42
brianwhu/xillium
base/src/main/java/org/xillium/base/beans/Strings.java
Strings.toLowerCamelCase
public static String toLowerCamelCase(String text, char separator) { """ Converts a word sequence into a single camel-case word that starts with a lowercase letter. @param text - a word sequence with the given separator @param separator - a word separator @return a single camel-case word """ char[...
java
public static String toLowerCamelCase(String text, char separator) { char[] chars = text.toCharArray(); int base = 0, top = 0; do { while (top < chars.length && chars[top] != separator) { chars[base++] = Character.toLowerCase(chars[top++]); } ...
[ "public", "static", "String", "toLowerCamelCase", "(", "String", "text", ",", "char", "separator", ")", "{", "char", "[", "]", "chars", "=", "text", ".", "toCharArray", "(", ")", ";", "int", "base", "=", "0", ",", "top", "=", "0", ";", "do", "{", "...
Converts a word sequence into a single camel-case word that starts with a lowercase letter. @param text - a word sequence with the given separator @param separator - a word separator @return a single camel-case word
[ "Converts", "a", "word", "sequence", "into", "a", "single", "camel", "-", "case", "word", "that", "starts", "with", "a", "lowercase", "letter", "." ]
train
https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/base/src/main/java/org/xillium/base/beans/Strings.java#L108-L125
haifengl/smile
core/src/main/java/smile/vq/NeuralMap.java
NeuralMap.partition
public int partition(int k, int minPts) { """ Clustering neurons into k clusters. @param k the number of clusters. @param minPts a neuron will be treated as outlier if the number of its points is less than minPts. @return the number of non-outlier leaves. """ List<Neuron> data = new ArrayList<>(); ...
java
public int partition(int k, int minPts) { List<Neuron> data = new ArrayList<>(); for (Neuron neuron : neurons) { neuron.y = OUTLIER; if (neuron.n >= minPts) { data.add(neuron); } } double[][] proximity = new double[data.size()]...
[ "public", "int", "partition", "(", "int", "k", ",", "int", "minPts", ")", "{", "List", "<", "Neuron", ">", "data", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "Neuron", "neuron", ":", "neurons", ")", "{", "neuron", ".", "y", "=", "O...
Clustering neurons into k clusters. @param k the number of clusters. @param minPts a neuron will be treated as outlier if the number of its points is less than minPts. @return the number of non-outlier leaves.
[ "Clustering", "neurons", "into", "k", "clusters", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/vq/NeuralMap.java#L571-L597
CenturyLinkCloud/mdw
mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java
EventServicesImpl.getActivityInstance
public ActivityInstance getActivityInstance(Long pActivityInstId) throws ProcessException, DataAccessException { """ Returns the ActivityInstance identified by the passed in Id @param pActivityInstId @return ActivityInstance """ ActivityInstance ai; TransactionWrapper transaction = null...
java
public ActivityInstance getActivityInstance(Long pActivityInstId) throws ProcessException, DataAccessException { ActivityInstance ai; TransactionWrapper transaction = null; EngineDataAccessDB edao = new EngineDataAccessDB(); try { transaction = edao.startTransaction(); ...
[ "public", "ActivityInstance", "getActivityInstance", "(", "Long", "pActivityInstId", ")", "throws", "ProcessException", ",", "DataAccessException", "{", "ActivityInstance", "ai", ";", "TransactionWrapper", "transaction", "=", "null", ";", "EngineDataAccessDB", "edao", "="...
Returns the ActivityInstance identified by the passed in Id @param pActivityInstId @return ActivityInstance
[ "Returns", "the", "ActivityInstance", "identified", "by", "the", "passed", "in", "Id" ]
train
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-services/src/com/centurylink/mdw/services/event/EventServicesImpl.java#L441-L455
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GradientToEdgeFeatures.java
GradientToEdgeFeatures.direction
static public void direction(GrayF32 derivX , GrayF32 derivY , GrayF32 angle ) { """ Computes the edge orientation using the {@link Math#atan} function. @param derivX Derivative along x-axis. Not modified. @param derivY Derivative along y-axis. Not modified. @param angle Edge orientation in radians (-pi/2 to ...
java
static public void direction(GrayF32 derivX , GrayF32 derivY , GrayF32 angle ) { InputSanityCheck.checkSameShape(derivX,derivY); angle.reshape(derivX.width,derivX.height); if(BoofConcurrency.USE_CONCURRENT ) { ImplGradientToEdgeFeatures_MT.direction(derivX,derivY,angle); } else { ImplGradientToEdgeFeatu...
[ "static", "public", "void", "direction", "(", "GrayF32", "derivX", ",", "GrayF32", "derivY", ",", "GrayF32", "angle", ")", "{", "InputSanityCheck", ".", "checkSameShape", "(", "derivX", ",", "derivY", ")", ";", "angle", ".", "reshape", "(", "derivX", ".", ...
Computes the edge orientation using the {@link Math#atan} function. @param derivX Derivative along x-axis. Not modified. @param derivY Derivative along y-axis. Not modified. @param angle Edge orientation in radians (-pi/2 to pi/2).
[ "Computes", "the", "edge", "orientation", "using", "the", "{", "@link", "Math#atan", "}", "function", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/feature/detect/edge/GradientToEdgeFeatures.java#L99-L109
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java
ChaincodeCollectionConfiguration.fromYamlFile
public static ChaincodeCollectionConfiguration fromYamlFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { """ Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a YAML file. @param configFile The file containin...
java
public static ChaincodeCollectionConfiguration fromYamlFile(File configFile) throws InvalidArgumentException, IOException, ChaincodeCollectionConfigurationException { return fromFile(configFile, false); }
[ "public", "static", "ChaincodeCollectionConfiguration", "fromYamlFile", "(", "File", "configFile", ")", "throws", "InvalidArgumentException", ",", "IOException", ",", "ChaincodeCollectionConfigurationException", "{", "return", "fromFile", "(", "configFile", ",", "false", ")...
Creates a new ChaincodeCollectionConfiguration instance configured with details supplied in a YAML file. @param configFile The file containing the network configuration @return A new ChaincodeCollectionConfiguration instance @throws InvalidArgumentException @throws IOException
[ "Creates", "a", "new", "ChaincodeCollectionConfiguration", "instance", "configured", "with", "details", "supplied", "in", "a", "YAML", "file", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/ChaincodeCollectionConfiguration.java#L88-L90
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/microdom/serialize/MicroWriter.java
MicroWriter.getNodeAsString
@Nullable public static String getNodeAsString (@Nonnull final IMicroNode aNode) { """ Convert the passed micro node to an XML string using {@link XMLWriterSettings#DEFAULT_XML_SETTINGS}. This is a specialized version of {@link #getNodeAsString(IMicroNode, IXMLWriterSettings)}. @param aNode The node to be ...
java
@Nullable public static String getNodeAsString (@Nonnull final IMicroNode aNode) { return getNodeAsString (aNode, XMLWriterSettings.DEFAULT_XML_SETTINGS); }
[ "@", "Nullable", "public", "static", "String", "getNodeAsString", "(", "@", "Nonnull", "final", "IMicroNode", "aNode", ")", "{", "return", "getNodeAsString", "(", "aNode", ",", "XMLWriterSettings", ".", "DEFAULT_XML_SETTINGS", ")", ";", "}" ]
Convert the passed micro node to an XML string using {@link XMLWriterSettings#DEFAULT_XML_SETTINGS}. This is a specialized version of {@link #getNodeAsString(IMicroNode, IXMLWriterSettings)}. @param aNode The node to be converted to a string. May not be <code>null</code> . @return The string representation of the pass...
[ "Convert", "the", "passed", "micro", "node", "to", "an", "XML", "string", "using", "{", "@link", "XMLWriterSettings#DEFAULT_XML_SETTINGS", "}", ".", "This", "is", "a", "specialized", "version", "of", "{", "@link", "#getNodeAsString", "(", "IMicroNode", "IXMLWriter...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/microdom/serialize/MicroWriter.java#L292-L296
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/BeanUtil.java
BeanUtil.getGetterMethod
public static Method getGetterMethod(Class<?> beanClass, String property) { """ Returns getter method for <code>property</code> in specified <code>beanClass</code> @param beanClass bean class @param property name of the property @return getter method. null if <code>property</code> is not found @see #get...
java
public static Method getGetterMethod(Class<?> beanClass, String property){ try{ return beanClass.getMethod(GET+getMethodSuffix(property)); }catch(NoSuchMethodException ex1){ try{ return beanClass.getMethod(IS+getMethodSuffix(property)); }catch(NoSuchMe...
[ "public", "static", "Method", "getGetterMethod", "(", "Class", "<", "?", ">", "beanClass", ",", "String", "property", ")", "{", "try", "{", "return", "beanClass", ".", "getMethod", "(", "GET", "+", "getMethodSuffix", "(", "property", ")", ")", ";", "}", ...
Returns getter method for <code>property</code> in specified <code>beanClass</code> @param beanClass bean class @param property name of the property @return getter method. null if <code>property</code> is not found @see #getGetterMethod(Class, String, Class)
[ "Returns", "getter", "method", "for", "<code", ">", "property<", "/", "code", ">", "in", "specified", "<code", ">", "beanClass<", "/", "code", ">" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/BeanUtil.java#L97-L107
ModeShape/modeshape
modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/PlanNode.java
PlanNode.findAllAtOrBelow
public List<PlanNode> findAllAtOrBelow( Traversal order, Type firstTypeToFind, Type... additionalTypesToFind ) { """ Find all of the nodes with one of the specified types that are at or below this node. @param order the orde...
java
public List<PlanNode> findAllAtOrBelow( Traversal order, Type firstTypeToFind, Type... additionalTypesToFind ) { return findAllAtOrBelow(order, EnumSet.of(firstTypeToFind, additionalTypesToFind)); }
[ "public", "List", "<", "PlanNode", ">", "findAllAtOrBelow", "(", "Traversal", "order", ",", "Type", "firstTypeToFind", ",", "Type", "...", "additionalTypesToFind", ")", "{", "return", "findAllAtOrBelow", "(", "order", ",", "EnumSet", ".", "of", "(", "firstTypeTo...
Find all of the nodes with one of the specified types that are at or below this node. @param order the order to traverse; may not be null @param firstTypeToFind the first type of node to find; may not be null @param additionalTypesToFind the additional types of node to find; may not be null @return the collection of n...
[ "Find", "all", "of", "the", "nodes", "with", "one", "of", "the", "specified", "types", "that", "are", "at", "or", "below", "this", "node", "." ]
train
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/plan/PlanNode.java#L1399-L1403
awslabs/amazon-sqs-java-extended-client-lib
src/main/java/com/amazon/sqs/javamessaging/ExtendedClientConfiguration.java
ExtendedClientConfiguration.setLargePayloadSupportEnabled
public void setLargePayloadSupportEnabled(AmazonS3 s3, String s3BucketName) { """ Enables support for large-payload messages. @param s3 Amazon S3 client which is going to be used for storing large-payload messages. @param s3BucketName Name of the bucket which is going to be used for storing large-payload m...
java
public void setLargePayloadSupportEnabled(AmazonS3 s3, String s3BucketName) { if (s3 == null || s3BucketName == null) { String errorMessage = "S3 client and/or S3 bucket name cannot be null."; LOG.error(errorMessage); throw new AmazonClientException(errorMessage); } if (isLargePayloadSupportEnabled()) { ...
[ "public", "void", "setLargePayloadSupportEnabled", "(", "AmazonS3", "s3", ",", "String", "s3BucketName", ")", "{", "if", "(", "s3", "==", "null", "||", "s3BucketName", "==", "null", ")", "{", "String", "errorMessage", "=", "\"S3 client and/or S3 bucket name cannot b...
Enables support for large-payload messages. @param s3 Amazon S3 client which is going to be used for storing large-payload messages. @param s3BucketName Name of the bucket which is going to be used for storing large-payload messages. The bucket must be already created and configured in s3.
[ "Enables", "support", "for", "large", "-", "payload", "messages", "." ]
train
https://github.com/awslabs/amazon-sqs-java-extended-client-lib/blob/df0c6251b99e682d6179938fe784590e662b84ea/src/main/java/com/amazon/sqs/javamessaging/ExtendedClientConfiguration.java#L64-L77
apache/groovy
src/main/java/org/codehaus/groovy/runtime/powerassert/SourceText.java
SourceText.getNormalizedColumn
public int getNormalizedColumn(int line, int column) { """ Returns the column in <tt>getNormalizedText()</tt> corresponding to the given line and column in the original source text. The first character in the normalized text has column 1. @param line a line number @param column a column number @return the...
java
public int getNormalizedColumn(int line, int column) { int deltaLine = line - firstLine; if (deltaLine < 0 || deltaLine >= lineOffsets.size()) // wrong line information return -1; int deltaColumn = column - lineOffsets.get(deltaLine); if (deltaColumn < 0) // wrong column info...
[ "public", "int", "getNormalizedColumn", "(", "int", "line", ",", "int", "column", ")", "{", "int", "deltaLine", "=", "line", "-", "firstLine", ";", "if", "(", "deltaLine", "<", "0", "||", "deltaLine", ">=", "lineOffsets", ".", "size", "(", ")", ")", "/...
Returns the column in <tt>getNormalizedText()</tt> corresponding to the given line and column in the original source text. The first character in the normalized text has column 1. @param line a line number @param column a column number @return the column in getNormalizedText() corresponding to the given line and col...
[ "Returns", "the", "column", "in", "<tt", ">", "getNormalizedText", "()", "<", "/", "tt", ">", "corresponding", "to", "the", "given", "line", "and", "column", "in", "the", "original", "source", "text", ".", "The", "first", "character", "in", "the", "normali...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/powerassert/SourceText.java#L100-L109
Azure/azure-sdk-for-java
redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java
RedisInner.exportData
public void exportData(String resourceGroupName, String name, ExportRDBParameters parameters) { """ Export data from the redis cache to blobs in a container. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param parameters Parameters for Redis export operatio...
java
public void exportData(String resourceGroupName, String name, ExportRDBParameters parameters) { exportDataWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().body(); }
[ "public", "void", "exportData", "(", "String", "resourceGroupName", ",", "String", "name", ",", "ExportRDBParameters", "parameters", ")", "{", "exportDataWithServiceResponseAsync", "(", "resourceGroupName", ",", "name", ",", "parameters", ")", ".", "toBlocking", "(", ...
Export data from the redis cache to blobs in a container. @param resourceGroupName The name of the resource group. @param name The name of the Redis cache. @param parameters Parameters for Redis export operation. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if...
[ "Export", "data", "from", "the", "redis", "cache", "to", "blobs", "in", "a", "container", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/redis/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/redis/v2017_10_01/implementation/RedisInner.java#L1508-L1510
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/REST.java
REST.setProxy
public void setProxy(String proxyHost, int proxyPort, String username, String password) { """ Set a proxy with authentication for REST-requests. @param proxyHost @param proxyPort @param username @param password """ setProxy(proxyHost, proxyPort); proxyAuth = true; proxyUser = user...
java
public void setProxy(String proxyHost, int proxyPort, String username, String password) { setProxy(proxyHost, proxyPort); proxyAuth = true; proxyUser = username; proxyPassword = password; }
[ "public", "void", "setProxy", "(", "String", "proxyHost", ",", "int", "proxyPort", ",", "String", "username", ",", "String", "password", ")", "{", "setProxy", "(", "proxyHost", ",", "proxyPort", ")", ";", "proxyAuth", "=", "true", ";", "proxyUser", "=", "u...
Set a proxy with authentication for REST-requests. @param proxyHost @param proxyPort @param username @param password
[ "Set", "a", "proxy", "with", "authentication", "for", "REST", "-", "requests", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/REST.java#L119-L124
czyzby/gdx-lml
kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/reflection/Reflection.java
Reflection.newInstance
public static <Type> Type newInstance(final Class<Type> ofClass, final Type defaultValue) { """ Allows to gracefully create a new instance of class, without having to try-catch exceptions. @param ofClass instance of this class will be constructed using reflection. @param defaultValue will be returned if unable...
java
public static <Type> Type newInstance(final Class<Type> ofClass, final Type defaultValue) { try { return ClassReflection.newInstance(ofClass); } catch (final Throwable exception) { Exceptions.ignore(exception); return defaultValue; } }
[ "public", "static", "<", "Type", ">", "Type", "newInstance", "(", "final", "Class", "<", "Type", ">", "ofClass", ",", "final", "Type", "defaultValue", ")", "{", "try", "{", "return", "ClassReflection", ".", "newInstance", "(", "ofClass", ")", ";", "}", "...
Allows to gracefully create a new instance of class, without having to try-catch exceptions. @param ofClass instance of this class will be constructed using reflection. @param defaultValue will be returned if unable to construct new instance. @return a new instance of passed class or default value. @param <Type> type ...
[ "Allows", "to", "gracefully", "create", "a", "new", "instance", "of", "class", "without", "having", "to", "try", "-", "catch", "exceptions", "." ]
train
https://github.com/czyzby/gdx-lml/blob/7623b322e6afe49ad4dd636c80c230150a1cfa4e/kiwi/src/main/java/com/github/czyzby/kiwi/util/gdx/reflection/Reflection.java#L52-L59