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
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSourceSearchDialog.java
CmsSourceSearchDialog.getSolrIndexOptions
private List<CmsSelectWidgetOption> getSolrIndexOptions() { """ Returns select options for all configures Solr Offline indexes.<p> @return select options for all configures Solr Offline indexes """ List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>(); result.add( ...
java
private List<CmsSelectWidgetOption> getSolrIndexOptions() { List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>(); result.add( new CmsSelectWidgetOption(CmsSearchReplaceSettings.VFS, true, CmsSearchReplaceSettings.VFS.toUpperCase())); if (OpenCms.getSearchManag...
[ "private", "List", "<", "CmsSelectWidgetOption", ">", "getSolrIndexOptions", "(", ")", "{", "List", "<", "CmsSelectWidgetOption", ">", "result", "=", "new", "ArrayList", "<", "CmsSelectWidgetOption", ">", "(", ")", ";", "result", ".", "add", "(", "new", "CmsSe...
Returns select options for all configures Solr Offline indexes.<p> @return select options for all configures Solr Offline indexes
[ "Returns", "select", "options", "for", "all", "configures", "Solr", "Offline", "indexes", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/sourcesearch/CmsSourceSearchDialog.java#L288-L301
jhunters/jprotobuf
v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java
MapEntryLite.computeMessageSize
public int computeMessageSize(int fieldNumber, K key, V value) { """ Computes the message size for the provided key and value as though they were wrapped by a {@link MapEntryLite}. This helper method avoids allocation of a {@link MapEntryLite} built with a key and value and is called from generated code directly...
java
public int computeMessageSize(int fieldNumber, K key, V value) { return CodedOutputStream.computeTagSize(fieldNumber) + CodedConstant.computeLengthDelimitedFieldSize(computeSerializedSize(metadata, key, value)); }
[ "public", "int", "computeMessageSize", "(", "int", "fieldNumber", ",", "K", "key", ",", "V", "value", ")", "{", "return", "CodedOutputStream", ".", "computeTagSize", "(", "fieldNumber", ")", "+", "CodedConstant", ".", "computeLengthDelimitedFieldSize", "(", "compu...
Computes the message size for the provided key and value as though they were wrapped by a {@link MapEntryLite}. This helper method avoids allocation of a {@link MapEntryLite} built with a key and value and is called from generated code directly. @param fieldNumber the field number @param key the key @param value the v...
[ "Computes", "the", "message", "size", "for", "the", "provided", "key", "and", "value", "as", "though", "they", "were", "wrapped", "by", "a", "{", "@link", "MapEntryLite", "}", ".", "This", "helper", "method", "avoids", "allocation", "of", "a", "{", "@link"...
train
https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/v3/src/main/java/com/baidu/bjf/remoting/protobuf/MapEntryLite.java#L248-L251
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.createGroup
public CmsGroup createGroup(CmsRequestContext context, String name, String description, int flags, String parent) throws CmsException, CmsRoleViolationException { """ Creates a new user group.<p> @param context the current request context @param name the name of the new group @param description the descri...
java
public CmsGroup createGroup(CmsRequestContext context, String name, String description, int flags, String parent) throws CmsException, CmsRoleViolationException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { checkRole(dbc, CmsRole.A...
[ "public", "CmsGroup", "createGroup", "(", "CmsRequestContext", "context", ",", "String", "name", ",", "String", "description", ",", "int", "flags", ",", "String", "parent", ")", "throws", "CmsException", ",", "CmsRoleViolationException", "{", "CmsDbContext", "dbc", ...
Creates a new user group.<p> @param context the current request context @param name the name of the new group @param description the description for the new group @param flags the flags for the new group @param parent the name of the parent group (or <code>null</code>) @return a <code>{@link CmsGroup}</code> object r...
[ "Creates", "a", "new", "user", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L915-L930
NessComputing/service-discovery
jms/src/main/java/com/nesscomputing/jms/activemq/ServiceDiscoveryTransportFactory.java
ServiceDiscoveryTransportFactory.interceptPropertySetters
private Transport interceptPropertySetters(Transport transport) { """ ActiveMQ expects to reflectively call setX for every property x specified in the connection string. Since we are actually constructing a failover transport, these properties are obviously not expected and ActiveMQ complains that we are specify...
java
private Transport interceptPropertySetters(Transport transport) { final Enhancer e = new Enhancer(); e.setInterfaces(new Class<?>[] {Transport.class, ServiceTransportBeanSetters.class}); final TransportDelegationFilter filter = new TransportDelegationFilter(transport, ServiceTransportBeanSetters...
[ "private", "Transport", "interceptPropertySetters", "(", "Transport", "transport", ")", "{", "final", "Enhancer", "e", "=", "new", "Enhancer", "(", ")", ";", "e", ".", "setInterfaces", "(", "new", "Class", "<", "?", ">", "[", "]", "{", "Transport", ".", ...
ActiveMQ expects to reflectively call setX for every property x specified in the connection string. Since we are actually constructing a failover transport, these properties are obviously not expected and ActiveMQ complains that we are specifying invalid parameters. So create a CGLIB proxy that intercepts and ignores ...
[ "ActiveMQ", "expects", "to", "reflectively", "call", "setX", "for", "every", "property", "x", "specified", "in", "the", "connection", "string", ".", "Since", "we", "are", "actually", "constructing", "a", "failover", "transport", "these", "properties", "are", "ob...
train
https://github.com/NessComputing/service-discovery/blob/5091ffdb1de6b12d216d1c238f72858037c7b765/jms/src/main/java/com/nesscomputing/jms/activemq/ServiceDiscoveryTransportFactory.java#L183-L190
netty/netty
buffer/src/main/java/io/netty/buffer/ByteBufUtil.java
ByteBufUtil.appendPrettyHexDump
public static void appendPrettyHexDump(StringBuilder dump, ByteBuf buf) { """ Appends the prettified multi-line hexadecimal dump of the specified {@link ByteBuf} to the specified {@link StringBuilder} that is easy to read by humans. """ appendPrettyHexDump(dump, buf, buf.readerIndex(), buf.readableByt...
java
public static void appendPrettyHexDump(StringBuilder dump, ByteBuf buf) { appendPrettyHexDump(dump, buf, buf.readerIndex(), buf.readableBytes()); }
[ "public", "static", "void", "appendPrettyHexDump", "(", "StringBuilder", "dump", ",", "ByteBuf", "buf", ")", "{", "appendPrettyHexDump", "(", "dump", ",", "buf", ",", "buf", ".", "readerIndex", "(", ")", ",", "buf", ".", "readableBytes", "(", ")", ")", ";"...
Appends the prettified multi-line hexadecimal dump of the specified {@link ByteBuf} to the specified {@link StringBuilder} that is easy to read by humans.
[ "Appends", "the", "prettified", "multi", "-", "line", "hexadecimal", "dump", "of", "the", "specified", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/buffer/src/main/java/io/netty/buffer/ByteBufUtil.java#L926-L928
dita-ot/dita-ot
src/main/java/org/dita/dost/module/KeyrefModule.java
KeyrefModule.processTopic
private ResolveTask processTopic(final FileInfo f, final KeyScope scope, final boolean isResourceOnly) { """ Determine how topic is processed for key reference processing. @return key reference processing """ final int increment = isResourceOnly ? 0 : 1; final Integer used = usage.containsKe...
java
private ResolveTask processTopic(final FileInfo f, final KeyScope scope, final boolean isResourceOnly) { final int increment = isResourceOnly ? 0 : 1; final Integer used = usage.containsKey(f.uri) ? usage.get(f.uri) + increment : increment; usage.put(f.uri, used); if (used > 1) { ...
[ "private", "ResolveTask", "processTopic", "(", "final", "FileInfo", "f", ",", "final", "KeyScope", "scope", ",", "final", "boolean", "isResourceOnly", ")", "{", "final", "int", "increment", "=", "isResourceOnly", "?", "0", ":", "1", ";", "final", "Integer", ...
Determine how topic is processed for key reference processing. @return key reference processing
[ "Determine", "how", "topic", "is", "processed", "for", "key", "reference", "processing", "." ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/KeyrefModule.java#L316-L334
undera/jmeter-plugins
infra/common/src/main/java/kg/apc/jmeter/gui/ComponentBorder.java
ComponentBorder.determineInsetsAndAlignment
private void determineInsetsAndAlignment() { """ The insets need to be determined so they are included in the preferred size of the component the Border is attached to. The alignment of the component is determined here so it doesn't need to be recalculated every time the Border is painted. """ bor...
java
private void determineInsetsAndAlignment() { borderInsets = new Insets(0, 0, 0, 0); // The insets will only be updated for the edge the component will be // diplayed on. // // The X, Y alignment of the component is controlled by both the edge // and alignment paramet...
[ "private", "void", "determineInsetsAndAlignment", "(", ")", "{", "borderInsets", "=", "new", "Insets", "(", "0", ",", "0", ",", "0", ",", "0", ")", ";", "// The insets will only be updated for the edge the component will be", "// diplayed on.", "//", "// The X, Y ali...
The insets need to be determined so they are included in the preferred size of the component the Border is attached to. The alignment of the component is determined here so it doesn't need to be recalculated every time the Border is painted.
[ "The", "insets", "need", "to", "be", "determined", "so", "they", "are", "included", "in", "the", "preferred", "size", "of", "the", "component", "the", "Border", "is", "attached", "to", "." ]
train
https://github.com/undera/jmeter-plugins/blob/416d2a77249ab921c7e4134c3e6a9639901ef7e8/infra/common/src/main/java/kg/apc/jmeter/gui/ComponentBorder.java#L201-L231
landawn/AbacusUtil
src/com/landawn/abacus/android/util/SQLiteExecutor.java
SQLiteExecutor.gett
public <T> T gett(Class<T> targetClass, long id, Collection<String> selectPropNames) throws DuplicatedResultException { """ Find the entity from table specified by simple class name of the <code>targetClass</code> by the specified <code>id</code> @param targetClass @param id @param selectPropNames @return @...
java
public <T> T gett(Class<T> targetClass, long id, Collection<String> selectPropNames) throws DuplicatedResultException { final Condition whereClause = L.eq(ID, id); final List<T> entities = list(targetClass, selectPropNames, whereClause, null, 0, 2); if (entities.size() > 1) { t...
[ "public", "<", "T", ">", "T", "gett", "(", "Class", "<", "T", ">", "targetClass", ",", "long", "id", ",", "Collection", "<", "String", ">", "selectPropNames", ")", "throws", "DuplicatedResultException", "{", "final", "Condition", "whereClause", "=", "L", "...
Find the entity from table specified by simple class name of the <code>targetClass</code> by the specified <code>id</code> @param targetClass @param id @param selectPropNames @return @throws DuplicatedResultException if more than one records are found.
[ "Find", "the", "entity", "from", "table", "specified", "by", "simple", "class", "name", "of", "the", "<code", ">", "targetClass<", "/", "code", ">", "by", "the", "specified", "<code", ">", "id<", "/", "code", ">" ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/android/util/SQLiteExecutor.java#L530-L539
sahan/IckleBot
icklebot/src/main/java/com/lonepulse/icklebot/util/PermissionUtils.java
PermissionUtils.areAnyGranted
public static boolean areAnyGranted(Object context, Set<String> permissions) { """ <p>Takes a set of permissions and determines if one or more of them are granted.</p> <p>Use {@link Manifest.permission} to reference permission constants.</p> @param context the permissible {@link Context} @param permissio...
java
public static boolean areAnyGranted(Object context, Set<String> permissions) { for (String permission : permissions) { if(ContextUtils.discover(context) .checkCallingOrSelfPermission(permission) == PackageManager.PERMISSION_GRANTED) { return true; } } return false; }
[ "public", "static", "boolean", "areAnyGranted", "(", "Object", "context", ",", "Set", "<", "String", ">", "permissions", ")", "{", "for", "(", "String", "permission", ":", "permissions", ")", "{", "if", "(", "ContextUtils", ".", "discover", "(", "context", ...
<p>Takes a set of permissions and determines if one or more of them are granted.</p> <p>Use {@link Manifest.permission} to reference permission constants.</p> @param context the permissible {@link Context} @param permissions the set of {@link permission}s to test @return {@code true} if any of the permissions are g...
[ "<p", ">", "Takes", "a", "set", "of", "permissions", "and", "determines", "if", "one", "or", "more", "of", "them", "are", "granted", ".", "<", "/", "p", ">" ]
train
https://github.com/sahan/IckleBot/blob/a19003ceb3ad7c7ee508dc23a8cb31b5676aa499/icklebot/src/main/java/com/lonepulse/icklebot/util/PermissionUtils.java#L91-L103
find-sec-bugs/find-sec-bugs
findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/taintanalysis/TaintAnalysis.java
TaintAnalysis.computeParametersInfo
private void computeParametersInfo(String signature, boolean isStatic) { """ Compute two values: <li>The number of values required on the stack for a specific call.</li> <li>The parameter association with each slot.</li> <hr/> For exemple : "(I[Ljava/lang/String;Ljava/lang/Object;)V" => void a(Integer, St...
java
private void computeParametersInfo(String signature, boolean isStatic) { assert signature != null && !signature.isEmpty(); // static methods does not have reference to this int stackSize = isStatic ? 0 : 1; GenericSignatureParser parser = new GenericSignatureParser(signature); It...
[ "private", "void", "computeParametersInfo", "(", "String", "signature", ",", "boolean", "isStatic", ")", "{", "assert", "signature", "!=", "null", "&&", "!", "signature", ".", "isEmpty", "(", ")", ";", "// static methods does not have reference to this", "int", "sta...
Compute two values: <li>The number of values required on the stack for a specific call.</li> <li>The parameter association with each slot.</li> <hr/> For exemple : "(I[Ljava/lang/String;Ljava/lang/Object;)V" => void a(Integer, String, Object)<br/><br/> Expected Stack prior the method invocation :<br/> <pre> +-------...
[ "Compute", "two", "values", ":", "<li", ">", "The", "number", "of", "values", "required", "on", "the", "stack", "for", "a", "specific", "call", ".", "<", "/", "li", ">", "<li", ">", "The", "parameter", "association", "with", "each", "slot", ".", "<", ...
train
https://github.com/find-sec-bugs/find-sec-bugs/blob/362da013cef4925e6a1506dd3511fe5bdcc5fba3/findsecbugs-plugin/src/main/java/com/h3xstream/findsecbugs/taintanalysis/TaintAnalysis.java#L239-L261
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Project.java
Project.createIteration
public Iteration createIteration(String name, DateTime beginDate, DateTime endDate) { """ Create a new Iteration in the Project where the schedule is defined. @param name The initial name of the Iteration. @param beginDate The begin date of the Iteration. @param endDate The end date of the Iteration. ...
java
public Iteration createIteration(String name, DateTime beginDate, DateTime endDate) { return getInstance().create().iteration(name, getSchedule(), beginDate, endDate); }
[ "public", "Iteration", "createIteration", "(", "String", "name", ",", "DateTime", "beginDate", ",", "DateTime", "endDate", ")", "{", "return", "getInstance", "(", ")", ".", "create", "(", ")", ".", "iteration", "(", "name", ",", "getSchedule", "(", ")", ",...
Create a new Iteration in the Project where the schedule is defined. @param name The initial name of the Iteration. @param beginDate The begin date of the Iteration. @param endDate The end date of the Iteration. @return A new Iteration.
[ "Create", "a", "new", "Iteration", "in", "the", "Project", "where", "the", "schedule", "is", "defined", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Project.java#L368-L370
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarAstronomer.java
CalendarAstronomer.getSunTime
public long getSunTime(double desired, boolean next) { """ Find the next time at which the sun's ecliptic longitude will have the desired value. @hide draft / provisional / internal are hidden on Android """ return timeOfAngle( new AngleFunc() { @Override public double eval() { return getSunL...
java
public long getSunTime(double desired, boolean next) { return timeOfAngle( new AngleFunc() { @Override public double eval() { return getSunLongitude(); } }, desired, TROPICAL_YEAR, MINUTE_MS, ...
[ "public", "long", "getSunTime", "(", "double", "desired", ",", "boolean", "next", ")", "{", "return", "timeOfAngle", "(", "new", "AngleFunc", "(", ")", "{", "@", "Override", "public", "double", "eval", "(", ")", "{", "return", "getSunLongitude", "(", ")", ...
Find the next time at which the sun's ecliptic longitude will have the desired value. @hide draft / provisional / internal are hidden on Android
[ "Find", "the", "next", "time", "at", "which", "the", "sun", "s", "ecliptic", "longitude", "will", "have", "the", "desired", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/CalendarAstronomer.java#L662-L670
knowm/XChart
xchart/src/main/java/org/knowm/xchart/QuickChart.java
QuickChart.getChart
public static XYChart getChart( String chartTitle, String xTitle, String yTitle, String seriesName, List<? extends Number> xData, List<? extends Number> yData) { """ Creates a Chart with default style @param chartTitle the Chart title @param xTitle The X-Axis title @param y...
java
public static XYChart getChart( String chartTitle, String xTitle, String yTitle, String seriesName, List<? extends Number> xData, List<? extends Number> yData) { // Create Chart XYChart chart = new XYChart(WIDTH, HEIGHT); // Customize Chart chart.setTitle(chartTitle...
[ "public", "static", "XYChart", "getChart", "(", "String", "chartTitle", ",", "String", "xTitle", ",", "String", "yTitle", ",", "String", "seriesName", ",", "List", "<", "?", "extends", "Number", ">", "xData", ",", "List", "<", "?", "extends", "Number", ">"...
Creates a Chart with default style @param chartTitle the Chart title @param xTitle The X-Axis title @param yTitle The Y-Axis title @param seriesName The name of the series @param xData A Collection containing the X-Axis data @param yData A Collection containing Y-Axis data @return a Chart Object
[ "Creates", "a", "Chart", "with", "default", "style" ]
train
https://github.com/knowm/XChart/blob/677a105753a855edf24782fab1bf1f5aec3e642b/xchart/src/main/java/org/knowm/xchart/QuickChart.java#L98-L118
google/closure-compiler
src/com/google/javascript/jscomp/JSError.java
JSError.make
public static JSError make(String sourceName, int lineno, int charno, DiagnosticType type, String... arguments) { """ Creates a JSError at a given source location @param sourceName The source file name @param lineno Line number with source file, or -1 if unknown @param charno Colu...
java
public static JSError make(String sourceName, int lineno, int charno, DiagnosticType type, String... arguments) { return new JSError(sourceName, null, lineno, charno, type, null, arguments); }
[ "public", "static", "JSError", "make", "(", "String", "sourceName", ",", "int", "lineno", ",", "int", "charno", ",", "DiagnosticType", "type", ",", "String", "...", "arguments", ")", "{", "return", "new", "JSError", "(", "sourceName", ",", "null", ",", "li...
Creates a JSError at a given source location @param sourceName The source file name @param lineno Line number with source file, or -1 if unknown @param charno Column number within line, or -1 for whole line. @param type The DiagnosticType @param arguments Arguments to be incorporated into the message
[ "Creates", "a", "JSError", "at", "a", "given", "source", "location" ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/JSError.java#L92-L95
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/cmp/cmppolicylabel_binding.java
cmppolicylabel_binding.get
public static cmppolicylabel_binding get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch cmppolicylabel_binding resource of given name . """ cmppolicylabel_binding obj = new cmppolicylabel_binding(); obj.set_labelname(labelname); cmppolicylabel_binding response = (cm...
java
public static cmppolicylabel_binding get(nitro_service service, String labelname) throws Exception{ cmppolicylabel_binding obj = new cmppolicylabel_binding(); obj.set_labelname(labelname); cmppolicylabel_binding response = (cmppolicylabel_binding) obj.get_resource(service); return response; }
[ "public", "static", "cmppolicylabel_binding", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "cmppolicylabel_binding", "obj", "=", "new", "cmppolicylabel_binding", "(", ")", ";", "obj", ".", "set_labelname", "(",...
Use this API to fetch cmppolicylabel_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "cmppolicylabel_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cmp/cmppolicylabel_binding.java#L114-L119
mapsforge/mapsforge
mapsforge-core/src/main/java/org/mapsforge/core/util/LatLongUtils.java
LatLongUtils.nearestSegmentPoint
public static Point nearestSegmentPoint(double startX, double startY, double endX, double endY, double pointX, double pointY) { """ Returns a point on the segment nearest to the specified point. <p> libGDX (Apache 2.0) """ double xDiff = endX - startX; double yDiff = endY - startY; do...
java
public static Point nearestSegmentPoint(double startX, double startY, double endX, double endY, double pointX, double pointY) { double xDiff = endX - startX; double yDiff = endY - startY; double length2 = xDiff * xDiff + yDiff * yDiff; if (length2 == 0) return new Point(startX, startY); ...
[ "public", "static", "Point", "nearestSegmentPoint", "(", "double", "startX", ",", "double", "startY", ",", "double", "endX", ",", "double", "endY", ",", "double", "pointX", ",", "double", "pointY", ")", "{", "double", "xDiff", "=", "endX", "-", "startX", "...
Returns a point on the segment nearest to the specified point. <p> libGDX (Apache 2.0)
[ "Returns", "a", "point", "on", "the", "segment", "nearest", "to", "the", "specified", "point", ".", "<p", ">", "libGDX", "(", "Apache", "2", ".", "0", ")" ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-core/src/main/java/org/mapsforge/core/util/LatLongUtils.java#L230-L239
GenesysPureEngage/authentication-client-java
src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java
AuthenticationApi.changePassword
public ModelApiResponse changePassword(ApiRequestChangePasswordOperation request, String authorization) throws ApiException { """ Change password Change the user&#39;s password. @param request request (required) @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/refer...
java
public ModelApiResponse changePassword(ApiRequestChangePasswordOperation request, String authorization) throws ApiException { ApiResponse<ModelApiResponse> resp = changePasswordWithHttpInfo(request, authorization); return resp.getData(); }
[ "public", "ModelApiResponse", "changePassword", "(", "ApiRequestChangePasswordOperation", "request", ",", "String", "authorization", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ModelApiResponse", ">", "resp", "=", "changePasswordWithHttpInfo", "(", "request", ...
Change password Change the user&#39;s password. @param request request (required) @param authorization The OAuth 2 bearer access token you received from [/auth/v3/oauth/token](/reference/authentication/Authentication/index.html#retrieveToken). For example: \&quot;Authorization: bearer a4b5da75-a584-4053-9227-0f0ab23ff0...
[ "Change", "password", "Change", "the", "user&#39", ";", "s", "password", "." ]
train
https://github.com/GenesysPureEngage/authentication-client-java/blob/eb0d58343ee42ebd3c037163c1137f611dfcbb3a/src/main/java/com/genesys/internal/authentication/api/AuthenticationApi.java#L297-L300
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/util/ValidationObjUtil.java
ValidationObjUtil.objDeepCopy
public static Object objDeepCopy(Object from, Object to, String... copyFields) { """ Obj deep copy object. @param from the from @param to the to @param copyFields the copy fields @return the object """ if (from == null || to == null) { log.error("object deep copy from or...
java
public static Object objDeepCopy(Object from, Object to, String... copyFields) { if (from == null || to == null) { log.error("object deep copy from or to is null "); return to; } for (String field : copyFields) { copyFromTo(from, to, field); } ...
[ "public", "static", "Object", "objDeepCopy", "(", "Object", "from", ",", "Object", "to", ",", "String", "...", "copyFields", ")", "{", "if", "(", "from", "==", "null", "||", "to", "==", "null", ")", "{", "log", ".", "error", "(", "\"object deep copy from...
Obj deep copy object. @param from the from @param to the to @param copyFields the copy fields @return the object
[ "Obj", "deep", "copy", "object", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/util/ValidationObjUtil.java#L338-L349
aws/aws-sdk-java
aws-java-sdk-appstream/src/main/java/com/amazonaws/services/appstream/model/CreateFleetRequest.java
CreateFleetRequest.withTags
public CreateFleetRequest withTags(java.util.Map<String, String> tags) { """ <p> The tags to associate with the fleet. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=. </p> <p> If you do not specify a value, the value is set to a...
java
public CreateFleetRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateFleetRequest", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The tags to associate with the fleet. A tag is a key-value pair, and the value is optional. For example, Environment=Test. If you do not specify a value, Environment=. </p> <p> If you do not specify a value, the value is set to an empty string. </p> <p> For more information, see <a href="https://docs.aws.amazon.com...
[ "<p", ">", "The", "tags", "to", "associate", "with", "the", "fleet", ".", "A", "tag", "is", "a", "key", "-", "value", "pair", "and", "the", "value", "is", "optional", ".", "For", "example", "Environment", "=", "Test", ".", "If", "you", "do", "not", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-appstream/src/main/java/com/amazonaws/services/appstream/model/CreateFleetRequest.java#L1635-L1638
geomajas/geomajas-project-client-gwt2
impl/src/main/java/org/geomajas/gwt2/client/map/ViewPortImpl.java
ViewPortImpl.initialize
protected void initialize(MapConfiguration configuration) { """ Copy {@link MapConfiguration} information. Specifically, copy or calculate the list of available resolutions. This resolution list will not change after initialization. @param configuration map configuration object """ this.configuration = c...
java
protected void initialize(MapConfiguration configuration) { this.configuration = configuration; this.crs = configuration.getCrs(); // Calculate maximum bounds: this.maxBounds = new Bbox(configuration.getMaxBounds().getX(), configuration.getMaxBounds().getY(), configuration.getMaxBounds().getWidth(), config...
[ "protected", "void", "initialize", "(", "MapConfiguration", "configuration", ")", "{", "this", ".", "configuration", "=", "configuration", ";", "this", ".", "crs", "=", "configuration", ".", "getCrs", "(", ")", ";", "// Calculate maximum bounds:", "this", ".", "...
Copy {@link MapConfiguration} information. Specifically, copy or calculate the list of available resolutions. This resolution list will not change after initialization. @param configuration map configuration object
[ "Copy", "{", "@link", "MapConfiguration", "}", "information", ".", "Specifically", "copy", "or", "calculate", "the", "list", "of", "available", "resolutions", ".", "This", "resolution", "list", "will", "not", "change", "after", "initialization", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/impl/src/main/java/org/geomajas/gwt2/client/map/ViewPortImpl.java#L101-L137
mikereedell/sunrisesunsetlib-java
src/main/java/com/luckycatlabs/sunrisesunset/calculator/SolarEventCalculator.java
SolarEventCalculator.computeSunsetTime
public String computeSunsetTime(Zenith solarZenith, Calendar date) { """ Computes the sunset time for the given zenith at the given date. @param solarZenith <code>Zenith</code> enum corresponding to the type of sunset to compute. @param date <code>Calendar</code> object representing the date to compute the s...
java
public String computeSunsetTime(Zenith solarZenith, Calendar date) { return getLocalTimeAsString(computeSolarEventTime(solarZenith, date, false)); }
[ "public", "String", "computeSunsetTime", "(", "Zenith", "solarZenith", ",", "Calendar", "date", ")", "{", "return", "getLocalTimeAsString", "(", "computeSolarEventTime", "(", "solarZenith", ",", "date", ",", "false", ")", ")", ";", "}" ]
Computes the sunset time for the given zenith at the given date. @param solarZenith <code>Zenith</code> enum corresponding to the type of sunset to compute. @param date <code>Calendar</code> object representing the date to compute the sunset for. @return the sunset time, in HH:MM format (24-hour clock), 00:00 if the s...
[ "Computes", "the", "sunset", "time", "for", "the", "given", "zenith", "at", "the", "given", "date", "." ]
train
https://github.com/mikereedell/sunrisesunsetlib-java/blob/6e6de23f1d11429eef58de2541582cbde9b85b92/src/main/java/com/luckycatlabs/sunrisesunset/calculator/SolarEventCalculator.java#L99-L101
actorapp/actor-platform
actor-server/actor-frontend/src/main/java/im/actor/crypto/primitives/curve25519/fe_add.java
fe_add.fe_add
public static void fe_add(int[] h,int[] f,int[] g) { """ /* h = f + g Can overlap h with f or g. Preconditions: |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. Postconditions: |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. """ ...
java
public static void fe_add(int[] h,int[] f,int[] g) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; int g0 = g[0]; int g1 = g[1]; int g2 = g[2]; int g3 = g[3]; int g4 = g[4]; int g5 = g...
[ "public", "static", "void", "fe_add", "(", "int", "[", "]", "h", ",", "int", "[", "]", "f", ",", "int", "[", "]", "g", ")", "{", "int", "f0", "=", "f", "[", "0", "]", ";", "int", "f1", "=", "f", "[", "1", "]", ";", "int", "f2", "=", "f"...
/* h = f + g Can overlap h with f or g. Preconditions: |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. Postconditions: |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
[ "/", "*", "h", "=", "f", "+", "g", "Can", "overlap", "h", "with", "f", "or", "g", "." ]
train
https://github.com/actorapp/actor-platform/blob/5123c1584757c6eeea0ed2a0e7e043629871a0c6/actor-server/actor-frontend/src/main/java/im/actor/crypto/primitives/curve25519/fe_add.java#L19-L61
Nordstrom/JUnit-Foundation
src/main/java/com/nordstrom/automation/junit/RunReflectiveCall.java
RunReflectiveCall.fireBeforeInvocation
private static boolean fireBeforeInvocation(Object runner, Object target, FrameworkMethod method, Object... params) { """ Fire the {@link MethodWatcher#beforeInvocation(Object, Object, FrameworkMethod, Object...) event. <p> If the {@code beforeInvocation} event for the specified method has already been fired, do...
java
private static boolean fireBeforeInvocation(Object runner, Object target, FrameworkMethod method, Object... params) { if ((runner != null) && (method != null)) { DepthGauge depthGauge = LifecycleHooks.computeIfAbsent(methodDepth.get(), methodHash(runner, method), newInstance); if (0 =...
[ "private", "static", "boolean", "fireBeforeInvocation", "(", "Object", "runner", ",", "Object", "target", ",", "FrameworkMethod", "method", ",", "Object", "...", "params", ")", "{", "if", "(", "(", "runner", "!=", "null", ")", "&&", "(", "method", "!=", "n...
Fire the {@link MethodWatcher#beforeInvocation(Object, Object, FrameworkMethod, Object...) event. <p> If the {@code beforeInvocation} event for the specified method has already been fired, do nothing. @param runner JUnit test runner @param target "enhanced" object upon which the method was invoked @param method {@link...
[ "Fire", "the", "{", "@link", "MethodWatcher#beforeInvocation", "(", "Object", "Object", "FrameworkMethod", "Object", "...", ")", "event", ".", "<p", ">", "If", "the", "{", "@code", "beforeInvocation", "}", "event", "for", "the", "specified", "method", "has", "...
train
https://github.com/Nordstrom/JUnit-Foundation/blob/f24d91f8677d262c27d18ef29ed633eaac717be5/src/main/java/com/nordstrom/automation/junit/RunReflectiveCall.java#L163-L179
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java
PixelMath.boundImage
public static void boundImage( GrayS32 img , int min , int max ) { """ Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value. """ ImplPixelMath.boundImage(img,min,max); }
java
public static void boundImage( GrayS32 img , int min , int max ) { ImplPixelMath.boundImage(img,min,max); }
[ "public", "static", "void", "boundImage", "(", "GrayS32", "img", ",", "int", "min", ",", "int", "max", ")", "{", "ImplPixelMath", ".", "boundImage", "(", "img", ",", "min", ",", "max", ")", ";", "}" ]
Bounds image pixels to be between these two values @param img Image @param min minimum value. @param max maximum value.
[ "Bounds", "image", "pixels", "to", "be", "between", "these", "two", "values" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java#L4422-L4424
mozilla/rhino
src/org/mozilla/javascript/ScriptableObject.java
ScriptableObject.setAttributes
public void setAttributes(String name, int attributes) { """ Set the attributes of a named property. The property is specified by <code>name</code> as defined for <code>has</code>.<p> The possible attributes are READONLY, DONTENUM, and PERMANENT. Combinations of attributes are expressed by the bitwise OR ...
java
public void setAttributes(String name, int attributes) { checkNotSealed(name, 0); findAttributeSlot(name, 0, SlotAccess.MODIFY).setAttributes(attributes); }
[ "public", "void", "setAttributes", "(", "String", "name", ",", "int", "attributes", ")", "{", "checkNotSealed", "(", "name", ",", "0", ")", ";", "findAttributeSlot", "(", "name", ",", "0", ",", "SlotAccess", ".", "MODIFY", ")", ".", "setAttributes", "(", ...
Set the attributes of a named property. The property is specified by <code>name</code> as defined for <code>has</code>.<p> The possible attributes are READONLY, DONTENUM, and PERMANENT. Combinations of attributes are expressed by the bitwise OR of attributes. EMPTY is the state of no attributes set. Any unused bits a...
[ "Set", "the", "attributes", "of", "a", "named", "property", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/ScriptableObject.java#L775-L779
Twitter4J/Twitter4J
twitter4j-core/src/internal-http/java/twitter4j/HttpClientImpl.java
HttpClientImpl.setHeaders
private void setHeaders(HttpRequest req, HttpURLConnection connection) { """ sets HTTP headers @param req The request @param connection HttpURLConnection """ if (logger.isDebugEnabled()) { logger.debug("Request: "); logger.debug(req.getMethod().name() + " ", req.getUR...
java
private void setHeaders(HttpRequest req, HttpURLConnection connection) { if (logger.isDebugEnabled()) { logger.debug("Request: "); logger.debug(req.getMethod().name() + " ", req.getURL()); } String authorizationHeader; if (req.getAuthorization() != null && (autho...
[ "private", "void", "setHeaders", "(", "HttpRequest", "req", ",", "HttpURLConnection", "connection", ")", "{", "if", "(", "logger", ".", "isDebugEnabled", "(", ")", ")", "{", "logger", ".", "debug", "(", "\"Request: \"", ")", ";", "logger", ".", "debug", "(...
sets HTTP headers @param req The request @param connection HttpURLConnection
[ "sets", "HTTP", "headers" ]
train
https://github.com/Twitter4J/Twitter4J/blob/8376fade8d557896bb9319fb46e39a55b134b166/twitter4j-core/src/internal-http/java/twitter4j/HttpClientImpl.java#L207-L226
bazaarvoice/emodb
web/src/main/java/com/bazaarvoice/emodb/web/scanner/control/DistributedScanRangeMonitor.java
DistributedScanRangeMonitor.unclaimTask
private void unclaimTask(ClaimedTask claimedTask, boolean releaseTask) { """ Unclaims a previously claimed task. Effectively this stops the renewing the task and, if releaseTask is true, removes the task permanently from the workflow queue. """ _claimedTasks.remove(claimedTask.getTaskId()); c...
java
private void unclaimTask(ClaimedTask claimedTask, boolean releaseTask) { _claimedTasks.remove(claimedTask.getTaskId()); claimedTask.setComplete(true); if (releaseTask) { try { _scanWorkflow.releaseScanRangeTask(claimedTask.getTask()); _log.info("Relea...
[ "private", "void", "unclaimTask", "(", "ClaimedTask", "claimedTask", ",", "boolean", "releaseTask", ")", "{", "_claimedTasks", ".", "remove", "(", "claimedTask", ".", "getTaskId", "(", ")", ")", ";", "claimedTask", ".", "setComplete", "(", "true", ")", ";", ...
Unclaims a previously claimed task. Effectively this stops the renewing the task and, if releaseTask is true, removes the task permanently from the workflow queue.
[ "Unclaims", "a", "previously", "claimed", "task", ".", "Effectively", "this", "stops", "the", "renewing", "the", "task", "and", "if", "releaseTask", "is", "true", "removes", "the", "task", "permanently", "from", "the", "workflow", "queue", "." ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/web/src/main/java/com/bazaarvoice/emodb/web/scanner/control/DistributedScanRangeMonitor.java#L257-L269
structr/structr
structr-ui/src/main/java/org/structr/files/cmis/AbstractStructrCmisService.java
AbstractStructrCmisService.typeFromObjectTypeId
public Class typeFromObjectTypeId(final String objectTypeId, final BaseTypeId defaultType, final Class defaultClass) { """ Returns the Structr type for the given objectTypeId, or the defaultClass of the objectTypeId matches the given baseTypeId. @param objectTypeId @param defaultType @param defaultClass @...
java
public Class typeFromObjectTypeId(final String objectTypeId, final BaseTypeId defaultType, final Class defaultClass) { // default for cmuis:folder if (defaultType.value().equals(objectTypeId)) { return defaultClass; } return StructrApp.getConfiguration().getNodeEntityClass(objectTypeId); }
[ "public", "Class", "typeFromObjectTypeId", "(", "final", "String", "objectTypeId", ",", "final", "BaseTypeId", "defaultType", ",", "final", "Class", "defaultClass", ")", "{", "// default for cmuis:folder", "if", "(", "defaultType", ".", "value", "(", ")", ".", "eq...
Returns the Structr type for the given objectTypeId, or the defaultClass of the objectTypeId matches the given baseTypeId. @param objectTypeId @param defaultType @param defaultClass @return a Structr type
[ "Returns", "the", "Structr", "type", "for", "the", "given", "objectTypeId", "or", "the", "defaultClass", "of", "the", "objectTypeId", "matches", "the", "given", "baseTypeId", "." ]
train
https://github.com/structr/structr/blob/c111a1d0c0201c7fea5574ed69aa5a5053185a97/structr-ui/src/main/java/org/structr/files/cmis/AbstractStructrCmisService.java#L135-L143
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/io/file/PathHelper.java
PathHelper.getDirectoryContent
@Nonnull @ReturnsMutableCopy public static ICommonsList <Path> getDirectoryContent (@Nonnull final Path aDirectory, @Nullable final Predicate <? super Path> aPathFilter) { """ This is a replacement for <code>Path.listFiles(FilenameFilter)</code> doing s...
java
@Nonnull @ReturnsMutableCopy public static ICommonsList <Path> getDirectoryContent (@Nonnull final Path aDirectory, @Nullable final Predicate <? super Path> aPathFilter) { ValueEnforcer.notNull (aDirectory, "Directory"); return _getDirectoryContent...
[ "@", "Nonnull", "@", "ReturnsMutableCopy", "public", "static", "ICommonsList", "<", "Path", ">", "getDirectoryContent", "(", "@", "Nonnull", "final", "Path", "aDirectory", ",", "@", "Nullable", "final", "Predicate", "<", "?", "super", "Path", ">", "aPathFilter",...
This is a replacement for <code>Path.listFiles(FilenameFilter)</code> doing some additional checks on permissions. The order of the returned files is undefined. "." and ".." are not contained. @param aDirectory The directory to be listed. May not be <code>null</code>. @param aPathFilter The path filter to be used. May...
[ "This", "is", "a", "replacement", "for", "<code", ">", "Path", ".", "listFiles", "(", "FilenameFilter", ")", "<", "/", "code", ">", "doing", "some", "additional", "checks", "on", "permissions", ".", "The", "order", "of", "the", "returned", "files", "is", ...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/io/file/PathHelper.java#L675-L683
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java
MLEDependencyGrammar.expandArg
private void expandArg(IntDependency dependency, short valBinDist, double count) { """ Collect counts for a non-STOP dependent. The dependency arg is still in the full tag space. @param dependency A non-stop dependency @param valBinDist A binned distance @param count The weight with which to add this depende...
java
private void expandArg(IntDependency dependency, short valBinDist, double count) { IntTaggedWord headT = getCachedITW(dependency.head.tag); IntTaggedWord argT = getCachedITW(dependency.arg.tag); IntTaggedWord head = new IntTaggedWord(dependency.head.word, tagBin(dependency.head.tag)); //dependency.head; ...
[ "private", "void", "expandArg", "(", "IntDependency", "dependency", ",", "short", "valBinDist", ",", "double", "count", ")", "{", "IntTaggedWord", "headT", "=", "getCachedITW", "(", "dependency", ".", "head", ".", "tag", ")", ";", "IntTaggedWord", "argT", "=",...
Collect counts for a non-STOP dependent. The dependency arg is still in the full tag space. @param dependency A non-stop dependency @param valBinDist A binned distance @param count The weight with which to add this dependency
[ "Collect", "counts", "for", "a", "non", "-", "STOP", "dependent", ".", "The", "dependency", "arg", "is", "still", "in", "the", "full", "tag", "space", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/parser/lexparser/MLEDependencyGrammar.java#L432-L473
jbundle/jbundle
base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseGridScreen.java
XBaseGridScreen.printStartRecordGridData
public void printStartRecordGridData(PrintWriter out, int iPrintOptions) { """ Display the start grid in input format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception. """ out.println(Utility.startTag(XMLTags.DETAIL));...
java
public void printStartRecordGridData(PrintWriter out, int iPrintOptions) { out.println(Utility.startTag(XMLTags.DETAIL)); out.println(Utility.startTag(XMLTags.FILE)); }
[ "public", "void", "printStartRecordGridData", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ")", "{", "out", ".", "println", "(", "Utility", ".", "startTag", "(", "XMLTags", ".", "DETAIL", ")", ")", ";", "out", ".", "println", "(", "Utility", "."...
Display the start grid in input format. @return true if default params were found for this form. @param out The http output stream. @exception DBException File exception.
[ "Display", "the", "start", "grid", "in", "input", "format", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XBaseGridScreen.java#L185-L189
appium/java-client
src/main/java/io/appium/java_client/TouchAction.java
TouchAction.longPress
public T longPress(PointOption longPressOptions) { """ Press and hold the at the center of an element until the context menu event has fired. @param longPressOptions see {@link PointOption} and {@link ElementOption}. @return this TouchAction, for chaining. """ ActionParameter action = new ActionPar...
java
public T longPress(PointOption longPressOptions) { ActionParameter action = new ActionParameter("longPress", longPressOptions); parameterBuilder.add(action); //noinspection unchecked return (T) this; }
[ "public", "T", "longPress", "(", "PointOption", "longPressOptions", ")", "{", "ActionParameter", "action", "=", "new", "ActionParameter", "(", "\"longPress\"", ",", "longPressOptions", ")", ";", "parameterBuilder", ".", "add", "(", "action", ")", ";", "//noinspect...
Press and hold the at the center of an element until the context menu event has fired. @param longPressOptions see {@link PointOption} and {@link ElementOption}. @return this TouchAction, for chaining.
[ "Press", "and", "hold", "the", "at", "the", "center", "of", "an", "element", "until", "the", "context", "menu", "event", "has", "fired", "." ]
train
https://github.com/appium/java-client/blob/5a17759b05d6fda8ef425b3ab6e766c73ed2e8df/src/main/java/io/appium/java_client/TouchAction.java#L165-L170
UrielCh/ovh-java-sdk
ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java
ApiOvhConnectivity.eligibility_search_streets_POST
public OvhAsyncTaskArray<OvhStreet> eligibility_search_streets_POST(String inseeCode) throws IOException { """ Get all street linked to a locality REST: POST /connectivity/eligibility/search/streets @param inseeCode [required] French INSEE identifier (you can get it with POST /connectivity/eligibility/search/c...
java
public OvhAsyncTaskArray<OvhStreet> eligibility_search_streets_POST(String inseeCode) throws IOException { String qPath = "/connectivity/eligibility/search/streets"; StringBuilder sb = path(qPath); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "inseeCode", inseeCode); String resp = exec...
[ "public", "OvhAsyncTaskArray", "<", "OvhStreet", ">", "eligibility_search_streets_POST", "(", "String", "inseeCode", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/connectivity/eligibility/search/streets\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Get all street linked to a locality REST: POST /connectivity/eligibility/search/streets @param inseeCode [required] French INSEE identifier (you can get it with POST /connectivity/eligibility/search/cities)
[ "Get", "all", "street", "linked", "to", "a", "locality" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-connectivity/src/main/java/net/minidev/ovh/api/ApiOvhConnectivity.java#L72-L79
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/SparkUtils.java
SparkUtils.readObjectFromFile
public static <T> T readObjectFromFile(String path, Class<T> type, SparkContext sc) throws IOException { """ Read an object from HDFS (or local) using default Java object serialization @param path File to read @param type Class of the object to read @param sc Spark context @param <T> Type of the object to...
java
public static <T> T readObjectFromFile(String path, Class<T> type, SparkContext sc) throws IOException { FileSystem fileSystem = FileSystem.get(sc.hadoopConfiguration()); try (ObjectInputStream ois = new ObjectInputStream(new BufferedInputStream(fileSystem.open(new Path(path))))) { Object o;...
[ "public", "static", "<", "T", ">", "T", "readObjectFromFile", "(", "String", "path", ",", "Class", "<", "T", ">", "type", ",", "SparkContext", "sc", ")", "throws", "IOException", "{", "FileSystem", "fileSystem", "=", "FileSystem", ".", "get", "(", "sc", ...
Read an object from HDFS (or local) using default Java object serialization @param path File to read @param type Class of the object to read @param sc Spark context @param <T> Type of the object to read
[ "Read", "an", "object", "from", "HDFS", "(", "or", "local", ")", "using", "default", "Java", "object", "serialization" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-scaleout/spark/dl4j-spark/src/main/java/org/deeplearning4j/spark/util/SparkUtils.java#L234-L246
Azure/azure-sdk-for-java
automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/WebhooksInner.java
WebhooksInner.generateUriAsync
public Observable<String> generateUriAsync(String resourceGroupName, String automationAccountName) { """ Generates a Uri for use in creating a webhook. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws IllegalArgumentException th...
java
public Observable<String> generateUriAsync(String resourceGroupName, String automationAccountName) { return generateUriWithServiceResponseAsync(resourceGroupName, automationAccountName).map(new Func1<ServiceResponse<String>, String>() { @Override public String call(ServiceResponse<String...
[ "public", "Observable", "<", "String", ">", "generateUriAsync", "(", "String", "resourceGroupName", ",", "String", "automationAccountName", ")", "{", "return", "generateUriWithServiceResponseAsync", "(", "resourceGroupName", ",", "automationAccountName", ")", ".", "map", ...
Generates a Uri for use in creating a webhook. @param resourceGroupName Name of an Azure Resource group. @param automationAccountName The name of the automation account. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the String object
[ "Generates", "a", "Uri", "for", "use", "in", "creating", "a", "webhook", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/WebhooksInner.java#L133-L140
vkostyukov/la4j
src/main/java/org/la4j/Matrices.java
Matrices.mkMaxAccumulator
public static MatrixAccumulator mkMaxAccumulator() { """ Makes a maximum matrix accumulator that accumulates the maximum of matrix elements. @return a maximum vector accumulator """ return new MatrixAccumulator() { private double result = Double.NEGATIVE_INFINITY; @Override ...
java
public static MatrixAccumulator mkMaxAccumulator() { return new MatrixAccumulator() { private double result = Double.NEGATIVE_INFINITY; @Override public void update(int i, int j, double value) { result = Math.max(result, value); } @Ov...
[ "public", "static", "MatrixAccumulator", "mkMaxAccumulator", "(", ")", "{", "return", "new", "MatrixAccumulator", "(", ")", "{", "private", "double", "result", "=", "Double", ".", "NEGATIVE_INFINITY", ";", "@", "Override", "public", "void", "update", "(", "int",...
Makes a maximum matrix accumulator that accumulates the maximum of matrix elements. @return a maximum vector accumulator
[ "Makes", "a", "maximum", "matrix", "accumulator", "that", "accumulates", "the", "maximum", "of", "matrix", "elements", "." ]
train
https://github.com/vkostyukov/la4j/blob/dd1b917caf9606399a49afa6b0d738934cd3a7b3/src/main/java/org/la4j/Matrices.java#L540-L556
adyliu/jafka
src/main/java/io/jafka/log/LogManager.java
LogManager.getLog
public ILog getLog(String topic, int partition) { """ Get the log if exists or return null @param topic topic name @param partition partition index @return a log for the topic or null if not exist """ TopicNameValidator.validate(topic); Pool<Integer, Log> p = getLogPool(topic, partitio...
java
public ILog getLog(String topic, int partition) { TopicNameValidator.validate(topic); Pool<Integer, Log> p = getLogPool(topic, partition); return p == null ? null : p.get(partition); }
[ "public", "ILog", "getLog", "(", "String", "topic", ",", "int", "partition", ")", "{", "TopicNameValidator", ".", "validate", "(", "topic", ")", ";", "Pool", "<", "Integer", ",", "Log", ">", "p", "=", "getLogPool", "(", "topic", ",", "partition", ")", ...
Get the log if exists or return null @param topic topic name @param partition partition index @return a log for the topic or null if not exist
[ "Get", "the", "log", "if", "exists", "or", "return", "null" ]
train
https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/log/LogManager.java#L450-L454
VoltDB/voltdb
src/frontend/org/voltdb/utils/CatalogUtil.java
CatalogUtil.getTableNameFromId
public static String getTableNameFromId(Database catalog, int tableId) { """ Iterate through all the tables in the catalog, find a table with an id that matches the given table id, and return its name. @param catalog Catalog database @param tableId table id @return table name associated with the given tabl...
java
public static String getTableNameFromId(Database catalog, int tableId) { String tableName = null; for (Table table: catalog.getTables()) { if (table.getRelativeIndex() == tableId) { tableName = table.getTypeName(); } } return tableName; }
[ "public", "static", "String", "getTableNameFromId", "(", "Database", "catalog", ",", "int", "tableId", ")", "{", "String", "tableName", "=", "null", ";", "for", "(", "Table", "table", ":", "catalog", ".", "getTables", "(", ")", ")", "{", "if", "(", "tabl...
Iterate through all the tables in the catalog, find a table with an id that matches the given table id, and return its name. @param catalog Catalog database @param tableId table id @return table name associated with the given table id (null if no association is found)
[ "Iterate", "through", "all", "the", "tables", "in", "the", "catalog", "find", "a", "table", "with", "an", "id", "that", "matches", "the", "given", "table", "id", "and", "return", "its", "name", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/CatalogUtil.java#L2811-L2819
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.round
public static Calendar round(Calendar calendar, DateField dateField) { """ 修改日期为某个时间字段四舍五入时间 @param calendar {@link Calendar} @param dateField 时间字段 @return 原{@link Calendar} @since 4.5.7 """ return DateModifier.modify(calendar, dateField.getValue(), ModifyType.ROUND); }
java
public static Calendar round(Calendar calendar, DateField dateField) { return DateModifier.modify(calendar, dateField.getValue(), ModifyType.ROUND); }
[ "public", "static", "Calendar", "round", "(", "Calendar", "calendar", ",", "DateField", "dateField", ")", "{", "return", "DateModifier", ".", "modify", "(", "calendar", ",", "dateField", ".", "getValue", "(", ")", ",", "ModifyType", ".", "ROUND", ")", ";", ...
修改日期为某个时间字段四舍五入时间 @param calendar {@link Calendar} @param dateField 时间字段 @return 原{@link Calendar} @since 4.5.7
[ "修改日期为某个时间字段四舍五入时间" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L791-L793
OpenLiberty/open-liberty
dev/com.ibm.ws.channelfw/src/com/ibm/ws/udpchannel/internal/UDPBufferFactory.java
UDPBufferFactory.getUDPBuffer
public static UDPBufferImpl getUDPBuffer(WsByteBuffer buffer, SocketAddress address) { """ Get a UDPBuffer that will encapsulate the provided information. @param buffer @param address @return UDPBufferImpl """ UDPBufferImpl udpBuffer = getRef().getUDPBufferImpl(); udpBuffer.set(buffer, add...
java
public static UDPBufferImpl getUDPBuffer(WsByteBuffer buffer, SocketAddress address) { UDPBufferImpl udpBuffer = getRef().getUDPBufferImpl(); udpBuffer.set(buffer, address); return udpBuffer; }
[ "public", "static", "UDPBufferImpl", "getUDPBuffer", "(", "WsByteBuffer", "buffer", ",", "SocketAddress", "address", ")", "{", "UDPBufferImpl", "udpBuffer", "=", "getRef", "(", ")", ".", "getUDPBufferImpl", "(", ")", ";", "udpBuffer", ".", "set", "(", "buffer", ...
Get a UDPBuffer that will encapsulate the provided information. @param buffer @param address @return UDPBufferImpl
[ "Get", "a", "UDPBuffer", "that", "will", "encapsulate", "the", "provided", "information", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channelfw/src/com/ibm/ws/udpchannel/internal/UDPBufferFactory.java#L64-L68
google/closure-compiler
src/com/google/javascript/jscomp/Promises.java
Promises.wrapInIThenable
static final JSType wrapInIThenable(JSTypeRegistry registry, JSType maybeThenable) { """ Wraps the given type in an IThenable. <p>If the given type is already IThenable it is first unwrapped. For example: <p>{@code number} becomes {@code IThenable<number>} <p>{@code IThenable<number>} becomes {@code IThen...
java
static final JSType wrapInIThenable(JSTypeRegistry registry, JSType maybeThenable) { // Unwrap for simplicity first in the event it is a thenable. JSType unwrapped = getResolvedType(registry, maybeThenable); return registry.createTemplatizedType( registry.getNativeObjectType(JSTypeNative.I_THENABLE_...
[ "static", "final", "JSType", "wrapInIThenable", "(", "JSTypeRegistry", "registry", ",", "JSType", "maybeThenable", ")", "{", "// Unwrap for simplicity first in the event it is a thenable.", "JSType", "unwrapped", "=", "getResolvedType", "(", "registry", ",", "maybeThenable", ...
Wraps the given type in an IThenable. <p>If the given type is already IThenable it is first unwrapped. For example: <p>{@code number} becomes {@code IThenable<number>} <p>{@code IThenable<number>} becomes {@code IThenable<number>} <p>{@code Promise<number>} becomes {@code IThenable<number>} <p>{@code IThenable<num...
[ "Wraps", "the", "given", "type", "in", "an", "IThenable", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/Promises.java#L119-L124
forge/core
dependencies/api/src/main/java/org/jboss/forge/addon/dependencies/util/Dependencies.java
Dependencies.areEquivalent
public static boolean areEquivalent(Coordinate l, Coordinate r) { """ Compare the {@link Coordinate} of each given {@link Dependency} for equivalence. """ if (l == r) { return true; } if ((l == null) && (r == null)) { return true; } else if ((l == nul...
java
public static boolean areEquivalent(Coordinate l, Coordinate r) { if (l == r) { return true; } if ((l == null) && (r == null)) { return true; } else if ((l == null) || (r == null)) { return false; } String lPackacking = l.getPack...
[ "public", "static", "boolean", "areEquivalent", "(", "Coordinate", "l", ",", "Coordinate", "r", ")", "{", "if", "(", "l", "==", "r", ")", "{", "return", "true", ";", "}", "if", "(", "(", "l", "==", "null", ")", "&&", "(", "r", "==", "null", ")", ...
Compare the {@link Coordinate} of each given {@link Dependency} for equivalence.
[ "Compare", "the", "{" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/dependencies/api/src/main/java/org/jboss/forge/addon/dependencies/util/Dependencies.java#L41-L69
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/context/RpcRuntimeContext.java
RpcRuntimeContext.putIfAbsent
public static Object putIfAbsent(String key, Object value) { """ 设置上下文信息(不存在才设置成功) @param key the key @param value the value @return the object @see ConcurrentHashMap#putIfAbsent(Object, Object) """ return value == null ? CONTEXT.remove(key) : CONTEXT.putIfAbsent(key, value); }
java
public static Object putIfAbsent(String key, Object value) { return value == null ? CONTEXT.remove(key) : CONTEXT.putIfAbsent(key, value); }
[ "public", "static", "Object", "putIfAbsent", "(", "String", "key", ",", "Object", "value", ")", "{", "return", "value", "==", "null", "?", "CONTEXT", ".", "remove", "(", "key", ")", ":", "CONTEXT", ".", "putIfAbsent", "(", "key", ",", "value", ")", ";"...
设置上下文信息(不存在才设置成功) @param key the key @param value the value @return the object @see ConcurrentHashMap#putIfAbsent(Object, Object)
[ "设置上下文信息(不存在才设置成功)" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/context/RpcRuntimeContext.java#L278-L280
michael-rapp/AndroidMaterialPreferences
library/src/main/java/de/mrapp/android/preference/ResolutionPreference.java
ResolutionPreference.setResolution
public final void setResolution(final int width, final int height) { """ Sets the current resolution of the preference. By setting a value, it will be persisted. @param width The width, which should be set, as an {@link Integer} value. The width must be at least 1 @param height The height, which should be s...
java
public final void setResolution(final int width, final int height) { Condition.INSTANCE.ensureAtLeast(width, 1, "The width must be at least 1"); Condition.INSTANCE.ensureAtLeast(height, 1, "The height must be at least 1"); this.width = width; this.height = height; persistString(f...
[ "public", "final", "void", "setResolution", "(", "final", "int", "width", ",", "final", "int", "height", ")", "{", "Condition", ".", "INSTANCE", ".", "ensureAtLeast", "(", "width", ",", "1", ",", "\"The width must be at least 1\"", ")", ";", "Condition", ".", ...
Sets the current resolution of the preference. By setting a value, it will be persisted. @param width The width, which should be set, as an {@link Integer} value. The width must be at least 1 @param height The height, which should be set, as an {@link Integer} value. The height must be at least 1
[ "Sets", "the", "current", "resolution", "of", "the", "preference", ".", "By", "setting", "a", "value", "it", "will", "be", "persisted", "." ]
train
https://github.com/michael-rapp/AndroidMaterialPreferences/blob/73a7e449458313bd041fc8d6038e290506b68eb1/library/src/main/java/de/mrapp/android/preference/ResolutionPreference.java#L439-L446
netty/netty
transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java
ChannelOutboundBuffer.addMessage
public void addMessage(Object msg, int size, ChannelPromise promise) { """ Add given message to this {@link ChannelOutboundBuffer}. The given {@link ChannelPromise} will be notified once the message was written. """ Entry entry = Entry.newInstance(msg, size, total(msg), promise); if (tailEntry...
java
public void addMessage(Object msg, int size, ChannelPromise promise) { Entry entry = Entry.newInstance(msg, size, total(msg), promise); if (tailEntry == null) { flushedEntry = null; } else { Entry tail = tailEntry; tail.next = entry; } tailEntr...
[ "public", "void", "addMessage", "(", "Object", "msg", ",", "int", "size", ",", "ChannelPromise", "promise", ")", "{", "Entry", "entry", "=", "Entry", ".", "newInstance", "(", "msg", ",", "size", ",", "total", "(", "msg", ")", ",", "promise", ")", ";", ...
Add given message to this {@link ChannelOutboundBuffer}. The given {@link ChannelPromise} will be notified once the message was written.
[ "Add", "given", "message", "to", "this", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport/src/main/java/io/netty/channel/ChannelOutboundBuffer.java#L112-L128
sriharshachilakapati/WebGL4J
webgl4j/src/main/java/com/shc/webgl4j/client/WebGL10.java
WebGL10.glBufferSubData
public static void glBufferSubData(int target, int offset, ArrayBufferView data) { """ <p>{@code glBufferSubData} redefines some or all of the data store for the buffer object currently bound to {@code target}. Data starting at byte offset {@code offset} and extending for {@code sizeof data} bytes is copied to t...
java
public static void glBufferSubData(int target, int offset, ArrayBufferView data) { checkContextCompatibility(); nglBufferSubData(target, offset, data); }
[ "public", "static", "void", "glBufferSubData", "(", "int", "target", ",", "int", "offset", ",", "ArrayBufferView", "data", ")", "{", "checkContextCompatibility", "(", ")", ";", "nglBufferSubData", "(", "target", ",", "offset", ",", "data", ")", ";", "}" ]
<p>{@code glBufferSubData} redefines some or all of the data store for the buffer object currently bound to {@code target}. Data starting at byte offset {@code offset} and extending for {@code sizeof data} bytes is copied to the data store from the memory pointed to by {@code data}. An error is thrown if {@code offset}...
[ "<p", ">", "{", "@code", "glBufferSubData", "}", "redefines", "some", "or", "all", "of", "the", "data", "store", "for", "the", "buffer", "object", "currently", "bound", "to", "{", "@code", "target", "}", ".", "Data", "starting", "at", "byte", "offset", "...
train
https://github.com/sriharshachilakapati/WebGL4J/blob/7daa425300b08b338b50cef2935289849c92d415/webgl4j/src/main/java/com/shc/webgl4j/client/WebGL10.java#L942-L946
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDataTableRowRendererRenderer.java
WDataTableRowRendererRenderer.getFilterValues
private String getFilterValues(final TableDataModel dataModel, final int rowIndex) { """ Retrieves the filter values for the given row in the data model, as a comma-separated string. @param dataModel the data model. @param rowIndex the row index. @return the filter values string. """ List<String> filter...
java
private String getFilterValues(final TableDataModel dataModel, final int rowIndex) { List<String> filterValues = dataModel.getFilterValues(rowIndex); if (filterValues == null || filterValues.isEmpty()) { return null; } StringBuffer buf = new StringBuffer(filterValues.get(0)); for (int i = 1; i < filterV...
[ "private", "String", "getFilterValues", "(", "final", "TableDataModel", "dataModel", ",", "final", "int", "rowIndex", ")", "{", "List", "<", "String", ">", "filterValues", "=", "dataModel", ".", "getFilterValues", "(", "rowIndex", ")", ";", "if", "(", "filterV...
Retrieves the filter values for the given row in the data model, as a comma-separated string. @param dataModel the data model. @param rowIndex the row index. @return the filter values string.
[ "Retrieves", "the", "filter", "values", "for", "the", "given", "row", "in", "the", "data", "model", "as", "a", "comma", "-", "separated", "string", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDataTableRowRendererRenderer.java#L163-L178
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.createPatternAnyEntityModel
public UUID createPatternAnyEntityModel(UUID appId, String versionId, PatternAnyModelCreateObject extractorCreateObject) { """ Adds a pattern.any entity extractor to the application. @param appId The application ID. @param versionId The version ID. @param extractorCreateObject A model object containing the na...
java
public UUID createPatternAnyEntityModel(UUID appId, String versionId, PatternAnyModelCreateObject extractorCreateObject) { return createPatternAnyEntityModelWithServiceResponseAsync(appId, versionId, extractorCreateObject).toBlocking().single().body(); }
[ "public", "UUID", "createPatternAnyEntityModel", "(", "UUID", "appId", ",", "String", "versionId", ",", "PatternAnyModelCreateObject", "extractorCreateObject", ")", "{", "return", "createPatternAnyEntityModelWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "e...
Adds a pattern.any entity extractor to the application. @param appId The application ID. @param versionId The version ID. @param extractorCreateObject A model object containing the name and explicit list for the new Pattern.Any entity extractor. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Adds", "a", "pattern", ".", "any", "entity", "extractor", "to", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L7567-L7569
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/metadata/MatchingStrategy.java
MatchingStrategy.getCollectionMatch
protected CollectionMatch getCollectionMatch(List<WebResourceCollection> webResourceCollections, String resourceName, String method) { """ Gets the match for the resource access. The web resource collections are individually used to determine what is the match for this resource access. The best match is selected....
java
protected CollectionMatch getCollectionMatch(List<WebResourceCollection> webResourceCollections, String resourceName, String method) { CollectionMatch bestMatch = getInitialCollectionMatch(); for (WebResourceCollection webResourceCollection : webResourceCollections) { CollectionMatch curren...
[ "protected", "CollectionMatch", "getCollectionMatch", "(", "List", "<", "WebResourceCollection", ">", "webResourceCollections", ",", "String", "resourceName", ",", "String", "method", ")", "{", "CollectionMatch", "bestMatch", "=", "getInitialCollectionMatch", "(", ")", ...
Gets the match for the resource access. The web resource collections are individually used to determine what is the match for this resource access. The best match is selected. The seven standard HTTP methods are, GET, POST, DELETE, PUT, HEAD, OPTIONS, and TRACE. @param resourceName The resource name. @param method The...
[ "Gets", "the", "match", "for", "the", "resource", "access", ".", "The", "web", "resource", "collections", "are", "individually", "used", "to", "determine", "what", "is", "the", "match", "for", "this", "resource", "access", ".", "The", "best", "match", "is", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/metadata/MatchingStrategy.java#L165-L180
Drivemode/TypefaceHelper
TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java
TypefaceHelper.supportSetTypeface
public <F extends android.support.v4.app.Fragment> void supportSetTypeface(F fragment, String typefaceName, int style) { """ Set the typeface to the all text views belong to the fragment. Make sure to call this method after fragment view creation. And this is a support package fragments only. @param fragment th...
java
public <F extends android.support.v4.app.Fragment> void supportSetTypeface(F fragment, String typefaceName, int style) { View root = fragment.getView(); if (root instanceof TextView) { setTypeface((TextView) root, typefaceName, style); } else if (root instanceof ViewGroup) { setTypeface((ViewGroup) root, ty...
[ "public", "<", "F", "extends", "android", ".", "support", ".", "v4", ".", "app", ".", "Fragment", ">", "void", "supportSetTypeface", "(", "F", "fragment", ",", "String", "typefaceName", ",", "int", "style", ")", "{", "View", "root", "=", "fragment", ".",...
Set the typeface to the all text views belong to the fragment. Make sure to call this method after fragment view creation. And this is a support package fragments only. @param fragment the fragment. @param typefaceName typeface name. @param style the typeface style.
[ "Set", "the", "typeface", "to", "the", "all", "text", "views", "belong", "to", "the", "fragment", ".", "Make", "sure", "to", "call", "this", "method", "after", "fragment", "view", "creation", ".", "And", "this", "is", "a", "support", "package", "fragments"...
train
https://github.com/Drivemode/TypefaceHelper/blob/86bef9ce16b9626b7076559e846db1b9f043c008/TypefaceHelper/src/main/java/com/drivemode/android/typeface/TypefaceHelper.java#L440-L447
FasterXML/woodstox
src/main/java/com/ctc/wstx/util/DataUtil.java
DataUtil.growArrayToAtLeast
public static Object growArrayToAtLeast(Object arr, int minLen) { """ Method similar to {@link #growArrayBy50Pct}, but it also ensures that the new size is at least as big as the specified minimum size. """ if (arr == null) { throw new IllegalArgumentException(NO_TYPE); } O...
java
public static Object growArrayToAtLeast(Object arr, int minLen) { if (arr == null) { throw new IllegalArgumentException(NO_TYPE); } Object old = arr; int oldLen = Array.getLength(arr); int newLen = oldLen + ((oldLen + 1) >> 1); if (newLen < minLen) { ...
[ "public", "static", "Object", "growArrayToAtLeast", "(", "Object", "arr", ",", "int", "minLen", ")", "{", "if", "(", "arr", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "NO_TYPE", ")", ";", "}", "Object", "old", "=", "arr", ";...
Method similar to {@link #growArrayBy50Pct}, but it also ensures that the new size is at least as big as the specified minimum size.
[ "Method", "similar", "to", "{" ]
train
https://github.com/FasterXML/woodstox/blob/ffcaabdc06672d9564c48c25d601d029b7fd6548/src/main/java/com/ctc/wstx/util/DataUtil.java#L118-L132
loicoudot/java4cpp-core
src/main/java/com/github/loicoudot/java4cpp/TypeTemplates.java
TypeTemplates.processTemplate
private String processTemplate(Template template, Object model) { """ Process a freemarker templates <code>template</code> with the model <code>classModel</code> and return the resulting strings. At this stage some informations of the class are updated in the <code>classModel</code> and these informations can b...
java
private String processTemplate(Template template, Object model) { if (template != null) { StringWriter sw = new StringWriter(); try { template.process(model, sw); } catch (Exception e) { throw new RuntimeException("Failed to process template " ...
[ "private", "String", "processTemplate", "(", "Template", "template", ",", "Object", "model", ")", "{", "if", "(", "template", "!=", "null", ")", "{", "StringWriter", "sw", "=", "new", "StringWriter", "(", ")", ";", "try", "{", "template", ".", "process", ...
Process a freemarker templates <code>template</code> with the model <code>classModel</code> and return the resulting strings. At this stage some informations of the class are updated in the <code>classModel</code> and these informations can be used inside the freemarker <code>template</code> to deduce the C++ source co...
[ "Process", "a", "freemarker", "templates", "<code", ">", "template<", "/", "code", ">", "with", "the", "model", "<code", ">", "classModel<", "/", "code", ">", "and", "return", "the", "resulting", "strings", ".", "At", "this", "stage", "some", "informations",...
train
https://github.com/loicoudot/java4cpp-core/blob/7fe5a5dd5a29c3f95b62f46eaacbb8f8778b9493/src/main/java/com/github/loicoudot/java4cpp/TypeTemplates.java#L85-L96
alkacon/opencms-core
src/org/opencms/file/wrapper/CmsObjectWrapper.java
CmsObjectWrapper.readPropertyObject
public CmsProperty readPropertyObject(CmsResource resource, String property, boolean search) throws CmsException { """ Delegate method for {@link CmsObject#readPropertyObject(CmsResource, String, boolean)}.<p> @see CmsObject#readPropertyObject(CmsResource, String, boolean) @param resource the resource where ...
java
public CmsProperty readPropertyObject(CmsResource resource, String property, boolean search) throws CmsException { return m_cms.readPropertyObject(resource, property, search); }
[ "public", "CmsProperty", "readPropertyObject", "(", "CmsResource", "resource", ",", "String", "property", ",", "boolean", "search", ")", "throws", "CmsException", "{", "return", "m_cms", ".", "readPropertyObject", "(", "resource", ",", "property", ",", "search", "...
Delegate method for {@link CmsObject#readPropertyObject(CmsResource, String, boolean)}.<p> @see CmsObject#readPropertyObject(CmsResource, String, boolean) @param resource the resource where the property is attached to @param property the property name @param search if true, the property is searched on all parent fold...
[ "Delegate", "method", "for", "{", "@link", "CmsObject#readPropertyObject", "(", "CmsResource", "String", "boolean", ")", "}", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/wrapper/CmsObjectWrapper.java#L597-L600
tvesalainen/util
util/src/main/java/org/vesalainen/ui/LineDrawer.java
LineDrawer.drawLine
public static void drawLine(int x0, int y0, int x1, int y1, PlotOperator plot) { """ Draws line ((x0, y0), (x1, y1)) by plotting points using plot @param x0 @param y0 @param x1 @param y1 @param plot @param color """ if (x0 > x1) { drawLine(x1, y1, x0, y0, plot); } ...
java
public static void drawLine(int x0, int y0, int x1, int y1, PlotOperator plot) { if (x0 > x1) { drawLine(x1, y1, x0, y0, plot); } else { if (y0 > y1) { drawLine(x0, -y0, x1, -y1, (x, y) -> plot.plot(x, -y)); ...
[ "public", "static", "void", "drawLine", "(", "int", "x0", ",", "int", "y0", ",", "int", "x1", ",", "int", "y1", ",", "PlotOperator", "plot", ")", "{", "if", "(", "x0", ">", "x1", ")", "{", "drawLine", "(", "x1", ",", "y1", ",", "x0", ",", "y0",...
Draws line ((x0, y0), (x1, y1)) by plotting points using plot @param x0 @param y0 @param x1 @param y1 @param plot @param color
[ "Draws", "line", "((", "x0", "y0", ")", "(", "x1", "y1", "))", "by", "plotting", "points", "using", "plot" ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/LineDrawer.java#L84-L101
fozziethebeat/S-Space
opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java
LatentRelationalAnalysis.evaluateAnalogies
public void evaluateAnalogies(Matrix projection, String inputFileName, String outputFileName) { """ Reads analogies from file and outputs their cosine similarities to another file. @param projection the projection {@code Matrix} @param inputFileName the input file containing analogies in the proper format sep...
java
public void evaluateAnalogies(Matrix projection, String inputFileName, String outputFileName) { try { Scanner sc = new Scanner(new File(inputFileName)); PrintStream out = new PrintStream(new FileOutputStream(outputFileName)); while (sc.hasNext()) { ...
[ "public", "void", "evaluateAnalogies", "(", "Matrix", "projection", ",", "String", "inputFileName", ",", "String", "outputFileName", ")", "{", "try", "{", "Scanner", "sc", "=", "new", "Scanner", "(", "new", "File", "(", "inputFileName", ")", ")", ";", "Print...
Reads analogies from file and outputs their cosine similarities to another file. @param projection the projection {@code Matrix} @param inputFileName the input file containing analogies in the proper format separated by newlines @param outputFileName the output file where the results will be stored @return void @see ...
[ "Reads", "analogies", "from", "file", "and", "outputs", "their", "cosine", "similarities", "to", "another", "file", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/opt/src/main/java/edu/ucla/sspace/lra/LatentRelationalAnalysis.java#L940-L958
apache/groovy
subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
Sql.callWithAllRows
public List<List<GroovyRowResult>> callWithAllRows(String sql, List<Object> params, Closure closure) throws SQLException { """ Performs a stored procedure call with the given parameters, calling the closure once with all result objects, and also returning a list of lists with the rows of the ResultSet(s). <p> ...
java
public List<List<GroovyRowResult>> callWithAllRows(String sql, List<Object> params, Closure closure) throws SQLException { return callWithRows(sql, params, ALL_RESULT_SETS, closure); }
[ "public", "List", "<", "List", "<", "GroovyRowResult", ">", ">", "callWithAllRows", "(", "String", "sql", ",", "List", "<", "Object", ">", "params", ",", "Closure", "closure", ")", "throws", "SQLException", "{", "return", "callWithRows", "(", "sql", ",", "...
Performs a stored procedure call with the given parameters, calling the closure once with all result objects, and also returning a list of lists with the rows of the ResultSet(s). <p> Use this when calling a stored procedure that utilizes both output parameters and returns multiple ResultSets. <p> Once created, the sto...
[ "Performs", "a", "stored", "procedure", "call", "with", "the", "given", "parameters", "calling", "the", "closure", "once", "with", "all", "result", "objects", "and", "also", "returning", "a", "list", "of", "lists", "with", "the", "rows", "of", "the", "Result...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java#L3325-L3327
pugwoo/nimble-orm
src/main/java/com/pugwoo/dbhelper/sql/SQLUtils.java
SQLUtils.joinAndGetValue
private static String joinAndGetValue(List<Field> fields, String sep, List<Object> values, Object obj, boolean isWithNullValue) { """ 拼凑字段逗号,分隔子句(用于insert),并把参数obj的值放到values中 @param fields @param sep @param values @param obj @param isWithNullValue 是否把null值放到values中 @return """ return...
java
private static String joinAndGetValue(List<Field> fields, String sep, List<Object> values, Object obj, boolean isWithNullValue) { return joinAndGetValueForInsert(fields, sep, null, values, obj, isWithNullValue); }
[ "private", "static", "String", "joinAndGetValue", "(", "List", "<", "Field", ">", "fields", ",", "String", "sep", ",", "List", "<", "Object", ">", "values", ",", "Object", "obj", ",", "boolean", "isWithNullValue", ")", "{", "return", "joinAndGetValueForInsert"...
拼凑字段逗号,分隔子句(用于insert),并把参数obj的值放到values中 @param fields @param sep @param values @param obj @param isWithNullValue 是否把null值放到values中 @return
[ "拼凑字段逗号", "分隔子句(用于insert),并把参数obj的值放到values中" ]
train
https://github.com/pugwoo/nimble-orm/blob/dd496f3e57029e4f22f9a2f00d18a6513ef94d08/src/main/java/com/pugwoo/dbhelper/sql/SQLUtils.java#L817-L820
adobe/htl-tck
src/main/java/io/sightly/tck/html/HTMLExtractor.java
HTMLExtractor.hasChildren
public static boolean hasChildren(String url, String markup, String selector, int howMany) { """ Checks if the first element matched by the {@code selector} has children and if their number is equal to {@code howMany}. @param url the url that identifies the markup @param markup the markup @param select...
java
public static boolean hasChildren(String url, String markup, String selector, int howMany) { ensureMarkup(url, markup); Document document = documents.get(url); Element element = document.select(selector).first(); return element != null && element.children().size() == howMany; }
[ "public", "static", "boolean", "hasChildren", "(", "String", "url", ",", "String", "markup", ",", "String", "selector", ",", "int", "howMany", ")", "{", "ensureMarkup", "(", "url", ",", "markup", ")", ";", "Document", "document", "=", "documents", ".", "ge...
Checks if the first element matched by the {@code selector} has children and if their number is equal to {@code howMany}. @param url the url that identifies the markup @param markup the markup @param selector the selector used for retrieval @param howMany the number of expected children @return {@code true} if...
[ "Checks", "if", "the", "first", "element", "matched", "by", "the", "{", "@code", "selector", "}", "has", "children", "and", "if", "their", "number", "is", "equal", "to", "{", "@code", "howMany", "}", "." ]
train
https://github.com/adobe/htl-tck/blob/2043a9616083c06cefbd685798c9a2b2ac2ea98e/src/main/java/io/sightly/tck/html/HTMLExtractor.java#L125-L131
inkstand-io/scribble
scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/util/XMLContentHandler.java
XMLContentHandler.newNode
private Node newNode(final Node parent, final Attributes attributes) throws RepositoryException { """ Creates the {@link Node} in the repository from the given attributes. @param parent inkstand.rules.config - the absolute path to your configuration file for the cluster node inkstand.rules.home - the absolute...
java
private Node newNode(final Node parent, final Attributes attributes) throws RepositoryException { Node parentNode; if (parent == null) { parentNode = this.session.getRootNode(); } else { parentNode = parent; } // TODO handle path parameters final...
[ "private", "Node", "newNode", "(", "final", "Node", "parent", ",", "final", "Attributes", "attributes", ")", "throws", "RepositoryException", "{", "Node", "parentNode", ";", "if", "(", "parent", "==", "null", ")", "{", "parentNode", "=", "this", ".", "sessio...
Creates the {@link Node} in the repository from the given attributes. @param parent inkstand.rules.config - the absolute path to your configuration file for the cluster node inkstand.rules.home - the absolute path to the working directory of the cluster node <p/> More on Jackrabbit configuration can be found on the Ap...
[ "Creates", "the", "{", "@link", "Node", "}", "in", "the", "repository", "from", "the", "given", "attributes", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-jcr/src/main/java/io/inkstand/scribble/jcr/rules/util/XMLContentHandler.java#L412-L427
wildfly/wildfly-core
controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java
ParseUtils.duplicateAttribute
public static XMLStreamException duplicateAttribute(final XMLExtendedStreamReader reader, final String name) { """ Get an exception reporting that an attribute of a given name has already been declared in this scope. @param reader the stream reader @param name the name that was redeclared @return the exception...
java
public static XMLStreamException duplicateAttribute(final XMLExtendedStreamReader reader, final String name) { final XMLStreamException ex = ControllerLogger.ROOT_LOGGER.duplicateAttribute(name, reader.getLocation()); return new XMLStreamValidationException(ex.getMessage(), ...
[ "public", "static", "XMLStreamException", "duplicateAttribute", "(", "final", "XMLExtendedStreamReader", "reader", ",", "final", "String", "name", ")", "{", "final", "XMLStreamException", "ex", "=", "ControllerLogger", ".", "ROOT_LOGGER", ".", "duplicateAttribute", "(",...
Get an exception reporting that an attribute of a given name has already been declared in this scope. @param reader the stream reader @param name the name that was redeclared @return the exception
[ "Get", "an", "exception", "reporting", "that", "an", "attribute", "of", "a", "given", "name", "has", "already", "been", "declared", "in", "this", "scope", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/parsing/ParseUtils.java#L347-L355
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java
SqlValidatorImpl.validateGroupByItem
private void validateGroupByItem(SqlSelect select, SqlNode groupByItem) { """ Validates an item in the GROUP BY clause of a SELECT statement. @param select Select statement @param groupByItem GROUP BY clause item """ final SqlValidatorScope groupByScope = getGroupScope(select); groupByScope.validateExp...
java
private void validateGroupByItem(SqlSelect select, SqlNode groupByItem) { final SqlValidatorScope groupByScope = getGroupScope(select); groupByScope.validateExpr(groupByItem); }
[ "private", "void", "validateGroupByItem", "(", "SqlSelect", "select", ",", "SqlNode", "groupByItem", ")", "{", "final", "SqlValidatorScope", "groupByScope", "=", "getGroupScope", "(", "select", ")", ";", "groupByScope", ".", "validateExpr", "(", "groupByItem", ")", ...
Validates an item in the GROUP BY clause of a SELECT statement. @param select Select statement @param groupByItem GROUP BY clause item
[ "Validates", "an", "item", "in", "the", "GROUP", "BY", "clause", "of", "a", "SELECT", "statement", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3850-L3853
finmath/finmath-lib
src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java
SwaptionDataLattice.getValue
public double getValue(String tenorCode, int moneynessBP, QuotingConvention convention, double displacement, AnalyticModel model) { """ Return the value in the given quoting convention. Conversion involving receiver premium assumes zero wide collar. @param tenorCode The schedule of the swaption encoded in the ...
java
public double getValue(String tenorCode, int moneynessBP, QuotingConvention convention, double displacement, AnalyticModel model) { DataKey key = new DataKey(tenorCode, moneynessBP); return convertToConvention(getValue(key), key, convention, displacement, quotingConvention, this.displacement, model); }
[ "public", "double", "getValue", "(", "String", "tenorCode", ",", "int", "moneynessBP", ",", "QuotingConvention", "convention", ",", "double", "displacement", ",", "AnalyticModel", "model", ")", "{", "DataKey", "key", "=", "new", "DataKey", "(", "tenorCode", ",",...
Return the value in the given quoting convention. Conversion involving receiver premium assumes zero wide collar. @param tenorCode The schedule of the swaption encoded in the format '6M10Y' @param moneynessBP The moneyness in basis points on the par swap rate, as understood in the original convention. @param conventio...
[ "Return", "the", "value", "in", "the", "given", "quoting", "convention", ".", "Conversion", "involving", "receiver", "premium", "assumes", "zero", "wide", "collar", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java#L647-L650
greengerong/prerender-java
src/main/java/com/github/greengerong/PrerenderSeoService.java
PrerenderSeoService.copyRequestHeaders
private void copyRequestHeaders(HttpServletRequest servletRequest, HttpRequest proxyRequest) throws URISyntaxException { """ Copy request headers from the servlet client to the proxy request. @throws java.net.URISyntaxException """ // Get an Enumeration of all of the header names sent by...
java
private void copyRequestHeaders(HttpServletRequest servletRequest, HttpRequest proxyRequest) throws URISyntaxException { // Get an Enumeration of all of the header names sent by the client Enumeration<?> enumerationOfHeaderNames = servletRequest.getHeaderNames(); while (enumerationOf...
[ "private", "void", "copyRequestHeaders", "(", "HttpServletRequest", "servletRequest", ",", "HttpRequest", "proxyRequest", ")", "throws", "URISyntaxException", "{", "// Get an Enumeration of all of the header names sent by the client", "Enumeration", "<", "?", ">", "enumerationOfH...
Copy request headers from the servlet client to the proxy request. @throws java.net.URISyntaxException
[ "Copy", "request", "headers", "from", "the", "servlet", "client", "to", "the", "proxy", "request", "." ]
train
https://github.com/greengerong/prerender-java/blob/f7fc7a5e9adea8cf556c653a87bbac2cfcac3d06/src/main/java/com/github/greengerong/PrerenderSeoService.java#L159-L184
casmi/casmi
src/main/java/casmi/graphics/element/Box.java
Box.setGradationColor
public void setGradationColor(GradationMode3D mode, ColorSet colorSet1, ColorSet colorSet2) { """ Sets the gradation mode and colors. @param mode The mode of gradation. @param colorSet1 The colorSet for gradation. @param colorSet2 The colorSet for gradation. @see casmi.GradationMode2D """ setGr...
java
public void setGradationColor(GradationMode3D mode, ColorSet colorSet1, ColorSet colorSet2) { setGradationColor(mode, new RGBColor(colorSet1), new RGBColor(colorSet2)); }
[ "public", "void", "setGradationColor", "(", "GradationMode3D", "mode", ",", "ColorSet", "colorSet1", ",", "ColorSet", "colorSet2", ")", "{", "setGradationColor", "(", "mode", ",", "new", "RGBColor", "(", "colorSet1", ")", ",", "new", "RGBColor", "(", "colorSet2"...
Sets the gradation mode and colors. @param mode The mode of gradation. @param colorSet1 The colorSet for gradation. @param colorSet2 The colorSet for gradation. @see casmi.GradationMode2D
[ "Sets", "the", "gradation", "mode", "and", "colors", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Box.java#L390-L392
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/Counters.java
Counters.incrCounter
public synchronized void incrCounter(String group, String counter, long amount) { """ Increments the specified counter by the specified amount, creating it if it didn't already exist. @param group the name of the group @param counter the internal name of the counter @param amount amount by which counter is to ...
java
public synchronized void incrCounter(String group, String counter, long amount) { getGroup(group).getCounterForName(counter).increment(amount); }
[ "public", "synchronized", "void", "incrCounter", "(", "String", "group", ",", "String", "counter", ",", "long", "amount", ")", "{", "getGroup", "(", "group", ")", ".", "getCounterForName", "(", "counter", ")", ".", "increment", "(", "amount", ")", ";", "}"...
Increments the specified counter by the specified amount, creating it if it didn't already exist. @param group the name of the group @param counter the internal name of the counter @param amount amount by which counter is to be incremented
[ "Increments", "the", "specified", "counter", "by", "the", "specified", "amount", "creating", "it", "if", "it", "didn", "t", "already", "exist", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/Counters.java#L424-L426
aspectran/aspectran
core/src/main/java/com/aspectran/core/context/expr/TokenExpression.java
TokenExpression.getBeanProperty
protected Object getBeanProperty(final Object object, String propertyName) { """ Invoke bean's property. @param object the object @param propertyName the property name @return the object """ Object value; try { value = BeanUtils.getProperty(object, propertyName); } catc...
java
protected Object getBeanProperty(final Object object, String propertyName) { Object value; try { value = BeanUtils.getProperty(object, propertyName); } catch (InvocationTargetException e) { // ignore value = null; } return value; }
[ "protected", "Object", "getBeanProperty", "(", "final", "Object", "object", ",", "String", "propertyName", ")", "{", "Object", "value", ";", "try", "{", "value", "=", "BeanUtils", ".", "getProperty", "(", "object", ",", "propertyName", ")", ";", "}", "catch"...
Invoke bean's property. @param object the object @param propertyName the property name @return the object
[ "Invoke", "bean", "s", "property", "." ]
train
https://github.com/aspectran/aspectran/blob/2d758a2a28b71ee85b42823c12dc44674d7f2c70/core/src/main/java/com/aspectran/core/context/expr/TokenExpression.java#L425-L434
kiegroup/jbpm
jbpm-services/jbpm-executor/src/main/java/org/jbpm/executor/impl/ClassCacheManager.java
ClassCacheManager.findCommand
public Command findCommand(String name, ClassLoader cl) { """ Finds command by FQCN and if not found loads the class and store the instance in the cache. @param name - fully qualified class name of the command @return initialized class instance """ synchronized (commandCache) { ...
java
public Command findCommand(String name, ClassLoader cl) { synchronized (commandCache) { if (!commandCache.containsKey(name)) { try { Command commandInstance = (Command) Class.forName(name, true, cl).newInstance(); ...
[ "public", "Command", "findCommand", "(", "String", "name", ",", "ClassLoader", "cl", ")", "{", "synchronized", "(", "commandCache", ")", "{", "if", "(", "!", "commandCache", ".", "containsKey", "(", "name", ")", ")", "{", "try", "{", "Command", "commandIns...
Finds command by FQCN and if not found loads the class and store the instance in the cache. @param name - fully qualified class name of the command @return initialized class instance
[ "Finds", "command", "by", "FQCN", "and", "if", "not", "found", "loads", "the", "class", "and", "store", "the", "instance", "in", "the", "cache", "." ]
train
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-services/jbpm-executor/src/main/java/org/jbpm/executor/impl/ClassCacheManager.java#L51-L79
Pi4J/pi4j
pi4j-core/src/main/java/com/pi4j/io/serial/impl/AbstractSerialDataWriter.java
AbstractSerialDataWriter.write
public void write(Charset charset, char[] data, int offset, int length) throws IllegalStateException, IOException { """ <p>Sends an array of characters to the serial port/device identified by the given file descriptor.</p> @param charset The character set to use for encoding/decoding bytes to/from text charact...
java
public void write(Charset charset, char[] data, int offset, int length) throws IllegalStateException, IOException{ write(charset, CharBuffer.wrap(data, offset, length)); }
[ "public", "void", "write", "(", "Charset", "charset", ",", "char", "[", "]", "data", ",", "int", "offset", ",", "int", "length", ")", "throws", "IllegalStateException", ",", "IOException", "{", "write", "(", "charset", ",", "CharBuffer", ".", "wrap", "(", ...
<p>Sends an array of characters to the serial port/device identified by the given file descriptor.</p> @param charset The character set to use for encoding/decoding bytes to/from text characters @param data An array of chars to be decoded into bytes and transmitted. @param offset The starting index (inclusive) in the ...
[ "<p", ">", "Sends", "an", "array", "of", "characters", "to", "the", "serial", "port", "/", "device", "identified", "by", "the", "given", "file", "descriptor", ".", "<", "/", "p", ">" ]
train
https://github.com/Pi4J/pi4j/blob/03cacc62223cc59b3118bfcefadabab979fd84c7/pi4j-core/src/main/java/com/pi4j/io/serial/impl/AbstractSerialDataWriter.java#L138-L140
Ordinastie/MalisisCore
src/main/java/net/malisis/core/util/AABBUtils.java
AABBUtils.getCollisionBoundingBoxes
public static AxisAlignedBB[] getCollisionBoundingBoxes(World world, MBlockState state) { """ Gets the collision {@link AxisAlignedBB} for the {@link MBlockState}. @param world the world @param state the state @return the collision bounding boxes """ return getCollisionBoundingBoxes(world, state, false)...
java
public static AxisAlignedBB[] getCollisionBoundingBoxes(World world, MBlockState state) { return getCollisionBoundingBoxes(world, state, false); }
[ "public", "static", "AxisAlignedBB", "[", "]", "getCollisionBoundingBoxes", "(", "World", "world", ",", "MBlockState", "state", ")", "{", "return", "getCollisionBoundingBoxes", "(", "world", ",", "state", ",", "false", ")", ";", "}" ]
Gets the collision {@link AxisAlignedBB} for the {@link MBlockState}. @param world the world @param state the state @return the collision bounding boxes
[ "Gets", "the", "collision", "{", "@link", "AxisAlignedBB", "}", "for", "the", "{", "@link", "MBlockState", "}", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/util/AABBUtils.java#L431-L434
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java
FacetUrl.updateFacetUrl
public static MozuUrl updateFacetUrl(Integer facetId, String responseFields) { """ Get Resource Url for UpdateFacet @param facetId Unique identifier of the facet to retrieve. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. T...
java
public static MozuUrl updateFacetUrl(Integer facetId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/facets/{facetId}?responseFields={responseFields}"); formatter.formatUrl("facetId", facetId); formatter.formatUrl("responseFields", responseFields); return n...
[ "public", "static", "MozuUrl", "updateFacetUrl", "(", "Integer", "facetId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/facets/{facetId}?responseFields={responseFields}\"", ")", ";", ...
Get Resource Url for UpdateFacet @param facetId Unique identifier of the facet to retrieve. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this p...
[ "Get", "Resource", "Url", "for", "UpdateFacet" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/FacetUrl.java#L68-L74
jglobus/JGlobus
ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java
GlobusPathMatchingResourcePatternResolver.getResources
public GlobusResource[] getResources(String locationPattern) { """ Finds all the resources that match the Ant-Style locationPattern @param locationPattern Ant-Style location pattern which may be prefixed with classpath:/, file:/, or describe a relative path. @return An array of GlobusResource containing all re...
java
public GlobusResource[] getResources(String locationPattern) { Vector<GlobusResource> pathsMatchingLocationPattern = new Vector<GlobusResource>(); String mainPath = ""; if (locationPattern.startsWith("classpath:")) { String pathUntilWildcard = getPathUntilWildcard(locationPattern.rep...
[ "public", "GlobusResource", "[", "]", "getResources", "(", "String", "locationPattern", ")", "{", "Vector", "<", "GlobusResource", ">", "pathsMatchingLocationPattern", "=", "new", "Vector", "<", "GlobusResource", ">", "(", ")", ";", "String", "mainPath", "=", "\...
Finds all the resources that match the Ant-Style locationPattern @param locationPattern Ant-Style location pattern which may be prefixed with classpath:/, file:/, or describe a relative path. @return An array of GlobusResource containing all resources whose locaiton match the locationPattern
[ "Finds", "all", "the", "resources", "that", "match", "the", "Ant", "-", "Style", "locationPattern" ]
train
https://github.com/jglobus/JGlobus/blob/e14f6f6636544fd84298f9cec749d626ea971930/ssl-proxies/src/main/java/org/globus/util/GlobusPathMatchingResourcePatternResolver.java#L64-L93
livetribe/livetribe-slp
core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java
StandardDirectoryAgentServer.handleTCPSrvTypeRqst
protected void handleTCPSrvTypeRqst(SrvTypeRqst srvTypeRqst, Socket socket) { """ Handles a unicast TCP SrvTypeRqst message arrived to this directory agent. <br /> This directory agent will reply with an SrvTypeRply containing the service types. @param srvTypeRqst the SrvTypeRqst message to handle @param soc...
java
protected void handleTCPSrvTypeRqst(SrvTypeRqst srvTypeRqst, Socket socket) { // Match scopes, RFC 2608, 11.1 if (!scopes.weakMatch(srvTypeRqst.getScopes())) { tcpSrvTypeRply.perform(socket, srvTypeRqst, SLPError.SCOPE_NOT_SUPPORTED); return; } List<S...
[ "protected", "void", "handleTCPSrvTypeRqst", "(", "SrvTypeRqst", "srvTypeRqst", ",", "Socket", "socket", ")", "{", "// Match scopes, RFC 2608, 11.1", "if", "(", "!", "scopes", ".", "weakMatch", "(", "srvTypeRqst", ".", "getScopes", "(", ")", ")", ")", "{", "tcpS...
Handles a unicast TCP SrvTypeRqst message arrived to this directory agent. <br /> This directory agent will reply with an SrvTypeRply containing the service types. @param srvTypeRqst the SrvTypeRqst message to handle @param socket the socket connected to the client where to write the reply
[ "Handles", "a", "unicast", "TCP", "SrvTypeRqst", "message", "arrived", "to", "this", "directory", "agent", ".", "<br", "/", ">", "This", "directory", "agent", "will", "reply", "with", "an", "SrvTypeRply", "containing", "the", "service", "types", "." ]
train
https://github.com/livetribe/livetribe-slp/blob/6cc13dbe81feab133fe3dd291ca081cbc6e1f591/core/src/main/java/org/livetribe/slp/da/StandardDirectoryAgentServer.java#L721-L735
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java
NumeratorSubstitution.doSubstitution
public void doSubstitution(double number, StringBuilder toInsertInto, int position, int recursionCount) { """ Performs a mathematical operation on the number, formats it using either ruleSet or decimalFormat, and inserts the result into toInsertInto. @param number The number being formatted. @param toInsertInt...
java
public void doSubstitution(double number, StringBuilder toInsertInto, int position, int recursionCount) { // perform a transformation on the number being formatted that // is dependent on the type of substitution this is //String s = toInsertInto.toString(); double numberToFormat = trans...
[ "public", "void", "doSubstitution", "(", "double", "number", ",", "StringBuilder", "toInsertInto", ",", "int", "position", ",", "int", "recursionCount", ")", "{", "// perform a transformation on the number being formatted that", "// is dependent on the type of substitution this i...
Performs a mathematical operation on the number, formats it using either ruleSet or decimalFormat, and inserts the result into toInsertInto. @param number The number being formatted. @param toInsertInto The string we insert the result into @param position The position in toInsertInto where the owning rule's rule text b...
[ "Performs", "a", "mathematical", "operation", "on", "the", "number", "formats", "it", "using", "either", "ruleSet", "or", "decimalFormat", "and", "inserts", "the", "result", "into", "toInsertInto", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/NFSubstitution.java#L1499-L1531
Netflix/eureka
eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java
AwsAsgUtil.isAddToLoadBalancerSuspended
private boolean isAddToLoadBalancerSuspended(String asgAccountId, String asgName) { """ Check if the ASG is disabled. The amazon flag "AddToLoadBalancer" is queried to figure out if it is or not. @param asgName - The name of the ASG for which the status needs to be queried @return - true if the ASG is disabl...
java
private boolean isAddToLoadBalancerSuspended(String asgAccountId, String asgName) { AutoScalingGroup asg; if(asgAccountId == null || asgAccountId.equals(accountId)) { asg = retrieveAutoScalingGroup(asgName); } else { asg = retrieveAutoScalingGroupCrossAccount(asgAccountId...
[ "private", "boolean", "isAddToLoadBalancerSuspended", "(", "String", "asgAccountId", ",", "String", "asgName", ")", "{", "AutoScalingGroup", "asg", ";", "if", "(", "asgAccountId", "==", "null", "||", "asgAccountId", ".", "equals", "(", "accountId", ")", ")", "{"...
Check if the ASG is disabled. The amazon flag "AddToLoadBalancer" is queried to figure out if it is or not. @param asgName - The name of the ASG for which the status needs to be queried @return - true if the ASG is disabled, false otherwise
[ "Check", "if", "the", "ASG", "is", "disabled", ".", "The", "amazon", "flag", "AddToLoadBalancer", "is", "queried", "to", "figure", "out", "if", "it", "is", "or", "not", "." ]
train
https://github.com/Netflix/eureka/blob/48446d956be09df6650a3c00b7ebd7e2d1e1544f/eureka-core/src/main/java/com/netflix/eureka/aws/AwsAsgUtil.java#L206-L218
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java
ReUtil.get
public static String get(String regex, CharSequence content, int groupIndex) { """ 获得匹配的字符串 @param regex 匹配的正则 @param content 被匹配的内容 @param groupIndex 匹配正则的分组序号 @return 匹配后得到的字符串,未匹配返回null """ if (null == content || null == regex) { return null; } // Pattern pattern = Pattern.compile(regex...
java
public static String get(String regex, CharSequence content, int groupIndex) { if (null == content || null == regex) { return null; } // Pattern pattern = Pattern.compile(regex, Pattern.DOTALL); final Pattern pattern = PatternPool.get(regex, Pattern.DOTALL); return get(pattern, content, groupIndex)...
[ "public", "static", "String", "get", "(", "String", "regex", ",", "CharSequence", "content", ",", "int", "groupIndex", ")", "{", "if", "(", "null", "==", "content", "||", "null", "==", "regex", ")", "{", "return", "null", ";", "}", "// Pattern pattern = Pa...
获得匹配的字符串 @param regex 匹配的正则 @param content 被匹配的内容 @param groupIndex 匹配正则的分组序号 @return 匹配后得到的字符串,未匹配返回null
[ "获得匹配的字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReUtil.java#L69-L77
xebia/Xebium
src/main/java/com/xebia/incubator/xebium/ScreenCapture.java
ScreenCapture.updateIndexFile
private void updateIndexFile(int stepNumber, File file, String methodName, String[] values) throws IOException { """ <p>Provide an easy to use index.html file for viewing the screenshots. </p> <p>The base directory is expected to exist at this point. </p> @throws IOException """ File indexFile = ini...
java
private void updateIndexFile(int stepNumber, File file, String methodName, String[] values) throws IOException { File indexFile = initializeIndexIfNeeded(); BufferedWriter w = new BufferedWriter(new FileWriter(indexFile, stepNumber > INITIAL_STEP_NUMBER)); try { String title = "| " + methodName + " | " + (...
[ "private", "void", "updateIndexFile", "(", "int", "stepNumber", ",", "File", "file", ",", "String", "methodName", ",", "String", "[", "]", "values", ")", "throws", "IOException", "{", "File", "indexFile", "=", "initializeIndexIfNeeded", "(", ")", ";", "Buffere...
<p>Provide an easy to use index.html file for viewing the screenshots. </p> <p>The base directory is expected to exist at this point. </p> @throws IOException
[ "<p", ">", "Provide", "an", "easy", "to", "use", "index", ".", "html", "file", "for", "viewing", "the", "screenshots", ".", "<", "/", "p", ">", "<p", ">", "The", "base", "directory", "is", "expected", "to", "exist", "at", "this", "point", ".", "<", ...
train
https://github.com/xebia/Xebium/blob/594f6d9e65622acdbd03dba0700b17645981da1f/src/main/java/com/xebia/incubator/xebium/ScreenCapture.java#L145-L161
OpenLiberty/open-liberty
dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerFactory.java
ZipFileContainerFactory.createContainer
@Override public ArtifactContainer createContainer(File cacheDir, Object containerData) { """ Attempt to create a root-of-roots zip file type container. Anser null if the container data is not a file or is not a valid zip file. @return A new root-of-roots zip file type container. """ if ( !(...
java
@Override public ArtifactContainer createContainer(File cacheDir, Object containerData) { if ( !(containerData instanceof File) ) { return null; } File fileContainerData = (File) containerData; if ( !FileUtils.fileIsFile(fileContainerData) ) { return null; ...
[ "@", "Override", "public", "ArtifactContainer", "createContainer", "(", "File", "cacheDir", ",", "Object", "containerData", ")", "{", "if", "(", "!", "(", "containerData", "instanceof", "File", ")", ")", "{", "return", "null", ";", "}", "File", "fileContainerD...
Attempt to create a root-of-roots zip file type container. Anser null if the container data is not a file or is not a valid zip file. @return A new root-of-roots zip file type container.
[ "Attempt", "to", "create", "a", "root", "-", "of", "-", "roots", "zip", "file", "type", "container", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.artifact.zip/src/com/ibm/ws/artifact/zip/internal/ZipFileContainerFactory.java#L185-L201
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/TransitionsConfig.java
TransitionsConfig.exports
public static void exports(Media media, Map<Transition, Collection<TileRef>> transitions) { """ Export all transitions to media. @param media The export media output (must not be <code>null</code>). @param transitions The transitions reference (must not be <code>null</code>). @throws LionEngineException If er...
java
public static void exports(Media media, Map<Transition, Collection<TileRef>> transitions) { Check.notNull(media); Check.notNull(transitions); final Xml nodeTransitions = new Xml(NODE_TRANSITIONS); for (final Map.Entry<Transition, Collection<TileRef>> entry : transitions.entr...
[ "public", "static", "void", "exports", "(", "Media", "media", ",", "Map", "<", "Transition", ",", "Collection", "<", "TileRef", ">", ">", "transitions", ")", "{", "Check", ".", "notNull", "(", "media", ")", ";", "Check", ".", "notNull", "(", "transitions...
Export all transitions to media. @param media The export media output (must not be <code>null</code>). @param transitions The transitions reference (must not be <code>null</code>). @throws LionEngineException If error on export.
[ "Export", "all", "transitions", "to", "media", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/transition/TransitionsConfig.java#L117-L137
apache/groovy
src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java
FileSystemCompiler.commandLineCompile
public static void commandLineCompile(String[] args, boolean lookupUnnamedFiles) throws Exception { """ Same as main(args) except that exceptions are thrown out instead of causing the VM to exit and the lookup for .groovy files can be controlled """ CompilationOptions options = new CompilationOptions(...
java
public static void commandLineCompile(String[] args, boolean lookupUnnamedFiles) throws Exception { CompilationOptions options = new CompilationOptions(); CommandLine parser = configureParser(options); ParseResult parseResult = parser.parseArgs(args); if (CommandLine.printHelpIfRequested...
[ "public", "static", "void", "commandLineCompile", "(", "String", "[", "]", "args", ",", "boolean", "lookupUnnamedFiles", ")", "throws", "Exception", "{", "CompilationOptions", "options", "=", "new", "CompilationOptions", "(", ")", ";", "CommandLine", "parser", "="...
Same as main(args) except that exceptions are thrown out instead of causing the VM to exit and the lookup for .groovy files can be controlled
[ "Same", "as", "main", "(", "args", ")", "except", "that", "exceptions", "are", "thrown", "out", "instead", "of", "causing", "the", "VM", "to", "exit", "and", "the", "lookup", "for", ".", "groovy", "files", "can", "be", "controlled" ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/tools/FileSystemCompiler.java#L142-L165
Pixplicity/EasyPrefs
library/src/main/java/com/pixplicity/easyprefs/library/Prefs.java
Prefs.putLong
public static void putLong(final String key, final long value) { """ Stores a long value. @param key The name of the preference to modify. @param value The new value for the preference. @see android.content.SharedPreferences.Editor#putLong(String, long) """ final Editor editor = getPreferences()...
java
public static void putLong(final String key, final long value) { final Editor editor = getPreferences().edit(); editor.putLong(key, value); editor.apply(); }
[ "public", "static", "void", "putLong", "(", "final", "String", "key", ",", "final", "long", "value", ")", "{", "final", "Editor", "editor", "=", "getPreferences", "(", ")", ".", "edit", "(", ")", ";", "editor", ".", "putLong", "(", "key", ",", "value",...
Stores a long value. @param key The name of the preference to modify. @param value The new value for the preference. @see android.content.SharedPreferences.Editor#putLong(String, long)
[ "Stores", "a", "long", "value", "." ]
train
https://github.com/Pixplicity/EasyPrefs/blob/0ca13a403bf099019a13d68b38edcf55fca5a653/library/src/main/java/com/pixplicity/easyprefs/library/Prefs.java#L277-L281
graphql-java/graphql-java
src/main/java/graphql/execution/nextgen/FetchedValueAnalyzer.java
FetchedValueAnalyzer.analyzeFetchedValue
public FetchedValueAnalysis analyzeFetchedValue(ExecutionContext executionContext, FetchedValue fetchedValue, ExecutionStepInfo executionInfo) throws NonNullableFieldWasNullException { """ /* scalar: the value, null and/or error enum: same as scalar list: list of X: X can be list again, list of scalars or enum ...
java
public FetchedValueAnalysis analyzeFetchedValue(ExecutionContext executionContext, FetchedValue fetchedValue, ExecutionStepInfo executionInfo) throws NonNullableFieldWasNullException { return analyzeFetchedValueImpl(executionContext, fetchedValue, fetchedValue.getFetchedValue(), executionInfo); }
[ "public", "FetchedValueAnalysis", "analyzeFetchedValue", "(", "ExecutionContext", "executionContext", ",", "FetchedValue", "fetchedValue", ",", "ExecutionStepInfo", "executionInfo", ")", "throws", "NonNullableFieldWasNullException", "{", "return", "analyzeFetchedValueImpl", "(", ...
/* scalar: the value, null and/or error enum: same as scalar list: list of X: X can be list again, list of scalars or enum or objects
[ "/", "*", "scalar", ":", "the", "value", "null", "and", "/", "or", "error", "enum", ":", "same", "as", "scalar", "list", ":", "list", "of", "X", ":", "X", "can", "be", "list", "again", "list", "of", "scalars", "or", "enum", "or", "objects" ]
train
https://github.com/graphql-java/graphql-java/blob/9214b6044317849388bd88a14b54fc1c18c9f29f/src/main/java/graphql/execution/nextgen/FetchedValueAnalyzer.java#L45-L47
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicLongArray.java
AtomicLongArray.getAndUpdate
public final long getAndUpdate(int i, LongUnaryOperator updateFunction) { """ Atomically updates the element at index {@code i} with the results of applying the given function, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to co...
java
public final long getAndUpdate(int i, LongUnaryOperator updateFunction) { // long offset = checkedByteOffset(i); long prev, next; do { prev = get(i); next = updateFunction.applyAsLong(prev); } while (!compareAndSet(i, prev, next)); return prev; }
[ "public", "final", "long", "getAndUpdate", "(", "int", "i", ",", "LongUnaryOperator", "updateFunction", ")", "{", "// long offset = checkedByteOffset(i);", "long", "prev", ",", "next", ";", "do", "{", "prev", "=", "get", "(", "i", ")", ";", "next", "=", "upd...
Atomically updates the element at index {@code i} with the results of applying the given function, returning the previous value. The function should be side-effect-free, since it may be re-applied when attempted updates fail due to contention among threads. @param i the index @param updateFunction a side-effect-free f...
[ "Atomically", "updates", "the", "element", "at", "index", "{", "@code", "i", "}", "with", "the", "results", "of", "applying", "the", "given", "function", "returning", "the", "previous", "value", ".", "The", "function", "should", "be", "side", "-", "effect", ...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/atomic/AtomicLongArray.java#L285-L293
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionListener.java
RaftSessionListener.addEventListener
public void addEventListener(EventType eventType, Consumer<PrimitiveEvent> listener) { """ Adds an event listener to the session. @param listener the event listener callback """ executor.execute(() -> eventListeners.computeIfAbsent(eventType.canonicalize(), e -> Sets.newLinkedHashSet()).add(listener)); ...
java
public void addEventListener(EventType eventType, Consumer<PrimitiveEvent> listener) { executor.execute(() -> eventListeners.computeIfAbsent(eventType.canonicalize(), e -> Sets.newLinkedHashSet()).add(listener)); }
[ "public", "void", "addEventListener", "(", "EventType", "eventType", ",", "Consumer", "<", "PrimitiveEvent", ">", "listener", ")", "{", "executor", ".", "execute", "(", "(", ")", "->", "eventListeners", ".", "computeIfAbsent", "(", "eventType", ".", "canonicaliz...
Adds an event listener to the session. @param listener the event listener callback
[ "Adds", "an", "event", "listener", "to", "the", "session", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/RaftSessionListener.java#L69-L71
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java
FailoverGroupsInner.beginUpdateAsync
public Observable<FailoverGroupInner> beginUpdateAsync(String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { """ Updates a failover group. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azu...
java
public Observable<FailoverGroupInner> beginUpdateAsync(String resourceGroupName, String serverName, String failoverGroupName, FailoverGroupUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, failoverGroupName, parameters).map(new Func1<ServiceResponse<FailoverGroupInne...
[ "public", "Observable", "<", "FailoverGroupInner", ">", "beginUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "failoverGroupName", ",", "FailoverGroupUpdate", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsyn...
Updates a failover group. @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 containing the failover group. @param failoverGroupName The name of the failover group. @pa...
[ "Updates", "a", "failover", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/FailoverGroupsInner.java#L695-L702
adyliu/jafka
src/main/java/io/jafka/utils/zookeeper/ZkUtils.java
ZkUtils.createEphemeralPath
public static void createEphemeralPath(ZkClient zkClient, String path, String data) { """ Create an ephemeral node with the given path and data. Create parents if necessary. @param zkClient client of zookeeper @param path node path of zookeeper @param data node data """ try { zkClient.cr...
java
public static void createEphemeralPath(ZkClient zkClient, String path, String data) { try { zkClient.createEphemeral(path, Utils.getBytes(data)); } catch (ZkNoNodeException e) { createParentPath(zkClient, path); zkClient.createEphemeral(path, Utils.getBytes(data)); ...
[ "public", "static", "void", "createEphemeralPath", "(", "ZkClient", "zkClient", ",", "String", "path", ",", "String", "data", ")", "{", "try", "{", "zkClient", ".", "createEphemeral", "(", "path", ",", "Utils", ".", "getBytes", "(", "data", ")", ")", ";", ...
Create an ephemeral node with the given path and data. Create parents if necessary. @param zkClient client of zookeeper @param path node path of zookeeper @param data node data
[ "Create", "an", "ephemeral", "node", "with", "the", "given", "path", "and", "data", ".", "Create", "parents", "if", "necessary", "." ]
train
https://github.com/adyliu/jafka/blob/cc14d2ed60c039b12d7b106bb5269ef21d0add7e/src/main/java/io/jafka/utils/zookeeper/ZkUtils.java#L197-L204
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/ColumnLayoutRenderer.java
ColumnLayoutRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WPanel's children. @param component the container to paint. @param renderContext the RenderContext to paint to. """ WPanel panel = (WPanel) component; XmlStringBuilder xml = rende...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WPanel panel = (WPanel) component; XmlStringBuilder xml = renderContext.getWriter(); ColumnLayout layout = (ColumnLayout) panel.getLayout(); int childCount = panel.getChildCount(); Size hgap = layout.getHori...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WPanel", "panel", "=", "(", "WPanel", ")", "component", ";", "XmlStringBuilder", "xml", "=", "renderContext", ...
Paints the given WPanel's children. @param component the container to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WPanel", "s", "children", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/ColumnLayoutRenderer.java#L26-L78
alkacon/opencms-core
src/org/opencms/file/CmsUser.java
CmsUser.setAdditionalInfo
public void setAdditionalInfo(String key, Object value) { """ Stores a value in this users "additional information" storage map with the given access key.<p> @param key the key to store the value under @param value the value to store in the users "additional information" storage map @see #getAdditionalInfo(...
java
public void setAdditionalInfo(String key, Object value) { if (key == null) { throw new CmsIllegalArgumentException( Messages.get().container(Messages.ERR_USER_ADDINFO_KEY_NULL_1, getFullName())); } m_additionalInfo.put(key, value); }
[ "public", "void", "setAdditionalInfo", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "key", "==", "null", ")", "{", "throw", "new", "CmsIllegalArgumentException", "(", "Messages", ".", "get", "(", ")", ".", "container", "(", "Messages"...
Stores a value in this users "additional information" storage map with the given access key.<p> @param key the key to store the value under @param value the value to store in the users "additional information" storage map @see #getAdditionalInfo()
[ "Stores", "a", "value", "in", "this", "users", "additional", "information", "storage", "map", "with", "the", "given", "access", "key", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsUser.java#L665-L672
lightblueseas/file-worker
src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java
WriteFileExtensions.write2File
public static void write2File(final String inputFile, final Writer writer) throws FileNotFoundException, IOException { """ The Method write2File() writes the File into the PrintWriter. @param inputFile The Name from the File to read and copy. @param writer The PrintWriter to write into. @throws FileNotFou...
java
public static void write2File(final String inputFile, final Writer writer) throws FileNotFoundException, IOException { try (BufferedReader bufferedReader = new BufferedReader(new FileReader(inputFile));) { write2File(bufferedReader, writer); } }
[ "public", "static", "void", "write2File", "(", "final", "String", "inputFile", ",", "final", "Writer", "writer", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "try", "(", "BufferedReader", "bufferedReader", "=", "new", "BufferedReader", "(", "ne...
The Method write2File() writes the File into the PrintWriter. @param inputFile The Name from the File to read and copy. @param writer The PrintWriter to write into. @throws FileNotFoundException is thrown if an attempt to open the file denoted by a specified pathname has failed. @throws IOException Signals that an I/O...
[ "The", "Method", "write2File", "()", "writes", "the", "File", "into", "the", "PrintWriter", "." ]
train
https://github.com/lightblueseas/file-worker/blob/2c81de10fb5d68de64c1abc3ed64ca681ce76da8/src/main/java/de/alpharogroup/file/write/WriteFileExtensions.java#L208-L215
michael-rapp/AndroidUtil
library/src/main/java/de/mrapp/android/util/AppUtil.java
AppUtil.startCall
@RequiresPermission(Manifest.permission.CALL_PHONE) public static void startCall(@NonNull final Context context, @NonNull final String phoneNumber) { """ Starts the dialer in order to call a specific phone number. The call is immediately started, requiring the invoking app to ...
java
@RequiresPermission(Manifest.permission.CALL_PHONE) public static void startCall(@NonNull final Context context, @NonNull final String phoneNumber) { Condition.INSTANCE.ensureNotNull(context, "The context may not be null"); Condition.INSTANCE.ensureNotNull(phoneNumbe...
[ "@", "RequiresPermission", "(", "Manifest", ".", "permission", ".", "CALL_PHONE", ")", "public", "static", "void", "startCall", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "NonNull", "final", "String", "phoneNumber", ")", "{", "Condition", "....
Starts the dialer in order to call a specific phone number. The call is immediately started, requiring the invoking app to have the permission <code>android.permission.CALL_PHONE</code> granted, otherwise a {@link SecurityException} will be thrown. If an error occurs while starting the dialer, an {@link ActivityNotFoun...
[ "Starts", "the", "dialer", "in", "order", "to", "call", "a", "specific", "phone", "number", ".", "The", "call", "is", "immediately", "started", "requiring", "the", "invoking", "app", "to", "have", "the", "permission", "<code", ">", "android", ".", "permissio...
train
https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/AppUtil.java#L414-L428
Alluxio/alluxio
core/common/src/main/java/alluxio/util/io/ByteIOUtils.java
ByteIOUtils.writeByte
public static void writeByte(byte[] buf, int pos, byte v) { """ Writes a single byte value (1 byte) to the output byte array at the given offset. @param buf output byte buffer @param pos offset into the byte buffer to write @param v byte value to write """ checkBoundary(buf, pos, 1); buf[pos] = v;...
java
public static void writeByte(byte[] buf, int pos, byte v) { checkBoundary(buf, pos, 1); buf[pos] = v; }
[ "public", "static", "void", "writeByte", "(", "byte", "[", "]", "buf", ",", "int", "pos", ",", "byte", "v", ")", "{", "checkBoundary", "(", "buf", ",", "pos", ",", "1", ")", ";", "buf", "[", "pos", "]", "=", "v", ";", "}" ]
Writes a single byte value (1 byte) to the output byte array at the given offset. @param buf output byte buffer @param pos offset into the byte buffer to write @param v byte value to write
[ "Writes", "a", "single", "byte", "value", "(", "1", "byte", ")", "to", "the", "output", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/core/common/src/main/java/alluxio/util/io/ByteIOUtils.java#L110-L113
inkstand-io/scribble
scribble-core/src/main/java/io/inkstand/scribble/rules/ExternalResource.java
ExternalResource.apply
@Override public Statement apply(final Statement base, final Description description) { """ Verifies if the caller is a Suite and triggers the beforeClass and afterClass behavior. """ if (description.isSuite()) { return super.apply(classStatement(base), description); } r...
java
@Override public Statement apply(final Statement base, final Description description) { if (description.isSuite()) { return super.apply(classStatement(base), description); } return super.apply(statement(base), description); }
[ "@", "Override", "public", "Statement", "apply", "(", "final", "Statement", "base", ",", "final", "Description", "description", ")", "{", "if", "(", "description", ".", "isSuite", "(", ")", ")", "{", "return", "super", ".", "apply", "(", "classStatement", ...
Verifies if the caller is a Suite and triggers the beforeClass and afterClass behavior.
[ "Verifies", "if", "the", "caller", "is", "a", "Suite", "and", "triggers", "the", "beforeClass", "and", "afterClass", "behavior", "." ]
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-core/src/main/java/io/inkstand/scribble/rules/ExternalResource.java#L42-L48
carewebframework/carewebframework-core
org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementUI.java
ElementUI.createFromTemplate
protected BaseUIComponent createFromTemplate(String template, BaseComponent parent, Object controller) { """ Create wrapped component(s) from specified template (a cwf page). @param template URL of cwf page that will serve as a template. If the URL is not specified, the template name is obtained from getTempla...
java
protected BaseUIComponent createFromTemplate(String template, BaseComponent parent, Object controller) { if (StringUtils.isEmpty(template)) { template = getTemplateUrl(); } else if (!template.startsWith("web/")) { template = CWFUtil.getResourcePath(getClass()) + template; ...
[ "protected", "BaseUIComponent", "createFromTemplate", "(", "String", "template", ",", "BaseComponent", "parent", ",", "Object", "controller", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "template", ")", ")", "{", "template", "=", "getTemplateUrl", "...
Create wrapped component(s) from specified template (a cwf page). @param template URL of cwf page that will serve as a template. If the URL is not specified, the template name is obtained from getTemplateUrl. @param parent The component that will become the parent. @param controller If specified, events and variables ...
[ "Create", "wrapped", "component", "(", "s", ")", "from", "specified", "template", "(", "a", "cwf", "page", ")", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.shell/src/main/java/org/carewebframework/shell/elements/ElementUI.java#L160-L177
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.beginUpdateTagsAsync
public Observable<VirtualNetworkGatewayInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map<String, String> tags) { """ Updates a virtual network gateway tags. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtua...
java
public Observable<VirtualNetworkGatewayInner> beginUpdateTagsAsync(String resourceGroupName, String virtualNetworkGatewayName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, tags).map(new Func1<ServiceResponse<VirtualNetworkGatewayInner>,...
[ "public", "Observable", "<", "VirtualNetworkGatewayInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ",", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "return", "beginUpdateTagsWithService...
Updates a virtual network gateway tags. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @param tags Resource tags. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the VirtualNetworkGat...
[ "Updates", "a", "virtual", "network", "gateway", "tags", "." ]
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/VirtualNetworkGatewaysInner.java#L862-L869
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
ComputerVisionImpl.recognizePrintedText
public OcrResult recognizePrintedText(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter) { """ Optical Character Recognition (OCR) detects printed text in an image and extracts the recognized characters into a machine-usable character stream. Upon ...
java
public OcrResult recognizePrintedText(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter) { return recognizePrintedTextWithServiceResponseAsync(detectOrientation, url, recognizePrintedTextOptionalParameter).toBlocking().single().body(); }
[ "public", "OcrResult", "recognizePrintedText", "(", "boolean", "detectOrientation", ",", "String", "url", ",", "RecognizePrintedTextOptionalParameter", "recognizePrintedTextOptionalParameter", ")", "{", "return", "recognizePrintedTextWithServiceResponseAsync", "(", "detectOrientati...
Optical Character Recognition (OCR) detects printed text in an image and extracts the recognized characters into a machine-usable character stream. Upon success, the OCR results will be returned. Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl...
[ "Optical", "Character", "Recognition", "(", "OCR", ")", "detects", "printed", "text", "in", "an", "image", "and", "extracts", "the", "recognized", "characters", "into", "a", "machine", "-", "usable", "character", "stream", ".", "Upon", "success", "the", "OCR",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java#L1900-L1902
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.createOrUpdateAsync
public Observable<VirtualMachineScaleSetInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { """ Create or update a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set to creat...
java
public Observable<VirtualMachineScaleSetInner> createOrUpdateAsync(String resourceGroupName, String vmScaleSetName, VirtualMachineScaleSetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, parameters).map(new Func1<ServiceResponse<VirtualMachineScaleSetInner>, V...
[ "public", "Observable", "<", "VirtualMachineScaleSetInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ",", "VirtualMachineScaleSetInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "r...
Create or update a VM scale set. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale set to create or update. @param parameters The scale set object. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable for the request
[ "Create", "or", "update", "a", "VM", "scale", "set", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L232-L239
morfologik/morfologik-stemming
morfologik-fsa/src/main/java/morfologik/fsa/FSA.java
FSA.visitInPostOrder
public <T extends StateVisitor> T visitInPostOrder(T v, int node) { """ Visits all states reachable from <code>node</code> in postorder. Returning false from {@link StateVisitor#accept(int)} immediately terminates the traversal. @param v Visitor to receive traversal calls. @param <T> A subclass of {@link Sta...
java
public <T extends StateVisitor> T visitInPostOrder(T v, int node) { visitInPostOrder(v, node, new BitSet()); return v; }
[ "public", "<", "T", "extends", "StateVisitor", ">", "T", "visitInPostOrder", "(", "T", "v", ",", "int", "node", ")", "{", "visitInPostOrder", "(", "v", ",", "node", ",", "new", "BitSet", "(", ")", ")", ";", "return", "v", ";", "}" ]
Visits all states reachable from <code>node</code> in postorder. Returning false from {@link StateVisitor#accept(int)} immediately terminates the traversal. @param v Visitor to receive traversal calls. @param <T> A subclass of {@link StateVisitor}. @param node Identifier of the node. @return Returns the argument (for ...
[ "Visits", "all", "states", "reachable", "from", "<code", ">", "node<", "/", "code", ">", "in", "postorder", ".", "Returning", "false", "from", "{", "@link", "StateVisitor#accept", "(", "int", ")", "}", "immediately", "terminates", "the", "traversal", "." ]
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-fsa/src/main/java/morfologik/fsa/FSA.java#L220-L223
Azure/azure-sdk-for-java
keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java
VaultsInner.updateAccessPolicy
public VaultAccessPolicyParametersInner updateAccessPolicy(String resourceGroupName, String vaultName, AccessPolicyUpdateKind operationKind, VaultAccessPolicyProperties properties) { """ Update access policies in a key vault in the specified subscription. @param resourceGroupName The name of the Resource Group ...
java
public VaultAccessPolicyParametersInner updateAccessPolicy(String resourceGroupName, String vaultName, AccessPolicyUpdateKind operationKind, VaultAccessPolicyProperties properties) { return updateAccessPolicyWithServiceResponseAsync(resourceGroupName, vaultName, operationKind, properties).toBlocking().single()....
[ "public", "VaultAccessPolicyParametersInner", "updateAccessPolicy", "(", "String", "resourceGroupName", ",", "String", "vaultName", ",", "AccessPolicyUpdateKind", "operationKind", ",", "VaultAccessPolicyProperties", "properties", ")", "{", "return", "updateAccessPolicyWithService...
Update access policies in a key vault in the specified subscription. @param resourceGroupName The name of the Resource Group to which the vault belongs. @param vaultName Name of the vault @param operationKind Name of the operation. Possible values include: 'add', 'replace', 'remove' @param properties Properties of the...
[ "Update", "access", "policies", "in", "a", "key", "vault", "in", "the", "specified", "subscription", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/resource-manager/v2016_10_01/src/main/java/com/microsoft/azure/management/keyvault/v2016_10_01/implementation/VaultsInner.java#L517-L519
codegist/crest
core/src/main/java/org/codegist/crest/CRestBuilder.java
CRestBuilder.setPlaceholders
public CRestBuilder setPlaceholders(Map<String,String> placeholders) { """ <p>Sets all given placeholders to the string-based annotations placeholders replacement map.</p> <p>Expects a map with keys being the placeholder name (used in string-based annotations) and with values being the value to be used as replace...
java
public CRestBuilder setPlaceholders(Map<String,String> placeholders) { this.placeholders.clear(); return addPlaceholders(placeholders); }
[ "public", "CRestBuilder", "setPlaceholders", "(", "Map", "<", "String", ",", "String", ">", "placeholders", ")", "{", "this", ".", "placeholders", ".", "clear", "(", ")", ";", "return", "addPlaceholders", "(", "placeholders", ")", ";", "}" ]
<p>Sets all given placeholders to the string-based annotations placeholders replacement map.</p> <p>Expects a map with keys being the placeholder name (used in string-based annotations) and with values being the value to be used as replacement.<p> <p>So for the given annotation:</p> <code><pre> &#64;EndPoint(&quot;http...
[ "<p", ">", "Sets", "all", "given", "placeholders", "to", "the", "string", "-", "based", "annotations", "placeholders", "replacement", "map", ".", "<", "/", "p", ">", "<p", ">", "Expects", "a", "map", "with", "keys", "being", "the", "placeholder", "name", ...
train
https://github.com/codegist/crest/blob/e99ba7728b27d2ddb2c247261350f1b6fa7a6698/core/src/main/java/org/codegist/crest/CRestBuilder.java#L468-L471
mozilla/rhino
src/org/mozilla/javascript/Kit.java
Kit.addListener
public static Object addListener(Object bag, Object listener) { """ Add <i>listener</i> to <i>bag</i> of listeners. The function does not modify <i>bag</i> and return a new collection containing <i>listener</i> and all listeners from <i>bag</i>. Bag without listeners always represented as the null value. <p> ...
java
public static Object addListener(Object bag, Object listener) { if (listener == null) throw new IllegalArgumentException(); if (listener instanceof Object[]) throw new IllegalArgumentException(); if (bag == null) { bag = listener; } else if (!(bag instanceof Object[])) {...
[ "public", "static", "Object", "addListener", "(", "Object", "bag", ",", "Object", "listener", ")", "{", "if", "(", "listener", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", ")", ";", "if", "(", "listener", "instanceof", "Object", "[", ...
Add <i>listener</i> to <i>bag</i> of listeners. The function does not modify <i>bag</i> and return a new collection containing <i>listener</i> and all listeners from <i>bag</i>. Bag without listeners always represented as the null value. <p> Usage example: <pre> private volatile Object changeListeners; public void add...
[ "Add", "<i", ">", "listener<", "/", "i", ">", "to", "<i", ">", "bag<", "/", "i", ">", "of", "listeners", ".", "The", "function", "does", "not", "modify", "<i", ">", "bag<", "/", "i", ">", "and", "return", "a", "new", "collection", "containing", "<i...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Kit.java#L195-L216
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java
TmdbMovies.getMovieKeywords
public ResultList<Keyword> getMovieKeywords(int movieId) throws MovieDbException { """ This method is used to retrieve all of the keywords that have been added to a particular movie. Currently, only English keywords exist. @param movieId @return @throws MovieDbException """ TmdbParameters param...
java
public ResultList<Keyword> getMovieKeywords(int movieId) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, movieId); URL url = new ApiUrl(apiKey, MethodBase.MOVIE).subMethod(MethodSub.KEYWORDS).buildUrl(parameters); String webpage = htt...
[ "public", "ResultList", "<", "Keyword", ">", "getMovieKeywords", "(", "int", "movieId", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", ".", "ID", ",",...
This method is used to retrieve all of the keywords that have been added to a particular movie. Currently, only English keywords exist. @param movieId @return @throws MovieDbException
[ "This", "method", "is", "used", "to", "retrieve", "all", "of", "the", "keywords", "that", "have", "been", "added", "to", "a", "particular", "movie", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbMovies.java#L248-L263