repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_portability_id_GET | public OvhPortability billingAccount_portability_id_GET(String billingAccount, Long id) throws IOException {
"""
Get this object properties
REST: GET /telephony/{billingAccount}/portability/{id}
@param billingAccount [required] The name of your billingAccount
@param id [required] The ID of the portability
... | java | public OvhPortability billingAccount_portability_id_GET(String billingAccount, Long id) throws IOException {
String qPath = "/telephony/{billingAccount}/portability/{id}";
StringBuilder sb = path(qPath, billingAccount, id);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhPortabi... | [
"public",
"OvhPortability",
"billingAccount_portability_id_GET",
"(",
"String",
"billingAccount",
",",
"Long",
"id",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/portability/{id}\"",
";",
"StringBuilder",
"sb",
"=",
"path",
"("... | Get this object properties
REST: GET /telephony/{billingAccount}/portability/{id}
@param billingAccount [required] The name of your billingAccount
@param id [required] The ID of the portability | [
"Get",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L344-L349 |
amilcar-sr/JustifiedTextView | library/src/main/java/com/codesgood/views/JustifiedTextView.java | JustifiedTextView.fitsInSentence | private boolean fitsInSentence(String word, List<String> sentence, boolean addSpaces) {
"""
Verifies if word to be added will fit into the sentence
@param word Word to be added
@param sentence Sentence that will receive the new word
@param addSpaces Specifies weather we should add spaces to validation o... | java | private boolean fitsInSentence(String word, List<String> sentence, boolean addSpaces) {
String stringSentence = getSentenceFromList(sentence, addSpaces);
stringSentence += word;
float sentenceWidth = getPaint().measureText(stringSentence);
return sentenceWidth < viewWidth;
} | [
"private",
"boolean",
"fitsInSentence",
"(",
"String",
"word",
",",
"List",
"<",
"String",
">",
"sentence",
",",
"boolean",
"addSpaces",
")",
"{",
"String",
"stringSentence",
"=",
"getSentenceFromList",
"(",
"sentence",
",",
"addSpaces",
")",
";",
"stringSentenc... | Verifies if word to be added will fit into the sentence
@param word Word to be added
@param sentence Sentence that will receive the new word
@param addSpaces Specifies weather we should add spaces to validation or not
@return True if word fits, false otherwise. | [
"Verifies",
"if",
"word",
"to",
"be",
"added",
"will",
"fit",
"into",
"the",
"sentence"
] | train | https://github.com/amilcar-sr/JustifiedTextView/blob/8fd91b4cfb225f973096519eae8295c3d7e8d49f/library/src/main/java/com/codesgood/views/JustifiedTextView.java#L224-L231 |
haifengl/smile | core/src/main/java/smile/association/TotalSupportTree.java | TotalSupportTree.getFrequentItemsets | private long getFrequentItemsets(PrintStream out, List<ItemSet> list, int[] itemset, int size, Node node) {
"""
Returns the set of frequent item sets.
@param out a print stream for output of frequent item sets.
@param list a container to store frequent item sets on output.
@param node the path from root to this... | java | private long getFrequentItemsets(PrintStream out, List<ItemSet> list, int[] itemset, int size, Node node) {
ItemSet set = new ItemSet(itemset, node.support);
if (out != null) {
out.println(set);
}
if (list != null) {
list.add(set);
}
long n = 1;
... | [
"private",
"long",
"getFrequentItemsets",
"(",
"PrintStream",
"out",
",",
"List",
"<",
"ItemSet",
">",
"list",
",",
"int",
"[",
"]",
"itemset",
",",
"int",
"size",
",",
"Node",
"node",
")",
"{",
"ItemSet",
"set",
"=",
"new",
"ItemSet",
"(",
"itemset",
... | Returns the set of frequent item sets.
@param out a print stream for output of frequent item sets.
@param list a container to store frequent item sets on output.
@param node the path from root to this node matches the given item set.
@param itemset the frequent item set generated so far.
@param size the length/size of ... | [
"Returns",
"the",
"set",
"of",
"frequent",
"item",
"sets",
"."
] | train | https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/association/TotalSupportTree.java#L216-L238 |
elki-project/elki | elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/AbstractMTreeNode.java | AbstractMTreeNode.adjustEntry | public boolean adjustEntry(E entry, DBID routingObjectID, double parentDistance, AbstractMTree<O, N, E, ?> mTree) {
"""
Adjusts the parameters of the entry representing this node (e.g. after
insertion of new objects). Subclasses may need to overwrite this method.
@param entry the entry representing this node
... | java | public boolean adjustEntry(E entry, DBID routingObjectID, double parentDistance, AbstractMTree<O, N, E, ?> mTree) {
boolean changed = entry.setRoutingObjectID(routingObjectID);
changed |= entry.setParentDistance(parentDistance);
changed |= entry.setCoveringRadius(coveringRadiusFromEntries(routingObjectID, m... | [
"public",
"boolean",
"adjustEntry",
"(",
"E",
"entry",
",",
"DBID",
"routingObjectID",
",",
"double",
"parentDistance",
",",
"AbstractMTree",
"<",
"O",
",",
"N",
",",
"E",
",",
"?",
">",
"mTree",
")",
"{",
"boolean",
"changed",
"=",
"entry",
".",
"setRou... | Adjusts the parameters of the entry representing this node (e.g. after
insertion of new objects). Subclasses may need to overwrite this method.
@param entry the entry representing this node
@param routingObjectID the id of the (new) routing object of this node
@param parentDistance the distance from the routing object... | [
"Adjusts",
"the",
"parameters",
"of",
"the",
"entry",
"representing",
"this",
"node",
"(",
"e",
".",
"g",
".",
"after",
"insertion",
"of",
"new",
"objects",
")",
".",
"Subclasses",
"may",
"need",
"to",
"overwrite",
"this",
"method",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-index-mtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/metrical/mtreevariants/AbstractMTreeNode.java#L72-L77 |
exKAZUu/GameAIArena | src/main/java/net/exkazuu/gameaiarena/api/Point2.java | Point2.sub | public Point2 sub(Point2 that) {
"""
Point(this.x - that.x, this.y - that.y)となるPoint型を返します。
@param that このPoint型から減算するPoint型
@return このPoint型から引数のPoint型を減産した結果
"""
return new Point2(x - that.x, y - that.y);
} | java | public Point2 sub(Point2 that) {
return new Point2(x - that.x, y - that.y);
} | [
"public",
"Point2",
"sub",
"(",
"Point2",
"that",
")",
"{",
"return",
"new",
"Point2",
"(",
"x",
"-",
"that",
".",
"x",
",",
"y",
"-",
"that",
".",
"y",
")",
";",
"}"
] | Point(this.x - that.x, this.y - that.y)となるPoint型を返します。
@param that このPoint型から減算するPoint型
@return このPoint型から引数のPoint型を減産した結果 | [
"Point",
"(",
"this",
".",
"x",
"-",
"that",
".",
"x",
"this",
".",
"y",
"-",
"that",
".",
"y",
")",
"となるPoint型を返します。"
] | train | https://github.com/exKAZUu/GameAIArena/blob/66894c251569fb763174654d6c262c5176dfcf48/src/main/java/net/exkazuu/gameaiarena/api/Point2.java#L168-L170 |
googleads/googleads-java-lib | examples/admanager_axis/src/main/java/admanager/axis/v201902/adjustmentservice/GetAllTrafficAdjustments.java | GetAllTrafficAdjustments.runExample | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
"""
Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws ... | java | public static void runExample(AdManagerServices adManagerServices, AdManagerSession session)
throws RemoteException {
// Get the AdjustmentService.
AdjustmentServiceInterface adjustmentService =
adManagerServices.get(session, AdjustmentServiceInterface.class);
// Create a statement to get all... | [
"public",
"static",
"void",
"runExample",
"(",
"AdManagerServices",
"adManagerServices",
",",
"AdManagerSession",
"session",
")",
"throws",
"RemoteException",
"{",
"// Get the AdjustmentService.",
"AdjustmentServiceInterface",
"adjustmentService",
"=",
"adManagerServices",
".",... | Runs the example.
@param adManagerServices the services factory.
@param session the session.
@throws ApiException if the API request failed with one or more service errors.
@throws RemoteException if the API request failed due to other errors. | [
"Runs",
"the",
"example",
"."
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/examples/admanager_axis/src/main/java/admanager/axis/v201902/adjustmentservice/GetAllTrafficAdjustments.java#L51-L87 |
santhosh-tekuri/jlibs | core/src/main/java/jlibs/core/lang/BeanUtil.java | BeanUtil.setProperty | public static void setProperty(Object bean, String property, Object value) throws InvocationTargetException {
"""
Sets the value of the specified <code>property</code> in given <code>bean</code>
@param bean bean object
@param property property name whose value needs to be set
@param value value to b... | java | public static void setProperty(Object bean, String property, Object value) throws InvocationTargetException{
try{
getSetterMethod(bean.getClass(), property).invoke(bean, value);
}catch(IllegalAccessException ex){
throw new ImpossibleException(ex); // because setter method is publ... | [
"public",
"static",
"void",
"setProperty",
"(",
"Object",
"bean",
",",
"String",
"property",
",",
"Object",
"value",
")",
"throws",
"InvocationTargetException",
"{",
"try",
"{",
"getSetterMethod",
"(",
"bean",
".",
"getClass",
"(",
")",
",",
"property",
")",
... | Sets the value of the specified <code>property</code> in given <code>bean</code>
@param bean bean object
@param property property name whose value needs to be set
@param value value to be set
@throws InvocationTargetException if method invocation fails
@throws NullPointerException if <code>property</code> i... | [
"Sets",
"the",
"value",
"of",
"the",
"specified",
"<code",
">",
"property<",
"/",
"code",
">",
"in",
"given",
"<code",
">",
"bean<",
"/",
"code",
">"
] | train | https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/BeanUtil.java#L224-L230 |
elki-project/elki | addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java | SVGUtil.stringToColor | public static Color stringToColor(String str) {
"""
Convert a color name from SVG syntax to an AWT color object.
@param str Color name
@return Color value
"""
int icol = SVG_COLOR_NAMES.getInt(str.toLowerCase());
if(icol != NO_VALUE) {
return new Color(icol, false);
}
return colorLook... | java | public static Color stringToColor(String str) {
int icol = SVG_COLOR_NAMES.getInt(str.toLowerCase());
if(icol != NO_VALUE) {
return new Color(icol, false);
}
return colorLookupStylesheet.stringToColor(str);
} | [
"public",
"static",
"Color",
"stringToColor",
"(",
"String",
"str",
")",
"{",
"int",
"icol",
"=",
"SVG_COLOR_NAMES",
".",
"getInt",
"(",
"str",
".",
"toLowerCase",
"(",
")",
")",
";",
"if",
"(",
"icol",
"!=",
"NO_VALUE",
")",
"{",
"return",
"new",
"Col... | Convert a color name from SVG syntax to an AWT color object.
@param str Color name
@return Color value | [
"Convert",
"a",
"color",
"name",
"from",
"SVG",
"syntax",
"to",
"an",
"AWT",
"color",
"object",
"."
] | train | https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L528-L534 |
unbescape/unbescape | src/main/java/org/unbescape/css/CssEscape.java | CssEscape.unescapeCss | public static void unescapeCss(final String text, final Writer writer)
throws IOException {
"""
<p>
Perform a CSS <strong>unescape</strong> operation on a <tt>String</tt> input, writing results
to a <tt>Writer</tt>.
</p>
<p>
No additional configuration arguments are required. Unescape operations
... | java | public static void unescapeCss(final String text, final Writer writer)
throws IOException {
if (writer == null) {
throw new IllegalArgumentException("Argument 'writer' cannot be null");
}
if (text == null) {
return;
}
if (text.indexOf('\\') < ... | [
"public",
"static",
"void",
"unescapeCss",
"(",
"final",
"String",
"text",
",",
"final",
"Writer",
"writer",
")",
"throws",
"IOException",
"{",
"if",
"(",
"writer",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Argument 'writer' can... | <p>
Perform a CSS <strong>unescape</strong> operation on a <tt>String</tt> input, writing results
to a <tt>Writer</tt>.
</p>
<p>
No additional configuration arguments are required. Unescape operations
will always perform <em>complete</em> CSS unescape of backslash and hexadecimal escape
sequences.
</p>
<p>
This method ... | [
"<p",
">",
"Perform",
"a",
"CSS",
"<strong",
">",
"unescape<",
"/",
"strong",
">",
"operation",
"on",
"a",
"<tt",
">",
"String<",
"/",
"tt",
">",
"input",
"writing",
"results",
"to",
"a",
"<tt",
">",
"Writer<",
"/",
"tt",
">",
".",
"<",
"/",
"p",
... | train | https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/css/CssEscape.java#L1771-L1787 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java | ReflectUtil.invoke | public static <T> T invoke(Object obj, String methodName, Object... args) throws UtilException {
"""
执行对象中指定方法
@param <T> 返回对象类型
@param obj 方法所在对象
@param methodName 方法名
@param args 参数列表
@return 执行结果
@throws UtilException IllegalAccessException包装
@since 3.1.2
"""
final Method method = getMethodOfObj... | java | public static <T> T invoke(Object obj, String methodName, Object... args) throws UtilException {
final Method method = getMethodOfObj(obj, methodName, args);
if (null == method) {
throw new UtilException(StrUtil.format("No such method: [{}]", methodName));
}
return invoke(obj, method, args);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"invoke",
"(",
"Object",
"obj",
",",
"String",
"methodName",
",",
"Object",
"...",
"args",
")",
"throws",
"UtilException",
"{",
"final",
"Method",
"method",
"=",
"getMethodOfObj",
"(",
"obj",
",",
"methodName",
",",
... | 执行对象中指定方法
@param <T> 返回对象类型
@param obj 方法所在对象
@param methodName 方法名
@param args 参数列表
@return 执行结果
@throws UtilException IllegalAccessException包装
@since 3.1.2 | [
"执行对象中指定方法"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L806-L812 |
LGoodDatePicker/LGoodDatePicker | Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java | FormLayout.addLayoutComponent | @Override
public void addLayoutComponent(Component comp, Object constraints) {
"""
Adds the specified component to the layout, using the specified {@code constraints} object.
Note that constraints are mutable and are, therefore, cloned when cached.
@param comp the component to be added
@param constraints ... | java | @Override
public void addLayoutComponent(Component comp, Object constraints) {
checkNotNull(constraints, "The constraints must not be null.");
if (constraints instanceof String) {
setConstraints(comp, new CellConstraints((String) constraints));
} else if (constraints instanceof C... | [
"@",
"Override",
"public",
"void",
"addLayoutComponent",
"(",
"Component",
"comp",
",",
"Object",
"constraints",
")",
"{",
"checkNotNull",
"(",
"constraints",
",",
"\"The constraints must not be null.\"",
")",
";",
"if",
"(",
"constraints",
"instanceof",
"String",
"... | Adds the specified component to the layout, using the specified {@code constraints} object.
Note that constraints are mutable and are, therefore, cloned when cached.
@param comp the component to be added
@param constraints the component's cell constraints
@throws NullPointerException if {@code constraints} is {@code n... | [
"Adds",
"the",
"specified",
"component",
"to",
"the",
"layout",
"using",
"the",
"specified",
"{",
"@code",
"constraints",
"}",
"object",
".",
"Note",
"that",
"constraints",
"are",
"mutable",
"and",
"are",
"therefore",
"cloned",
"when",
"cached",
"."
] | train | https://github.com/LGoodDatePicker/LGoodDatePicker/blob/c7df05a5fe382e1e08a6237e9391d8dc5fd48692/Project/src/main/java/com/privatejgoodies/forms/layout/FormLayout.java#L1019-L1029 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/extension/ExtensionRegistry.java | ExtensionRegistry.getExtensionContext | public ExtensionContext getExtensionContext(final String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) {
"""
Gets an {@link ExtensionContext} for use when handling an {@code add} operation for
a resource representing an {@link org.jboss.as.controller.Ext... | java | public ExtensionContext getExtensionContext(final String moduleName, ManagementResourceRegistration rootRegistration, ExtensionRegistryType extensionRegistryType) {
// Can't use processType.isServer() to determine where to look for profile reg because a lot of test infrastructure
// doesn't add the prof... | [
"public",
"ExtensionContext",
"getExtensionContext",
"(",
"final",
"String",
"moduleName",
",",
"ManagementResourceRegistration",
"rootRegistration",
",",
"ExtensionRegistryType",
"extensionRegistryType",
")",
"{",
"// Can't use processType.isServer() to determine where to look for pro... | Gets an {@link ExtensionContext} for use when handling an {@code add} operation for
a resource representing an {@link org.jboss.as.controller.Extension}.
@param moduleName the name of the extension's module. Cannot be {@code null}
@param rootRegistration the root management resource registration
@param extensionRegist... | [
"Gets",
"an",
"{",
"@link",
"ExtensionContext",
"}",
"for",
"use",
"when",
"handling",
"an",
"{",
"@code",
"add",
"}",
"operation",
"for",
"a",
"resource",
"representing",
"an",
"{",
"@link",
"org",
".",
"jboss",
".",
"as",
".",
"controller",
".",
"Exten... | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/extension/ExtensionRegistry.java#L280-L293 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java | ProviderList.getServices | @Deprecated
public List<Service> getServices(String type, List<String> algorithms) {
"""
This method exists for compatibility with JCE only. It will be removed
once JCE has been changed to use the replacement method.
@deprecated use getServices(List<ServiceId>) instead
"""
List<ServiceId> ids = n... | java | @Deprecated
public List<Service> getServices(String type, List<String> algorithms) {
List<ServiceId> ids = new ArrayList<>();
for (String alg : algorithms) {
ids.add(new ServiceId(type, alg));
}
return getServices(ids);
} | [
"@",
"Deprecated",
"public",
"List",
"<",
"Service",
">",
"getServices",
"(",
"String",
"type",
",",
"List",
"<",
"String",
">",
"algorithms",
")",
"{",
"List",
"<",
"ServiceId",
">",
"ids",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"... | This method exists for compatibility with JCE only. It will be removed
once JCE has been changed to use the replacement method.
@deprecated use getServices(List<ServiceId>) instead | [
"This",
"method",
"exists",
"for",
"compatibility",
"with",
"JCE",
"only",
".",
"It",
"will",
"be",
"removed",
"once",
"JCE",
"has",
"been",
"changed",
"to",
"use",
"the",
"replacement",
"method",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/jca/ProviderList.java#L364-L371 |
OpenLiberty/open-liberty | dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java | AbstractRepositoryClient.allFiltersAreEmpty | protected boolean allFiltersAreEmpty(Map<FilterableAttribute, Collection<String>> filters) {
"""
Returns <code>true</code> if all the filters are empty.
@param filters
@return
"""
for (Map.Entry<FilterableAttribute, Collection<String>> filter : filters.entrySet()) {
Collection<String> v... | java | protected boolean allFiltersAreEmpty(Map<FilterableAttribute, Collection<String>> filters) {
for (Map.Entry<FilterableAttribute, Collection<String>> filter : filters.entrySet()) {
Collection<String> values = filter.getValue();
if (values != null && !values.isEmpty()) {
re... | [
"protected",
"boolean",
"allFiltersAreEmpty",
"(",
"Map",
"<",
"FilterableAttribute",
",",
"Collection",
"<",
"String",
">",
">",
"filters",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"FilterableAttribute",
",",
"Collection",
"<",
"String",
">",
">",
"f... | Returns <code>true</code> if all the filters are empty.
@param filters
@return | [
"Returns",
"<code",
">",
"true<",
"/",
"code",
">",
"if",
"all",
"the",
"filters",
"are",
"empty",
"."
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository/src/com/ibm/ws/repository/transport/client/AbstractRepositoryClient.java#L188-L196 |
geomajas/geomajas-project-server | api/src/main/java/org/geomajas/layer/feature/attribute/AssociationValue.java | AssociationValue.setImageUrlAttribute | public void setImageUrlAttribute(String name, String value) {
"""
Sets the specified image URL attribute to the specified value.
@param name name of the attribute
@param value value of the attribute
@since 1.9.0
"""
ensureAttributes();
Attribute attribute = new ImageUrlAttribute(value);
attribute.se... | java | public void setImageUrlAttribute(String name, String value) {
ensureAttributes();
Attribute attribute = new ImageUrlAttribute(value);
attribute.setEditable(isEditable(name));
getAllAttributes().put(name, attribute);
} | [
"public",
"void",
"setImageUrlAttribute",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"ensureAttributes",
"(",
")",
";",
"Attribute",
"attribute",
"=",
"new",
"ImageUrlAttribute",
"(",
"value",
")",
";",
"attribute",
".",
"setEditable",
"(",
"isEd... | Sets the specified image URL attribute to the specified value.
@param name name of the attribute
@param value value of the attribute
@since 1.9.0 | [
"Sets",
"the",
"specified",
"image",
"URL",
"attribute",
"to",
"the",
"specified",
"value",
"."
] | train | https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/api/src/main/java/org/geomajas/layer/feature/attribute/AssociationValue.java#L290-L296 |
m-m-m/util | nls/src/main/java/net/sf/mmm/util/nls/base/AbstractNlsFormatterManager.java | AbstractNlsFormatterManager.getSubFormatter | protected NlsFormatterPlugin<?> getSubFormatter(String formatType, CharSequenceScanner scanner) {
"""
This method is like {@link #getFormatter(String, String)} but reads the
{@link AbstractNlsFormatterPlugin#getStyle() style} from the given scanner.
@param formatType is the type to be formatted.
@param scanne... | java | protected NlsFormatterPlugin<?> getSubFormatter(String formatType, CharSequenceScanner scanner) {
String formatStyle = scanner.readWhile(NO_EXPRESSION);
return getFormatter(formatType, formatStyle);
} | [
"protected",
"NlsFormatterPlugin",
"<",
"?",
">",
"getSubFormatter",
"(",
"String",
"formatType",
",",
"CharSequenceScanner",
"scanner",
")",
"{",
"String",
"formatStyle",
"=",
"scanner",
".",
"readWhile",
"(",
"NO_EXPRESSION",
")",
";",
"return",
"getFormatter",
... | This method is like {@link #getFormatter(String, String)} but reads the
{@link AbstractNlsFormatterPlugin#getStyle() style} from the given scanner.
@param formatType is the type to be formatted.
@param scanner is the current {@link CharSequenceScanner} for parsing the style defining details of formatting.
@return the ... | [
"This",
"method",
"is",
"like",
"{",
"@link",
"#getFormatter",
"(",
"String",
"String",
")",
"}",
"but",
"reads",
"the",
"{",
"@link",
"AbstractNlsFormatterPlugin#getStyle",
"()",
"style",
"}",
"from",
"the",
"given",
"scanner",
"."
] | train | https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/nls/src/main/java/net/sf/mmm/util/nls/base/AbstractNlsFormatterManager.java#L130-L134 |
Appendium/objectlabkit | utils/src/main/java/net/objectlab/kit/util/ObjectUtil.java | ObjectUtil.equalsAny | public static boolean equalsAny(final Object o1, final Object... o2s) {
"""
Return true if o1 equals (according to {@link Object#equals(Object)} any of the given objects.
Also returns true if o1 is null and any of the given objects is null as well!
"""
if (o2s != null) {
for (final Objec... | java | public static boolean equalsAny(final Object o1, final Object... o2s) {
if (o2s != null) {
for (final Object o2 : o2s) {
if (o1 == null) {
if (o2 == null) {
return true;
}
continue;
... | [
"public",
"static",
"boolean",
"equalsAny",
"(",
"final",
"Object",
"o1",
",",
"final",
"Object",
"...",
"o2s",
")",
"{",
"if",
"(",
"o2s",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"Object",
"o2",
":",
"o2s",
")",
"{",
"if",
"(",
"o1",
"==",
... | Return true if o1 equals (according to {@link Object#equals(Object)} any of the given objects.
Also returns true if o1 is null and any of the given objects is null as well! | [
"Return",
"true",
"if",
"o1",
"equals",
"(",
"according",
"to",
"{"
] | train | https://github.com/Appendium/objectlabkit/blob/cd649bce7a32e4e926520e62cb765f3b1d451594/utils/src/main/java/net/objectlab/kit/util/ObjectUtil.java#L80-L98 |
kandid/kandidlib-places | src/de/kandid/environment/Places.java | Places.getRuntimeDir | public File getRuntimeDir(String applicationName, boolean strict) {
"""
Get the application specific the directory relative to which user-specific non-essential
runtime files and other file objects (such as sockets, named pipes, ...) should be stored.
This directory is guaranteed to be cleared between system res... | java | public File getRuntimeDir(String applicationName, boolean strict) {
File base = getRuntimeBase();
if (base == null) {
if (strict)
return null;
base = getCacheBase();
}
return createUserDir(base, applicationName);
} | [
"public",
"File",
"getRuntimeDir",
"(",
"String",
"applicationName",
",",
"boolean",
"strict",
")",
"{",
"File",
"base",
"=",
"getRuntimeBase",
"(",
")",
";",
"if",
"(",
"base",
"==",
"null",
")",
"{",
"if",
"(",
"strict",
")",
"return",
"null",
";",
"... | Get the application specific the directory relative to which user-specific non-essential
runtime files and other file objects (such as sockets, named pipes, ...) should be stored.
This directory is guaranteed to be cleared between system restarts.<p/>
Since not all operating systems support a place fulfilling the last ... | [
"Get",
"the",
"application",
"specific",
"the",
"directory",
"relative",
"to",
"which",
"user",
"-",
"specific",
"non",
"-",
"essential",
"runtime",
"files",
"and",
"other",
"file",
"objects",
"(",
"such",
"as",
"sockets",
"named",
"pipes",
"...",
")",
"shou... | train | https://github.com/kandid/kandidlib-places/blob/cabee8754dfd3e629733354e9262ca34465a2e1e/src/de/kandid/environment/Places.java#L298-L306 |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java | Functions.randomNumber | public static String randomNumber(Long length, TestContext context) {
"""
Runs random number function with arguments.
@param length
@return
"""
return new RandomNumberFunction().execute(Collections.singletonList(String.valueOf(length)), context);
} | java | public static String randomNumber(Long length, TestContext context) {
return new RandomNumberFunction().execute(Collections.singletonList(String.valueOf(length)), context);
} | [
"public",
"static",
"String",
"randomNumber",
"(",
"Long",
"length",
",",
"TestContext",
"context",
")",
"{",
"return",
"new",
"RandomNumberFunction",
"(",
")",
".",
"execute",
"(",
"Collections",
".",
"singletonList",
"(",
"String",
".",
"valueOf",
"(",
"leng... | Runs random number function with arguments.
@param length
@return | [
"Runs",
"random",
"number",
"function",
"with",
"arguments",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/functions/Functions.java#L168-L170 |
mabe02/lanterna | src/main/java/com/googlecode/lanterna/screen/TerminalScreen.java | TerminalScreen.scrollLines | @Override
public void scrollLines(int firstLine, int lastLine, int distance) {
"""
Perform the scrolling and save scroll-range and distance in order
to be able to optimize Terminal-update later.
"""
// just ignore certain kinds of garbage:
if (distance == 0 || firstLine > lastLine) { retur... | java | @Override
public void scrollLines(int firstLine, int lastLine, int distance) {
// just ignore certain kinds of garbage:
if (distance == 0 || firstLine > lastLine) { return; }
super.scrollLines(firstLine, lastLine, distance);
// Save scroll hint for next refresh:
ScrollHint ... | [
"@",
"Override",
"public",
"void",
"scrollLines",
"(",
"int",
"firstLine",
",",
"int",
"lastLine",
",",
"int",
"distance",
")",
"{",
"// just ignore certain kinds of garbage:",
"if",
"(",
"distance",
"==",
"0",
"||",
"firstLine",
">",
"lastLine",
")",
"{",
"re... | Perform the scrolling and save scroll-range and distance in order
to be able to optimize Terminal-update later. | [
"Perform",
"the",
"scrolling",
"and",
"save",
"scroll",
"-",
"range",
"and",
"distance",
"in",
"order",
"to",
"be",
"able",
"to",
"optimize",
"Terminal",
"-",
"update",
"later",
"."
] | train | https://github.com/mabe02/lanterna/blob/8dfd62206ff46ab10223b2ef2dbb0a2c51850954/src/main/java/com/googlecode/lanterna/screen/TerminalScreen.java#L353-L376 |
Azure/azure-sdk-for-java | resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java | ResourcesInner.updateById | public GenericResourceInner updateById(String resourceId, String apiVersion, GenericResourceInner parameters) {
"""
Updates a resource by ID.
@param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-gr... | java | public GenericResourceInner updateById(String resourceId, String apiVersion, GenericResourceInner parameters) {
return updateByIdWithServiceResponseAsync(resourceId, apiVersion, parameters).toBlocking().last().body();
} | [
"public",
"GenericResourceInner",
"updateById",
"(",
"String",
"resourceId",
",",
"String",
"apiVersion",
",",
"GenericResourceInner",
"parameters",
")",
"{",
"return",
"updateByIdWithServiceResponseAsync",
"(",
"resourceId",
",",
"apiVersion",
",",
"parameters",
")",
"... | Updates a resource by ID.
@param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the format, /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
@param apiVersion The API version to use for the op... | [
"Updates",
"a",
"resource",
"by",
"ID",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/resources/v2018_02_01/implementation/ResourcesInner.java#L2231-L2233 |
microfocus-idol/java-content-parameter-api | src/main/java/com/hp/autonomy/aci/content/fieldtext/FieldTextBuilder.java | FieldTextBuilder.binaryOp | private FieldTextBuilder binaryOp(final String operator, final FieldTextBuilder fieldText) {
"""
Does the work for the OR, AND and XOR methods in the optimized case where fieldText is a FieldTextBuilder.
@param operator
@param fieldText
@return
"""
// Special case when we're empty
if(compo... | java | private FieldTextBuilder binaryOp(final String operator, final FieldTextBuilder fieldText) {
// Special case when we're empty
if(componentCount == 0) {
// Just copy the argument
fieldTextString.append(fieldText.fieldTextString);
lastOperator = fieldText.lastOperator;
... | [
"private",
"FieldTextBuilder",
"binaryOp",
"(",
"final",
"String",
"operator",
",",
"final",
"FieldTextBuilder",
"fieldText",
")",
"{",
"// Special case when we're empty",
"if",
"(",
"componentCount",
"==",
"0",
")",
"{",
"// Just copy the argument",
"fieldTextString",
... | Does the work for the OR, AND and XOR methods in the optimized case where fieldText is a FieldTextBuilder.
@param operator
@param fieldText
@return | [
"Does",
"the",
"work",
"for",
"the",
"OR",
"AND",
"and",
"XOR",
"methods",
"in",
"the",
"optimized",
"case",
"where",
"fieldText",
"is",
"a",
"FieldTextBuilder",
"."
] | train | https://github.com/microfocus-idol/java-content-parameter-api/blob/8d33dc633f8df2a470a571ac7694e423e7004ad0/src/main/java/com/hp/autonomy/aci/content/fieldtext/FieldTextBuilder.java#L340-L363 |
Azure/azure-sdk-for-java | sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetExecutionsInner.java | JobTargetExecutionsInner.listByStepWithServiceResponseAsync | public Observable<ServiceResponse<Page<JobExecutionInner>>> listByStepWithServiceResponseAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName, final UUID jobExecutionId, final String stepName) {
"""
Lists the target executions of a job step execution.
@p... | java | public Observable<ServiceResponse<Page<JobExecutionInner>>> listByStepWithServiceResponseAsync(final String resourceGroupName, final String serverName, final String jobAgentName, final String jobName, final UUID jobExecutionId, final String stepName) {
return listByStepSinglePageAsync(resourceGroupName, serverN... | [
"public",
"Observable",
"<",
"ServiceResponse",
"<",
"Page",
"<",
"JobExecutionInner",
">",
">",
">",
"listByStepWithServiceResponseAsync",
"(",
"final",
"String",
"resourceGroupName",
",",
"final",
"String",
"serverName",
",",
"final",
"String",
"jobAgentName",
",",
... | Lists the target executions of a job step execution.
@param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
@param serverName The name of the server.
@param jobAgentName The name of the job agent.
@param jobName T... | [
"Lists",
"the",
"target",
"executions",
"of",
"a",
"job",
"step",
"execution",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobTargetExecutionsInner.java#L496-L508 |
albfernandez/itext2 | src/main/java/com/lowagie/text/FontFactory.java | FontFactory.getFont | public static Font getFont(String fontname, String encoding, boolean embedded, float size) {
"""
Constructs a <CODE>Font</CODE>-object.
@param fontname the name of the font
@param encoding the encoding of the font
@param embedded true if the font is to be embedded in the PDF
@param size th... | java | public static Font getFont(String fontname, String encoding, boolean embedded, float size) {
return getFont(fontname, encoding, embedded, size, Font.UNDEFINED, null);
} | [
"public",
"static",
"Font",
"getFont",
"(",
"String",
"fontname",
",",
"String",
"encoding",
",",
"boolean",
"embedded",
",",
"float",
"size",
")",
"{",
"return",
"getFont",
"(",
"fontname",
",",
"encoding",
",",
"embedded",
",",
"size",
",",
"Font",
".",
... | Constructs a <CODE>Font</CODE>-object.
@param fontname the name of the font
@param encoding the encoding of the font
@param embedded true if the font is to be embedded in the PDF
@param size the size of this font
@return the Font constructed based on the parameters | [
"Constructs",
"a",
"<CODE",
">",
"Font<",
"/",
"CODE",
">",
"-",
"object",
"."
] | train | https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/FontFactory.java#L197-L199 |
groupe-sii/ogham | ogham-core/src/main/java/fr/sii/ogham/core/util/ArrayUtils.java | ArrayUtils.concat | public static <T> T[] concat(T first, T[] others) {
"""
Create an array starting with first element and followed by others.
<p>
This can be useful when handling vararg parameters and when you want to
force to have at least one value.
<p>
@param first
the first element
@param others
the other elements
@p... | java | public static <T> T[] concat(T first, T[] others) {
@SuppressWarnings("unchecked")
T[] arr = (T[]) Array.newInstance(first.getClass(), 1);
arr[0] = first;
return concat(arr, others);
} | [
"public",
"static",
"<",
"T",
">",
"T",
"[",
"]",
"concat",
"(",
"T",
"first",
",",
"T",
"[",
"]",
"others",
")",
"{",
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"T",
"[",
"]",
"arr",
"=",
"(",
"T",
"[",
"]",
")",
"Array",
".",
"newIns... | Create an array starting with first element and followed by others.
<p>
This can be useful when handling vararg parameters and when you want to
force to have at least one value.
<p>
@param first
the first element
@param others
the other elements
@param <T>
the type of each element in the array
@return the combined arr... | [
"Create",
"an",
"array",
"starting",
"with",
"first",
"element",
"and",
"followed",
"by",
"others",
".",
"<p",
">",
"This",
"can",
"be",
"useful",
"when",
"handling",
"vararg",
"parameters",
"and",
"when",
"you",
"want",
"to",
"force",
"to",
"have",
"at",
... | train | https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-core/src/main/java/fr/sii/ogham/core/util/ArrayUtils.java#L25-L30 |
minio/minio-java | api/src/main/java/io/minio/MinioClient.java | MinioClient.copyObject | public void copyObject(String bucketName, String objectName, String destBucketName)
throws InvalidKeyException, InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException,
NoResponseException, ErrorResponseException, InternalException, IOException, XmlPullParserException,
InvalidA... | java | public void copyObject(String bucketName, String objectName, String destBucketName)
throws InvalidKeyException, InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException,
NoResponseException, ErrorResponseException, InternalException, IOException, XmlPullParserException,
InvalidA... | [
"public",
"void",
"copyObject",
"(",
"String",
"bucketName",
",",
"String",
"objectName",
",",
"String",
"destBucketName",
")",
"throws",
"InvalidKeyException",
",",
"InvalidBucketNameException",
",",
"NoSuchAlgorithmException",
",",
"InsufficientDataException",
",",
"NoR... | Copy a source object into a new destination object with same object name.
</p>
<b>Example:</b><br>
<pre>
{@code minioClient.copyObject("my-bucketname", "my-objectname", "my-destbucketname");}
</pre>
@param bucketName
Bucket name where the object to be copied exists.
@param objectName
Object name source to be copied.... | [
"Copy",
"a",
"source",
"object",
"into",
"a",
"new",
"destination",
"object",
"with",
"same",
"object",
"name",
"."
] | train | https://github.com/minio/minio-java/blob/b2028f56403c89ce2d5900ae813bc1314c87bc7f/api/src/main/java/io/minio/MinioClient.java#L2008-L2014 |
apereo/cas | support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/response/BaseSamlProfileSamlResponseBuilder.java | BaseSamlProfileSamlResponseBuilder.encodeFinalResponse | protected T encodeFinalResponse(final HttpServletRequest request,
final HttpServletResponse response,
final SamlRegisteredService service,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
... | java | protected T encodeFinalResponse(final HttpServletRequest request,
final HttpServletResponse response,
final SamlRegisteredService service,
final SamlRegisteredServiceServiceProviderMetadataFacade adaptor,
... | [
"protected",
"T",
"encodeFinalResponse",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HttpServletResponse",
"response",
",",
"final",
"SamlRegisteredService",
"service",
",",
"final",
"SamlRegisteredServiceServiceProviderMetadataFacade",
"adaptor",
",",
"fina... | Encode final response.
@param request the request
@param response the response
@param service the service
@param adaptor the adaptor
@param finalResponse the final response
@param binding the binding
@param authnRequest the authn request
@param assertion the assertion
@param m... | [
"Encode",
"final",
"response",
"."
] | train | https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/response/BaseSamlProfileSamlResponseBuilder.java#L81-L100 |
google/j2objc | xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/OutputProperties.java | OutputProperties.setIntProperty | public void setIntProperty(String key, int value) {
"""
Set an output property.
@param key the key to be placed into the property list.
@param value the value corresponding to <tt>key</tt>.
@see javax.xml.transform.OutputKeys
"""
m_properties.put(key, Integer.toString(value));
} | java | public void setIntProperty(String key, int value)
{
m_properties.put(key, Integer.toString(value));
} | [
"public",
"void",
"setIntProperty",
"(",
"String",
"key",
",",
"int",
"value",
")",
"{",
"m_properties",
".",
"put",
"(",
"key",
",",
"Integer",
".",
"toString",
"(",
"value",
")",
")",
";",
"}"
] | Set an output property.
@param key the key to be placed into the property list.
@param value the value corresponding to <tt>key</tt>.
@see javax.xml.transform.OutputKeys | [
"Set",
"an",
"output",
"property",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/OutputProperties.java#L250-L253 |
kiegroup/drools | drools-core/src/main/java/org/drools/core/reteoo/compiled/ObjectTypeNodeParser.java | ObjectTypeNodeParser.getClassFieldReaderForHashedAlpha | private IndexableConstraint getClassFieldReaderForHashedAlpha(final AlphaNode alphaNode) throws IllegalArgumentException {
"""
Returns the {@link ClassFieldReader} for the hashed AlphaNode. The AlphaNode's constraint has to be a
MvelConstraint. This is the only type of hashed alpha currently supported.
@param ... | java | private IndexableConstraint getClassFieldReaderForHashedAlpha(final AlphaNode alphaNode) throws IllegalArgumentException {
final AlphaNodeFieldConstraint fieldConstraint = alphaNode.getConstraint();
if (!(fieldConstraint instanceof IndexableConstraint)) {
throw new IllegalArgumentException(... | [
"private",
"IndexableConstraint",
"getClassFieldReaderForHashedAlpha",
"(",
"final",
"AlphaNode",
"alphaNode",
")",
"throws",
"IllegalArgumentException",
"{",
"final",
"AlphaNodeFieldConstraint",
"fieldConstraint",
"=",
"alphaNode",
".",
"getConstraint",
"(",
")",
";",
"if"... | Returns the {@link ClassFieldReader} for the hashed AlphaNode. The AlphaNode's constraint has to be a
MvelConstraint. This is the only type of hashed alpha currently supported.
@param alphaNode hashed alpha to get reader for
@return ClassFieldReader
@throws IllegalArgumentException thrown if the AlphaNode's {@link org... | [
"Returns",
"the",
"{",
"@link",
"ClassFieldReader",
"}",
"for",
"the",
"hashed",
"AlphaNode",
".",
"The",
"AlphaNode",
"s",
"constraint",
"has",
"to",
"be",
"a",
"MvelConstraint",
".",
"This",
"is",
"the",
"only",
"type",
"of",
"hashed",
"alpha",
"currently"... | train | https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-core/src/main/java/org/drools/core/reteoo/compiled/ObjectTypeNodeParser.java#L222-L231 |
j256/ormlite-core | src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java | DatabaseTableConfigLoader.readTableField | private static <T> void readTableField(DatabaseTableConfig<T> config, String field, String value) {
"""
Read a field into our table configuration for field=value line.
"""
if (field.equals(FIELD_NAME_DATA_CLASS)) {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) Class.forName(valu... | java | private static <T> void readTableField(DatabaseTableConfig<T> config, String field, String value) {
if (field.equals(FIELD_NAME_DATA_CLASS)) {
try {
@SuppressWarnings("unchecked")
Class<T> clazz = (Class<T>) Class.forName(value);
config.setDataClass(clazz);
} catch (ClassNotFoundException e) {
t... | [
"private",
"static",
"<",
"T",
">",
"void",
"readTableField",
"(",
"DatabaseTableConfig",
"<",
"T",
">",
"config",
",",
"String",
"field",
",",
"String",
"value",
")",
"{",
"if",
"(",
"field",
".",
"equals",
"(",
"FIELD_NAME_DATA_CLASS",
")",
")",
"{",
"... | Read a field into our table configuration for field=value line. | [
"Read",
"a",
"field",
"into",
"our",
"table",
"configuration",
"for",
"field",
"=",
"value",
"line",
"."
] | train | https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/table/DatabaseTableConfigLoader.java#L134-L146 |
intuit/QuickBooks-V3-Java-SDK | ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java | DataService.downloadPDFAsync | public <T extends IEntity> void downloadPDFAsync(T entity, CallbackHandler callbackHandler) throws FMSException {
"""
Method to download the file for the given entity id in asynchronous fashion
@param entity
the entity
@param callbackHandler
the callback handler
@throws FMSException
throws FMSException
... | java | public <T extends IEntity> void downloadPDFAsync(T entity, CallbackHandler callbackHandler) throws FMSException {
if(!isAvailableAsPDF(entity)) {
throw new FMSException("Following entity: " + entity.getClass().getSimpleName() + " cannot be exported as PDF (Async) " );
}
IntuitMessage... | [
"public",
"<",
"T",
"extends",
"IEntity",
">",
"void",
"downloadPDFAsync",
"(",
"T",
"entity",
",",
"CallbackHandler",
"callbackHandler",
")",
"throws",
"FMSException",
"{",
"if",
"(",
"!",
"isAvailableAsPDF",
"(",
"entity",
")",
")",
"{",
"throw",
"new",
"F... | Method to download the file for the given entity id in asynchronous fashion
@param entity
the entity
@param callbackHandler
the callback handler
@throws FMSException
throws FMSException | [
"Method",
"to",
"download",
"the",
"file",
"for",
"the",
"given",
"entity",
"id",
"in",
"asynchronous",
"fashion"
] | train | https://github.com/intuit/QuickBooks-V3-Java-SDK/blob/59f988d0776d46620d0b34711c411b2b5b1da06b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/services/DataService.java#L905-L916 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java | IntegralImageOps.convolveSparse | public static double convolveSparse(GrayF64 integral , IntegralKernel kernel , int x , int y ) {
"""
Convolves a kernel around a single point in the integral image.
@param integral Input integral image. Not modified.
@param kernel Convolution kernel.
@param x Pixel the convolution is performed at.
@param y P... | java | public static double convolveSparse(GrayF64 integral , IntegralKernel kernel , int x , int y )
{
return ImplIntegralImageOps.convolveSparse(integral,kernel,x,y);
} | [
"public",
"static",
"double",
"convolveSparse",
"(",
"GrayF64",
"integral",
",",
"IntegralKernel",
"kernel",
",",
"int",
"x",
",",
"int",
"y",
")",
"{",
"return",
"ImplIntegralImageOps",
".",
"convolveSparse",
"(",
"integral",
",",
"kernel",
",",
"x",
",",
"... | Convolves a kernel around a single point in the integral image.
@param integral Input integral image. Not modified.
@param kernel Convolution kernel.
@param x Pixel the convolution is performed at.
@param y Pixel the convolution is performed at.
@return Value of the convolution | [
"Convolves",
"a",
"kernel",
"around",
"a",
"single",
"point",
"in",
"the",
"integral",
"image",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/ii/IntegralImageOps.java#L326-L329 |
square/jna-gmp | jnagmp/src/main/java/com/squareup/jnagmp/Gmp.java | Gmp.modPowSecure | public static BigInteger modPowSecure(BigInteger base, BigInteger exponent, BigInteger modulus) {
"""
Calculate (base ^ exponent) % modulus; slower, hardened against timing attacks.
<p> NOTE: this methods REQUIRES modulus to be odd, due to a crash-bug in libgmp. This is not a
problem for RSA where the modulus ... | java | public static BigInteger modPowSecure(BigInteger base, BigInteger exponent, BigInteger modulus) {
if (modulus.signum() <= 0) {
throw new ArithmeticException("modulus must be positive");
}
if (!modulus.testBit(0)) {
throw new IllegalArgumentException("modulus must be odd");
}
return INSTA... | [
"public",
"static",
"BigInteger",
"modPowSecure",
"(",
"BigInteger",
"base",
",",
"BigInteger",
"exponent",
",",
"BigInteger",
"modulus",
")",
"{",
"if",
"(",
"modulus",
".",
"signum",
"(",
")",
"<=",
"0",
")",
"{",
"throw",
"new",
"ArithmeticException",
"("... | Calculate (base ^ exponent) % modulus; slower, hardened against timing attacks.
<p> NOTE: this methods REQUIRES modulus to be odd, due to a crash-bug in libgmp. This is not a
problem for RSA where the modulus is always odd.</p>
@param base the base, must be positive
@param exponent the exponent
@param modulus the mod... | [
"Calculate",
"(",
"base",
"^",
"exponent",
")",
"%",
"modulus",
";",
"slower",
"hardened",
"against",
"timing",
"attacks",
"."
] | train | https://github.com/square/jna-gmp/blob/192d26d97d6773bc3c68ccfa97450f4257d54838/jnagmp/src/main/java/com/squareup/jnagmp/Gmp.java#L132-L140 |
OpenLiberty/open-liberty | dev/com.ibm.ws.mongo/src/com/ibm/ws/mongo/internal/MongoService.java | MongoService.ignoreWarnOrFail | private <T extends Throwable> T ignoreWarnOrFail(Throwable throwable, Class<T> exceptionClassToRaise, String msgKey, Object... objs) {
"""
Ignore, warn, or fail when a configuration error occurs.
This is copied from Tim's code in tWAS and updated slightly to
override with the Liberty ignore/warn/fail setting.
P... | java | private <T extends Throwable> T ignoreWarnOrFail(Throwable throwable, Class<T> exceptionClassToRaise, String msgKey, Object... objs) {
// Read the value each time in order to allow for changes to the onError setting
switch ((OnError) props.get(OnErrorUtil.CFG_KEY_ON_ERROR)) {
case IGNORE:
... | [
"private",
"<",
"T",
"extends",
"Throwable",
">",
"T",
"ignoreWarnOrFail",
"(",
"Throwable",
"throwable",
",",
"Class",
"<",
"T",
">",
"exceptionClassToRaise",
",",
"String",
"msgKey",
",",
"Object",
"...",
"objs",
")",
"{",
"// Read the value each time in order t... | Ignore, warn, or fail when a configuration error occurs.
This is copied from Tim's code in tWAS and updated slightly to
override with the Liberty ignore/warn/fail setting.
Precondition: invoker must have lock on this MongoDBService instance, in order to read the onError property.
@param throwable an already created Th... | [
"Ignore",
"warn",
"or",
"fail",
"when",
"a",
"configuration",
"error",
"occurs",
".",
"This",
"is",
"copied",
"from",
"Tim",
"s",
"code",
"in",
"tWAS",
"and",
"updated",
"slightly",
"to",
"override",
"with",
"the",
"Liberty",
"ignore",
"/",
"warn",
"/",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.mongo/src/com/ibm/ws/mongo/internal/MongoService.java#L354-L383 |
Activiti/Activiti | activiti-engine/src/main/java/org/activiti/engine/impl/util/ReflectUtil.java | ReflectUtil.getSetter | public static Method getSetter(String fieldName, Class<?> clazz, Class<?> fieldType) {
"""
Returns the setter-method for the given field name or null if no setter exists.
"""
String setterName = "set" + Character.toTitleCase(fieldName.charAt(0)) + fieldName.substring(1, fieldName.length());
try {
... | java | public static Method getSetter(String fieldName, Class<?> clazz, Class<?> fieldType) {
String setterName = "set" + Character.toTitleCase(fieldName.charAt(0)) + fieldName.substring(1, fieldName.length());
try {
// Using getMethods(), getMethod(...) expects exact parameter type
// matching and ignores... | [
"public",
"static",
"Method",
"getSetter",
"(",
"String",
"fieldName",
",",
"Class",
"<",
"?",
">",
"clazz",
",",
"Class",
"<",
"?",
">",
"fieldType",
")",
"{",
"String",
"setterName",
"=",
"\"set\"",
"+",
"Character",
".",
"toTitleCase",
"(",
"fieldName",... | Returns the setter-method for the given field name or null if no setter exists. | [
"Returns",
"the",
"setter",
"-",
"method",
"for",
"the",
"given",
"field",
"name",
"or",
"null",
"if",
"no",
"setter",
"exists",
"."
] | train | https://github.com/Activiti/Activiti/blob/82e2b2cd2083b2f734ca0efc7815389c0f2517d9/activiti-engine/src/main/java/org/activiti/engine/impl/util/ReflectUtil.java#L193-L211 |
eclipse/hawkbit | hawkbit-security-core/src/main/java/org/eclipse/hawkbit/util/IpUtil.java | IpUtil.getClientIpFromRequest | public static URI getClientIpFromRequest(final HttpServletRequest request,
final HawkbitSecurityProperties securityProperties) {
"""
Retrieves the string based IP address from a given
{@link HttpServletRequest} by either the
{@link HttpHeaders#X_FORWARDED_FOR} or by the
{@link HttpServletRequest#get... | java | public static URI getClientIpFromRequest(final HttpServletRequest request,
final HawkbitSecurityProperties securityProperties) {
return getClientIpFromRequest(request, securityProperties.getClients().getRemoteIpHeader(),
securityProperties.getClients().isTrackRemoteIp());
} | [
"public",
"static",
"URI",
"getClientIpFromRequest",
"(",
"final",
"HttpServletRequest",
"request",
",",
"final",
"HawkbitSecurityProperties",
"securityProperties",
")",
"{",
"return",
"getClientIpFromRequest",
"(",
"request",
",",
"securityProperties",
".",
"getClients",
... | Retrieves the string based IP address from a given
{@link HttpServletRequest} by either the
{@link HttpHeaders#X_FORWARDED_FOR} or by the
{@link HttpServletRequest#getRemoteAddr()} methods.
@param request
the {@link HttpServletRequest} to determine the IP address
where this request has been sent from
@param securityPr... | [
"Retrieves",
"the",
"string",
"based",
"IP",
"address",
"from",
"a",
"given",
"{",
"@link",
"HttpServletRequest",
"}",
"by",
"either",
"the",
"{",
"@link",
"HttpHeaders#X_FORWARDED_FOR",
"}",
"or",
"by",
"the",
"{",
"@link",
"HttpServletRequest#getRemoteAddr",
"()... | train | https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/util/IpUtil.java#L56-L61 |
orbisgis/h2gis | postgis-jts/src/main/java/org/h2gis/postgis_jts/JtsBinaryParser.java | JtsBinaryParser.parsePolygon | private Polygon parsePolygon(ValueGetter data, boolean haveZ, boolean haveM, int srid) {
"""
Parse the given {@link org.postgis.binary.ValueGetter} into a JTS
{@link org.locationtech.jts.geom.Polygon}.
@param data {@link org.postgis.binary.ValueGetter} to parse.
@param haveZ True if the {@link org.locationtec... | java | private Polygon parsePolygon(ValueGetter data, boolean haveZ, boolean haveM, int srid) {
int holecount = data.getInt() - 1;
LinearRing[] rings = new LinearRing[holecount];
LinearRing shell = this.parseLinearRing(data, haveZ, haveM);
shell.setSRID(srid);
for(int i = 0; i < holeco... | [
"private",
"Polygon",
"parsePolygon",
"(",
"ValueGetter",
"data",
",",
"boolean",
"haveZ",
",",
"boolean",
"haveM",
",",
"int",
"srid",
")",
"{",
"int",
"holecount",
"=",
"data",
".",
"getInt",
"(",
")",
"-",
"1",
";",
"LinearRing",
"[",
"]",
"rings",
... | Parse the given {@link org.postgis.binary.ValueGetter} into a JTS
{@link org.locationtech.jts.geom.Polygon}.
@param data {@link org.postgis.binary.ValueGetter} to parse.
@param haveZ True if the {@link org.locationtech.jts.geom.Polygon} has a Z component.
@param haveM True if the {@link org.locationtech.jts.geom.Polyg... | [
"Parse",
"the",
"given",
"{",
"@link",
"org",
".",
"postgis",
".",
"binary",
".",
"ValueGetter",
"}",
"into",
"a",
"JTS",
"{",
"@link",
"org",
".",
"locationtech",
".",
"jts",
".",
"geom",
".",
"Polygon",
"}",
"."
] | train | https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/postgis-jts/src/main/java/org/h2gis/postgis_jts/JtsBinaryParser.java#L282-L294 |
code4everything/util | src/main/java/com/zhazhapan/util/NetUtils.java | NetUtils.removeCookie | public static boolean removeCookie(String name, HttpServletRequest request, HttpServletResponse response) {
"""
删除指定Cookie
@param name Cookie名
@param request {@link HttpServletRequest}
@param response {@link HttpServletResponse}
@return {@link Boolean}
@since 1.0.8
"""
return removeCookie(na... | java | public static boolean removeCookie(String name, HttpServletRequest request, HttpServletResponse response) {
return removeCookie(name, request.getCookies(), response);
} | [
"public",
"static",
"boolean",
"removeCookie",
"(",
"String",
"name",
",",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"{",
"return",
"removeCookie",
"(",
"name",
",",
"request",
".",
"getCookies",
"(",
")",
",",
"response",
")"... | 删除指定Cookie
@param name Cookie名
@param request {@link HttpServletRequest}
@param response {@link HttpServletResponse}
@return {@link Boolean}
@since 1.0.8 | [
"删除指定Cookie"
] | train | https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/NetUtils.java#L518-L520 |
logic-ng/LogicNG | src/main/java/org/logicng/solvers/maxsat/encodings/Encoder.java | Encoder.updateCardinality | public void updateCardinality(final MiniSatStyleSolver s, int rhs) {
"""
Updates the cardinality constraint.
@param s the solver
@param rhs the new right hand side
@throws IllegalStateException if the cardinality encoding is unknown
"""
switch (this.cardinalityEncoding) {
case TOTALIZER:
... | java | public void updateCardinality(final MiniSatStyleSolver s, int rhs) {
switch (this.cardinalityEncoding) {
case TOTALIZER:
this.totalizer.update(s, rhs);
break;
case MTOTALIZER:
this.mtotalizer.update(s, rhs);
break;
default:
throw new IllegalStateException("U... | [
"public",
"void",
"updateCardinality",
"(",
"final",
"MiniSatStyleSolver",
"s",
",",
"int",
"rhs",
")",
"{",
"switch",
"(",
"this",
".",
"cardinalityEncoding",
")",
"{",
"case",
"TOTALIZER",
":",
"this",
".",
"totalizer",
".",
"update",
"(",
"s",
",",
"rhs... | Updates the cardinality constraint.
@param s the solver
@param rhs the new right hand side
@throws IllegalStateException if the cardinality encoding is unknown | [
"Updates",
"the",
"cardinality",
"constraint",
"."
] | train | https://github.com/logic-ng/LogicNG/blob/bb9eb88a768be4be8e02a76cfc4a59e6c3fb7f2e/src/main/java/org/logicng/solvers/maxsat/encodings/Encoder.java#L189-L200 |
vdmeer/asciitable | src/main/java/de/vandermeer/asciitable/AT_CellContext.java | AT_CellContext.setPaddingLeftRight | public AT_CellContext setPaddingLeftRight(int paddingLeft, int paddingRight) {
"""
Sets left and right padding (only if both values are not smaller than 0).
@param paddingLeft new left padding, ignored if smaller than 0
@param paddingRight new right padding, ignored if smaller than 0
@return this to allow chain... | java | public AT_CellContext setPaddingLeftRight(int paddingLeft, int paddingRight){
if(paddingLeft>-1 && paddingRight>-1){
this.paddingLeft = paddingLeft;
this.paddingRight = paddingRight;
}
return this;
} | [
"public",
"AT_CellContext",
"setPaddingLeftRight",
"(",
"int",
"paddingLeft",
",",
"int",
"paddingRight",
")",
"{",
"if",
"(",
"paddingLeft",
">",
"-",
"1",
"&&",
"paddingRight",
">",
"-",
"1",
")",
"{",
"this",
".",
"paddingLeft",
"=",
"paddingLeft",
";",
... | Sets left and right padding (only if both values are not smaller than 0).
@param paddingLeft new left padding, ignored if smaller than 0
@param paddingRight new right padding, ignored if smaller than 0
@return this to allow chaining | [
"Sets",
"left",
"and",
"right",
"padding",
"(",
"only",
"if",
"both",
"values",
"are",
"not",
"smaller",
"than",
"0",
")",
"."
] | train | https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_CellContext.java#L277-L283 |
samskivert/samskivert | src/main/java/com/samskivert/util/CollectionUtil.java | CollectionUtil.addAll | @ReplacedBy("java.util.Collections#addAll()")
public static <T, E extends T, C extends Collection<T>> C addAll (C col, E[] values) {
"""
Adds all items in the given object array to the supplied collection and
returns the supplied collection. If the supplied array is null, nothing
is added to the collection.
... | java | @ReplacedBy("java.util.Collections#addAll()")
public static <T, E extends T, C extends Collection<T>> C addAll (C col, E[] values)
{
if (values != null) {
for (E value : values) {
col.add(value);
}
}
return col;
} | [
"@",
"ReplacedBy",
"(",
"\"java.util.Collections#addAll()\"",
")",
"public",
"static",
"<",
"T",
",",
"E",
"extends",
"T",
",",
"C",
"extends",
"Collection",
"<",
"T",
">",
">",
"C",
"addAll",
"(",
"C",
"col",
",",
"E",
"[",
"]",
"values",
")",
"{",
... | Adds all items in the given object array to the supplied collection and
returns the supplied collection. If the supplied array is null, nothing
is added to the collection. | [
"Adds",
"all",
"items",
"in",
"the",
"given",
"object",
"array",
"to",
"the",
"supplied",
"collection",
"and",
"returns",
"the",
"supplied",
"collection",
".",
"If",
"the",
"supplied",
"array",
"is",
"null",
"nothing",
"is",
"added",
"to",
"the",
"collection... | train | https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/CollectionUtil.java#L57-L66 |
opengeospatial/teamengine | teamengine-web/src/main/java/com/occamlab/te/web/XMLUtils.java | XMLUtils.getFirstNode | public static Node getFirstNode(Document doc, String xPathExpression) {
"""
Get first node on a Document doc, give a xpath Expression
@param doc
@param xPathExpression
@return a Node or null if not found
"""
try {
XPathFactory xPathfactory = XPathFactory.newInstance();
XPath xpath = xPathfacto... | java | public static Node getFirstNode(Document doc, String xPathExpression) {
try {
XPathFactory xPathfactory = XPathFactory.newInstance();
XPath xpath = xPathfactory.newXPath();
XPathExpression expr;
expr = xpath.compile(xPathExpression);
NodeList nl = (NodeList) expr.evaluate(doc, XPathConstants.NOD... | [
"public",
"static",
"Node",
"getFirstNode",
"(",
"Document",
"doc",
",",
"String",
"xPathExpression",
")",
"{",
"try",
"{",
"XPathFactory",
"xPathfactory",
"=",
"XPathFactory",
".",
"newInstance",
"(",
")",
";",
"XPath",
"xpath",
"=",
"xPathfactory",
".",
"new... | Get first node on a Document doc, give a xpath Expression
@param doc
@param xPathExpression
@return a Node or null if not found | [
"Get",
"first",
"node",
"on",
"a",
"Document",
"doc",
"give",
"a",
"xpath",
"Expression"
] | train | https://github.com/opengeospatial/teamengine/blob/b6b890214b6784bbe19460bf753bdf28a9514bee/teamengine-web/src/main/java/com/occamlab/te/web/XMLUtils.java#L29-L44 |
diegocarloslima/ByakuGallery | ByakuGallery/src/com/diegocarloslima/byakugallery/lib/TouchImageView.java | TouchImageView.computeFocus | private static float computeFocus(float viewSize, float drawableSize, float currentTranslation, float focusCoordinate) {
"""
If our focal point is outside the image, we will project it to our image bounds
"""
if(currentTranslation > 0 && focusCoordinate < currentTranslation) {
return currentTranslation;
... | java | private static float computeFocus(float viewSize, float drawableSize, float currentTranslation, float focusCoordinate) {
if(currentTranslation > 0 && focusCoordinate < currentTranslation) {
return currentTranslation;
} else if(currentTranslation < viewSize - drawableSize && focusCoordinate > currentTranslation +... | [
"private",
"static",
"float",
"computeFocus",
"(",
"float",
"viewSize",
",",
"float",
"drawableSize",
",",
"float",
"currentTranslation",
",",
"float",
"focusCoordinate",
")",
"{",
"if",
"(",
"currentTranslation",
">",
"0",
"&&",
"focusCoordinate",
"<",
"currentTr... | If our focal point is outside the image, we will project it to our image bounds | [
"If",
"our",
"focal",
"point",
"is",
"outside",
"the",
"image",
"we",
"will",
"project",
"it",
"to",
"our",
"image",
"bounds"
] | train | https://github.com/diegocarloslima/ByakuGallery/blob/a0472e8c9f79184b6b83351da06a5544e4dc1be4/ByakuGallery/src/com/diegocarloslima/byakugallery/lib/TouchImageView.java#L386-L394 |
anotheria/configureme | src/main/java/org/configureme/util/IOUtils.java | IOUtils.readInputStreamBufferedAsString | public static String readInputStreamBufferedAsString(final InputStream in, final String charset) throws IOException {
"""
<p>readInputStreamBufferedAsString.</p>
@param in a {@link java.io.InputStream} object.
@param charset a {@link java.lang.String} object.
@return a {@link java.lang.String} object.
@throw... | java | public static String readInputStreamBufferedAsString(final InputStream in, final String charset) throws IOException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new UnicodeReader(in, charset));
StringBuilder result = new StringBuilder();
char[] cbuf = new char[2048];
int read;
wh... | [
"public",
"static",
"String",
"readInputStreamBufferedAsString",
"(",
"final",
"InputStream",
"in",
",",
"final",
"String",
"charset",
")",
"throws",
"IOException",
"{",
"BufferedReader",
"reader",
"=",
"null",
";",
"try",
"{",
"reader",
"=",
"new",
"BufferedReade... | <p>readInputStreamBufferedAsString.</p>
@param in a {@link java.io.InputStream} object.
@param charset a {@link java.lang.String} object.
@return a {@link java.lang.String} object.
@throws java.io.IOException if any. | [
"<p",
">",
"readInputStreamBufferedAsString",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/anotheria/configureme/blob/1f52dd9109349623190586bdf5a592de8016e1fa/src/main/java/org/configureme/util/IOUtils.java#L125-L139 |
facebookarchive/hadoop-20 | src/hdfs/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java | TransferFsImage.getFileClient | static MD5Hash getFileClient(String nnHostPort,
String queryString, List<OutputStream> outputStreams,
Storage dstStorage, boolean getChecksum) throws IOException {
"""
Client-side Method to fetch file from a server
Copies the response from the URL to a list of local files.
@param dstStorage if an err... | java | static MD5Hash getFileClient(String nnHostPort,
String queryString, List<OutputStream> outputStreams,
Storage dstStorage, boolean getChecksum) throws IOException {
String proto = "http://";
StringBuilder str = new StringBuilder(proto+nnHostPort+"/getimage?");
str.append(queryString);
LOG.in... | [
"static",
"MD5Hash",
"getFileClient",
"(",
"String",
"nnHostPort",
",",
"String",
"queryString",
",",
"List",
"<",
"OutputStream",
">",
"outputStreams",
",",
"Storage",
"dstStorage",
",",
"boolean",
"getChecksum",
")",
"throws",
"IOException",
"{",
"String",
"prot... | Client-side Method to fetch file from a server
Copies the response from the URL to a list of local files.
@param dstStorage if an error occurs writing to one of the files,
this storage object will be notified.
@Return a digest of the received file if getChecksum is true | [
"Client",
"-",
"side",
"Method",
"to",
"fetch",
"file",
"from",
"a",
"server",
"Copies",
"the",
"response",
"from",
"the",
"URL",
"to",
"a",
"list",
"of",
"local",
"files",
"."
] | train | https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/TransferFsImage.java#L267-L280 |
jMetal/jMetal | jmetal-exec/src/main/java/org/uma/jmetal/runner/multiobjective/SMPSORPWithOneReferencePointRunner.java | SMPSORPWithOneReferencePointRunner.main | public static void main(String[] args) throws JMetalException {
"""
Program to run the SMPSORP algorithm with one reference point. SMPSORP is described in
"Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference
* Articulation. Antonio J. Nebro, Juan J. Durillo, José Gar... | java | public static void main(String[] args) throws JMetalException {
DoubleProblem problem;
Algorithm<List<DoubleSolution>> algorithm;
MutationOperator<DoubleSolution> mutation;
String problemName;
if (args.length == 1) {
problemName = args[0];
} else {
problemName = "org.uma.jmetal.prob... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"throws",
"JMetalException",
"{",
"DoubleProblem",
"problem",
";",
"Algorithm",
"<",
"List",
"<",
"DoubleSolution",
">",
">",
"algorithm",
";",
"MutationOperator",
"<",
"DoubleSolution",
... | Program to run the SMPSORP algorithm with one reference point. SMPSORP is described in
"Extending the Speed-constrained Multi-Objective PSO (SMPSO) With Reference Point Based Preference
* Articulation. Antonio J. Nebro, Juan J. Durillo, José García-Nieto, Cristóbal Barba-González,
* Javier Del Ser, Carlos A. Coello Coe... | [
"Program",
"to",
"run",
"the",
"SMPSORP",
"algorithm",
"with",
"one",
"reference",
"point",
".",
"SMPSORP",
"is",
"described",
"in",
"Extending",
"the",
"Speed",
"-",
"constrained",
"Multi",
"-",
"Objective",
"PSO",
"(",
"SMPSO",
")",
"With",
"Reference",
"P... | train | https://github.com/jMetal/jMetal/blob/bc981e6aede275d26c5216c9a01227d9675b0cf7/jmetal-exec/src/main/java/org/uma/jmetal/runner/multiobjective/SMPSORPWithOneReferencePointRunner.java#L34-L95 |
legsem/legstar.avro | legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java | Cob2AvroJob.setInputKeyCobolContext | public static void setInputKeyCobolContext(Job job, Class<? extends CobolContext> cobolContext) {
"""
Sets the job input key mainframe COBOL parameters (including code page).
@param job The job to configure.
@param cobolContext The input key mainframe COBOL parameters.
"""
job.getConfiguration().setC... | java | public static void setInputKeyCobolContext(Job job, Class<? extends CobolContext> cobolContext) {
job.getConfiguration().setClass(CONF_INPUT_KEY_COBOL_CONTEXT, cobolContext, CobolContext.class);
} | [
"public",
"static",
"void",
"setInputKeyCobolContext",
"(",
"Job",
"job",
",",
"Class",
"<",
"?",
"extends",
"CobolContext",
">",
"cobolContext",
")",
"{",
"job",
".",
"getConfiguration",
"(",
")",
".",
"setClass",
"(",
"CONF_INPUT_KEY_COBOL_CONTEXT",
",",
"cobo... | Sets the job input key mainframe COBOL parameters (including code page).
@param job The job to configure.
@param cobolContext The input key mainframe COBOL parameters. | [
"Sets",
"the",
"job",
"input",
"key",
"mainframe",
"COBOL",
"parameters",
"(",
"including",
"code",
"page",
")",
"."
] | train | https://github.com/legsem/legstar.avro/blob/bad5e0bf41700951eee1ad6a5d6d0c47b3da8f0b/legstar.avro.cob2avro.hadoop/src/main/java/com/legstar/avro/cob2avro/hadoop/mapreduce/Cob2AvroJob.java#L40-L42 |
tvesalainen/util | util/src/main/java/org/vesalainen/lang/Primitives.java | Primitives.writeFloat | public static final void writeFloat(float value, byte[] array, int offset) {
"""
Write value to byte array
@param value
@param array
@param offset
@see java.nio.ByteBuffer#putFloat(float)
"""
writeInt(Float.floatToRawIntBits(value), array, offset);
} | java | public static final void writeFloat(float value, byte[] array, int offset)
{
writeInt(Float.floatToRawIntBits(value), array, offset);
} | [
"public",
"static",
"final",
"void",
"writeFloat",
"(",
"float",
"value",
",",
"byte",
"[",
"]",
"array",
",",
"int",
"offset",
")",
"{",
"writeInt",
"(",
"Float",
".",
"floatToRawIntBits",
"(",
"value",
")",
",",
"array",
",",
"offset",
")",
";",
"}"
... | Write value to byte array
@param value
@param array
@param offset
@see java.nio.ByteBuffer#putFloat(float) | [
"Write",
"value",
"to",
"byte",
"array"
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/lang/Primitives.java#L145-L148 |
haraldk/TwelveMonkeys | sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/ObjectReader.java | ObjectReader.readObjects | public Object[] readObjects(Class pObjClass, Hashtable pMapping)
throws SQLException {
"""
Reads all objects from the database, using the given mapping.
@param objClass The class of the objects to read
@param mapping The hashtable containing the object mapping
@return An array of Objects, or an zer... | java | public Object[] readObjects(Class pObjClass, Hashtable pMapping)
throws SQLException {
return readObjects(pObjClass, pMapping, null);
} | [
"public",
"Object",
"[",
"]",
"readObjects",
"(",
"Class",
"pObjClass",
",",
"Hashtable",
"pMapping",
")",
"throws",
"SQLException",
"{",
"return",
"readObjects",
"(",
"pObjClass",
",",
"pMapping",
",",
"null",
")",
";",
"}"
] | Reads all objects from the database, using the given mapping.
@param objClass The class of the objects to read
@param mapping The hashtable containing the object mapping
@return An array of Objects, or an zero-length array if none was found | [
"Reads",
"all",
"objects",
"from",
"the",
"database",
"using",
"the",
"given",
"mapping",
"."
] | train | https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/sandbox/sandbox-common/src/main/java/com/twelvemonkeys/sql/ObjectReader.java#L510-L513 |
pwall567/jsonutil | src/main/java/net/pwall/json/JSON.java | JSON.parseObject | public static JSONObject parseObject(InputStream is, Charset charSet) throws IOException {
"""
Parse a sequence of characters from an {@link InputStream} as a JSON object, specifying
the character set.
@param is the {@link InputStream}
@param charSet the character set
@return the JSON objec... | java | public static JSONObject parseObject(InputStream is, Charset charSet) throws IOException {
return (JSONObject)parse(is, charSet);
} | [
"public",
"static",
"JSONObject",
"parseObject",
"(",
"InputStream",
"is",
",",
"Charset",
"charSet",
")",
"throws",
"IOException",
"{",
"return",
"(",
"JSONObject",
")",
"parse",
"(",
"is",
",",
"charSet",
")",
";",
"}"
] | Parse a sequence of characters from an {@link InputStream} as a JSON object, specifying
the character set.
@param is the {@link InputStream}
@param charSet the character set
@return the JSON object
@throws JSONException if the stream does not contain a valid JSON value
@throws IOException on any I/... | [
"Parse",
"a",
"sequence",
"of",
"characters",
"from",
"an",
"{",
"@link",
"InputStream",
"}",
"as",
"a",
"JSON",
"object",
"specifying",
"the",
"character",
"set",
"."
] | train | https://github.com/pwall567/jsonutil/blob/dd5960b9b0bcc9acfe6c52b884fffd9ee5f422fe/src/main/java/net/pwall/json/JSON.java#L392-L394 |
hawkular/hawkular-agent | hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/CoreJBossASClient.java | CoreJBossASClient.getSystemProperties | public Properties getSystemProperties() throws Exception {
"""
This returns the system properties that are set in the AS JVM. This is not the system properties
in the JVM of this client object - it is actually the system properties in the remote
JVM of the AS instance that the client is talking to.
@return th... | java | public Properties getSystemProperties() throws Exception {
final String[] address = { CORE_SERVICE, PLATFORM_MBEAN, "type", "runtime" };
final ModelNode op = createReadAttributeRequest(true, "system-properties", Address.root().add(address));
final ModelNode results = execute(op);
if (isS... | [
"public",
"Properties",
"getSystemProperties",
"(",
")",
"throws",
"Exception",
"{",
"final",
"String",
"[",
"]",
"address",
"=",
"{",
"CORE_SERVICE",
",",
"PLATFORM_MBEAN",
",",
"\"type\"",
",",
"\"runtime\"",
"}",
";",
"final",
"ModelNode",
"op",
"=",
"creat... | This returns the system properties that are set in the AS JVM. This is not the system properties
in the JVM of this client object - it is actually the system properties in the remote
JVM of the AS instance that the client is talking to.
@return the AS JVM's system properties
@throws Exception any error | [
"This",
"returns",
"the",
"system",
"properties",
"that",
"are",
"set",
"in",
"the",
"AS",
"JVM",
".",
"This",
"is",
"not",
"the",
"system",
"properties",
"in",
"the",
"JVM",
"of",
"this",
"client",
"object",
"-",
"it",
"is",
"actually",
"the",
"system",... | train | https://github.com/hawkular/hawkular-agent/blob/a7a88fc7e4f12302e4c4306d1c91e11f81c8b811/hawkular-dmr-client/src/main/java/org/hawkular/dmrclient/CoreJBossASClient.java#L98-L118 |
sculptor/sculptor | sculptor-framework/sculptor-framework-main/src/main/java/org/sculptor/framework/accessimpl/jpa/JpaHelper.java | JpaHelper.getValue | public static Object getValue(Object instance, String name) {
"""
tries to get the value from a field or a getter property for a given object instance
@param instance the object instance
@param name name of the property or field
@return
@throws IllegalArgumentException
@throws IllegalAccessException
@throw... | java | public static Object getValue(Object instance, String name) {
assert instance != null;
assert name != null;
try {
Class<?> clazz = instance.getClass();
Object value = null;
Method property = findProperty(clazz, name);
if (property != null) {... | [
"public",
"static",
"Object",
"getValue",
"(",
"Object",
"instance",
",",
"String",
"name",
")",
"{",
"assert",
"instance",
"!=",
"null",
";",
"assert",
"name",
"!=",
"null",
";",
"try",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"instance",
".",
"getC... | tries to get the value from a field or a getter property for a given object instance
@param instance the object instance
@param name name of the property or field
@return
@throws IllegalArgumentException
@throws IllegalAccessException
@throws InvocationTargetException | [
"tries",
"to",
"get",
"the",
"value",
"from",
"a",
"field",
"or",
"a",
"getter",
"property",
"for",
"a",
"given",
"object",
"instance"
] | train | https://github.com/sculptor/sculptor/blob/38df06ceb7e40f5f52dbd53b1cd1d07ee11aade5/sculptor-framework/sculptor-framework-main/src/main/java/org/sculptor/framework/accessimpl/jpa/JpaHelper.java#L162-L185 |
google/error-prone | core/src/main/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedVariable.java | UnnecessaryBoxedVariable.localVariableMatches | private static boolean localVariableMatches(VariableTree tree, VisitorState state) {
"""
Check to see if the local variable should be considered for replacement, i.e.
<ul>
<li>A variable without an initializer
<li>Enhanced for loop variables can be replaced if they are loops over primitive arrays
<li>A varia... | java | private static boolean localVariableMatches(VariableTree tree, VisitorState state) {
ExpressionTree expression = tree.getInitializer();
if (expression == null) {
Tree leaf = state.getPath().getParentPath().getLeaf();
if (!(leaf instanceof EnhancedForLoopTree)) {
return true;
}
En... | [
"private",
"static",
"boolean",
"localVariableMatches",
"(",
"VariableTree",
"tree",
",",
"VisitorState",
"state",
")",
"{",
"ExpressionTree",
"expression",
"=",
"tree",
".",
"getInitializer",
"(",
")",
";",
"if",
"(",
"expression",
"==",
"null",
")",
"{",
"Tr... | Check to see if the local variable should be considered for replacement, i.e.
<ul>
<li>A variable without an initializer
<li>Enhanced for loop variables can be replaced if they are loops over primitive arrays
<li>A variable initialized with a primitive value (which is then auto-boxed)
<li>A variable initialized with a... | [
"Check",
"to",
"see",
"if",
"the",
"local",
"variable",
"should",
"be",
"considered",
"for",
"replacement",
"i",
".",
"e",
"."
] | train | https://github.com/google/error-prone/blob/fe2e3cc2cf1958cb7c487bfe89852bb4c225ba9d/core/src/main/java/com/google/errorprone/bugpatterns/UnnecessaryBoxedVariable.java#L177-L202 |
amaembo/streamex | src/main/java/one/util/streamex/EntryStream.java | EntryStream.toNavigableMap | public NavigableMap<K, V> toNavigableMap(BinaryOperator<V> mergeFunction) {
"""
Returns a {@link NavigableMap} containing the elements of this stream.
There are no guarantees on the type or serializability of the
{@code NavigableMap} returned; if more control over the returned
{@code Map} is required, use
{@li... | java | public NavigableMap<K, V> toNavigableMap(BinaryOperator<V> mergeFunction) {
return collect(Collectors.toMap(Entry::getKey, Entry::getValue, mergeFunction, TreeMap::new));
} | [
"public",
"NavigableMap",
"<",
"K",
",",
"V",
">",
"toNavigableMap",
"(",
"BinaryOperator",
"<",
"V",
">",
"mergeFunction",
")",
"{",
"return",
"collect",
"(",
"Collectors",
".",
"toMap",
"(",
"Entry",
"::",
"getKey",
",",
"Entry",
"::",
"getValue",
",",
... | Returns a {@link NavigableMap} containing the elements of this stream.
There are no guarantees on the type or serializability of the
{@code NavigableMap} returned; if more control over the returned
{@code Map} is required, use
{@link #toCustomMap(BinaryOperator, Supplier)}.
<p>
If the mapped keys contains duplicates (... | [
"Returns",
"a",
"{",
"@link",
"NavigableMap",
"}",
"containing",
"the",
"elements",
"of",
"this",
"stream",
".",
"There",
"are",
"no",
"guarantees",
"on",
"the",
"type",
"or",
"serializability",
"of",
"the",
"{",
"@code",
"NavigableMap",
"}",
"returned",
";"... | train | https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/EntryStream.java#L1389-L1391 |
Azure/azure-sdk-for-java | storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java | BlobContainersInner.clearLegalHold | public LegalHoldInner clearLegalHold(String resourceGroupName, String accountName, String containerName, List<String> tags) {
"""
Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
@param resourceGro... | java | public LegalHoldInner clearLegalHold(String resourceGroupName, String accountName, String containerName, List<String> tags) {
return clearLegalHoldWithServiceResponseAsync(resourceGroupName, accountName, containerName, tags).toBlocking().single().body();
} | [
"public",
"LegalHoldInner",
"clearLegalHold",
"(",
"String",
"resourceGroupName",
",",
"String",
"accountName",
",",
"String",
"containerName",
",",
"List",
"<",
"String",
">",
"tags",
")",
"{",
"return",
"clearLegalHoldWithServiceResponseAsync",
"(",
"resourceGroupName... | Clears legal hold tags. Clearing the same or non-existent tag results in an idempotent operation. ClearLegalHold clears out only the specified tags in the request.
@param resourceGroupName The name of the resource group within the user's subscription. The name is case insensitive.
@param accountName The name of the st... | [
"Clears",
"legal",
"hold",
"tags",
".",
"Clearing",
"the",
"same",
"or",
"non",
"-",
"existent",
"tag",
"results",
"in",
"an",
"idempotent",
"operation",
".",
"ClearLegalHold",
"clears",
"out",
"only",
"the",
"specified",
"tags",
"in",
"the",
"request",
"."
... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L898-L900 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDate.java | LocalDate.withYear | public LocalDate withYear(int year) {
"""
Returns a copy of this {@code LocalDate} with the year altered.
<p>
If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
<p>
This instance is immutable and unaffected by this method call.
@param year the year to set in... | java | public LocalDate withYear(int year) {
if (this.year == year) {
return this;
}
YEAR.checkValidValue(year);
return resolvePreviousValid(year, month, day);
} | [
"public",
"LocalDate",
"withYear",
"(",
"int",
"year",
")",
"{",
"if",
"(",
"this",
".",
"year",
"==",
"year",
")",
"{",
"return",
"this",
";",
"}",
"YEAR",
".",
"checkValidValue",
"(",
"year",
")",
";",
"return",
"resolvePreviousValid",
"(",
"year",
"... | Returns a copy of this {@code LocalDate} with the year altered.
<p>
If the day-of-month is invalid for the year, it will be changed to the last valid day of the month.
<p>
This instance is immutable and unaffected by this method call.
@param year the year to set in the result, from MIN_YEAR to MAX_YEAR
@return a {@co... | [
"Returns",
"a",
"copy",
"of",
"this",
"{",
"@code",
"LocalDate",
"}",
"with",
"the",
"year",
"altered",
".",
"<p",
">",
"If",
"the",
"day",
"-",
"of",
"-",
"month",
"is",
"invalid",
"for",
"the",
"year",
"it",
"will",
"be",
"changed",
"to",
"the",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDate.java#L1050-L1056 |
netscaler/nitro | src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel_binding.java | sslpolicylabel_binding.get | public static sslpolicylabel_binding get(nitro_service service, String labelname) throws Exception {
"""
Use this API to fetch sslpolicylabel_binding resource of given name .
"""
sslpolicylabel_binding obj = new sslpolicylabel_binding();
obj.set_labelname(labelname);
sslpolicylabel_binding response = (ss... | java | public static sslpolicylabel_binding get(nitro_service service, String labelname) throws Exception{
sslpolicylabel_binding obj = new sslpolicylabel_binding();
obj.set_labelname(labelname);
sslpolicylabel_binding response = (sslpolicylabel_binding) obj.get_resource(service);
return response;
} | [
"public",
"static",
"sslpolicylabel_binding",
"get",
"(",
"nitro_service",
"service",
",",
"String",
"labelname",
")",
"throws",
"Exception",
"{",
"sslpolicylabel_binding",
"obj",
"=",
"new",
"sslpolicylabel_binding",
"(",
")",
";",
"obj",
".",
"set_labelname",
"(",... | Use this API to fetch sslpolicylabel_binding resource of given name . | [
"Use",
"this",
"API",
"to",
"fetch",
"sslpolicylabel_binding",
"resource",
"of",
"given",
"name",
"."
] | train | https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel_binding.java#L103-L108 |
cubedtear/aritzh | aritzh-core/src/main/java/io/github/aritzhack/aritzh/config/Configuration.java | Configuration.newConfig | public static Configuration newConfig(@NotNull File configFile) {
"""
Creates a new empty configuration object for the specified file
@param configFile the config file (doesn't need to exist)
@return A new empty configuration object
"""
return new Configuration(OneOrOther.<File, Path>ofOne(configFile), f... | java | public static Configuration newConfig(@NotNull File configFile) {
return new Configuration(OneOrOther.<File, Path>ofOne(configFile), false);
} | [
"public",
"static",
"Configuration",
"newConfig",
"(",
"@",
"NotNull",
"File",
"configFile",
")",
"{",
"return",
"new",
"Configuration",
"(",
"OneOrOther",
".",
"<",
"File",
",",
"Path",
">",
"ofOne",
"(",
"configFile",
")",
",",
"false",
")",
";",
"}"
] | Creates a new empty configuration object for the specified file
@param configFile the config file (doesn't need to exist)
@return A new empty configuration object | [
"Creates",
"a",
"new",
"empty",
"configuration",
"object",
"for",
"the",
"specified",
"file"
] | train | https://github.com/cubedtear/aritzh/blob/bc7493447a1a6088c4a7306ca4d0f0c20278364f/aritzh-core/src/main/java/io/github/aritzhack/aritzh/config/Configuration.java#L172-L174 |
khuxtable/seaglass | src/main/java/com/seaglasslookandfeel/component/SeaGlassComboPopup.java | SeaGlassComboPopup.configurePopup | protected void configurePopup() {
"""
Configures the popup portion of the combo box. This method is called when
the UI class is created.
"""
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
setBorderPainted(true);
setBorder(LIST_BORDER);
setOpaque(false);
add(scroller)... | java | protected void configurePopup() {
setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
setBorderPainted(true);
setBorder(LIST_BORDER);
setOpaque(false);
add(scroller);
setDoubleBuffered(true);
setFocusable(false);
} | [
"protected",
"void",
"configurePopup",
"(",
")",
"{",
"setLayout",
"(",
"new",
"BoxLayout",
"(",
"this",
",",
"BoxLayout",
".",
"Y_AXIS",
")",
")",
";",
"setBorderPainted",
"(",
"true",
")",
";",
"setBorder",
"(",
"LIST_BORDER",
")",
";",
"setOpaque",
"(",... | Configures the popup portion of the combo box. This method is called when
the UI class is created. | [
"Configures",
"the",
"popup",
"portion",
"of",
"the",
"combo",
"box",
".",
"This",
"method",
"is",
"called",
"when",
"the",
"UI",
"class",
"is",
"created",
"."
] | train | https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/component/SeaGlassComboPopup.java#L134-L142 |
UrielCh/ovh-java-sdk | ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java | ApiOvhTelephony.billingAccount_line_serviceName_removeSimultaneousLines_POST | public void billingAccount_line_serviceName_removeSimultaneousLines_POST(String billingAccount, String serviceName, Long quantityRemove) throws IOException {
"""
Remove extra simultaneous lines
REST: POST /telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines
@param quantityRemove [required] Th... | java | public void billingAccount_line_serviceName_removeSimultaneousLines_POST(String billingAccount, String serviceName, Long quantityRemove) throws IOException {
String qPath = "/telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines";
StringBuilder sb = path(qPath, billingAccount, serviceName);
HashMa... | [
"public",
"void",
"billingAccount_line_serviceName_removeSimultaneousLines_POST",
"(",
"String",
"billingAccount",
",",
"String",
"serviceName",
",",
"Long",
"quantityRemove",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/telephony/{billingAccount}/line/{servic... | Remove extra simultaneous lines
REST: POST /telephony/{billingAccount}/line/{serviceName}/removeSimultaneousLines
@param quantityRemove [required] The quantity of extra simultaneous lines to remove
@param billingAccount [required] The name of your billingAccount
@param serviceName [required] | [
"Remove",
"extra",
"simultaneous",
"lines"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L2068-L2074 |
GenesysPureEngage/workspace-client-java | src/main/java/com/genesys/internal/workspace/api/MediaApi.java | MediaApi.mediaStopMonitoring | public ApiSuccessResponse mediaStopMonitoring(String mediatype, MediaStopMonitoringData mediaStopMonitoringData) throws ApiException {
"""
Stop monitoring an agent
Stop supervisor monitoring of an agent on the specified media channel.
@param mediatype The media channel. (required)
@param mediaStopMonitoringData... | java | public ApiSuccessResponse mediaStopMonitoring(String mediatype, MediaStopMonitoringData mediaStopMonitoringData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = mediaStopMonitoringWithHttpInfo(mediatype, mediaStopMonitoringData);
return resp.getData();
} | [
"public",
"ApiSuccessResponse",
"mediaStopMonitoring",
"(",
"String",
"mediatype",
",",
"MediaStopMonitoringData",
"mediaStopMonitoringData",
")",
"throws",
"ApiException",
"{",
"ApiResponse",
"<",
"ApiSuccessResponse",
">",
"resp",
"=",
"mediaStopMonitoringWithHttpInfo",
"("... | Stop monitoring an agent
Stop supervisor monitoring of an agent on the specified media channel.
@param mediatype The media channel. (required)
@param mediaStopMonitoringData Request parameters. (optional)
@return ApiSuccessResponse
@throws ApiException If fail to call the API, e.g. server error or cannot deserialize th... | [
"Stop",
"monitoring",
"an",
"agent",
"Stop",
"supervisor",
"monitoring",
"of",
"an",
"agent",
"on",
"the",
"specified",
"media",
"channel",
"."
] | train | https://github.com/GenesysPureEngage/workspace-client-java/blob/509fdd9e89b9359d012f9a72be95037a3cef53e6/src/main/java/com/genesys/internal/workspace/api/MediaApi.java#L2313-L2316 |
percolate/caffeine | caffeine/src/main/java/com/percolate/caffeine/IntentUtils.java | IntentUtils.launchWebBrowserOnClick | public static OnClickListener launchWebBrowserOnClick(final Context context, final String url) {
"""
Return an OnClickListener that will open a web browser for the given <code>url</code>.
"""
return new OnClickListener() {
@Override
public void onClick(View v) {
... | java | public static OnClickListener launchWebBrowserOnClick(final Context context, final String url){
return new OnClickListener() {
@Override
public void onClick(View v) {
launchWebBrowser(context, url);
}
};
} | [
"public",
"static",
"OnClickListener",
"launchWebBrowserOnClick",
"(",
"final",
"Context",
"context",
",",
"final",
"String",
"url",
")",
"{",
"return",
"new",
"OnClickListener",
"(",
")",
"{",
"@",
"Override",
"public",
"void",
"onClick",
"(",
"View",
"v",
")... | Return an OnClickListener that will open a web browser for the given <code>url</code>. | [
"Return",
"an",
"OnClickListener",
"that",
"will",
"open",
"a",
"web",
"browser",
"for",
"the",
"given",
"<code",
">",
"url<",
"/",
"code",
">",
"."
] | train | https://github.com/percolate/caffeine/blob/e2265cab474a6397f4d75b1ed928c356a7b9672e/caffeine/src/main/java/com/percolate/caffeine/IntentUtils.java#L25-L32 |
geomajas/geomajas-project-client-gwt | client/src/main/java/org/geomajas/gwt/client/widget/MapWidget.java | MapWidget.setNavigationAddonEnabled | public void setNavigationAddonEnabled(boolean enabled) {
"""
Enables or disables the panning buttons. This setting has immediate effect on the map.
@param enabled
enabled status
"""
navigationAddonEnabled = enabled;
final String panId = "panBTNCollection";
final String zoomId = "zoomAddon";
final S... | java | public void setNavigationAddonEnabled(boolean enabled) {
navigationAddonEnabled = enabled;
final String panId = "panBTNCollection";
final String zoomId = "zoomAddon";
final String zoomRectId = "zoomRectAddon";
if (enabled) {
if (!getMapAddons().containsKey(panId)) {
PanButtonCollection panButtons = ne... | [
"public",
"void",
"setNavigationAddonEnabled",
"(",
"boolean",
"enabled",
")",
"{",
"navigationAddonEnabled",
"=",
"enabled",
";",
"final",
"String",
"panId",
"=",
"\"panBTNCollection\"",
";",
"final",
"String",
"zoomId",
"=",
"\"zoomAddon\"",
";",
"final",
"String"... | Enables or disables the panning buttons. This setting has immediate effect on the map.
@param enabled
enabled status | [
"Enables",
"or",
"disables",
"the",
"panning",
"buttons",
".",
"This",
"setting",
"has",
"immediate",
"effect",
"on",
"the",
"map",
"."
] | train | https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/widget/MapWidget.java#L761-L793 |
hawkular/hawkular-inventory | hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java | Related.asTargetWith | public static Related asTargetWith(CanonicalPath entityPath, Relationships.WellKnown relationship) {
"""
An overloaded version of {@link #asTargetWith(org.hawkular.inventory.paths.CanonicalPath, String)} that uses
one of the {@link org.hawkular.inventory.api.Relationships.WellKnown} as the name of the relationshi... | java | public static Related asTargetWith(CanonicalPath entityPath, Relationships.WellKnown relationship) {
return new Related(entityPath, relationship.name(), EntityRole.TARGET);
} | [
"public",
"static",
"Related",
"asTargetWith",
"(",
"CanonicalPath",
"entityPath",
",",
"Relationships",
".",
"WellKnown",
"relationship",
")",
"{",
"return",
"new",
"Related",
"(",
"entityPath",
",",
"relationship",
".",
"name",
"(",
")",
",",
"EntityRole",
"."... | An overloaded version of {@link #asTargetWith(org.hawkular.inventory.paths.CanonicalPath, String)} that uses
one of the {@link org.hawkular.inventory.api.Relationships.WellKnown} as the name of the relationship.
@param entityPath the entity that is the source of the relationship
@param relationship the type of the rel... | [
"An",
"overloaded",
"version",
"of",
"{",
"@link",
"#asTargetWith",
"(",
"org",
".",
"hawkular",
".",
"inventory",
".",
"paths",
".",
"CanonicalPath",
"String",
")",
"}",
"that",
"uses",
"one",
"of",
"the",
"{",
"@link",
"org",
".",
"hawkular",
".",
"inv... | train | https://github.com/hawkular/hawkular-inventory/blob/f56dc10323dca21777feb5b609a9e9cc70ffaf62/hawkular-inventory-api/src/main/java/org/hawkular/inventory/api/filters/Related.java#L112-L114 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.deleteCertificateIssuerAsync | public ServiceFuture<IssuerBundle> deleteCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback<IssuerBundle> serviceCallback) {
"""
Deletes the specified certificate issuer.
The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from the vault. Th... | java | public ServiceFuture<IssuerBundle> deleteCertificateIssuerAsync(String vaultBaseUrl, String issuerName, final ServiceCallback<IssuerBundle> serviceCallback) {
return ServiceFuture.fromResponse(deleteCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName), serviceCallback);
} | [
"public",
"ServiceFuture",
"<",
"IssuerBundle",
">",
"deleteCertificateIssuerAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"issuerName",
",",
"final",
"ServiceCallback",
"<",
"IssuerBundle",
">",
"serviceCallback",
")",
"{",
"return",
"ServiceFuture",
".",
"fr... | Deletes the specified certificate issuer.
The DeleteCertificateIssuer operation permanently removes the specified certificate issuer from the vault. This operation requires the certificates/manageissuers/deleteissuers permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param i... | [
"Deletes",
"the",
"specified",
"certificate",
"issuer",
".",
"The",
"DeleteCertificateIssuer",
"operation",
"permanently",
"removes",
"the",
"specified",
"certificate",
"issuer",
"from",
"the",
"vault",
".",
"This",
"operation",
"requires",
"the",
"certificates",
"/",... | 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#L6414-L6416 |
gilberto-torrezan/gwt-views | src/main/java/com/github/gilbertotorrezan/gwtviews/client/URLToken.java | URLToken.getParameterAsDouble | public double getParameterAsDouble(String name, double defaultValue) {
"""
Gets a double parameter extracted from the History token.
For example, if the token is: <pre>{@code tokenId¶m1=0.1 }</pre>the call to <code>getParameterAsBoolean("param1", 0)</code> will return <code>0.1</code>.
@param name The name... | java | public double getParameterAsDouble(String name, double defaultValue){
String value = parameters.get(name);
if (value == null || value.isEmpty()){
return defaultValue;
}
try {
return Double.parseDouble(value);
} catch (Exception e) {
return defaultValue;
}
} | [
"public",
"double",
"getParameterAsDouble",
"(",
"String",
"name",
",",
"double",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"parameters",
".",
"get",
"(",
"name",
")",
";",
"if",
"(",
"value",
"==",
"null",
"||",
"value",
".",
"isEmpty",
"(",
")"... | Gets a double parameter extracted from the History token.
For example, if the token is: <pre>{@code tokenId¶m1=0.1 }</pre>the call to <code>getParameterAsBoolean("param1", 0)</code> will return <code>0.1</code>.
@param name The name of the parameter
@param defaultValue The value to be returned when the parameter i... | [
"Gets",
"a",
"double",
"parameter",
"extracted",
"from",
"the",
"History",
"token",
".",
"For",
"example",
"if",
"the",
"token",
"is",
":",
"<pre",
">",
"{",
"@code",
"tokenId¶m1",
"=",
"0",
".",
"1",
"}",
"<",
"/",
"pre",
">",
"the",
"call",
"to... | train | https://github.com/gilberto-torrezan/gwt-views/blob/c6511435d14b5aa93a722b0e861230d0ae2159e5/src/main/java/com/github/gilbertotorrezan/gwtviews/client/URLToken.java#L251-L261 |
michael-rapp/AndroidUtil | library/src/main/java/de/mrapp/android/util/ThemeUtil.java | ThemeUtil.getColorStateList | public static ColorStateList getColorStateList(@NonNull final Context context,
@AttrRes final int resourceId) {
"""
Obtains the color state list, which corresponds to a specific resource id, from a context's
theme. If the given resource id is invalid, a {@link No... | java | public static ColorStateList getColorStateList(@NonNull final Context context,
@AttrRes final int resourceId) {
return getColorStateList(context, -1, resourceId);
} | [
"public",
"static",
"ColorStateList",
"getColorStateList",
"(",
"@",
"NonNull",
"final",
"Context",
"context",
",",
"@",
"AttrRes",
"final",
"int",
"resourceId",
")",
"{",
"return",
"getColorStateList",
"(",
"context",
",",
"-",
"1",
",",
"resourceId",
")",
";... | Obtains the color state list, which corresponds to a specific resource id, from a context's
theme. If the given resource id is invalid, a {@link NotFoundException} will be thrown.
@param context
The context, which should be used, as an instance of the class {@link Context}. The
context may not be null
@param resourceI... | [
"Obtains",
"the",
"color",
"state",
"list",
"which",
"corresponds",
"to",
"a",
"specific",
"resource",
"id",
"from",
"a",
"context",
"s",
"theme",
".",
"If",
"the",
"given",
"resource",
"id",
"is",
"invalid",
"a",
"{",
"@link",
"NotFoundException",
"}",
"w... | train | https://github.com/michael-rapp/AndroidUtil/blob/67ec0e5732344eeb4d946dd1f96d782939e449f4/library/src/main/java/de/mrapp/android/util/ThemeUtil.java#L146-L149 |
citrusframework/citrus | modules/citrus-core/src/main/java/com/consol/citrus/message/MessageHeaderUtils.java | MessageHeaderUtils.setHeader | public static void setHeader(Message message, String name, String value) {
"""
Safely sets header on message builder. Some headers need to be cast to specific type such
as PRIORITY in {@link org.springframework.integration.IntegrationMessageHeaderAccessor}.
@param message
@param name
@param value
"""
... | java | public static void setHeader(Message message, String name, String value) {
if (name.equals(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER)) {
message.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER, Integer.valueOf(value));
} else if (name.equals(IntegrationMessageHeaderAccessor... | [
"public",
"static",
"void",
"setHeader",
"(",
"Message",
"message",
",",
"String",
"name",
",",
"String",
"value",
")",
"{",
"if",
"(",
"name",
".",
"equals",
"(",
"IntegrationMessageHeaderAccessor",
".",
"SEQUENCE_NUMBER",
")",
")",
"{",
"message",
".",
"se... | Safely sets header on message builder. Some headers need to be cast to specific type such
as PRIORITY in {@link org.springframework.integration.IntegrationMessageHeaderAccessor}.
@param message
@param name
@param value | [
"Safely",
"sets",
"header",
"on",
"message",
"builder",
".",
"Some",
"headers",
"need",
"to",
"be",
"cast",
"to",
"specific",
"type",
"such",
"as",
"PRIORITY",
"in",
"{"
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/message/MessageHeaderUtils.java#L89-L99 |
GwtMaterialDesign/gwt-material | gwt-material/src/main/java/gwt/material/design/client/ui/MaterialToast.java | MaterialToast.fireToast | public static void fireToast(String msg, String className) {
"""
Quick fire your toast.
@param msg Message text for your toast.
@param className class name to custom style your toast.
"""
new MaterialToast().toast(msg, DURATION, className);
} | java | public static void fireToast(String msg, String className) {
new MaterialToast().toast(msg, DURATION, className);
} | [
"public",
"static",
"void",
"fireToast",
"(",
"String",
"msg",
",",
"String",
"className",
")",
"{",
"new",
"MaterialToast",
"(",
")",
".",
"toast",
"(",
"msg",
",",
"DURATION",
",",
"className",
")",
";",
"}"
] | Quick fire your toast.
@param msg Message text for your toast.
@param className class name to custom style your toast. | [
"Quick",
"fire",
"your",
"toast",
"."
] | train | https://github.com/GwtMaterialDesign/gwt-material/blob/86feefb282b007c0a44784c09e651a50f257138e/gwt-material/src/main/java/gwt/material/design/client/ui/MaterialToast.java#L112-L114 |
BlueBrain/bluima | modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java | MultiStringDistance.explainScore | final public String explainScore(String s, String t) {
"""
Scores are explained by converting Strings to StringWrappers
with the prepare function.
"""
return explainScore(prepare(s),prepare(t));
} | java | final public String explainScore(String s, String t) {
return explainScore(prepare(s),prepare(t));
} | [
"final",
"public",
"String",
"explainScore",
"(",
"String",
"s",
",",
"String",
"t",
")",
"{",
"return",
"explainScore",
"(",
"prepare",
"(",
"s",
")",
",",
"prepare",
"(",
"t",
")",
")",
";",
"}"
] | Scores are explained by converting Strings to StringWrappers
with the prepare function. | [
"Scores",
"are",
"explained",
"by",
"converting",
"Strings",
"to",
"StringWrappers",
"with",
"the",
"prepare",
"function",
"."
] | train | https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/MultiStringDistance.java#L86-L88 |
google/j2objc | jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java | ULocale.appendTag | private static void appendTag(String tag, StringBuilder buffer) {
"""
Append a tag to a StringBuilder, adding the separator if necessary.The tag must
not be a zero-length string.
@param tag The tag to add.
@param buffer The output buffer.
"""
if (buffer.length() != 0) {
buffer.append(U... | java | private static void appendTag(String tag, StringBuilder buffer) {
if (buffer.length() != 0) {
buffer.append(UNDERSCORE);
}
buffer.append(tag);
} | [
"private",
"static",
"void",
"appendTag",
"(",
"String",
"tag",
",",
"StringBuilder",
"buffer",
")",
"{",
"if",
"(",
"buffer",
".",
"length",
"(",
")",
"!=",
"0",
")",
"{",
"buffer",
".",
"append",
"(",
"UNDERSCORE",
")",
";",
"}",
"buffer",
".",
"ap... | Append a tag to a StringBuilder, adding the separator if necessary.The tag must
not be a zero-length string.
@param tag The tag to add.
@param buffer The output buffer. | [
"Append",
"a",
"tag",
"to",
"a",
"StringBuilder",
"adding",
"the",
"separator",
"if",
"necessary",
".",
"The",
"tag",
"must",
"not",
"be",
"a",
"zero",
"-",
"length",
"string",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/util/ULocale.java#L2603-L2609 |
citrusframework/citrus | modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ZooActionBuilder.java | ZooActionBuilder.validate | public ZooActionBuilder validate(String jsonPath, String expectedValue) {
"""
Adds variable extractor for extracting variable from command response.
@param jsonPath the json path to reference the value to be extracted
@param expectedValue the expected value (or variable to retrieve the expected value from)
@r... | java | public ZooActionBuilder validate(String jsonPath, String expectedValue) {
JsonPathMessageValidationContext validationContext = action.getJsonPathMessageValidationContext();
if (validationContext == null) {
validationContext = new JsonPathMessageValidationContext();
action.setJson... | [
"public",
"ZooActionBuilder",
"validate",
"(",
"String",
"jsonPath",
",",
"String",
"expectedValue",
")",
"{",
"JsonPathMessageValidationContext",
"validationContext",
"=",
"action",
".",
"getJsonPathMessageValidationContext",
"(",
")",
";",
"if",
"(",
"validationContext"... | Adds variable extractor for extracting variable from command response.
@param jsonPath the json path to reference the value to be extracted
@param expectedValue the expected value (or variable to retrieve the expected value from)
@return | [
"Adds",
"variable",
"extractor",
"for",
"extracting",
"variable",
"from",
"command",
"response",
"."
] | train | https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ZooActionBuilder.java#L176-L184 |
johnkil/Android-AppMsg | library/src/com/devspark/appmsg/AppMsg.java | AppMsg.getLayoutParams | public LayoutParams getLayoutParams() {
"""
Gets the crouton's layout parameters, constructing a default if necessary.
@return the layout parameters
"""
if (mLayoutParams == null) {
mLayoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
... | java | public LayoutParams getLayoutParams() {
if (mLayoutParams == null) {
mLayoutParams = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT);
}
return mLayoutParams;
} | [
"public",
"LayoutParams",
"getLayoutParams",
"(",
")",
"{",
"if",
"(",
"mLayoutParams",
"==",
"null",
")",
"{",
"mLayoutParams",
"=",
"new",
"LayoutParams",
"(",
"LayoutParams",
".",
"MATCH_PARENT",
",",
"LayoutParams",
".",
"WRAP_CONTENT",
")",
";",
"}",
"ret... | Gets the crouton's layout parameters, constructing a default if necessary.
@return the layout parameters | [
"Gets",
"the",
"crouton",
"s",
"layout",
"parameters",
"constructing",
"a",
"default",
"if",
"necessary",
"."
] | train | https://github.com/johnkil/Android-AppMsg/blob/e7fdd7870530a24e6d825278ee0863be0521e8b8/library/src/com/devspark/appmsg/AppMsg.java#L549-L554 |
alkacon/opencms-core | src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java | CmsNewResourceTypeDialog.addMessagesToVfsBundle | private void addMessagesToVfsBundle(Map<String, String> messages, CmsFile vfsBundleFile) throws CmsException {
"""
Adds the given messages to the vfs message bundle.<p>
@param messages the messages
@param vfsBundleFile the bundle file
@throws CmsException if something goes wrong writing the file
"""
... | java | private void addMessagesToVfsBundle(Map<String, String> messages, CmsFile vfsBundleFile) throws CmsException {
lockTemporary(vfsBundleFile);
CmsObject cms = m_cms;
CmsXmlContent content = CmsXmlContentFactory.unmarshal(cms, vfsBundleFile);
Locale locale = CmsLocaleManager.getDefaultLoca... | [
"private",
"void",
"addMessagesToVfsBundle",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"messages",
",",
"CmsFile",
"vfsBundleFile",
")",
"throws",
"CmsException",
"{",
"lockTemporary",
"(",
"vfsBundleFile",
")",
";",
"CmsObject",
"cms",
"=",
"m_cms",
";",
... | Adds the given messages to the vfs message bundle.<p>
@param messages the messages
@param vfsBundleFile the bundle file
@throws CmsException if something goes wrong writing the file | [
"Adds",
"the",
"given",
"messages",
"to",
"the",
"vfs",
"message",
"bundle",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/resourcetypes/CmsNewResourceTypeDialog.java#L502-L522 |
aws/aws-sdk-java | aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/GetMaintenanceWindowExecutionTaskResult.java | GetMaintenanceWindowExecutionTaskResult.withTaskParameters | public GetMaintenanceWindowExecutionTaskResult withTaskParameters(java.util.Map<String, MaintenanceWindowTaskParameterValueExpression>... taskParameters) {
"""
<p>
The parameters passed to the task when it was run.
</p>
<note>
<p>
<code>TaskParameters</code> has been deprecated. To specify parameters to pass ... | java | public GetMaintenanceWindowExecutionTaskResult withTaskParameters(java.util.Map<String, MaintenanceWindowTaskParameterValueExpression>... taskParameters) {
if (this.taskParameters == null) {
setTaskParameters(new com.amazonaws.internal.SdkInternalList<java.util.Map<String, MaintenanceWindowTaskParam... | [
"public",
"GetMaintenanceWindowExecutionTaskResult",
"withTaskParameters",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"MaintenanceWindowTaskParameterValueExpression",
">",
"...",
"taskParameters",
")",
"{",
"if",
"(",
"this",
".",
"taskParameters",
"==",
... | <p>
The parameters passed to the task when it was run.
</p>
<note>
<p>
<code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead
use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information
about how Systems Manager h... | [
"<p",
">",
"The",
"parameters",
"passed",
"to",
"the",
"task",
"when",
"it",
"was",
"run",
".",
"<",
"/",
"p",
">",
"<note",
">",
"<p",
">",
"<code",
">",
"TaskParameters<",
"/",
"code",
">",
"has",
"been",
"deprecated",
".",
"To",
"specify",
"parame... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ssm/src/main/java/com/amazonaws/services/simplesystemsmanagement/model/GetMaintenanceWindowExecutionTaskResult.java#L501-L510 |
versionone/VersionOne.SDK.Java.ObjectModel | src/main/java/com/versionone/om/V1InstanceCreator.java | V1InstanceCreator.changeSet | public ChangeSet changeSet(String name, String reference) {
"""
Create a new ChangeSet with a name and reference.
@param name Initial name.
@param reference Reference value.
@return A newly minted ChangeSet that exists in the VersionOne system.
"""
return changeSet(name, reference, null);
... | java | public ChangeSet changeSet(String name, String reference) {
return changeSet(name, reference, null);
} | [
"public",
"ChangeSet",
"changeSet",
"(",
"String",
"name",
",",
"String",
"reference",
")",
"{",
"return",
"changeSet",
"(",
"name",
",",
"reference",
",",
"null",
")",
";",
"}"
] | Create a new ChangeSet with a name and reference.
@param name Initial name.
@param reference Reference value.
@return A newly minted ChangeSet that exists in the VersionOne system. | [
"Create",
"a",
"new",
"ChangeSet",
"with",
"a",
"name",
"and",
"reference",
"."
] | train | https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceCreator.java#L929-L931 |
openengsb/openengsb | components/edbi/hook/src/main/java/org/openengsb/framework/edbi/hook/internal/CommitConverter.java | CommitConverter.mapByClass | protected Map<Class<?>, List<OpenEngSBModel>> mapByClass(Collection<OpenEngSBModel> models) {
"""
Groups all models in the given collection by their class.
@param models the models
@return a map containing all given models grouped by their type
"""
return group(models, new Function<OpenEngSBModel, ... | java | protected Map<Class<?>, List<OpenEngSBModel>> mapByClass(Collection<OpenEngSBModel> models) {
return group(models, new Function<OpenEngSBModel, Class<?>>() {
@Override
public Class<?> apply(OpenEngSBModel input) {
return input.getClass();
}
});
} | [
"protected",
"Map",
"<",
"Class",
"<",
"?",
">",
",",
"List",
"<",
"OpenEngSBModel",
">",
">",
"mapByClass",
"(",
"Collection",
"<",
"OpenEngSBModel",
">",
"models",
")",
"{",
"return",
"group",
"(",
"models",
",",
"new",
"Function",
"<",
"OpenEngSBModel",... | Groups all models in the given collection by their class.
@param models the models
@return a map containing all given models grouped by their type | [
"Groups",
"all",
"models",
"in",
"the",
"given",
"collection",
"by",
"their",
"class",
"."
] | train | https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/components/edbi/hook/src/main/java/org/openengsb/framework/edbi/hook/internal/CommitConverter.java#L94-L101 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommsServerByteBuffer.java | CommsServerByteBuffer.putMEMEMessage | public synchronized int putMEMEMessage(AbstractMessage memeMessage, Conversation conversation)
throws SIConnectionDroppedException,
UnsupportedEncodingException,
IncorrectMessageTypeException,
MessageCopyFailedException,
... | java | public synchronized int putMEMEMessage(AbstractMessage memeMessage, Conversation conversation)
throws SIConnectionDroppedException,
UnsupportedEncodingException,
IncorrectMessageTypeException,
MessageCopyFailedException,
... | [
"public",
"synchronized",
"int",
"putMEMEMessage",
"(",
"AbstractMessage",
"memeMessage",
",",
"Conversation",
"conversation",
")",
"throws",
"SIConnectionDroppedException",
",",
"UnsupportedEncodingException",
",",
"IncorrectMessageTypeException",
",",
"MessageCopyFailedExceptio... | Puts a message into the byte buffer using the <code>encodeFast()</code method of encoding
messages. This method takes account of any <i>capabilities</i> negotiated at the point the
connection was established. This method should only be used for ME-ME JsMessage's.
@param memeMessage The message to encode.
@param conver... | [
"Puts",
"a",
"message",
"into",
"the",
"byte",
"buffer",
"using",
"the",
"<code",
">",
"encodeFast",
"()",
"<",
"/",
"code",
"method",
"of",
"encoding",
"messages",
".",
"This",
"method",
"takes",
"account",
"of",
"any",
"<i",
">",
"capabilities<",
"/",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommsServerByteBuffer.java#L243-L262 |
landawn/AbacusUtil | src/com/landawn/abacus/util/FilenameUtil.java | FilenameUtil.directoryContains | public static boolean directoryContains(final String canonicalParent, final String canonicalChild) throws IOException {
"""
Determines whether the {@code parent} directory contains the {@code child} element (a file or directory).
<p>
The files names are expected to be normalized.
</p>
Edge cases:
<ul>
<li>... | java | public static boolean directoryContains(final String canonicalParent, final String canonicalChild) throws IOException {
// Fail fast against NullPointerException
if (canonicalParent == null) {
throw new IllegalArgumentException("Directory must not be null");
}
if (ca... | [
"public",
"static",
"boolean",
"directoryContains",
"(",
"final",
"String",
"canonicalParent",
",",
"final",
"String",
"canonicalChild",
")",
"throws",
"IOException",
"{",
"// Fail fast against NullPointerException\r",
"if",
"(",
"canonicalParent",
"==",
"null",
")",
"{... | Determines whether the {@code parent} directory contains the {@code child} element (a file or directory).
<p>
The files names are expected to be normalized.
</p>
Edge cases:
<ul>
<li>A {@code directory} must not be null: if null, throw IllegalArgumentException</li>
<li>A directory does not contain itself: return false... | [
"Determines",
"whether",
"the",
"{",
"@code",
"parent",
"}",
"directory",
"contains",
"the",
"{",
"@code",
"child",
"}",
"element",
"(",
"a",
"file",
"or",
"directory",
")",
".",
"<p",
">",
"The",
"files",
"names",
"are",
"expected",
"to",
"be",
"normali... | train | https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FilenameUtil.java#L532-L548 |
jhunters/jprotobuf | src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java | MiniTemplator.setVariableOpt | public void setVariableOpt(String variableName, int variableValue) {
"""
Sets an optional template variable to an integer value.
<p>
Convenience method for: <code>setVariableOpt (variableName, Integer.toString(variableValue))</code>
@param variableName the name of the variable to be set. Case-insensitive.
@p... | java | public void setVariableOpt(String variableName, int variableValue) {
// We want to avoid the integer to string conversion if the template variable does not exist.
int varNo = mtp.lookupVariableName(variableName);
if (varNo == -1) {
return;
}
varValuesTab[varNo] ... | [
"public",
"void",
"setVariableOpt",
"(",
"String",
"variableName",
",",
"int",
"variableValue",
")",
"{",
"// We want to avoid the integer to string conversion if the template variable does not exist.\r",
"int",
"varNo",
"=",
"mtp",
".",
"lookupVariableName",
"(",
"variableName... | Sets an optional template variable to an integer value.
<p>
Convenience method for: <code>setVariableOpt (variableName, Integer.toString(variableValue))</code>
@param variableName the name of the variable to be set. Case-insensitive.
@param variableValue the new value of the variable. | [
"Sets",
"an",
"optional",
"template",
"variable",
"to",
"an",
"integer",
"value",
".",
"<p",
">",
"Convenience",
"method",
"for",
":",
"<code",
">",
"setVariableOpt",
"(",
"variableName",
"Integer",
".",
"toString",
"(",
"variableValue",
"))",
"<",
"/",
"cod... | train | https://github.com/jhunters/jprotobuf/blob/55832c9b4792afb128e5b35139d8a3891561d8a3/src/main/java/com/baidu/bjf/remoting/protobuf/utils/MiniTemplator.java#L425-L432 |
alkacon/opencms-core | src/org/opencms/i18n/CmsMessages.java | CmsMessages.getDateTime | public String getDateTime(Date date, int format) {
"""
Returns a formated date and time String from a Date value,
the formatting based on the provided option and the locale
based on this instance.<p>
@param date the Date object to format as String
@param format the format to use, see {@link CmsMessages} for ... | java | public String getDateTime(Date date, int format) {
return CmsDateUtil.getDateTime(date, format, m_locale);
} | [
"public",
"String",
"getDateTime",
"(",
"Date",
"date",
",",
"int",
"format",
")",
"{",
"return",
"CmsDateUtil",
".",
"getDateTime",
"(",
"date",
",",
"format",
",",
"m_locale",
")",
";",
"}"
] | Returns a formated date and time String from a Date value,
the formatting based on the provided option and the locale
based on this instance.<p>
@param date the Date object to format as String
@param format the format to use, see {@link CmsMessages} for possible values
@return the formatted date and time | [
"Returns",
"a",
"formated",
"date",
"and",
"time",
"String",
"from",
"a",
"Date",
"value",
"the",
"formatting",
"based",
"on",
"the",
"provided",
"option",
"and",
"the",
"locale",
"based",
"on",
"this",
"instance",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsMessages.java#L272-L275 |
liferay/com-liferay-commerce | commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPSpecificationOptionWrapper.java | CPSpecificationOptionWrapper.setDescription | @Override
public void setDescription(String description, java.util.Locale locale) {
"""
Sets the localized description of this cp specification option in the language.
@param description the localized description of this cp specification option
@param locale the locale of the language
"""
_cpSpecificati... | java | @Override
public void setDescription(String description, java.util.Locale locale) {
_cpSpecificationOption.setDescription(description, locale);
} | [
"@",
"Override",
"public",
"void",
"setDescription",
"(",
"String",
"description",
",",
"java",
".",
"util",
".",
"Locale",
"locale",
")",
"{",
"_cpSpecificationOption",
".",
"setDescription",
"(",
"description",
",",
"locale",
")",
";",
"}"
] | Sets the localized description of this cp specification option in the language.
@param description the localized description of this cp specification option
@param locale the locale of the language | [
"Sets",
"the",
"localized",
"description",
"of",
"this",
"cp",
"specification",
"option",
"in",
"the",
"language",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-api/src/main/java/com/liferay/commerce/product/model/CPSpecificationOptionWrapper.java#L607-L610 |
exoplatform/jcr | exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesListener.java | ChangesListener.addPathsWithUnknownChangedSize | private void addPathsWithUnknownChangedSize(ChangesItem changesItem, ItemState state) {
"""
Checks if changes were made but changed size is unknown. If so, determinate
for which nodes data size should be recalculated at all and put those paths into
respective collection.
"""
if (!state.isPersisted() &&... | java | private void addPathsWithUnknownChangedSize(ChangesItem changesItem, ItemState state)
{
if (!state.isPersisted() && (state.isDeleted() || state.isRenamed()))
{
String itemPath = getPath(state.getData().getQPath());
for (String trackedPath : quotaPersister.getAllTrackedNodes(rName, wsNa... | [
"private",
"void",
"addPathsWithUnknownChangedSize",
"(",
"ChangesItem",
"changesItem",
",",
"ItemState",
"state",
")",
"{",
"if",
"(",
"!",
"state",
".",
"isPersisted",
"(",
")",
"&&",
"(",
"state",
".",
"isDeleted",
"(",
")",
"||",
"state",
".",
"isRenamed... | Checks if changes were made but changed size is unknown. If so, determinate
for which nodes data size should be recalculated at all and put those paths into
respective collection. | [
"Checks",
"if",
"changes",
"were",
"made",
"but",
"changed",
"size",
"is",
"unknown",
".",
"If",
"so",
"determinate",
"for",
"which",
"nodes",
"data",
"size",
"should",
"be",
"recalculated",
"at",
"all",
"and",
"put",
"those",
"paths",
"into",
"respective",
... | train | https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/quota/ChangesListener.java#L188-L202 |
moparisthebest/beehive | beehive-controls/src/main/java/org/apache/beehive/controls/runtime/servlet/ServletBeanContext.java | ServletBeanContext.getService | public <T> T getService(Class<T> serviceClass, Object selector) {
"""
Override ControlBeanContext.getService(). A control bean creates its bean context using the
ControlBeanContextFactory service provided by this context. A control bean will attempt to create
its context before adding its self to this context ... | java | public <T> T getService(Class<T> serviceClass, Object selector)
{
T service = super.getService(serviceClass, selector);
if (service == null && serviceClass.equals(ControlBeanContextFactory.class)) {
return (T)_bcsp.getService(this, this, serviceClass, selector);
}
return ... | [
"public",
"<",
"T",
">",
"T",
"getService",
"(",
"Class",
"<",
"T",
">",
"serviceClass",
",",
"Object",
"selector",
")",
"{",
"T",
"service",
"=",
"super",
".",
"getService",
"(",
"serviceClass",
",",
"selector",
")",
";",
"if",
"(",
"service",
"==",
... | Override ControlBeanContext.getService(). A control bean creates its bean context using the
ControlBeanContextFactory service provided by this context. A control bean will attempt to create
its context before adding its self to this context as a child. This creates a chicken/egg problem since
only a child of a contex... | [
"Override",
"ControlBeanContext",
".",
"getService",
"()",
".",
"A",
"control",
"bean",
"creates",
"its",
"bean",
"context",
"using",
"the",
"ControlBeanContextFactory",
"service",
"provided",
"by",
"this",
"context",
".",
"A",
"control",
"bean",
"will",
"attempt"... | train | https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-controls/src/main/java/org/apache/beehive/controls/runtime/servlet/ServletBeanContext.java#L242-L249 |
b3log/latke | latke-core/src/main/java/org/json/JSONObject.java | JSONObject.optLong | public long optLong(String key, long defaultValue) {
"""
Get an optional long value associated with a key, or the default if there
is no such key or if the value is not a number. If the value is a string,
an attempt will be made to evaluate it as a number.
@param key
A key string.
@param defaultValue
The d... | java | public long optLong(String key, long defaultValue) {
final Number val = this.optNumber(key, null);
if (val == null) {
return defaultValue;
}
return val.longValue();
} | [
"public",
"long",
"optLong",
"(",
"String",
"key",
",",
"long",
"defaultValue",
")",
"{",
"final",
"Number",
"val",
"=",
"this",
".",
"optNumber",
"(",
"key",
",",
"null",
")",
";",
"if",
"(",
"val",
"==",
"null",
")",
"{",
"return",
"defaultValue",
... | Get an optional long value associated with a key, or the default if there
is no such key or if the value is not a number. If the value is a string,
an attempt will be made to evaluate it as a number.
@param key
A key string.
@param defaultValue
The default.
@return An object which is the value. | [
"Get",
"an",
"optional",
"long",
"value",
"associated",
"with",
"a",
"key",
"or",
"the",
"default",
"if",
"there",
"is",
"no",
"such",
"key",
"or",
"if",
"the",
"value",
"is",
"not",
"a",
"number",
".",
"If",
"the",
"value",
"is",
"a",
"string",
"an"... | train | https://github.com/b3log/latke/blob/f7e08a47eeecea5f7c94006382c24f353585de33/latke-core/src/main/java/org/json/JSONObject.java#L1363-L1370 |
davidcarboni/cryptolite-java | src/main/java/com/github/davidcarboni/cryptolite/Crypto.java | Crypto.initCipher | private void initCipher(Cipher cipher, int mode, SecretKey key, byte[] iv) {
"""
This method returns a {@link Cipher} instance, for
{@value #CIPHER_ALGORITHM} in {@value #CIPHER_MODE} mode, with padding
{@value #CIPHER_PADDING}.
<p>
It then initialises the {@link Cipher} in either
{@link Cipher#ENCRYPT_MODE} ... | java | private void initCipher(Cipher cipher, int mode, SecretKey key, byte[] iv) {
// Initialise the cipher:
IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
try {
cipher.init(mode, key, ivParameterSpec);
} catch (InvalidKeyException e) {
// This is li... | [
"private",
"void",
"initCipher",
"(",
"Cipher",
"cipher",
",",
"int",
"mode",
",",
"SecretKey",
"key",
",",
"byte",
"[",
"]",
"iv",
")",
"{",
"// Initialise the cipher:\r",
"IvParameterSpec",
"ivParameterSpec",
"=",
"new",
"IvParameterSpec",
"(",
"iv",
")",
";... | This method returns a {@link Cipher} instance, for
{@value #CIPHER_ALGORITHM} in {@value #CIPHER_MODE} mode, with padding
{@value #CIPHER_PADDING}.
<p>
It then initialises the {@link Cipher} in either
{@link Cipher#ENCRYPT_MODE} or {@link Cipher#DECRYPT_MODE}), as specified
by the mode parameter, with the given {@link ... | [
"This",
"method",
"returns",
"a",
"{",
"@link",
"Cipher",
"}",
"instance",
"for",
"{",
"@value",
"#CIPHER_ALGORITHM",
"}",
"in",
"{",
"@value",
"#CIPHER_MODE",
"}",
"mode",
"with",
"padding",
"{",
"@value",
"#CIPHER_PADDING",
"}",
".",
"<p",
">",
"It",
"th... | train | https://github.com/davidcarboni/cryptolite-java/blob/e67954181a04ffc9beb1d9abca1421195fcf9764/src/main/java/com/github/davidcarboni/cryptolite/Crypto.java#L626-L651 |
tvesalainen/util | rpm/src/main/java/org/vesalainen/pm/deb/DEBBuilder.java | DEBBuilder.addProvide | @Override
public DEBBuilder addProvide(String name, String version, Condition... dependency) {
"""
Add debian/control Provides field.
@param name
@param version Not used
@param dependency Not used
@return
"""
control.addProvides(name);
return this;
} | java | @Override
public DEBBuilder addProvide(String name, String version, Condition... dependency)
{
control.addProvides(name);
return this;
} | [
"@",
"Override",
"public",
"DEBBuilder",
"addProvide",
"(",
"String",
"name",
",",
"String",
"version",
",",
"Condition",
"...",
"dependency",
")",
"{",
"control",
".",
"addProvides",
"(",
"name",
")",
";",
"return",
"this",
";",
"}"
] | Add debian/control Provides field.
@param name
@param version Not used
@param dependency Not used
@return | [
"Add",
"debian",
"/",
"control",
"Provides",
"field",
"."
] | train | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/rpm/src/main/java/org/vesalainen/pm/deb/DEBBuilder.java#L187-L192 |
mfornos/humanize | humanize-slim/src/main/java/humanize/Humanize.java | Humanize.paceFormat | public static String paceFormat(final Locale locale, final Number value, final long interval) {
"""
Same as {@link #paceFormat(Number, long)} for a target locale.
@param locale
The target locale
@param value
The number of occurrences within the specified interval
@param interval
The interval in millisecond... | java | public static String paceFormat(final Locale locale, final Number value, final long interval)
{
return withinLocale(new Callable<String>()
{
@Override
public String call() throws Exception
{
return paceFormat(value, interval);
}
... | [
"public",
"static",
"String",
"paceFormat",
"(",
"final",
"Locale",
"locale",
",",
"final",
"Number",
"value",
",",
"final",
"long",
"interval",
")",
"{",
"return",
"withinLocale",
"(",
"new",
"Callable",
"<",
"String",
">",
"(",
")",
"{",
"@",
"Override",... | Same as {@link #paceFormat(Number, long)} for a target locale.
@param locale
The target locale
@param value
The number of occurrences within the specified interval
@param interval
The interval in milliseconds
@return an human readable textual representation of the pace | [
"Same",
"as",
"{",
"@link",
"#paceFormat",
"(",
"Number",
"long",
")",
"}",
"for",
"a",
"target",
"locale",
"."
] | train | https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-slim/src/main/java/humanize/Humanize.java#L2024-L2034 |
lessthanoptimal/BoofCV | main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java | CameraPlaneProjection.planeToNormalized | public boolean planeToNormalized( double pointX , double pointY , Point2D_F64 normalized ) {
"""
Given a point on the plane find the normalized image coordinate
@param pointX (input) Point on the plane, x-axis
@param pointY (input) Point on the plane, y-axis
@param normalized (output) Normalized image coordin... | java | public boolean planeToNormalized( double pointX , double pointY , Point2D_F64 normalized ) {
// convert it into a 3D coordinate and transform into camera reference frame
plain3D.set(-pointY, 0, pointX);
SePointOps_F64.transform(planeToCamera, plain3D, camera3D);
// if it's behind the camera it can't be seen
... | [
"public",
"boolean",
"planeToNormalized",
"(",
"double",
"pointX",
",",
"double",
"pointY",
",",
"Point2D_F64",
"normalized",
")",
"{",
"// convert it into a 3D coordinate and transform into camera reference frame",
"plain3D",
".",
"set",
"(",
"-",
"pointY",
",",
"0",
"... | Given a point on the plane find the normalized image coordinate
@param pointX (input) Point on the plane, x-axis
@param pointY (input) Point on the plane, y-axis
@param normalized (output) Normalized image coordinate of pixel
@return true if the point is in front of the camera. False if not. | [
"Given",
"a",
"point",
"on",
"the",
"plane",
"find",
"the",
"normalized",
"image",
"coordinate"
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/overhead/CameraPlaneProjection.java#L130-L144 |
facebook/fresco | imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java | PlatformBitmapFactory.createScaledBitmap | public CloseableReference<Bitmap> createScaledBitmap(
Bitmap source,
int destinationWidth,
int destinationHeight,
boolean filter,
@Nullable Object callerContext) {
"""
Creates a bitmap from the specified source scaled to have the height and width
as specified. It is initialized with ... | java | public CloseableReference<Bitmap> createScaledBitmap(
Bitmap source,
int destinationWidth,
int destinationHeight,
boolean filter,
@Nullable Object callerContext) {
checkWidthHeight(destinationWidth, destinationHeight);
Matrix matrix = new Matrix();
final int width = source.get... | [
"public",
"CloseableReference",
"<",
"Bitmap",
">",
"createScaledBitmap",
"(",
"Bitmap",
"source",
",",
"int",
"destinationWidth",
",",
"int",
"destinationHeight",
",",
"boolean",
"filter",
",",
"@",
"Nullable",
"Object",
"callerContext",
")",
"{",
"checkWidthHeight... | Creates a bitmap from the specified source scaled to have the height and width
as specified. It is initialized with the same density as the original bitmap.
@param source The bitmap we are subsetting
@param destinationWidth The number of pixels in each row of the final bitmap
@param destinationHeight The number... | [
"Creates",
"a",
"bitmap",
"from",
"the",
"specified",
"source",
"scaled",
"to",
"have",
"the",
"height",
"and",
"width",
"as",
"specified",
".",
"It",
"is",
"initialized",
"with",
"the",
"same",
"density",
"as",
"the",
"original",
"bitmap",
"."
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L255-L271 |
icoloma/simpleds | src/main/java/org/simpleds/util/GenericCollectionTypeResolver.java | GenericCollectionTypeResolver.getGenericParameterType | private static Class<?> getGenericParameterType(MethodParameter methodParam, Class<?> source, int typeIndex) {
"""
Extract the generic parameter type from the given method or constructor.
@param methodParam the method parameter specification
@param source the source class/interface defining the generic parameter... | java | private static Class<?> getGenericParameterType(MethodParameter methodParam, Class<?> source, int typeIndex) {
return extractType(methodParam, GenericTypeResolver.getTargetType(methodParam),
source, typeIndex, methodParam.getNestingLevel(), 1);
} | [
"private",
"static",
"Class",
"<",
"?",
">",
"getGenericParameterType",
"(",
"MethodParameter",
"methodParam",
",",
"Class",
"<",
"?",
">",
"source",
",",
"int",
"typeIndex",
")",
"{",
"return",
"extractType",
"(",
"methodParam",
",",
"GenericTypeResolver",
".",... | Extract the generic parameter type from the given method or constructor.
@param methodParam the method parameter specification
@param source the source class/interface defining the generic parameter types
@param typeIndex the index of the type (e.g. 0 for Collections,
0 for Map keys, 1 for Map values)
@return the gener... | [
"Extract",
"the",
"generic",
"parameter",
"type",
"from",
"the",
"given",
"method",
"or",
"constructor",
"."
] | train | https://github.com/icoloma/simpleds/blob/b07763df98b9375b764e625f617a6c78df4b068d/src/main/java/org/simpleds/util/GenericCollectionTypeResolver.java#L218-L221 |
voldemort/voldemort | contrib/hadoop-store-builder/src/java/voldemort/store/readonly/disk/HadoopStoreWriter.java | HadoopStoreWriter.initFileStreams | @NotThreadsafe
private void initFileStreams(int chunkId) {
"""
The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem.
"""
/**
* {@link Set#add(Object)} returns false if the element already existed in the set.
* This ensures we initialize the ... | java | @NotThreadsafe
private void initFileStreams(int chunkId) {
/**
* {@link Set#add(Object)} returns false if the element already existed in the set.
* This ensures we initialize the resources for each chunk only once.
*/
if (chunksHandled.add(chunkId)) {
try {
... | [
"@",
"NotThreadsafe",
"private",
"void",
"initFileStreams",
"(",
"int",
"chunkId",
")",
"{",
"/**\n * {@link Set#add(Object)} returns false if the element already existed in the set.\n * This ensures we initialize the resources for each chunk only once.\n */",
"if",
"... | The MapReduce framework should operate sequentially, so thread safety shouldn't be a problem. | [
"The",
"MapReduce",
"framework",
"should",
"operate",
"sequentially",
"so",
"thread",
"safety",
"shouldn",
"t",
"be",
"a",
"problem",
"."
] | train | https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/contrib/hadoop-store-builder/src/java/voldemort/store/readonly/disk/HadoopStoreWriter.java#L155-L204 |
apache/fluo-recipes | modules/spark/src/main/java/org/apache/fluo/recipes/spark/FluoSparkHelper.java | FluoSparkHelper.bulkImportRcvToFluo | public void bulkImportRcvToFluo(JavaPairRDD<RowColumn, Bytes> data, BulkImportOptions opts) {
"""
Bulk import RowColumn/Value data into Fluo table (obtained from Fluo configuration). This
method will repartition RDD using the current split points of the Fluo table, creating one
partition per tablet in the table.... | java | public void bulkImportRcvToFluo(JavaPairRDD<RowColumn, Bytes> data, BulkImportOptions opts) {
data = partitionForAccumulo(data, fluoConfig.getAccumuloTable(), opts);
JavaPairRDD<Key, Value> kvData = data.flatMapToPair(tuple -> {
List<Tuple2<Key, Value>> output = new LinkedList<>();
RowColumn rc = ... | [
"public",
"void",
"bulkImportRcvToFluo",
"(",
"JavaPairRDD",
"<",
"RowColumn",
",",
"Bytes",
">",
"data",
",",
"BulkImportOptions",
"opts",
")",
"{",
"data",
"=",
"partitionForAccumulo",
"(",
"data",
",",
"fluoConfig",
".",
"getAccumuloTable",
"(",
")",
",",
"... | Bulk import RowColumn/Value data into Fluo table (obtained from Fluo configuration). This
method will repartition RDD using the current split points of the Fluo table, creating one
partition per tablet in the table. This is done so that one RFile is created per tablet for
bulk import.
@param data RowColumn/Value data ... | [
"Bulk",
"import",
"RowColumn",
"/",
"Value",
"data",
"into",
"Fluo",
"table",
"(",
"obtained",
"from",
"Fluo",
"configuration",
")",
".",
"This",
"method",
"will",
"repartition",
"RDD",
"using",
"the",
"current",
"split",
"points",
"of",
"the",
"Fluo",
"tabl... | train | https://github.com/apache/fluo-recipes/blob/24c11234c9654b16d999437ff49ddc3db86665f8/modules/spark/src/main/java/org/apache/fluo/recipes/spark/FluoSparkHelper.java#L149-L165 |
aws/aws-sdk-java | aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationResponseRequest.java | UpdateIntegrationResponseRequest.withResponseTemplates | public UpdateIntegrationResponseRequest withResponseTemplates(java.util.Map<String, String> responseTemplates) {
"""
<p>
The collection of response templates for the integration response as a string-to-string map of key-value pairs.
Response templates are represented as a key/value map, with a content-type as th... | java | public UpdateIntegrationResponseRequest withResponseTemplates(java.util.Map<String, String> responseTemplates) {
setResponseTemplates(responseTemplates);
return this;
} | [
"public",
"UpdateIntegrationResponseRequest",
"withResponseTemplates",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"responseTemplates",
")",
"{",
"setResponseTemplates",
"(",
"responseTemplates",
")",
";",
"return",
"this",
";",
"}"
] | <p>
The collection of response templates for the integration response as a string-to-string map of key-value pairs.
Response templates are represented as a key/value map, with a content-type as the key and a template as the
value.
</p>
@param responseTemplates
The collection of response templates for the integration r... | [
"<p",
">",
"The",
"collection",
"of",
"response",
"templates",
"for",
"the",
"integration",
"response",
"as",
"a",
"string",
"-",
"to",
"-",
"string",
"map",
"of",
"key",
"-",
"value",
"pairs",
".",
"Response",
"templates",
"are",
"represented",
"as",
"a",... | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-apigatewayv2/src/main/java/com/amazonaws/services/apigatewayv2/model/UpdateIntegrationResponseRequest.java#L535-L538 |
apptik/JustJson | json-core/src/main/java/io/apptik/json/util/IdentityArrayList.java | IdentityArrayList.addAll | public boolean addAll(int index, Collection<? extends E> c) {
"""
Inserts all of the elements in the specified collection into this
list, starting at the specified position. Shifts the element
currently at that position (if any) and any subsequent elements to
the right (increases their indices). The new eleme... | java | public boolean addAll(int index, Collection<? extends E> c) {
rangeCheckForAdd(index);
Object[] a = c.toArray();
int numNew = a.length;
ensureCapacity(size + numNew); // Increments modCount
int numMoved = size - index;
if (numMoved > 0) {
System.arraycopy(e... | [
"public",
"boolean",
"addAll",
"(",
"int",
"index",
",",
"Collection",
"<",
"?",
"extends",
"E",
">",
"c",
")",
"{",
"rangeCheckForAdd",
"(",
"index",
")",
";",
"Object",
"[",
"]",
"a",
"=",
"c",
".",
"toArray",
"(",
")",
";",
"int",
"numNew",
"=",... | Inserts all of the elements in the specified collection into this
list, starting at the specified position. Shifts the element
currently at that position (if any) and any subsequent elements to
the right (increases their indices). The new elements will appear
in the list in the order that they are returned by the
spe... | [
"Inserts",
"all",
"of",
"the",
"elements",
"in",
"the",
"specified",
"collection",
"into",
"this",
"list",
"starting",
"at",
"the",
"specified",
"position",
".",
"Shifts",
"the",
"element",
"currently",
"at",
"that",
"position",
"(",
"if",
"any",
")",
"and",... | train | https://github.com/apptik/JustJson/blob/c90f0dd7f84df26da4749be8cd9b026fff499a79/json-core/src/main/java/io/apptik/json/util/IdentityArrayList.java#L470-L485 |
google/error-prone-javac | src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesFrameWriter.java | AllClassesFrameWriter.addContents | protected void addContents(Iterable<? extends Element> classlist, boolean wantFrames,
Content content) {
"""
Given a list of classes, generate links for each class or interface.
If the class kind is interface, print it in the italics font. Also all
links should target the right-han... | java | protected void addContents(Iterable<? extends Element> classlist, boolean wantFrames,
Content content) {
for (Element element : classlist) {
TypeElement typeElement = (TypeElement)element;
if (!utils.isCoreClass(typeElement)) {
continue;
... | [
"protected",
"void",
"addContents",
"(",
"Iterable",
"<",
"?",
"extends",
"Element",
">",
"classlist",
",",
"boolean",
"wantFrames",
",",
"Content",
"content",
")",
"{",
"for",
"(",
"Element",
"element",
":",
"classlist",
")",
"{",
"TypeElement",
"typeElement"... | Given a list of classes, generate links for each class or interface.
If the class kind is interface, print it in the italics font. Also all
links should target the right-hand frame. If clicked on any class name
in this page, appropriate class page should get opened in the right-hand
frame.
@param classlist Sorted list... | [
"Given",
"a",
"list",
"of",
"classes",
"generate",
"links",
"for",
"each",
"class",
"or",
"interface",
".",
"If",
"the",
"class",
"kind",
"is",
"interface",
"print",
"it",
"in",
"the",
"italics",
"font",
".",
"Also",
"all",
"links",
"should",
"target",
"... | train | https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesFrameWriter.java#L154-L172 |
h2oai/h2o-3 | h2o-core/src/main/java/water/api/RequestServer.java | RequestServer.registerEndpoint | public static Route registerEndpoint(
String api_name, String method_uri, Class<? extends Handler> handler_class, String handler_method, String summary
) {
"""
Register an HTTP request handler method for a given URL pattern, with parameters extracted from the URI.
<p>
URIs which match this pattern will h... | java | public static Route registerEndpoint(
String api_name, String method_uri, Class<? extends Handler> handler_class, String handler_method, String summary
) {
String[] spl = method_uri.split(" ");
assert spl.length == 2 : "Unexpected method_uri parameter: " + method_uri;
return registerEndpoint(api_nam... | [
"public",
"static",
"Route",
"registerEndpoint",
"(",
"String",
"api_name",
",",
"String",
"method_uri",
",",
"Class",
"<",
"?",
"extends",
"Handler",
">",
"handler_class",
",",
"String",
"handler_method",
",",
"String",
"summary",
")",
"{",
"String",
"[",
"]"... | Register an HTTP request handler method for a given URL pattern, with parameters extracted from the URI.
<p>
URIs which match this pattern will have their parameters collected from the path and from the query params
@param api_name suggested method name for this endpoint in the external API library. These names should... | [
"Register",
"an",
"HTTP",
"request",
"handler",
"method",
"for",
"a",
"given",
"URL",
"pattern",
"with",
"parameters",
"extracted",
"from",
"the",
"URI",
".",
"<p",
">",
"URIs",
"which",
"match",
"this",
"pattern",
"will",
"have",
"their",
"parameters",
"col... | train | https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/water/api/RequestServer.java#L189-L195 |
softindex/datakernel | core-promise/src/main/java/io/datakernel/file/AsyncFile.java | AsyncFile.forceAndClose | public Promise<Void> forceAndClose(boolean forceMetadata) {
"""
Forces physical write and then closes the channel
if the file is opened.
@param forceMetadata whether or not to force metadata writes too
"""
if (!isOpen()) return Promise.ofException(FILE_CLOSED);
return ofBlockingRunnable(executor, () ->... | java | public Promise<Void> forceAndClose(boolean forceMetadata) {
if (!isOpen()) return Promise.ofException(FILE_CLOSED);
return ofBlockingRunnable(executor, () -> {
try {
channel.force(forceMetadata);
channel.close();
} catch (IOException e) {
throw new UncheckedException(e);
}
});
} | [
"public",
"Promise",
"<",
"Void",
">",
"forceAndClose",
"(",
"boolean",
"forceMetadata",
")",
"{",
"if",
"(",
"!",
"isOpen",
"(",
")",
")",
"return",
"Promise",
".",
"ofException",
"(",
"FILE_CLOSED",
")",
";",
"return",
"ofBlockingRunnable",
"(",
"executor"... | Forces physical write and then closes the channel
if the file is opened.
@param forceMetadata whether or not to force metadata writes too | [
"Forces",
"physical",
"write",
"and",
"then",
"closes",
"the",
"channel",
"if",
"the",
"file",
"is",
"opened",
"."
] | train | https://github.com/softindex/datakernel/blob/090ca1116416c14d463d49d275cb1daaafa69c56/core-promise/src/main/java/io/datakernel/file/AsyncFile.java#L367-L377 |
alkacon/opencms-core | src/org/opencms/jsp/CmsJspTagInfo.java | CmsJspTagInfo.getTitleInfo | public static String getTitleInfo(CmsFlexController controller, HttpServletRequest req) {
"""
Returns the title of a page delivered from OpenCms, usually used for the <code><title></code> tag of
a HTML page.<p>
If no title information has been found, the empty String "" is returned.<p>
@param controll... | java | public static String getTitleInfo(CmsFlexController controller, HttpServletRequest req) {
String result = null;
CmsObject cms = controller.getCmsObject();
try {
CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req);
if (contextBean.isDetail... | [
"public",
"static",
"String",
"getTitleInfo",
"(",
"CmsFlexController",
"controller",
",",
"HttpServletRequest",
"req",
")",
"{",
"String",
"result",
"=",
"null",
";",
"CmsObject",
"cms",
"=",
"controller",
".",
"getCmsObject",
"(",
")",
";",
"try",
"{",
"CmsJ... | Returns the title of a page delivered from OpenCms, usually used for the <code><title></code> tag of
a HTML page.<p>
If no title information has been found, the empty String "" is returned.<p>
@param controller the current OpenCms request controller
@param req the current request
@return the title of a page de... | [
"Returns",
"the",
"title",
"of",
"a",
"page",
"delivered",
"from",
"OpenCms",
"usually",
"used",
"for",
"the",
"<code",
">",
"<",
";",
"title>",
";",
"<",
"/",
"code",
">",
"tag",
"of",
"a",
"HTML",
"page",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/jsp/CmsJspTagInfo.java#L220-L254 |
UrielCh/ovh-java-sdk | ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java | ApiOvhClusterhadoop.serviceName_networkAcl_block_PUT | public void serviceName_networkAcl_block_PUT(String serviceName, String block, OvhNetworkAcl body) throws IOException {
"""
Alter this object properties
REST: PUT /cluster/hadoop/{serviceName}/networkAcl/{block}
@param body [required] New object properties
@param serviceName [required] The internal name of yo... | java | public void serviceName_networkAcl_block_PUT(String serviceName, String block, OvhNetworkAcl body) throws IOException {
String qPath = "/cluster/hadoop/{serviceName}/networkAcl/{block}";
StringBuilder sb = path(qPath, serviceName, block);
exec(qPath, "PUT", sb.toString(), body);
} | [
"public",
"void",
"serviceName_networkAcl_block_PUT",
"(",
"String",
"serviceName",
",",
"String",
"block",
",",
"OvhNetworkAcl",
"body",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/cluster/hadoop/{serviceName}/networkAcl/{block}\"",
";",
"StringBuilder",... | Alter this object properties
REST: PUT /cluster/hadoop/{serviceName}/networkAcl/{block}
@param body [required] New object properties
@param serviceName [required] The internal name of your cluster
@param block [required] IP Block to allow | [
"Alter",
"this",
"object",
"properties"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-clusterhadoop/src/main/java/net/minidev/ovh/api/ApiOvhClusterhadoop.java#L57-L61 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.