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 |
|---|---|---|---|---|---|---|---|---|---|---|
j256/ormlite-android | src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java | OrmLiteConfigUtil.writeConfigFile | public static void writeConfigFile(File configFile, Class<?>[] classes, boolean sortClasses)
throws SQLException, IOException {
"""
Write a configuration file with the configuration for classes.
@param sortClasses
Set to true to sort the classes by name before the file is generated.
"""
System.out.pri... | java | public static void writeConfigFile(File configFile, Class<?>[] classes, boolean sortClasses)
throws SQLException, IOException {
System.out.println("Writing configurations to " + configFile.getAbsolutePath());
writeConfigFile(new FileOutputStream(configFile), classes, sortClasses);
} | [
"public",
"static",
"void",
"writeConfigFile",
"(",
"File",
"configFile",
",",
"Class",
"<",
"?",
">",
"[",
"]",
"classes",
",",
"boolean",
"sortClasses",
")",
"throws",
"SQLException",
",",
"IOException",
"{",
"System",
".",
"out",
".",
"println",
"(",
"\... | Write a configuration file with the configuration for classes.
@param sortClasses
Set to true to sort the classes by name before the file is generated. | [
"Write",
"a",
"configuration",
"file",
"with",
"the",
"configuration",
"for",
"classes",
"."
] | train | https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/apptools/OrmLiteConfigUtil.java#L196-L200 |
yanzhenjie/AndServer | api/src/main/java/com/yanzhenjie/andserver/DispatcherHandler.java | DispatcherHandler.preHandle | private boolean preHandle(HttpRequest request, HttpResponse response, RequestHandler handler) throws Exception {
"""
Intercept the execution of a handler.
@param request current request.
@param response current response.
@param handler the corresponding handler of the current request.
@return true if the i... | java | private boolean preHandle(HttpRequest request, HttpResponse response, RequestHandler handler) throws Exception {
for (HandlerInterceptor interceptor : mInterceptorList) {
if (interceptor.onIntercept(request, response, handler)) return true;
}
return false;
} | [
"private",
"boolean",
"preHandle",
"(",
"HttpRequest",
"request",
",",
"HttpResponse",
"response",
",",
"RequestHandler",
"handler",
")",
"throws",
"Exception",
"{",
"for",
"(",
"HandlerInterceptor",
"interceptor",
":",
"mInterceptorList",
")",
"{",
"if",
"(",
"in... | Intercept the execution of a handler.
@param request current request.
@param response current response.
@param handler the corresponding handler of the current request.
@return true if the interceptor has processed the request and responded. | [
"Intercept",
"the",
"execution",
"of",
"a",
"handler",
"."
] | train | https://github.com/yanzhenjie/AndServer/blob/f95f316cdfa5755d6a3fec3c6a1b5df783b81517/api/src/main/java/com/yanzhenjie/andserver/DispatcherHandler.java#L182-L187 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java | LoaderUtil.newCheckedInstanceOf | public static <T> T newCheckedInstanceOf(final String className, final Class<T> clazz)
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException,
IllegalAccessException {
"""
Loads and instantiates a derived class using its default constructor.
... | java | public static <T> T newCheckedInstanceOf(final String className, final Class<T> clazz)
throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException,
IllegalAccessException {
return clazz.cast(newInstanceOf(className));
} | [
"public",
"static",
"<",
"T",
">",
"T",
"newCheckedInstanceOf",
"(",
"final",
"String",
"className",
",",
"final",
"Class",
"<",
"T",
">",
"clazz",
")",
"throws",
"ClassNotFoundException",
",",
"NoSuchMethodException",
",",
"InvocationTargetException",
",",
"Insta... | Loads and instantiates a derived class using its default constructor.
@param className The class name.
@param clazz The class to cast it to.
@param <T> The type of the class to check.
@return new instance of the class cast to {@code T}
@throws ClassNotFoundException if the class isn't available to the usual ClassLoade... | [
"Loads",
"and",
"instantiates",
"a",
"derived",
"class",
"using",
"its",
"default",
"constructor",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/LoaderUtil.java#L198-L202 |
h2oai/h2o-2 | src/main/java/water/ga/GoogleAnalytics.java | GoogleAnalytics.processCustomMetricParameters | private void processCustomMetricParameters(@SuppressWarnings("rawtypes") GoogleAnalyticsRequest request, List<NameValuePair> postParms) {
"""
Processes the custom metrics and adds the values to list of parameters, which would be posted to GA.
@param request
@param postParms
"""
Map<String, String> cust... | java | private void processCustomMetricParameters(@SuppressWarnings("rawtypes") GoogleAnalyticsRequest request, List<NameValuePair> postParms) {
Map<String, String> customMetricParms = new HashMap<String, String>();
for (String defaultCustomMetricKey : defaultRequest.custommMetrics().keySet()) {
customMetricParm... | [
"private",
"void",
"processCustomMetricParameters",
"(",
"@",
"SuppressWarnings",
"(",
"\"rawtypes\"",
")",
"GoogleAnalyticsRequest",
"request",
",",
"List",
"<",
"NameValuePair",
">",
"postParms",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"customMetricPar... | Processes the custom metrics and adds the values to list of parameters, which would be posted to GA.
@param request
@param postParms | [
"Processes",
"the",
"custom",
"metrics",
"and",
"adds",
"the",
"values",
"to",
"list",
"of",
"parameters",
"which",
"would",
"be",
"posted",
"to",
"GA",
"."
] | train | https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/water/ga/GoogleAnalytics.java#L240-L255 |
NextFaze/power-adapters | power-adapters/src/main/java/com/nextfaze/poweradapters/PowerAdapter.java | PowerAdapter.showOnlyWhile | @CheckResult
@NonNull
public final PowerAdapter showOnlyWhile(@NonNull Condition condition) {
"""
Returns a new adapter that presents the items of this adapter only while the specified condition evaluates to
{@code true}.
@param condition The condition dictating whether to show the items.
@return A new ... | java | @CheckResult
@NonNull
public final PowerAdapter showOnlyWhile(@NonNull Condition condition) {
checkNotNull(condition, "condition");
if (condition instanceof ConstantCondition) {
if (condition.eval()) {
return this;
} else {
return EMPTY;
... | [
"@",
"CheckResult",
"@",
"NonNull",
"public",
"final",
"PowerAdapter",
"showOnlyWhile",
"(",
"@",
"NonNull",
"Condition",
"condition",
")",
"{",
"checkNotNull",
"(",
"condition",
",",
"\"condition\"",
")",
";",
"if",
"(",
"condition",
"instanceof",
"ConstantCondit... | Returns a new adapter that presents the items of this adapter only while the specified condition evaluates to
{@code true}.
@param condition The condition dictating whether to show the items.
@return A new adapter. | [
"Returns",
"a",
"new",
"adapter",
"that",
"presents",
"the",
"items",
"of",
"this",
"adapter",
"only",
"while",
"the",
"specified",
"condition",
"evaluates",
"to",
"{"
] | train | https://github.com/NextFaze/power-adapters/blob/cdf00b1b723ed9d6bcd549ae9741a19dd59651e1/power-adapters/src/main/java/com/nextfaze/poweradapters/PowerAdapter.java#L517-L529 |
joniles/mpxj | src/main/java/net/sf/mpxj/turboproject/TurboProjectReader.java | TurboProjectReader.readWBS | private void readWBS(ChildTaskContainer parent, Integer id) {
"""
Recursively read the WBS structure from a PEP file.
@param parent parent container for tasks
@param id initial WBS ID
"""
Integer currentID = id;
Table table = getTable("WBSTAB");
while (currentID.intValue() != 0)
{
... | java | private void readWBS(ChildTaskContainer parent, Integer id)
{
Integer currentID = id;
Table table = getTable("WBSTAB");
while (currentID.intValue() != 0)
{
MapRow row = table.find(currentID);
Integer taskID = row.getInteger("TASK_ID");
Task task = readTask(parent, ... | [
"private",
"void",
"readWBS",
"(",
"ChildTaskContainer",
"parent",
",",
"Integer",
"id",
")",
"{",
"Integer",
"currentID",
"=",
"id",
";",
"Table",
"table",
"=",
"getTable",
"(",
"\"WBSTAB\"",
")",
";",
"while",
"(",
"currentID",
".",
"intValue",
"(",
")",... | Recursively read the WBS structure from a PEP file.
@param parent parent container for tasks
@param id initial WBS ID | [
"Recursively",
"read",
"the",
"WBS",
"structure",
"from",
"a",
"PEP",
"file",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/turboproject/TurboProjectReader.java#L300-L317 |
QSFT/Doradus | doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java | ServerParams.getModuleParamString | public String getModuleParamString(String moduleName, String paramName) {
"""
Get the String value of the given parameter name belonging to the given module
name. If no such module/parameter name is known, null is returned. If the parameter
exists, a string is created by calling toString().
@param moduleName ... | java | public String getModuleParamString(String moduleName, String paramName) {
Map<String, Object> moduleParams = getModuleParams(moduleName);
if (moduleParams == null || !moduleParams.containsKey(paramName)) {
return null;
}
return moduleParams.get(paramName).toString();
... | [
"public",
"String",
"getModuleParamString",
"(",
"String",
"moduleName",
",",
"String",
"paramName",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"moduleParams",
"=",
"getModuleParams",
"(",
"moduleName",
")",
";",
"if",
"(",
"moduleParams",
"==",
"null... | Get the String value of the given parameter name belonging to the given module
name. If no such module/parameter name is known, null is returned. If the parameter
exists, a string is created by calling toString().
@param moduleName Name of module to get parameter for.
@param paramName Name of parameter to get v... | [
"Get",
"the",
"String",
"value",
"of",
"the",
"given",
"parameter",
"name",
"belonging",
"to",
"the",
"given",
"module",
"name",
".",
"If",
"no",
"such",
"module",
"/",
"parameter",
"name",
"is",
"known",
"null",
"is",
"returned",
".",
"If",
"the",
"para... | train | https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/core/ServerParams.java#L405-L411 |
rhuss/jolokia | agent/core/src/main/java/org/jolokia/http/AgentServlet.java | AgentServlet.createLogHandler | protected LogHandler createLogHandler(ServletConfig pServletConfig, final boolean pDebug) {
"""
Create a log handler using this servlet's logging facility for logging. This method can be overridden
to provide a custom log handler. This method is called before {@link RestrictorFactory#createRestrictor(Configuratio... | java | protected LogHandler createLogHandler(ServletConfig pServletConfig, final boolean pDebug) {
return new LogHandler() {
/** {@inheritDoc} */
public void debug(String message) {
if (pDebug) {
log(message);
}
}
/** ... | [
"protected",
"LogHandler",
"createLogHandler",
"(",
"ServletConfig",
"pServletConfig",
",",
"final",
"boolean",
"pDebug",
")",
"{",
"return",
"new",
"LogHandler",
"(",
")",
"{",
"/** {@inheritDoc} */",
"public",
"void",
"debug",
"(",
"String",
"message",
")",
"{",... | Create a log handler using this servlet's logging facility for logging. This method can be overridden
to provide a custom log handler. This method is called before {@link RestrictorFactory#createRestrictor(Configuration,LogHandler)} so the log handler
can already be used when building up the restrictor.
@return a defa... | [
"Create",
"a",
"log",
"handler",
"using",
"this",
"servlet",
"s",
"logging",
"facility",
"for",
"logging",
".",
"This",
"method",
"can",
"be",
"overridden",
"to",
"provide",
"a",
"custom",
"log",
"handler",
".",
"This",
"method",
"is",
"called",
"before",
... | train | https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/http/AgentServlet.java#L241-L260 |
UrielCh/ovh-java-sdk | ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java | ApiOvhPackxdsl.packName_migration_migrate_POST | public OvhTask packName_migration_migrate_POST(String packName, Boolean acceptContracts, String buildingReference, Long engageMonths, String floor, Long mondialRelayId, String nicShipping, String offerName, OvhOfferOption[] options, Boolean otp, String otpReference, String stair, OvhOfferServiceToDelete[] subServicesTo... | java | public OvhTask packName_migration_migrate_POST(String packName, Boolean acceptContracts, String buildingReference, Long engageMonths, String floor, Long mondialRelayId, String nicShipping, String offerName, OvhOfferOption[] options, Boolean otp, String otpReference, String stair, OvhOfferServiceToDelete[] subServicesTo... | [
"public",
"OvhTask",
"packName_migration_migrate_POST",
"(",
"String",
"packName",
",",
"Boolean",
"acceptContracts",
",",
"String",
"buildingReference",
",",
"Long",
"engageMonths",
",",
"String",
"floor",
",",
"Long",
"mondialRelayId",
",",
"String",
"nicShipping",
... | Migrate to the selected offer
REST: POST /pack/xdsl/{packName}/migration/migrate
@param nicShipping [required] nicShipping if a shipping is needed
@param floor [required] Floor identifier, "_NA_" if no identifier is available
@param buildingReference [required] Building reference for FTTH offers
@param mondialRelayId ... | [
"Migrate",
"to",
"the",
"selected",
"offer"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-packxdsl/src/main/java/net/minidev/ovh/api/ApiOvhPackxdsl.java#L912-L930 |
cryptomator/cryptofs | src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProperties.java | CryptoFileSystemProperties.wrap | public static CryptoFileSystemProperties wrap(Map<String, ?> properties) {
"""
Constructs {@code CryptoFileSystemProperties} from a {@link Map}.
@param properties the {@code Map} to convert
@return the passed in {@code Map} if already of type {@code CryptoFileSystemProperties} or a new {@code CryptoFileSystemP... | java | public static CryptoFileSystemProperties wrap(Map<String, ?> properties) {
if (properties instanceof CryptoFileSystemProperties) {
return (CryptoFileSystemProperties) properties;
} else {
try {
return cryptoFileSystemPropertiesFrom(properties).build();
} catch (IllegalStateException e) {
thr... | [
"public",
"static",
"CryptoFileSystemProperties",
"wrap",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"properties",
")",
"{",
"if",
"(",
"properties",
"instanceof",
"CryptoFileSystemProperties",
")",
"{",
"return",
"(",
"CryptoFileSystemProperties",
")",
"properties",... | Constructs {@code CryptoFileSystemProperties} from a {@link Map}.
@param properties the {@code Map} to convert
@return the passed in {@code Map} if already of type {@code CryptoFileSystemProperties} or a new {@code CryptoFileSystemProperties} instance holding the values from the {@code Map}
@throws IllegalArgumentExce... | [
"Constructs",
"{",
"@code",
"CryptoFileSystemProperties",
"}",
"from",
"a",
"{",
"@link",
"Map",
"}",
"."
] | train | https://github.com/cryptomator/cryptofs/blob/67fc1a4950dd1c150cd2e2c75bcabbeb7c9ac82e/src/main/java/org/cryptomator/cryptofs/CryptoFileSystemProperties.java#L202-L212 |
apache/incubator-shardingsphere | sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/connection/BackendConnection.java | BackendConnection.getConnections | public List<Connection> getConnections(final ConnectionMode connectionMode, final String dataSourceName, final int connectionSize) throws SQLException {
"""
Get connections of current thread datasource.
@param connectionMode connection mode
@param dataSourceName data source name
@param connectionSize size of ... | java | public List<Connection> getConnections(final ConnectionMode connectionMode, final String dataSourceName, final int connectionSize) throws SQLException {
if (stateHandler.isInTransaction()) {
return getConnectionsWithTransaction(connectionMode, dataSourceName, connectionSize);
} else {
... | [
"public",
"List",
"<",
"Connection",
">",
"getConnections",
"(",
"final",
"ConnectionMode",
"connectionMode",
",",
"final",
"String",
"dataSourceName",
",",
"final",
"int",
"connectionSize",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"stateHandler",
".",
"isIn... | Get connections of current thread datasource.
@param connectionMode connection mode
@param dataSourceName data source name
@param connectionSize size of connections to be get
@return connections
@throws SQLException SQL exception | [
"Get",
"connections",
"of",
"current",
"thread",
"datasource",
"."
] | train | https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-backend/src/main/java/org/apache/shardingsphere/shardingproxy/backend/communication/jdbc/connection/BackendConnection.java#L137-L143 |
enioka/jqm | jqm-all/jqm-runner/jqm-runner-shell/src/main/java/com/enioka/jqm/tools/OsHelpers.java | OsHelpers.addAllParametersAsSingleString | private static void addAllParametersAsSingleString(List<String> resultList, String commandLine, Map<String, String> prms) {
"""
When using /bin/sh -c "..." there is a single argument to the process. This method builds it.<br>
Note we encourange users through the GUI to only specify the whole shell command in a si... | java | private static void addAllParametersAsSingleString(List<String> resultList, String commandLine, Map<String, String> prms)
{
List<String> raw = new ArrayList<>(prms.size() * 2);
// Command itself
raw.add(commandLine);
// Parameters, ordered by key
List<String> keys = new Arr... | [
"private",
"static",
"void",
"addAllParametersAsSingleString",
"(",
"List",
"<",
"String",
">",
"resultList",
",",
"String",
"commandLine",
",",
"Map",
"<",
"String",
",",
"String",
">",
"prms",
")",
"{",
"List",
"<",
"String",
">",
"raw",
"=",
"new",
"Arr... | When using /bin/sh -c "..." there is a single argument to the process. This method builds it.<br>
Note we encourange users through the GUI to only specify the whole shell command in a single field. Only XML imports may result in
multiple arguments.
@param resultList
@param ji | [
"When",
"using",
"/",
"bin",
"/",
"sh",
"-",
"c",
"...",
"there",
"is",
"a",
"single",
"argument",
"to",
"the",
"process",
".",
"This",
"method",
"builds",
"it",
".",
"<br",
">",
"Note",
"we",
"encourange",
"users",
"through",
"the",
"GUI",
"to",
"on... | train | https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-runner/jqm-runner-shell/src/main/java/com/enioka/jqm/tools/OsHelpers.java#L81-L103 |
lagom/lagom | service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/Descriptor.java | Descriptor.withExceptionSerializer | public Descriptor withExceptionSerializer(ExceptionSerializer exceptionSerializer) {
"""
Use the given exception serializer to serialize and deserialized exceptions handled by this service.
@param exceptionSerializer The exception handler to use.
@return A copy of this descriptor.
"""
return new De... | java | public Descriptor withExceptionSerializer(ExceptionSerializer exceptionSerializer) {
return new Descriptor(name, calls, pathParamSerializers, messageSerializers, serializerFactory, exceptionSerializer, autoAcl, acls, headerFilter, locatableService, circuitBreaker, topicCalls);
} | [
"public",
"Descriptor",
"withExceptionSerializer",
"(",
"ExceptionSerializer",
"exceptionSerializer",
")",
"{",
"return",
"new",
"Descriptor",
"(",
"name",
",",
"calls",
",",
"pathParamSerializers",
",",
"messageSerializers",
",",
"serializerFactory",
",",
"exceptionSeria... | Use the given exception serializer to serialize and deserialized exceptions handled by this service.
@param exceptionSerializer The exception handler to use.
@return A copy of this descriptor. | [
"Use",
"the",
"given",
"exception",
"serializer",
"to",
"serialize",
"and",
"deserialized",
"exceptions",
"handled",
"by",
"this",
"service",
"."
] | train | https://github.com/lagom/lagom/blob/3763055a9d1aace793a5d970f4e688aea61b1a5a/service/javadsl/api/src/main/java/com/lightbend/lagom/javadsl/api/Descriptor.java#L760-L762 |
FasterXML/jackson-jr | jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/JSONObjectException.java | JSONObjectException.wrapWithPath | public static JSONObjectException wrapWithPath(Throwable src, Object refFrom,
int index) {
"""
Method that can be called to either create a new JsonMappingException
(if underlying exception is not a JsonMappingException), or augment
given exception with given p... | java | public static JSONObjectException wrapWithPath(Throwable src, Object refFrom,
int index)
{
return wrapWithPath(src, new Reference(refFrom, index));
} | [
"public",
"static",
"JSONObjectException",
"wrapWithPath",
"(",
"Throwable",
"src",
",",
"Object",
"refFrom",
",",
"int",
"index",
")",
"{",
"return",
"wrapWithPath",
"(",
"src",
",",
"new",
"Reference",
"(",
"refFrom",
",",
"index",
")",
")",
";",
"}"
] | Method that can be called to either create a new JsonMappingException
(if underlying exception is not a JsonMappingException), or augment
given exception with given path/reference information.
This version of method is called when the reference is through an
index, which happens with arrays and Collections. | [
"Method",
"that",
"can",
"be",
"called",
"to",
"either",
"create",
"a",
"new",
"JsonMappingException",
"(",
"if",
"underlying",
"exception",
"is",
"not",
"a",
"JsonMappingException",
")",
"or",
"augment",
"given",
"exception",
"with",
"given",
"path",
"/",
"re... | train | https://github.com/FasterXML/jackson-jr/blob/62ca7a82bd90a9be77028e0b62364307d7532837/jr-objects/src/main/java/com/fasterxml/jackson/jr/ob/JSONObjectException.java#L215-L219 |
joniles/mpxj | src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java | PrimaveraReader.addUserDefinedField | private void addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name) {
"""
Configure a new user defined field.
@param fieldType field type
@param dataType field data type
@param name field name
"""
try
{
switch (fieldType)
{
case TAS... | java | private void addUserDefinedField(FieldTypeClass fieldType, UserFieldDataType dataType, String name)
{
try
{
switch (fieldType)
{
case TASK:
TaskField taskField;
do
{
taskField = m_taskUdfCounters.nextField(TaskF... | [
"private",
"void",
"addUserDefinedField",
"(",
"FieldTypeClass",
"fieldType",
",",
"UserFieldDataType",
"dataType",
",",
"String",
"name",
")",
"{",
"try",
"{",
"switch",
"(",
"fieldType",
")",
"{",
"case",
"TASK",
":",
"TaskField",
"taskField",
";",
"do",
"{"... | Configure a new user defined field.
@param fieldType field type
@param dataType field data type
@param name field name | [
"Configure",
"a",
"new",
"user",
"defined",
"field",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L814-L871 |
gallandarakhneorg/afc | advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java | BusNetwork.getNearestBusHub | @Pure
public BusHub getNearestBusHub(double x, double y) {
"""
Replies the nearest bus hub to the given point.
@param x x coordinate.
@param y y coordinate.
@return the nearest bus hub or <code>null</code> if none was found.
"""
double distance = Double.POSITIVE_INFINITY;
BusHub bestHub = null;
dou... | java | @Pure
public BusHub getNearestBusHub(double x, double y) {
double distance = Double.POSITIVE_INFINITY;
BusHub bestHub = null;
double dist;
for (final BusHub hub : this.validBusHubs) {
dist = hub.distance(x, y);
if (dist < distance) {
distance = dist;
bestHub = hub;
}
}
return bestHub;
} | [
"@",
"Pure",
"public",
"BusHub",
"getNearestBusHub",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"double",
"distance",
"=",
"Double",
".",
"POSITIVE_INFINITY",
";",
"BusHub",
"bestHub",
"=",
"null",
";",
"double",
"dist",
";",
"for",
"(",
"final",
... | Replies the nearest bus hub to the given point.
@param x x coordinate.
@param y y coordinate.
@return the nearest bus hub or <code>null</code> if none was found. | [
"Replies",
"the",
"nearest",
"bus",
"hub",
"to",
"the",
"given",
"point",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisbus/src/main/java/org/arakhne/afc/gis/bus/network/BusNetwork.java#L1371-L1386 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocolhttp_stats.java | protocolhttp_stats.get | public static protocolhttp_stats get(nitro_service service, options option) throws Exception {
"""
Use this API to fetch the statistics of all protocolhttp_stats resources that are configured on netscaler.
"""
protocolhttp_stats obj = new protocolhttp_stats();
protocolhttp_stats[] response = (protocolhttp... | java | public static protocolhttp_stats get(nitro_service service, options option) throws Exception{
protocolhttp_stats obj = new protocolhttp_stats();
protocolhttp_stats[] response = (protocolhttp_stats[])obj.stat_resources(service,option);
return response[0];
} | [
"public",
"static",
"protocolhttp_stats",
"get",
"(",
"nitro_service",
"service",
",",
"options",
"option",
")",
"throws",
"Exception",
"{",
"protocolhttp_stats",
"obj",
"=",
"new",
"protocolhttp_stats",
"(",
")",
";",
"protocolhttp_stats",
"[",
"]",
"response",
"... | Use this API to fetch the statistics of all protocolhttp_stats resources that are configured on netscaler. | [
"Use",
"this",
"API",
"to",
"fetch",
"the",
"statistics",
"of",
"all",
"protocolhttp_stats",
"resources",
"that",
"are",
"configured",
"on",
"netscaler",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/stat/protocol/protocolhttp_stats.java#L610-L614 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java | CPOptionValuePersistenceImpl.removeByUUID_G | @Override
public CPOptionValue removeByUUID_G(String uuid, long groupId)
throws NoSuchCPOptionValueException {
"""
Removes the cp option value where uuid = ? and groupId = ? from the database.
@param uuid the uuid
@param groupId the group ID
@return the cp option value that was removed
"""
CP... | java | @Override
public CPOptionValue removeByUUID_G(String uuid, long groupId)
throws NoSuchCPOptionValueException {
CPOptionValue cpOptionValue = findByUUID_G(uuid, groupId);
return remove(cpOptionValue);
} | [
"@",
"Override",
"public",
"CPOptionValue",
"removeByUUID_G",
"(",
"String",
"uuid",
",",
"long",
"groupId",
")",
"throws",
"NoSuchCPOptionValueException",
"{",
"CPOptionValue",
"cpOptionValue",
"=",
"findByUUID_G",
"(",
"uuid",
",",
"groupId",
")",
";",
"return",
... | Removes the cp option value where uuid = ? and groupId = ? from the database.
@param uuid the uuid
@param groupId the group ID
@return the cp option value that was removed | [
"Removes",
"the",
"cp",
"option",
"value",
"where",
"uuid",
"=",
"?",
";",
"and",
"groupId",
"=",
"?",
";",
"from",
"the",
"database",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionValuePersistenceImpl.java#L810-L816 |
sundrio/sundrio | codegen/src/main/java/io/sundr/codegen/processor/JavaGeneratingProcessor.java | JavaGeneratingProcessor.generateFromStringTemplate | public <T> void generateFromStringTemplate(T model, String[] parameters, FileObject fileObject, String content) throws IOException {
"""
Generates a source file from the specified {@link io.sundr.codegen.model.TypeDef}.
@param model The model of the class to generate.
@param parameters The external ... | java | public <T> void generateFromStringTemplate(T model, String[] parameters, FileObject fileObject, String content) throws IOException {
if (fileObject.getName().endsWith(SOURCE_SUFFIX)) {
TypeDef newModel = createTypeFromTemplate(model, parameters, content);
if (processingEnv.getElementUti... | [
"public",
"<",
"T",
">",
"void",
"generateFromStringTemplate",
"(",
"T",
"model",
",",
"String",
"[",
"]",
"parameters",
",",
"FileObject",
"fileObject",
",",
"String",
"content",
")",
"throws",
"IOException",
"{",
"if",
"(",
"fileObject",
".",
"getName",
"(... | Generates a source file from the specified {@link io.sundr.codegen.model.TypeDef}.
@param model The model of the class to generate.
@param parameters The external parameters to pass to the template.
@param fileObject Where to save the generated class.
@param content The template to use.
@throws IOE... | [
"Generates",
"a",
"source",
"file",
"from",
"the",
"specified",
"{",
"@link",
"io",
".",
"sundr",
".",
"codegen",
".",
"model",
".",
"TypeDef",
"}",
"."
] | train | https://github.com/sundrio/sundrio/blob/4e38368f4db0d950f7c41a8c75e15b0baff1f69a/codegen/src/main/java/io/sundr/codegen/processor/JavaGeneratingProcessor.java#L108-L129 |
pgjdbc/pgjdbc | pgjdbc/src/main/java/org/postgresql/ds/PGPoolingDataSource.java | PGPoolingDataSource.getConnection | public Connection getConnection(String user, String password) throws SQLException {
"""
Gets a <b>non-pooled</b> connection, unless the user and password are the same as the default
values for this connection pool.
@return A pooled connection.
@throws SQLException Occurs when no pooled connection is available... | java | public Connection getConnection(String user, String password) throws SQLException {
// If this is for the default user/password, use a pooled connection
if (user == null || (user.equals(getUser()) && ((password == null && getPassword() == null)
|| (password != null && password.equals(getPassword()))))) ... | [
"public",
"Connection",
"getConnection",
"(",
"String",
"user",
",",
"String",
"password",
")",
"throws",
"SQLException",
"{",
"// If this is for the default user/password, use a pooled connection",
"if",
"(",
"user",
"==",
"null",
"||",
"(",
"user",
".",
"equals",
"(... | Gets a <b>non-pooled</b> connection, unless the user and password are the same as the default
values for this connection pool.
@return A pooled connection.
@throws SQLException Occurs when no pooled connection is available, and a new physical
connection cannot be created. | [
"Gets",
"a",
"<b",
">",
"non",
"-",
"pooled<",
"/",
"b",
">",
"connection",
"unless",
"the",
"user",
"and",
"password",
"are",
"the",
"same",
"as",
"the",
"default",
"values",
"for",
"this",
"connection",
"pool",
"."
] | train | https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/ds/PGPoolingDataSource.java#L302-L313 |
sarl/sarl | contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java | PyExpressionGenerator._generate | @SuppressWarnings("static-method")
protected XExpression _generate(SarlContinueExpression continueStatement, IAppendable it, IExtraLanguageGeneratorContext context) {
"""
Generate the given object.
@param continueStatement the continue statement.
@param it the target for the generated content.
@param context... | java | @SuppressWarnings("static-method")
protected XExpression _generate(SarlContinueExpression continueStatement, IAppendable it, IExtraLanguageGeneratorContext context) {
if (context.getExpectedExpressionType() == null) {
it.append("continue"); //$NON-NLS-1$
} else {
it.append("return ").append(toDefaultValue(co... | [
"@",
"SuppressWarnings",
"(",
"\"static-method\"",
")",
"protected",
"XExpression",
"_generate",
"(",
"SarlContinueExpression",
"continueStatement",
",",
"IAppendable",
"it",
",",
"IExtraLanguageGeneratorContext",
"context",
")",
"{",
"if",
"(",
"context",
".",
"getExpe... | Generate the given object.
@param continueStatement the continue statement.
@param it the target for the generated content.
@param context the context.
@return the statement. | [
"Generate",
"the",
"given",
"object",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java#L382-L390 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java | CPFriendlyURLEntryPersistenceImpl.fetchByG_C_L_U | @Override
public CPFriendlyURLEntry fetchByG_C_L_U(long groupId, long classNameId,
String languageId, String urlTitle) {
"""
Returns the cp friendly url entry where groupId = ? and classNameId = ? and languageId = ? and urlTitle = ? or returns <code>null</code> if it could not be found. Uses the... | java | @Override
public CPFriendlyURLEntry fetchByG_C_L_U(long groupId, long classNameId,
String languageId, String urlTitle) {
return fetchByG_C_L_U(groupId, classNameId, languageId, urlTitle, true);
} | [
"@",
"Override",
"public",
"CPFriendlyURLEntry",
"fetchByG_C_L_U",
"(",
"long",
"groupId",
",",
"long",
"classNameId",
",",
"String",
"languageId",
",",
"String",
"urlTitle",
")",
"{",
"return",
"fetchByG_C_L_U",
"(",
"groupId",
",",
"classNameId",
",",
"languageI... | Returns the cp friendly url entry where groupId = ? and classNameId = ? and languageId = ? and urlTitle = ? or returns <code>null</code> if it could not be found. Uses the finder cache.
@param groupId the group ID
@param classNameId the class name ID
@param languageId the language ID
@param urlTitle th... | [
"Returns",
"the",
"cp",
"friendly",
"url",
"entry",
"where",
"groupId",
"=",
"?",
";",
"and",
"classNameId",
"=",
"?",
";",
"and",
"languageId",
"=",
"?",
";",
"and",
"urlTitle",
"=",
"?",
";",
"or",
"returns",
"<code",
">",
"null<",
"/",
"... | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java#L3970-L3974 |
goldmansachs/gs-collections | collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java | StringIterate.detectIfNone | @Deprecated
public static Character detectIfNone(String string, CharPredicate predicate, String resultIfNone) {
"""
Find the first element that returns true for the specified {@code predicate}. Return the first char of the
default string if no value is found.
@deprecated since 7.0. Use {@link #detectCharI... | java | @Deprecated
public static Character detectIfNone(String string, CharPredicate predicate, String resultIfNone)
{
return StringIterate.detectCharIfNone(string, predicate, resultIfNone);
} | [
"@",
"Deprecated",
"public",
"static",
"Character",
"detectIfNone",
"(",
"String",
"string",
",",
"CharPredicate",
"predicate",
",",
"String",
"resultIfNone",
")",
"{",
"return",
"StringIterate",
".",
"detectCharIfNone",
"(",
"string",
",",
"predicate",
",",
"resu... | Find the first element that returns true for the specified {@code predicate}. Return the first char of the
default string if no value is found.
@deprecated since 7.0. Use {@link #detectCharIfNone(String, CharPredicate, String)} instead. | [
"Find",
"the",
"first",
"element",
"that",
"returns",
"true",
"for",
"the",
"specified",
"{",
"@code",
"predicate",
"}",
".",
"Return",
"the",
"first",
"char",
"of",
"the",
"default",
"string",
"if",
"no",
"value",
"is",
"found",
"."
] | train | https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L704-L708 |
apache/flink | flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java | RecoverableMultiPartUploadImpl.uploadPart | @Override
public void uploadPart(RefCountedFSOutputStream file) throws IOException {
"""
Adds a part to the uploads without any size limitations.
<p>This method is non-blocking and does not wait for the part upload to complete.
@param file The file with the part data.
@throws IOException If this method t... | java | @Override
public void uploadPart(RefCountedFSOutputStream file) throws IOException {
// this is to guarantee that nobody is
// writing to the file we are uploading.
checkState(file.isClosed());
final CompletableFuture<PartETag> future = new CompletableFuture<>();
uploadsInProgress.add(future);
final long... | [
"@",
"Override",
"public",
"void",
"uploadPart",
"(",
"RefCountedFSOutputStream",
"file",
")",
"throws",
"IOException",
"{",
"// this is to guarantee that nobody is",
"// writing to the file we are uploading.",
"checkState",
"(",
"file",
".",
"isClosed",
"(",
")",
")",
";... | Adds a part to the uploads without any size limitations.
<p>This method is non-blocking and does not wait for the part upload to complete.
@param file The file with the part data.
@throws IOException If this method throws an exception, the RecoverableS3MultiPartUpload
should not be used any more, but recovered inste... | [
"Adds",
"a",
"part",
"to",
"the",
"uploads",
"without",
"any",
"size",
"limitations",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-filesystems/flink-s3-fs-base/src/main/java/org/apache/flink/fs/s3/common/writer/RecoverableMultiPartUploadImpl.java#L100-L114 |
tvesalainen/util | util/src/main/java/org/vesalainen/ui/ScanlineFiller.java | ScanlineFiller.floodFill | public void floodFill(int xx, int yy, Rectangle clip, int replacement) {
"""
Fills clipped area starting at xx,yy. Area must be surrounded with
replacement (or clip)
@param xx
@param yy
@param clip
@param replacement
"""
floodFill(xx, yy, clip, (c)->c!=replacement, replacement);
} | java | public void floodFill(int xx, int yy, Rectangle clip, int replacement)
{
floodFill(xx, yy, clip, (c)->c!=replacement, replacement);
} | [
"public",
"void",
"floodFill",
"(",
"int",
"xx",
",",
"int",
"yy",
",",
"Rectangle",
"clip",
",",
"int",
"replacement",
")",
"{",
"floodFill",
"(",
"xx",
",",
"yy",
",",
"clip",
",",
"(",
"c",
")",
"-",
"",
">",
"c",
"!=",
"replacement",
",",
"re... | Fills clipped area starting at xx,yy. Area must be surrounded with
replacement (or clip)
@param xx
@param yy
@param clip
@param replacement | [
"Fills",
"clipped",
"area",
"starting",
"at",
"xx",
"yy",
".",
"Area",
"must",
"be",
"surrounded",
"with",
"replacement",
"(",
"or",
"clip",
")"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/ui/ScanlineFiller.java#L75-L78 |
aws/aws-sdk-java | aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/JacksonUtils.java | JacksonUtils.jsonToString | public static String jsonToString(JsonNode node) {
"""
Converts a {@link JsonNode} into a string.
@param node Node to convert.
@return String of JSON document.
"""
try {
return node == null ? null : MAPPER.writeValueAsString(node);
} catch (JsonProcessingException e) {
... | java | public static String jsonToString(JsonNode node) {
try {
return node == null ? null : MAPPER.writeValueAsString(node);
} catch (JsonProcessingException e) {
throw new SdkClientException("Could not serialize JSON", e);
}
} | [
"public",
"static",
"String",
"jsonToString",
"(",
"JsonNode",
"node",
")",
"{",
"try",
"{",
"return",
"node",
"==",
"null",
"?",
"null",
":",
"MAPPER",
".",
"writeValueAsString",
"(",
"node",
")",
";",
"}",
"catch",
"(",
"JsonProcessingException",
"e",
")... | Converts a {@link JsonNode} into a string.
@param node Node to convert.
@return String of JSON document. | [
"Converts",
"a",
"{",
"@link",
"JsonNode",
"}",
"into",
"a",
"string",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/JacksonUtils.java#L50-L56 |
bitcoinj/bitcoinj | core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java | DeterministicKey.deserializeB58 | public static DeterministicKey deserializeB58(@Nullable DeterministicKey parent, String base58, NetworkParameters params) {
"""
Deserialize a base-58-encoded HD Key.
@param parent The parent node in the given key's deterministic hierarchy.
@throws IllegalArgumentException if the base58 encoded key could not be p... | java | public static DeterministicKey deserializeB58(@Nullable DeterministicKey parent, String base58, NetworkParameters params) {
return deserialize(params, Base58.decodeChecked(base58), parent);
} | [
"public",
"static",
"DeterministicKey",
"deserializeB58",
"(",
"@",
"Nullable",
"DeterministicKey",
"parent",
",",
"String",
"base58",
",",
"NetworkParameters",
"params",
")",
"{",
"return",
"deserialize",
"(",
"params",
",",
"Base58",
".",
"decodeChecked",
"(",
"... | Deserialize a base-58-encoded HD Key.
@param parent The parent node in the given key's deterministic hierarchy.
@throws IllegalArgumentException if the base58 encoded key could not be parsed. | [
"Deserialize",
"a",
"base",
"-",
"58",
"-",
"encoded",
"HD",
"Key",
"."
] | train | https://github.com/bitcoinj/bitcoinj/blob/9cf13d29315014ed59cf4fc5944e5f227e8df9a6/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java#L529-L531 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java | ElementsExceptionsFactory.newWriteOnlyException | public static WriteOnlyException newWriteOnlyException(String message, Object... args) {
"""
Constructs and initializes a new {@link WriteOnlyException} with the given {@link String message}
formatted with the given {@link Object[] arguments}.
@param message {@link String} describing the {@link WriteOnlyExcept... | java | public static WriteOnlyException newWriteOnlyException(String message, Object... args) {
return newWriteOnlyException(null, message, args);
} | [
"public",
"static",
"WriteOnlyException",
"newWriteOnlyException",
"(",
"String",
"message",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"newWriteOnlyException",
"(",
"null",
",",
"message",
",",
"args",
")",
";",
"}"
] | Constructs and initializes a new {@link WriteOnlyException} with the given {@link String message}
formatted with the given {@link Object[] arguments}.
@param message {@link String} describing the {@link WriteOnlyException exception}.
@param args {@link Object[] arguments} used to replace format placeholders in the {@l... | [
"Constructs",
"and",
"initializes",
"a",
"new",
"{",
"@link",
"WriteOnlyException",
"}",
"with",
"the",
"given",
"{",
"@link",
"String",
"message",
"}",
"formatted",
"with",
"the",
"given",
"{",
"@link",
"Object",
"[]",
"arguments",
"}",
"."
] | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L957-L959 |
kuali/ojb-1.0.4 | src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java | PersistenceBrokerImpl.linkOneToMany | public void linkOneToMany(Object obj, CollectionDescriptor cod, boolean insert) {
"""
Assign FK value to all n-side objects referenced by given object.
@param obj real object with 1:n reference
@param cod {@link CollectionDescriptor} of referenced 1:n objects
@param insert flag signal insert operation, false ... | java | public void linkOneToMany(Object obj, CollectionDescriptor cod, boolean insert)
{
Object referencedObjects = cod.getPersistentField().get(obj);
storeAndLinkOneToMany(true, obj, cod,referencedObjects, insert);
} | [
"public",
"void",
"linkOneToMany",
"(",
"Object",
"obj",
",",
"CollectionDescriptor",
"cod",
",",
"boolean",
"insert",
")",
"{",
"Object",
"referencedObjects",
"=",
"cod",
".",
"getPersistentField",
"(",
")",
".",
"get",
"(",
"obj",
")",
";",
"storeAndLinkOneT... | Assign FK value to all n-side objects referenced by given object.
@param obj real object with 1:n reference
@param cod {@link CollectionDescriptor} of referenced 1:n objects
@param insert flag signal insert operation, false signals update operation | [
"Assign",
"FK",
"value",
"to",
"all",
"n",
"-",
"side",
"objects",
"referenced",
"by",
"given",
"object",
"."
] | train | https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/PersistenceBrokerImpl.java#L1311-L1315 |
agmip/translator-dssat | src/main/java/org/agmip/translators/dssat/DssatSortHelper.java | DssatSortHelper.getValue | private double getValue(HashMap m, String key) {
"""
Get number value by using key from map
@param m Data record
@param key variable name
@return
"""
try {
return Double.parseDouble(getValueOr(m, key, ""));
} catch (Exception e) {
return Double.MIN_VALUE;
}
... | java | private double getValue(HashMap m, String key) {
try {
return Double.parseDouble(getValueOr(m, key, ""));
} catch (Exception e) {
return Double.MIN_VALUE;
}
} | [
"private",
"double",
"getValue",
"(",
"HashMap",
"m",
",",
"String",
"key",
")",
"{",
"try",
"{",
"return",
"Double",
".",
"parseDouble",
"(",
"getValueOr",
"(",
"m",
",",
"key",
",",
"\"\"",
")",
")",
";",
"}",
"catch",
"(",
"Exception",
"e",
")",
... | Get number value by using key from map
@param m Data record
@param key variable name
@return | [
"Get",
"number",
"value",
"by",
"using",
"key",
"from",
"map"
] | train | https://github.com/agmip/translator-dssat/blob/4be61d998f106eb7234ea8701b63c3746ae688f4/src/main/java/org/agmip/translators/dssat/DssatSortHelper.java#L79-L85 |
apereo/cas | core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java | AbstractCasWebflowConfigurer.createFlowVariable | public FlowVariable createFlowVariable(final Flow flow, final String id, final Class type) {
"""
Create flow variable flow variable.
@param flow the flow
@param id the id
@param type the type
@return the flow variable
"""
val opt = Arrays.stream(flow.getVariables()).filter(v -> v.getName().equa... | java | public FlowVariable createFlowVariable(final Flow flow, final String id, final Class type) {
val opt = Arrays.stream(flow.getVariables()).filter(v -> v.getName().equalsIgnoreCase(id)).findFirst();
if (opt.isPresent()) {
return opt.get();
}
val flowVar = new FlowVariable(id, n... | [
"public",
"FlowVariable",
"createFlowVariable",
"(",
"final",
"Flow",
"flow",
",",
"final",
"String",
"id",
",",
"final",
"Class",
"type",
")",
"{",
"val",
"opt",
"=",
"Arrays",
".",
"stream",
"(",
"flow",
".",
"getVariables",
"(",
")",
")",
".",
"filter... | Create flow variable flow variable.
@param flow the flow
@param id the id
@param type the type
@return the flow variable | [
"Create",
"flow",
"variable",
"flow",
"variable",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/configurer/AbstractCasWebflowConfigurer.java#L591-L599 |
EvidentSolutions/dalesbred | dalesbred/src/main/java/org/dalesbred/Database.java | Database.withTransaction | public <T> T withTransaction(@NotNull Propagation propagation,
@NotNull Isolation isolation,
@NotNull TransactionCallback<T> callback) {
"""
Executes a block of code with given propagation and isolation.
"""
TransactionSettings settings... | java | public <T> T withTransaction(@NotNull Propagation propagation,
@NotNull Isolation isolation,
@NotNull TransactionCallback<T> callback) {
TransactionSettings settings = new TransactionSettings();
settings.setPropagation(propagation);
... | [
"public",
"<",
"T",
">",
"T",
"withTransaction",
"(",
"@",
"NotNull",
"Propagation",
"propagation",
",",
"@",
"NotNull",
"Isolation",
"isolation",
",",
"@",
"NotNull",
"TransactionCallback",
"<",
"T",
">",
"callback",
")",
"{",
"TransactionSettings",
"settings",... | Executes a block of code with given propagation and isolation. | [
"Executes",
"a",
"block",
"of",
"code",
"with",
"given",
"propagation",
"and",
"isolation",
"."
] | train | https://github.com/EvidentSolutions/dalesbred/blob/713f5b6e152d97e1672ca68b9ff9c7c6c288ceb1/dalesbred/src/main/java/org/dalesbred/Database.java#L176-L185 |
opsmatters/newrelic-api | src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java | HttpContext.GET | public <T> Optional<T> GET(String partialUrl, Map<String, Object> headers,
List<String> queryParams, GenericType<T> returnType) {
"""
Execute a GET call against the partial URL and deserialize the results.
@param <T> The type parameter used for the return object
@param partialUrl The partial URL to buil... | java | public <T> Optional<T> GET(String partialUrl, Map<String, Object> headers,
List<String> queryParams, GenericType<T> returnType)
{
URI uri = buildUri(partialUrl);
return executeGetRequest(uri, headers, queryParams, returnType);
} | [
"public",
"<",
"T",
">",
"Optional",
"<",
"T",
">",
"GET",
"(",
"String",
"partialUrl",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"headers",
",",
"List",
"<",
"String",
">",
"queryParams",
",",
"GenericType",
"<",
"T",
">",
"returnType",
")",
"{... | Execute a GET call against the partial URL and deserialize the results.
@param <T> The type parameter used for the return object
@param partialUrl The partial URL to build
@param returnType The expected return type
@param headers A set of headers to add to the request
@param queryParams A set of query parameters to add... | [
"Execute",
"a",
"GET",
"call",
"against",
"the",
"partial",
"URL",
"and",
"deserialize",
"the",
"results",
"."
] | train | https://github.com/opsmatters/newrelic-api/blob/5bc2ea62ec368db891e4fd5fe3dcdf529d086b5e/src/main/java/com/opsmatters/newrelic/api/services/HttpContext.java#L124-L129 |
lievendoclo/Valkyrie-RCP | valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/PropertyChangeSupport.java | PropertyChangeSupport.firePropertyChange | public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
"""
Report a bound property update to any registered listeners. No event is
fired if old and new are equal and non-null.
@param propertyName The programmatic name of the property that was
changed.
@param oldValue The old ... | java | public void firePropertyChange(String propertyName, Object oldValue, Object newValue) {
firePropertyChange(new PropertyChangeEvent(source, propertyName, oldValue, newValue));
} | [
"public",
"void",
"firePropertyChange",
"(",
"String",
"propertyName",
",",
"Object",
"oldValue",
",",
"Object",
"newValue",
")",
"{",
"firePropertyChange",
"(",
"new",
"PropertyChangeEvent",
"(",
"source",
",",
"propertyName",
",",
"oldValue",
",",
"newValue",
")... | Report a bound property update to any registered listeners. No event is
fired if old and new are equal and non-null.
@param propertyName The programmatic name of the property that was
changed.
@param oldValue The old value of the property.
@param newValue The new value of the property. | [
"Report",
"a",
"bound",
"property",
"update",
"to",
"any",
"registered",
"listeners",
".",
"No",
"event",
"is",
"fired",
"if",
"old",
"and",
"new",
"are",
"equal",
"and",
"non",
"-",
"null",
"."
] | train | https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/binding/value/support/PropertyChangeSupport.java#L217-L219 |
ralscha/wampspring-security | src/main/java/ch/rasc/wampspring/security/WampMessageSecurityMetadataSourceRegistry.java | WampMessageSecurityMetadataSourceRegistry.wampDestMatchers | private Constraint wampDestMatchers(WampMessageType type, String... patterns) {
"""
Maps a {@link List} of {@link WampDestinationMessageMatcher} instances. If no
destination is found on the Message, then the Matcher returns false.
@param type the {@link WampMessageType} to match on. If null, the
{@link WampMe... | java | private Constraint wampDestMatchers(WampMessageType type, String... patterns) {
List<MatcherBuilder> matchers = new ArrayList<>(patterns.length);
for (String pattern : patterns) {
matchers.add(new PathMatcherMessageMatcherBuilder(pattern, type));
}
return new Constraint(matchers);
} | [
"private",
"Constraint",
"wampDestMatchers",
"(",
"WampMessageType",
"type",
",",
"String",
"...",
"patterns",
")",
"{",
"List",
"<",
"MatcherBuilder",
">",
"matchers",
"=",
"new",
"ArrayList",
"<>",
"(",
"patterns",
".",
"length",
")",
";",
"for",
"(",
"Str... | Maps a {@link List} of {@link WampDestinationMessageMatcher} instances. If no
destination is found on the Message, then the Matcher returns false.
@param type the {@link WampMessageType} to match on. If null, the
{@link WampMessageType} is not considered for matching.
@param patterns the patterns to create {@link Wamp... | [
"Maps",
"a",
"{",
"@link",
"List",
"}",
"of",
"{",
"@link",
"WampDestinationMessageMatcher",
"}",
"instances",
".",
"If",
"no",
"destination",
"is",
"found",
"on",
"the",
"Message",
"then",
"the",
"Matcher",
"returns",
"false",
"."
] | train | https://github.com/ralscha/wampspring-security/blob/e589b31dc2ff7c78b1be768edae0bc9d543ba7a6/src/main/java/ch/rasc/wampspring/security/WampMessageSecurityMetadataSourceRegistry.java#L181-L187 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java | TimeZone.getCanonicalID | public static String getCanonicalID(String id, boolean[] isSystemID) {
"""
<strong>[icu]</strong> Returns the canonical system time zone ID or the normalized
custom time zone ID for the given time zone ID.
@param id The input time zone ID to be canonicalized.
@param isSystemID When non-null boolean array is spe... | java | public static String getCanonicalID(String id, boolean[] isSystemID) {
String canonicalID = null;
boolean systemTzid = false;
if (id != null && id.length() != 0) {
if (id.equals(TimeZone.UNKNOWN_ZONE_ID)) {
// special case - Etc/Unknown is a canonical ID, but not syst... | [
"public",
"static",
"String",
"getCanonicalID",
"(",
"String",
"id",
",",
"boolean",
"[",
"]",
"isSystemID",
")",
"{",
"String",
"canonicalID",
"=",
"null",
";",
"boolean",
"systemTzid",
"=",
"false",
";",
"if",
"(",
"id",
"!=",
"null",
"&&",
"id",
".",
... | <strong>[icu]</strong> Returns the canonical system time zone ID or the normalized
custom time zone ID for the given time zone ID.
@param id The input time zone ID to be canonicalized.
@param isSystemID When non-null boolean array is specified and
the given ID is a known system time zone ID, true is set to <code>isSyst... | [
"<strong",
">",
"[",
"icu",
"]",
"<",
"/",
"strong",
">",
"Returns",
"the",
"canonical",
"system",
"time",
"zone",
"ID",
"or",
"the",
"normalized",
"custom",
"time",
"zone",
"ID",
"for",
"the",
"given",
"time",
"zone",
"ID",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/TimeZone.java#L1023-L1044 |
BioPAX/Paxtools | pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConBox.java | ConBox.moreControllerThanParticipant | public static Constraint moreControllerThanParticipant() {
"""
Makes sure that the PhysicalEntity is controlling more reactions than it participates
(excluding complex assembly).
@return non-generative constraint
"""
return new ConstraintAdapter(1)
{
PathAccessor partConv = new PathAccessor("PhysicalE... | java | public static Constraint moreControllerThanParticipant()
{
return new ConstraintAdapter(1)
{
PathAccessor partConv = new PathAccessor("PhysicalEntity/participantOf:Conversion");
PathAccessor partCompAss = new PathAccessor("PhysicalEntity/participantOf:ComplexAssembly");
PathAccessor effects = new PathAcce... | [
"public",
"static",
"Constraint",
"moreControllerThanParticipant",
"(",
")",
"{",
"return",
"new",
"ConstraintAdapter",
"(",
"1",
")",
"{",
"PathAccessor",
"partConv",
"=",
"new",
"PathAccessor",
"(",
"\"PhysicalEntity/participantOf:Conversion\"",
")",
";",
"PathAccesso... | Makes sure that the PhysicalEntity is controlling more reactions than it participates
(excluding complex assembly).
@return non-generative constraint | [
"Makes",
"sure",
"that",
"the",
"PhysicalEntity",
"is",
"controlling",
"more",
"reactions",
"than",
"it",
"participates",
"(",
"excluding",
"complex",
"assembly",
")",
"."
] | train | https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/constraint/ConBox.java#L619-L639 |
liyiorg/weixin-popular | src/main/java/weixin/popular/api/UserAPI.java | UserAPI.tagsGetidlist | public static TagsGetidlistResult tagsGetidlist(String access_token,String openid) {
"""
用户管理 获取用户身上的标签列表
@since 2.8.1
@param access_token access_token
@param openid openid
@return result
"""
String json = String.format("{\"openid\":\"%s\"}",openid);
HttpUriRequest httpUriRequest = RequestBuilder.post(... | java | public static TagsGetidlistResult tagsGetidlist(String access_token,String openid){
String json = String.format("{\"openid\":\"%s\"}",openid);
HttpUriRequest httpUriRequest = RequestBuilder.post()
.setHeader(jsonHeader)
.setUri(BASE_URI+"/cgi-bin/tags/getidlist")
.addParameter(PARAM_AC... | [
"public",
"static",
"TagsGetidlistResult",
"tagsGetidlist",
"(",
"String",
"access_token",
",",
"String",
"openid",
")",
"{",
"String",
"json",
"=",
"String",
".",
"format",
"(",
"\"{\\\"openid\\\":\\\"%s\\\"}\"",
",",
"openid",
")",
";",
"HttpUriRequest",
"httpUriR... | 用户管理 获取用户身上的标签列表
@since 2.8.1
@param access_token access_token
@param openid openid
@return result | [
"用户管理",
"获取用户身上的标签列表"
] | train | https://github.com/liyiorg/weixin-popular/blob/c64255292d41463bdb671938feaabf42a335d82c/src/main/java/weixin/popular/api/UserAPI.java#L412-L421 |
apereo/cas | api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataPropertyCreator.java | ConfigurationMetadataPropertyCreator.createConfigurationProperty | public ConfigurationMetadataProperty createConfigurationProperty(final FieldDeclaration fieldDecl, final String propName) {
"""
Create configuration property.
@param fieldDecl the field decl
@param propName the prop name
@return the configuration metadata property
"""
val variable = fieldDecl.get... | java | public ConfigurationMetadataProperty createConfigurationProperty(final FieldDeclaration fieldDecl, final String propName) {
val variable = fieldDecl.getVariables().get(0);
val name = StreamSupport.stream(RelaxedPropertyNames.forCamelCase(variable.getNameAsString()).spliterator(), false)
.map... | [
"public",
"ConfigurationMetadataProperty",
"createConfigurationProperty",
"(",
"final",
"FieldDeclaration",
"fieldDecl",
",",
"final",
"String",
"propName",
")",
"{",
"val",
"variable",
"=",
"fieldDecl",
".",
"getVariables",
"(",
")",
".",
"get",
"(",
"0",
")",
";... | Create configuration property.
@param fieldDecl the field decl
@param propName the prop name
@return the configuration metadata property | [
"Create",
"configuration",
"property",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/api/cas-server-core-api-configuration-model/src/main/java/org/apereo/cas/configuration/metadata/ConfigurationMetadataPropertyCreator.java#L38-L88 |
Bandwidth/java-bandwidth | src/main/java/com/bandwidth/sdk/BandwidthClient.java | BandwidthClient.setupRequestJson | protected HttpUriRequest setupRequestJson(final String path, final String method, final String params) {
"""
Helper method to build the request to the server.
@param path the path.
@param method the method.
@param params the json string.
@return the request.
"""
final HttpUriRequest request = bui... | java | protected HttpUriRequest setupRequestJson(final String path, final String method, final String params) {
final HttpUriRequest request = buildMethod(method, path, params);
request.addHeader(new BasicHeader("Accept", "application/json"));
request.addHeader(new BasicHeader("Accept-Charset", "utf-8"... | [
"protected",
"HttpUriRequest",
"setupRequestJson",
"(",
"final",
"String",
"path",
",",
"final",
"String",
"method",
",",
"final",
"String",
"params",
")",
"{",
"final",
"HttpUriRequest",
"request",
"=",
"buildMethod",
"(",
"method",
",",
"path",
",",
"params",
... | Helper method to build the request to the server.
@param path the path.
@param method the method.
@param params the json string.
@return the request. | [
"Helper",
"method",
"to",
"build",
"the",
"request",
"to",
"the",
"server",
"."
] | train | https://github.com/Bandwidth/java-bandwidth/blob/2124c85148ad6a54d2f2949cb952eb3985830e2a/src/main/java/com/bandwidth/sdk/BandwidthClient.java#L555-L561 |
nlalevee/jsourcemap | jsourcemap/src/java/org/hibnet/jsourcemap/SourceMapGenerator.java | SourceMapGenerator.addMapping | public void addMapping(Mapping aArgs) {
"""
Add a single mapping from original source line and column to the generated source's line and column for this source map being created. The
mapping object should have the following properties:
<ul>
<li>generated: An object with the generated line and column positions.<... | java | public void addMapping(Mapping aArgs) {
Position generated = aArgs.generated;
Position original = aArgs.original;
String source = aArgs.source;
String name = aArgs.name;
if (source != null && !this._sources.has(source)) {
_sources.add(source, false);
}
... | [
"public",
"void",
"addMapping",
"(",
"Mapping",
"aArgs",
")",
"{",
"Position",
"generated",
"=",
"aArgs",
".",
"generated",
";",
"Position",
"original",
"=",
"aArgs",
".",
"original",
";",
"String",
"source",
"=",
"aArgs",
".",
"source",
";",
"String",
"na... | Add a single mapping from original source line and column to the generated source's line and column for this source map being created. The
mapping object should have the following properties:
<ul>
<li>generated: An object with the generated line and column positions.</li>
<li>original: An object with the original line ... | [
"Add",
"a",
"single",
"mapping",
"from",
"original",
"source",
"line",
"and",
"column",
"to",
"the",
"generated",
"source",
"s",
"line",
"and",
"column",
"for",
"this",
"source",
"map",
"being",
"created",
".",
"The",
"mapping",
"object",
"should",
"have",
... | train | https://github.com/nlalevee/jsourcemap/blob/361a99c73d51c11afa5579dd83d477c4d0345599/jsourcemap/src/java/org/hibnet/jsourcemap/SourceMapGenerator.java#L93-L106 |
jbundle/jcalendarbutton | src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java | JCalendarPopup.createCalendarButton | public static JButton createCalendarButton(String strDateParam, Date dateTarget) {
"""
Create this calendar in a popup menu and synchronize the text field on change.
@param strDateParam The name of the date property (defaults to "date").
@param dateTarget The initial date for this button.
"""
JCalend... | java | public static JButton createCalendarButton(String strDateParam, Date dateTarget)
{
JCalendarButton button = new JCalendarButton(strDateParam, dateTarget);
button.setMargin(NO_INSETS);
button.setOpaque(false);
return button;
} | [
"public",
"static",
"JButton",
"createCalendarButton",
"(",
"String",
"strDateParam",
",",
"Date",
"dateTarget",
")",
"{",
"JCalendarButton",
"button",
"=",
"new",
"JCalendarButton",
"(",
"strDateParam",
",",
"dateTarget",
")",
";",
"button",
".",
"setMargin",
"("... | Create this calendar in a popup menu and synchronize the text field on change.
@param strDateParam The name of the date property (defaults to "date").
@param dateTarget The initial date for this button. | [
"Create",
"this",
"calendar",
"in",
"a",
"popup",
"menu",
"and",
"synchronize",
"the",
"text",
"field",
"on",
"change",
"."
] | train | https://github.com/jbundle/jcalendarbutton/blob/2944e6a0b634b83768d5c0b7b4a2898176421403/src/main/java/org/jbundle/util/jcalendarbutton/JCalendarPopup.java#L608-L615 |
TheHortonMachine/hortonmachine | gears/src/main/java/org/hortonmachine/gears/utils/CrsUtilities.java | CrsUtilities.getMetersAsWGS84 | public static double getMetersAsWGS84( double meters, Coordinate c ) {
"""
Converts meters to degrees, based on a given coordinate in 90 degrees direction.
@param meters the meters to convert.
@param c the position to consider.
@return the converted degrees.
"""
GeodeticCalculator gc = new Geodeti... | java | public static double getMetersAsWGS84( double meters, Coordinate c ) {
GeodeticCalculator gc = new GeodeticCalculator(DefaultGeographicCRS.WGS84);
gc.setStartingGeographicPoint(c.x, c.y);
gc.setDirection(90, meters);
Point2D destinationGeographicPoint = gc.getDestinationGeographicPoint()... | [
"public",
"static",
"double",
"getMetersAsWGS84",
"(",
"double",
"meters",
",",
"Coordinate",
"c",
")",
"{",
"GeodeticCalculator",
"gc",
"=",
"new",
"GeodeticCalculator",
"(",
"DefaultGeographicCRS",
".",
"WGS84",
")",
";",
"gc",
".",
"setStartingGeographicPoint",
... | Converts meters to degrees, based on a given coordinate in 90 degrees direction.
@param meters the meters to convert.
@param c the position to consider.
@return the converted degrees. | [
"Converts",
"meters",
"to",
"degrees",
"based",
"on",
"a",
"given",
"coordinate",
"in",
"90",
"degrees",
"direction",
"."
] | train | https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/CrsUtilities.java#L249-L256 |
Omertron/api-themoviedb | src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java | TmdbTV.getTVVideos | public ResultList<Video> getTVVideos(int tvID, String language) throws MovieDbException {
"""
Get the videos that have been added to a TV series (trailers, opening
credits, etc...)
@param tvID
@param language
@return
@throws com.omertron.themoviedbapi.MovieDbException
"""
TmdbParameters paramete... | java | public ResultList<Video> getTVVideos(int tvID, String language) throws MovieDbException {
TmdbParameters parameters = new TmdbParameters();
parameters.add(Param.ID, tvID);
parameters.add(Param.LANGUAGE, language);
URL url = new ApiUrl(apiKey, MethodBase.TV).subMethod(MethodSub.VIDEOS).b... | [
"public",
"ResultList",
"<",
"Video",
">",
"getTVVideos",
"(",
"int",
"tvID",
",",
"String",
"language",
")",
"throws",
"MovieDbException",
"{",
"TmdbParameters",
"parameters",
"=",
"new",
"TmdbParameters",
"(",
")",
";",
"parameters",
".",
"add",
"(",
"Param"... | Get the videos that have been added to a TV series (trailers, opening
credits, etc...)
@param tvID
@param language
@return
@throws com.omertron.themoviedbapi.MovieDbException | [
"Get",
"the",
"videos",
"that",
"have",
"been",
"added",
"to",
"a",
"TV",
"series",
"(",
"trailers",
"opening",
"credits",
"etc",
"...",
")"
] | train | https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbTV.java#L346-L362 |
google/closure-templates | java/src/com/google/template/soy/jbcsrc/runtime/JbcSrcRuntime.java | JbcSrcRuntime.getProtoField | public static SoyValue getProtoField(SoyProtoValue proto, String field) {
"""
Helper function to make SoyProtoValue.getProtoField compatible with the jbcsrc representation
of {@code null}.
"""
if (proto == null) {
throw new NullPointerException("Attempted to access field '" + field + "' of null");
... | java | public static SoyValue getProtoField(SoyProtoValue proto, String field) {
if (proto == null) {
throw new NullPointerException("Attempted to access field '" + field + "' of null");
}
return handleTofuNull(proto.getProtoField(field));
} | [
"public",
"static",
"SoyValue",
"getProtoField",
"(",
"SoyProtoValue",
"proto",
",",
"String",
"field",
")",
"{",
"if",
"(",
"proto",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"Attempted to access field '\"",
"+",
"field",
"+",
"\"' ... | Helper function to make SoyProtoValue.getProtoField compatible with the jbcsrc representation
of {@code null}. | [
"Helper",
"function",
"to",
"make",
"SoyProtoValue",
".",
"getProtoField",
"compatible",
"with",
"the",
"jbcsrc",
"representation",
"of",
"{"
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/runtime/JbcSrcRuntime.java#L178-L183 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumMap.java | EnumMap.put | public V put(K key, V value) {
"""
Associates the specified value with the specified key in this map.
If the map previously contained a mapping for this key, the old
value is replaced.
@param key the key with which the specified value is to be associated
@param value the value to be associated with the speci... | java | public V put(K key, V value) {
typeCheck(key);
int index = key.ordinal();
Object oldValue = vals[index];
vals[index] = maskNull(value);
if (oldValue == null)
size++;
return unmaskNull(oldValue);
} | [
"public",
"V",
"put",
"(",
"K",
"key",
",",
"V",
"value",
")",
"{",
"typeCheck",
"(",
"key",
")",
";",
"int",
"index",
"=",
"key",
".",
"ordinal",
"(",
")",
";",
"Object",
"oldValue",
"=",
"vals",
"[",
"index",
"]",
";",
"vals",
"[",
"index",
"... | Associates the specified value with the specified key in this map.
If the map previously contained a mapping for this key, the old
value is replaced.
@param key the key with which the specified value is to be associated
@param value the value to be associated with the specified key
@return the previous value associat... | [
"Associates",
"the",
"specified",
"value",
"with",
"the",
"specified",
"key",
"in",
"this",
"map",
".",
"If",
"the",
"map",
"previously",
"contained",
"a",
"mapping",
"for",
"this",
"key",
"the",
"old",
"value",
"is",
"replaced",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/EnumMap.java#L277-L286 |
zeromq/jeromq | src/main/java/org/zeromq/ZProxy.java | ZProxy.newZProxy | public static ZProxy newZProxy(ZContext ctx, String name, Proxy sockets, String motdelafin, Object... args) {
"""
Creates a new proxy in a ZeroMQ way.
This proxy will be less efficient than the
{@link #newZProxy(ZContext, String, org.zeromq.ZProxy.Proxy, String, Object...) low-level one}.
@param ctx th... | java | public static ZProxy newZProxy(ZContext ctx, String name, Proxy sockets, String motdelafin, Object... args)
{
return new ZProxy(ctx, name, sockets, new ZPump(), motdelafin, args);
} | [
"public",
"static",
"ZProxy",
"newZProxy",
"(",
"ZContext",
"ctx",
",",
"String",
"name",
",",
"Proxy",
"sockets",
",",
"String",
"motdelafin",
",",
"Object",
"...",
"args",
")",
"{",
"return",
"new",
"ZProxy",
"(",
"ctx",
",",
"name",
",",
"sockets",
",... | Creates a new proxy in a ZeroMQ way.
This proxy will be less efficient than the
{@link #newZProxy(ZContext, String, org.zeromq.ZProxy.Proxy, String, Object...) low-level one}.
@param ctx the context used for the proxy.
Possibly null, in this case a new context will be created and automatically destroyed afterwa... | [
"Creates",
"a",
"new",
"proxy",
"in",
"a",
"ZeroMQ",
"way",
".",
"This",
"proxy",
"will",
"be",
"less",
"efficient",
"than",
"the",
"{",
"@link",
"#newZProxy",
"(",
"ZContext",
"String",
"org",
".",
"zeromq",
".",
"ZProxy",
".",
"Proxy",
"String",
"Objec... | train | https://github.com/zeromq/jeromq/blob/8b4a2960b468d08b7aebb0d40bfb947e08fed040/src/main/java/org/zeromq/ZProxy.java#L260-L263 |
pravega/pravega | controller/src/main/java/io/pravega/controller/metrics/HostContainerMetrics.java | HostContainerMetrics.updateHostContainerMetrics | public void updateHostContainerMetrics(Map<Host, Set<Integer>> oldMapping, Map<Host, Set<Integer>> newMapping) {
"""
This method reports the number of available Segment Store hosts managing Containers, as well as the number of
Containers assigned to each host. Moreover, this method also reports failures for hosts... | java | public void updateHostContainerMetrics(Map<Host, Set<Integer>> oldMapping, Map<Host, Set<Integer>> newMapping) {
if (newMapping == null) {
// Nothing to do if the new mapping is null.
return;
}
// Report current number of Segment Store hosts with containers.
DYNA... | [
"public",
"void",
"updateHostContainerMetrics",
"(",
"Map",
"<",
"Host",
",",
"Set",
"<",
"Integer",
">",
">",
"oldMapping",
",",
"Map",
"<",
"Host",
",",
"Set",
"<",
"Integer",
">",
">",
"newMapping",
")",
"{",
"if",
"(",
"newMapping",
"==",
"null",
"... | This method reports the number of available Segment Store hosts managing Containers, as well as the number of
Containers assigned to each host. Moreover, this method also reports failures for hosts and Containers; we
consider a failure the situation in which a host is present in the oldMapping, but not present in newMa... | [
"This",
"method",
"reports",
"the",
"number",
"of",
"available",
"Segment",
"Store",
"hosts",
"managing",
"Containers",
"as",
"well",
"as",
"the",
"number",
"of",
"Containers",
"assigned",
"to",
"each",
"host",
".",
"Moreover",
"this",
"method",
"also",
"repor... | train | https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/metrics/HostContainerMetrics.java#L38-L66 |
Ordinastie/MalisisCore | src/main/java/net/malisis/core/client/gui/MalisisGui.java | MalisisGui.getComponentAt | public UIComponent getComponentAt(int x, int y) {
"""
Gets the {@link UIContainer} at the specified coordinates inside this {@link MalisisGui}.
@param x the x coordinate
@param y the y coordinate
@return the component, null if component is {@link #screen}
"""
UIComponent component = screen.getComponentA... | java | public UIComponent getComponentAt(int x, int y)
{
UIComponent component = screen.getComponentAt(x, y);
return component == screen /*|| component == debugComponent*/ ? null : component;
} | [
"public",
"UIComponent",
"getComponentAt",
"(",
"int",
"x",
",",
"int",
"y",
")",
"{",
"UIComponent",
"component",
"=",
"screen",
".",
"getComponentAt",
"(",
"x",
",",
"y",
")",
";",
"return",
"component",
"==",
"screen",
"/*|| component == debugComponent*/",
... | Gets the {@link UIContainer} at the specified coordinates inside this {@link MalisisGui}.
@param x the x coordinate
@param y the y coordinate
@return the component, null if component is {@link #screen} | [
"Gets",
"the",
"{",
"@link",
"UIContainer",
"}",
"at",
"the",
"specified",
"coordinates",
"inside",
"this",
"{",
"@link",
"MalisisGui",
"}",
"."
] | train | https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/client/gui/MalisisGui.java#L322-L326 |
dkpro/dkpro-jwpl | de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java | Wikipedia.getCategories | public Set<Category> getCategories(String pageTitle) throws WikiPageNotFoundException {
"""
Gets the {@link Category categories} for a given {@link Page} identified by its {@code pageTitle}.
@param pageTitle The title of a {@link Page}, not a category.
@return The category objects which are associated with the g... | java | public Set<Category> getCategories(String pageTitle) throws WikiPageNotFoundException
{
if (pageTitle == null || pageTitle.length() == 0) {
throw new WikiPageNotFoundException();
}
Session session = this.__getHibernateSession();
session.beginTransaction();
List<I... | [
"public",
"Set",
"<",
"Category",
">",
"getCategories",
"(",
"String",
"pageTitle",
")",
"throws",
"WikiPageNotFoundException",
"{",
"if",
"(",
"pageTitle",
"==",
"null",
"||",
"pageTitle",
".",
"length",
"(",
")",
"==",
"0",
")",
"{",
"throw",
"new",
"Wik... | Gets the {@link Category categories} for a given {@link Page} identified by its {@code pageTitle}.
@param pageTitle The title of a {@link Page}, not a category.
@return The category objects which are associated with the given {@code pageTitle}.
@throws WikiPageNotFoundException Thrown if no {@link Page} exists for the ... | [
"Gets",
"the",
"{"
] | train | https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.api/src/main/java/de/tudarmstadt/ukp/wikipedia/api/Wikipedia.java#L502-L524 |
MorphiaOrg/morphia | morphia/src/main/java/dev/morphia/query/CountOptions.java | CountOptions.maxTime | public CountOptions maxTime(final long maxTime, final TimeUnit timeUnit) {
"""
Sets the maximum execution time on the server for this operation.
@param maxTime the max time
@param timeUnit the time unit, which may not be null
@return this
"""
notNull("timeUnit", timeUnit);
options.maxTime... | java | public CountOptions maxTime(final long maxTime, final TimeUnit timeUnit) {
notNull("timeUnit", timeUnit);
options.maxTime(maxTime, timeUnit);
return this;
} | [
"public",
"CountOptions",
"maxTime",
"(",
"final",
"long",
"maxTime",
",",
"final",
"TimeUnit",
"timeUnit",
")",
"{",
"notNull",
"(",
"\"timeUnit\"",
",",
"timeUnit",
")",
";",
"options",
".",
"maxTime",
"(",
"maxTime",
",",
"timeUnit",
")",
";",
"return",
... | Sets the maximum execution time on the server for this operation.
@param maxTime the max time
@param timeUnit the time unit, which may not be null
@return this | [
"Sets",
"the",
"maximum",
"execution",
"time",
"on",
"the",
"server",
"for",
"this",
"operation",
"."
] | train | https://github.com/MorphiaOrg/morphia/blob/667c30bdc7c6f1d9f2e2eb8774835d6137b52d12/morphia/src/main/java/dev/morphia/query/CountOptions.java#L164-L168 |
alkacon/opencms-core | src-modules/org/opencms/workplace/commons/CmsPreferences.java | CmsPreferences.computeEditorPreselection | private String computeEditorPreselection(HttpServletRequest request, String resourceType) {
"""
Returns the preferred editor preselection value either from the request, if not present, from the user settings.<p>
@param request the current http servlet request
@param resourceType the preferred editors resource ... | java | private String computeEditorPreselection(HttpServletRequest request, String resourceType) {
// first check presence of the setting in request parameter
String preSelection = request.getParameter(PARAM_PREFERREDEDITOR_PREFIX + resourceType);
if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(preSelect... | [
"private",
"String",
"computeEditorPreselection",
"(",
"HttpServletRequest",
"request",
",",
"String",
"resourceType",
")",
"{",
"// first check presence of the setting in request parameter",
"String",
"preSelection",
"=",
"request",
".",
"getParameter",
"(",
"PARAM_PREFERREDED... | Returns the preferred editor preselection value either from the request, if not present, from the user settings.<p>
@param request the current http servlet request
@param resourceType the preferred editors resource type
@return the preferred editor preselection value or null, if none found | [
"Returns",
"the",
"preferred",
"editor",
"preselection",
"value",
"either",
"from",
"the",
"request",
"if",
"not",
"present",
"from",
"the",
"user",
"settings",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsPreferences.java#L2287-L2299 |
PeterisP/LVTagger | src/main/java/edu/stanford/nlp/optimization/AbstractStochasticCachingDiffUpdateFunction.java | AbstractStochasticCachingDiffUpdateFunction.calculateStochasticUpdate | public double calculateStochasticUpdate(double[] x, double xscale, int batchSize, double gain) {
"""
Performs stochastic update of weights x (scaled by xscale) based
on next batch of batchSize
@param x - unscaled weights
@param xscale - how much to scale x by when performing calculations
@param batchSize - num... | java | public double calculateStochasticUpdate(double[] x, double xscale, int batchSize, double gain) {
getBatch(batchSize);
return calculateStochasticUpdate(x, xscale, thisBatch, gain);
} | [
"public",
"double",
"calculateStochasticUpdate",
"(",
"double",
"[",
"]",
"x",
",",
"double",
"xscale",
",",
"int",
"batchSize",
",",
"double",
"gain",
")",
"{",
"getBatch",
"(",
"batchSize",
")",
";",
"return",
"calculateStochasticUpdate",
"(",
"x",
",",
"x... | Performs stochastic update of weights x (scaled by xscale) based
on next batch of batchSize
@param x - unscaled weights
@param xscale - how much to scale x by when performing calculations
@param batchSize - number of samples to pick next
@param gain - how much to scale adjustments to x
@return value of function at spec... | [
"Performs",
"stochastic",
"update",
"of",
"weights",
"x",
"(",
"scaled",
"by",
"xscale",
")",
"based",
"on",
"next",
"batch",
"of",
"batchSize"
] | train | https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/optimization/AbstractStochasticCachingDiffUpdateFunction.java#L60-L63 |
apache/flink | flink-core/src/main/java/org/apache/flink/types/parser/FieldParser.java | FieldParser.endsWithDelimiter | public static final boolean endsWithDelimiter(byte[] bytes, int endPos, byte[] delim) {
"""
Checks if the given bytes ends with the delimiter at the given end position.
@param bytes The byte array that holds the value.
@param endPos The index of the byte array where the check for the delimiter ends.
@param d... | java | public static final boolean endsWithDelimiter(byte[] bytes, int endPos, byte[] delim) {
if (endPos < delim.length - 1) {
return false;
}
for (int pos = 0; pos < delim.length; ++pos) {
if (delim[pos] != bytes[endPos - delim.length + 1 + pos]) {
return false;
}
}
return true;
} | [
"public",
"static",
"final",
"boolean",
"endsWithDelimiter",
"(",
"byte",
"[",
"]",
"bytes",
",",
"int",
"endPos",
",",
"byte",
"[",
"]",
"delim",
")",
"{",
"if",
"(",
"endPos",
"<",
"delim",
".",
"length",
"-",
"1",
")",
"{",
"return",
"false",
";",... | Checks if the given bytes ends with the delimiter at the given end position.
@param bytes The byte array that holds the value.
@param endPos The index of the byte array where the check for the delimiter ends.
@param delim The delimiter to check for.
@return true if a delimiter ends at the given end position, false ... | [
"Checks",
"if",
"the",
"given",
"bytes",
"ends",
"with",
"the",
"delimiter",
"at",
"the",
"given",
"end",
"position",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/types/parser/FieldParser.java#L169-L179 |
Azure/azure-sdk-for-java | automation/resource-manager/v2015_10_31/src/main/java/com/microsoft/azure/management/automation/v2015_10_31/implementation/KeysInner.java | KeysInner.listByAutomationAccount | public KeyListResultInner listByAutomationAccount(String resourceGroupName, String automationAccountName) {
"""
Retrieve the automation keys for an account.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@throws IllegalArgumentExcepti... | java | public KeyListResultInner listByAutomationAccount(String resourceGroupName, String automationAccountName) {
return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName).toBlocking().single().body();
} | [
"public",
"KeyListResultInner",
"listByAutomationAccount",
"(",
"String",
"resourceGroupName",
",",
"String",
"automationAccountName",
")",
"{",
"return",
"listByAutomationAccountWithServiceResponseAsync",
"(",
"resourceGroupName",
",",
"automationAccountName",
")",
".",
"toBlo... | Retrieve the automation keys for an account.
@param resourceGroupName Name of an Azure Resource group.
@param automationAccountName The name of the automation account.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws ErrorResponseException thrown if the request is rejected by server
@t... | [
"Retrieve",
"the",
"automation",
"keys",
"for",
"an",
"account",
"."
] | 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/KeysInner.java#L70-L72 |
OpenLiberty/open-liberty | dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/execution/impl/RuntimeJobExecution.java | RuntimeJobExecution.publishEvent | private void publishEvent(WSJobInstance objectToPublish, String eventToPublish) {
"""
Publish event for this job instance
@param jobInstance
@param eventToBePublished
"""
if (getBatchEventsPublisher() != null) {
getBatchEventsPublisher().publishJobInstanceEvent(objectToPublish, eventTo... | java | private void publishEvent(WSJobInstance objectToPublish, String eventToPublish) {
if (getBatchEventsPublisher() != null) {
getBatchEventsPublisher().publishJobInstanceEvent(objectToPublish, eventToPublish, correlationId);
}
} | [
"private",
"void",
"publishEvent",
"(",
"WSJobInstance",
"objectToPublish",
",",
"String",
"eventToPublish",
")",
"{",
"if",
"(",
"getBatchEventsPublisher",
"(",
")",
"!=",
"null",
")",
"{",
"getBatchEventsPublisher",
"(",
")",
".",
"publishJobInstanceEvent",
"(",
... | Publish event for this job instance
@param jobInstance
@param eventToBePublished | [
"Publish",
"event",
"for",
"this",
"job",
"instance"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.jbatch.container/src/com/ibm/jbatch/container/execution/impl/RuntimeJobExecution.java#L150-L155 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java | SecurityCenterClient.createSource | public final Source createSource(OrganizationName parent, Source source) {
"""
Creates a source.
<p>Sample code:
<pre><code>
try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
Source source = Source.newBuilder(... | java | public final Source createSource(OrganizationName parent, Source source) {
CreateSourceRequest request =
CreateSourceRequest.newBuilder()
.setParent(parent == null ? null : parent.toString())
.setSource(source)
.build();
return createSource(request);
} | [
"public",
"final",
"Source",
"createSource",
"(",
"OrganizationName",
"parent",
",",
"Source",
"source",
")",
"{",
"CreateSourceRequest",
"request",
"=",
"CreateSourceRequest",
".",
"newBuilder",
"(",
")",
".",
"setParent",
"(",
"parent",
"==",
"null",
"?",
"nul... | Creates a source.
<p>Sample code:
<pre><code>
try (SecurityCenterClient securityCenterClient = SecurityCenterClient.create()) {
OrganizationName parent = OrganizationName.of("[ORGANIZATION]");
Source source = Source.newBuilder().build();
Source response = securityCenterClient.createSource(parent, source);
}
</code></... | [
"Creates",
"a",
"source",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-securitycenter/src/main/java/com/google/cloud/securitycenter/v1/SecurityCenterClient.java#L201-L209 |
web3j/web3j | abi/src/main/java/org/web3j/abi/FunctionReturnDecoder.java | FunctionReturnDecoder.decodeIndexedValue | @SuppressWarnings("unchecked")
public static <T extends Type> Type decodeIndexedValue(
String rawInput, TypeReference<T> typeReference) {
"""
<p>Decodes an indexed parameter associated with an event. Indexed parameters are individually
encoded, unlike non-indexed parameters which are encoded as pe... | java | @SuppressWarnings("unchecked")
public static <T extends Type> Type decodeIndexedValue(
String rawInput, TypeReference<T> typeReference) {
String input = Numeric.cleanHexPrefix(rawInput);
try {
Class<T> type = typeReference.getClassType();
if (Bytes.class.isAssig... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"<",
"T",
"extends",
"Type",
">",
"Type",
"decodeIndexedValue",
"(",
"String",
"rawInput",
",",
"TypeReference",
"<",
"T",
">",
"typeReference",
")",
"{",
"String",
"input",
"=",
"Numeric"... | <p>Decodes an indexed parameter associated with an event. Indexed parameters are individually
encoded, unlike non-indexed parameters which are encoded as per ABI-encoded function
parameters and return values.</p>
<p>If any of the following types are indexed, the Keccak-256 hashes of the values are
returned instead. Th... | [
"<p",
">",
"Decodes",
"an",
"indexed",
"parameter",
"associated",
"with",
"an",
"event",
".",
"Indexed",
"parameters",
"are",
"individually",
"encoded",
"unlike",
"non",
"-",
"indexed",
"parameters",
"which",
"are",
"encoded",
"as",
"per",
"ABI",
"-",
"encoded... | train | https://github.com/web3j/web3j/blob/f99ceb19cdd65895c18e0a565034767ca18ea9fc/abi/src/main/java/org/web3j/abi/FunctionReturnDecoder.java#L70-L90 |
mikereedell/sunrisesunsetlib-java | src/main/java/com/luckycatlabs/sunrisesunset/calculator/SolarEventCalculator.java | SolarEventCalculator.computeSunsetCalendar | public Calendar computeSunsetCalendar(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... | java | public Calendar computeSunsetCalendar(Zenith solarZenith, Calendar date) {
return getLocalTimeAsCalendar(computeSolarEventTime(solarZenith, date, false), date);
} | [
"public",
"Calendar",
"computeSunsetCalendar",
"(",
"Zenith",
"solarZenith",
",",
"Calendar",
"date",
")",
"{",
"return",
"getLocalTimeAsCalendar",
"(",
"computeSolarEventTime",
"(",
"solarZenith",
",",
"date",
",",
"false",
")",
",",
"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 sunset for.
@return the sunset time as a Calendar or null for no sunset. | [
"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#L112-L114 |
airbnb/lottie-android | lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java | LottieCompositionFactory.fromRawRes | public static LottieTask<LottieComposition> fromRawRes(Context context, @RawRes final int rawRes) {
"""
Parse an animation from raw/res. This is recommended over putting your animation in assets because
it uses a hard reference to R.
The resource id will be used as a cache key so future usages won't parse the js... | java | public static LottieTask<LottieComposition> fromRawRes(Context context, @RawRes final int rawRes) {
// Prevent accidentally leaking an Activity.
final Context appContext = context.getApplicationContext();
return cache(rawResCacheKey(rawRes), new Callable<LottieResult<LottieComposition>>() {
@Override ... | [
"public",
"static",
"LottieTask",
"<",
"LottieComposition",
">",
"fromRawRes",
"(",
"Context",
"context",
",",
"@",
"RawRes",
"final",
"int",
"rawRes",
")",
"{",
"// Prevent accidentally leaking an Activity.",
"final",
"Context",
"appContext",
"=",
"context",
".",
"... | Parse an animation from raw/res. This is recommended over putting your animation in assets because
it uses a hard reference to R.
The resource id will be used as a cache key so future usages won't parse the json again. | [
"Parse",
"an",
"animation",
"from",
"raw",
"/",
"res",
".",
"This",
"is",
"recommended",
"over",
"putting",
"your",
"animation",
"in",
"assets",
"because",
"it",
"uses",
"a",
"hard",
"reference",
"to",
"R",
".",
"The",
"resource",
"id",
"will",
"be",
"us... | train | https://github.com/airbnb/lottie-android/blob/126dabdc9f586c87822f85fe1128cdad439d30fa/lottie/src/main/java/com/airbnb/lottie/LottieCompositionFactory.java#L124-L132 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.freefax_new_GET | public OvhOrder freefax_new_GET(OvhQuantityEnum quantity) throws IOException {
"""
Get prices and contracts information
REST: GET /order/freefax/new
@param quantity [required] Fax quantity possibilities to purchase
"""
String qPath = "/order/freefax/new";
StringBuilder sb = path(qPath);
query(sb, "qu... | java | public OvhOrder freefax_new_GET(OvhQuantityEnum quantity) throws IOException {
String qPath = "/order/freefax/new";
StringBuilder sb = path(qPath);
query(sb, "quantity", quantity);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhOrder.class);
} | [
"public",
"OvhOrder",
"freefax_new_GET",
"(",
"OvhQuantityEnum",
"quantity",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/freefax/new\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
")",
";",
"query",
"(",
"sb",
",",
"\"quantit... | Get prices and contracts information
REST: GET /order/freefax/new
@param quantity [required] Fax quantity possibilities to purchase | [
"Get",
"prices",
"and",
"contracts",
"information"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L1011-L1017 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java | UrlMapClient.insertUrlMap | @BetaApi
public final Operation insertUrlMap(String project, UrlMap urlMapResource) {
"""
Creates a UrlMap resource in the specified project using the data included in the request.
<p>Sample code:
<pre><code>
try (UrlMapClient urlMapClient = UrlMapClient.create()) {
ProjectName project = ProjectName.of("... | java | @BetaApi
public final Operation insertUrlMap(String project, UrlMap urlMapResource) {
InsertUrlMapHttpRequest request =
InsertUrlMapHttpRequest.newBuilder()
.setProject(project)
.setUrlMapResource(urlMapResource)
.build();
return insertUrlMap(request);
} | [
"@",
"BetaApi",
"public",
"final",
"Operation",
"insertUrlMap",
"(",
"String",
"project",
",",
"UrlMap",
"urlMapResource",
")",
"{",
"InsertUrlMapHttpRequest",
"request",
"=",
"InsertUrlMapHttpRequest",
".",
"newBuilder",
"(",
")",
".",
"setProject",
"(",
"project",... | Creates a UrlMap resource in the specified project using the data included in the request.
<p>Sample code:
<pre><code>
try (UrlMapClient urlMapClient = UrlMapClient.create()) {
ProjectName project = ProjectName.of("[PROJECT]");
UrlMap urlMapResource = UrlMap.newBuilder().build();
Operation response = urlMapClient.ins... | [
"Creates",
"a",
"UrlMap",
"resource",
"in",
"the",
"specified",
"project",
"using",
"the",
"data",
"included",
"in",
"the",
"request",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/UrlMapClient.java#L400-L409 |
couchbase/couchbase-lite-java | src/main/java/com/couchbase/lite/Parameters.java | Parameters.setDouble | @NonNull
public Parameters setDouble(@NonNull String name, double value) {
"""
Set a double value to the query parameter referenced by the given name. A query parameter
is defined by using the Expression's parameter(String name) function.
@param name The parameter name.
@param value The double value.
@r... | java | @NonNull
public Parameters setDouble(@NonNull String name, double value) {
return setValue(name, value);
} | [
"@",
"NonNull",
"public",
"Parameters",
"setDouble",
"(",
"@",
"NonNull",
"String",
"name",
",",
"double",
"value",
")",
"{",
"return",
"setValue",
"(",
"name",
",",
"value",
")",
";",
"}"
] | Set a double value to the query parameter referenced by the given name. A query parameter
is defined by using the Expression's parameter(String name) function.
@param name The parameter name.
@param value The double value.
@return The self object. | [
"Set",
"a",
"double",
"value",
"to",
"the",
"query",
"parameter",
"referenced",
"by",
"the",
"given",
"name",
".",
"A",
"query",
"parameter",
"is",
"defined",
"by",
"using",
"the",
"Expression",
"s",
"parameter",
"(",
"String",
"name",
")",
"function",
"."... | train | https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Parameters.java#L144-L147 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.java | AbstractSSTableSimpleWriter.addColumn | public void addColumn(ByteBuffer name, ByteBuffer value, long timestamp) throws IOException {
"""
Insert a new "regular" column to the current row (and super column if applicable).
@param name the column name
@param value the column value
@param timestamp the column timestamp
"""
addColumn(new Buffe... | java | public void addColumn(ByteBuffer name, ByteBuffer value, long timestamp) throws IOException
{
addColumn(new BufferCell(metadata.comparator.cellFromByteBuffer(name), value, timestamp));
} | [
"public",
"void",
"addColumn",
"(",
"ByteBuffer",
"name",
",",
"ByteBuffer",
"value",
",",
"long",
"timestamp",
")",
"throws",
"IOException",
"{",
"addColumn",
"(",
"new",
"BufferCell",
"(",
"metadata",
".",
"comparator",
".",
"cellFromByteBuffer",
"(",
"name",
... | Insert a new "regular" column to the current row (and super column if applicable).
@param name the column name
@param value the column value
@param timestamp the column timestamp | [
"Insert",
"a",
"new",
"regular",
"column",
"to",
"the",
"current",
"row",
"(",
"and",
"super",
"column",
"if",
"applicable",
")",
"."
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/io/sstable/AbstractSSTableSimpleWriter.java#L141-L144 |
lightbend/config | config/src/main/java/com/typesafe/config/ConfigRenderOptions.java | ConfigRenderOptions.setOriginComments | public ConfigRenderOptions setOriginComments(boolean value) {
"""
Returns options with origin comments toggled. If this is enabled, the
library generates comments for each setting based on the
{@link ConfigValue#origin} of that setting's value. For example these
comments might tell you which file a setting come... | java | public ConfigRenderOptions setOriginComments(boolean value) {
if (value == originComments)
return this;
else
return new ConfigRenderOptions(value, comments, formatted, json);
} | [
"public",
"ConfigRenderOptions",
"setOriginComments",
"(",
"boolean",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"originComments",
")",
"return",
"this",
";",
"else",
"return",
"new",
"ConfigRenderOptions",
"(",
"value",
",",
"comments",
",",
"formatted",
",",... | Returns options with origin comments toggled. If this is enabled, the
library generates comments for each setting based on the
{@link ConfigValue#origin} of that setting's value. For example these
comments might tell you which file a setting comes from.
<p>
{@code setOriginComments()} controls only these autogenerated... | [
"Returns",
"options",
"with",
"origin",
"comments",
"toggled",
".",
"If",
"this",
"is",
"enabled",
"the",
"library",
"generates",
"comments",
"for",
"each",
"setting",
"based",
"on",
"the",
"{",
"@link",
"ConfigValue#origin",
"}",
"of",
"that",
"setting",
"s",... | train | https://github.com/lightbend/config/blob/68cebfde5e861e9a5fdc75ceff366ed95e17d475/config/src/main/java/com/typesafe/config/ConfigRenderOptions.java#L96-L101 |
twitter/cloudhopper-commons | ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java | HexUtil.appendHexString | public static void appendHexString(StringBuilder buffer, byte[] bytes) {
"""
Appends a byte array to a StringBuilder with each byte in a "Big Endian"
hexidecimal format. For example, a byte 0x34 will be appended as a
String in format "34". A byte array of { 0x34, 035 } would append "3435".
@param buffer The St... | java | public static void appendHexString(StringBuilder buffer, byte[] bytes) {
assertNotNull(buffer);
if (bytes == null) {
return; // do nothing (a noop)
}
appendHexString(buffer, bytes, 0, bytes.length);
} | [
"public",
"static",
"void",
"appendHexString",
"(",
"StringBuilder",
"buffer",
",",
"byte",
"[",
"]",
"bytes",
")",
"{",
"assertNotNull",
"(",
"buffer",
")",
";",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"return",
";",
"// do nothing (a noop)",
"}",
"ap... | Appends a byte array to a StringBuilder with each byte in a "Big Endian"
hexidecimal format. For example, a byte 0x34 will be appended as a
String in format "34". A byte array of { 0x34, 035 } would append "3435".
@param buffer The StringBuilder the byte array in hexidecimal format
will be appended to. If the buffer ... | [
"Appends",
"a",
"byte",
"array",
"to",
"a",
"StringBuilder",
"with",
"each",
"byte",
"in",
"a",
"Big",
"Endian",
"hexidecimal",
"format",
".",
"For",
"example",
"a",
"byte",
"0x34",
"will",
"be",
"appended",
"as",
"a",
"String",
"in",
"format",
"34",
"."... | train | https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/HexUtil.java#L86-L92 |
intuit/QuickBooks-V3-Java-SDK | payments-api/src/main/java/com/intuit/payment/services/base/ServiceBase.java | ServiceBase.prepareResponse | public void prepareResponse(Request request, Response response, Entity entity) {
"""
Sets additional attributes to the entity
@param request
@param res
@param entity
"""
entity.setIntuit_tid(response.getIntuit_tid());
entity.setRequestId(request.getContext().getRequestId());
} | java | public void prepareResponse(Request request, Response response, Entity entity) {
entity.setIntuit_tid(response.getIntuit_tid());
entity.setRequestId(request.getContext().getRequestId());
} | [
"public",
"void",
"prepareResponse",
"(",
"Request",
"request",
",",
"Response",
"response",
",",
"Entity",
"entity",
")",
"{",
"entity",
".",
"setIntuit_tid",
"(",
"response",
".",
"getIntuit_tid",
"(",
")",
")",
";",
"entity",
".",
"setRequestId",
"(",
"re... | Sets additional attributes to the entity
@param request
@param res
@param entity | [
"Sets",
"additional",
"attributes",
"to",
"the",
"entity"
] | train | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/payments-api/src/main/java/com/intuit/payment/services/base/ServiceBase.java#L165-L168 |
citiususc/hipster | hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/MazeSearch.java | MazeSearch.printSearch | public static void printSearch(Iterator<? extends Node<?,Point,?>> it, Maze2D maze) throws InterruptedException {
"""
Prints the maze and the result of the current iteration until the solution is found.
@param it search iterator
@param maze maze to perform the search
@throws InterruptedException sleep excepti... | java | public static void printSearch(Iterator<? extends Node<?,Point,?>> it, Maze2D maze) throws InterruptedException {
Collection<Point> explored = new HashSet<Point>();
while (it.hasNext()) {
Node<?,Point,?> currentNode = it.next();
if (currentNode.previousNode() != null) {
... | [
"public",
"static",
"void",
"printSearch",
"(",
"Iterator",
"<",
"?",
"extends",
"Node",
"<",
"?",
",",
"Point",
",",
"?",
">",
">",
"it",
",",
"Maze2D",
"maze",
")",
"throws",
"InterruptedException",
"{",
"Collection",
"<",
"Point",
">",
"explored",
"="... | Prints the maze and the result of the current iteration until the solution is found.
@param it search iterator
@param maze maze to perform the search
@throws InterruptedException sleep exception between iterations | [
"Prints",
"the",
"maze",
"and",
"the",
"result",
"of",
"the",
"current",
"iteration",
"until",
"the",
"solution",
"is",
"found",
"."
] | train | https://github.com/citiususc/hipster/blob/9ab1236abb833a27641ae73ba9ca890d5c17598e/hipster-core/src/main/java/es/usc/citius/hipster/util/examples/maze/MazeSearch.java#L94-L112 |
JOML-CI/JOML | src/org/joml/Matrix4f.java | Matrix4f.rotationTowards | public Matrix4f rotationTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) {
"""
Set this matrix to a model transformation for a right-handed coordinate system,
that aligns the local <code>-z</code> axis with <code>(dirX, dirY, dirZ)</code>.
<p>
In order to apply the rotation transform... | java | public Matrix4f rotationTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) {
// Normalize direction
float invDirLength = 1.0f / (float) Math.sqrt(dirX * dirX + dirY * dirY + dirZ * dirZ);
float ndirX = dirX * invDirLength;
float ndirY = dirY * invDirLength;
... | [
"public",
"Matrix4f",
"rotationTowards",
"(",
"float",
"dirX",
",",
"float",
"dirY",
",",
"float",
"dirZ",
",",
"float",
"upX",
",",
"float",
"upY",
",",
"float",
"upZ",
")",
"{",
"// Normalize direction",
"float",
"invDirLength",
"=",
"1.0f",
"/",
"(",
"f... | Set this matrix to a model transformation for a right-handed coordinate system,
that aligns the local <code>-z</code> axis with <code>(dirX, dirY, dirZ)</code>.
<p>
In order to apply the rotation transformation to a previous existing transformation,
use {@link #rotateTowards(float, float, float, float, float, float) ro... | [
"Set",
"this",
"matrix",
"to",
"a",
"model",
"transformation",
"for",
"a",
"right",
"-",
"handed",
"coordinate",
"system",
"that",
"aligns",
"the",
"local",
"<code",
">",
"-",
"z<",
"/",
"code",
">",
"axis",
"with",
"<code",
">",
"(",
"dirX",
"dirY",
"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L14336-L14369 |
line/armeria | core/src/main/java/com/linecorp/armeria/server/AbstractVirtualHostBuilder.java | AbstractVirtualHostBuilder.serviceUnder | public B serviceUnder(String pathPrefix, Service<HttpRequest, HttpResponse> service) {
"""
Binds the specified {@link Service} under the specified directory.
"""
service(PathMapping.ofPrefix(pathPrefix), service);
return self();
} | java | public B serviceUnder(String pathPrefix, Service<HttpRequest, HttpResponse> service) {
service(PathMapping.ofPrefix(pathPrefix), service);
return self();
} | [
"public",
"B",
"serviceUnder",
"(",
"String",
"pathPrefix",
",",
"Service",
"<",
"HttpRequest",
",",
"HttpResponse",
">",
"service",
")",
"{",
"service",
"(",
"PathMapping",
".",
"ofPrefix",
"(",
"pathPrefix",
")",
",",
"service",
")",
";",
"return",
"self",... | Binds the specified {@link Service} under the specified directory. | [
"Binds",
"the",
"specified",
"{"
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/AbstractVirtualHostBuilder.java#L310-L313 |
pmlopes/yoke | framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java | Static.sendFile | private void sendFile(final YokeRequest request, final String file, final FileProps props) {
"""
Write a file into the response body
@param request
@param file
@param props
"""
// write content type
String contentType = MimeType.getMime(file);
String charset = MimeType.getCharset(c... | java | private void sendFile(final YokeRequest request, final String file, final FileProps props) {
// write content type
String contentType = MimeType.getMime(file);
String charset = MimeType.getCharset(contentType);
request.response().setContentType(contentType, charset);
request.resp... | [
"private",
"void",
"sendFile",
"(",
"final",
"YokeRequest",
"request",
",",
"final",
"String",
"file",
",",
"final",
"FileProps",
"props",
")",
"{",
"// write content type",
"String",
"contentType",
"=",
"MimeType",
".",
"getMime",
"(",
"file",
")",
";",
"Stri... | Write a file into the response body
@param request
@param file
@param props | [
"Write",
"a",
"file",
"into",
"the",
"response",
"body"
] | train | https://github.com/pmlopes/yoke/blob/fe8a64036f09fb745f0644faddd46162d64faf3c/framework/src/main/java/com/jetdrone/vertx/yoke/middleware/Static.java#L175-L188 |
js-lib-com/commons | src/main/java/js/util/Classes.java | Classes.getField | public static Field getField(Class<?> clazz, String fieldName) {
"""
Get class field with unchecked runtime exception. JRE throws checked {@link NoSuchFieldException} if field is
missing, behavior that is not desirable for this library. This method uses runtime, unchecked
{@link NoSuchBeingException} instead. Re... | java | public static Field getField(Class<?> clazz, String fieldName)
{
try {
Field field = clazz.getDeclaredField(fieldName);
field.setAccessible(true);
return field;
}
catch(NoSuchFieldException e) {
throw new NoSuchBeingException(e);
}
catch(SecurityException e) {
... | [
"public",
"static",
"Field",
"getField",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"fieldName",
")",
"{",
"try",
"{",
"Field",
"field",
"=",
"clazz",
".",
"getDeclaredField",
"(",
"fieldName",
")",
";",
"field",
".",
"setAccessible",
"(",
"tru... | Get class field with unchecked runtime exception. JRE throws checked {@link NoSuchFieldException} if field is
missing, behavior that is not desirable for this library. This method uses runtime, unchecked
{@link NoSuchBeingException} instead. Returned field has accessibility set to true.
@param clazz Java class to retu... | [
"Get",
"class",
"field",
"with",
"unchecked",
"runtime",
"exception",
".",
"JRE",
"throws",
"checked",
"{",
"@link",
"NoSuchFieldException",
"}",
"if",
"field",
"is",
"missing",
"behavior",
"that",
"is",
"not",
"desirable",
"for",
"this",
"library",
".",
"This... | train | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/util/Classes.java#L607-L620 |
palaima/AndroidSmoothBluetooth | library/src/main/java/io/palaima/smoothbluetooth/BluetoothService.java | BluetoothService.start | public synchronized void start(boolean android, boolean secure) {
"""
session in listening (server) mode. Called by the Activity onResume()
"""
isAndroid = android;
mIsSecure = secure;
// Cancel any thread attempting to make a connection
if (mConnectThread != null) {mConnectThre... | java | public synchronized void start(boolean android, boolean secure) {
isAndroid = android;
mIsSecure = secure;
// Cancel any thread attempting to make a connection
if (mConnectThread != null) {mConnectThread.cancel(); mConnectThread = null;}
// Cancel any thread currently running a c... | [
"public",
"synchronized",
"void",
"start",
"(",
"boolean",
"android",
",",
"boolean",
"secure",
")",
"{",
"isAndroid",
"=",
"android",
";",
"mIsSecure",
"=",
"secure",
";",
"// Cancel any thread attempting to make a connection",
"if",
"(",
"mConnectThread",
"!=",
"n... | session in listening (server) mode. Called by the Activity onResume() | [
"session",
"in",
"listening",
"(",
"server",
")",
"mode",
".",
"Called",
"by",
"the",
"Activity",
"onResume",
"()"
] | train | https://github.com/palaima/AndroidSmoothBluetooth/blob/0109c8c4e281765fe1ac7f8090c2d6db295a07c8/library/src/main/java/io/palaima/smoothbluetooth/BluetoothService.java#L91-L106 |
OpenLiberty/open-liberty | dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/WrapperManager.java | WrapperManager.unregisterHome | public void unregisterHome(J2EEName homeName, EJSHome homeObj)
throws CSIException {
"""
unregisterHome removes from cache homeObj and all Objects that
have homeObj as it's home. It also unregisters these objects from
from the orb object adapter.
"""
if (TraceComponent.isAnyTracin... | java | public void unregisterHome(J2EEName homeName, EJSHome homeObj)
throws CSIException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "unregisterHome");
J2EEName cacheHomeName;
int numEnumerated = 0, numRemoved = 0; // d103404.2
... | [
"public",
"void",
"unregisterHome",
"(",
"J2EEName",
"homeName",
",",
"EJSHome",
"homeObj",
")",
"throws",
"CSIException",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"e... | unregisterHome removes from cache homeObj and all Objects that
have homeObj as it's home. It also unregisters these objects from
from the orb object adapter. | [
"unregisterHome",
"removes",
"from",
"cache",
"homeObj",
"and",
"all",
"Objects",
"that",
"have",
"homeObj",
"as",
"it",
"s",
"home",
".",
"It",
"also",
"unregisters",
"these",
"objects",
"from",
"from",
"the",
"orb",
"object",
"adapter",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/WrapperManager.java#L422-L466 |
UrielCh/ovh-java-sdk | ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java | ApiOvhMe.payment_transaction_GET | public ArrayList<Long> payment_transaction_GET(Long paymentMethodId, net.minidev.ovh.api.me.payment.method.transaction.OvhStatus status) throws IOException {
"""
Retrieve associated payment method transaction ID list
REST: GET /me/payment/transaction
@param paymentMethodId [required] Payment method ID
@param ... | java | public ArrayList<Long> payment_transaction_GET(Long paymentMethodId, net.minidev.ovh.api.me.payment.method.transaction.OvhStatus status) throws IOException {
String qPath = "/me/payment/transaction";
StringBuilder sb = path(qPath);
query(sb, "paymentMethodId", paymentMethodId);
query(sb, "status", status);
St... | [
"public",
"ArrayList",
"<",
"Long",
">",
"payment_transaction_GET",
"(",
"Long",
"paymentMethodId",
",",
"net",
".",
"minidev",
".",
"ovh",
".",
"api",
".",
"me",
".",
"payment",
".",
"method",
".",
"transaction",
".",
"OvhStatus",
"status",
")",
"throws",
... | Retrieve associated payment method transaction ID list
REST: GET /me/payment/transaction
@param paymentMethodId [required] Payment method ID
@param status [required] Transaction status
API beta | [
"Retrieve",
"associated",
"payment",
"method",
"transaction",
"ID",
"list"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1147-L1154 |
tracee/tracee | core/src/main/java/io/tracee/transport/SoapHeaderTransport.java | SoapHeaderTransport.renderSoapHeader | public void renderSoapHeader(final Map<String, String> context, final Result result) {
"""
Renders a given context map into a given result that should be the TPIC header node.
"""
renderSoapHeader(RESULT_MARSHALLER, context, result);
} | java | public void renderSoapHeader(final Map<String, String> context, final Result result) {
renderSoapHeader(RESULT_MARSHALLER, context, result);
} | [
"public",
"void",
"renderSoapHeader",
"(",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"context",
",",
"final",
"Result",
"result",
")",
"{",
"renderSoapHeader",
"(",
"RESULT_MARSHALLER",
",",
"context",
",",
"result",
")",
";",
"}"
] | Renders a given context map into a given result that should be the TPIC header node. | [
"Renders",
"a",
"given",
"context",
"map",
"into",
"a",
"given",
"result",
"that",
"should",
"be",
"the",
"TPIC",
"header",
"node",
"."
] | train | https://github.com/tracee/tracee/blob/15a68e435248f57757beb8ceac6db5b7f6035bb3/core/src/main/java/io/tracee/transport/SoapHeaderTransport.java#L112-L114 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/cmp/cmppolicy_binding.java | cmppolicy_binding.get | public static cmppolicy_binding get(nitro_service service, String name) throws Exception {
"""
Use this API to fetch cmppolicy_binding resource of given name .
"""
cmppolicy_binding obj = new cmppolicy_binding();
obj.set_name(name);
cmppolicy_binding response = (cmppolicy_binding) obj.get_resource(servic... | java | public static cmppolicy_binding get(nitro_service service, String name) throws Exception{
cmppolicy_binding obj = new cmppolicy_binding();
obj.set_name(name);
cmppolicy_binding response = (cmppolicy_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"cmppolicy_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"name",
")",
"throws",
"Exception",
"{",
"cmppolicy_binding",
"obj",
"=",
"new",
"cmppolicy_binding",
"(",
")",
";",
"obj",
".",
"set_name",
"(",
"name",
")",
";",
... | Use this API to fetch cmppolicy_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"cmppolicy_binding",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/cmp/cmppolicy_binding.java#L136-L141 |
google/gson | gson/src/main/java/com/google/gson/internal/PreJava9DateFormatProvider.java | PreJava9DateFormatProvider.getUSDateTimeFormat | public static DateFormat getUSDateTimeFormat(int dateStyle, int timeStyle) {
"""
Returns the same DateFormat as {@code DateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US)}
in Java 8 or below.
"""
String pattern = getDatePartOfDateTimePattern(dateStyle) + " " + getTimePartOfDateTimePattern(time... | java | public static DateFormat getUSDateTimeFormat(int dateStyle, int timeStyle) {
String pattern = getDatePartOfDateTimePattern(dateStyle) + " " + getTimePartOfDateTimePattern(timeStyle);
return new SimpleDateFormat(pattern, Locale.US);
} | [
"public",
"static",
"DateFormat",
"getUSDateTimeFormat",
"(",
"int",
"dateStyle",
",",
"int",
"timeStyle",
")",
"{",
"String",
"pattern",
"=",
"getDatePartOfDateTimePattern",
"(",
"dateStyle",
")",
"+",
"\" \"",
"+",
"getTimePartOfDateTimePattern",
"(",
"timeStyle",
... | Returns the same DateFormat as {@code DateFormat.getDateTimeInstance(dateStyle, timeStyle, Locale.US)}
in Java 8 or below. | [
"Returns",
"the",
"same",
"DateFormat",
"as",
"{"
] | train | https://github.com/google/gson/blob/63ee47cb642c8018e5cddd639aa2be143220ad4b/gson/src/main/java/com/google/gson/internal/PreJava9DateFormatProvider.java#L38-L41 |
groupby/api-java | src/main/java/com/groupbyinc/util/UrlBeautifier.java | UrlBeautifier.addReplacementRule | public void addReplacementRule(char target, Character replacement, String refinementName) {
"""
<code>
Adds a new replacement rule that will only be applied to the specified refinement. The original
search term and refinements will be put back into the query object.
If replacement is null the target character w... | java | public void addReplacementRule(char target, Character replacement, String refinementName) {
if (!((Character) target).equals(replacement)) {
replacementRules.add(new UrlReplacementRule(target, replacement, refinementName));
}
} | [
"public",
"void",
"addReplacementRule",
"(",
"char",
"target",
",",
"Character",
"replacement",
",",
"String",
"refinementName",
")",
"{",
"if",
"(",
"!",
"(",
"(",
"Character",
")",
"target",
")",
".",
"equals",
"(",
"replacement",
")",
")",
"{",
"replace... | <code>
Adds a new replacement rule that will only be applied to the specified refinement. The original
search term and refinements will be put back into the query object.
If replacement is null the target character will be removed.
Note: Replacements that are chained may still contain the original target character.
For... | [
"<code",
">",
"Adds",
"a",
"new",
"replacement",
"rule",
"that",
"will",
"only",
"be",
"applied",
"to",
"the",
"specified",
"refinement",
".",
"The",
"original",
"search",
"term",
"and",
"refinements",
"will",
"be",
"put",
"back",
"into",
"the",
"query",
"... | train | https://github.com/groupby/api-java/blob/257c4ed0777221e5e4ade3b29b9921300fac4e2e/src/main/java/com/groupbyinc/util/UrlBeautifier.java#L580-L584 |
Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepRecordReader.java | DeepRecordReader.createConnection | private Session createConnection() {
"""
Creates a new connection. Reuses a cached connection if possible.
@return the new session
"""
/* reorder locations */
List<String> locations = Lists.newArrayList(split.getReplicas());
Collections.sort(locations, new DeepPartitionLocationCompa... | java | private Session createConnection() {
/* reorder locations */
List<String> locations = Lists.newArrayList(split.getReplicas());
Collections.sort(locations, new DeepPartitionLocationComparator());
Exception lastException = null;
LOG.debug("createConnection: " + locations);
... | [
"private",
"Session",
"createConnection",
"(",
")",
"{",
"/* reorder locations */",
"List",
"<",
"String",
">",
"locations",
"=",
"Lists",
".",
"newArrayList",
"(",
"split",
".",
"getReplicas",
"(",
")",
")",
";",
"Collections",
".",
"sort",
"(",
"locations",
... | Creates a new connection. Reuses a cached connection if possible.
@return the new session | [
"Creates",
"a",
"new",
"connection",
".",
"Reuses",
"a",
"cached",
"connection",
"if",
"possible",
"."
] | train | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepRecordReader.java#L189-L209 |
wildfly/wildfly-core | host-controller/src/main/java/org/jboss/as/domain/controller/operations/SyncServerGroupOperationHandler.java | SyncServerGroupOperationHandler.createRegistry | @Override
Transformers.ResourceIgnoredTransformationRegistry createRegistry(OperationContext context, Resource remote, Set<String> remoteExtensions) {
"""
For the local model we include both the original as well as the remote model. The diff will automatically remove
not used configuration.
@param context ... | java | @Override
Transformers.ResourceIgnoredTransformationRegistry createRegistry(OperationContext context, Resource remote, Set<String> remoteExtensions) {
final ReadMasterDomainModelUtil.RequiredConfigurationHolder rc = new ReadMasterDomainModelUtil.RequiredConfigurationHolder();
final PathElement host... | [
"@",
"Override",
"Transformers",
".",
"ResourceIgnoredTransformationRegistry",
"createRegistry",
"(",
"OperationContext",
"context",
",",
"Resource",
"remote",
",",
"Set",
"<",
"String",
">",
"remoteExtensions",
")",
"{",
"final",
"ReadMasterDomainModelUtil",
".",
"Requ... | For the local model we include both the original as well as the remote model. The diff will automatically remove
not used configuration.
@param context the operation context
@param remote the remote model
@param remoteExtensions the extension registry
@return | [
"For",
"the",
"local",
"model",
"we",
"include",
"both",
"the",
"original",
"as",
"well",
"as",
"the",
"remote",
"model",
".",
"The",
"diff",
"will",
"automatically",
"remove",
"not",
"used",
"configuration",
"."
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/host-controller/src/main/java/org/jboss/as/domain/controller/operations/SyncServerGroupOperationHandler.java#L68-L88 |
Samsung/GearVRf | GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java | ControlBar.addControl | public Widget addControl(String name, int resId, String label, Widget.OnTouchListener listener) {
"""
Add new control at the end of control bar with specified touch listener, control label and resource.
Size of control bar is updated based on new number of controls.
@param name name of the control to remove
@pa... | java | public Widget addControl(String name, int resId, String label, Widget.OnTouchListener listener) {
return addControl(name, resId, label, listener, -1);
} | [
"public",
"Widget",
"addControl",
"(",
"String",
"name",
",",
"int",
"resId",
",",
"String",
"label",
",",
"Widget",
".",
"OnTouchListener",
"listener",
")",
"{",
"return",
"addControl",
"(",
"name",
",",
"resId",
",",
"label",
",",
"listener",
",",
"-",
... | Add new control at the end of control bar with specified touch listener, control label and resource.
Size of control bar is updated based on new number of controls.
@param name name of the control to remove
@param resId the control face
@param label the control label
@param listener touch listener | [
"Add",
"new",
"control",
"at",
"the",
"end",
"of",
"control",
"bar",
"with",
"specified",
"touch",
"listener",
"control",
"label",
"and",
"resource",
".",
"Size",
"of",
"control",
"bar",
"is",
"updated",
"based",
"on",
"new",
"number",
"of",
"controls",
".... | train | https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/widgetLib/src/org/gearvrf/widgetlib/widget/custom/ControlBar.java#L182-L184 |
MenoData/Time4J | base/src/main/java/net/time4j/range/Weeks.java | Weeks.between | public static Weeks between(CalendarWeek w1, CalendarWeek w2) {
"""
/*[deutsch]
<p>Bestimmt die Differenz zwischen den angegebenen Kalenderwochen. </p>
@param w1 first calendar week
@param w2 second calendar week
@return difference in weeks
"""
PlainDate d1 = w1.at(Weekday.MONDAY);
... | java | public static Weeks between(CalendarWeek w1, CalendarWeek w2) {
PlainDate d1 = w1.at(Weekday.MONDAY);
PlainDate d2 = w2.at(Weekday.MONDAY);
return Weeks.between(d1, d2);
} | [
"public",
"static",
"Weeks",
"between",
"(",
"CalendarWeek",
"w1",
",",
"CalendarWeek",
"w2",
")",
"{",
"PlainDate",
"d1",
"=",
"w1",
".",
"at",
"(",
"Weekday",
".",
"MONDAY",
")",
";",
"PlainDate",
"d2",
"=",
"w2",
".",
"at",
"(",
"Weekday",
".",
"M... | /*[deutsch]
<p>Bestimmt die Differenz zwischen den angegebenen Kalenderwochen. </p>
@param w1 first calendar week
@param w2 second calendar week
@return difference in weeks | [
"/",
"*",
"[",
"deutsch",
"]",
"<p",
">",
"Bestimmt",
"die",
"Differenz",
"zwischen",
"den",
"angegebenen",
"Kalenderwochen",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/range/Weeks.java#L140-L146 |
jeremybrooks/jinx | src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java | PhotosGeoApi.batchCorrectLocation | public Response batchCorrectLocation(Float lat, Float lon, Integer accuracy, String placeId, String woeId) throws JinxException {
"""
Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy.
<br>
Batch corrections are processed in a delayed queue so it may take a fe... | java | public Response batchCorrectLocation(Float lat, Float lon, Integer accuracy, String placeId, String woeId) throws JinxException {
JinxUtils.validateParams(lat, lon, accuracy);
if (JinxUtils.isNullOrEmpty(placeId)) {
JinxUtils.validateParams(woeId);
}
Map<String, String> params = new TreeMap<>();
... | [
"public",
"Response",
"batchCorrectLocation",
"(",
"Float",
"lat",
",",
"Float",
"lon",
",",
"Integer",
"accuracy",
",",
"String",
"placeId",
",",
"String",
"woeId",
")",
"throws",
"JinxException",
"{",
"JinxUtils",
".",
"validateParams",
"(",
"lat",
",",
"lon... | Correct the places hierarchy for all the photos for a user at a given latitude, longitude and accuracy.
<br>
Batch corrections are processed in a delayed queue so it may take a few minutes before the changes are reflected in a user's photos.
<br>
This method requires authentication with 'write' permission.
<br>
Note: T... | [
"Correct",
"the",
"places",
"hierarchy",
"for",
"all",
"the",
"photos",
"for",
"a",
"user",
"at",
"a",
"given",
"latitude",
"longitude",
"and",
"accuracy",
".",
"<br",
">",
"Batch",
"corrections",
"are",
"processed",
"in",
"a",
"delayed",
"queue",
"so",
"i... | train | https://github.com/jeremybrooks/jinx/blob/ab7a4b7462d08bcbfd9b98bd3f5029771c20f6c6/src/main/java/net/jeremybrooks/jinx/api/PhotosGeoApi.java#L64-L81 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectors.java | ParagraphVectors.similarityToLabel | @Deprecated
public double similarityToLabel(String rawText, String label) {
"""
This method returns similarity of the document to specific label, based on mean value
@param rawText
@param label
@return
"""
if (tokenizerFactory == null)
throw new IllegalStateException("TokenizerFact... | java | @Deprecated
public double similarityToLabel(String rawText, String label) {
if (tokenizerFactory == null)
throw new IllegalStateException("TokenizerFactory should be defined, prior to predict() call");
List<String> tokens = tokenizerFactory.create(rawText).getTokens();
List<Voca... | [
"@",
"Deprecated",
"public",
"double",
"similarityToLabel",
"(",
"String",
"rawText",
",",
"String",
"label",
")",
"{",
"if",
"(",
"tokenizerFactory",
"==",
"null",
")",
"throw",
"new",
"IllegalStateException",
"(",
"\"TokenizerFactory should be defined, prior to predic... | This method returns similarity of the document to specific label, based on mean value
@param rawText
@param label
@return | [
"This",
"method",
"returns",
"similarity",
"of",
"the",
"document",
"to",
"specific",
"label",
"based",
"on",
"mean",
"value"
] | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectors.java#L652-L665 |
FXMisc/RichTextFX | richtextfx/src/main/java/org/fxmisc/richtext/util/UndoUtils.java | UndoUtils.richTextUndoManager | public static <PS, SEG, S> UndoManager<List<RichTextChange<PS, SEG, S>>> richTextUndoManager(
GenericStyledArea<PS, SEG, S> area) {
"""
Returns an UndoManager with an unlimited history that can undo/redo {@link RichTextChange}s. New changes
emitted from the stream will not be merged with the previous ... | java | public static <PS, SEG, S> UndoManager<List<RichTextChange<PS, SEG, S>>> richTextUndoManager(
GenericStyledArea<PS, SEG, S> area) {
return richTextUndoManager(area, UndoManagerFactory.unlimitedHistoryFactory());
} | [
"public",
"static",
"<",
"PS",
",",
"SEG",
",",
"S",
">",
"UndoManager",
"<",
"List",
"<",
"RichTextChange",
"<",
"PS",
",",
"SEG",
",",
"S",
">",
">",
">",
"richTextUndoManager",
"(",
"GenericStyledArea",
"<",
"PS",
",",
"SEG",
",",
"S",
">",
"area"... | Returns an UndoManager with an unlimited history that can undo/redo {@link RichTextChange}s. New changes
emitted from the stream will not be merged with the previous change
after {@link #DEFAULT_PREVENT_MERGE_DELAY} | [
"Returns",
"an",
"UndoManager",
"with",
"an",
"unlimited",
"history",
"that",
"can",
"undo",
"/",
"redo",
"{"
] | train | https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/util/UndoUtils.java#L51-L54 |
GistLabs/mechanize | src/main/java/com/gistlabs/mechanize/cookie/Cookies.java | Cookies.get | public Cookie get(String name, String domain) {
"""
Returns the cookie with the given name and for the given domain or null.
"""
for(Cookie cookie : this) {
if(cookie.getName().equals(name) && cookie.getDomain().equals(domain))
return cookie;
}
return null;
} | java | public Cookie get(String name, String domain) {
for(Cookie cookie : this) {
if(cookie.getName().equals(name) && cookie.getDomain().equals(domain))
return cookie;
}
return null;
} | [
"public",
"Cookie",
"get",
"(",
"String",
"name",
",",
"String",
"domain",
")",
"{",
"for",
"(",
"Cookie",
"cookie",
":",
"this",
")",
"{",
"if",
"(",
"cookie",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"name",
")",
"&&",
"cookie",
".",
"getDom... | Returns the cookie with the given name and for the given domain or null. | [
"Returns",
"the",
"cookie",
"with",
"the",
"given",
"name",
"and",
"for",
"the",
"given",
"domain",
"or",
"null",
"."
] | train | https://github.com/GistLabs/mechanize/blob/32ddd0774439a4c08513c05d7ac7416a3899efed/src/main/java/com/gistlabs/mechanize/cookie/Cookies.java#L47-L53 |
aws/aws-sdk-java | aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java | XpathUtils.asNode | public static Node asNode(String nodeName, Node node)
throws XPathExpressionException {
"""
Evaluates the specified XPath expression and returns the result as a
Node.
@param nodeName
The XPath expression to evaluate.
@param node
The node to run the expression on.
@return The Node result.
@... | java | public static Node asNode(String nodeName, Node node)
throws XPathExpressionException {
return asNode(nodeName, node, xpath());
} | [
"public",
"static",
"Node",
"asNode",
"(",
"String",
"nodeName",
",",
"Node",
"node",
")",
"throws",
"XPathExpressionException",
"{",
"return",
"asNode",
"(",
"nodeName",
",",
"node",
",",
"xpath",
"(",
")",
")",
";",
"}"
] | Evaluates the specified XPath expression and returns the result as a
Node.
@param nodeName
The XPath expression to evaluate.
@param node
The node to run the expression on.
@return The Node result.
@throws XPathExpressionException
If there was a problem processing the specified XPath
expression. | [
"Evaluates",
"the",
"specified",
"XPath",
"expression",
"and",
"returns",
"the",
"result",
"as",
"a",
"Node",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-core/src/main/java/com/amazonaws/util/XpathUtils.java#L543-L546 |
sarl/sarl | sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/repository/UniqueAddressParticipantRepository.java | UniqueAddressParticipantRepository.registerParticipant | public ADDRESST registerParticipant(ADDRESST address, EventListener entity) {
"""
Registers a new participant in this repository.
@param address the address of the participant
@param entity the entity associated to the specified address
@return the address of the participant
"""
synchronized (mutex()) {
... | java | public ADDRESST registerParticipant(ADDRESST address, EventListener entity) {
synchronized (mutex()) {
addListener(address, entity);
this.participants.put(entity.getID(), address);
}
return address;
} | [
"public",
"ADDRESST",
"registerParticipant",
"(",
"ADDRESST",
"address",
",",
"EventListener",
"entity",
")",
"{",
"synchronized",
"(",
"mutex",
"(",
")",
")",
"{",
"addListener",
"(",
"address",
",",
"entity",
")",
";",
"this",
".",
"participants",
".",
"pu... | Registers a new participant in this repository.
@param address the address of the participant
@param entity the entity associated to the specified address
@return the address of the participant | [
"Registers",
"a",
"new",
"participant",
"in",
"this",
"repository",
"."
] | train | https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/sre/io.janusproject/io.janusproject.plugin/src/io/janusproject/kernel/repository/UniqueAddressParticipantRepository.java#L87-L93 |
GeoLatte/geolatte-common | src/main/java/org/geolatte/common/dataformats/json/to/GeoJsonToAssembler.java | GeoJsonToAssembler.createPoint | private Point createPoint(double[] input, CrsId crsIdValue) {
"""
Helpermethod that creates a point starting from its geojsonto coordinate array
@param input the coordinate array to convert to a point
@param crsIdValue the sridvalue of the crs in which the point is defined
@return an instance of a geolat... | java | private Point createPoint(double[] input, CrsId crsIdValue) {
if (input == null) {
return null;
}
if (input.length == 2) {
return Points.create2D(input[0], input[1], crsIdValue);
} else if(input.length == 3){
return Points.create3D(input[0], input[1], ... | [
"private",
"Point",
"createPoint",
"(",
"double",
"[",
"]",
"input",
",",
"CrsId",
"crsIdValue",
")",
"{",
"if",
"(",
"input",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"input",
".",
"length",
"==",
"2",
")",
"{",
"return",
"Po... | Helpermethod that creates a point starting from its geojsonto coordinate array
@param input the coordinate array to convert to a point
@param crsIdValue the sridvalue of the crs in which the point is defined
@return an instance of a geolatte point corresponding to the given to or null if the given array is null | [
"Helpermethod",
"that",
"creates",
"a",
"point",
"starting",
"from",
"its",
"geojsonto",
"coordinate",
"array"
] | train | https://github.com/GeoLatte/geolatte-common/blob/dc7f92b04d8c6cb706e78cb95e746d8f12089d95/src/main/java/org/geolatte/common/dataformats/json/to/GeoJsonToAssembler.java#L482-L499 |
UrielCh/ovh-java-sdk | ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java | ApiOvhOrder.dedicated_server_serviceName_ipMigration_GET | public ArrayList<String> dedicated_server_serviceName_ipMigration_GET(String serviceName, String ip, String token) throws IOException {
"""
Get allowed durations for 'ipMigration' option
REST: GET /order/dedicated/server/{serviceName}/ipMigration
@param ip [required] The IP to move to this server
@param token... | java | public ArrayList<String> dedicated_server_serviceName_ipMigration_GET(String serviceName, String ip, String token) throws IOException {
String qPath = "/order/dedicated/server/{serviceName}/ipMigration";
StringBuilder sb = path(qPath, serviceName);
query(sb, "ip", ip);
query(sb, "token", token);
String resp =... | [
"public",
"ArrayList",
"<",
"String",
">",
"dedicated_server_serviceName_ipMigration_GET",
"(",
"String",
"serviceName",
",",
"String",
"ip",
",",
"String",
"token",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/order/dedicated/server/{serviceName}/ipMigr... | Get allowed durations for 'ipMigration' option
REST: GET /order/dedicated/server/{serviceName}/ipMigration
@param ip [required] The IP to move to this server
@param token [required] IP migration token
@param serviceName [required] The internal name of your dedicated server | [
"Get",
"allowed",
"durations",
"for",
"ipMigration",
"option"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2554-L2561 |
OpenLiberty/open-liberty | dev/com.ibm.ws.logging.osgi/src/com/ibm/ws/logging/internal/osgi/WsMessageRouterImpl.java | WsMessageRouterImpl.routeTo | protected void routeTo(RoutedMessage routedMessage, String logHandlerId) {
"""
Route the message to the LogHandler identified by the given logHandlerId.
@param msg The fully formatted message.
@param logRecord The associated LogRecord, in case the LogHandler needs it.
@param logHandlerId The LogHandler ID in ... | java | protected void routeTo(RoutedMessage routedMessage, String logHandlerId) {
WsLogHandler wsLogHandler = wsLogHandlerServices.get(logHandlerId);
if (wsLogHandler != null) {
wsLogHandler.publish(routedMessage);
}
} | [
"protected",
"void",
"routeTo",
"(",
"RoutedMessage",
"routedMessage",
",",
"String",
"logHandlerId",
")",
"{",
"WsLogHandler",
"wsLogHandler",
"=",
"wsLogHandlerServices",
".",
"get",
"(",
"logHandlerId",
")",
";",
"if",
"(",
"wsLogHandler",
"!=",
"null",
")",
... | Route the message to the LogHandler identified by the given logHandlerId.
@param msg The fully formatted message.
@param logRecord The associated LogRecord, in case the LogHandler needs it.
@param logHandlerId The LogHandler ID in which to route. | [
"Route",
"the",
"message",
"to",
"the",
"LogHandler",
"identified",
"by",
"the",
"given",
"logHandlerId",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.logging.osgi/src/com/ibm/ws/logging/internal/osgi/WsMessageRouterImpl.java#L229-L234 |
GenesysPureEngage/workspace-client-java | src/main/java/com/genesys/internal/workspace/api/UcsApi.java | UcsApi.updateContact | public ApiSuccessResponse updateContact(String id, UpdateContactData updateContactData) throws ApiException {
"""
Update attributes of an existing contact
@param id id of the Contact (required)
@param updateContactData (required)
@return ApiSuccessResponse
@throws ApiException If fail to call the API, e.g. ... | java | public ApiSuccessResponse updateContact(String id, UpdateContactData updateContactData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = updateContactWithHttpInfo(id, updateContactData);
return resp.getData();
} | [
"public",
"ApiSuccessResponse",
"updateContact",
"(",
"String",
"id",
",",
"UpdateContactData",
"updateContactData",
")",
"throws",
"ApiException",
"{",
"ApiResponse",
"<",
"ApiSuccessResponse",
">",
"resp",
"=",
"updateContactWithHttpInfo",
"(",
"id",
",",
"updateConta... | Update attributes of an existing contact
@param id id of the Contact (required)
@param updateContactData (required)
@return ApiSuccessResponse
@throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body | [
"Update",
"attributes",
"of",
"an",
"existing",
"contact"
] | train | https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/UcsApi.java#L2176-L2179 |
julianhyde/sqlline | src/main/java/sqlline/Application.java | Application.getOutputFormats | public Map<String, OutputFormat> getOutputFormats(SqlLine sqlLine) {
"""
Override this method to modify known output formats implementations.
<p>If method is not overridden, current state of formats will be
reset to default ({@code super.getOutputFormats(sqlLine)}).
<p>To update / leave current state, overr... | java | public Map<String, OutputFormat> getOutputFormats(SqlLine sqlLine) {
final Map<String, OutputFormat> outputFormats = new HashMap<>();
outputFormats.put("vertical", new VerticalOutputFormat(sqlLine));
outputFormats.put("table", new TableOutputFormat(sqlLine));
outputFormats.put("csv", new SeparatedValues... | [
"public",
"Map",
"<",
"String",
",",
"OutputFormat",
">",
"getOutputFormats",
"(",
"SqlLine",
"sqlLine",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"OutputFormat",
">",
"outputFormats",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"outputFormats",
".",
"... | Override this method to modify known output formats implementations.
<p>If method is not overridden, current state of formats will be
reset to default ({@code super.getOutputFormats(sqlLine)}).
<p>To update / leave current state, override this method
and use {@code sqlLine.getOutputFormats()}.
<p>When overriding out... | [
"Override",
"this",
"method",
"to",
"modify",
"known",
"output",
"formats",
"implementations",
"."
] | train | https://github.com/julianhyde/sqlline/blob/7577f3ebaca0897a9ff01d1553d4576487e1d2c3/src/main/java/sqlline/Application.java#L180-L194 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/FilePathMappingUtils.java | FilePathMappingUtils.buildFilePathMapping | public static FilePathMapping buildFilePathMapping(JoinableResourceBundle bundle, String path,
ResourceReaderHandler rsHandler) {
"""
Builds the File path mapping and add it to the file mappings of the bundle
@param bundle the bundle
@param path the resource path
@param rsHandler the resource reader handle... | java | public static FilePathMapping buildFilePathMapping(JoinableResourceBundle bundle, String path,
ResourceReaderHandler rsHandler) {
FilePathMapping fPathMapping = null;
String filePath = rsHandler.getFilePath(path);
if(filePath != null){
File f = new File(filePath);
if(f.exists()){
fPathMapping = ... | [
"public",
"static",
"FilePathMapping",
"buildFilePathMapping",
"(",
"JoinableResourceBundle",
"bundle",
",",
"String",
"path",
",",
"ResourceReaderHandler",
"rsHandler",
")",
"{",
"FilePathMapping",
"fPathMapping",
"=",
"null",
";",
"String",
"filePath",
"=",
"rsHandler... | Builds the File path mapping and add it to the file mappings of the bundle
@param bundle the bundle
@param path the resource path
@param rsHandler the resource reader handler
@return the file path mapping | [
"Builds",
"the",
"File",
"path",
"mapping",
"and",
"add",
"it",
"to",
"the",
"file",
"mappings",
"of",
"the",
"bundle"
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/mappings/FilePathMappingUtils.java#L56-L77 |
hazelcast/hazelcast | hazelcast/src/main/java/com/hazelcast/wan/merkletree/MerkleTreeUtil.java | MerkleTreeUtil.getRightMostLeafUnderNode | static int getRightMostLeafUnderNode(int nodeOrder, int depth) {
"""
Returns the breadth-first order of the rightmost leaf in the
subtree selected by {@code nodeOrder} as the root of the subtree
@param nodeOrder The order of the node as the root of the subtree
@param depth The depth of the tree
@return t... | java | static int getRightMostLeafUnderNode(int nodeOrder, int depth) {
if (isLeaf(nodeOrder, depth)) {
return nodeOrder;
}
int levelOfNode = getLevelOfNode(nodeOrder);
int distanceFromLeafLevel = depth - levelOfNode - 1;
int leftMostLeafUnderNode = getLeftMostLeafUnderNode... | [
"static",
"int",
"getRightMostLeafUnderNode",
"(",
"int",
"nodeOrder",
",",
"int",
"depth",
")",
"{",
"if",
"(",
"isLeaf",
"(",
"nodeOrder",
",",
"depth",
")",
")",
"{",
"return",
"nodeOrder",
";",
"}",
"int",
"levelOfNode",
"=",
"getLevelOfNode",
"(",
"no... | Returns the breadth-first order of the rightmost leaf in the
subtree selected by {@code nodeOrder} as the root of the subtree
@param nodeOrder The order of the node as the root of the subtree
@param depth The depth of the tree
@return the breadth-first order of the rightmost leaf under the
provided node | [
"Returns",
"the",
"breadth",
"-",
"first",
"order",
"of",
"the",
"rightmost",
"leaf",
"in",
"the",
"subtree",
"selected",
"by",
"{",
"@code",
"nodeOrder",
"}",
"as",
"the",
"root",
"of",
"the",
"subtree"
] | train | https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/wan/merkletree/MerkleTreeUtil.java#L294-L305 |
nmorel/gwt-jackson | extensions/guava/src/main/java/com/github/nmorel/gwtjackson/guava/client/ser/MultimapJsonSerializer.java | MultimapJsonSerializer.newInstance | public static <M extends Multimap<?, ?>> MultimapJsonSerializer<M, ?, ?> newInstance( KeySerializer<?> keySerializer,
JsonSerializer<?> valueSerializer ) {
"""
@param keySerializer {@link KeySerializer} used to serialize the ... | java | public static <M extends Multimap<?, ?>> MultimapJsonSerializer<M, ?, ?> newInstance( KeySerializer<?> keySerializer,
JsonSerializer<?> valueSerializer ) {
return new MultimapJsonSerializer( keySerializer, valueSerializer ... | [
"public",
"static",
"<",
"M",
"extends",
"Multimap",
"<",
"?",
",",
"?",
">",
">",
"MultimapJsonSerializer",
"<",
"M",
",",
"?",
",",
"?",
">",
"newInstance",
"(",
"KeySerializer",
"<",
"?",
">",
"keySerializer",
",",
"JsonSerializer",
"<",
"?",
">",
"... | @param keySerializer {@link KeySerializer} used to serialize the keys.
@param valueSerializer {@link JsonSerializer} used to serialize the values.
@param <M> Type of the {@link Multimap}
@return a new instance of {@link MultimapJsonSerializer} | [
"@param",
"keySerializer",
"{",
"@link",
"KeySerializer",
"}",
"used",
"to",
"serialize",
"the",
"keys",
".",
"@param",
"valueSerializer",
"{",
"@link",
"JsonSerializer",
"}",
"used",
"to",
"serialize",
"the",
"values",
".",
"@param",
"<M",
">",
"Type",
"of",
... | train | https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/extensions/guava/src/main/java/com/github/nmorel/gwtjackson/guava/client/ser/MultimapJsonSerializer.java#L47-L50 |
JOML-CI/JOML | src/org/joml/Vector2i.java | Vector2i.set | public Vector2i set(int index, ByteBuffer buffer) {
"""
Read this vector from the supplied {@link ByteBuffer} starting at the
specified absolute buffer position/index.
<p>
This method will not increment the position of the given ByteBuffer.
@param index
the absolute position into the ByteBuffer
@param buff... | java | public Vector2i set(int index, ByteBuffer buffer) {
MemUtil.INSTANCE.get(this, index, buffer);
return this;
} | [
"public",
"Vector2i",
"set",
"(",
"int",
"index",
",",
"ByteBuffer",
"buffer",
")",
"{",
"MemUtil",
".",
"INSTANCE",
".",
"get",
"(",
"this",
",",
"index",
",",
"buffer",
")",
";",
"return",
"this",
";",
"}"
] | Read this vector from the supplied {@link ByteBuffer} starting at the
specified absolute buffer position/index.
<p>
This method will not increment the position of the given ByteBuffer.
@param index
the absolute position into the ByteBuffer
@param buffer
values will be read in <code>x, y</code> order
@return this | [
"Read",
"this",
"vector",
"from",
"the",
"supplied",
"{",
"@link",
"ByteBuffer",
"}",
"starting",
"at",
"the",
"specified",
"absolute",
"buffer",
"position",
"/",
"index",
".",
"<p",
">",
"This",
"method",
"will",
"not",
"increment",
"the",
"position",
"of",... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector2i.java#L281-L284 |
iig-uni-freiburg/SEWOL | ext/org/deckfour/xes/extension/std/XCostExtension.java | XCostExtension.assignAmount | public void assignAmount(XAttribute attribute, Double amount) {
"""
Assigns any attribute its cost amount, as defined by this extension's
amount attribute.
@param attribute
Attribute to assign cost amount to.
@param amount
The cost amount to be assigned.
"""
if (amount != null && amount > 0.0) {
... | java | public void assignAmount(XAttribute attribute, Double amount) {
if (amount != null && amount > 0.0) {
XAttributeContinuous attr = (XAttributeContinuous) ATTR_AMOUNT
.clone();
attr.setValue(amount);
attribute.getAttributes().put(KEY_AMOUNT, attr);
}
} | [
"public",
"void",
"assignAmount",
"(",
"XAttribute",
"attribute",
",",
"Double",
"amount",
")",
"{",
"if",
"(",
"amount",
"!=",
"null",
"&&",
"amount",
">",
"0.0",
")",
"{",
"XAttributeContinuous",
"attr",
"=",
"(",
"XAttributeContinuous",
")",
"ATTR_AMOUNT",
... | Assigns any attribute its cost amount, as defined by this extension's
amount attribute.
@param attribute
Attribute to assign cost amount to.
@param amount
The cost amount to be assigned. | [
"Assigns",
"any",
"attribute",
"its",
"cost",
"amount",
"as",
"defined",
"by",
"this",
"extension",
"s",
"amount",
"attribute",
"."
] | train | https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L527-L534 |
gallandarakhneorg/afc | advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java | GISCoordinates.L2_L93 | @Pure
public static Point2d L2_L93(double x, double y) {
"""
This function convert France Lambert II coordinate to
France Lambert 93 coordinate.
@param x is the coordinate in France Lambert II
@param y is the coordinate in France Lambert II
@return the France Lambert I coordinate.
"""
final Point2d nt... | java | @Pure
public static Point2d L2_L93(double x, double y) {
final Point2d ntfLambdaPhi = NTFLambert_NTFLambdaPhi(x, y,
LAMBERT_2_N,
LAMBERT_2_C,
LAMBERT_2_XS,
LAMBERT_2_YS);
return NTFLambdaPhi_NTFLambert(
ntfLambdaPhi.getX(), ntfLambdaPhi.getY(),
LAMBERT_93_N,
LAMBERT_93_C,
LAMBERT_93... | [
"@",
"Pure",
"public",
"static",
"Point2d",
"L2_L93",
"(",
"double",
"x",
",",
"double",
"y",
")",
"{",
"final",
"Point2d",
"ntfLambdaPhi",
"=",
"NTFLambert_NTFLambdaPhi",
"(",
"x",
",",
"y",
",",
"LAMBERT_2_N",
",",
"LAMBERT_2_C",
",",
"LAMBERT_2_XS",
",",
... | This function convert France Lambert II coordinate to
France Lambert 93 coordinate.
@param x is the coordinate in France Lambert II
@param y is the coordinate in France Lambert II
@return the France Lambert I coordinate. | [
"This",
"function",
"convert",
"France",
"Lambert",
"II",
"coordinate",
"to",
"France",
"Lambert",
"93",
"coordinate",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/coordinate/GISCoordinates.java#L519-L532 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.