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
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.email_pro_service_account_GET
public ArrayList<String> email_pro_service_account_GET(String service, Long number) throws IOException { """ Get allowed durations for 'account' option REST: GET /order/email/pro/{service}/account @param number [required] Number of Accounts to order @param service [required] The internal name of your pro orga...
java
public ArrayList<String> email_pro_service_account_GET(String service, Long number) throws IOException { String qPath = "/order/email/pro/{service}/account"; StringBuilder sb = path(qPath, service); query(sb, "number", number); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t1);...
[ "public", "ArrayList", "<", "String", ">", "email_pro_service_account_GET", "(", "String", "service", ",", "Long", "number", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/email/pro/{service}/account\"", ";", "StringBuilder", "sb", "=", "path", ...
Get allowed durations for 'account' option REST: GET /order/email/pro/{service}/account @param number [required] Number of Accounts to order @param service [required] The internal name of your pro organization
[ "Get", "allowed", "durations", "for", "account", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L4078-L4084
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java
ReplicationLinksInner.failoverAllowDataLossAsync
public Observable<Void> failoverAllowDataLossAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { """ Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss. @param resourceGroupName The name ...
java
public Observable<Void> failoverAllowDataLossAsync(String resourceGroupName, String serverName, String databaseName, String linkId) { return failoverAllowDataLossWithServiceResponseAsync(resourceGroupName, serverName, databaseName, linkId).map(new Func1<ServiceResponse<Void>, Void>() { @Override ...
[ "public", "Observable", "<", "Void", ">", "failoverAllowDataLossAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "databaseName", ",", "String", "linkId", ")", "{", "return", "failoverAllowDataLossWithServiceResponseAsync", "(", "re...
Sets which replica database is primary by failing over from the current primary replica database. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName ...
[ "Sets", "which", "replica", "database", "is", "primary", "by", "failing", "over", "from", "the", "current", "primary", "replica", "database", ".", "This", "operation", "might", "result", "in", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ReplicationLinksInner.java#L509-L516
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyExpressionGenerator.java
PyExpressionGenerator._generate
protected XExpression _generate(XCastedExpression castOperator, IAppendable it, IExtraLanguageGeneratorContext context) { """ Generate the given object. @param castOperator the cast operator. @param it the target for the generated content. @param context the context. @return the expression. """ return ...
java
protected XExpression _generate(XCastedExpression castOperator, IAppendable it, IExtraLanguageGeneratorContext context) { return generate(castOperator.getTarget(), context.getExpectedExpressionType(), it, context); }
[ "protected", "XExpression", "_generate", "(", "XCastedExpression", "castOperator", ",", "IAppendable", "it", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "return", "generate", "(", "castOperator", ".", "getTarget", "(", ")", ",", "context", ".", "getE...
Generate the given object. @param castOperator the cast operator. @param it the target for the generated content. @param context the context. @return the expression.
[ "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#L688-L690
Impetus/Kundera
src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java
ESClient.getKeyAsString
private String getKeyAsString(Object id, EntityMetadata metadata, MetamodelImpl metaModel) { """ Gets the key as string. @param id the id @param metadata the metadata @param metaModel the meta model @return the key as string """ if (metaModel.isEmbeddable(((AbstractAttribute) metadata.getIdAtt...
java
private String getKeyAsString(Object id, EntityMetadata metadata, MetamodelImpl metaModel) { if (metaModel.isEmbeddable(((AbstractAttribute) metadata.getIdAttribute()).getBindableJavaType())) { return KunderaCoreUtils.prepareCompositeKey(metadata, id); } return id.toStrin...
[ "private", "String", "getKeyAsString", "(", "Object", "id", ",", "EntityMetadata", "metadata", ",", "MetamodelImpl", "metaModel", ")", "{", "if", "(", "metaModel", ".", "isEmbeddable", "(", "(", "(", "AbstractAttribute", ")", "metadata", ".", "getIdAttribute", "...
Gets the key as string. @param id the id @param metadata the metadata @param metaModel the meta model @return the key as string
[ "Gets", "the", "key", "as", "string", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/ESClient.java#L883-L890
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java
BloatedAssignmentScope.findScopeBlockWithTarget
private ScopeBlock findScopeBlockWithTarget(ScopeBlock sb, int start, int target) { """ returns an existing scope block that has the same target as the one looked for @param sb the scope block to start with @param start the current pc @param target the target to look for @return the scope block found or...
java
private ScopeBlock findScopeBlockWithTarget(ScopeBlock sb, int start, int target) { ScopeBlock parentBlock = null; int finishLocation = sb.getFinish(); if ((sb.getStart() < start) && (finishLocation >= start) && ((finishLocation <= target) || (sb.isGoto() && !sb.isLoop()))) { parentB...
[ "private", "ScopeBlock", "findScopeBlockWithTarget", "(", "ScopeBlock", "sb", ",", "int", "start", ",", "int", "target", ")", "{", "ScopeBlock", "parentBlock", "=", "null", ";", "int", "finishLocation", "=", "sb", ".", "getFinish", "(", ")", ";", "if", "(", ...
returns an existing scope block that has the same target as the one looked for @param sb the scope block to start with @param start the current pc @param target the target to look for @return the scope block found or null
[ "returns", "an", "existing", "scope", "block", "that", "has", "the", "same", "target", "as", "the", "one", "looked", "for" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/BloatedAssignmentScope.java#L659-L677
joniles/mpxj
src/main/java/net/sf/mpxj/Resource.java
Resource.setFinish
public void setFinish(int index, Date value) { """ Set a finish value. @param index finish index (1-10) @param value finish value """ set(selectField(ResourceFieldLists.CUSTOM_FINISH, index), value); }
java
public void setFinish(int index, Date value) { set(selectField(ResourceFieldLists.CUSTOM_FINISH, index), value); }
[ "public", "void", "setFinish", "(", "int", "index", ",", "Date", "value", ")", "{", "set", "(", "selectField", "(", "ResourceFieldLists", ".", "CUSTOM_FINISH", ",", "index", ")", ",", "value", ")", ";", "}" ]
Set a finish value. @param index finish index (1-10) @param value finish value
[ "Set", "a", "finish", "value", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Resource.java#L1617-L1620
google/j2objc
jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java
BigDecimal.doRound128
private static BigDecimal doRound128(long hi, long lo, int sign, int scale, MathContext mc) { """ rounds 128-bit value according {@code MathContext} returns null if result can't be repsented as compact BigDecimal. """ int mcp = mc.precision; int drop; BigDecimal res = null; if(...
java
private static BigDecimal doRound128(long hi, long lo, int sign, int scale, MathContext mc) { int mcp = mc.precision; int drop; BigDecimal res = null; if(((drop = precision(hi, lo) - mcp) > 0)&&(drop<LONG_TEN_POWERS_TABLE.length)) { scale = checkScaleNonZero((long)scale - dro...
[ "private", "static", "BigDecimal", "doRound128", "(", "long", "hi", ",", "long", "lo", ",", "int", "sign", ",", "int", "scale", ",", "MathContext", "mc", ")", "{", "int", "mcp", "=", "mc", ".", "precision", ";", "int", "drop", ";", "BigDecimal", "res",...
rounds 128-bit value according {@code MathContext} returns null if result can't be repsented as compact BigDecimal.
[ "rounds", "128", "-", "bit", "value", "according", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/openjdk/src/share/classes/java/math/BigDecimal.java#L5083-L5095
alkacon/opencms-core
src/org/opencms/ade/containerpage/inherited/CmsContainerConfigurationCache.java
CmsContainerConfigurationCache.isContainerConfiguration
protected boolean isContainerConfiguration(String rootPath, int type) { """ Checks whether a given combination of path and resource type belongs to an inherited container configuration file.<p> @param rootPath the root path of the resource @param type the type id of the resource @return true if the given ro...
java
protected boolean isContainerConfiguration(String rootPath, int type) { return OpenCms.getResourceManager().matchResourceType( CmsResourceTypeXmlContainerPage.INHERIT_CONTAINER_CONFIG_TYPE_NAME, type) && !CmsResource.isTemporaryFileName(rootPath) && rootPat...
[ "protected", "boolean", "isContainerConfiguration", "(", "String", "rootPath", ",", "int", "type", ")", "{", "return", "OpenCms", ".", "getResourceManager", "(", ")", ".", "matchResourceType", "(", "CmsResourceTypeXmlContainerPage", ".", "INHERIT_CONTAINER_CONFIG_TYPE_NAM...
Checks whether a given combination of path and resource type belongs to an inherited container configuration file.<p> @param rootPath the root path of the resource @param type the type id of the resource @return true if the given root path / type combination matches an inherited container configuration file
[ "Checks", "whether", "a", "given", "combination", "of", "path", "and", "resource", "type", "belongs", "to", "an", "inherited", "container", "configuration", "file", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/containerpage/inherited/CmsContainerConfigurationCache.java#L260-L267
osmdroid/osmdroid
osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java
TileSystem.wrap
private static double wrap(double n, final double minValue, final double maxValue, final double interval) { """ Returns a value that lies within <code>minValue</code> and <code>maxValue</code> by subtracting/adding <code>interval</code>. @param n the input number @param minValue the minimum value @param ma...
java
private static double wrap(double n, final double minValue, final double maxValue, final double interval) { if (minValue > maxValue) { throw new IllegalArgumentException("minValue must be smaller than maxValue: " + minValue + ">" + maxValue); } if (interval > maxValue - minValue + 1) { throw new Illega...
[ "private", "static", "double", "wrap", "(", "double", "n", ",", "final", "double", "minValue", ",", "final", "double", "maxValue", ",", "final", "double", "interval", ")", "{", "if", "(", "minValue", ">", "maxValue", ")", "{", "throw", "new", "IllegalArgum...
Returns a value that lies within <code>minValue</code> and <code>maxValue</code> by subtracting/adding <code>interval</code>. @param n the input number @param minValue the minimum value @param maxValue the maximum value @param interval the interval length @return a value that lies within <code>minValue</code> and <cod...
[ "Returns", "a", "value", "that", "lies", "within", "<code", ">", "minValue<", "/", "code", ">", "and", "<code", ">", "maxValue<", "/", "code", ">", "by", "subtracting", "/", "adding", "<code", ">", "interval<", "/", "code", ">", "." ]
train
https://github.com/osmdroid/osmdroid/blob/3b178b2f078497dd88c137110e87aafe45ad2b16/osmdroid-android/src/main/java/org/osmdroid/util/TileSystem.java#L459-L476
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/help/DocWorkUnit.java
DocWorkUnit.processDoc
public void processDoc(final List<Map<String, String>> featureMaps, final List<Map<String, String>> groupMaps) { """ Populate the property map for this work unit by delegating to the documented feature handler for this work unit. @param featureMaps map of all features included in this javadoc run @param groupMap...
java
public void processDoc(final List<Map<String, String>> featureMaps, final List<Map<String, String>> groupMaps) { workUnitHandler.processWorkUnit(this, featureMaps, groupMaps); }
[ "public", "void", "processDoc", "(", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "featureMaps", ",", "final", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "groupMaps", ")", "{", "workUnitHandler", ".", "processWork...
Populate the property map for this work unit by delegating to the documented feature handler for this work unit. @param featureMaps map of all features included in this javadoc run @param groupMaps map of all groups included in the javadoc run
[ "Populate", "the", "property", "map", "for", "this", "work", "unit", "by", "delegating", "to", "the", "documented", "feature", "handler", "for", "this", "work", "unit", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/help/DocWorkUnit.java#L147-L150
virgo47/javasimon
core/src/main/java/org/javasimon/utils/GoogleChartImageGenerator.java
GoogleChartImageGenerator.barChart
public static String barChart(String title, SimonUnit unit, boolean showMaxMin, StopwatchSample... samples) { """ Generates Google bar chart URL for the provided samples. @param title chart title @param unit unit requested for displaying results @param showMaxMin true if additional datasets for max and min va...
java
public static String barChart(String title, SimonUnit unit, boolean showMaxMin, StopwatchSample... samples) { return new GoogleChartImageGenerator(samples, title, unit, showMaxMin).process(); }
[ "public", "static", "String", "barChart", "(", "String", "title", ",", "SimonUnit", "unit", ",", "boolean", "showMaxMin", ",", "StopwatchSample", "...", "samples", ")", "{", "return", "new", "GoogleChartImageGenerator", "(", "samples", ",", "title", ",", "unit",...
Generates Google bar chart URL for the provided samples. @param title chart title @param unit unit requested for displaying results @param showMaxMin true if additional datasets for max and min values should be shown @param samples stopwatch samples @return URL generating the bar chart
[ "Generates", "Google", "bar", "chart", "URL", "for", "the", "provided", "samples", "." ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/GoogleChartImageGenerator.java#L67-L69
eFaps/eFaps-Kernel
src/main/java/org/efaps/db/Context.java
Context.isTMMarkedRollback
public static boolean isTMMarkedRollback() throws EFapsException { """ Is the status of transaction manager marked roll back? @return <i>true</i> if transaction manager is marked roll back, otherwise <i>false</i> @throws EFapsException if the status of the transaction manager could not be evaluated ...
java
public static boolean isTMMarkedRollback() throws EFapsException { try { return Context.TRANSMANAG.getStatus() == Status.STATUS_MARKED_ROLLBACK; } catch (final SystemException e) { throw new EFapsException(Context.class, "isTMMarkedRollback.SystemException", e); ...
[ "public", "static", "boolean", "isTMMarkedRollback", "(", ")", "throws", "EFapsException", "{", "try", "{", "return", "Context", ".", "TRANSMANAG", ".", "getStatus", "(", ")", "==", "Status", ".", "STATUS_MARKED_ROLLBACK", ";", "}", "catch", "(", "final", "Sys...
Is the status of transaction manager marked roll back? @return <i>true</i> if transaction manager is marked roll back, otherwise <i>false</i> @throws EFapsException if the status of the transaction manager could not be evaluated @see #TRANSMANAG
[ "Is", "the", "status", "of", "transaction", "manager", "marked", "roll", "back?" ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/db/Context.java#L1166-L1174
GerdHolz/TOVAL
src/de/invation/code/toval/misc/wd/AbstractComponentContainer.java
AbstractComponentContainer.addComponent
public void addComponent(O component, boolean storeToFile, boolean notifyListeners) throws ProjectComponentException { """ Adds a new component.<br> Depending on the value of the store-parameter, the component is also stored in the serialization directory. @param component The new component to add. @param ...
java
public void addComponent(O component, boolean storeToFile, boolean notifyListeners) throws ProjectComponentException { Validate.notNull(component); Validate.notNull(storeToFile); String componentName = component.getName(); Validate.notNull(componentName); if (containsComponent(componentName)) { throw new...
[ "public", "void", "addComponent", "(", "O", "component", ",", "boolean", "storeToFile", ",", "boolean", "notifyListeners", ")", "throws", "ProjectComponentException", "{", "Validate", ".", "notNull", "(", "component", ")", ";", "Validate", ".", "notNull", "(", "...
Adds a new component.<br> Depending on the value of the store-parameter, the component is also stored in the serialization directory. @param component The new component to add. @param storeToFile Indicates if the net should be stored to disk. @param notifyListeners @throws de.invation.code.toval.misc.wd.ProjectCompone...
[ "Adds", "a", "new", "component", ".", "<br", ">", "Depending", "on", "the", "value", "of", "the", "store", "-", "parameter", "the", "component", "is", "also", "stored", "in", "the", "serialization", "directory", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/misc/wd/AbstractComponentContainer.java#L353-L386
sksamuel/scrimage
scrimage-filters/src/main/java/thirdparty/jhlabs/image/ImageMath.java
ImageMath.mixColors
public static int mixColors(float t, int rgb1, int rgb2) { """ Linear interpolation of ARGB values. @param t the interpolation parameter @param rgb1 the lower interpolation range @param rgb2 the upper interpolation range @return the interpolated value """ int a1 = (rgb1 >> 24) & 0xff; int r1 = (rgb1 >>...
java
public static int mixColors(float t, int rgb1, int rgb2) { int a1 = (rgb1 >> 24) & 0xff; int r1 = (rgb1 >> 16) & 0xff; int g1 = (rgb1 >> 8) & 0xff; int b1 = rgb1 & 0xff; int a2 = (rgb2 >> 24) & 0xff; int r2 = (rgb2 >> 16) & 0xff; int g2 = (rgb2 >> 8) & 0xff; int b2 = rgb2 & 0xff; a1 = lerp(t, a1, a2);...
[ "public", "static", "int", "mixColors", "(", "float", "t", ",", "int", "rgb1", ",", "int", "rgb2", ")", "{", "int", "a1", "=", "(", "rgb1", ">>", "24", ")", "&", "0xff", ";", "int", "r1", "=", "(", "rgb1", ">>", "16", ")", "&", "0xff", ";", "...
Linear interpolation of ARGB values. @param t the interpolation parameter @param rgb1 the lower interpolation range @param rgb2 the upper interpolation range @return the interpolated value
[ "Linear", "interpolation", "of", "ARGB", "values", "." ]
train
https://github.com/sksamuel/scrimage/blob/52dab448136e6657a71951b0e6b7d5e64dc979ac/scrimage-filters/src/main/java/thirdparty/jhlabs/image/ImageMath.java#L266-L280
phax/ph-masterdata
ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java
CurrencyHelper.parseCurrencyFormatUnchanged
@Nullable public static BigDecimal parseCurrencyFormatUnchanged (@Nullable final ECurrency eCurrency, @Nullable final String sTextValue, @Nullable final BigDecimal aDefault) { """ Try to parse a stri...
java
@Nullable public static BigDecimal parseCurrencyFormatUnchanged (@Nullable final ECurrency eCurrency, @Nullable final String sTextValue, @Nullable final BigDecimal aDefault) { final PerCurrencySetti...
[ "@", "Nullable", "public", "static", "BigDecimal", "parseCurrencyFormatUnchanged", "(", "@", "Nullable", "final", "ECurrency", "eCurrency", ",", "@", "Nullable", "final", "String", "sTextValue", ",", "@", "Nullable", "final", "BigDecimal", "aDefault", ")", "{", "f...
Try to parse a string value formatted by the {@link NumberFormat} object returned from {@link #getCurrencyFormat(ECurrency)}. E.g. <code>&euro; 5,00</code> @param eCurrency The currency it is about. If <code>null</code> is provided {@link #DEFAULT_CURRENCY} is used instead. @param sTextValue The string value. It will ...
[ "Try", "to", "parse", "a", "string", "value", "formatted", "by", "the", "{", "@link", "NumberFormat", "}", "object", "returned", "from", "{", "@link", "#getCurrencyFormat", "(", "ECurrency", ")", "}", ".", "E", ".", "g", ".", "<code", ">", "&euro", ";", ...
train
https://github.com/phax/ph-masterdata/blob/ca5e0b03c735b30b47930c018bfb5e71f00d0ff4/ph-masterdata/src/main/java/com/helger/masterdata/currency/CurrencyHelper.java#L502-L510
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java
DateTimeUtils.newDateFormat
public static SimpleDateFormat newDateFormat(String format) { """ Creates a new date formatter with Farrago specific options. Farrago parsing is strict and does not allow values such as day 0, month 13, etc. @param format {@link SimpleDateFormat} pattern """ SimpleDateFormat sdf = new SimpleDateFormat(f...
java
public static SimpleDateFormat newDateFormat(String format) { SimpleDateFormat sdf = new SimpleDateFormat(format, Locale.ROOT); sdf.setLenient(false); return sdf; }
[ "public", "static", "SimpleDateFormat", "newDateFormat", "(", "String", "format", ")", "{", "SimpleDateFormat", "sdf", "=", "new", "SimpleDateFormat", "(", "format", ",", "Locale", ".", "ROOT", ")", ";", "sdf", ".", "setLenient", "(", "false", ")", ";", "ret...
Creates a new date formatter with Farrago specific options. Farrago parsing is strict and does not allow values such as day 0, month 13, etc. @param format {@link SimpleDateFormat} pattern
[ "Creates", "a", "new", "date", "formatter", "with", "Farrago", "specific", "options", ".", "Farrago", "parsing", "is", "strict", "and", "does", "not", "allow", "values", "such", "as", "day", "0", "month", "13", "etc", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L306-L310
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/FileBasedNamespaceMappings.java
FileBasedNamespaceMappings.getNamespacePrefixByURI
public synchronized String getNamespacePrefixByURI(String uri) throws NamespaceException { """ Returns a prefix for the namespace <code>uri</code>. If a namespace mapping exists, the already known prefix is returned; otherwise a new prefix is created and assigned to the namespace uri. @param uri the namespace...
java
public synchronized String getNamespacePrefixByURI(String uri) throws NamespaceException { String prefix = uriToPrefix.get(uri); if (prefix == null) { // make sure prefix is not taken while (prefixToURI.get(String.valueOf(prefixCount)) != null) { prefixCount++...
[ "public", "synchronized", "String", "getNamespacePrefixByURI", "(", "String", "uri", ")", "throws", "NamespaceException", "{", "String", "prefix", "=", "uriToPrefix", ".", "get", "(", "uri", ")", ";", "if", "(", "prefix", "==", "null", ")", "{", "// make sure ...
Returns a prefix for the namespace <code>uri</code>. If a namespace mapping exists, the already known prefix is returned; otherwise a new prefix is created and assigned to the namespace uri. @param uri the namespace uri. @return the prefix for the namespace uri. @throws NamespaceException if an yet unknown namespace u...
[ "Returns", "a", "prefix", "for", "the", "namespace", "<code", ">", "uri<", "/", "code", ">", ".", "If", "a", "namespace", "mapping", "exists", "the", "already", "known", "prefix", "is", "returned", ";", "otherwise", "a", "new", "prefix", "is", "created", ...
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/FileBasedNamespaceMappings.java#L115-L139
mangstadt/biweekly
src/main/java/biweekly/io/ParseContext.java
ParseContext.addFloatingDate
public void addFloatingDate(ICalProperty property, ICalDate date) { """ Keeps track of a date-time property that does not have a timezone (floating time), so it can be added to the {@link TimezoneInfo} object after the iCalendar object is parsed. @param property the property @param date the property's date val...
java
public void addFloatingDate(ICalProperty property, ICalDate date) { floatingDates.add(new TimezonedDate(date, property)); }
[ "public", "void", "addFloatingDate", "(", "ICalProperty", "property", ",", "ICalDate", "date", ")", "{", "floatingDates", ".", "add", "(", "new", "TimezonedDate", "(", "date", ",", "property", ")", ")", ";", "}" ]
Keeps track of a date-time property that does not have a timezone (floating time), so it can be added to the {@link TimezoneInfo} object after the iCalendar object is parsed. @param property the property @param date the property's date value
[ "Keeps", "track", "of", "a", "date", "-", "time", "property", "that", "does", "not", "have", "a", "timezone", "(", "floating", "time", ")", "so", "it", "can", "be", "added", "to", "the", "{" ]
train
https://github.com/mangstadt/biweekly/blob/2e21350f85c13dfff52fdef98fdbebe2976fcf61/src/main/java/biweekly/io/ParseContext.java#L153-L155
metamx/java-util
src/main/java/com/metamx/common/lifecycle/Lifecycle.java
Lifecycle.addMaybeStartHandler
public void addMaybeStartHandler(Handler handler, Stage stage) throws Exception { """ Adds a handler to the Lifecycle and starts it if the lifecycle has already been started. @param handler The hander to add to the lifecycle @param stage The stage to add the lifecycle at @throws Exception an exception thr...
java
public void addMaybeStartHandler(Handler handler, Stage stage) throws Exception { synchronized (handlers) { if (started.get()) { if (currStage == null || stage.compareTo(currStage) < 1) { handler.start(); } } handlers.get(stage).add(handler); } }
[ "public", "void", "addMaybeStartHandler", "(", "Handler", "handler", ",", "Stage", "stage", ")", "throws", "Exception", "{", "synchronized", "(", "handlers", ")", "{", "if", "(", "started", ".", "get", "(", ")", ")", "{", "if", "(", "currStage", "==", "n...
Adds a handler to the Lifecycle and starts it if the lifecycle has already been started. @param handler The hander to add to the lifecycle @param stage The stage to add the lifecycle at @throws Exception an exception thrown from handler.start(). If an exception is thrown, the handler is *not* added
[ "Adds", "a", "handler", "to", "the", "Lifecycle", "and", "starts", "it", "if", "the", "lifecycle", "has", "already", "been", "started", "." ]
train
https://github.com/metamx/java-util/blob/9d204043da1136e94fb2e2d63e3543a29bf54b4d/src/main/java/com/metamx/common/lifecycle/Lifecycle.java#L238-L248
jbundle/jbundle
base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java
BaseSession.handleRemoteCommand
public Object handleRemoteCommand(String strCommand, Map<String,Object> properties, Object sourceSession) throws RemoteException, DBException { """ Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source)...
java
public Object handleRemoteCommand(String strCommand, Map<String,Object> properties, Object sourceSession) throws RemoteException, DBException { Object objHandled = this.doRemoteCommand(strCommand, properties); // Do I handle it? if (Boolean.FALSE.equals(objHandled)) { // Not handled by ...
[ "public", "Object", "handleRemoteCommand", "(", "String", "strCommand", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "Object", "sourceSession", ")", "throws", "RemoteException", ",", "DBException", "{", "Object", "objHandled", "=", "this", "...
Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to parent (with me as the source). Note: Never pass to a parent or child that matches the source (to avoid an e...
[ "Process", "the", "command", ".", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", "all", "children", "(", "with", "me", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/BaseSession.java#L350-L370
grails/grails-core
grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java
DefaultGrailsApplication.addArtefact
public GrailsClass addArtefact(String artefactType, @SuppressWarnings("rawtypes") Class artefactClass) { """ Adds an artefact of the given type for the given Class. @param artefactType The type of the artefact as defined by a ArtefactHandler instance @param artefactClass A Class instance that matches the type...
java
public GrailsClass addArtefact(String artefactType, @SuppressWarnings("rawtypes") Class artefactClass) { return addArtefact(artefactType, artefactClass, false); }
[ "public", "GrailsClass", "addArtefact", "(", "String", "artefactType", ",", "@", "SuppressWarnings", "(", "\"rawtypes\"", ")", "Class", "artefactClass", ")", "{", "return", "addArtefact", "(", "artefactType", ",", "artefactClass", ",", "false", ")", ";", "}" ]
Adds an artefact of the given type for the given Class. @param artefactType The type of the artefact as defined by a ArtefactHandler instance @param artefactClass A Class instance that matches the type defined by the ArtefactHandler @return The GrailsClass if successful or null if it couldn't be added @throws GrailsC...
[ "Adds", "an", "artefact", "of", "the", "given", "type", "for", "the", "given", "Class", "." ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/core/DefaultGrailsApplication.java#L503-L505
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.findEntityRecursively
public static boolean findEntityRecursively(final EntityContainer container, final UUID id) { """ Walks through the entity tree looking for an entity. @param container Entity container. @param id Entity ID to look for. @return Whether the entity was found. @see #walkEntityTree(EntityContainer, EntityVisi...
java
public static boolean findEntityRecursively(final EntityContainer container, final UUID id) { final AtomicBoolean found = new AtomicBoolean(); walkEntityTree(container, e -> { if (id.equals(e.getID())) { found.set(true); return EntityVisitResult.EXIT; } else { return EntityVisitResult.CONTINUE; ...
[ "public", "static", "boolean", "findEntityRecursively", "(", "final", "EntityContainer", "container", ",", "final", "UUID", "id", ")", "{", "final", "AtomicBoolean", "found", "=", "new", "AtomicBoolean", "(", ")", ";", "walkEntityTree", "(", "container", ",", "e...
Walks through the entity tree looking for an entity. @param container Entity container. @param id Entity ID to look for. @return Whether the entity was found. @see #walkEntityTree(EntityContainer, EntityVisitor)
[ "Walks", "through", "the", "entity", "tree", "looking", "for", "an", "entity", "." ]
train
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L143-L156
lecousin/java-framework-core
net.lecousin.core/src/main/java/net/lecousin/framework/adapter/AdapterRegistry.java
AdapterRegistry.canAdapt
public boolean canAdapt(Object input, Class<?> outputType) { """ Return true if an adapter can be found to adapt the given input into the given output type. """ Class<?> inputType = input.getClass(); Adapter a = findAdapter(input, inputType, outputType); return a != null; }
java
public boolean canAdapt(Object input, Class<?> outputType) { Class<?> inputType = input.getClass(); Adapter a = findAdapter(input, inputType, outputType); return a != null; }
[ "public", "boolean", "canAdapt", "(", "Object", "input", ",", "Class", "<", "?", ">", "outputType", ")", "{", "Class", "<", "?", ">", "inputType", "=", "input", ".", "getClass", "(", ")", ";", "Adapter", "a", "=", "findAdapter", "(", "input", ",", "i...
Return true if an adapter can be found to adapt the given input into the given output type.
[ "Return", "true", "if", "an", "adapter", "can", "be", "found", "to", "adapt", "the", "given", "input", "into", "the", "given", "output", "type", "." ]
train
https://github.com/lecousin/java-framework-core/blob/b0c893b44bfde2c03f90ea846a49ef5749d598f3/net.lecousin.core/src/main/java/net/lecousin/framework/adapter/AdapterRegistry.java#L65-L69
hdbeukel/james-core
src/main/java/org/jamesframework/core/subset/neigh/adv/DisjointMultiAdditionNeighbourhood.java
DisjointMultiAdditionNeighbourhood.getRandomMove
@Override public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) { """ Generates a move for the given subset solution that selects a random subset of currently unselected IDs. Whenever possible, the requested number of additions is performed. However, taking into account the current number of u...
java
@Override public SubsetMove getRandomMove(SubsetSolution solution, Random rnd) { // get set of candidate IDs for addition (fixed IDs are discarded) Set<Integer> addCandidates = getAddCandidates(solution); // compute number of additions int curNumAdd = numAdditions(addCandidates, solu...
[ "@", "Override", "public", "SubsetMove", "getRandomMove", "(", "SubsetSolution", "solution", ",", "Random", "rnd", ")", "{", "// get set of candidate IDs for addition (fixed IDs are discarded)", "Set", "<", "Integer", ">", "addCandidates", "=", "getAddCandidates", "(", "s...
Generates a move for the given subset solution that selects a random subset of currently unselected IDs. Whenever possible, the requested number of additions is performed. However, taking into account the current number of unselected items, the imposed maximum subset size (if set) and the fixed IDs (if any) may result ...
[ "Generates", "a", "move", "for", "the", "given", "subset", "solution", "that", "selects", "a", "random", "subset", "of", "currently", "unselected", "IDs", ".", "Whenever", "possible", "the", "requested", "number", "of", "additions", "is", "performed", ".", "Ho...
train
https://github.com/hdbeukel/james-core/blob/4e85c20c142902373e5b5e8b5d12a2558650f66d/src/main/java/org/jamesframework/core/subset/neigh/adv/DisjointMultiAdditionNeighbourhood.java#L147-L161
samskivert/pythagoras
src/main/java/pythagoras/d/MathUtil.java
MathUtil.angularDifference
public static double angularDifference (double a1, double a2) { """ Returns the (shortest) difference between two angles, assuming that both angles are in [-pi, +pi]. """ double ma1 = mirrorAngle(a1), ma2 = mirrorAngle(a2); double diff = a1 - a2, mdiff = ma2 - ma1; return (Math.abs(dif...
java
public static double angularDifference (double a1, double a2) { double ma1 = mirrorAngle(a1), ma2 = mirrorAngle(a2); double diff = a1 - a2, mdiff = ma2 - ma1; return (Math.abs(diff) < Math.abs(mdiff)) ? diff : mdiff; }
[ "public", "static", "double", "angularDifference", "(", "double", "a1", ",", "double", "a2", ")", "{", "double", "ma1", "=", "mirrorAngle", "(", "a1", ")", ",", "ma2", "=", "mirrorAngle", "(", "a2", ")", ";", "double", "diff", "=", "a1", "-", "a2", "...
Returns the (shortest) difference between two angles, assuming that both angles are in [-pi, +pi].
[ "Returns", "the", "(", "shortest", ")", "difference", "between", "two", "angles", "assuming", "that", "both", "angles", "are", "in", "[", "-", "pi", "+", "pi", "]", "." ]
train
https://github.com/samskivert/pythagoras/blob/b8fea743ee8a7d742ad9c06ee4f11f50571fbd32/src/main/java/pythagoras/d/MathUtil.java#L136-L140
kaazing/gateway
util/src/main/java/org/kaazing/gateway/util/Utils.java
Utils.parsePositiveInteger
public static long parsePositiveInteger(String valueName, String value, long defaultValue) { """ Validate that the given string value is a valid positive integer (int or long) and convert it to a long @param valueName @param value @param defaultValue result to be returned if value is null @return @throws Ille...
java
public static long parsePositiveInteger(String valueName, String value, long defaultValue) { long result = defaultValue; if (value != null) { boolean valid = true; try { result = Long.parseLong(value); if (result <= 0) { valid =...
[ "public", "static", "long", "parsePositiveInteger", "(", "String", "valueName", ",", "String", "value", ",", "long", "defaultValue", ")", "{", "long", "result", "=", "defaultValue", ";", "if", "(", "value", "!=", "null", ")", "{", "boolean", "valid", "=", ...
Validate that the given string value is a valid positive integer (int or long) and convert it to a long @param valueName @param value @param defaultValue result to be returned if value is null @return @throws IllegalArgumentException if the value is not a positive integer (including if it is an empty string)
[ "Validate", "that", "the", "given", "string", "value", "is", "a", "valid", "positive", "integer", "(", "int", "or", "long", ")", "and", "convert", "it", "to", "a", "long" ]
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/util/src/main/java/org/kaazing/gateway/util/Utils.java#L553-L573
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java
SparseCpuLevel1.sscal
@Override protected void sscal(long N, double a, INDArray X, int incx) { """ Computes the product of a float vector by a scalar. @param N The number of elements of the vector X @param a a scalar @param X a vector @param incx the increment of the vector X """ cblas_sscal((int) N, (float) a, (F...
java
@Override protected void sscal(long N, double a, INDArray X, int incx) { cblas_sscal((int) N, (float) a, (FloatPointer) X.data().addressPointer(), incx); }
[ "@", "Override", "protected", "void", "sscal", "(", "long", "N", ",", "double", "a", ",", "INDArray", "X", ",", "int", "incx", ")", "{", "cblas_sscal", "(", "(", "int", ")", "N", ",", "(", "float", ")", "a", ",", "(", "FloatPointer", ")", "X", "....
Computes the product of a float vector by a scalar. @param N The number of elements of the vector X @param a a scalar @param X a vector @param incx the increment of the vector X
[ "Computes", "the", "product", "of", "a", "float", "vector", "by", "a", "scalar", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-native/src/main/java/org/nd4j/linalg/cpu/nativecpu/blas/SparseCpuLevel1.java#L280-L283
lessthanoptimal/BoofCV
integration/boofcv-android/src/main/java/boofcv/android/ConvertBitmap.java
ConvertBitmap.bitmapToGray
public static GrayU8 bitmapToGray( Bitmap input , GrayU8 output , byte[] storage ) { """ Converts Bitmap image into GrayU8. @param input Input Bitmap image. @param output Output image. If null a new one will be declared. @param storage Byte array used for internal storage. If null it will be declared interna...
java
public static GrayU8 bitmapToGray( Bitmap input , GrayU8 output , byte[] storage ) { if( output == null ) { output = new GrayU8( input.getWidth() , input.getHeight() ); } else { output.reshape(input.getWidth(), input.getHeight()); } if( storage == null ) storage = declareStorage(input,null); inpu...
[ "public", "static", "GrayU8", "bitmapToGray", "(", "Bitmap", "input", ",", "GrayU8", "output", ",", "byte", "[", "]", "storage", ")", "{", "if", "(", "output", "==", "null", ")", "{", "output", "=", "new", "GrayU8", "(", "input", ".", "getWidth", "(", ...
Converts Bitmap image into GrayU8. @param input Input Bitmap image. @param output Output image. If null a new one will be declared. @param storage Byte array used for internal storage. If null it will be declared internally. @return The converted gray scale image.
[ "Converts", "Bitmap", "image", "into", "GrayU8", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/src/main/java/boofcv/android/ConvertBitmap.java#L117-L132
VoltDB/voltdb
src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java
JDBC4PreparedStatement.setBlob
@Override public void setBlob(int parameterIndex, Blob x) throws SQLException { """ Sets the designated parameter to the given java.sql.Blob object. """ checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
java
@Override public void setBlob(int parameterIndex, Blob x) throws SQLException { checkParameterBounds(parameterIndex); throw SQLError.noSupport(); }
[ "@", "Override", "public", "void", "setBlob", "(", "int", "parameterIndex", ",", "Blob", "x", ")", "throws", "SQLException", "{", "checkParameterBounds", "(", "parameterIndex", ")", ";", "throw", "SQLError", ".", "noSupport", "(", ")", ";", "}" ]
Sets the designated parameter to the given java.sql.Blob object.
[ "Sets", "the", "designated", "parameter", "to", "the", "given", "java", ".", "sql", ".", "Blob", "object", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/jdbc/JDBC4PreparedStatement.java#L222-L227
finmath/finmath-lib
src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java
SwapAnnuity.getSwapAnnuity
public static RandomVariable getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurveInterface discountCurve, AnalyticModel model) { """ Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note that, the value returned is divided by the discount factor at eva...
java
public static RandomVariable getSwapAnnuity(double evaluationTime, Schedule schedule, DiscountCurveInterface discountCurve, AnalyticModel model) { RandomVariable value = new RandomVariableFromDoubleArray(0.0); for(int periodIndex=0; periodIndex<schedule.getNumberOfPeriods(); periodIndex++) { double paymentDate ...
[ "public", "static", "RandomVariable", "getSwapAnnuity", "(", "double", "evaluationTime", ",", "Schedule", "schedule", ",", "DiscountCurveInterface", "discountCurve", ",", "AnalyticModel", "model", ")", "{", "RandomVariable", "value", "=", "new", "RandomVariableFromDoubleA...
Function to calculate an (idealized) swap annuity for a given schedule and discount curve. Note that, the value returned is divided by the discount factor at evaluation. This matters, if the discount factor at evaluationTime is not equal to 1.0. @param evaluationTime The evaluation time as double. Cash flows prior an...
[ "Function", "to", "calculate", "an", "(", "idealized", ")", "swap", "annuity", "for", "a", "given", "schedule", "and", "discount", "curve", "." ]
train
https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/products/SwapAnnuity.java#L119-L132
michael-rapp/AndroidMaterialDialog
library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java
DialogRootView.addDivider
@NonNull private Divider addDivider() { """ Adds a divider to the view. @return The divider, which has been added to the view, as an instance of the class {@link Divider}. The divider may not be null """ Divider divider = new Divider(getContext()); divider.setVisibility(View.INVISIBLE);...
java
@NonNull private Divider addDivider() { Divider divider = new Divider(getContext()); divider.setVisibility(View.INVISIBLE); divider.setBackgroundColor(dividerColor); LayoutParams layoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, dpToPixels(getContext(), 1)); ...
[ "@", "NonNull", "private", "Divider", "addDivider", "(", ")", "{", "Divider", "divider", "=", "new", "Divider", "(", "getContext", "(", ")", ")", ";", "divider", ".", "setVisibility", "(", "View", ".", "INVISIBLE", ")", ";", "divider", ".", "setBackgroundC...
Adds a divider to the view. @return The divider, which has been added to the view, as an instance of the class {@link Divider}. The divider may not be null
[ "Adds", "a", "divider", "to", "the", "view", "." ]
train
https://github.com/michael-rapp/AndroidMaterialDialog/blob/8990eed72ee5f5a9720836ee708f71ac0d43053b/library/src/main/java/de/mrapp/android/dialog/view/DialogRootView.java#L470-L481
craterdog/java-primitive-types
src/main/java/craterdog/primitives/Probability.java
Probability.or
static public Probability or(Probability probability1, Probability probability2) { """ This function returns the logical disjunction of the specified probabilities. The value of the logical disjunction of two probabilities is P + Q - and(P, Q). @param probability1 The first probability. @param probability2 T...
java
static public Probability or(Probability probability1, Probability probability2) { double p1 = probability1.value; double p2 = probability2.value; return new Probability(p1 + p2 - (p1 * p2)); }
[ "static", "public", "Probability", "or", "(", "Probability", "probability1", ",", "Probability", "probability2", ")", "{", "double", "p1", "=", "probability1", ".", "value", ";", "double", "p2", "=", "probability2", ".", "value", ";", "return", "new", "Probabi...
This function returns the logical disjunction of the specified probabilities. The value of the logical disjunction of two probabilities is P + Q - and(P, Q). @param probability1 The first probability. @param probability2 The second probability. @return The logical disjunction of the two probabilities.
[ "This", "function", "returns", "the", "logical", "disjunction", "of", "the", "specified", "probabilities", ".", "The", "value", "of", "the", "logical", "disjunction", "of", "two", "probabilities", "is", "P", "+", "Q", "-", "and", "(", "P", "Q", ")", "." ]
train
https://github.com/craterdog/java-primitive-types/blob/730f9bceacfac69f99b094464a7da5747c07a59e/src/main/java/craterdog/primitives/Probability.java#L178-L182
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionComputer.java
MapTileCollisionComputer.getCollisionX
private static Double getCollisionX(CollisionCategory category, TileCollision tileCollision, double x, double y) { """ Get the horizontal collision from current location. @param category The collision category. @param tileCollision The current tile collision. @param x The current horizontal location. @param ...
java
private static Double getCollisionX(CollisionCategory category, TileCollision tileCollision, double x, double y) { if (Axis.X == category.getAxis()) { return tileCollision.getCollisionX(category, x, y); } return null; }
[ "private", "static", "Double", "getCollisionX", "(", "CollisionCategory", "category", ",", "TileCollision", "tileCollision", ",", "double", "x", ",", "double", "y", ")", "{", "if", "(", "Axis", ".", "X", "==", "category", ".", "getAxis", "(", ")", ")", "{"...
Get the horizontal collision from current location. @param category The collision category. @param tileCollision The current tile collision. @param x The current horizontal location. @param y The current vertical location. @return The computed horizontal collision.
[ "Get", "the", "horizontal", "collision", "from", "current", "location", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionComputer.java#L60-L67
gosu-lang/gosu-lang
gosu-core-api/src/main/java/gw/date/GosuDateUtil.java
GosuDateUtil.addYears
public static Date addYears(Date date, int iYears) { """ Adds the specified (signed) amount of years to the given date. For example, to subtract 5 years from the current date, you can achieve it by calling: <code>addYears(Date, -5)</code>. @param date The time. @param iYears The amount of years to add. ...
java
public static Date addYears(Date date, int iYears) { Calendar dateTime = dateToCalendar(date); dateTime.add(Calendar.YEAR, iYears); return dateTime.getTime(); }
[ "public", "static", "Date", "addYears", "(", "Date", "date", ",", "int", "iYears", ")", "{", "Calendar", "dateTime", "=", "dateToCalendar", "(", "date", ")", ";", "dateTime", ".", "add", "(", "Calendar", ".", "YEAR", ",", "iYears", ")", ";", "return", ...
Adds the specified (signed) amount of years to the given date. For example, to subtract 5 years from the current date, you can achieve it by calling: <code>addYears(Date, -5)</code>. @param date The time. @param iYears The amount of years to add. @return A new date with the years added.
[ "Adds", "the", "specified", "(", "signed", ")", "amount", "of", "years", "to", "the", "given", "date", ".", "For", "example", "to", "subtract", "5", "years", "from", "the", "current", "date", "you", "can", "achieve", "it", "by", "calling", ":", "<code", ...
train
https://github.com/gosu-lang/gosu-lang/blob/d6e9261b137ce66fef3726cabe7826d4a1f946b7/gosu-core-api/src/main/java/gw/date/GosuDateUtil.java#L125-L129
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java
AppServiceCertificateOrdersInner.resendEmail
public void resendEmail(String resourceGroupName, String certificateOrderName) { """ Resend certificate email. Resend certificate email. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @throws IllegalArgumentExcepti...
java
public void resendEmail(String resourceGroupName, String certificateOrderName) { resendEmailWithServiceResponseAsync(resourceGroupName, certificateOrderName).toBlocking().single().body(); }
[ "public", "void", "resendEmail", "(", "String", "resourceGroupName", ",", "String", "certificateOrderName", ")", "{", "resendEmailWithServiceResponseAsync", "(", "resourceGroupName", ",", "certificateOrderName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")...
Resend certificate email. Resend certificate email. @param resourceGroupName Name of the resource group to which the resource belongs. @param certificateOrderName Name of the certificate order. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rej...
[ "Resend", "certificate", "email", ".", "Resend", "certificate", "email", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/AppServiceCertificateOrdersInner.java#L1777-L1779
GenesysPureEngage/workspace-client-java
src/main/java/com/genesys/internal/workspace/api/StandardResponsesApi.java
StandardResponsesApi.getStandardResponse
public ApiSuccessResponse getStandardResponse(String id, GetStandardResponseData getStandardResponseData) throws ApiException { """ Get the details of a Standard Response. @param id id of the Standard Response (required) @param getStandardResponseData (required) @return ApiSuccessResponse @throws ApiExcepti...
java
public ApiSuccessResponse getStandardResponse(String id, GetStandardResponseData getStandardResponseData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = getStandardResponseWithHttpInfo(id, getStandardResponseData); return resp.getData(); }
[ "public", "ApiSuccessResponse", "getStandardResponse", "(", "String", "id", ",", "GetStandardResponseData", "getStandardResponseData", ")", "throws", "ApiException", "{", "ApiResponse", "<", "ApiSuccessResponse", ">", "resp", "=", "getStandardResponseWithHttpInfo", "(", "id...
Get the details of a Standard Response. @param id id of the Standard Response (required) @param getStandardResponseData (required) @return ApiSuccessResponse @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
[ "Get", "the", "details", "of", "a", "Standard", "Response", "." ]
train
https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/StandardResponsesApi.java#L766-L769
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/style/stylers/DocumentSettings.java
DocumentSettings.configureVisualSignature
@Override public void configureVisualSignature(PdfSignatureAppearance psa) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException, VectorPrintException { """ adds a visible signature of 200 / 100 at top left of the first page of the pdf with "verify origin" as reason, the localhos...
java
@Override public void configureVisualSignature(PdfSignatureAppearance psa) throws KeyStoreException, NoSuchAlgorithmException, UnrecoverableKeyException, VectorPrintException { psa.setReason("verify origin"); try { psa.setLocation(InetAddress.getLocalHost().getHostName()); } catch (...
[ "@", "Override", "public", "void", "configureVisualSignature", "(", "PdfSignatureAppearance", "psa", ")", "throws", "KeyStoreException", ",", "NoSuchAlgorithmException", ",", "UnrecoverableKeyException", ",", "VectorPrintException", "{", "psa", ".", "setReason", "(", "\"v...
adds a visible signature of 200 / 100 at top left of the first page of the pdf with "verify origin" as reason, the localhost name as location. Uses MakeSignature.signDetached(psa, as, pks, certificateChain, null, null, null, 0, MakeSignature.CryptoStandard.CMS) @see #loadKeyStore(char[]) @see #getKey(java.security.Key...
[ "adds", "a", "visible", "signature", "of", "200", "/", "100", "at", "top", "left", "of", "the", "first", "page", "of", "the", "pdf", "with", "verify", "origin", "as", "reason", "the", "localhost", "name", "as", "location", ".", "Uses", "MakeSignature", "...
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/style/stylers/DocumentSettings.java#L197-L223
LearnLib/automatalib
util/src/main/java/net/automatalib/util/automata/copy/AutomatonLowLevelCopy.java
AutomatonLowLevelCopy.rawCopy
public static <S1, I, T1, S2, T2, SP2, TP2> Mapping<S1, S2> rawCopy(AutomatonCopyMethod method, Automaton<S1, ? super I, T1> in, Collection<? extends I> inputs, ...
java
public static <S1, I, T1, S2, T2, SP2, TP2> Mapping<S1, S2> rawCopy(AutomatonCopyMethod method, Automaton<S1, ? super I, T1> in, Collection<? extends I> inputs, ...
[ "public", "static", "<", "S1", ",", "I", ",", "T1", ",", "S2", ",", "T2", ",", "SP2", ",", "TP2", ">", "Mapping", "<", "S1", ",", "S2", ">", "rawCopy", "(", "AutomatonCopyMethod", "method", ",", "Automaton", "<", "S1", ",", "?", "super", "I", ","...
Copies an {@link Automaton} to a {@link MutableAutomaton} with a compatible input alphabet, but possibly heterogeneous state and transition properties. @param <S1> input automaton state type @param <I> input symbol type @param <T1> input automaton transition type @param <S2> output automaton state type @param <T2> out...
[ "Copies", "an", "{", "@link", "Automaton", "}", "to", "a", "{", "@link", "MutableAutomaton", "}", "with", "a", "compatible", "input", "alphabet", "but", "possibly", "heterogeneous", "state", "and", "transition", "properties", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/automata/copy/AutomatonLowLevelCopy.java#L231-L240
seedstack/i18n-addon
rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java
TranslationsResourceIT.sendTranslationUpdate
private void sendTranslationUpdate(String translation, String locale, boolean outdated) throws JSONException { """ Sends an HTTP put request to update the translation for the given locale. @param translation translation @param locale locale @param outdated outdated """ JSONObject jsonTrans...
java
private void sendTranslationUpdate(String translation, String locale, boolean outdated) throws JSONException { JSONObject jsonTranslationValueObject = new JSONObject(); jsonTranslationValueObject.put("translation", translation); jsonTranslationValueObject.put("outdated", outdated); jsonT...
[ "private", "void", "sendTranslationUpdate", "(", "String", "translation", ",", "String", "locale", ",", "boolean", "outdated", ")", "throws", "JSONException", "{", "JSONObject", "jsonTranslationValueObject", "=", "new", "JSONObject", "(", ")", ";", "jsonTranslationVal...
Sends an HTTP put request to update the translation for the given locale. @param translation translation @param locale locale @param outdated outdated
[ "Sends", "an", "HTTP", "put", "request", "to", "update", "the", "translation", "for", "the", "given", "locale", "." ]
train
https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/rest/src/it/java/org/seedstack/i18n/internal/rest/TranslationsResourceIT.java#L130-L140
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/util/ProgramHelper.java
ProgramHelper.execute
public void execute(ProgramResponse response, int timeout) { """ Calls a program and returns any output generated. @param response details of what to invoke (output will be added). @param timeout maximum time (in milliseconds) for program execution. """ ProcessBuilder builder = createProcessBuilder(r...
java
public void execute(ProgramResponse response, int timeout) { ProcessBuilder builder = createProcessBuilder(response); invokeProgram(builder, response, timeout); }
[ "public", "void", "execute", "(", "ProgramResponse", "response", ",", "int", "timeout", ")", "{", "ProcessBuilder", "builder", "=", "createProcessBuilder", "(", "response", ")", ";", "invokeProgram", "(", "builder", ",", "response", ",", "timeout", ")", ";", "...
Calls a program and returns any output generated. @param response details of what to invoke (output will be added). @param timeout maximum time (in milliseconds) for program execution.
[ "Calls", "a", "program", "and", "returns", "any", "output", "generated", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/util/ProgramHelper.java#L32-L35
centic9/commons-dost
src/main/java/org/dstadler/commons/net/SocketUtils.java
SocketUtils.getNextFreePort
@SuppressForbidden(reason = "We want to bind to any address here when checking for free ports") public static int getNextFreePort(int portRangeStart, int portRangeEnd) throws IOException { """ Method that is used to find the next available port. It used the two constants PORT_RANGE_START and PORT_RANGE_END defin...
java
@SuppressForbidden(reason = "We want to bind to any address here when checking for free ports") public static int getNextFreePort(int portRangeStart, int portRangeEnd) throws IOException { for (int port = portRangeStart; port <= portRangeEnd; port++) { try (ServerSocket sock = new ServerSocket()) { sock.setRe...
[ "@", "SuppressForbidden", "(", "reason", "=", "\"We want to bind to any address here when checking for free ports\"", ")", "public", "static", "int", "getNextFreePort", "(", "int", "portRangeStart", ",", "int", "portRangeEnd", ")", "throws", "IOException", "{", "for", "("...
Method that is used to find the next available port. It used the two constants PORT_RANGE_START and PORT_RANGE_END defined above to limit the range of ports that are tried. @param portRangeStart The first port that is tried @param portRangeEnd The last port that is tried @return A port number that can be used. @throw...
[ "Method", "that", "is", "used", "to", "find", "the", "next", "available", "port", ".", "It", "used", "the", "two", "constants", "PORT_RANGE_START", "and", "PORT_RANGE_END", "defined", "above", "to", "limit", "the", "range", "of", "ports", "that", "are", "tri...
train
https://github.com/centic9/commons-dost/blob/f6fa4e3e0b943ff103f918824319d8abf33d0e0f/src/main/java/org/dstadler/commons/net/SocketUtils.java#L34-L49
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCameraRig.java
GVRCameraRig.prettyPrint
@Override public void prettyPrint(StringBuffer sb, int indent) { """ Prints the {@link GVRCameraRig} object with indentation. @param sb The {@code StringBuffer} object to receive the output. @param indent Size of indentation in number of spaces. """ sb.append(Log.getSpaces(indent)); ...
java
@Override public void prettyPrint(StringBuffer sb, int indent) { sb.append(Log.getSpaces(indent)); sb.append(getClass().getSimpleName()); sb.append(System.lineSeparator()); sb.append(Log.getSpaces(indent + 2)); sb.append("type: "); sb.append(getCameraRigType()); ...
[ "@", "Override", "public", "void", "prettyPrint", "(", "StringBuffer", "sb", ",", "int", "indent", ")", "{", "sb", ".", "append", "(", "Log", ".", "getSpaces", "(", "indent", ")", ")", ";", "sb", ".", "append", "(", "getClass", "(", ")", ".", "getSim...
Prints the {@link GVRCameraRig} object with indentation. @param sb The {@code StringBuffer} object to receive the output. @param indent Size of indentation in number of spaces.
[ "Prints", "the", "{", "@link", "GVRCameraRig", "}", "object", "with", "indentation", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRCameraRig.java#L608-L647
alkacon/opencms-core
src/org/opencms/ui/apps/user/CmsGroupTable.java
CmsGroupTable.fillGroupItem
public void fillGroupItem(Item item, CmsGroup group, List<CmsGroup> indirects) { """ Fills the container item representing a group.<p> @param item the item @param group the group @param indirects the indirect groups """ item.getItemProperty(TableProperty.Name).setValue(group.getName()); i...
java
public void fillGroupItem(Item item, CmsGroup group, List<CmsGroup> indirects) { item.getItemProperty(TableProperty.Name).setValue(group.getName()); item.getItemProperty(TableProperty.Description).setValue(group.getDescription(A_CmsUI.get().getLocale())); item.getItemProperty(TableProperty.OU)....
[ "public", "void", "fillGroupItem", "(", "Item", "item", ",", "CmsGroup", "group", ",", "List", "<", "CmsGroup", ">", "indirects", ")", "{", "item", ".", "getItemProperty", "(", "TableProperty", ".", "Name", ")", ".", "setValue", "(", "group", ".", "getName...
Fills the container item representing a group.<p> @param item the item @param group the group @param indirects the indirect groups
[ "Fills", "the", "container", "item", "representing", "a", "group", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/user/CmsGroupTable.java#L438-L446
dain/leveldb
leveldb/src/main/java/org/iq80/leveldb/util/Slice.java
Slice.toByteBuffer
public ByteBuffer toByteBuffer(int index, int length) { """ Converts this buffer's sub-region into a NIO buffer. The returned buffer shares the content with this buffer. """ checkPositionIndexes(index, index + length, this.length); index += offset; return ByteBuffer.wrap(data, index, ...
java
public ByteBuffer toByteBuffer(int index, int length) { checkPositionIndexes(index, index + length, this.length); index += offset; return ByteBuffer.wrap(data, index, length).order(LITTLE_ENDIAN); }
[ "public", "ByteBuffer", "toByteBuffer", "(", "int", "index", ",", "int", "length", ")", "{", "checkPositionIndexes", "(", "index", ",", "index", "+", "length", ",", "this", ".", "length", ")", ";", "index", "+=", "offset", ";", "return", "ByteBuffer", ".",...
Converts this buffer's sub-region into a NIO buffer. The returned buffer shares the content with this buffer.
[ "Converts", "this", "buffer", "s", "sub", "-", "region", "into", "a", "NIO", "buffer", ".", "The", "returned", "buffer", "shares", "the", "content", "with", "this", "buffer", "." ]
train
https://github.com/dain/leveldb/blob/7994065b48eada2ef29e7fefd172c2ad1e0110eb/leveldb/src/main/java/org/iq80/leveldb/util/Slice.java#L613-L618
OpenLiberty/open-liberty
dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcResultSet.java
WSJdbcResultSet.updateCharacterStream
public void updateCharacterStream(String arg0, Reader arg1, int arg2) throws SQLException { """ Updates a column with a character stream value. The updateXXX methods are used to update column values in the current row, or the insert row. The updateXXX methods do not update the underlying database; instead the up...
java
public void updateCharacterStream(String arg0, Reader arg1, int arg2) throws SQLException { try { rsetImpl.updateCharacterStream(arg0, arg1, arg2); } catch (SQLException ex) { FFDCFilter.processException(ex, "com.ibm.ws.rsadapter.jdbc.WSJdbcResultSet.updateCharacterStream", "3317...
[ "public", "void", "updateCharacterStream", "(", "String", "arg0", ",", "Reader", "arg1", ",", "int", "arg2", ")", "throws", "SQLException", "{", "try", "{", "rsetImpl", ".", "updateCharacterStream", "(", "arg0", ",", "arg1", ",", "arg2", ")", ";", "}", "ca...
Updates a column with a character stream value. The updateXXX methods are used to update column values in the current row, or the insert row. The updateXXX methods do not update the underlying database; instead the updateRow or insertRow methods are called to update the database. @param columnName - the name of the co...
[ "Updates", "a", "column", "with", "a", "character", "stream", "value", ".", "The", "updateXXX", "methods", "are", "used", "to", "update", "column", "values", "in", "the", "current", "row", "or", "the", "insert", "row", ".", "The", "updateXXX", "methods", "...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/jdbc/WSJdbcResultSet.java#L3258-L3268
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newTypeNotFoundException
public static TypeNotFoundException newTypeNotFoundException(String message, Object... args) { """ Constructs and initializes a new {@link TypeNotFoundException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link TypeNo...
java
public static TypeNotFoundException newTypeNotFoundException(String message, Object... args) { return newTypeNotFoundException(null, message, args); }
[ "public", "static", "TypeNotFoundException", "newTypeNotFoundException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newTypeNotFoundException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link TypeNotFoundException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link TypeNotFoundException exception}. @param args {@link Object[] arguments} used to replace format placeholders in t...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "TypeNotFoundException", "}", "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#L525-L527
lucee/Lucee
core/src/main/java/lucee/runtime/type/util/ArrayUtil.java
ArrayUtil.setEL
public static Object setEL(Object o, int index, Object value) { """ sets a value to a array at defined index @param o @param index @param value @return value setted """ try { return set(o, index, value); } catch (ArrayUtilException e) { return null; } }
java
public static Object setEL(Object o, int index, Object value) { try { return set(o, index, value); } catch (ArrayUtilException e) { return null; } }
[ "public", "static", "Object", "setEL", "(", "Object", "o", ",", "int", "index", ",", "Object", "value", ")", "{", "try", "{", "return", "set", "(", "o", ",", "index", ",", "value", ")", ";", "}", "catch", "(", "ArrayUtilException", "e", ")", "{", "...
sets a value to a array at defined index @param o @param index @param value @return value setted
[ "sets", "a", "value", "to", "a", "array", "at", "defined", "index" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/type/util/ArrayUtil.java#L604-L611
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps.java
mps.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { """ <pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre> """ mps_responses result = (mps_responses) service.get_payload_formatter()....
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { mps_responses result = (mps_responses) service.get_payload_formatter().string_to_resource(mps_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXISTS) ...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "mps_responses", "result", "=", "(", "mps_responses", ")", "service", ".", "get_payload_formatter", "(", "...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/mps.java#L385-L402
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java
CPFriendlyURLEntryPersistenceImpl.removeByG_C_U
@Override public void removeByG_C_U(long groupId, long classNameId, String urlTitle) { """ Removes all the cp friendly url entries where groupId = &#63; and classNameId = &#63; and urlTitle = &#63; from the database. @param groupId the group ID @param classNameId the class name ID @param urlTitle the url tit...
java
@Override public void removeByG_C_U(long groupId, long classNameId, String urlTitle) { for (CPFriendlyURLEntry cpFriendlyURLEntry : findByG_C_U(groupId, classNameId, urlTitle, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpFriendlyURLEntry); } }
[ "@", "Override", "public", "void", "removeByG_C_U", "(", "long", "groupId", ",", "long", "classNameId", ",", "String", "urlTitle", ")", "{", "for", "(", "CPFriendlyURLEntry", "cpFriendlyURLEntry", ":", "findByG_C_U", "(", "groupId", ",", "classNameId", ",", "url...
Removes all the cp friendly url entries where groupId = &#63; and classNameId = &#63; and urlTitle = &#63; from the database. @param groupId the group ID @param classNameId the class name ID @param urlTitle the url title
[ "Removes", "all", "the", "cp", "friendly", "url", "entries", "where", "groupId", "=", "&#63", ";", "and", "classNameId", "=", "&#63", ";", "and", "urlTitle", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPFriendlyURLEntryPersistenceImpl.java#L3174-L3181
drinkjava2/jBeanBox
jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java
CheckClassAdapter.checkTypeSignature
private static int checkTypeSignature(final String signature, int pos) { """ Checks a type signature. @param signature a string containing the signature that must be checked. @param pos index of first character to be checked. @return the index of the first character after the checked part. """ /...
java
private static int checkTypeSignature(final String signature, int pos) { // TypeSignature: // Z | C | B | S | I | F | J | D | FieldTypeSignature switch (getChar(signature, pos)) { case 'Z': case 'C': case 'B': case 'S': case 'I': case 'F': ...
[ "private", "static", "int", "checkTypeSignature", "(", "final", "String", "signature", ",", "int", "pos", ")", "{", "// TypeSignature:", "// Z | C | B | S | I | F | J | D | FieldTypeSignature", "switch", "(", "getChar", "(", "signature", ",", "pos", ")", ")", "{", "...
Checks a type signature. @param signature a string containing the signature that must be checked. @param pos index of first character to be checked. @return the index of the first character after the checked part.
[ "Checks", "a", "type", "signature", "." ]
train
https://github.com/drinkjava2/jBeanBox/blob/01c216599ffa2e5f2d9c01df2adaad0f45567c04/jbeanbox/src/main/java/com/github/drinkjava2/asm5_0_3/util/CheckClassAdapter.java#L939-L956
cdk/cdk
tool/sdg/src/main/java/org/openscience/cdk/layout/LayoutRefiner.java
LayoutRefiner.haveCrossingBonds
private boolean haveCrossingBonds(int u, int v) { """ Check if any of the bonds adjacent to u, v (not bonded) are crossing. @param u an atom (idx) @param v another atom (idx) @return there are crossing bonds """ int[] us = adjList[u]; int[] vs = adjList[v]; for (int u1 : us) { ...
java
private boolean haveCrossingBonds(int u, int v) { int[] us = adjList[u]; int[] vs = adjList[v]; for (int u1 : us) { for (int v1 : vs) { if (u1 == v || v1 == u || u1 == v1) continue; if (isCrossed(atoms[u].getPoint2d(), atoms[u1].get...
[ "private", "boolean", "haveCrossingBonds", "(", "int", "u", ",", "int", "v", ")", "{", "int", "[", "]", "us", "=", "adjList", "[", "u", "]", ";", "int", "[", "]", "vs", "=", "adjList", "[", "v", "]", ";", "for", "(", "int", "u1", ":", "us", "...
Check if any of the bonds adjacent to u, v (not bonded) are crossing. @param u an atom (idx) @param v another atom (idx) @return there are crossing bonds
[ "Check", "if", "any", "of", "the", "bonds", "adjacent", "to", "u", "v", "(", "not", "bonded", ")", "are", "crossing", "." ]
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/sdg/src/main/java/org/openscience/cdk/layout/LayoutRefiner.java#L304-L316
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectValue
public void expectValue(String name, String message) { """ Validates a given field to be present with a value @param name The field to check @param message A custom error message instead of the default one """ String value = Optional.ofNullable(get(name)).orElse(""); if (StringUtils.isBlan...
java
public void expectValue(String name, String message) { String value = Optional.ofNullable(get(name)).orElse(""); if (StringUtils.isBlank(StringUtils.trimToNull(value))) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.REQUIRED_KEY.name(), name))); } }
[ "public", "void", "expectValue", "(", "String", "name", ",", "String", "message", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"", ")", ";", "if", "(", "StringUtils", ".", ...
Validates a given field to be present with a value @param name The field to check @param message A custom error message instead of the default one
[ "Validates", "a", "given", "field", "to", "be", "present", "with", "a", "value" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L71-L77
aws/aws-sdk-java
aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateSimulationJobResult.java
CreateSimulationJobResult.withTags
public CreateSimulationJobResult withTags(java.util.Map<String, String> tags) { """ <p> The list of all tags added to the simulation job. </p> @param tags The list of all tags added to the simulation job. @return Returns a reference to this object so that method calls can be chained together. """ ...
java
public CreateSimulationJobResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "CreateSimulationJobResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The list of all tags added to the simulation job. </p> @param tags The list of all tags added to the simulation job. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "list", "of", "all", "tags", "added", "to", "the", "simulation", "job", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/CreateSimulationJobResult.java#L1520-L1523
datumbox/datumbox-framework
datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java
SimpleRandomSampling.pbarStd
public static double pbarStd(double pbar, int sampleN) { """ Calculates Standard Deviation for Pbar for infinite population size @param pbar @param sampleN @return """ return Math.sqrt(pbarVariance(pbar, sampleN, Integer.MAX_VALUE)); }
java
public static double pbarStd(double pbar, int sampleN) { return Math.sqrt(pbarVariance(pbar, sampleN, Integer.MAX_VALUE)); }
[ "public", "static", "double", "pbarStd", "(", "double", "pbar", ",", "int", "sampleN", ")", "{", "return", "Math", ".", "sqrt", "(", "pbarVariance", "(", "pbar", ",", "sampleN", ",", "Integer", ".", "MAX_VALUE", ")", ")", ";", "}" ]
Calculates Standard Deviation for Pbar for infinite population size @param pbar @param sampleN @return
[ "Calculates", "Standard", "Deviation", "for", "Pbar", "for", "infinite", "population", "size" ]
train
https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/sampling/SimpleRandomSampling.java#L230-L232
googleapis/google-cloud-java
google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/LoadJobConfiguration.java
LoadJobConfiguration.of
public static LoadJobConfiguration of(TableId destinationTable, List<String> sourceUris) { """ Returns a BigQuery Load Job Configuration for the given destination table and source URIs. """ return newBuilder(destinationTable, sourceUris).build(); }
java
public static LoadJobConfiguration of(TableId destinationTable, List<String> sourceUris) { return newBuilder(destinationTable, sourceUris).build(); }
[ "public", "static", "LoadJobConfiguration", "of", "(", "TableId", "destinationTable", ",", "List", "<", "String", ">", "sourceUris", ")", "{", "return", "newBuilder", "(", "destinationTable", ",", "sourceUris", ")", ".", "build", "(", ")", ";", "}" ]
Returns a BigQuery Load Job Configuration for the given destination table and source URIs.
[ "Returns", "a", "BigQuery", "Load", "Job", "Configuration", "for", "the", "given", "destination", "table", "and", "source", "URIs", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/LoadJobConfiguration.java#L532-L534
apache/incubator-gobblin
gobblin-core-base/src/main/java/org/apache/gobblin/instrumented/Instrumented.java
Instrumented.setMetricContextName
public static void setMetricContextName(State state, String name) { """ Sets the key {@link #METRIC_CONTEXT_NAME_KEY} to the specified name, in the given {@link State}. """ state.setProp(Instrumented.METRIC_CONTEXT_NAME_KEY, name); }
java
public static void setMetricContextName(State state, String name) { state.setProp(Instrumented.METRIC_CONTEXT_NAME_KEY, name); }
[ "public", "static", "void", "setMetricContextName", "(", "State", "state", ",", "String", "name", ")", "{", "state", ".", "setProp", "(", "Instrumented", ".", "METRIC_CONTEXT_NAME_KEY", ",", "name", ")", ";", "}" ]
Sets the key {@link #METRIC_CONTEXT_NAME_KEY} to the specified name, in the given {@link State}.
[ "Sets", "the", "key", "{" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core-base/src/main/java/org/apache/gobblin/instrumented/Instrumented.java#L276-L278
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java
Organizer.flattenPaging
public static <T> Paging<T> flattenPaging(Collection<Paging<T>> collectionOfPaging) { """ Aggregates multiple collections into a single paging collection @param collectionOfPaging the collection paging that @param <T> the type class @return the flatten collections into a single collection """ if (col...
java
public static <T> Paging<T> flattenPaging(Collection<Paging<T>> collectionOfPaging) { if (collectionOfPaging == null || collectionOfPaging.isEmpty()) return null; PageCriteria pageCriteria = null; // get first page criteria Paging<T> firstPaging = collectionOfPaging.iterator().next(); if (first...
[ "public", "static", "<", "T", ">", "Paging", "<", "T", ">", "flattenPaging", "(", "Collection", "<", "Paging", "<", "T", ">", ">", "collectionOfPaging", ")", "{", "if", "(", "collectionOfPaging", "==", "null", "||", "collectionOfPaging", ".", "isEmpty", "(...
Aggregates multiple collections into a single paging collection @param collectionOfPaging the collection paging that @param <T> the type class @return the flatten collections into a single collection
[ "Aggregates", "multiple", "collections", "into", "a", "single", "paging", "collection" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/util/Organizer.java#L177-L191
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/query/impl/predicates/OrPredicate.java
OrPredicate.setPredicates
@Override @SuppressFBWarnings("EI_EXPOSE_REP") public <K, V> void setPredicates(Predicate<K, V>[] predicates) { """ Visitable predicates are treated as effectively immutable, therefore callers should not make any changes to the array passed as argument after is has been set. @param predicates the arra...
java
@Override @SuppressFBWarnings("EI_EXPOSE_REP") public <K, V> void setPredicates(Predicate<K, V>[] predicates) { if (this.predicates == null) { this.predicates = predicates; } else { throw new IllegalStateException("Cannot reset predicates in an OrPredicate after they have...
[ "@", "Override", "@", "SuppressFBWarnings", "(", "\"EI_EXPOSE_REP\"", ")", "public", "<", "K", ",", "V", ">", "void", "setPredicates", "(", "Predicate", "<", "K", ",", "V", ">", "[", "]", "predicates", ")", "{", "if", "(", "this", ".", "predicates", "=...
Visitable predicates are treated as effectively immutable, therefore callers should not make any changes to the array passed as argument after is has been set. @param predicates the array of sub-predicates for this {@code Or} operator. It is not safe to make any changes to this array after it has been set.
[ "Visitable", "predicates", "are", "treated", "as", "effectively", "immutable", "therefore", "callers", "should", "not", "make", "any", "changes", "to", "the", "array", "passed", "as", "argument", "after", "is", "has", "been", "set", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/query/impl/predicates/OrPredicate.java#L189-L197
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.parseArguments
@Override public boolean parseArguments(final PrintStream messageStream, String[] args) { """ Parse command-line arguments, and store values in callerArguments object passed to ctor. @param messageStream Where to write error messages. @param args Command line tokens. @return true if command line is...
java
@Override public boolean parseArguments(final PrintStream messageStream, String[] args) { final OptionSet parsedArguments; final OptionParser parser = getOptionParser(); try { // Preprocess the arguments before the parser sees them, replacing any tagged options // and...
[ "@", "Override", "public", "boolean", "parseArguments", "(", "final", "PrintStream", "messageStream", ",", "String", "[", "]", "args", ")", "{", "final", "OptionSet", "parsedArguments", ";", "final", "OptionParser", "parser", "=", "getOptionParser", "(", ")", ";...
Parse command-line arguments, and store values in callerArguments object passed to ctor. @param messageStream Where to write error messages. @param args Command line tokens. @return true if command line is valid and the program should run, false if help or version was requested @throws CommandLineException if ...
[ "Parse", "command", "-", "line", "arguments", "and", "store", "values", "in", "callerArguments", "object", "passed", "to", "ctor", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L134-L167
apache/incubator-druid
extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java
ParquetGroupConverter.convertBinaryToDecimal
private static BigDecimal convertBinaryToDecimal(Binary value, int precision, int scale) { """ convert parquet binary decimal to BigDecimal, lifted from https://github.com/apache/parquet-mr/blob/master/parquet-pig/src/main/java/org/apache/parquet/pig/convert/DecimalUtils.java#L38 """ // based on parquet-m...
java
private static BigDecimal convertBinaryToDecimal(Binary value, int precision, int scale) { // based on parquet-mr pig conversion which is based on spark conversion... yo dawg? if (precision <= 18) { ByteBuffer buffer = value.toByteBuffer(); byte[] bytes = buffer.array(); int start = buffer.a...
[ "private", "static", "BigDecimal", "convertBinaryToDecimal", "(", "Binary", "value", ",", "int", "precision", ",", "int", "scale", ")", "{", "// based on parquet-mr pig conversion which is based on spark conversion... yo dawg?", "if", "(", "precision", "<=", "18", ")", "{...
convert parquet binary decimal to BigDecimal, lifted from https://github.com/apache/parquet-mr/blob/master/parquet-pig/src/main/java/org/apache/parquet/pig/convert/DecimalUtils.java#L38
[ "convert", "parquet", "binary", "decimal", "to", "BigDecimal", "lifted", "from", "https", ":", "//", "github", ".", "com", "/", "apache", "/", "parquet", "-", "mr", "/", "blob", "/", "master", "/", "parquet", "-", "pig", "/", "src", "/", "main", "/", ...
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extensions-core/parquet-extensions/src/main/java/org/apache/druid/data/input/parquet/simple/ParquetGroupConverter.java#L431-L455
EasyinnovaSL/Tiff-Library-4J
src/main/java/com/easyinnova/tiff/model/ValidationResult.java
ValidationResult.iaddError
private void iaddError(String desc, String value, String loc) { """ Adds an error. @param desc error description @param value the value that caused the error @param loc the error location """ if (!validate) return; ValidationEvent ve = new ValidationEvent(desc, value, loc); errors.add(ve); ...
java
private void iaddError(String desc, String value, String loc) { if (!validate) return; ValidationEvent ve = new ValidationEvent(desc, value, loc); errors.add(ve); correct = false; }
[ "private", "void", "iaddError", "(", "String", "desc", ",", "String", "value", ",", "String", "loc", ")", "{", "if", "(", "!", "validate", ")", "return", ";", "ValidationEvent", "ve", "=", "new", "ValidationEvent", "(", "desc", ",", "value", ",", "loc", ...
Adds an error. @param desc error description @param value the value that caused the error @param loc the error location
[ "Adds", "an", "error", "." ]
train
https://github.com/EasyinnovaSL/Tiff-Library-4J/blob/682605d3ed207a66213278c054c98f1b909472b7/src/main/java/com/easyinnova/tiff/model/ValidationResult.java#L78-L83
sebastiangraf/treetank
interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java
WorkerHelper.serializeXML
public static XMLSerializer serializeXML(final ISession session, final OutputStream out, final boolean serializeXMLDec, final boolean serializeRest, final Long nodekey, final Long revision) { """ This method creates a new XMLSerializer reference @param session Associated session. @param out OutputStr...
java
public static XMLSerializer serializeXML(final ISession session, final OutputStream out, final boolean serializeXMLDec, final boolean serializeRest, final Long nodekey, final Long revision) { final XMLSerializerProperties props = new XMLSerializerProperties(); final XMLSerializerBuilder builder;...
[ "public", "static", "XMLSerializer", "serializeXML", "(", "final", "ISession", "session", ",", "final", "OutputStream", "out", ",", "final", "boolean", "serializeXMLDec", ",", "final", "boolean", "serializeRest", ",", "final", "Long", "nodekey", ",", "final", "Lon...
This method creates a new XMLSerializer reference @param session Associated session. @param out OutputStream @param serializeXMLDec specifies whether XML declaration should be shown @param serializeRest specifies whether node id should be shown @return new XMLSerializer reference
[ "This", "method", "creates", "a", "new", "XMLSerializer", "reference" ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/jax-rx/src/main/java/org/treetank/service/jaxrx/util/WorkerHelper.java#L154-L172
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_user_POST
public OvhUserDetail project_serviceName_user_POST(String serviceName, String description, OvhRoleEnum role) throws IOException { """ Create user REST: POST /cloud/project/{serviceName}/user @param description [required] User description @param role [required] Openstack keystone role name @param serviceName ...
java
public OvhUserDetail project_serviceName_user_POST(String serviceName, String description, OvhRoleEnum role) throws IOException { String qPath = "/cloud/project/{serviceName}/user"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "description", d...
[ "public", "OvhUserDetail", "project_serviceName_user_POST", "(", "String", "serviceName", ",", "String", "description", ",", "OvhRoleEnum", "role", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/user\"", ";", "StringBuilder", "s...
Create user REST: POST /cloud/project/{serviceName}/user @param description [required] User description @param role [required] Openstack keystone role name @param serviceName [required] Service name
[ "Create", "user" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L509-L517
korpling/ANNIS
annis-libgui/src/main/java/annis/libgui/AnnisBaseUI.java
AnnisBaseUI.handleCommonError
public static boolean handleCommonError(Throwable ex, String action) { """ Handle common errors like database/service connection problems and display a unified error message. This will not log the exception, only display information to the user. @param ex @return True if error was handled, false otherwise....
java
public static boolean handleCommonError(Throwable ex, String action) { if(ex != null) { Throwable rootCause = ex; while(rootCause.getCause() != null) { rootCause = rootCause.getCause(); } if(rootCause instanceof UniformInterfaceException) { UniformInterface...
[ "public", "static", "boolean", "handleCommonError", "(", "Throwable", "ex", ",", "String", "action", ")", "{", "if", "(", "ex", "!=", "null", ")", "{", "Throwable", "rootCause", "=", "ex", ";", "while", "(", "rootCause", ".", "getCause", "(", ")", "!=", ...
Handle common errors like database/service connection problems and display a unified error message. This will not log the exception, only display information to the user. @param ex @return True if error was handled, false otherwise.
[ "Handle", "common", "errors", "like", "database", "/", "service", "connection", "problems", "and", "display", "a", "unified", "error", "message", "." ]
train
https://github.com/korpling/ANNIS/blob/152a2e34832e015f73ac8ce8a7d4c32641641324/annis-libgui/src/main/java/annis/libgui/AnnisBaseUI.java#L381-L421
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/routes/ControllerRoute.java
ControllerRoute.withBasicAuthentication
public ControllerRoute withBasicAuthentication(String username, String password) { """ Sets Basic HTTP authentication to all method on the given controller class @param username The username for basic authentication in clear text @param password The password for basic authentication in clear text @return co...
java
public ControllerRoute withBasicAuthentication(String username, String password) { Objects.requireNonNull(username, Required.USERNAME.toString()); Objects.requireNonNull(password, Required.PASSWORD.toString()); this.username = username; this.password = password; ...
[ "public", "ControllerRoute", "withBasicAuthentication", "(", "String", "username", ",", "String", "password", ")", "{", "Objects", ".", "requireNonNull", "(", "username", ",", "Required", ".", "USERNAME", ".", "toString", "(", ")", ")", ";", "Objects", ".", "r...
Sets Basic HTTP authentication to all method on the given controller class @param username The username for basic authentication in clear text @param password The password for basic authentication in clear text @return controller route instance
[ "Sets", "Basic", "HTTP", "authentication", "to", "all", "method", "on", "the", "given", "controller", "class" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/routes/ControllerRoute.java#L89-L97
icode/ameba
src/main/java/ameba/db/ebean/EbeanUtils.java
EbeanUtils.checkQuery
public static void checkQuery(SpiQuery<?> query, ListExpressionValidation validation, boolean ignoreUnknown) { """ <p>checkQuery.</p> @param query a {@link io.ebeaninternal.api.SpiQuery} object. @param validation a {@link ameba.db.ebean.internal.ListExpressionValidation} object. @param ignoreUnknow...
java
public static void checkQuery(SpiQuery<?> query, ListExpressionValidation validation, boolean ignoreUnknown) { if (query != null) { validate(query.getWhereExpressions(), validation, ignoreUnknown); validate(query.getHavingExpressions(), validation, ignoreUnknown); validate(qu...
[ "public", "static", "void", "checkQuery", "(", "SpiQuery", "<", "?", ">", "query", ",", "ListExpressionValidation", "validation", ",", "boolean", "ignoreUnknown", ")", "{", "if", "(", "query", "!=", "null", ")", "{", "validate", "(", "query", ".", "getWhereE...
<p>checkQuery.</p> @param query a {@link io.ebeaninternal.api.SpiQuery} object. @param validation a {@link ameba.db.ebean.internal.ListExpressionValidation} object. @param ignoreUnknown a boolean.
[ "<p", ">", "checkQuery", ".", "<", "/", "p", ">" ]
train
https://github.com/icode/ameba/blob/9d4956e935898e41331b2745e400ef869cd265e0/src/main/java/ameba/db/ebean/EbeanUtils.java#L206-L218
grails/grails-core
grails-core/src/main/groovy/org/grails/spring/context/support/PluginAwareResourceBundleMessageSource.java
PluginAwareResourceBundleMessageSource.resolveCodeFromPlugins
protected MessageFormat resolveCodeFromPlugins(String code, Locale locale) { """ Attempts to resolve a MessageFormat for the code from the list of plugin base names @param code The code @param locale The locale @return a MessageFormat """ if (pluginCacheMillis < 0) { PropertiesHolder p...
java
protected MessageFormat resolveCodeFromPlugins(String code, Locale locale) { if (pluginCacheMillis < 0) { PropertiesHolder propHolder = getMergedPluginProperties(locale); MessageFormat result = propHolder.getMessageFormat(code, locale); if (result != null) { r...
[ "protected", "MessageFormat", "resolveCodeFromPlugins", "(", "String", "code", ",", "Locale", "locale", ")", "{", "if", "(", "pluginCacheMillis", "<", "0", ")", "{", "PropertiesHolder", "propHolder", "=", "getMergedPluginProperties", "(", "locale", ")", ";", "Mess...
Attempts to resolve a MessageFormat for the code from the list of plugin base names @param code The code @param locale The locale @return a MessageFormat
[ "Attempts", "to", "resolve", "a", "MessageFormat", "for", "the", "code", "from", "the", "list", "of", "plugin", "base", "names" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/spring/context/support/PluginAwareResourceBundleMessageSource.java#L252-L265
dita-ot/dita-ot
src/main/java/org/dita/dost/module/CopyToModule.java
CopyToModule.getPathtoRootmap
public static File getPathtoRootmap(final URI traceFilename, final URI inputMap) { """ Get path to root map @param traceFilename absolute input file @param inputMap absolute path to start file @return path to base directory, {@code null} if not available """ assert traceFilename.isAbsolute();...
java
public static File getPathtoRootmap(final URI traceFilename, final URI inputMap) { assert traceFilename.isAbsolute(); assert inputMap.isAbsolute(); return toFile(getRelativePath(traceFilename, inputMap)).getParentFile(); }
[ "public", "static", "File", "getPathtoRootmap", "(", "final", "URI", "traceFilename", ",", "final", "URI", "inputMap", ")", "{", "assert", "traceFilename", ".", "isAbsolute", "(", ")", ";", "assert", "inputMap", ".", "isAbsolute", "(", ")", ";", "return", "t...
Get path to root map @param traceFilename absolute input file @param inputMap absolute path to start file @return path to base directory, {@code null} if not available
[ "Get", "path", "to", "root", "map" ]
train
https://github.com/dita-ot/dita-ot/blob/ea776b3c60c03d9f033b6f7ea072349e49dbcdd2/src/main/java/org/dita/dost/module/CopyToModule.java#L351-L355
drewnoakes/metadata-extractor
Source/com/drew/lang/SequentialReader.java
SequentialReader.getNullTerminatedString
@NotNull public String getNullTerminatedString(int maxLengthBytes, Charset charset) throws IOException { """ Creates a String from the stream, ending where <code>byte=='\0'</code> or where <code>length==maxLength</code>. @param maxLengthBytes The maximum number of bytes to read. If a zero-byte is not reach...
java
@NotNull public String getNullTerminatedString(int maxLengthBytes, Charset charset) throws IOException { return getNullTerminatedStringValue(maxLengthBytes, charset).toString(); }
[ "@", "NotNull", "public", "String", "getNullTerminatedString", "(", "int", "maxLengthBytes", ",", "Charset", "charset", ")", "throws", "IOException", "{", "return", "getNullTerminatedStringValue", "(", "maxLengthBytes", ",", "charset", ")", ".", "toString", "(", ")"...
Creates a String from the stream, ending where <code>byte=='\0'</code> or where <code>length==maxLength</code>. @param maxLengthBytes The maximum number of bytes to read. If a zero-byte is not reached within this limit, reading will stop and the string will be truncated to this length. @return The read string. @throw...
[ "Creates", "a", "String", "from", "the", "stream", "ending", "where", "<code", ">", "byte", "==", "\\", "0", "<", "/", "code", ">", "or", "where", "<code", ">", "length", "==", "maxLength<", "/", "code", ">", "." ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/lang/SequentialReader.java#L339-L343
docusign/docusign-java-client
src/main/java/com/docusign/esign/client/ApiClient.java
ApiClient.getAuthorizationUri
public URI getAuthorizationUri(String clientId, java.util.List<String> scopes, String redirectUri, String responseType, String state) throws IllegalArgumentException, UriBuilderException { """ Helper method to configure the OAuth accessCode/implicit flow parameters @param clientId OAuth2 client ID: Identifies the...
java
public URI getAuthorizationUri(String clientId, java.util.List<String> scopes, String redirectUri, String responseType, String state) throws IllegalArgumentException, UriBuilderException { String formattedScopes = (scopes == null || scopes.size() < 1) ? "" : scopes.get(0); StringBuilder sb = new StringBuilder(f...
[ "public", "URI", "getAuthorizationUri", "(", "String", "clientId", ",", "java", ".", "util", ".", "List", "<", "String", ">", "scopes", ",", "String", "redirectUri", ",", "String", "responseType", ",", "String", "state", ")", "throws", "IllegalArgumentException"...
Helper method to configure the OAuth accessCode/implicit flow parameters @param clientId OAuth2 client ID: Identifies the client making the request. Client applications may be scoped to a limited set of system access. @param scopes the list of requested scopes. Values include {@link OAuth#Scope_SIGNATURE}, {@link OAuth...
[ "Helper", "method", "to", "configure", "the", "OAuth", "accessCode", "/", "implicit", "flow", "parameters" ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/client/ApiClient.java#L481-L499
Azure/azure-sdk-for-java
kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java
DatabasesInner.addPrincipalsAsync
public Observable<DatabasePrincipalListResultInner> addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, List<DatabasePrincipalInner> value) { """ Add Database principals permissions. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param c...
java
public Observable<DatabasePrincipalListResultInner> addPrincipalsAsync(String resourceGroupName, String clusterName, String databaseName, List<DatabasePrincipalInner> value) { return addPrincipalsWithServiceResponseAsync(resourceGroupName, clusterName, databaseName, value).map(new Func1<ServiceResponse<Database...
[ "public", "Observable", "<", "DatabasePrincipalListResultInner", ">", "addPrincipalsAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "databaseName", ",", "List", "<", "DatabasePrincipalInner", ">", "value", ")", "{", "return", "...
Add Database principals permissions. @param resourceGroupName The name of the resource group containing the Kusto cluster. @param clusterName The name of the Kusto cluster. @param databaseName The name of the database in the Kusto cluster. @param value The list of Kusto database principals. @throws IllegalArgumentExce...
[ "Add", "Database", "principals", "permissions", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/kusto/resource-manager/v2018_09_07_preview/src/main/java/com/microsoft/azure/management/kusto/v2018_09_07_preview/implementation/DatabasesInner.java#L1164-L1171
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java
AuthenticateApi.createSubjectAndPushItOnThreadAsNeeded
private void createSubjectAndPushItOnThreadAsNeeded(HttpServletRequest req, HttpServletResponse res) { """ For formLogout, this is a new request and there is no subject on the thread. A previous request handled on this thread may not be from this same client. We have to authenticate using the token and push the ...
java
private void createSubjectAndPushItOnThreadAsNeeded(HttpServletRequest req, HttpServletResponse res) { // We got a new instance of FormLogoutExtensionProcess every request. logoutSubject = null; Subject subject = subjectManager.getCallerSubject(); if (subject == null || subjectHelper.isU...
[ "private", "void", "createSubjectAndPushItOnThreadAsNeeded", "(", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "{", "// We got a new instance of FormLogoutExtensionProcess every request.", "logoutSubject", "=", "null", ";", "Subject", "subject", "=", "su...
For formLogout, this is a new request and there is no subject on the thread. A previous request handled on this thread may not be from this same client. We have to authenticate using the token and push the subject on thread so webcontainer can use the subject credential to invalidate the session. @param req @param res
[ "For", "formLogout", "this", "is", "a", "new", "request", "and", "there", "is", "no", "subject", "on", "the", "thread", ".", "A", "previous", "request", "handled", "on", "this", "thread", "may", "not", "be", "from", "this", "same", "client", ".", "We", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/AuthenticateApi.java#L534-L551
carewebframework/carewebframework-core
org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpViewerProxy.java
HelpViewerProxy.sendRequest
private void sendRequest(InvocationRequest helpRequest, boolean startRemoteViewer) { """ Sends a request to the remote viewer. @param helpRequest The request to send. @param startRemoteViewer If true and the remote viewer is not running, start it. """ this.helpRequest = helpRequest; ...
java
private void sendRequest(InvocationRequest helpRequest, boolean startRemoteViewer) { this.helpRequest = helpRequest; if (helpRequest != null) { if (remoteViewerActive()) { remoteQueue.sendRequest(helpRequest); this.helpRequest = null; } el...
[ "private", "void", "sendRequest", "(", "InvocationRequest", "helpRequest", ",", "boolean", "startRemoteViewer", ")", "{", "this", ".", "helpRequest", "=", "helpRequest", ";", "if", "(", "helpRequest", "!=", "null", ")", "{", "if", "(", "remoteViewerActive", "(",...
Sends a request to the remote viewer. @param helpRequest The request to send. @param startRemoteViewer If true and the remote viewer is not running, start it.
[ "Sends", "a", "request", "to", "the", "remote", "viewer", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.help-parent/org.carewebframework.help.core/src/main/java/org/carewebframework/help/viewer/HelpViewerProxy.java#L107-L120
davidmoten/rxjava2-extras
src/main/java/com/github/davidmoten/rx2/Strings.java
Strings.splitSimple
@Experimental @Beta public static <T> FlowableTransformer<String, String> splitSimple(final String delimiter) { """ Splits on a string delimiter, not a pattern. Is slower than RxJavaString 1.1.1 implementation on benchmarks below but requests minimally from upstream and is potentially much faster when th...
java
@Experimental @Beta public static <T> FlowableTransformer<String, String> splitSimple(final String delimiter) { return new FlowableTransformer<String, String>() { @Override public Publisher<String> apply(Flowable<String> source) { return new FlowableStringSplitSi...
[ "@", "Experimental", "@", "Beta", "public", "static", "<", "T", ">", "FlowableTransformer", "<", "String", ",", "String", ">", "splitSimple", "(", "final", "String", "delimiter", ")", "{", "return", "new", "FlowableTransformer", "<", "String", ",", "String", ...
Splits on a string delimiter, not a pattern. Is slower than RxJavaString 1.1.1 implementation on benchmarks below but requests minimally from upstream and is potentially much faster when the stream is significantly truncated (for example by downstream {@code .take(), .takeUntil(), elementAt()}. <pre> Benchmark ...
[ "Splits", "on", "a", "string", "delimiter", "not", "a", "pattern", ".", "Is", "slower", "than", "RxJavaString", "1", ".", "1", ".", "1", "implementation", "on", "benchmarks", "below", "but", "requests", "minimally", "from", "upstream", "and", "is", "potentia...
train
https://github.com/davidmoten/rxjava2-extras/blob/bf5ece3f97191f29a81957a6529bc3cfa4d7b328/src/main/java/com/github/davidmoten/rx2/Strings.java#L359-L369
threerings/nenya
core/src/main/java/com/threerings/media/util/BackgroundTiler.java
BackgroundTiler.paint
public void paint (Graphics g, int x, int y, int width, int height) { """ Fills the requested region with the background defined by our source image. """ // bail out now if we were passed a bogus source image at construct time if (_tiles == null) { return; } int rwi...
java
public void paint (Graphics g, int x, int y, int width, int height) { // bail out now if we were passed a bogus source image at construct time if (_tiles == null) { return; } int rwid = width-2*_w3, rhei = height-2*_h3; g.drawImage(_tiles[0], x, y, _w3, _h3, nul...
[ "public", "void", "paint", "(", "Graphics", "g", ",", "int", "x", ",", "int", "y", ",", "int", "width", ",", "int", "height", ")", "{", "// bail out now if we were passed a bogus source image at construct time", "if", "(", "_tiles", "==", "null", ")", "{", "re...
Fills the requested region with the background defined by our source image.
[ "Fills", "the", "requested", "region", "with", "the", "background", "defined", "by", "our", "source", "image", "." ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/media/util/BackgroundTiler.java#L92-L114
NessComputing/service-discovery
jms/src/main/java/com/nesscomputing/jms/activemq/ServiceDiscoveryTransportFactory.java
ServiceDiscoveryTransportFactory.buildTransport
private Transport buildTransport(Map<String, String> params, final List<ServiceInformation> services) throws IOException { """ From a list of ServiceInformation, build a failover transport that balances between the brokers. """ final String configPostfix = getConfig(params).getServiceConfigurationPostf...
java
private Transport buildTransport(Map<String, String> params, final List<ServiceInformation> services) throws IOException { final String configPostfix = getConfig(params).getServiceConfigurationPostfix(); final StringBuilder uriBuilder = new StringBuilder(); uriBuilder.append("failover:("); ...
[ "private", "Transport", "buildTransport", "(", "Map", "<", "String", ",", "String", ">", "params", ",", "final", "List", "<", "ServiceInformation", ">", "services", ")", "throws", "IOException", "{", "final", "String", "configPostfix", "=", "getConfig", "(", "...
From a list of ServiceInformation, build a failover transport that balances between the brokers.
[ "From", "a", "list", "of", "ServiceInformation", "build", "a", "failover", "transport", "that", "balances", "between", "the", "brokers", "." ]
train
https://github.com/NessComputing/service-discovery/blob/5091ffdb1de6b12d216d1c238f72858037c7b765/jms/src/main/java/com/nesscomputing/jms/activemq/ServiceDiscoveryTransportFactory.java#L157-L175
Azure/azure-sdk-for-java
applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/MetricsImpl.java
MetricsImpl.getMultiple
public List<MetricsResultsItem> getMultiple(String appId, List<MetricsPostBodySchema> body) { """ Retrieve metric data. Gets metric values for multiple metrics. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param body The batched metrics qu...
java
public List<MetricsResultsItem> getMultiple(String appId, List<MetricsPostBodySchema> body) { return getMultipleWithServiceResponseAsync(appId, body).toBlocking().single().body(); }
[ "public", "List", "<", "MetricsResultsItem", ">", "getMultiple", "(", "String", "appId", ",", "List", "<", "MetricsPostBodySchema", ">", "body", ")", "{", "return", "getMultipleWithServiceResponseAsync", "(", "appId", ",", "body", ")", ".", "toBlocking", "(", ")...
Retrieve metric data. Gets metric values for multiple metrics. @param appId ID of the application. This is Application ID from the API Access settings blade in the Azure portal. @param body The batched metrics query. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseExcepti...
[ "Retrieve", "metric", "data", ".", "Gets", "metric", "values", "for", "multiple", "metrics", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/data-plane/src/main/java/com/microsoft/azure/applicationinsights/query/implementation/MetricsImpl.java#L292-L294
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDRandom.java
SDRandom.logNormal
public SDVariable logNormal(String name, double mean, double stddev, long... shape) { """ Generate a new random SDVariable, where values are randomly sampled according to a Log Normal distribution, i.e., {@code log(x) ~ N(mean, stdev)}<br> @param name Name of the new SDVariable @param mean Mean value for ...
java
public SDVariable logNormal(String name, double mean, double stddev, long... shape) { SDVariable ret = f().randomLogNormal(mean, stddev, shape); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "logNormal", "(", "String", "name", ",", "double", "mean", ",", "double", "stddev", ",", "long", "...", "shape", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "randomLogNormal", "(", "mean", ",", "stddev", ",", "shape", ...
Generate a new random SDVariable, where values are randomly sampled according to a Log Normal distribution, i.e., {@code log(x) ~ N(mean, stdev)}<br> @param name Name of the new SDVariable @param mean Mean value for the random array @param stddev Standard deviation for the random array @param shape Shape of the n...
[ "Generate", "a", "new", "random", "SDVariable", "where", "values", "are", "randomly", "sampled", "according", "to", "a", "Log", "Normal", "distribution", "i", ".", "e", ".", "{", "@code", "log", "(", "x", ")", "~", "N", "(", "mean", "stdev", ")", "}", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDRandom.java#L141-L144
google/j2objc
jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/FeatureDescriptor.java
FeatureDescriptor.setValue
public void setValue(String attributeName, Object value) { """ <p> Sets the value for the named attribute. </p> @param attributeName The name of the attribute to set a value with. @param value The value to set. """ if (attributeName == null || value == null) { throw new NullPointerE...
java
public void setValue(String attributeName, Object value) { if (attributeName == null || value == null) { throw new NullPointerException(); } values.put(attributeName, value); }
[ "public", "void", "setValue", "(", "String", "attributeName", ",", "Object", "value", ")", "{", "if", "(", "attributeName", "==", "null", "||", "value", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "values", ".", "p...
<p> Sets the value for the named attribute. </p> @param attributeName The name of the attribute to set a value with. @param value The value to set.
[ "<p", ">", "Sets", "the", "value", "for", "the", "named", "attribute", ".", "<", "/", "p", ">" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/apache_harmony/classlib/modules/beans/src/main/java/java/beans/FeatureDescriptor.java#L60-L65
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPaymentPersistenceImpl.java
CommerceOrderPaymentPersistenceImpl.findAll
@Override public List<CommerceOrderPayment> findAll() { """ Returns all the commerce order payments. @return the commerce order payments """ return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceOrderPayment> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceOrderPayment", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce order payments. @return the commerce order payments
[ "Returns", "all", "the", "commerce", "order", "payments", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceOrderPaymentPersistenceImpl.java#L1121-L1124
messagebird/java-rest-api
api/src/main/java/com/messagebird/MessageBirdClient.java
MessageBirdClient.listAllVoiceCalls
public VoiceCallResponseList listAllVoiceCalls(Integer page, Integer pageSize) throws GeneralException, UnauthorizedException { """ Function to list all voice calls @return VoiceCallResponseList @throws UnauthorizedException if client is unauthorized @throws GeneralException general exception """ ...
java
public VoiceCallResponseList listAllVoiceCalls(Integer page, Integer pageSize) throws GeneralException, UnauthorizedException { String url = String.format("%s%s", VOICE_CALLS_BASE_URL, VOICECALLSPATH); return messageBirdService.requestList(url, new PagedPaging(page, pageSize), VoiceCallResponseList.clas...
[ "public", "VoiceCallResponseList", "listAllVoiceCalls", "(", "Integer", "page", ",", "Integer", "pageSize", ")", "throws", "GeneralException", ",", "UnauthorizedException", "{", "String", "url", "=", "String", ".", "format", "(", "\"%s%s\"", ",", "VOICE_CALLS_BASE_URL...
Function to list all voice calls @return VoiceCallResponseList @throws UnauthorizedException if client is unauthorized @throws GeneralException general exception
[ "Function", "to", "list", "all", "voice", "calls" ]
train
https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L935-L938
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/TaskTracker.java
TaskTracker.purgeTask
private void purgeTask(TaskInProgress tip, boolean wasFailure) throws IOException { """ Remove the tip and update all relevant state. @param tip {@link TaskInProgress} to be removed. @param wasFailure did the task fail or was it killed? """ if (tip != null) { LOG.info("About to purge task: " + ...
java
private void purgeTask(TaskInProgress tip, boolean wasFailure) throws IOException { if (tip != null) { LOG.info("About to purge task: " + tip.getTask().getTaskID()); // Remove the task from running jobs, // removing the job if it's the last task removeTaskFromJob(tip.getTask().getJobID(),...
[ "private", "void", "purgeTask", "(", "TaskInProgress", "tip", ",", "boolean", "wasFailure", ")", "throws", "IOException", "{", "if", "(", "tip", "!=", "null", ")", "{", "LOG", ".", "info", "(", "\"About to purge task: \"", "+", "tip", ".", "getTask", "(", ...
Remove the tip and update all relevant state. @param tip {@link TaskInProgress} to be removed. @param wasFailure did the task fail or was it killed?
[ "Remove", "the", "tip", "and", "update", "all", "relevant", "state", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/TaskTracker.java#L2180-L2193
elastic/elasticsearch-hadoop
mr/src/main/java/org/elasticsearch/hadoop/rest/commonshttp/auth/spnego/SpnegoAuthScheme.java
SpnegoAuthScheme.ensureMutualAuth
public void ensureMutualAuth(String returnChallenge) throws AuthenticationException { """ Authenticating requests with SPNEGO means that a request will execute before the client is sure that the server is mutually authenticated. This means that, at best, if mutual auth is requested, the client cannot trust that ...
java
public void ensureMutualAuth(String returnChallenge) throws AuthenticationException { try { processChallenge(returnChallenge); } catch (MalformedChallengeException mce) { throw new AuthenticationException("Received invalid response header for mutual authentication", mce); ...
[ "public", "void", "ensureMutualAuth", "(", "String", "returnChallenge", ")", "throws", "AuthenticationException", "{", "try", "{", "processChallenge", "(", "returnChallenge", ")", ";", "}", "catch", "(", "MalformedChallengeException", "mce", ")", "{", "throw", "new"...
Authenticating requests with SPNEGO means that a request will execute before the client is sure that the server is mutually authenticated. This means that, at best, if mutual auth is requested, the client cannot trust that the server is giving accurate information, or in the case that the client has already sent data, ...
[ "Authenticating", "requests", "with", "SPNEGO", "means", "that", "a", "request", "will", "execute", "before", "the", "client", "is", "sure", "that", "the", "server", "is", "mutually", "authenticated", ".", "This", "means", "that", "at", "best", "if", "mutual",...
train
https://github.com/elastic/elasticsearch-hadoop/blob/f3acaba268ff96efae8eb946088c748c777c22cc/mr/src/main/java/org/elasticsearch/hadoop/rest/commonshttp/auth/spnego/SpnegoAuthScheme.java#L196-L210
ngageoint/geopackage-java
src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java
GeoPackageJavaProperties.getBooleanProperty
public static Boolean getBooleanProperty(String key, boolean required) { """ Get a boolean by key @param key key @param required required flag @return property value """ Boolean value = null; String stringValue = getProperty(key, required); if (stringValue != null) { value = Boolean.valueOf(str...
java
public static Boolean getBooleanProperty(String key, boolean required) { Boolean value = null; String stringValue = getProperty(key, required); if (stringValue != null) { value = Boolean.valueOf(stringValue); } return value; }
[ "public", "static", "Boolean", "getBooleanProperty", "(", "String", "key", ",", "boolean", "required", ")", "{", "Boolean", "value", "=", "null", ";", "String", "stringValue", "=", "getProperty", "(", "key", ",", "required", ")", ";", "if", "(", "stringValue...
Get a boolean by key @param key key @param required required flag @return property value
[ "Get", "a", "boolean", "by", "key" ]
train
https://github.com/ngageoint/geopackage-java/blob/889bffb5d18330a3f4bd89443acf7959ebe3a376/src/main/java/mil/nga/geopackage/property/GeoPackageJavaProperties.java#L228-L235
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/xml/pom/PomProjectInputStream.java
PomProjectInputStream.findSequence
protected static int findSequence(byte[] sequence, byte[] buffer) { """ Finds the start of the given sequence in the buffer. If not found, -1 is returned. @param sequence the sequence to locate @param buffer the buffer to search @return the starting position of the sequence in the buffer if found; otherwise...
java
protected static int findSequence(byte[] sequence, byte[] buffer) { int pos = -1; for (int i = 0; i < buffer.length - sequence.length + 1; i++) { if (buffer[i] == sequence[0] && testRemaining(sequence, buffer, i)) { pos = i; break; } } ...
[ "protected", "static", "int", "findSequence", "(", "byte", "[", "]", "sequence", ",", "byte", "[", "]", "buffer", ")", "{", "int", "pos", "=", "-", "1", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "buffer", ".", "length", "-", "sequence...
Finds the start of the given sequence in the buffer. If not found, -1 is returned. @param sequence the sequence to locate @param buffer the buffer to search @return the starting position of the sequence in the buffer if found; otherwise -1
[ "Finds", "the", "start", "of", "the", "given", "sequence", "in", "the", "buffer", ".", "If", "not", "found", "-", "1", "is", "returned", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/xml/pom/PomProjectInputStream.java#L114-L123
intuit/QuickBooks-V3-Java-SDK
ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HTTPBatchClientConnectionInterceptor.java
HTTPBatchClientConnectionInterceptor.authorizeRequest
private void authorizeRequest(Context context, HttpRequestBase httpRequest) throws FMSException { """ Method to authorize the given HttpRequest @param context the context @param httpRequest the http request @throws com.intuit.ipp.exception.FMSException the FMSException """ context.getAuthorizer()....
java
private void authorizeRequest(Context context, HttpRequestBase httpRequest) throws FMSException { context.getAuthorizer().authorize(httpRequest); }
[ "private", "void", "authorizeRequest", "(", "Context", "context", ",", "HttpRequestBase", "httpRequest", ")", "throws", "FMSException", "{", "context", ".", "getAuthorizer", "(", ")", ".", "authorize", "(", "httpRequest", ")", ";", "}" ]
Method to authorize the given HttpRequest @param context the context @param httpRequest the http request @throws com.intuit.ipp.exception.FMSException the FMSException
[ "Method", "to", "authorize", "the", "given", "HttpRequest" ]
train
https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HTTPBatchClientConnectionInterceptor.java#L369-L371
pinterest/secor
src/main/java/com/pinterest/secor/util/FileUtil.java
FileUtil.getMd5Hash
public static String getMd5Hash(String topic, String[] partitions) { """ Generate MD5 hash of topic and partitions. And extract first 4 characters of the MD5 hash. @param topic topic name @param partitions partitions @return md5 hash """ ArrayList<String> elements = new ArrayList<String>(); elem...
java
public static String getMd5Hash(String topic, String[] partitions) { ArrayList<String> elements = new ArrayList<String>(); elements.add(topic); for (String partition : partitions) { elements.add(partition); } String pathPrefix = StringUtils.join(elements, "/"); try { ...
[ "public", "static", "String", "getMd5Hash", "(", "String", "topic", ",", "String", "[", "]", "partitions", ")", "{", "ArrayList", "<", "String", ">", "elements", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "elements", ".", "add", "(", "...
Generate MD5 hash of topic and partitions. And extract first 4 characters of the MD5 hash. @param topic topic name @param partitions partitions @return md5 hash
[ "Generate", "MD5", "hash", "of", "topic", "and", "partitions", ".", "And", "extract", "first", "4", "characters", "of", "the", "MD5", "hash", "." ]
train
https://github.com/pinterest/secor/blob/4099ff061db392f11044e57dedf46c1617895278/src/main/java/com/pinterest/secor/util/FileUtil.java#L248-L265
lessthanoptimal/BoofCV
main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java
PolylineSplitMerge.isConvexUsingMaxDistantPoints
static boolean isConvexUsingMaxDistantPoints(List<Point2D_I32> contour , int indexA , int indexB ) { """ If point B is the point farthest away from A then by definition this means no other point can be farther away.If the shape is convex then the line integration from A to B or B to A cannot be greater than 1/2 ...
java
static boolean isConvexUsingMaxDistantPoints(List<Point2D_I32> contour , int indexA , int indexB ) { double d = Math.sqrt(distanceSq(contour.get(indexA),contour.get(indexB))); // conservative upper bounds would be 1/2 a circle, including interior side. int maxAllowed = (int)((Math.PI+1)*d+0.5); int length0 =...
[ "static", "boolean", "isConvexUsingMaxDistantPoints", "(", "List", "<", "Point2D_I32", ">", "contour", ",", "int", "indexA", ",", "int", "indexB", ")", "{", "double", "d", "=", "Math", ".", "sqrt", "(", "distanceSq", "(", "contour", ".", "get", "(", "index...
If point B is the point farthest away from A then by definition this means no other point can be farther away.If the shape is convex then the line integration from A to B or B to A cannot be greater than 1/2 a circle. This test makes sure that the line integral meets the just described constraint and is thus convex. N...
[ "If", "point", "B", "is", "the", "point", "farthest", "away", "from", "A", "then", "by", "definition", "this", "means", "no", "other", "point", "can", "be", "farther", "away", ".", "If", "the", "shape", "is", "convex", "then", "the", "line", "integration...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-feature/src/main/java/boofcv/alg/shapes/polyline/splitmerge/PolylineSplitMerge.java#L775-L786
pac4j/pac4j
pac4j-core/src/main/java/org/pac4j/core/engine/DefaultSecurityLogic.java
DefaultSecurityLogic.startAuthentication
protected boolean startAuthentication(final C context, final List<Client> currentClients) { """ Return whether we must start a login process if the first client is an indirect one. @param context the web context @param currentClients the current clients @return whether we must start a login process """ ...
java
protected boolean startAuthentication(final C context, final List<Client> currentClients) { return isNotEmpty(currentClients) && currentClients.get(0) instanceof IndirectClient; }
[ "protected", "boolean", "startAuthentication", "(", "final", "C", "context", ",", "final", "List", "<", "Client", ">", "currentClients", ")", "{", "return", "isNotEmpty", "(", "currentClients", ")", "&&", "currentClients", ".", "get", "(", "0", ")", "instanceo...
Return whether we must start a login process if the first client is an indirect one. @param context the web context @param currentClients the current clients @return whether we must start a login process
[ "Return", "whether", "we", "must", "start", "a", "login", "process", "if", "the", "first", "client", "is", "an", "indirect", "one", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-core/src/main/java/org/pac4j/core/engine/DefaultSecurityLogic.java#L194-L196
Azure/azure-sdk-for-java
notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java
NamespacesInner.createOrUpdateAsync
public Observable<NamespaceResourceInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { """ Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. @param resourceGroup...
java
public Observable<NamespaceResourceInner> createOrUpdateAsync(String resourceGroupName, String namespaceName, NamespaceCreateOrUpdateParameters parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1<ServiceResponse<NamespaceResourceInner>, Namespa...
[ "public", "Observable", "<", "NamespaceResourceInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "namespaceName", ",", "NamespaceCreateOrUpdateParameters", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "r...
Creates/Updates a service namespace. Once created, this namespace's resource manifest is immutable. This operation is idempotent. @param resourceGroupName The name of the resource group. @param namespaceName The namespace name. @param parameters Parameters supplied to create a Namespace Resource. @throws IllegalArgume...
[ "Creates", "/", "Updates", "a", "service", "namespace", ".", "Once", "created", "this", "namespace", "s", "resource", "manifest", "is", "immutable", ".", "This", "operation", "is", "idempotent", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/notificationhubs/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/notificationhubs/v2016_03_01/implementation/NamespacesInner.java#L262-L269
line/armeria
core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFileBuilder.java
AbstractHttpFileBuilder.entityTag
public final B entityTag(BiFunction<String, HttpFileAttributes, String> entityTagFunction) { """ Sets the function which generates the entity tag that's used for setting the {@code "etag"} header automatically. @param entityTagFunction the entity tag function that generates the entity tag, or {@code null} to ...
java
public final B entityTag(BiFunction<String, HttpFileAttributes, String> entityTagFunction) { this.entityTagFunction = requireNonNull(entityTagFunction, "entityTagFunction"); return self(); }
[ "public", "final", "B", "entityTag", "(", "BiFunction", "<", "String", ",", "HttpFileAttributes", ",", "String", ">", "entityTagFunction", ")", "{", "this", ".", "entityTagFunction", "=", "requireNonNull", "(", "entityTagFunction", ",", "\"entityTagFunction\"", ")",...
Sets the function which generates the entity tag that's used for setting the {@code "etag"} header automatically. @param entityTagFunction the entity tag function that generates the entity tag, or {@code null} to disable setting the {@code "etag"} header.
[ "Sets", "the", "function", "which", "generates", "the", "entity", "tag", "that", "s", "used", "for", "setting", "the", "{", "@code", "etag", "}", "header", "automatically", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/file/AbstractHttpFileBuilder.java#L153-L156
mucaho/jnetrobust
jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/Logger.java
Logger.getConsoleLogger
public static Logger getConsoleLogger(final String name) { """ Retrieve a simple logger which logs events to the {@link java.lang.System#out System.out} stream. @param name the name of the protocol instance @return a new console <code>Logger</code> """ return new Logger() { @Override ...
java
public static Logger getConsoleLogger(final String name) { return new Logger() { @Override public void log(String description, Object... params) { System.out.print("[" + name + "]: " + description + "\t"); for (Object param: params) Sys...
[ "public", "static", "Logger", "getConsoleLogger", "(", "final", "String", "name", ")", "{", "return", "new", "Logger", "(", ")", "{", "@", "Override", "public", "void", "log", "(", "String", "description", ",", "Object", "...", "params", ")", "{", "System"...
Retrieve a simple logger which logs events to the {@link java.lang.System#out System.out} stream. @param name the name of the protocol instance @return a new console <code>Logger</code>
[ "Retrieve", "a", "simple", "logger", "which", "logs", "events", "to", "the", "{" ]
train
https://github.com/mucaho/jnetrobust/blob/b82150eb2a4371dae9e4f40814cb8f538917c0fb/jnetrobust-core/src/main/java/com/github/mucaho/jnetrobust/Logger.java#L50-L60
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/StringFixture.java
StringFixture.extractIntFromUsingGroup
public Integer extractIntFromUsingGroup(String value, String regEx, int groupIndex) { """ Extracts a whole number for a string using a regular expression. @param value input string. @param regEx regular expression to match against value. @param groupIndex index of group in regular expression containing the numb...
java
public Integer extractIntFromUsingGroup(String value, String regEx, int groupIndex) { Integer result = null; if (value != null) { Matcher matcher = getMatcher(regEx, value); if (matcher.matches()) { String intStr = matcher.group(groupIndex); result...
[ "public", "Integer", "extractIntFromUsingGroup", "(", "String", "value", ",", "String", "regEx", ",", "int", "groupIndex", ")", "{", "Integer", "result", "=", "null", ";", "if", "(", "value", "!=", "null", ")", "{", "Matcher", "matcher", "=", "getMatcher", ...
Extracts a whole number for a string using a regular expression. @param value input string. @param regEx regular expression to match against value. @param groupIndex index of group in regular expression containing the number. @return extracted number.
[ "Extracts", "a", "whole", "number", "for", "a", "string", "using", "a", "regular", "expression", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/StringFixture.java#L185-L195
yavijava/yavijava
src/main/java/com/vmware/vim25/mo/AlarmManager.java
AlarmManager.acknowledgeAlarm
public void acknowledgeAlarm(Alarm alarm, ManagedEntity entity) throws RuntimeFault, RemoteException { """ Acknowledge the alarm for a managed entity. @param alarm The {@link Alarm} to acknowledge. @param entity The {@link ManagedEntity} which the alarm applies to. @throws RuntimeFault if any unhandled run...
java
public void acknowledgeAlarm(Alarm alarm, ManagedEntity entity) throws RuntimeFault, RemoteException { getVimService().acknowledgeAlarm(getMOR(), alarm.getMOR(), entity.getMOR()); }
[ "public", "void", "acknowledgeAlarm", "(", "Alarm", "alarm", ",", "ManagedEntity", "entity", ")", "throws", "RuntimeFault", ",", "RemoteException", "{", "getVimService", "(", ")", ".", "acknowledgeAlarm", "(", "getMOR", "(", ")", ",", "alarm", ".", "getMOR", "...
Acknowledge the alarm for a managed entity. @param alarm The {@link Alarm} to acknowledge. @param entity The {@link ManagedEntity} which the alarm applies to. @throws RuntimeFault if any unhandled runtime fault occurs @throws RemoteException @since 4.0
[ "Acknowledge", "the", "alarm", "for", "a", "managed", "entity", "." ]
train
https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/AlarmManager.java#L75-L77
wildfly/wildfly-core
patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java
IdentityPatchContext.recordContentLoader
protected void recordContentLoader(final String patchID, final PatchContentLoader contentLoader) { """ Record a content loader for a given patch id. @param patchID the patch id @param contentLoader the content loader """ if (contentLoaders.containsKey(patchID)) { throw new Illegal...
java
protected void recordContentLoader(final String patchID, final PatchContentLoader contentLoader) { if (contentLoaders.containsKey(patchID)) { throw new IllegalStateException("Content loader already registered for patch " + patchID); // internal wrong usage, no i18n } contentLoaders.p...
[ "protected", "void", "recordContentLoader", "(", "final", "String", "patchID", ",", "final", "PatchContentLoader", "contentLoader", ")", "{", "if", "(", "contentLoaders", ".", "containsKey", "(", "patchID", ")", ")", "{", "throw", "new", "IllegalStateException", "...
Record a content loader for a given patch id. @param patchID the patch id @param contentLoader the content loader
[ "Record", "a", "content", "loader", "for", "a", "given", "patch", "id", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/patching/src/main/java/org/jboss/as/patching/runner/IdentityPatchContext.java#L533-L538
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java
CommerceDiscountPersistenceImpl.findByGroupId
@Override public List<CommerceDiscount> findByGroupId(long groupId) { """ Returns all the commerce discounts where groupId = &#63;. @param groupId the group ID @return the matching commerce discounts """ return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceDiscount> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscount", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce discounts where groupId = &#63;. @param groupId the group ID @return the matching commerce discounts
[ "Returns", "all", "the", "commerce", "discounts", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountPersistenceImpl.java#L1518-L1521
logic-ng/LogicNG
src/main/java/org/logicng/solvers/MiniSat.java
MiniSat.miniSat
public static MiniSat miniSat(final FormulaFactory f, final MiniSatConfig config) { """ Returns a new MiniSat solver with a given configuration. @param f the formula factory @param config the configuration @return the solver """ return new MiniSat(f, SolverStyle.MINISAT, config, null); }
java
public static MiniSat miniSat(final FormulaFactory f, final MiniSatConfig config) { return new MiniSat(f, SolverStyle.MINISAT, config, null); }
[ "public", "static", "MiniSat", "miniSat", "(", "final", "FormulaFactory", "f", ",", "final", "MiniSatConfig", "config", ")", "{", "return", "new", "MiniSat", "(", "f", ",", "SolverStyle", ".", "MINISAT", ",", "config", ",", "null", ")", ";", "}" ]
Returns a new MiniSat solver with a given configuration. @param f the formula factory @param config the configuration @return the solver
[ "Returns", "a", "new", "MiniSat", "solver", "with", "a", "given", "configuration", "." ]
train
https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/MiniSat.java#L141-L143
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/Jassimp.java
Jassimp.wrapColor4
static Object wrapColor4(float red, float green, float blue, float alpha) { """ Helper method for wrapping a color (rgba).<p> Used by JNI, do not modify! @param red red component @param green green component @param blue blue component @param alpha alpha component @return the wrapped color """ ...
java
static Object wrapColor4(float red, float green, float blue, float alpha) { ByteBuffer temp = ByteBuffer.allocate(4 * 4); temp.putFloat(red); temp.putFloat(green); temp.putFloat(blue); temp.putFloat(alpha); temp.flip(); return s_wrapperProvider.wrapColor(temp, 0);...
[ "static", "Object", "wrapColor4", "(", "float", "red", ",", "float", "green", ",", "float", "blue", ",", "float", "alpha", ")", "{", "ByteBuffer", "temp", "=", "ByteBuffer", ".", "allocate", "(", "4", "*", "4", ")", ";", "temp", ".", "putFloat", "(", ...
Helper method for wrapping a color (rgba).<p> Used by JNI, do not modify! @param red red component @param green green component @param blue blue component @param alpha alpha component @return the wrapped color
[ "Helper", "method", "for", "wrapping", "a", "color", "(", "rgba", ")", ".", "<p", ">" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/Jassimp.java#L249-L257
googleads/googleads-java-lib
examples/admanager_axis/src/main/java/admanager/axis/v201902/cmsmetadataservice/GetAllCmsMetadataKeys.java
GetAllCmsMetadataKeys.runExample
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { """ Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws ...
java
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the CmsMetadataService. CmsMetadataServiceInterface cmsMetadataService = adManagerServices.get(session, CmsMetadataServiceInterface.class); // Create a statement to sel...
[ "public", "static", "void", "runExample", "(", "AdManagerServices", "adManagerServices", ",", "AdManagerSession", "session", ")", "throws", "RemoteException", "{", "// Get the CmsMetadataService.", "CmsMetadataServiceInterface", "cmsMetadataService", "=", "adManagerServices", "...
Runs the example. @param adManagerServices the services factory. @param session the session. @throws ApiException if the API request failed with one or more service errors. @throws RemoteException if the API request failed due to other errors.
[ "Runs", "the", "example", "." ]
train
https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201902/cmsmetadataservice/GetAllCmsMetadataKeys.java#L51-L83
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDialogRenderer.java
WDialogRenderer.doRender
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { """ Paints the given WDialog. @param component the WDialog to paint. @param renderContext the RenderContext to paint to. """ WDialog dialog = (WDialog) component; int state = dialog.getState(); if ...
java
@Override public void doRender(final WComponent component, final WebXmlRenderContext renderContext) { WDialog dialog = (WDialog) component; int state = dialog.getState(); if (state == WDialog.ACTIVE_STATE || dialog.getTrigger() != null) { int width = dialog.getWidth(); int height = dialog.getHeight(); ...
[ "@", "Override", "public", "void", "doRender", "(", "final", "WComponent", "component", ",", "final", "WebXmlRenderContext", "renderContext", ")", "{", "WDialog", "dialog", "=", "(", "WDialog", ")", "component", ";", "int", "state", "=", "dialog", ".", "getSta...
Paints the given WDialog. @param component the WDialog to paint. @param renderContext the RenderContext to paint to.
[ "Paints", "the", "given", "WDialog", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/render/webxml/WDialogRenderer.java#L24-L59