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 |
|---|---|---|---|---|---|---|---|---|---|---|
Axway/Grapes | server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java | OrganizationResource.postOrganization | @POST
public Response postOrganization(@Auth final DbCredential credential, final Organization organization) {
"""
Handle organization posts when the server got a request POST <dm_url>/organization & MIME that contains an organization.
@param organization The organization to add to Grapes database
@return ... | java | @POST
public Response postOrganization(@Auth final DbCredential credential, final Organization organization){
if(!credential.getRoles().contains(DbCredential.AvailableRoles.DATA_UPDATER)){
throw new WebApplicationException(Response.status(Response.Status.UNAUTHORIZED).build());
}
... | [
"@",
"POST",
"public",
"Response",
"postOrganization",
"(",
"@",
"Auth",
"final",
"DbCredential",
"credential",
",",
"final",
"Organization",
"organization",
")",
"{",
"if",
"(",
"!",
"credential",
".",
"getRoles",
"(",
")",
".",
"contains",
"(",
"DbCredential... | Handle organization posts when the server got a request POST <dm_url>/organization & MIME that contains an organization.
@param organization The organization to add to Grapes database
@return Response An acknowledgment:<br/>- 400 if the artifact is MIME is malformed<br/>- 500 if internal error<br/>- 201 if ok | [
"Handle",
"organization",
"posts",
"when",
"the",
"server",
"got",
"a",
"request",
"POST",
"<dm_url",
">",
"/",
"organization",
"&",
"MIME",
"that",
"contains",
"an",
"organization",
"."
] | train | https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java#L46-L61 |
ManfredTremmel/gwt-commons-lang3 | src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java | TypeUtils.determineTypeArguments | public static Map<TypeVariable<?>, Type> determineTypeArguments(final Class<?> cls,
final ParameterizedType superType) {
"""
<p>Tries to determine the type arguments of a class/interface based on a
super parameterized type's type arguments. This method is the inverse of
{@link #getTypeArguments(Type,... | java | public static Map<TypeVariable<?>, Type> determineTypeArguments(final Class<?> cls,
final ParameterizedType superType) {
Validate.notNull(cls, "cls is null");
Validate.notNull(superType, "superType is null");
final Class<?> superClass = getRawType(superType);
// compatibili... | [
"public",
"static",
"Map",
"<",
"TypeVariable",
"<",
"?",
">",
",",
"Type",
">",
"determineTypeArguments",
"(",
"final",
"Class",
"<",
"?",
">",
"cls",
",",
"final",
"ParameterizedType",
"superType",
")",
"{",
"Validate",
".",
"notNull",
"(",
"cls",
",",
... | <p>Tries to determine the type arguments of a class/interface based on a
super parameterized type's type arguments. This method is the inverse of
{@link #getTypeArguments(Type, Class)} which gets a class/interface's
type arguments based on a subtype. It is far more limited in determining
the type arguments for the subj... | [
"<p",
">",
"Tries",
"to",
"determine",
"the",
"type",
"arguments",
"of",
"a",
"class",
"/",
"interface",
"based",
"on",
"a",
"super",
"parameterized",
"type",
"s",
"type",
"arguments",
".",
"This",
"method",
"is",
"the",
"inverse",
"of",
"{",
"@link",
"#... | train | https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/reflect/TypeUtils.java#L963-L996 |
tractionsoftware/gwt-traction | src/main/java/com/tractionsoftware/gwt/user/client/util/RgbaColor.java | RgbaColor.fromHex | public static RgbaColor fromHex(String hex) {
"""
Parses an RgbaColor from a hexadecimal value.
@return returns the parsed color
"""
if (hex.length() == 0 || hex.charAt(0) != '#') return getDefaultColor();
// #rgb
if (hex.length() == 4) {
return new RgbaColor(parseHex(h... | java | public static RgbaColor fromHex(String hex) {
if (hex.length() == 0 || hex.charAt(0) != '#') return getDefaultColor();
// #rgb
if (hex.length() == 4) {
return new RgbaColor(parseHex(hex, 1, 2),
parseHex(hex, 2, 3),
p... | [
"public",
"static",
"RgbaColor",
"fromHex",
"(",
"String",
"hex",
")",
"{",
"if",
"(",
"hex",
".",
"length",
"(",
")",
"==",
"0",
"||",
"hex",
".",
"charAt",
"(",
"0",
")",
"!=",
"'",
"'",
")",
"return",
"getDefaultColor",
"(",
")",
";",
"// #rgb",... | Parses an RgbaColor from a hexadecimal value.
@return returns the parsed color | [
"Parses",
"an",
"RgbaColor",
"from",
"a",
"hexadecimal",
"value",
"."
] | train | https://github.com/tractionsoftware/gwt-traction/blob/efc1423c619439763fb064b777b7235e9ce414a3/src/main/java/com/tractionsoftware/gwt/user/client/util/RgbaColor.java#L107-L129 |
goldmansachs/gs-collections | collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java | StringIterate.occurrencesOf | public static int occurrencesOf(String string, String singleCharacter) {
"""
Count the number of occurrences of the specified {@code string}.
"""
if (singleCharacter.length() != 1)
{
throw new IllegalArgumentException("Argument should be a single character: " + singleCharacter);
... | java | public static int occurrencesOf(String string, String singleCharacter)
{
if (singleCharacter.length() != 1)
{
throw new IllegalArgumentException("Argument should be a single character: " + singleCharacter);
}
return StringIterate.occurrencesOfChar(string, singleCharacter.... | [
"public",
"static",
"int",
"occurrencesOf",
"(",
"String",
"string",
",",
"String",
"singleCharacter",
")",
"{",
"if",
"(",
"singleCharacter",
".",
"length",
"(",
")",
"!=",
"1",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Argument should be a ... | Count the number of occurrences of the specified {@code string}. | [
"Count",
"the",
"number",
"of",
"occurrences",
"of",
"the",
"specified",
"{"
] | train | https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/StringIterate.java#L777-L784 |
antopen/alipay-sdk-java | src/main/java/com/alipay/api/internal/util/AlipaySignature.java | AlipaySignature.checkSignAndDecrypt | public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey,
String cusPrivateKey, boolean isCheckSign,
boolean isDecrypt) throws AlipayApiException {
"""
验签并解密
<p>
<b>目前适用于公众号</b><br>
param... | java | public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey,
String cusPrivateKey, boolean isCheckSign,
boolean isDecrypt) throws AlipayApiException {
String charset = params.get("charset");... | [
"public",
"static",
"String",
"checkSignAndDecrypt",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"params",
",",
"String",
"alipayPublicKey",
",",
"String",
"cusPrivateKey",
",",
"boolean",
"isCheckSign",
",",
"boolean",
"isDecrypt",
")",
"throws",
"AlipayApiExc... | 验签并解密
<p>
<b>目前适用于公众号</b><br>
params参数示例:
<br>{
<br>biz_content=M0qGiGz+8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic/MIUjvXo2BLB++BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt16/IkB9HzAccEqKmRHrZJ7PjQWE0KfvDAHsJqFIeMvEYk1Zei2QkwSQPlso7K0oheo/iT+HYE8aTATnkqD/ByD9iNDtGg38pCa2xnnns63abKsKoV8h0DfHWgPH62urGY7Pye3r9FCOXA2Ykm8X4/Bl... | [
"验签并解密",
"<p",
">",
"<b",
">",
"目前适用于公众号<",
"/",
"b",
">",
"<br",
">",
"params参数示例:",
"<br",
">",
"{",
"<br",
">",
"biz_content",
"=",
"M0qGiGz",
"+",
"8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic",
"/",
"MIUjvXo2BLB",
"++",
"BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt1... | train | https://github.com/antopen/alipay-sdk-java/blob/e82aeac7d0239330ee173c7e393596e51e41c1cd/src/main/java/com/alipay/api/internal/util/AlipaySignature.java#L378-L394 |
irmen/Pyrolite | java/src/main/java/net/razorvine/pickle/PickleUtils.java | PickleUtils.readbytes_into | public static void readbytes_into(InputStream input, byte[] buffer, int offset, int length) throws IOException {
"""
read a number of signed bytes into the specified location in an existing byte array
"""
while (length > 0) {
int read = input.read(buffer, offset, length);
if (read == -1)
throw ... | java | public static void readbytes_into(InputStream input, byte[] buffer, int offset, int length) throws IOException {
while (length > 0) {
int read = input.read(buffer, offset, length);
if (read == -1)
throw new IOException("expected more bytes in input stream");
offset += read;
length -= read;
}
... | [
"public",
"static",
"void",
"readbytes_into",
"(",
"InputStream",
"input",
",",
"byte",
"[",
"]",
"buffer",
",",
"int",
"offset",
",",
"int",
"length",
")",
"throws",
"IOException",
"{",
"while",
"(",
"length",
">",
"0",
")",
"{",
"int",
"read",
"=",
"... | read a number of signed bytes into the specified location in an existing byte array | [
"read",
"a",
"number",
"of",
"signed",
"bytes",
"into",
"the",
"specified",
"location",
"in",
"an",
"existing",
"byte",
"array"
] | train | https://github.com/irmen/Pyrolite/blob/060bc3c9069cd31560b6da4f67280736fb2cdf63/java/src/main/java/net/razorvine/pickle/PickleUtils.java#L71-L79 |
jbundle/jbundle | thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java | FieldInfo.setTextByReflection | public void setTextByReflection(Object obj, String text) {
"""
Lame method, since awt, swing, and android components all have setText methods.
@param obj
@param text
"""
try {
java.lang.reflect.Method method = obj.getClass().getMethod("setText", String.class);
if ... | java | public void setTextByReflection(Object obj, String text)
{
try {
java.lang.reflect.Method method = obj.getClass().getMethod("setText", String.class);
if (method != null)
method.invoke(obj, text);
} catch (Exception e) {
e.printStackTra... | [
"public",
"void",
"setTextByReflection",
"(",
"Object",
"obj",
",",
"String",
"text",
")",
"{",
"try",
"{",
"java",
".",
"lang",
".",
"reflect",
".",
"Method",
"method",
"=",
"obj",
".",
"getClass",
"(",
")",
".",
"getMethod",
"(",
"\"setText\"",
",",
... | Lame method, since awt, swing, and android components all have setText methods.
@param obj
@param text | [
"Lame",
"method",
"since",
"awt",
"swing",
"and",
"android",
"components",
"all",
"have",
"setText",
"methods",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/FieldInfo.java#L316-L326 |
lessthanoptimal/ddogleg | src/org/ddogleg/nn/alg/KdTreeConstructor.java | KdTreeConstructor.computeChild | protected KdTree.Node computeChild(List<P> points , GrowQueue_I32 indexes ) {
"""
Creates a child by checking to see if it is a leaf or branch.
"""
if( points.size() == 0 )
return null;
if( points.size() == 1 ) {
return createLeaf(points,indexes);
} else {
return computeBranch(points,indexes);
... | java | protected KdTree.Node computeChild(List<P> points , GrowQueue_I32 indexes )
{
if( points.size() == 0 )
return null;
if( points.size() == 1 ) {
return createLeaf(points,indexes);
} else {
return computeBranch(points,indexes);
}
} | [
"protected",
"KdTree",
".",
"Node",
"computeChild",
"(",
"List",
"<",
"P",
">",
"points",
",",
"GrowQueue_I32",
"indexes",
")",
"{",
"if",
"(",
"points",
".",
"size",
"(",
")",
"==",
"0",
")",
"return",
"null",
";",
"if",
"(",
"points",
".",
"size",
... | Creates a child by checking to see if it is a leaf or branch. | [
"Creates",
"a",
"child",
"by",
"checking",
"to",
"see",
"if",
"it",
"is",
"a",
"leaf",
"or",
"branch",
"."
] | train | https://github.com/lessthanoptimal/ddogleg/blob/3786bf448ba23d0e04962dd08c34fa68de276029/src/org/ddogleg/nn/alg/KdTreeConstructor.java#L135-L144 |
samskivert/samskivert | src/main/java/com/samskivert/util/CollectionUtil.java | CollectionUtil.minList | public static <T extends Comparable<? super T>> List<T> minList (Iterable<T> iterable) {
"""
Return a List containing all the elements of the specified Iterable that compare as being
equal to the minimum element.
@throws NoSuchElementException if the Iterable is empty.
"""
return maxList(iterable, ... | java | public static <T extends Comparable<? super T>> List<T> minList (Iterable<T> iterable)
{
return maxList(iterable, java.util.Collections.reverseOrder());
} | [
"public",
"static",
"<",
"T",
"extends",
"Comparable",
"<",
"?",
"super",
"T",
">",
">",
"List",
"<",
"T",
">",
"minList",
"(",
"Iterable",
"<",
"T",
">",
"iterable",
")",
"{",
"return",
"maxList",
"(",
"iterable",
",",
"java",
".",
"util",
".",
"C... | Return a List containing all the elements of the specified Iterable that compare as being
equal to the minimum element.
@throws NoSuchElementException if the Iterable is empty. | [
"Return",
"a",
"List",
"containing",
"all",
"the",
"elements",
"of",
"the",
"specified",
"Iterable",
"that",
"compare",
"as",
"being",
"equal",
"to",
"the",
"minimum",
"element",
"."
] | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/CollectionUtil.java#L174-L177 |
alkacon/opencms-core | src/org/opencms/site/xmlsitemap/CmsXmlSitemapGenerator.java | CmsXmlSitemapGenerator.addResult | protected void addResult(CmsXmlSitemapUrlBean result, int resultPriority) {
"""
Adds an URL bean to the internal map of results, but only if there is no existing entry with higher internal priority
than the priority given as an argument.<p>
@param result the result URL bean to add
@param resultPriority the ... | java | protected void addResult(CmsXmlSitemapUrlBean result, int resultPriority) {
String url = CmsFileUtil.removeTrailingSeparator(result.getUrl());
boolean writeEntry = true;
if (m_resultMap.containsKey(url)) {
LOG.warn("Encountered duplicate URL with while generating sitemap: " + r... | [
"protected",
"void",
"addResult",
"(",
"CmsXmlSitemapUrlBean",
"result",
",",
"int",
"resultPriority",
")",
"{",
"String",
"url",
"=",
"CmsFileUtil",
".",
"removeTrailingSeparator",
"(",
"result",
".",
"getUrl",
"(",
")",
")",
";",
"boolean",
"writeEntry",
"=",
... | Adds an URL bean to the internal map of results, but only if there is no existing entry with higher internal priority
than the priority given as an argument.<p>
@param result the result URL bean to add
@param resultPriority the internal priority to use for updating the map of results | [
"Adds",
"an",
"URL",
"bean",
"to",
"the",
"internal",
"map",
"of",
"results",
"but",
"only",
"if",
"there",
"is",
"no",
"existing",
"entry",
"with",
"higher",
"internal",
"priority",
"than",
"the",
"priority",
"given",
"as",
"an",
"argument",
".",
"<p",
... | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/site/xmlsitemap/CmsXmlSitemapGenerator.java#L434-L446 |
Jasig/uPortal | uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java | PortletExecutionStatisticsController.getColumnDescriptions | @Override
protected List<ColumnDescription> getColumnDescriptions(
PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
"""
Create column descriptions for the portlet report using the configured report labelling
strategy.
@param repo... | java | @Override
protected List<ColumnDescription> getColumnDescriptions(
PortletExecutionAggregationDiscriminator reportColumnDiscriminator,
PortletExecutionReportForm form) {
int groupSize = form.getGroups().size();
int portletSize = form.getPortlets().size();
int executio... | [
"@",
"Override",
"protected",
"List",
"<",
"ColumnDescription",
">",
"getColumnDescriptions",
"(",
"PortletExecutionAggregationDiscriminator",
"reportColumnDiscriminator",
",",
"PortletExecutionReportForm",
"form",
")",
"{",
"int",
"groupSize",
"=",
"form",
".",
"getGroups"... | Create column descriptions for the portlet report using the configured report labelling
strategy.
@param reportColumnDiscriminator
@param form The original query form
@return | [
"Create",
"column",
"descriptions",
"for",
"the",
"portlet",
"report",
"using",
"the",
"configured",
"report",
"labelling",
"strategy",
"."
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-portlets/src/main/java/org/apereo/portal/portlets/statistics/PortletExecutionStatisticsController.java#L274-L295 |
JodaOrg/joda-time | src/main/java/org/joda/time/LocalDate.java | LocalDate.toDateTimeAtStartOfDay | public DateTime toDateTimeAtStartOfDay(DateTimeZone zone) {
"""
Converts this LocalDate to a full datetime at the earliest valid time
for the date using the specified time zone.
<p>
The time will normally be midnight, as that is the earliest time on
any given day. However, in some time zones when Daylight Savi... | java | public DateTime toDateTimeAtStartOfDay(DateTimeZone zone) {
zone = DateTimeUtils.getZone(zone);
Chronology chrono = getChronology().withZone(zone);
long localMillis = getLocalMillis() + 6L * DateTimeConstants.MILLIS_PER_HOUR;
long instant = zone.convertLocalToUTC(localMillis, false);
... | [
"public",
"DateTime",
"toDateTimeAtStartOfDay",
"(",
"DateTimeZone",
"zone",
")",
"{",
"zone",
"=",
"DateTimeUtils",
".",
"getZone",
"(",
"zone",
")",
";",
"Chronology",
"chrono",
"=",
"getChronology",
"(",
")",
".",
"withZone",
"(",
"zone",
")",
";",
"long"... | Converts this LocalDate to a full datetime at the earliest valid time
for the date using the specified time zone.
<p>
The time will normally be midnight, as that is the earliest time on
any given day. However, in some time zones when Daylight Savings Time
starts, there is no midnight because time jumps from 11:59 to 01... | [
"Converts",
"this",
"LocalDate",
"to",
"a",
"full",
"datetime",
"at",
"the",
"earliest",
"valid",
"time",
"for",
"the",
"date",
"using",
"the",
"specified",
"time",
"zone",
".",
"<p",
">",
"The",
"time",
"will",
"normally",
"be",
"midnight",
"as",
"that",
... | train | https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/LocalDate.java#L727-L734 |
oboehm/jfachwert | src/main/java/de/jfachwert/post/Adresse.java | Adresse.of | public static Adresse of(Ort ort, String strasse, String hausnummer) {
"""
Liefert eine Adresse mit den uebergebenen Parametern.
@param ort the ort
@param strasse the strasse
@param hausnummer the hausnummer
@return Adresse
"""
return new Adresse(ort, strasse, hausnummer);
} | java | public static Adresse of(Ort ort, String strasse, String hausnummer) {
return new Adresse(ort, strasse, hausnummer);
} | [
"public",
"static",
"Adresse",
"of",
"(",
"Ort",
"ort",
",",
"String",
"strasse",
",",
"String",
"hausnummer",
")",
"{",
"return",
"new",
"Adresse",
"(",
"ort",
",",
"strasse",
",",
"hausnummer",
")",
";",
"}"
] | Liefert eine Adresse mit den uebergebenen Parametern.
@param ort the ort
@param strasse the strasse
@param hausnummer the hausnummer
@return Adresse | [
"Liefert",
"eine",
"Adresse",
"mit",
"den",
"uebergebenen",
"Parametern",
"."
] | train | https://github.com/oboehm/jfachwert/blob/67b513d29e3114c7aee65cd1ea7a5b7e540b0d1b/src/main/java/de/jfachwert/post/Adresse.java#L155-L157 |
undertow-io/undertow | core/src/main/java/io/undertow/websockets/core/WebSockets.java | WebSockets.sendPongBlocking | public static void sendPongBlocking(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel) throws IOException {
"""
Sends a complete pong message using blocking IO
Automatically frees the pooled byte buffer when done.
@param pooledData The data to send, it will be freed when done
@param wsChanne... | java | public static void sendPongBlocking(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel) throws IOException {
sendBlockingInternal(pooledData, WebSocketFrameType.PONG, wsChannel);
} | [
"public",
"static",
"void",
"sendPongBlocking",
"(",
"final",
"PooledByteBuffer",
"pooledData",
",",
"final",
"WebSocketChannel",
"wsChannel",
")",
"throws",
"IOException",
"{",
"sendBlockingInternal",
"(",
"pooledData",
",",
"WebSocketFrameType",
".",
"PONG",
",",
"w... | Sends a complete pong message using blocking IO
Automatically frees the pooled byte buffer when done.
@param pooledData The data to send, it will be freed when done
@param wsChannel The web socket channel | [
"Sends",
"a",
"complete",
"pong",
"message",
"using",
"blocking",
"IO",
"Automatically",
"frees",
"the",
"pooled",
"byte",
"buffer",
"when",
"done",
"."
] | train | https://github.com/undertow-io/undertow/blob/87de0b856a7a4ba8faf5b659537b9af07b763263/core/src/main/java/io/undertow/websockets/core/WebSockets.java#L578-L580 |
greatman/craftconomy3 | src/main/java/com/greatmancode/craftconomy3/account/AccountACL.java | AccountACL.setAcl | public void setAcl(String name, boolean acl) {
"""
Set if a player can modify the ACL list
@param name The player name
@param acl can modify the ACL or not
"""
String newName = name.toLowerCase();
if (aclList.containsKey(newName)) {
AccountACLValue value = aclList.get(newName);... | java | public void setAcl(String name, boolean acl) {
String newName = name.toLowerCase();
if (aclList.containsKey(newName)) {
AccountACLValue value = aclList.get(newName);
set(newName, value.canDeposit(), value.canWithdraw(), acl, value.canBalance(), value.isOwner());
} else {
... | [
"public",
"void",
"setAcl",
"(",
"String",
"name",
",",
"boolean",
"acl",
")",
"{",
"String",
"newName",
"=",
"name",
".",
"toLowerCase",
"(",
")",
";",
"if",
"(",
"aclList",
".",
"containsKey",
"(",
"newName",
")",
")",
"{",
"AccountACLValue",
"value",
... | Set if a player can modify the ACL list
@param name The player name
@param acl can modify the ACL or not | [
"Set",
"if",
"a",
"player",
"can",
"modify",
"the",
"ACL",
"list"
] | train | https://github.com/greatman/craftconomy3/blob/51b1b3de7d039e20c7418d1e70b8c4b02b8cf840/src/main/java/com/greatmancode/craftconomy3/account/AccountACL.java#L149-L157 |
UrielCh/ovh-java-sdk | ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java | ApiOvhIp.service_serviceName_PUT | public void service_serviceName_PUT(String serviceName, OvhServiceIp body) throws IOException {
"""
Alter this object properties
REST: PUT /ip/service/{serviceName}
@param body [required] New object properties
@param serviceName [required] The internal name of your IP services
API beta
"""
String qPa... | java | public void service_serviceName_PUT(String serviceName, OvhServiceIp body) throws IOException {
String qPath = "/ip/service/{serviceName}";
StringBuilder sb = path(qPath, serviceName);
exec(qPath, "PUT", sb.toString(), body);
} | [
"public",
"void",
"service_serviceName_PUT",
"(",
"String",
"serviceName",
",",
"OvhServiceIp",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/ip/service/{serviceName}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"(",
"qPath",
",",
"serviceNa... | Alter this object properties
REST: PUT /ip/service/{serviceName}
@param body [required] New object properties
@param serviceName [required] The internal name of your IP services
API beta | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L1153-L1157 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitConnectionsInner.java | ExpressRouteCircuitConnectionsInner.createOrUpdate | public ExpressRouteCircuitConnectionInner createOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) {
"""
Creates or updates a Express Route Circuit Connection in the specified express route ci... | java | public ExpressRouteCircuitConnectionInner createOrUpdate(String resourceGroupName, String circuitName, String peeringName, String connectionName, ExpressRouteCircuitConnectionInner expressRouteCircuitConnectionParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringNam... | [
"public",
"ExpressRouteCircuitConnectionInner",
"createOrUpdate",
"(",
"String",
"resourceGroupName",
",",
"String",
"circuitName",
",",
"String",
"peeringName",
",",
"String",
"connectionName",
",",
"ExpressRouteCircuitConnectionInner",
"expressRouteCircuitConnectionParameters",
... | Creates or updates a Express Route Circuit Connection in the specified express route circuits.
@param resourceGroupName The name of the resource group.
@param circuitName The name of the express route circuit.
@param peeringName The name of the peering.
@param connectionName The name of the express route circuit conne... | [
"Creates",
"or",
"updates",
"a",
"Express",
"Route",
"Circuit",
"Connection",
"in",
"the",
"specified",
"express",
"route",
"circuits",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_06_01/src/main/java/com/microsoft/azure/management/network/v2018_06_01/implementation/ExpressRouteCircuitConnectionsInner.java#L370-L372 |
netty/netty | transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java | AbstractEpollStreamChannel.spliceTo | public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len) {
"""
Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}.
The {@code offset} is the offset for the {@link FileDescriptor} and {@code len} is the
number of bytes to splice. If using {@l... | java | public final ChannelFuture spliceTo(final FileDescriptor ch, final int offset, final int len) {
return spliceTo(ch, offset, len, newPromise());
} | [
"public",
"final",
"ChannelFuture",
"spliceTo",
"(",
"final",
"FileDescriptor",
"ch",
",",
"final",
"int",
"offset",
",",
"final",
"int",
"len",
")",
"{",
"return",
"spliceTo",
"(",
"ch",
",",
"offset",
",",
"len",
",",
"newPromise",
"(",
")",
")",
";",
... | Splice from this {@link AbstractEpollStreamChannel} to another {@link FileDescriptor}.
The {@code offset} is the offset for the {@link FileDescriptor} and {@code len} is the
number of bytes to splice. If using {@link Integer#MAX_VALUE} it will splice until the
{@link ChannelFuture} was canceled or it was failed.
Pleas... | [
"Splice",
"from",
"this",
"{",
"@link",
"AbstractEpollStreamChannel",
"}",
"to",
"another",
"{",
"@link",
"FileDescriptor",
"}",
".",
"The",
"{",
"@code",
"offset",
"}",
"is",
"the",
"offset",
"for",
"the",
"{",
"@link",
"FileDescriptor",
"}",
"and",
"{",
... | train | https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/transport-native-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollStreamChannel.java#L196-L198 |
aoindustries/ao-servlet-filter | src/main/java/com/aoindustries/servlet/filter/LocaleFilter.java | LocaleFilter.getEnabledLocales | public static Map<String,Locale> getEnabledLocales(ServletRequest request) {
"""
Gets the set of enabled locales for the provided request. This must be called
from a request that has already been filtered through LocaleFilter.
When container's default locale is used, will return an empty map.
@return The ma... | java | public static Map<String,Locale> getEnabledLocales(ServletRequest request) {
@SuppressWarnings("unchecked")
Map<String,Locale> enabledLocales = (Map<String,Locale>)request.getAttribute(ENABLED_LOCALES_REQUEST_ATTRIBUTE_KEY);
if(enabledLocales==null) throw new IllegalStateException("Not in request filtered by Loca... | [
"public",
"static",
"Map",
"<",
"String",
",",
"Locale",
">",
"getEnabledLocales",
"(",
"ServletRequest",
"request",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Map",
"<",
"String",
",",
"Locale",
">",
"enabledLocales",
"=",
"(",
"Map",
"<... | Gets the set of enabled locales for the provided request. This must be called
from a request that has already been filtered through LocaleFilter.
When container's default locale is used, will return an empty map.
@return The mapping from localeString to locale | [
"Gets",
"the",
"set",
"of",
"enabled",
"locales",
"for",
"the",
"provided",
"request",
".",
"This",
"must",
"be",
"called",
"from",
"a",
"request",
"that",
"has",
"already",
"been",
"filtered",
"through",
"LocaleFilter",
".",
"When",
"container",
"s",
"defau... | train | https://github.com/aoindustries/ao-servlet-filter/blob/ee1fb95e36b0620949e9cb8ee863ac37fb9e4f2b/src/main/java/com/aoindustries/servlet/filter/LocaleFilter.java#L154-L159 |
zanata/jgettext | src/main/java/org/fedorahosted/tennera/jgettext/catalog/parse/CatalogLexer.java | CatalogLexer.readGettextCharset | static String readGettextCharset(InputStream markableStream)
throws IOException, UnsupportedEncodingException {
"""
Searches the beginning (4096 bytes) of the InputStream for a Gettext
charset declaration, and returns the charset name. The InputStream must
support "mark". It will be reset to the begi... | java | static String readGettextCharset(InputStream markableStream)
throws IOException, UnsupportedEncodingException
{
String charset = "UTF-8";
int limit = 4096;
markableStream.mark(limit);
byte[] buf = new byte[limit];
int count = markableStream.read(buf);
mark... | [
"static",
"String",
"readGettextCharset",
"(",
"InputStream",
"markableStream",
")",
"throws",
"IOException",
",",
"UnsupportedEncodingException",
"{",
"String",
"charset",
"=",
"\"UTF-8\"",
";",
"int",
"limit",
"=",
"4096",
";",
"markableStream",
".",
"mark",
"(",
... | Searches the beginning (4096 bytes) of the InputStream for a Gettext
charset declaration, and returns the charset name. The InputStream must
support "mark". It will be reset to the beginning of the stream. If no
charset is found, UTF-8 will be assumed.
<p>
As with the Gettext tools, this only works for ASCII-compatible... | [
"Searches",
"the",
"beginning",
"(",
"4096",
"bytes",
")",
"of",
"the",
"InputStream",
"for",
"a",
"Gettext",
"charset",
"declaration",
"and",
"returns",
"the",
"charset",
"name",
".",
"The",
"InputStream",
"must",
"support",
"mark",
".",
"It",
"will",
"be",... | train | https://github.com/zanata/jgettext/blob/29a6170c81b82a14458fb5c8b23720fc0dec291c/src/main/java/org/fedorahosted/tennera/jgettext/catalog/parse/CatalogLexer.java#L112-L142 |
jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToMessage.java | BaseConvertToMessage.addPayloadProperties | public void addPayloadProperties(Object msg, BaseMessage message) {
"""
Utility to add the standard payload properties to the message
@param msg
@param message
"""
MessageDataDesc messageDataDesc = message.getMessageDataDesc(null); // Top level only
if (messageDataDesc != null)
{
... | java | public void addPayloadProperties(Object msg, BaseMessage message)
{
MessageDataDesc messageDataDesc = message.getMessageDataDesc(null); // Top level only
if (messageDataDesc != null)
{
Map<String,Class<?>> mapPropertyNames = messageDataDesc.getPayloadPropertyNames(null);
... | [
"public",
"void",
"addPayloadProperties",
"(",
"Object",
"msg",
",",
"BaseMessage",
"message",
")",
"{",
"MessageDataDesc",
"messageDataDesc",
"=",
"message",
".",
"getMessageDataDesc",
"(",
"null",
")",
";",
"// Top level only",
"if",
"(",
"messageDataDesc",
"!=",
... | Utility to add the standard payload properties to the message
@param msg
@param message | [
"Utility",
"to",
"add",
"the",
"standard",
"payload",
"properties",
"to",
"the",
"message"
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/convert/BaseConvertToMessage.java#L161-L177 |
cloudant/java-cloudant | cloudant-client/src/main/java/com/cloudant/client/org/lightcouch/CouchDbClient.java | CouchDbClient.executeToResponse | public Response executeToResponse(HttpConnection connection) {
"""
Executes a HTTP request and parses the JSON response into a Response instance.
@param connection The HTTP request to execute.
@return Response object of the deserialized JSON response
"""
InputStream is = null;
try {
... | java | public Response executeToResponse(HttpConnection connection) {
InputStream is = null;
try {
is = this.executeToInputStream(connection);
Response response = getResponse(is, Response.class, getGson());
response.setStatusCode(connection.getConnection().getResponseCode())... | [
"public",
"Response",
"executeToResponse",
"(",
"HttpConnection",
"connection",
")",
"{",
"InputStream",
"is",
"=",
"null",
";",
"try",
"{",
"is",
"=",
"this",
".",
"executeToInputStream",
"(",
"connection",
")",
";",
"Response",
"response",
"=",
"getResponse",
... | Executes a HTTP request and parses the JSON response into a Response instance.
@param connection The HTTP request to execute.
@return Response object of the deserialized JSON response | [
"Executes",
"a",
"HTTP",
"request",
"and",
"parses",
"the",
"JSON",
"response",
"into",
"a",
"Response",
"instance",
"."
] | train | https://github.com/cloudant/java-cloudant/blob/42c438654945361bded2cc0827afc046d535b31b/cloudant-client/src/main/java/com/cloudant/client/org/lightcouch/CouchDbClient.java#L356-L369 |
jbundle/jbundle | base/base/src/main/java/org/jbundle/base/util/BaseApplication.java | BaseApplication.getPDatabaseParent | public ThinPhysicalDatabaseParent getPDatabaseParent(Map<String,Object> properties, boolean bCreateIfNew) {
"""
Get the (optional) raw data database manager.
@return The pDatabaseOwner (returns an object, so this package isn't dependent on PDatabaseOwner).
"""
return this.getEnvironment().getPDatabase... | java | public ThinPhysicalDatabaseParent getPDatabaseParent(Map<String,Object> properties, boolean bCreateIfNew)
{
return this.getEnvironment().getPDatabaseParent(properties, bCreateIfNew);
} | [
"public",
"ThinPhysicalDatabaseParent",
"getPDatabaseParent",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
",",
"boolean",
"bCreateIfNew",
")",
"{",
"return",
"this",
".",
"getEnvironment",
"(",
")",
".",
"getPDatabaseParent",
"(",
"properties",
",... | Get the (optional) raw data database manager.
@return The pDatabaseOwner (returns an object, so this package isn't dependent on PDatabaseOwner). | [
"Get",
"the",
"(",
"optional",
")",
"raw",
"data",
"database",
"manager",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/BaseApplication.java#L238-L241 |
netplex/json-smart-v2 | json-smart/src/main/java/net/minidev/json/JSONArray.java | JSONArray.writeJSONString | public static void writeJSONString(Iterable<? extends Object> list, Appendable out, JSONStyle compression)
throws IOException {
"""
Encode a list into JSON text and write it to out. If this list is also a
JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific
behaviours will be ignored at this... | java | public static void writeJSONString(Iterable<? extends Object> list, Appendable out, JSONStyle compression)
throws IOException {
if (list == null) {
out.append("null");
return;
}
JsonWriter.JSONIterableWriter.writeJSONString(list, out, compression);
} | [
"public",
"static",
"void",
"writeJSONString",
"(",
"Iterable",
"<",
"?",
"extends",
"Object",
">",
"list",
",",
"Appendable",
"out",
",",
"JSONStyle",
"compression",
")",
"throws",
"IOException",
"{",
"if",
"(",
"list",
"==",
"null",
")",
"{",
"out",
".",... | Encode a list into JSON text and write it to out. If this list is also a
JSONStreamAware or a JSONAware, JSONStreamAware and JSONAware specific
behaviours will be ignored at this top level.
@see JSONValue#writeJSONString(Object, Appendable)
@param list
@param out | [
"Encode",
"a",
"list",
"into",
"JSON",
"text",
"and",
"write",
"it",
"to",
"out",
".",
"If",
"this",
"list",
"is",
"also",
"a",
"JSONStreamAware",
"or",
"a",
"JSONAware",
"JSONStreamAware",
"and",
"JSONAware",
"specific",
"behaviours",
"will",
"be",
"ignored... | train | https://github.com/netplex/json-smart-v2/blob/bfb3daef039e22a7bbff5f76bf14ea23330cd70e/json-smart/src/main/java/net/minidev/json/JSONArray.java#L69-L76 |
exoplatform/jcr | exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java | UserProfileHandlerImpl.preDelete | private void preDelete(UserProfile userProfile, boolean broadcast) throws Exception {
"""
Notifying listeners before profile deletion.
@param userProfile
the user profile which is used in delete operation
@throws Exception
if any listener failed to handle the event
"""
for (UserProfileEventListener... | java | private void preDelete(UserProfile userProfile, boolean broadcast) throws Exception
{
for (UserProfileEventListener listener : listeners)
{
listener.preDelete(userProfile);
}
} | [
"private",
"void",
"preDelete",
"(",
"UserProfile",
"userProfile",
",",
"boolean",
"broadcast",
")",
"throws",
"Exception",
"{",
"for",
"(",
"UserProfileEventListener",
"listener",
":",
"listeners",
")",
"{",
"listener",
".",
"preDelete",
"(",
"userProfile",
")",
... | Notifying listeners before profile deletion.
@param userProfile
the user profile which is used in delete operation
@throws Exception
if any listener failed to handle the event | [
"Notifying",
"listeners",
"before",
"profile",
"deletion",
"."
] | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/UserProfileHandlerImpl.java#L443-L449 |
lucee/Lucee | core/src/main/java/lucee/runtime/op/Caster.java | Caster.toNull | public static Object toNull(Object value, Object defaultValue) {
"""
casts a Object to null
@param value
@param defaultValue
@return to null from Object
"""
if (value == null) return null;
if (value instanceof String && Caster.toString(value, "").trim().length() == 0) return null;
if (value instanceof ... | java | public static Object toNull(Object value, Object defaultValue) {
if (value == null) return null;
if (value instanceof String && Caster.toString(value, "").trim().length() == 0) return null;
if (value instanceof Number && ((Number) value).intValue() == 0) return null;
return defaultValue;
} | [
"public",
"static",
"Object",
"toNull",
"(",
"Object",
"value",
",",
"Object",
"defaultValue",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"value",
"instanceof",
"String",
"&&",
"Caster",
".",
"toString",
"(",
"valu... | casts a Object to null
@param value
@param defaultValue
@return to null from Object | [
"casts",
"a",
"Object",
"to",
"null"
] | train | https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/op/Caster.java#L4428-L4433 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java | PixelMath.boundImage | public static void boundImage( GrayS8 img , int min , int max ) {
"""
Bounds image pixels to be between these two values
@param img Image
@param min minimum value.
@param max maximum value.
"""
ImplPixelMath.boundImage(img,min,max);
} | java | public static void boundImage( GrayS8 img , int min , int max ) {
ImplPixelMath.boundImage(img,min,max);
} | [
"public",
"static",
"void",
"boundImage",
"(",
"GrayS8",
"img",
",",
"int",
"min",
",",
"int",
"max",
")",
"{",
"ImplPixelMath",
".",
"boundImage",
"(",
"img",
",",
"min",
",",
"max",
")",
";",
"}"
] | Bounds image pixels to be between these two values
@param img Image
@param min minimum value.
@param max maximum value. | [
"Bounds",
"image",
"pixels",
"to",
"be",
"between",
"these",
"two",
"values"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/PixelMath.java#L4329-L4331 |
Stratio/stratio-cassandra | src/java/org/apache/cassandra/triggers/TriggerExecutor.java | TriggerExecutor.reloadClasses | public void reloadClasses() {
"""
Reload the triggers which is already loaded, Invoking this will update
the class loader so new jars can be loaded.
"""
File triggerDirectory = FBUtilities.cassandraTriggerDir();
if (triggerDirectory == null)
return;
customClassLoader = new ... | java | public void reloadClasses()
{
File triggerDirectory = FBUtilities.cassandraTriggerDir();
if (triggerDirectory == null)
return;
customClassLoader = new CustomClassLoader(parent, triggerDirectory);
cachedTriggers.clear();
} | [
"public",
"void",
"reloadClasses",
"(",
")",
"{",
"File",
"triggerDirectory",
"=",
"FBUtilities",
".",
"cassandraTriggerDir",
"(",
")",
";",
"if",
"(",
"triggerDirectory",
"==",
"null",
")",
"return",
";",
"customClassLoader",
"=",
"new",
"CustomClassLoader",
"(... | Reload the triggers which is already loaded, Invoking this will update
the class loader so new jars can be loaded. | [
"Reload",
"the",
"triggers",
"which",
"is",
"already",
"loaded",
"Invoking",
"this",
"will",
"update",
"the",
"class",
"loader",
"so",
"new",
"jars",
"can",
"be",
"loaded",
"."
] | train | https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/triggers/TriggerExecutor.java#L54-L61 |
alkacon/opencms-core | src/org/opencms/ade/configuration/CmsConfigurationReader.java | CmsConfigurationReader.getString | public static String getString(CmsObject cms, I_CmsXmlContentValueLocation location) {
"""
Gets the string value of an XML content location.<p>
@param cms the CMS context to use
@param location an XML content location
@return the string value of that XML content location
"""
if (location == nul... | java | public static String getString(CmsObject cms, I_CmsXmlContentValueLocation location) {
if (location == null) {
return null;
}
return location.asString(cms);
} | [
"public",
"static",
"String",
"getString",
"(",
"CmsObject",
"cms",
",",
"I_CmsXmlContentValueLocation",
"location",
")",
"{",
"if",
"(",
"location",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"location",
".",
"asString",
"(",
"cms",
")",
... | Gets the string value of an XML content location.<p>
@param cms the CMS context to use
@param location an XML content location
@return the string value of that XML content location | [
"Gets",
"the",
"string",
"value",
"of",
"an",
"XML",
"content",
"location",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationReader.java#L281-L287 |
Azure/azure-sdk-for-java | network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java | ExpressRouteCrossConnectionsInner.beginListRoutesTableSummary | public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner beginListRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) {
"""
Gets the route table summary associated with the express route cross connection in a resource group.
@param resource... | java | public ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner beginListRoutesTableSummary(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) {
return beginListRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePa... | [
"public",
"ExpressRouteCrossConnectionsRoutesTableSummaryListResultInner",
"beginListRoutesTableSummary",
"(",
"String",
"resourceGroupName",
",",
"String",
"crossConnectionName",
",",
"String",
"peeringName",
",",
"String",
"devicePath",
")",
"{",
"return",
"beginListRoutesTable... | Gets the route table summary associated with the express route cross connection in a resource group.
@param resourceGroupName The name of the resource group.
@param crossConnectionName The name of the ExpressRouteCrossConnection.
@param peeringName The name of the peering.
@param devicePath The path of the device.
@th... | [
"Gets",
"the",
"route",
"table",
"summary",
"associated",
"with",
"the",
"express",
"route",
"cross",
"connection",
"in",
"a",
"resource",
"group",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/ExpressRouteCrossConnectionsInner.java#L1187-L1189 |
twitter/hraven | hraven-core/src/main/java/com/twitter/hraven/datasource/AppSummaryService.java | AppSummaryService.createQueueListValue | String createQueueListValue(JobDetails jobDetails, String existingQueues) {
"""
looks at {@Link String} to see if queue name already is stored, if not,
adds it
@param {@link JobDetails}
@param {@link Result}
@return queue list
"""
/*
* check if queue already exists append separator at the end to a... | java | String createQueueListValue(JobDetails jobDetails, String existingQueues) {
/*
* check if queue already exists append separator at the end to avoid
* "false" queue match via substring match
*/
String queue = jobDetails.getQueue();
queue = queue.concat(Constants.SEP);
if (existingQueues =... | [
"String",
"createQueueListValue",
"(",
"JobDetails",
"jobDetails",
",",
"String",
"existingQueues",
")",
"{",
"/*\n * check if queue already exists append separator at the end to avoid\n * \"false\" queue match via substring match\n */",
"String",
"queue",
"=",
"jobDetails",
... | looks at {@Link String} to see if queue name already is stored, if not,
adds it
@param {@link JobDetails}
@param {@link Result}
@return queue list | [
"looks",
"at",
"{"
] | train | https://github.com/twitter/hraven/blob/e35996b6e2f016bcd18db0bad320be7c93d95208/hraven-core/src/main/java/com/twitter/hraven/datasource/AppSummaryService.java#L308-L324 |
j-a-w-r/jawr-main-repo | jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/postprocess/impl/JSMinPostProcessor.java | JSMinPostProcessor.minifyStringBuffer | public StringBuffer minifyStringBuffer(StringBuffer sb, Charset charset) throws IOException, JSMinException {
"""
Utility method for components that need to use JSMin in a different
context other than bundle postprocessing.
@param sb
the content to minify
@param charset
the charset
@return the minified con... | java | public StringBuffer minifyStringBuffer(StringBuffer sb, Charset charset) throws IOException, JSMinException {
byte[] bundleBytes = sb.toString().getBytes(charset.name());
ByteArrayInputStream bIs = new ByteArrayInputStream(bundleBytes);
ByteArrayOutputStream bOs = new ByteArrayOutputStream();
// Compress data ... | [
"public",
"StringBuffer",
"minifyStringBuffer",
"(",
"StringBuffer",
"sb",
",",
"Charset",
"charset",
")",
"throws",
"IOException",
",",
"JSMinException",
"{",
"byte",
"[",
"]",
"bundleBytes",
"=",
"sb",
".",
"toString",
"(",
")",
".",
"getBytes",
"(",
"charse... | Utility method for components that need to use JSMin in a different
context other than bundle postprocessing.
@param sb
the content to minify
@param charset
the charset
@return the minified content
@throws java.io.IOException
if an IOException occurs
@throws net.jawr.web.minification.JSMin.JSMinException
if a JSMin ex... | [
"Utility",
"method",
"for",
"components",
"that",
"need",
"to",
"use",
"JSMin",
"in",
"a",
"different",
"context",
"other",
"than",
"bundle",
"postprocessing",
"."
] | train | https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/postprocess/impl/JSMinPostProcessor.java#L100-L110 |
DJCordhose/jmte | src/com/floreysoft/jmte/util/Util.java | Util.fileToString | public static String fileToString(String fileName, String charsetName) {
"""
Transforms a file into a string.
@param fileName
name of the file to be transformed
@param charsetName
encoding of the file
@return the string containing the content of the file
"""
return fileToString(new File(fileName), ch... | java | public static String fileToString(String fileName, String charsetName) {
return fileToString(new File(fileName), charsetName);
} | [
"public",
"static",
"String",
"fileToString",
"(",
"String",
"fileName",
",",
"String",
"charsetName",
")",
"{",
"return",
"fileToString",
"(",
"new",
"File",
"(",
"fileName",
")",
",",
"charsetName",
")",
";",
"}"
] | Transforms a file into a string.
@param fileName
name of the file to be transformed
@param charsetName
encoding of the file
@return the string containing the content of the file | [
"Transforms",
"a",
"file",
"into",
"a",
"string",
"."
] | train | https://github.com/DJCordhose/jmte/blob/7334e6d111cc2198c5cf69ee336584ab9e192fe5/src/com/floreysoft/jmte/util/Util.java#L111-L113 |
alexcojocaru/elasticsearch-maven-plugin | src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/client/Monitor.java | Monitor.waitToStartCluster | public void waitToStartCluster(final String clusterName, int nodesCount, int timeout) {
"""
Wait until the cluster has fully started (ie. all nodes have joined).
@param clusterName the ES cluster name
@param nodesCount the number of nodes in the cluster
@param timeout how many seconds to wait
"""
lo... | java | public void waitToStartCluster(final String clusterName, int nodesCount, int timeout)
{
log.debug(String.format(
"Waiting up to %ds for the Elasticsearch cluster to start ...",
timeout));
Awaitility.await()
.atMost(timeout, TimeUnit.SECONDS)
... | [
"public",
"void",
"waitToStartCluster",
"(",
"final",
"String",
"clusterName",
",",
"int",
"nodesCount",
",",
"int",
"timeout",
")",
"{",
"log",
".",
"debug",
"(",
"String",
".",
"format",
"(",
"\"Waiting up to %ds for the Elasticsearch cluster to start ...\"",
",",
... | Wait until the cluster has fully started (ie. all nodes have joined).
@param clusterName the ES cluster name
@param nodesCount the number of nodes in the cluster
@param timeout how many seconds to wait | [
"Wait",
"until",
"the",
"cluster",
"has",
"fully",
"started",
"(",
"ie",
".",
"all",
"nodes",
"have",
"joined",
")",
"."
] | train | https://github.com/alexcojocaru/elasticsearch-maven-plugin/blob/c283053cf99dc6b6d411b58629364b6aae62b7f8/src/main/java/com/github/alexcojocaru/mojo/elasticsearch/v2/client/Monitor.java#L115-L134 |
lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomQuadPnP.java | VisOdomQuadPnP.process | public boolean process( T left , T right ) {
"""
Estimates camera egomotion from the stereo pair
@param left Image from left camera
@param right Image from right camera
@return true if motion was estimated and false if not
"""
if( first ) {
associateL2R(left, right);
first = false;
} else {
// ... | java | public boolean process( T left , T right ) {
if( first ) {
associateL2R(left, right);
first = false;
} else {
// long time0 = System.currentTimeMillis();
associateL2R(left, right);
// long time1 = System.currentTimeMillis();
associateF2F();
// long time2 = System.currentTimeMillis();
cyclicCon... | [
"public",
"boolean",
"process",
"(",
"T",
"left",
",",
"T",
"right",
")",
"{",
"if",
"(",
"first",
")",
"{",
"associateL2R",
"(",
"left",
",",
"right",
")",
";",
"first",
"=",
"false",
";",
"}",
"else",
"{",
"//\t\t\tlong time0 = System.currentTimeMillis()... | Estimates camera egomotion from the stereo pair
@param left Image from left camera
@param right Image from right camera
@return true if motion was estimated and false if not | [
"Estimates",
"camera",
"egomotion",
"from",
"the",
"stereo",
"pair"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/d3/VisOdomQuadPnP.java#L173-L195 |
OpenNTF/JavascriptAggregator | jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java | SignalUtil.logWaiting | static boolean logWaiting(String callerClass, String callerMethod, Object waitObj, long start, Object... extraArgs) {
"""
Logs a warning message. If the elapsed time is greater than
{@link #SIGNAL_LOG_QUIESCE_TIMEOUT_MINUTES} then the log message will indicate that wait
logging for the thread is being quiesced, ... | java | static boolean logWaiting(String callerClass, String callerMethod, Object waitObj, long start, Object... extraArgs) {
return logWaiting(log, callerClass, callerMethod, waitObj, start, extraArgs);
} | [
"static",
"boolean",
"logWaiting",
"(",
"String",
"callerClass",
",",
"String",
"callerMethod",
",",
"Object",
"waitObj",
",",
"long",
"start",
",",
"Object",
"...",
"extraArgs",
")",
"{",
"return",
"logWaiting",
"(",
"log",
",",
"callerClass",
",",
"callerMet... | Logs a warning message. If the elapsed time is greater than
{@link #SIGNAL_LOG_QUIESCE_TIMEOUT_MINUTES} then the log message will indicate that wait
logging for the thread is being quiesced, and a value of true is returned. Otherwise, false
is returned.
<p>
This is a convenience method to call
{@link #logWaiting(Logger... | [
"Logs",
"a",
"warning",
"message",
".",
"If",
"the",
"elapsed",
"time",
"is",
"greater",
"than",
"{",
"@link",
"#SIGNAL_LOG_QUIESCE_TIMEOUT_MINUTES",
"}",
"then",
"the",
"log",
"message",
"will",
"indicate",
"that",
"wait",
"logging",
"for",
"the",
"thread",
"... | train | https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/SignalUtil.java#L98-L100 |
authorjapps/zerocode | core/src/main/java/org/jsmart/zerocode/core/httpclient/BasicHttpClient.java | BasicHttpClient.handleHttpSession | public void handleHttpSession(Response serverResponse, String headerKey) {
"""
This method handles the http session to be maintained between the calls.
In case the session is not needed or to be handled differently, then this
method can be overridden to do nothing or to roll your own feature.
@param serverRes... | java | public void handleHttpSession(Response serverResponse, String headerKey) {
/** ---------------
* Session handled
* ----------------
*/
if ("Set-Cookie".equals(headerKey)) {
COOKIE_JSESSIONID_VALUE = serverResponse.getMetadata().get(headerKey);
}
} | [
"public",
"void",
"handleHttpSession",
"(",
"Response",
"serverResponse",
",",
"String",
"headerKey",
")",
"{",
"/** ---------------\n * Session handled\n * ----------------\n */",
"if",
"(",
"\"Set-Cookie\"",
".",
"equals",
"(",
"headerKey",
")",
")",... | This method handles the http session to be maintained between the calls.
In case the session is not needed or to be handled differently, then this
method can be overridden to do nothing or to roll your own feature.
@param serverResponse
@param headerKey | [
"This",
"method",
"handles",
"the",
"http",
"session",
"to",
"be",
"maintained",
"between",
"the",
"calls",
".",
"In",
"case",
"the",
"session",
"is",
"not",
"needed",
"or",
"to",
"be",
"handled",
"differently",
"then",
"this",
"method",
"can",
"be",
"over... | train | https://github.com/authorjapps/zerocode/blob/d66a3e8778d2eb5e4f0006bfcccfc0922ceb7cef/core/src/main/java/org/jsmart/zerocode/core/httpclient/BasicHttpClient.java#L371-L379 |
Mozu/mozu-java | mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/ProductUrl.java | ProductUrl.getProductForIndexingUrl | public static MozuUrl getProductForIndexingUrl(DateTime lastModifiedDate, String productCode, Long productVersion, String responseFields) {
"""
Get Resource Url for GetProductForIndexing
@param lastModifiedDate The date when the product was last updated.
@param productCode The unique, user-defined product code o... | java | public static MozuUrl getProductForIndexingUrl(DateTime lastModifiedDate, String productCode, Long productVersion, String responseFields)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/products/indexing/{productCode}?productVersion={productVersion}&lastModifiedDate={lastModifiedDate}... | [
"public",
"static",
"MozuUrl",
"getProductForIndexingUrl",
"(",
"DateTime",
"lastModifiedDate",
",",
"String",
"productCode",
",",
"Long",
"productVersion",
",",
"String",
"responseFields",
")",
"{",
"UrlFormatter",
"formatter",
"=",
"new",
"UrlFormatter",
"(",
"\"/ap... | Get Resource Url for GetProductForIndexing
@param lastModifiedDate The date when the product was last updated.
@param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product.
@param productVersion The product version.
@param responseFields Filtering synta... | [
"Get",
"Resource",
"Url",
"for",
"GetProductForIndexing"
] | train | https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/catalog/storefront/ProductUrl.java#L96-L104 |
jbundle/jbundle | main/msg/src/main/java/org/jbundle/main/msg/db/MessageInfo.java | MessageInfo.createNewMessage | public MessageRecordDesc createNewMessage(BaseMessage message, String strKey) {
"""
Create the message that this record describes
(in the classname field)
@returns The message or null if error.
"""
MessageRecordDesc messageData = null;
String strClassName = this.getField(MessageInfo.MESSAGE_C... | java | public MessageRecordDesc createNewMessage(BaseMessage message, String strKey)
{
MessageRecordDesc messageData = null;
String strClassName = this.getField(MessageInfo.MESSAGE_CLASS).toString();
messageData = (MessageRecordDesc)ClassServiceUtility.getClassService().makeObjectFromClassName(strC... | [
"public",
"MessageRecordDesc",
"createNewMessage",
"(",
"BaseMessage",
"message",
",",
"String",
"strKey",
")",
"{",
"MessageRecordDesc",
"messageData",
"=",
"null",
";",
"String",
"strClassName",
"=",
"this",
".",
"getField",
"(",
"MessageInfo",
".",
"MESSAGE_CLASS... | Create the message that this record describes
(in the classname field)
@returns The message or null if error. | [
"Create",
"the",
"message",
"that",
"this",
"record",
"describes",
"(",
"in",
"the",
"classname",
"field",
")"
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg/src/main/java/org/jbundle/main/msg/db/MessageInfo.java#L239-L247 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java | AppServiceEnvironmentsInner.listWorkerPoolsWithServiceResponseAsync | public Observable<ServiceResponse<Page<WorkerPoolResourceInner>>> listWorkerPoolsWithServiceResponseAsync(final String resourceGroupName, final String name) {
"""
Get all worker pools of an App Service Environment.
Get all worker pools of an App Service Environment.
@param resourceGroupName Name of the resourc... | java | public Observable<ServiceResponse<Page<WorkerPoolResourceInner>>> listWorkerPoolsWithServiceResponseAsync(final String resourceGroupName, final String name) {
return listWorkerPoolsSinglePageAsync(resourceGroupName, name)
.concatMap(new Func1<ServiceResponse<Page<WorkerPoolResourceInner>>, Observabl... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"Page",
"<",
"WorkerPoolResourceInner",
">",
">",
">",
"listWorkerPoolsWithServiceResponseAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"name",
")",
"{",
"return",
"listWorkerPoolsSingle... | Get all worker pools of an App Service Environment.
Get all worker pools of an App Service Environment.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of the App Service Environment.
@throws IllegalArgumentException thrown if parameters fail the validation
@return t... | [
"Get",
"all",
"worker",
"pools",
"of",
"an",
"App",
"Service",
"Environment",
".",
"Get",
"all",
"worker",
"pools",
"of",
"an",
"App",
"Service",
"Environment",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServiceEnvironmentsInner.java#L5023-L5035 |
openengsb/openengsb | components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/IndexRecord.java | IndexRecord.extractValue | protected Object extractValue(IndexField<?> field, OpenEngSBModelEntry entry) {
"""
Extracts the value from the given {@code OpenEngSBModelEntry} and maps that value to the given field type.
@param field the field to map to
@param entry the entry containing the value
@return the transformed (possibly) value
... | java | protected Object extractValue(IndexField<?> field, OpenEngSBModelEntry entry) {
Object value = entry.getValue();
if (value == null) {
return null;
}
if (Introspector.isModel(value)) {
return ((OpenEngSBModel) value).retrieveInternalModelId();
}
... | [
"protected",
"Object",
"extractValue",
"(",
"IndexField",
"<",
"?",
">",
"field",
",",
"OpenEngSBModelEntry",
"entry",
")",
"{",
"Object",
"value",
"=",
"entry",
".",
"getValue",
"(",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null"... | Extracts the value from the given {@code OpenEngSBModelEntry} and maps that value to the given field type.
@param field the field to map to
@param entry the entry containing the value
@return the transformed (possibly) value | [
"Extracts",
"the",
"value",
"from",
"the",
"given",
"{",
"@code",
"OpenEngSBModelEntry",
"}",
"and",
"maps",
"that",
"value",
"to",
"the",
"given",
"field",
"type",
"."
] | train | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edbi/jdbc/src/main/java/org/openengsb/core/edbi/jdbc/IndexRecord.java#L69-L83 |
apache/flink | flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java | MemorySegment.copyToUnsafe | public final void copyToUnsafe(int offset, Object target, int targetPointer, int numBytes) {
"""
Bulk copy method. Copies {@code numBytes} bytes to target unsafe object and pointer.
NOTE: This is a unsafe method, no check here, please be carefully.
@param offset The position where the bytes are started to be r... | java | public final void copyToUnsafe(int offset, Object target, int targetPointer, int numBytes) {
final long thisPointer = this.address + offset;
if (thisPointer + numBytes > addressLimit) {
throw new IndexOutOfBoundsException(
String.format("offset=%d, numBytes=%d, address=%d",
offset, numBytes, this.add... | [
"public",
"final",
"void",
"copyToUnsafe",
"(",
"int",
"offset",
",",
"Object",
"target",
",",
"int",
"targetPointer",
",",
"int",
"numBytes",
")",
"{",
"final",
"long",
"thisPointer",
"=",
"this",
".",
"address",
"+",
"offset",
";",
"if",
"(",
"thisPointe... | Bulk copy method. Copies {@code numBytes} bytes to target unsafe object and pointer.
NOTE: This is a unsafe method, no check here, please be carefully.
@param offset The position where the bytes are started to be read from in this memory segment.
@param target The unsafe memory to copy the bytes to.
@param targetPoint... | [
"Bulk",
"copy",
"method",
".",
"Copies",
"{",
"@code",
"numBytes",
"}",
"bytes",
"to",
"target",
"unsafe",
"object",
"and",
"pointer",
".",
"NOTE",
":",
"This",
"is",
"a",
"unsafe",
"method",
"no",
"check",
"here",
"please",
"be",
"carefully",
"."
] | train | https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/memory/MemorySegment.java#L1285-L1293 |
ziccardi/jnrpe | jnrpe-lib/src/main/java/it/jnrpe/JNRPE.java | JNRPE.getServerBootstrap | private ServerBootstrap getServerBootstrap(final boolean useSSL) {
"""
Creates and returns a configured NETTY ServerBootstrap object.
@param useSSL
<code>true</code> if SSL must be used.
@return the server bootstrap object
"""
final CommandInvoker invoker = new CommandInvoker(pluginRepository, ... | java | private ServerBootstrap getServerBootstrap(final boolean useSSL) {
final CommandInvoker invoker = new CommandInvoker(pluginRepository, commandRepository, acceptParams, getExecutionContext());
final ServerBootstrap serverBootstrap = new ServerBootstrap();
serverBootstrap.group(bossGroup, worker... | [
"private",
"ServerBootstrap",
"getServerBootstrap",
"(",
"final",
"boolean",
"useSSL",
")",
"{",
"final",
"CommandInvoker",
"invoker",
"=",
"new",
"CommandInvoker",
"(",
"pluginRepository",
",",
"commandRepository",
",",
"acceptParams",
",",
"getExecutionContext",
"(",
... | Creates and returns a configured NETTY ServerBootstrap object.
@param useSSL
<code>true</code> if SSL must be used.
@return the server bootstrap object | [
"Creates",
"and",
"returns",
"a",
"configured",
"NETTY",
"ServerBootstrap",
"object",
"."
] | train | https://github.com/ziccardi/jnrpe/blob/ac9046355851136994388442b01ba4063305f9c4/jnrpe-lib/src/main/java/it/jnrpe/JNRPE.java#L325-L352 |
aNNiMON/Lightweight-Stream-API | stream/src/main/java/com/annimon/stream/Collectors.java | Collectors.groupingBy | @NotNull
public static <T, K, D, A, M extends Map<K, D>> Collector<T, ?, M> groupingBy(
@NotNull final Function<? super T, ? extends K> classifier,
@NotNull final Supplier<M> mapFactory,
@NotNull final Collector<? super T, A, D> downstream) {
"""
Returns a {@code Collector} ... | java | @NotNull
public static <T, K, D, A, M extends Map<K, D>> Collector<T, ?, M> groupingBy(
@NotNull final Function<? super T, ? extends K> classifier,
@NotNull final Supplier<M> mapFactory,
@NotNull final Collector<? super T, A, D> downstream) {
@SuppressWarnings("unchecked... | [
"@",
"NotNull",
"public",
"static",
"<",
"T",
",",
"K",
",",
"D",
",",
"A",
",",
"M",
"extends",
"Map",
"<",
"K",
",",
"D",
">",
">",
"Collector",
"<",
"T",
",",
"?",
",",
"M",
">",
"groupingBy",
"(",
"@",
"NotNull",
"final",
"Function",
"<",
... | Returns a {@code Collector} that performs grouping operation by given classifier.
@param <T> the type of the input elements
@param <K> the type of the keys
@param <A> the accumulation type
@param <D> the result type of downstream reduction
@param <M> the type of the resulting {@code Map}
@param classifier the classif... | [
"Returns",
"a",
"{",
"@code",
"Collector",
"}",
"that",
"performs",
"grouping",
"operation",
"by",
"given",
"classifier",
"."
] | train | https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Collectors.java#L939-L986 |
liferay/com-liferay-commerce | commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java | CPMeasurementUnitPersistenceImpl.findByG_T | @Override
public List<CPMeasurementUnit> findByG_T(long groupId, int type, int start,
int end) {
"""
Returns a range of all the cp measurement units where groupId = ? and type = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <co... | java | @Override
public List<CPMeasurementUnit> findByG_T(long groupId, int type, int start,
int end) {
return findByG_T(groupId, type, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CPMeasurementUnit",
">",
"findByG_T",
"(",
"long",
"groupId",
",",
"int",
"type",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByG_T",
"(",
"groupId",
",",
"type",
",",
"start",
",",
"end",
"... | Returns a range of all the cp measurement units where groupId = ? and type = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"cp",
"measurement",
"units",
"where",
"groupId",
"=",
"?",
";",
"and",
"type",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPMeasurementUnitPersistenceImpl.java#L2044-L2048 |
jamesagnew/hapi-fhir | hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java | JaxRsMethodBindings.getMethodBindings | public static JaxRsMethodBindings getMethodBindings(AbstractJaxRsProvider theProvider, Class<? extends AbstractJaxRsProvider> theProviderClass) {
"""
Get the method bindings for the given class. If this class is not yet contained in the classBindings, they will be added for this class
@param theProvider the imp... | java | public static JaxRsMethodBindings getMethodBindings(AbstractJaxRsProvider theProvider, Class<? extends AbstractJaxRsProvider> theProviderClass) {
if(!getClassBindings().containsKey(theProviderClass)) {
JaxRsMethodBindings foundBindings = new JaxRsMethodBindings(theProvider, theProviderClass);
getClassBindings()... | [
"public",
"static",
"JaxRsMethodBindings",
"getMethodBindings",
"(",
"AbstractJaxRsProvider",
"theProvider",
",",
"Class",
"<",
"?",
"extends",
"AbstractJaxRsProvider",
">",
"theProviderClass",
")",
"{",
"if",
"(",
"!",
"getClassBindings",
"(",
")",
".",
"containsKey"... | Get the method bindings for the given class. If this class is not yet contained in the classBindings, they will be added for this class
@param theProvider the implementation class
@param theProviderClass the provider class
@return the methodBindings for this class | [
"Get",
"the",
"method",
"bindings",
"for",
"the",
"given",
"class",
".",
"If",
"this",
"class",
"is",
"not",
"yet",
"contained",
"in",
"the",
"classBindings",
"they",
"will",
"be",
"added",
"for",
"this",
"class"
] | train | https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jaxrsserver-base/src/main/java/ca/uhn/fhir/jaxrs/server/util/JaxRsMethodBindings.java#L136-L142 |
erlang/otp | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java | OtpInputStream.read_port | public OtpErlangPort read_port() throws OtpErlangDecodeException {
"""
Read an Erlang port from the stream.
@return the value of the port.
@exception OtpErlangDecodeException
if the next term in the stream is not an Erlang port.
"""
String node;
int id;
int creation;
int ... | java | public OtpErlangPort read_port() throws OtpErlangDecodeException {
String node;
int id;
int creation;
int tag;
tag = read1skip_version();
if (tag != OtpExternal.portTag &&
tag != OtpExternal.newPortTag) {
throw new OtpErlangDecodeException(
... | [
"public",
"OtpErlangPort",
"read_port",
"(",
")",
"throws",
"OtpErlangDecodeException",
"{",
"String",
"node",
";",
"int",
"id",
";",
"int",
"creation",
";",
"int",
"tag",
";",
"tag",
"=",
"read1skip_version",
"(",
")",
";",
"if",
"(",
"tag",
"!=",
"OtpExt... | Read an Erlang port from the stream.
@return the value of the port.
@exception OtpErlangDecodeException
if the next term in the stream is not an Erlang port. | [
"Read",
"an",
"Erlang",
"port",
"from",
"the",
"stream",
"."
] | train | https://github.com/erlang/otp/blob/ac6084fd83240355f72e94adbf303e57832d1fab/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java#L984-L1008 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.recoverDeletedSasDefinitionAsync | public Observable<SasDefinitionBundle> recoverDeletedSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName) {
"""
Recovers the deleted SAS definition.
Recovers the deleted SAS definition for the specified storage account. This operation can only be performed on a soft-delete ... | java | public Observable<SasDefinitionBundle> recoverDeletedSasDefinitionAsync(String vaultBaseUrl, String storageAccountName, String sasDefinitionName) {
return recoverDeletedSasDefinitionWithServiceResponseAsync(vaultBaseUrl, storageAccountName, sasDefinitionName).map(new Func1<ServiceResponse<SasDefinitionBundle>, ... | [
"public",
"Observable",
"<",
"SasDefinitionBundle",
">",
"recoverDeletedSasDefinitionAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"storageAccountName",
",",
"String",
"sasDefinitionName",
")",
"{",
"return",
"recoverDeletedSasDefinitionWithServiceResponseAsync",
"(",
... | Recovers the deleted SAS definition.
Recovers the deleted SAS definition for the specified storage account. This operation can only be performed on a soft-delete enabled vault. This operation requires the storage/recover permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@para... | [
"Recovers",
"the",
"deleted",
"SAS",
"definition",
".",
"Recovers",
"the",
"deleted",
"SAS",
"definition",
"for",
"the",
"specified",
"storage",
"account",
".",
"This",
"operation",
"can",
"only",
"be",
"performed",
"on",
"a",
"soft",
"-",
"delete",
"enabled",... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L11004-L11011 |
VoltDB/voltdb | src/frontend/org/voltdb/VoltProcedure.java | VoltProcedure.voltQueueSQL | public void voltQueueSQL(final SQLStmt stmt, Expectation expectation, Object... args) {
"""
<p>Queue the SQL {@link org.voltdb.SQLStmt statement} for execution with the specified argument list,
and an Expectation describing the expected results. If the Expectation is not met then VoltAbortException
will be throw... | java | public void voltQueueSQL(final SQLStmt stmt, Expectation expectation, Object... args) {
m_runner.voltQueueSQL(stmt, expectation, args);
} | [
"public",
"void",
"voltQueueSQL",
"(",
"final",
"SQLStmt",
"stmt",
",",
"Expectation",
"expectation",
",",
"Object",
"...",
"args",
")",
"{",
"m_runner",
".",
"voltQueueSQL",
"(",
"stmt",
",",
"expectation",
",",
"args",
")",
";",
"}"
] | <p>Queue the SQL {@link org.voltdb.SQLStmt statement} for execution with the specified argument list,
and an Expectation describing the expected results. If the Expectation is not met then VoltAbortException
will be thrown with a description of the expectation that was not met. This exception must not be
caught from wi... | [
"<p",
">",
"Queue",
"the",
"SQL",
"{",
"@link",
"org",
".",
"voltdb",
".",
"SQLStmt",
"statement",
"}",
"for",
"execution",
"with",
"the",
"specified",
"argument",
"list",
"and",
"an",
"Expectation",
"describing",
"the",
"expected",
"results",
".",
"If",
"... | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/VoltProcedure.java#L232-L234 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/factory/filter/kernel/FactoryKernelGaussian.java | FactoryKernelGaussian.gaussian2D_F32 | public static Kernel2D_F32 gaussian2D_F32(double sigma, int radius, boolean odd, boolean normalize) {
"""
Creates a kernel for a 2D convolution. This should only be used for validation purposes.
@param sigma Distributions standard deviation.
@param radius Kernel's radius.
@param odd Does the kernel have an eve... | java | public static Kernel2D_F32 gaussian2D_F32(double sigma, int radius, boolean odd, boolean normalize) {
Kernel1D_F32 kernel1D = gaussian1D_F32(sigma,radius, odd, false);
Kernel2D_F32 ret = KernelMath.convolve2D(kernel1D, kernel1D);
if (normalize) {
KernelMath.normalizeSumToOne(ret);
}
return ret;
} | [
"public",
"static",
"Kernel2D_F32",
"gaussian2D_F32",
"(",
"double",
"sigma",
",",
"int",
"radius",
",",
"boolean",
"odd",
",",
"boolean",
"normalize",
")",
"{",
"Kernel1D_F32",
"kernel1D",
"=",
"gaussian1D_F32",
"(",
"sigma",
",",
"radius",
",",
"odd",
",",
... | Creates a kernel for a 2D convolution. This should only be used for validation purposes.
@param sigma Distributions standard deviation.
@param radius Kernel's radius.
@param odd Does the kernel have an even or add width
@param normalize If the kernel should be normalized to one or not. | [
"Creates",
"a",
"kernel",
"for",
"a",
"2D",
"convolution",
".",
"This",
"should",
"only",
"be",
"used",
"for",
"validation",
"purposes",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/kernel/FactoryKernelGaussian.java#L269-L278 |
jbundle/jbundle | base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java | HBasePanel.printDataStartField | public void printDataStartField(PrintWriter out, int iPrintOptions) {
"""
Display the start form in input format.
@param out The out stream.
@param iPrintOptions The view specific attributes.
"""
if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
{
}
... | java | public void printDataStartField(PrintWriter out, int iPrintOptions)
{
if ((iPrintOptions & HtmlConstants.MAIN_SCREEN) == HtmlConstants.MAIN_SCREEN)
{
}
else
out.println("<tr>");
} | [
"public",
"void",
"printDataStartField",
"(",
"PrintWriter",
"out",
",",
"int",
"iPrintOptions",
")",
"{",
"if",
"(",
"(",
"iPrintOptions",
"&",
"HtmlConstants",
".",
"MAIN_SCREEN",
")",
"==",
"HtmlConstants",
".",
"MAIN_SCREEN",
")",
"{",
"}",
"else",
"out",
... | Display the start form in input format.
@param out The out stream.
@param iPrintOptions The view specific attributes. | [
"Display",
"the",
"start",
"form",
"in",
"input",
"format",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L574-L581 |
aws/aws-sdk-java | aws-java-sdk-marketplaceentitlement/src/main/java/com/amazonaws/services/marketplaceentitlement/model/GetEntitlementsRequest.java | GetEntitlementsRequest.setFilter | public void setFilter(java.util.Map<String, java.util.List<String>> filter) {
"""
<p>
Filter is used to return entitlements for a specific customer or for a specific dimension. Filters are described
as keys mapped to a lists of values. Filtered requests are <i>unioned</i> for each value in the value list, and
t... | java | public void setFilter(java.util.Map<String, java.util.List<String>> filter) {
this.filter = filter;
} | [
"public",
"void",
"setFilter",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
">",
"filter",
")",
"{",
"this",
".",
"filter",
"=",
"filter",
";",
"}"
] | <p>
Filter is used to return entitlements for a specific customer or for a specific dimension. Filters are described
as keys mapped to a lists of values. Filtered requests are <i>unioned</i> for each value in the value list, and
then <i>intersected</i> for each filter key.
</p>
@param filter
Filter is used to return e... | [
"<p",
">",
"Filter",
"is",
"used",
"to",
"return",
"entitlements",
"for",
"a",
"specific",
"customer",
"or",
"for",
"a",
"specific",
"dimension",
".",
"Filters",
"are",
"described",
"as",
"keys",
"mapped",
"to",
"a",
"lists",
"of",
"values",
".",
"Filtered... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-marketplaceentitlement/src/main/java/com/amazonaws/services/marketplaceentitlement/model/GetEntitlementsRequest.java#L135-L137 |
google/closure-templates | java/src/com/google/template/soy/jbcsrc/api/SoySauceBuilder.java | SoySauceBuilder.readDelTemplatesFromMetaInf | private static ImmutableSet<String> readDelTemplatesFromMetaInf(ClassLoader loader) {
"""
Walks all resources with the META_INF_DELTEMPLATE_PATH and collects the deltemplates.
"""
try {
ImmutableSet.Builder<String> builder = ImmutableSet.builder();
Enumeration<URL> resources = loader.getResourc... | java | private static ImmutableSet<String> readDelTemplatesFromMetaInf(ClassLoader loader) {
try {
ImmutableSet.Builder<String> builder = ImmutableSet.builder();
Enumeration<URL> resources = loader.getResources(Names.META_INF_DELTEMPLATE_PATH);
while (resources.hasMoreElements()) {
URL url = reso... | [
"private",
"static",
"ImmutableSet",
"<",
"String",
">",
"readDelTemplatesFromMetaInf",
"(",
"ClassLoader",
"loader",
")",
"{",
"try",
"{",
"ImmutableSet",
".",
"Builder",
"<",
"String",
">",
"builder",
"=",
"ImmutableSet",
".",
"builder",
"(",
")",
";",
"Enum... | Walks all resources with the META_INF_DELTEMPLATE_PATH and collects the deltemplates. | [
"Walks",
"all",
"resources",
"with",
"the",
"META_INF_DELTEMPLATE_PATH",
"and",
"collects",
"the",
"deltemplates",
"."
] | train | https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jbcsrc/api/SoySauceBuilder.java#L116-L133 |
joniles/mpxj | src/main/java/net/sf/mpxj/mpx/LocaleUtility.java | LocaleUtility.setLocale | public static void setLocale(ProjectProperties properties, Locale locale) {
"""
This method is called when the locale of the parent file is updated.
It resets the locale specific currency attributes to the default values
for the new locale.
@param properties project properties
@param locale new locale
""... | java | public static void setLocale(ProjectProperties properties, Locale locale)
{
properties.setMpxDelimiter(LocaleData.getChar(locale, LocaleData.FILE_DELIMITER));
properties.setMpxProgramName(LocaleData.getString(locale, LocaleData.PROGRAM_NAME));
properties.setMpxCodePage((CodePage) LocaleData.getObje... | [
"public",
"static",
"void",
"setLocale",
"(",
"ProjectProperties",
"properties",
",",
"Locale",
"locale",
")",
"{",
"properties",
".",
"setMpxDelimiter",
"(",
"LocaleData",
".",
"getChar",
"(",
"locale",
",",
"LocaleData",
".",
"FILE_DELIMITER",
")",
")",
";",
... | This method is called when the locale of the parent file is updated.
It resets the locale specific currency attributes to the default values
for the new locale.
@param properties project properties
@param locale new locale | [
"This",
"method",
"is",
"called",
"when",
"the",
"locale",
"of",
"the",
"parent",
"file",
"is",
"updated",
".",
"It",
"resets",
"the",
"locale",
"specific",
"currency",
"attributes",
"to",
"the",
"default",
"values",
"for",
"the",
"new",
"locale",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/LocaleUtility.java#L58-L79 |
rampatra/jbot | jbot-example/src/main/java/example/jbot/slack/SlackBot.java | SlackBot.onReceiveDM | @Controller(events = {
"""
Invoked when the bot receives a direct mention (@botname: message)
or a direct message. NOTE: These two event types are added by jbot
to make your task easier, Slack doesn't have any direct way to
determine these type of events.
@param session
@param event
"""EventType.DIRECT_... | java | @Controller(events = {EventType.DIRECT_MENTION, EventType.DIRECT_MESSAGE})
public void onReceiveDM(WebSocketSession session, Event event) {
reply(session, event, "Hi, I am " + slackService.getCurrentUser().getName());
} | [
"@",
"Controller",
"(",
"events",
"=",
"{",
"EventType",
".",
"DIRECT_MENTION",
",",
"EventType",
".",
"DIRECT_MESSAGE",
"}",
")",
"public",
"void",
"onReceiveDM",
"(",
"WebSocketSession",
"session",
",",
"Event",
"event",
")",
"{",
"reply",
"(",
"session",
... | Invoked when the bot receives a direct mention (@botname: message)
or a direct message. NOTE: These two event types are added by jbot
to make your task easier, Slack doesn't have any direct way to
determine these type of events.
@param session
@param event | [
"Invoked",
"when",
"the",
"bot",
"receives",
"a",
"direct",
"mention",
"(",
"@botname",
":",
"message",
")",
"or",
"a",
"direct",
"message",
".",
"NOTE",
":",
"These",
"two",
"event",
"types",
"are",
"added",
"by",
"jbot",
"to",
"make",
"your",
"task",
... | train | https://github.com/rampatra/jbot/blob/0f42e1a6ec4dcbc5d1257e1307704903e771f7b5/jbot-example/src/main/java/example/jbot/slack/SlackBot.java#L56-L59 |
nguillaumin/slick2d-maven | slick2d-core/src/main/java/org/newdawn/slick/Graphics.java | Graphics.clearAlphaMap | public void clearAlphaMap() {
"""
Clear the state of the alpha map across the entire screen. This sets
alpha to 0 everywhere, meaning in {@link Graphics#MODE_ALPHA_BLEND}
nothing will be drawn.
"""
pushTransform();
GL.glLoadIdentity();
int originalMode = currentDrawingMode;
setDrawMode(MODE_A... | java | public void clearAlphaMap() {
pushTransform();
GL.glLoadIdentity();
int originalMode = currentDrawingMode;
setDrawMode(MODE_ALPHA_MAP);
setColor(new Color(0,0,0,0));
fillRect(0, 0, screenWidth, screenHeight);
setColor(currentColor);
setDrawMode(originalMode);
popTransform();
} | [
"public",
"void",
"clearAlphaMap",
"(",
")",
"{",
"pushTransform",
"(",
")",
";",
"GL",
".",
"glLoadIdentity",
"(",
")",
";",
"int",
"originalMode",
"=",
"currentDrawingMode",
";",
"setDrawMode",
"(",
"MODE_ALPHA_MAP",
")",
";",
"setColor",
"(",
"new",
"Colo... | Clear the state of the alpha map across the entire screen. This sets
alpha to 0 everywhere, meaning in {@link Graphics#MODE_ALPHA_BLEND}
nothing will be drawn. | [
"Clear",
"the",
"state",
"of",
"the",
"alpha",
"map",
"across",
"the",
"entire",
"screen",
".",
"This",
"sets",
"alpha",
"to",
"0",
"everywhere",
"meaning",
"in",
"{"
] | train | https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Graphics.java#L218-L230 |
ops4j/org.ops4j.pax.logging | pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java | PropertiesUtil.getBooleanProperty | public boolean getBooleanProperty(final String name, final boolean defaultValue) {
"""
Gets the named property as a boolean value.
@param name the name of the property to look up
@param defaultValue the default value to use if the property is undefined
@return the boolean value of the property or {@code defau... | java | public boolean getBooleanProperty(final String name, final boolean defaultValue) {
final String prop = getStringProperty(name);
return prop == null ? defaultValue : "true".equalsIgnoreCase(prop);
} | [
"public",
"boolean",
"getBooleanProperty",
"(",
"final",
"String",
"name",
",",
"final",
"boolean",
"defaultValue",
")",
"{",
"final",
"String",
"prop",
"=",
"getStringProperty",
"(",
"name",
")",
";",
"return",
"prop",
"==",
"null",
"?",
"defaultValue",
":",
... | Gets the named property as a boolean value.
@param name the name of the property to look up
@param defaultValue the default value to use if the property is undefined
@return the boolean value of the property or {@code defaultValue} if undefined. | [
"Gets",
"the",
"named",
"property",
"as",
"a",
"boolean",
"value",
"."
] | train | https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L132-L135 |
xmlet/XsdAsmFaster | src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java | XsdAsmInterfaces.createElementsForSequence | private void createElementsForSequence(String className, String typeName, String nextTypeName, String apiName, List<XsdElement> sequenceElements) {
"""
Creates the inner classes that are used to support the sequence behaviour and the respective sequence methods.
@param className The name of the class which contai... | java | private void createElementsForSequence(String className, String typeName, String nextTypeName, String apiName, List<XsdElement> sequenceElements) {
ClassWriter classWriter = generateInnerSequenceClass(typeName, className, apiName);
sequenceElements.forEach(sequenceElement ->
... | [
"private",
"void",
"createElementsForSequence",
"(",
"String",
"className",
",",
"String",
"typeName",
",",
"String",
"nextTypeName",
",",
"String",
"apiName",
",",
"List",
"<",
"XsdElement",
">",
"sequenceElements",
")",
"{",
"ClassWriter",
"classWriter",
"=",
"g... | Creates the inner classes that are used to support the sequence behaviour and the respective sequence methods.
@param className The name of the class which contains the sequence.
@param typeName The name of the next type to return.
@param apiName The name of the generated fluent interface.
@param nextTypeName The nextT... | [
"Creates",
"the",
"inner",
"classes",
"that",
"are",
"used",
"to",
"support",
"the",
"sequence",
"behaviour",
"and",
"the",
"respective",
"sequence",
"methods",
"."
] | train | https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmInterfaces.java#L481-L492 |
BranchMetrics/android-branch-deep-linking | Branch-SDK/src/io/branch/referral/Branch.java | Branch.initSession | public boolean initSession(BranchReferralInitListener callback, boolean isReferrable, Activity activity) {
"""
<p>Initialises a session with the Branch API.</p>
@param callback A {@link BranchReferralInitListener} instance that will be called
following successful (or unsuccessful) initialisation of the ses... | java | public boolean initSession(BranchReferralInitListener callback, boolean isReferrable, Activity activity) {
initUserSessionInternal(callback, activity, isReferrable);
return true;
} | [
"public",
"boolean",
"initSession",
"(",
"BranchReferralInitListener",
"callback",
",",
"boolean",
"isReferrable",
",",
"Activity",
"activity",
")",
"{",
"initUserSessionInternal",
"(",
"callback",
",",
"activity",
",",
"isReferrable",
")",
";",
"return",
"true",
";... | <p>Initialises a session with the Branch API.</p>
@param callback A {@link BranchReferralInitListener} instance that will be called
following successful (or unsuccessful) initialisation of the session
with the Branch API.
@param isReferrable A {@link Boolean} value indicating whether this initialisation
session sh... | [
"<p",
">",
"Initialises",
"a",
"session",
"with",
"the",
"Branch",
"API",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/BranchMetrics/android-branch-deep-linking/blob/e3bee2ccfcbf6d4bf1a5815b5b86666e4ff8f848/Branch-SDK/src/io/branch/referral/Branch.java#L1329-L1332 |
geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java | DefaultFeatureForm.setValue | public void setValue(String name, BooleanAttribute attribute) {
"""
Apply a boolean attribute value on the form, with the given name.
@param name attribute name
@param attribute attribute value
@since 1.11.1
"""
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.... | java | public void setValue(String name, BooleanAttribute attribute) {
FormItem item = formWidget.getField(name);
if (item != null) {
item.setValue(attribute.getValue());
}
} | [
"public",
"void",
"setValue",
"(",
"String",
"name",
",",
"BooleanAttribute",
"attribute",
")",
"{",
"FormItem",
"item",
"=",
"formWidget",
".",
"getField",
"(",
"name",
")",
";",
"if",
"(",
"item",
"!=",
"null",
")",
"{",
"item",
".",
"setValue",
"(",
... | Apply a boolean attribute value on the form, with the given name.
@param name attribute name
@param attribute attribute value
@since 1.11.1 | [
"Apply",
"a",
"boolean",
"attribute",
"value",
"on",
"the",
"form",
"with",
"the",
"given",
"name",
"."
] | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/attribute/DefaultFeatureForm.java#L483-L488 |
interedition/collatex | collatex-core/src/main/java/eu/interedition/collatex/suffixarray/BPR.java | BPR.buildSuffixArray | @Override
public int[] buildSuffixArray(int[] input, int start, int length) {
"""
{@inheritDoc}
<p>
Additional constraints enforced by BPR algorithm:
<ul>
<li>input array must contain at least {@link #KBS_STRING_EXTENSION_SIZE} extra
cells</li>
<li>non-negative (≥0) symbols in the input</li>
<li>symb... | java | @Override
public int[] buildSuffixArray(int[] input, int start, int length) {
Tools.assertAlways(input != null, "input must not be null");
Tools.assertAlways(input.length >= start + length + KBS_STRING_EXTENSION_SIZE,
"input is too short");
Tools.assertAlways(length >= 2, "input ... | [
"@",
"Override",
"public",
"int",
"[",
"]",
"buildSuffixArray",
"(",
"int",
"[",
"]",
"input",
",",
"int",
"start",
",",
"int",
"length",
")",
"{",
"Tools",
".",
"assertAlways",
"(",
"input",
"!=",
"null",
",",
"\"input must not be null\"",
")",
";",
"To... | {@inheritDoc}
<p>
Additional constraints enforced by BPR algorithm:
<ul>
<li>input array must contain at least {@link #KBS_STRING_EXTENSION_SIZE} extra
cells</li>
<li>non-negative (≥0) symbols in the input</li>
<li>symbols limited by {@link #KBS_MAX_ALPHABET_SIZE} (<
<code>KBS_MAX_ALPHABET_SIZE</code>)</li>
<li>l... | [
"{"
] | train | https://github.com/interedition/collatex/blob/76dd1fcc36047bc66a87d31142e72e98b5347821/collatex-core/src/main/java/eu/interedition/collatex/suffixarray/BPR.java#L99-L135 |
moparisthebest/beehive | beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java | ScopedServletUtils.getRelativeURI | public static final String getRelativeURI( HttpServletRequest request, String uri ) {
"""
Get a URI relative to the webapp root.
@param request the current HttpServletRequest.
@param uri the URI which should be made relative.
"""
return getRelativeURI( request.getContextPath(), uri );
} | java | public static final String getRelativeURI( HttpServletRequest request, String uri )
{
return getRelativeURI( request.getContextPath(), uri );
} | [
"public",
"static",
"final",
"String",
"getRelativeURI",
"(",
"HttpServletRequest",
"request",
",",
"String",
"uri",
")",
"{",
"return",
"getRelativeURI",
"(",
"request",
".",
"getContextPath",
"(",
")",
",",
"uri",
")",
";",
"}"
] | Get a URI relative to the webapp root.
@param request the current HttpServletRequest.
@param uri the URI which should be made relative. | [
"Get",
"a",
"URI",
"relative",
"to",
"the",
"webapp",
"root",
"."
] | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/scoping/ScopedServletUtils.java#L384-L387 |
SonarSource/sonarqube | server/sonar-db-dao/src/main/java/org/sonar/db/alm/ProjectAlmBindingDao.java | ProjectAlmBindingDao.selectByRepoIds | public List<ProjectAlmBindingDto> selectByRepoIds(final DbSession session, ALM alm, Collection<String> repoIds) {
"""
Gets a list of bindings by their repo_id. The result does NOT contain {@code null} values for bindings not found, so
the size of result may be less than the number of ids.
<p>Results may be in a ... | java | public List<ProjectAlmBindingDto> selectByRepoIds(final DbSession session, ALM alm, Collection<String> repoIds) {
return executeLargeInputs(repoIds, partitionedIds -> getMapper(session).selectByRepoIds(alm.getId(), partitionedIds));
} | [
"public",
"List",
"<",
"ProjectAlmBindingDto",
">",
"selectByRepoIds",
"(",
"final",
"DbSession",
"session",
",",
"ALM",
"alm",
",",
"Collection",
"<",
"String",
">",
"repoIds",
")",
"{",
"return",
"executeLargeInputs",
"(",
"repoIds",
",",
"partitionedIds",
"->... | Gets a list of bindings by their repo_id. The result does NOT contain {@code null} values for bindings not found, so
the size of result may be less than the number of ids.
<p>Results may be in a different order as input ids.</p> | [
"Gets",
"a",
"list",
"of",
"bindings",
"by",
"their",
"repo_id",
".",
"The",
"result",
"does",
"NOT",
"contain",
"{"
] | train | https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-dao/src/main/java/org/sonar/db/alm/ProjectAlmBindingDao.java#L69-L71 |
EdwardRaff/JSAT | JSAT/src/jsat/classifiers/linear/NHERD.java | NHERD.setC | public void setC(double C) {
"""
Set the aggressiveness parameter. Increasing the value of this parameter
increases the aggressiveness of the algorithm. It must be a positive
value. This parameter essentially performs a type of regularization on
the updates
@param C the positive aggressiveness parameter
... | java | public void setC(double C)
{
if(Double.isNaN(C) || Double.isInfinite(C) || C <= 0)
throw new IllegalArgumentException("C must be a postive constant, not " + C);
this.C = C;
} | [
"public",
"void",
"setC",
"(",
"double",
"C",
")",
"{",
"if",
"(",
"Double",
".",
"isNaN",
"(",
"C",
")",
"||",
"Double",
".",
"isInfinite",
"(",
"C",
")",
"||",
"C",
"<=",
"0",
")",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"C must be a posti... | Set the aggressiveness parameter. Increasing the value of this parameter
increases the aggressiveness of the algorithm. It must be a positive
value. This parameter essentially performs a type of regularization on
the updates
@param C the positive aggressiveness parameter | [
"Set",
"the",
"aggressiveness",
"parameter",
".",
"Increasing",
"the",
"value",
"of",
"this",
"parameter",
"increases",
"the",
"aggressiveness",
"of",
"the",
"algorithm",
".",
"It",
"must",
"be",
"a",
"positive",
"value",
".",
"This",
"parameter",
"essentially",... | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/classifiers/linear/NHERD.java#L130-L135 |
threerings/narya | core/src/main/java/com/threerings/presents/server/TimeBaseProvider.java | TimeBaseProvider.init | public static void init (InvocationManager invmgr, RootDObjectManager omgr) {
"""
Registers the time provider with the appropriate managers. Called by the presents server at
startup.
"""
// we'll need these later
_invmgr = invmgr;
_omgr = omgr;
// register a provider instance
... | java | public static void init (InvocationManager invmgr, RootDObjectManager omgr)
{
// we'll need these later
_invmgr = invmgr;
_omgr = omgr;
// register a provider instance
invmgr.registerProvider(new TimeBaseProvider(), TimeBaseMarshaller.class, GLOBAL_GROUP);
} | [
"public",
"static",
"void",
"init",
"(",
"InvocationManager",
"invmgr",
",",
"RootDObjectManager",
"omgr",
")",
"{",
"// we'll need these later",
"_invmgr",
"=",
"invmgr",
";",
"_omgr",
"=",
"omgr",
";",
"// register a provider instance",
"invmgr",
".",
"registerProvi... | Registers the time provider with the appropriate managers. Called by the presents server at
startup. | [
"Registers",
"the",
"time",
"provider",
"with",
"the",
"appropriate",
"managers",
".",
"Called",
"by",
"the",
"presents",
"server",
"at",
"startup",
"."
] | train | https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/TimeBaseProvider.java#L47-L55 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.updateCustomPrebuiltEntityRoleAsync | public Observable<OperationStatus> updateCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) {
"""
Update an entity role for a given entity.
@param appId The application ID.
@par... | java | public Observable<OperationStatus> updateCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) {
return updateCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, enti... | [
"public",
"Observable",
"<",
"OperationStatus",
">",
"updateCustomPrebuiltEntityRoleAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"UUID",
"roleId",
",",
"UpdateCustomPrebuiltEntityRoleOptionalParameter",
"updateCustomPrebuiltEntityRol... | Update an entity role for a given entity.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity ID.
@param roleId The entity role ID.
@param updateCustomPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API
@throws I... | [
"Update",
"an",
"entity",
"role",
"for",
"a",
"given",
"entity",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13694-L13701 |
apache/groovy | src/main/java/org/codehaus/groovy/syntax/Token.java | Token.newSymbol | public static Token newSymbol(String type, int startLine, int startColumn) {
"""
Creates a token that represents a symbol, using a library for the type.
"""
return new Token(Types.lookupSymbol(type), type, startLine, startColumn);
} | java | public static Token newSymbol(String type, int startLine, int startColumn) {
return new Token(Types.lookupSymbol(type), type, startLine, startColumn);
} | [
"public",
"static",
"Token",
"newSymbol",
"(",
"String",
"type",
",",
"int",
"startLine",
",",
"int",
"startColumn",
")",
"{",
"return",
"new",
"Token",
"(",
"Types",
".",
"lookupSymbol",
"(",
"type",
")",
",",
"type",
",",
"startLine",
",",
"startColumn",... | Creates a token that represents a symbol, using a library for the type. | [
"Creates",
"a",
"token",
"that",
"represents",
"a",
"symbol",
"using",
"a",
"library",
"for",
"the",
"type",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/syntax/Token.java#L268-L270 |
Azure/azure-sdk-for-java | datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java | ServicesInner.createOrUpdate | public DataMigrationServiceInner createOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) {
"""
Create or update DMS Instance.
The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing o... | java | public DataMigrationServiceInner createOrUpdate(String groupName, String serviceName, DataMigrationServiceInner parameters) {
return createOrUpdateWithServiceResponseAsync(groupName, serviceName, parameters).toBlocking().last().body();
} | [
"public",
"DataMigrationServiceInner",
"createOrUpdate",
"(",
"String",
"groupName",
",",
"String",
"serviceName",
",",
"DataMigrationServiceInner",
"parameters",
")",
"{",
"return",
"createOrUpdateWithServiceResponseAsync",
"(",
"groupName",
",",
"serviceName",
",",
"param... | Create or update DMS Instance.
The services resource is the top-level resource that represents the Data Migration Service. The PUT method creates a new service or updates an existing one. When a service is updated, existing child resources (i.e. tasks) are unaffected. Services currently support a single kind, "vm", whi... | [
"Create",
"or",
"update",
"DMS",
"Instance",
".",
"The",
"services",
"resource",
"is",
"the",
"top",
"-",
"level",
"resource",
"that",
"represents",
"the",
"Data",
"Migration",
"Service",
".",
"The",
"PUT",
"method",
"creates",
"a",
"new",
"service",
"or",
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datamigration/resource-manager/v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/ServicesInner.java#L164-L166 |
ngageoint/geopackage-android-map | geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java | StyleCache.setFeatureStyle | public boolean setFeatureStyle(PolygonOptions polygonOptions, FeatureRow featureRow) {
"""
Set the feature row style into the polygon options
@param polygonOptions polygon options
@param featureRow feature row
@return true if style was set into the polygon options
"""
return StyleUtils.setFeat... | java | public boolean setFeatureStyle(PolygonOptions polygonOptions, FeatureRow featureRow) {
return StyleUtils.setFeatureStyle(polygonOptions, featureStyleExtension, featureRow, density);
} | [
"public",
"boolean",
"setFeatureStyle",
"(",
"PolygonOptions",
"polygonOptions",
",",
"FeatureRow",
"featureRow",
")",
"{",
"return",
"StyleUtils",
".",
"setFeatureStyle",
"(",
"polygonOptions",
",",
"featureStyleExtension",
",",
"featureRow",
",",
"density",
")",
";"... | Set the feature row style into the polygon options
@param polygonOptions polygon options
@param featureRow feature row
@return true if style was set into the polygon options | [
"Set",
"the",
"feature",
"row",
"style",
"into",
"the",
"polygon",
"options"
] | train | https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/features/StyleCache.java#L292-L294 |
datumbox/lpsolve | src/main/java/lpsolve/LpSolve.java | LpSolve.putLogfunc | public void putLogfunc(LogListener listener, Object userhandle) throws LpSolveException {
"""
Register an <code>LogListener</code> for callback.
@param listener the listener that should be called by lp_solve
@param userhandle an arbitrary object that is passed to the listener on call
"""
logListener = l... | java | public void putLogfunc(LogListener listener, Object userhandle) throws LpSolveException {
logListener = listener;
logUserhandle = (listener != null) ? userhandle : null;
addLp(this);
registerLogfunc();
} | [
"public",
"void",
"putLogfunc",
"(",
"LogListener",
"listener",
",",
"Object",
"userhandle",
")",
"throws",
"LpSolveException",
"{",
"logListener",
"=",
"listener",
";",
"logUserhandle",
"=",
"(",
"listener",
"!=",
"null",
")",
"?",
"userhandle",
":",
"null",
... | Register an <code>LogListener</code> for callback.
@param listener the listener that should be called by lp_solve
@param userhandle an arbitrary object that is passed to the listener on call | [
"Register",
"an",
"<code",
">",
"LogListener<",
"/",
"code",
">",
"for",
"callback",
"."
] | train | https://github.com/datumbox/lpsolve/blob/201b3e99153d907bb99c189e5647bc71a3a1add6/src/main/java/lpsolve/LpSolve.java#L1613-L1618 |
looly/hutool | hutool-db/src/main/java/cn/hutool/db/Entity.java | Entity.parse | public static <T> Entity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
"""
将PO对象转为Entity
@param <T> Bean对象类型
@param bean Bean对象
@param isToUnderlineCase 是否转换为下划线模式
@param ignoreNullValue 是否忽略值为空的字段
@return Entity
"""
return create(null).parseBean(bean, isToUnderlineCase, ignoreN... | java | public static <T> Entity parse(T bean, boolean isToUnderlineCase, boolean ignoreNullValue) {
return create(null).parseBean(bean, isToUnderlineCase, ignoreNullValue);
} | [
"public",
"static",
"<",
"T",
">",
"Entity",
"parse",
"(",
"T",
"bean",
",",
"boolean",
"isToUnderlineCase",
",",
"boolean",
"ignoreNullValue",
")",
"{",
"return",
"create",
"(",
"null",
")",
".",
"parseBean",
"(",
"bean",
",",
"isToUnderlineCase",
",",
"i... | 将PO对象转为Entity
@param <T> Bean对象类型
@param bean Bean对象
@param isToUnderlineCase 是否转换为下划线模式
@param ignoreNullValue 是否忽略值为空的字段
@return Entity | [
"将PO对象转为Entity"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-db/src/main/java/cn/hutool/db/Entity.java#L74-L76 |
biojava/biojava | biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/OptimalCECPMain.java | OptimalCECPMain.permuteAFPChain | private static void permuteAFPChain(AFPChain afpChain, int cp) {
"""
Permute the second protein of afpChain by the specified number of residues.
@param afpChain Input alignment
@param cp Amount leftwards (or rightward, if negative) to shift the
@return A new alignment equivalent to afpChain after the permutatio... | java | private static void permuteAFPChain(AFPChain afpChain, int cp) {
int ca2len = afpChain.getCa2Length();
//fix up cp to be positive
if(cp == 0) {
return;
}
if(cp < 0) {
cp = ca2len+cp;
}
if(cp < 0 || cp >= ca2len) {
throw new ArrayIndexOutOfBoundsException(
"Permutation point ("+cp+") must b... | [
"private",
"static",
"void",
"permuteAFPChain",
"(",
"AFPChain",
"afpChain",
",",
"int",
"cp",
")",
"{",
"int",
"ca2len",
"=",
"afpChain",
".",
"getCa2Length",
"(",
")",
";",
"//fix up cp to be positive",
"if",
"(",
"cp",
"==",
"0",
")",
"{",
"return",
";"... | Permute the second protein of afpChain by the specified number of residues.
@param afpChain Input alignment
@param cp Amount leftwards (or rightward, if negative) to shift the
@return A new alignment equivalent to afpChain after the permutations | [
"Permute",
"the",
"second",
"protein",
"of",
"afpChain",
"by",
"the",
"specified",
"number",
"of",
"residues",
"."
] | train | https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce/OptimalCECPMain.java#L217-L246 |
aws/aws-sdk-java | aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ChannelsResponse.java | ChannelsResponse.withChannels | public ChannelsResponse withChannels(java.util.Map<String, ChannelResponse> channels) {
"""
A map of channels, with the ChannelType as the key and the Channel as the value.
@param channels
A map of channels, with the ChannelType as the key and the Channel as the value.
@return Returns a reference to this obje... | java | public ChannelsResponse withChannels(java.util.Map<String, ChannelResponse> channels) {
setChannels(channels);
return this;
} | [
"public",
"ChannelsResponse",
"withChannels",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"ChannelResponse",
">",
"channels",
")",
"{",
"setChannels",
"(",
"channels",
")",
";",
"return",
"this",
";",
"}"
] | A map of channels, with the ChannelType as the key and the Channel as the value.
@param channels
A map of channels, with the ChannelType as the key and the Channel as the value.
@return Returns a reference to this object so that method calls can be chained together. | [
"A",
"map",
"of",
"channels",
"with",
"the",
"ChannelType",
"as",
"the",
"key",
"and",
"the",
"Channel",
"as",
"the",
"value",
"."
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/ChannelsResponse.java#L61-L64 |
lessthanoptimal/BoofCV | main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java | MultiViewOps.createEssential | public static DMatrixRMaj createEssential(DMatrixRMaj R, Vector3D_F64 T, @Nullable DMatrixRMaj E) {
"""
<p>
Computes an essential matrix from a rotation and translation. This motion
is the motion from the first camera frame into the second camera frame. The essential
matrix 'E' is defined as:<br>
E = hat(T)*... | java | public static DMatrixRMaj createEssential(DMatrixRMaj R, Vector3D_F64 T, @Nullable DMatrixRMaj E)
{
if( E == null )
E = new DMatrixRMaj(3,3);
DMatrixRMaj T_hat = GeometryMath_F64.crossMatrix(T, null);
CommonOps_DDRM.mult(T_hat, R, E);
return E;
} | [
"public",
"static",
"DMatrixRMaj",
"createEssential",
"(",
"DMatrixRMaj",
"R",
",",
"Vector3D_F64",
"T",
",",
"@",
"Nullable",
"DMatrixRMaj",
"E",
")",
"{",
"if",
"(",
"E",
"==",
"null",
")",
"E",
"=",
"new",
"DMatrixRMaj",
"(",
"3",
",",
"3",
")",
";"... | <p>
Computes an essential matrix from a rotation and translation. This motion
is the motion from the first camera frame into the second camera frame. The essential
matrix 'E' is defined as:<br>
E = hat(T)*R<br>
where hat(T) is the skew symmetric cross product matrix for vector T.
</p>
@param R Rotation matrix.
@para... | [
"<p",
">",
"Computes",
"an",
"essential",
"matrix",
"from",
"a",
"rotation",
"and",
"translation",
".",
"This",
"motion",
"is",
"the",
"motion",
"from",
"the",
"first",
"camera",
"frame",
"into",
"the",
"second",
"camera",
"frame",
".",
"The",
"essential",
... | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L667-L676 |
orbisgis/h2gis | h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ClosestCoordinate.java | ST_ClosestCoordinate.getFurthestCoordinate | public static Geometry getFurthestCoordinate(Point point, Geometry geom) {
"""
Computes the closest coordinate(s) contained in the given geometry starting
from the given point, using the 2D distance.
@param point Point
@param geom Geometry
@return The closest coordinate(s) contained in the given geometry st... | java | public static Geometry getFurthestCoordinate(Point point, Geometry geom) {
if (point == null || geom == null) {
return null;
}
double minDistance = Double.POSITIVE_INFINITY;
Coordinate pointCoordinate = point.getCoordinate();
Set<Coordinate> closestCoordinates = new H... | [
"public",
"static",
"Geometry",
"getFurthestCoordinate",
"(",
"Point",
"point",
",",
"Geometry",
"geom",
")",
"{",
"if",
"(",
"point",
"==",
"null",
"||",
"geom",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"double",
"minDistance",
"=",
"Double",
... | Computes the closest coordinate(s) contained in the given geometry starting
from the given point, using the 2D distance.
@param point Point
@param geom Geometry
@return The closest coordinate(s) contained in the given geometry starting from
the given point, using the 2D distance | [
"Computes",
"the",
"closest",
"coordinate",
"(",
"s",
")",
"contained",
"in",
"the",
"given",
"geometry",
"starting",
"from",
"the",
"given",
"point",
"using",
"the",
"2D",
"distance",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/distance/ST_ClosestCoordinate.java#L64-L87 |
datumbox/datumbox-framework | datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/onesample/DurbinWatson.java | DurbinWatson.checkCriticalValue | public static boolean checkCriticalValue(double score, int n, int k, boolean is_twoTailed, double aLevel) {
"""
Checks the Critical Value to determine if the Hypothesis should be rejected
@param score
@param n
@param k
@param is_twoTailed
@param aLevel
@return
"""
/*
if(n<=200 && k<=20)... | java | public static boolean checkCriticalValue(double score, int n, int k, boolean is_twoTailed, double aLevel) {
/*
if(n<=200 && k<=20) {
//Calculate it from tables
//http://www3.nd.edu/~wevans1/econ30331/Durbin_Watson_tables.pdf
}
*/
//Follows normal ... | [
"public",
"static",
"boolean",
"checkCriticalValue",
"(",
"double",
"score",
",",
"int",
"n",
",",
"int",
"k",
",",
"boolean",
"is_twoTailed",
",",
"double",
"aLevel",
")",
"{",
"/*\n if(n<=200 && k<=20) {\n //Calculate it from tables\n //http:/... | Checks the Critical Value to determine if the Hypothesis should be rejected
@param score
@param n
@param k
@param is_twoTailed
@param aLevel
@return | [
"Checks",
"the",
"Critical",
"Value",
"to",
"determine",
"if",
"the",
"Hypothesis",
"should",
"be",
"rejected"
] | train | https://github.com/datumbox/datumbox-framework/blob/909dff0476e80834f05ecdde0624dd2390e9b0ca/datumbox-framework-core/src/main/java/com/datumbox/framework/core/statistics/parametrics/onesample/DurbinWatson.java#L86-L111 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/util/BooleanExpressionParser.java | BooleanExpressionParser.parseDigits | private static String parseDigits(final String expression, final int startIndex) {
"""
This method reads digit characters from a given string, starting at a given index.
It will read till the end of the string or up until it encounters a non-digit character
@param expression The string to parse
@param startIn... | java | private static String parseDigits(final String expression, final int startIndex) {
final StringBuilder digitBuffer = new StringBuilder();
char currentCharacter = expression.charAt(startIndex);
int subExpressionIndex = startIndex;
do {
digitBuffer.append(currentCharacter);
... | [
"private",
"static",
"String",
"parseDigits",
"(",
"final",
"String",
"expression",
",",
"final",
"int",
"startIndex",
")",
"{",
"final",
"StringBuilder",
"digitBuffer",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"char",
"currentCharacter",
"=",
"expression",
"... | This method reads digit characters from a given string, starting at a given index.
It will read till the end of the string or up until it encounters a non-digit character
@param expression The string to parse
@param startIndex The start index from where to parse
@return The parsed substring | [
"This",
"method",
"reads",
"digit",
"characters",
"from",
"a",
"given",
"string",
"starting",
"at",
"a",
"given",
"index",
".",
"It",
"will",
"read",
"till",
"the",
"end",
"of",
"the",
"string",
"or",
"up",
"until",
"it",
"encounters",
"a",
"non",
"-",
... | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/util/BooleanExpressionParser.java#L178-L194 |
VoltDB/voltdb | third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java | DataTree.listACLEquals | private boolean listACLEquals(List<ACL> lista, List<ACL> listb) {
"""
compare two list of acls. if there elements are in the same order and the
same size then return true else return false
@param lista
the list to be compared
@param listb
the list to be compared
@return true if and only if the lists are of... | java | private boolean listACLEquals(List<ACL> lista, List<ACL> listb) {
if (lista.size() != listb.size()) {
return false;
}
for (int i = 0; i < lista.size(); i++) {
ACL a = lista.get(i);
ACL b = listb.get(i);
if (!a.equals(b)) {
return fa... | [
"private",
"boolean",
"listACLEquals",
"(",
"List",
"<",
"ACL",
">",
"lista",
",",
"List",
"<",
"ACL",
">",
"listb",
")",
"{",
"if",
"(",
"lista",
".",
"size",
"(",
")",
"!=",
"listb",
".",
"size",
"(",
")",
")",
"{",
"return",
"false",
";",
"}",... | compare two list of acls. if there elements are in the same order and the
same size then return true else return false
@param lista
the list to be compared
@param listb
the list to be compared
@return true if and only if the lists are of the same size and the
elements are in the same order in lista and listb | [
"compare",
"two",
"list",
"of",
"acls",
".",
"if",
"there",
"elements",
"are",
"in",
"the",
"same",
"order",
"and",
"the",
"same",
"size",
"then",
"return",
"true",
"else",
"return",
"false"
] | train | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L168-L180 |
alkacon/opencms-core | src/org/opencms/ui/apps/cacheadmin/CmsImageCacheHelper.java | CmsImageCacheHelper.getSingleSize | public String getSingleSize(CmsObject cms, String resPath) throws CmsException {
"""
Reads the size of a single image.<p>
@param cms CmsObejct
@param resPath Path of image (uri)
@return a String representation of the dimension of the given image
@throws CmsException if something goes wrong
"""
C... | java | public String getSingleSize(CmsObject cms, String resPath) throws CmsException {
CmsResource res = getClonedCmsObject(cms).readResource(resPath);
return getSingleSize(cms, res);
} | [
"public",
"String",
"getSingleSize",
"(",
"CmsObject",
"cms",
",",
"String",
"resPath",
")",
"throws",
"CmsException",
"{",
"CmsResource",
"res",
"=",
"getClonedCmsObject",
"(",
"cms",
")",
".",
"readResource",
"(",
"resPath",
")",
";",
"return",
"getSingleSize"... | Reads the size of a single image.<p>
@param cms CmsObejct
@param resPath Path of image (uri)
@return a String representation of the dimension of the given image
@throws CmsException if something goes wrong | [
"Reads",
"the",
"size",
"of",
"a",
"single",
"image",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/cacheadmin/CmsImageCacheHelper.java#L135-L139 |
albfernandez/itext2 | src/main/java/com/lowagie/text/rtf/table/RtfTable.java | RtfTable.importTable | private void importTable(Table table) {
"""
Imports the rows and settings from the Table into this
RtfTable.
@param table The source Table
"""
this.rows = new ArrayList();
this.tableWidthPercent = table.getWidth();
this.proportionalWidths = table.getProportionalWidths();
thi... | java | private void importTable(Table table) {
this.rows = new ArrayList();
this.tableWidthPercent = table.getWidth();
this.proportionalWidths = table.getProportionalWidths();
this.cellPadding = (float) (table.getPadding() * TWIPS_FACTOR);
this.cellSpacing = (float) (table.getSpacing() ... | [
"private",
"void",
"importTable",
"(",
"Table",
"table",
")",
"{",
"this",
".",
"rows",
"=",
"new",
"ArrayList",
"(",
")",
";",
"this",
".",
"tableWidthPercent",
"=",
"table",
".",
"getWidth",
"(",
")",
";",
"this",
".",
"proportionalWidths",
"=",
"table... | Imports the rows and settings from the Table into this
RtfTable.
@param table The source Table | [
"Imports",
"the",
"rows",
"and",
"settings",
"from",
"the",
"Table",
"into",
"this",
"RtfTable",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/rtf/table/RtfTable.java#L155-L180 |
h2oai/h2o-2 | src/main/java/hex/deeplearning/DeepLearning.java | DeepLearning.computeRowUsageFraction | private static float computeRowUsageFraction(final long numRows, final long train_samples_per_iteration, final boolean replicate_training_data) {
"""
Compute the fraction of rows that need to be used for training during one iteration
@param numRows number of training rows
@param train_samples_per_iteration numbe... | java | private static float computeRowUsageFraction(final long numRows, final long train_samples_per_iteration, final boolean replicate_training_data) {
float rowUsageFraction = (float)train_samples_per_iteration / numRows;
if (replicate_training_data) rowUsageFraction /= H2O.CLOUD.size();
assert(rowUsageFraction ... | [
"private",
"static",
"float",
"computeRowUsageFraction",
"(",
"final",
"long",
"numRows",
",",
"final",
"long",
"train_samples_per_iteration",
",",
"final",
"boolean",
"replicate_training_data",
")",
"{",
"float",
"rowUsageFraction",
"=",
"(",
"float",
")",
"train_sam... | Compute the fraction of rows that need to be used for training during one iteration
@param numRows number of training rows
@param train_samples_per_iteration number of training rows to be processed per iteration
@param replicate_training_data whether of not the training data is replicated on each node
@return fraction ... | [
"Compute",
"the",
"fraction",
"of",
"rows",
"that",
"need",
"to",
"be",
"used",
"for",
"training",
"during",
"one",
"iteration"
] | train | https://github.com/h2oai/h2o-2/blob/be350f3f2c2fb6f135cc07c41f83fd0e4f521ac1/src/main/java/hex/deeplearning/DeepLearning.java#L1288-L1293 |
FXMisc/RichTextFX | richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocument.java | ReadOnlyStyledDocument.summaryProvider | private static <PS, SEG, S> ToSemigroup<Paragraph<PS, SEG, S>, Summary> summaryProvider() {
"""
Private method for quickly calculating the length of a portion (subdocument) of this document.
"""
return new ToSemigroup<Paragraph<PS, SEG, S>, Summary>() {
@Override
public Summary... | java | private static <PS, SEG, S> ToSemigroup<Paragraph<PS, SEG, S>, Summary> summaryProvider() {
return new ToSemigroup<Paragraph<PS, SEG, S>, Summary>() {
@Override
public Summary apply(Paragraph<PS, SEG, S> p) {
return new Summary(1, p.length());
}
... | [
"private",
"static",
"<",
"PS",
",",
"SEG",
",",
"S",
">",
"ToSemigroup",
"<",
"Paragraph",
"<",
"PS",
",",
"SEG",
",",
"S",
">",
",",
"Summary",
">",
"summaryProvider",
"(",
")",
"{",
"return",
"new",
"ToSemigroup",
"<",
"Paragraph",
"<",
"PS",
",",... | Private method for quickly calculating the length of a portion (subdocument) of this document. | [
"Private",
"method",
"for",
"quickly",
"calculating",
"the",
"length",
"of",
"a",
"portion",
"(",
"subdocument",
")",
"of",
"this",
"document",
"."
] | train | https://github.com/FXMisc/RichTextFX/blob/bc7cab6a637855e0f37d9b9c12a9172c31545f0b/richtextfx/src/main/java/org/fxmisc/richtext/model/ReadOnlyStyledDocument.java#L64-L80 |
grails/gorm-hibernate5 | grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java | GrailsHibernateUtil.addOrderPossiblyNested | private static void addOrderPossiblyNested(AbstractHibernateDatastore datastore, Criteria c, Class<?> targetClass, String sort, String order, boolean ignoreCase) {
"""
Add order to criteria, creating necessary subCriteria if nested sort property (ie. sort:'nested.property').
"""
int firstDotPos = sort.... | java | private static void addOrderPossiblyNested(AbstractHibernateDatastore datastore, Criteria c, Class<?> targetClass, String sort, String order, boolean ignoreCase) {
int firstDotPos = sort.indexOf(".");
if (firstDotPos == -1) {
addOrder(c, sort, order, ignoreCase);
} else { // nested p... | [
"private",
"static",
"void",
"addOrderPossiblyNested",
"(",
"AbstractHibernateDatastore",
"datastore",
",",
"Criteria",
"c",
",",
"Class",
"<",
"?",
">",
"targetClass",
",",
"String",
"sort",
",",
"String",
"order",
",",
"boolean",
"ignoreCase",
")",
"{",
"int",... | Add order to criteria, creating necessary subCriteria if nested sort property (ie. sort:'nested.property'). | [
"Add",
"order",
"to",
"criteria",
"creating",
"necessary",
"subCriteria",
"if",
"nested",
"sort",
"property",
"(",
"ie",
".",
"sort",
":",
"nested",
".",
"property",
")",
"."
] | train | https://github.com/grails/gorm-hibernate5/blob/0ebb80cd769ef2bea955723d4543828a3e9542ef/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/cfg/GrailsHibernateUtil.java#L206-L224 |
j256/simplecsv | src/main/java/com/j256/simplecsv/processor/CsvProcessor.java | CsvProcessor.validateHeader | public boolean validateHeader(String line, ParseError parseError) throws ParseException {
"""
Validate the header row against the configured header columns.
@param line
Line to process to get our validate our header.
@param parseError
If not null, this will be set with the first parse error and it will retur... | java | public boolean validateHeader(String line, ParseError parseError) throws ParseException {
checkEntityConfig();
String[] columns = processHeader(line, parseError);
return validateHeaderColumns(columns, parseError, 1);
} | [
"public",
"boolean",
"validateHeader",
"(",
"String",
"line",
",",
"ParseError",
"parseError",
")",
"throws",
"ParseException",
"{",
"checkEntityConfig",
"(",
")",
";",
"String",
"[",
"]",
"columns",
"=",
"processHeader",
"(",
"line",
",",
"parseError",
")",
"... | Validate the header row against the configured header columns.
@param line
Line to process to get our validate our header.
@param parseError
If not null, this will be set with the first parse error and it will return null. If this is null then
a ParseException will be thrown instead.
@return true if the header matched... | [
"Validate",
"the",
"header",
"row",
"against",
"the",
"configured",
"header",
"columns",
"."
] | train | https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L327-L331 |
googleapis/google-cloud-java | google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java | GrafeasV1Beta1Client.listNoteOccurrences | public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) {
"""
Lists occurrences referencing the specified note. Provider projects can use this method to get
all occurrences across consumer projects referencing the specified note.
<p>Sample code:
<pre><code>
try (Graf... | java | public final ListNoteOccurrencesPagedResponse listNoteOccurrences(NoteName name, String filter) {
ListNoteOccurrencesRequest request =
ListNoteOccurrencesRequest.newBuilder()
.setName(name == null ? null : name.toString())
.setFilter(filter)
.build();
return listNoteO... | [
"public",
"final",
"ListNoteOccurrencesPagedResponse",
"listNoteOccurrences",
"(",
"NoteName",
"name",
",",
"String",
"filter",
")",
"{",
"ListNoteOccurrencesRequest",
"request",
"=",
"ListNoteOccurrencesRequest",
".",
"newBuilder",
"(",
")",
".",
"setName",
"(",
"name"... | Lists occurrences referencing the specified note. Provider projects can use this method to get
all occurrences across consumer projects referencing the specified note.
<p>Sample code:
<pre><code>
try (GrafeasV1Beta1Client grafeasV1Beta1Client = GrafeasV1Beta1Client.create()) {
NoteName name = NoteName.of("[PROJECT]",... | [
"Lists",
"occurrences",
"referencing",
"the",
"specified",
"note",
".",
"Provider",
"projects",
"can",
"use",
"this",
"method",
"to",
"get",
"all",
"occurrences",
"across",
"consumer",
"projects",
"referencing",
"the",
"specified",
"note",
"."
] | train | https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-containeranalysis/src/main/java/com/google/cloud/devtools/containeranalysis/v1beta1/GrafeasV1Beta1Client.java#L1618-L1625 |
gallandarakhneorg/afc | advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java | StandardRoadConnection.setPosition | void setPosition(Point2D<?, ?> position) {
"""
Set the temporary buffer of the position of the road connection.
@param position a position.
@since 4.0
"""
this.location = position == null ? null : new SoftReference<>(Point2d.convert(position));
} | java | void setPosition(Point2D<?, ?> position) {
this.location = position == null ? null : new SoftReference<>(Point2d.convert(position));
} | [
"void",
"setPosition",
"(",
"Point2D",
"<",
"?",
",",
"?",
">",
"position",
")",
"{",
"this",
".",
"location",
"=",
"position",
"==",
"null",
"?",
"null",
":",
"new",
"SoftReference",
"<>",
"(",
"Point2d",
".",
"convert",
"(",
"position",
")",
")",
"... | Set the temporary buffer of the position of the road connection.
@param position a position.
@since 4.0 | [
"Set",
"the",
"temporary",
"buffer",
"of",
"the",
"position",
"of",
"the",
"road",
"connection",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/gisroad/src/main/java/org/arakhne/afc/gis/road/StandardRoadConnection.java#L226-L228 |
line/armeria | jetty/src/main/java/com/linecorp/armeria/server/jetty/JettyService.java | JettyService.forServer | public static JettyService forServer(String hostname, Server jettyServer) {
"""
Creates a new {@link JettyService} from an existing Jetty {@link Server}.
@param hostname the default hostname
@param jettyServer the Jetty {@link Server}
"""
requireNonNull(hostname, "hostname");
requireNonNull... | java | public static JettyService forServer(String hostname, Server jettyServer) {
requireNonNull(hostname, "hostname");
requireNonNull(jettyServer, "jettyServer");
return new JettyService(hostname, blockingTaskExecutor -> jettyServer);
} | [
"public",
"static",
"JettyService",
"forServer",
"(",
"String",
"hostname",
",",
"Server",
"jettyServer",
")",
"{",
"requireNonNull",
"(",
"hostname",
",",
"\"hostname\"",
")",
";",
"requireNonNull",
"(",
"jettyServer",
",",
"\"jettyServer\"",
")",
";",
"return",
... | Creates a new {@link JettyService} from an existing Jetty {@link Server}.
@param hostname the default hostname
@param jettyServer the Jetty {@link Server} | [
"Creates",
"a",
"new",
"{",
"@link",
"JettyService",
"}",
"from",
"an",
"existing",
"Jetty",
"{",
"@link",
"Server",
"}",
"."
] | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/jetty/src/main/java/com/linecorp/armeria/server/jetty/JettyService.java#L94-L98 |
EdwardRaff/JSAT | JSAT/src/jsat/distributions/multivariate/NormalM.java | NormalM.setMeanCovariance | public void setMeanCovariance(Vec mean, Matrix covariance) {
"""
Sets the mean and covariance for this distribution. For an <i>n</i> dimensional distribution,
<tt>mean</tt> should be of length <i>n</i> and <tt>covariance</tt> should be an <i>n</i> by <i>n</i> matrix.
It is also a requirement that the matrix be s... | java | public void setMeanCovariance(Vec mean, Matrix covariance)
{
if(!covariance.isSquare())
throw new ArithmeticException("Covariance matrix must be square");
else if(mean.length() != covariance.rows())
throw new ArithmeticException("The mean vector and matrix must have the same ... | [
"public",
"void",
"setMeanCovariance",
"(",
"Vec",
"mean",
",",
"Matrix",
"covariance",
")",
"{",
"if",
"(",
"!",
"covariance",
".",
"isSquare",
"(",
")",
")",
"throw",
"new",
"ArithmeticException",
"(",
"\"Covariance matrix must be square\"",
")",
";",
"else",
... | Sets the mean and covariance for this distribution. For an <i>n</i> dimensional distribution,
<tt>mean</tt> should be of length <i>n</i> and <tt>covariance</tt> should be an <i>n</i> by <i>n</i> matrix.
It is also a requirement that the matrix be symmetric positive definite.
@param mean the mean for the distribution. A... | [
"Sets",
"the",
"mean",
"and",
"covariance",
"for",
"this",
"distribution",
".",
"For",
"an",
"<i",
">",
"n<",
"/",
"i",
">",
"dimensional",
"distribution",
"<tt",
">",
"mean<",
"/",
"tt",
">",
"should",
"be",
"of",
"length",
"<i",
">",
"n<",
"/",
"i"... | train | https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/multivariate/NormalM.java#L77-L87 |
OpenLiberty/open-liberty | dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java | RecoveryDirectorImpl.initializationOutstanding | private boolean initializationOutstanding(RecoveryAgent recoveryAgent, FailureScope failureScope) {
"""
<p>
Internal method to determine if there is an outstanding 'serialRecoveryComplete'
call that must be issued by the client service represented by the supplied
RecoveryAgent for the given failure scope.
</p>... | java | private boolean initializationOutstanding(RecoveryAgent recoveryAgent, FailureScope failureScope) {
if (tc.isEntryEnabled())
Tr.entry(tc, "initializationOutstanding", new Object[] { recoveryAgent, failureScope, this });
boolean outstanding = false;
synchronized (_outstandingInitial... | [
"private",
"boolean",
"initializationOutstanding",
"(",
"RecoveryAgent",
"recoveryAgent",
",",
"FailureScope",
"failureScope",
")",
"{",
"if",
"(",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"Tr",
".",
"entry",
"(",
"tc",
",",
"\"initializationOutstanding\"",
","... | <p>
Internal method to determine if there is an outstanding 'serialRecoveryComplete'
call that must be issued by the client service represented by the supplied
RecoveryAgent for the given failure scope.
</p>
<p>
Just prior to requesting a RecoveryAgent to "initiateRecovery" of a
FailureScope, the addInitializationReco... | [
"<p",
">",
"Internal",
"method",
"to",
"determine",
"if",
"there",
"is",
"an",
"outstanding",
"serialRecoveryComplete",
"call",
"that",
"must",
"be",
"issued",
"by",
"the",
"client",
"service",
"represented",
"by",
"the",
"supplied",
"RecoveryAgent",
"for",
"the... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.recoverylog/src/com/ibm/ws/recoverylog/spi/RecoveryDirectorImpl.java#L1049-L1069 |
kuujo/vertigo | core/src/main/java/net/kuujo/vertigo/util/Components.java | Components.createComponent | public static Component createComponent(Vertx vertx, Container container) {
"""
Creates a component instance for the current Vert.x instance.
"""
InstanceContext context = parseContext(container.config());
return new DefaultComponentFactory().setVertx(vertx).setContainer(container).createComponent(cont... | java | public static Component createComponent(Vertx vertx, Container container) {
InstanceContext context = parseContext(container.config());
return new DefaultComponentFactory().setVertx(vertx).setContainer(container).createComponent(context, new DefaultCluster(context.component().network().cluster(), vertx, contain... | [
"public",
"static",
"Component",
"createComponent",
"(",
"Vertx",
"vertx",
",",
"Container",
"container",
")",
"{",
"InstanceContext",
"context",
"=",
"parseContext",
"(",
"container",
".",
"config",
"(",
")",
")",
";",
"return",
"new",
"DefaultComponentFactory",
... | Creates a component instance for the current Vert.x instance. | [
"Creates",
"a",
"component",
"instance",
"for",
"the",
"current",
"Vert",
".",
"x",
"instance",
"."
] | train | https://github.com/kuujo/vertigo/blob/c5869dbc5fff89eb5262e83f7a81719b01a5ba6f/core/src/main/java/net/kuujo/vertigo/util/Components.java#L74-L77 |
lmdbjava/lmdbjava | src/main/java/org/lmdbjava/KeyVal.java | KeyVal.valInMulti | Pointer valInMulti(final T val, final int elements) {
"""
Prepares an array suitable for presentation as the data argument to a
<code>MDB_MULTIPLE</code> put.
<p>
The returned array is equivalent of two <code>MDB_val</code>s as follows:
<ul>
<li>ptrVal1.data = pointer to the data address of passed buffer<... | java | Pointer valInMulti(final T val, final int elements) {
final long ptrVal2SizeOff = MDB_VAL_STRUCT_SIZE + STRUCT_FIELD_OFFSET_SIZE;
ptrArray.putLong(ptrVal2SizeOff, elements); // ptrVal2.size
proxy.in(val, ptrVal, ptrValAddr); // ptrVal1.data
final long totalBufferSize = ptrVal.getLong(STRUCT_FIELD_OFFSET... | [
"Pointer",
"valInMulti",
"(",
"final",
"T",
"val",
",",
"final",
"int",
"elements",
")",
"{",
"final",
"long",
"ptrVal2SizeOff",
"=",
"MDB_VAL_STRUCT_SIZE",
"+",
"STRUCT_FIELD_OFFSET_SIZE",
";",
"ptrArray",
".",
"putLong",
"(",
"ptrVal2SizeOff",
",",
"elements",
... | Prepares an array suitable for presentation as the data argument to a
<code>MDB_MULTIPLE</code> put.
<p>
The returned array is equivalent of two <code>MDB_val</code>s as follows:
<ul>
<li>ptrVal1.data = pointer to the data address of passed buffer</li>
<li>ptrVal1.size = size of each individual data element</li>
<li>... | [
"Prepares",
"an",
"array",
"suitable",
"for",
"presentation",
"as",
"the",
"data",
"argument",
"to",
"a",
"<code",
">",
"MDB_MULTIPLE<",
"/",
"code",
">",
"put",
"."
] | train | https://github.com/lmdbjava/lmdbjava/blob/5912beb1037722c71f3ddc05e70fcbe739dfa272/src/main/java/org/lmdbjava/KeyVal.java#L121-L130 |
j256/ormlite-core | src/main/java/com/j256/ormlite/stmt/mapped/MappedDeleteCollection.java | MappedDeleteCollection.deleteIds | public static <T, ID> int deleteIds(Dao<T, ID> dao, TableInfo<T, ID> tableInfo,
DatabaseConnection databaseConnection, Collection<ID> ids, ObjectCache objectCache) throws SQLException {
"""
Delete all of the objects in the collection. This builds a {@link MappedDeleteCollection} on the fly because the
ids coul... | java | public static <T, ID> int deleteIds(Dao<T, ID> dao, TableInfo<T, ID> tableInfo,
DatabaseConnection databaseConnection, Collection<ID> ids, ObjectCache objectCache) throws SQLException {
MappedDeleteCollection<T, ID> deleteCollection = MappedDeleteCollection.build(dao, tableInfo, ids.size());
Object[] fieldObject... | [
"public",
"static",
"<",
"T",
",",
"ID",
">",
"int",
"deleteIds",
"(",
"Dao",
"<",
"T",
",",
"ID",
">",
"dao",
",",
"TableInfo",
"<",
"T",
",",
"ID",
">",
"tableInfo",
",",
"DatabaseConnection",
"databaseConnection",
",",
"Collection",
"<",
"ID",
">",
... | Delete all of the objects in the collection. This builds a {@link MappedDeleteCollection} on the fly because the
ids could be variable sized. | [
"Delete",
"all",
"of",
"the",
"objects",
"in",
"the",
"collection",
".",
"This",
"builds",
"a",
"{"
] | train | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/stmt/mapped/MappedDeleteCollection.java#L47-L58 |
comapi/comapi-sdk-android | COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java | InternalService.getConversations | @Deprecated
public Observable<ComapiResult<List<ConversationDetails>>> getConversations(@NonNull final Scope scope) {
"""
Returns observable to get all visible conversations.
@param scope {@link Scope} of the query
@return Observable to to create a conversation.
@deprecated Please use {@link InternalServi... | java | @Deprecated
public Observable<ComapiResult<List<ConversationDetails>>> getConversations(@NonNull final Scope scope) {
final String token = getToken();
if (sessionController.isCreatingSession()) {
return getTaskQueue().queueGetConversations(scope);
} else if (TextUtils.isEmpty(t... | [
"@",
"Deprecated",
"public",
"Observable",
"<",
"ComapiResult",
"<",
"List",
"<",
"ConversationDetails",
">",
">",
">",
"getConversations",
"(",
"@",
"NonNull",
"final",
"Scope",
"scope",
")",
"{",
"final",
"String",
"token",
"=",
"getToken",
"(",
")",
";",
... | Returns observable to get all visible conversations.
@param scope {@link Scope} of the query
@return Observable to to create a conversation.
@deprecated Please use {@link InternalService#getConversations(boolean)} instead. | [
"Returns",
"observable",
"to",
"get",
"all",
"visible",
"conversations",
"."
] | train | https://github.com/comapi/comapi-sdk-android/blob/53140a58d5a62afe196047ccc5120bfe090ef211/COMAPI/foundation/src/main/java/com/comapi/internal/network/InternalService.java#L504-L523 |
playn/playn | core/src/playn/core/json/JsonObject.java | JsonObject.getDouble | public double getDouble(String key, double default_) {
"""
Returns the {@link Double} at the given key, or the default if it does not exist or is the
wrong type.
"""
Object o = get(key);
return o instanceof Number ? ((Number) o).doubleValue() : default_;
} | java | public double getDouble(String key, double default_) {
Object o = get(key);
return o instanceof Number ? ((Number) o).doubleValue() : default_;
} | [
"public",
"double",
"getDouble",
"(",
"String",
"key",
",",
"double",
"default_",
")",
"{",
"Object",
"o",
"=",
"get",
"(",
"key",
")",
";",
"return",
"o",
"instanceof",
"Number",
"?",
"(",
"(",
"Number",
")",
"o",
")",
".",
"doubleValue",
"(",
")",
... | Returns the {@link Double} at the given key, or the default if it does not exist or is the
wrong type. | [
"Returns",
"the",
"{"
] | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/core/src/playn/core/json/JsonObject.java#L91-L94 |
apache/incubator-gobblin | gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/FileSystemInstrumentationFactory.java | FileSystemInstrumentationFactory.instrumentFileSystem | public FileSystem instrumentFileSystem(FileSystem fs, SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config) {
"""
Return an instrumented version of the input {@link FileSystem}. Generally, this will return a decorator for the
input {@link FileSystem}. If the instrumentation will be a no-op (due to... | java | public FileSystem instrumentFileSystem(FileSystem fs, SharedResourcesBroker<S> broker, ConfigView<S, FileSystemKey> config) {
return fs;
} | [
"public",
"FileSystem",
"instrumentFileSystem",
"(",
"FileSystem",
"fs",
",",
"SharedResourcesBroker",
"<",
"S",
">",
"broker",
",",
"ConfigView",
"<",
"S",
",",
"FileSystemKey",
">",
"config",
")",
"{",
"return",
"fs",
";",
"}"
] | Return an instrumented version of the input {@link FileSystem}. Generally, this will return a decorator for the
input {@link FileSystem}. If the instrumentation will be a no-op (due to, for example, configuration), it is
recommended to return the input {@link FileSystem} directly for performance. | [
"Return",
"an",
"instrumented",
"version",
"of",
"the",
"input",
"{"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-utility/src/main/java/org/apache/gobblin/util/filesystem/FileSystemInstrumentationFactory.java#L39-L41 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchSpaceImpl.java | MatchSpaceImpl.clear | public synchronized void clear(Identifier rootId, boolean enableCache) {
"""
Removes all objects from the MatchSpace, resetting it to the 'as new'
condition.
"""
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(this,cclass, "clear");
matchTree = null;
matchTreeGenera... | java | public synchronized void clear(Identifier rootId, boolean enableCache)
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
tc.entry(this,cclass, "clear");
matchTree = null;
matchTreeGeneration = 0;
subExpr.clear();
// Now reinitialise the matchspace
initialise(rootId,... | [
"public",
"synchronized",
"void",
"clear",
"(",
"Identifier",
"rootId",
",",
"boolean",
"enableCache",
")",
"{",
"if",
"(",
"TraceComponent",
".",
"isAnyTracingEnabled",
"(",
")",
"&&",
"tc",
".",
"isEntryEnabled",
"(",
")",
")",
"tc",
".",
"entry",
"(",
"... | Removes all objects from the MatchSpace, resetting it to the 'as new'
condition. | [
"Removes",
"all",
"objects",
"from",
"the",
"MatchSpace",
"resetting",
"it",
"to",
"the",
"as",
"new",
"condition",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/matchspace/impl/MatchSpaceImpl.java#L862-L874 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java | AppServicePlansInner.listWebAppsAsync | public Observable<Page<SiteInner>> listWebAppsAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) {
"""
Get all apps associated with an App Service plan.
Get all apps associated with an App Service plan.
@param resourceGroupName Name of the re... | java | public Observable<Page<SiteInner>> listWebAppsAsync(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) {
return listWebAppsWithServiceResponseAsync(resourceGroupName, name, skipToken, filter, top)
.map(new Func1<ServiceResponse<Page<Site... | [
"public",
"Observable",
"<",
"Page",
"<",
"SiteInner",
">",
">",
"listWebAppsAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"name",
",",
"final",
"String",
"skipToken",
",",
"final",
"String",
"filter",
",",
"final",
"String",
"to... | Get all apps associated with an App Service plan.
Get all apps associated with an App Service plan.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of the App Service plan.
@param skipToken Skip to a web app in the list of webapps associated with app service plan. If... | [
"Get",
"all",
"apps",
"associated",
"with",
"an",
"App",
"Service",
"plan",
".",
"Get",
"all",
"apps",
"associated",
"with",
"an",
"App",
"Service",
"plan",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L2546-L2554 |
joelittlejohn/jsonschema2pojo | jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/FormatRule.java | FormatRule.apply | @Override
public JType apply(String nodeName, JsonNode node, JsonNode parent, JType baseType, Schema schema) {
"""
Applies this schema rule to take the required code generation steps.
<p>
This rule maps format values to Java types. By default:
<ul>
<li>"format":"date-time" => {@link java.util.Date} or {... | java | @Override
public JType apply(String nodeName, JsonNode node, JsonNode parent, JType baseType, Schema schema) {
Class<?> type = getType(node.asText());
if (type != null) {
JType jtype = baseType.owner().ref(type);
if (ruleFactory.getGenerationConfig().isUsePrimitives()) {
... | [
"@",
"Override",
"public",
"JType",
"apply",
"(",
"String",
"nodeName",
",",
"JsonNode",
"node",
",",
"JsonNode",
"parent",
",",
"JType",
"baseType",
",",
"Schema",
"schema",
")",
"{",
"Class",
"<",
"?",
">",
"type",
"=",
"getType",
"(",
"node",
".",
"... | Applies this schema rule to take the required code generation steps.
<p>
This rule maps format values to Java types. By default:
<ul>
<li>"format":"date-time" => {@link java.util.Date} or {@link org.joda.time.DateTime} (if config useJodaDates is set)
<li>"format":"date" => {@link String} or {@link org.joda.time.L... | [
"Applies",
"this",
"schema",
"rule",
"to",
"take",
"the",
"required",
"code",
"generation",
"steps",
".",
"<p",
">",
"This",
"rule",
"maps",
"format",
"values",
"to",
"Java",
"types",
".",
"By",
"default",
":",
"<ul",
">",
"<li",
">",
"format",
":",
"d... | train | https://github.com/joelittlejohn/jsonschema2pojo/blob/0552b80db93214eb186e4ae45b40866cc1e7eb84/jsonschema2pojo-core/src/main/java/org/jsonschema2pojo/rules/FormatRule.java#L93-L106 |
deeplearning4j/deeplearning4j | nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java | SDBaseOps.lte | public SDVariable lte(SDVariable x, SDVariable y) {
"""
Less than or equal to operation: elementwise x <= y<br>
If x and y arrays have equal shape, the output shape is the same as these inputs.<br>
Note: supports broadcasting if x and y have different shapes and are broadcastable.<br>
Returns an array with valu... | java | public SDVariable lte(SDVariable x, SDVariable y) {
return lte(null, x, y);
} | [
"public",
"SDVariable",
"lte",
"(",
"SDVariable",
"x",
",",
"SDVariable",
"y",
")",
"{",
"return",
"lte",
"(",
"null",
",",
"x",
",",
"y",
")",
";",
"}"
] | Less than or equal to operation: elementwise x <= y<br>
If x and y arrays have equal shape, the output shape is the same as these inputs.<br>
Note: supports broadcasting if x and y have different shapes and are broadcastable.<br>
Returns an array with values 1 where condition is satisfied, or value 0 otherwise.
@param... | [
"Less",
"than",
"or",
"equal",
"to",
"operation",
":",
"elementwise",
"x",
"<",
"=",
"y<br",
">",
"If",
"x",
"and",
"y",
"arrays",
"have",
"equal",
"shape",
"the",
"output",
"shape",
"is",
"the",
"same",
"as",
"these",
"inputs",
".",
"<br",
">",
"Not... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L946-L948 |
j256/simplejmx | src/main/java/com/j256/simplejmx/client/JmxClient.java | JmxClient.getBeanNames | public Set<ObjectName> getBeanNames() throws JMException {
"""
Return a set of the various bean ObjectName objects associated with the Jmx server.
"""
checkClientConnected();
try {
return mbeanConn.queryNames(null, null);
} catch (IOException e) {
throw createJmException("Problems querying for jmx ... | java | public Set<ObjectName> getBeanNames() throws JMException {
checkClientConnected();
try {
return mbeanConn.queryNames(null, null);
} catch (IOException e) {
throw createJmException("Problems querying for jmx bean names: " + e, e);
}
} | [
"public",
"Set",
"<",
"ObjectName",
">",
"getBeanNames",
"(",
")",
"throws",
"JMException",
"{",
"checkClientConnected",
"(",
")",
";",
"try",
"{",
"return",
"mbeanConn",
".",
"queryNames",
"(",
"null",
",",
"null",
")",
";",
"}",
"catch",
"(",
"IOExceptio... | Return a set of the various bean ObjectName objects associated with the Jmx server. | [
"Return",
"a",
"set",
"of",
"the",
"various",
"bean",
"ObjectName",
"objects",
"associated",
"with",
"the",
"Jmx",
"server",
"."
] | train | https://github.com/j256/simplejmx/blob/1a04f52512dfa0a711ba0cc7023c604dbc82a352/src/main/java/com/j256/simplejmx/client/JmxClient.java#L216-L223 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.