repository_name stringlengths 7 58 | func_path_in_repository stringlengths 11 218 | func_name stringlengths 4 140 | whole_func_string stringlengths 153 5.32k | language stringclasses 1
value | func_code_string stringlengths 72 4k | func_code_tokens listlengths 20 832 | func_documentation_string stringlengths 61 2k | func_documentation_tokens listlengths 1 647 | split_name stringclasses 1
value | func_code_url stringlengths 102 339 |
|---|---|---|---|---|---|---|---|---|---|---|
alkacon/opencms-core | src/org/opencms/ui/apps/publishqueue/CmsQueuedTable.java | CmsQueuedTable.onItemClick | void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {
"""
Handles the table item clicks, including clicks on images inside of a table item.<p>
@param event the click event
@param itemId of the clicked row
@param propertyId column id
"""
setValue(null);
select(... | java | void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {
setValue(null);
select(itemId);
if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
m_menu.setEntries(
getMenuEntries(),
Collections.singleton(((... | [
"void",
"onItemClick",
"(",
"MouseEvents",
".",
"ClickEvent",
"event",
",",
"Object",
"itemId",
",",
"Object",
"propertyId",
")",
"{",
"setValue",
"(",
"null",
")",
";",
"select",
"(",
"itemId",
")",
";",
"if",
"(",
"event",
".",
"getButton",
"(",
")",
... | Handles the table item clicks, including clicks on images inside of a table item.<p>
@param event the click event
@param itemId of the clicked row
@param propertyId column id | [
"Handles",
"the",
"table",
"item",
"clicks",
"including",
"clicks",
"on",
"images",
"inside",
"of",
"a",
"table",
"item",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/publishqueue/CmsQueuedTable.java#L540-L556 |
lastaflute/lastaflute | src/main/java/org/lastaflute/core/message/UserMessages.java | UserMessages.hasMessageOf | public boolean hasMessageOf(String property, String messageKey) {
"""
Does the property has user message for the message key?
@param property the name of property, which may have user messages. (NotNull)
@param messageKey The message key to find message. (NotNull)
@return The determination, true or false.
"... | java | public boolean hasMessageOf(String property, String messageKey) {
assertArgumentNotNull("property", property);
assertArgumentNotNull("messageKey", messageKey);
final UserMessageItem item = getPropertyItem(property);
return item != null && item.getMessageList().stream().anyMatch(message -... | [
"public",
"boolean",
"hasMessageOf",
"(",
"String",
"property",
",",
"String",
"messageKey",
")",
"{",
"assertArgumentNotNull",
"(",
"\"property\"",
",",
"property",
")",
";",
"assertArgumentNotNull",
"(",
"\"messageKey\"",
",",
"messageKey",
")",
";",
"final",
"U... | Does the property has user message for the message key?
@param property the name of property, which may have user messages. (NotNull)
@param messageKey The message key to find message. (NotNull)
@return The determination, true or false. | [
"Does",
"the",
"property",
"has",
"user",
"message",
"for",
"the",
"message",
"key?"
] | train | https://github.com/lastaflute/lastaflute/blob/17b56dda8322e4c6d79043532c1dda917d6b60a8/src/main/java/org/lastaflute/core/message/UserMessages.java#L194-L211 |
ironjacamar/ironjacamar | codegenerator/src/main/java/org/ironjacamar/codegenerator/code/ConnMetaCodeGen.java | ConnMetaCodeGen.writeEIS | private void writeEIS(Definition def, Writer out, int indent) throws IOException {
"""
Output eis info method
@param def definition
@param out Writer
@param indent space number
@throws IOException ioException
"""
writeWithIndent(out, indent, "/**\n");
writeWithIndent(out, indent, " * Re... | java | private void writeEIS(Definition def, Writer out, int indent) throws IOException
{
writeWithIndent(out, indent, "/**\n");
writeWithIndent(out, indent, " * Returns product name of the underlying EIS instance connected\n");
writeWithIndent(out, indent, " *\n");
writeWithIndent(out, indent, " * ... | [
"private",
"void",
"writeEIS",
"(",
"Definition",
"def",
",",
"Writer",
"out",
",",
"int",
"indent",
")",
"throws",
"IOException",
"{",
"writeWithIndent",
"(",
"out",
",",
"indent",
",",
"\"/**\\n\"",
")",
";",
"writeWithIndent",
"(",
"out",
",",
"indent",
... | Output eis info method
@param def definition
@param out Writer
@param indent space number
@throws IOException ioException | [
"Output",
"eis",
"info",
"method"
] | train | https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/ConnMetaCodeGen.java#L94-L123 |
blinkfox/zealot | src/main/java/com/blinkfox/zealot/core/Zealot.java | Zealot.getSqlInfo | public static SqlInfo getSqlInfo(String nameSpace, String zealotId, Object paramObj) {
"""
通过传入zealot xml文件对应的命名空间、zealot节点的ID以及参数对象(一般是JavaBean或者Map)来生成和获取sqlInfo信息(有参的SQL).
@param nameSpace xml命名空间
@param zealotId xml中的zealotId
@param paramObj 参数对象(一般是JavaBean对象或者Map)
@return 返回SqlInfo对象
"""
if... | java | public static SqlInfo getSqlInfo(String nameSpace, String zealotId, Object paramObj) {
if (StringHelper.isBlank(nameSpace) || StringHelper.isBlank(zealotId)) {
throw new ValidFailException("请输入有效的nameSpace或者zealotId的值!");
}
// 获取nameSpace文档中的指定sql的zealotId的节点对应的Node节点,如果是debug模式,则实时... | [
"public",
"static",
"SqlInfo",
"getSqlInfo",
"(",
"String",
"nameSpace",
",",
"String",
"zealotId",
",",
"Object",
"paramObj",
")",
"{",
"if",
"(",
"StringHelper",
".",
"isBlank",
"(",
"nameSpace",
")",
"||",
"StringHelper",
".",
"isBlank",
"(",
"zealotId",
... | 通过传入zealot xml文件对应的命名空间、zealot节点的ID以及参数对象(一般是JavaBean或者Map)来生成和获取sqlInfo信息(有参的SQL).
@param nameSpace xml命名空间
@param zealotId xml中的zealotId
@param paramObj 参数对象(一般是JavaBean对象或者Map)
@return 返回SqlInfo对象 | [
"通过传入zealot",
"xml文件对应的命名空间、zealot节点的ID以及参数对象",
"(",
"一般是JavaBean或者Map",
")",
"来生成和获取sqlInfo信息",
"(",
"有参的SQL",
")",
"."
] | train | https://github.com/blinkfox/zealot/blob/21b00fa3e4ed42188eef3116d494e112e7a4194c/src/main/java/com/blinkfox/zealot/core/Zealot.java#L80-L96 |
playn/playn | html/src/playn/html/HtmlGraphics.java | HtmlGraphics.registerFontMetrics | public void registerFontMetrics(String name, Font font, float lineHeight) {
"""
Registers metrics for the specified font in the specified style and size. This overrides the
default font metrics calculation (which is hacky and inaccurate). If you want to ensure
somewhat consistent font layout across browsers, you... | java | public void registerFontMetrics(String name, Font font, float lineHeight) {
HtmlFontMetrics metrics = getFontMetrics(font); // get emwidth via default measurement
fontMetrics.put(font, new HtmlFontMetrics(font, lineHeight, metrics.emwidth));
} | [
"public",
"void",
"registerFontMetrics",
"(",
"String",
"name",
",",
"Font",
"font",
",",
"float",
"lineHeight",
")",
"{",
"HtmlFontMetrics",
"metrics",
"=",
"getFontMetrics",
"(",
"font",
")",
";",
"// get emwidth via default measurement",
"fontMetrics",
".",
"put"... | Registers metrics for the specified font in the specified style and size. This overrides the
default font metrics calculation (which is hacky and inaccurate). If you want to ensure
somewhat consistent font layout across browsers, you should register font metrics for every
combination of font, style and size that you us... | [
"Registers",
"metrics",
"for",
"the",
"specified",
"font",
"in",
"the",
"specified",
"style",
"and",
"size",
".",
"This",
"overrides",
"the",
"default",
"font",
"metrics",
"calculation",
"(",
"which",
"is",
"hacky",
"and",
"inaccurate",
")",
".",
"If",
"you"... | train | https://github.com/playn/playn/blob/7e7a9d048ba6afe550dc0cdeaca3e1d5b0d01c66/html/src/playn/html/HtmlGraphics.java#L168-L171 |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/DatePicker.java | DatePicker.setDate | public void setDate(int year, int month, int day) {
"""
This function set the date on the DatePicker using the year, month and day provided. <b>Note:</b> month is
0-based (January - 0)
@param year
The full year.
@param month
The month. (0-based, 0 for January)
@param day
The day of the month.
"""
... | java | public void setDate(int year, int month, int day) {
Calendar to = Calendar.getInstance();
to.set(year, month, day);
setDate(to);
} | [
"public",
"void",
"setDate",
"(",
"int",
"year",
",",
"int",
"month",
",",
"int",
"day",
")",
"{",
"Calendar",
"to",
"=",
"Calendar",
".",
"getInstance",
"(",
")",
";",
"to",
".",
"set",
"(",
"year",
",",
"month",
",",
"day",
")",
";",
"setDate",
... | This function set the date on the DatePicker using the year, month and day provided. <b>Note:</b> month is
0-based (January - 0)
@param year
The full year.
@param month
The month. (0-based, 0 for January)
@param day
The day of the month. | [
"This",
"function",
"set",
"the",
"date",
"on",
"the",
"DatePicker",
"using",
"the",
"year",
"month",
"and",
"day",
"provided",
".",
"<b",
">",
"Note",
":",
"<",
"/",
"b",
">",
"month",
"is",
"0",
"-",
"based",
"(",
"January",
"-",
"0",
")"
] | train | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/DatePicker.java#L255-L259 |
alkacon/opencms-core | src/org/opencms/workplace/tools/CmsIdentifiableObjectContainer.java | CmsIdentifiableObjectContainer.addIdentifiableObject | public void addIdentifiableObject(String id, T idObject) {
"""
Appends the specified object to the end of this container. <p>
@param id the object identifier
@param idObject the object add to the container
@see java.util.List#add(Object)
"""
m_cache = null;
if (m_uniqueIds && (m_objects... | java | public void addIdentifiableObject(String id, T idObject) {
m_cache = null;
if (m_uniqueIds && (m_objectsById.get(id) != null)) {
removeObject(id);
}
if (m_relativeOrdered) {
float pos = 1;
if (!m_orderedObjectList.isEmpty()) {
pos = m_... | [
"public",
"void",
"addIdentifiableObject",
"(",
"String",
"id",
",",
"T",
"idObject",
")",
"{",
"m_cache",
"=",
"null",
";",
"if",
"(",
"m_uniqueIds",
"&&",
"(",
"m_objectsById",
".",
"get",
"(",
"id",
")",
"!=",
"null",
")",
")",
"{",
"removeObject",
... | Appends the specified object to the end of this container. <p>
@param id the object identifier
@param idObject the object add to the container
@see java.util.List#add(Object) | [
"Appends",
"the",
"specified",
"object",
"to",
"the",
"end",
"of",
"this",
"container",
".",
"<p",
">"
] | train | https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsIdentifiableObjectContainer.java#L139-L167 |
messagebird/java-rest-api | api/src/main/java/com/messagebird/MessageBirdClient.java | MessageBirdClient.updateGroup | public Group updateGroup(final String id, final GroupRequest groupRequest) throws UnauthorizedException, GeneralException {
"""
Updates an existing group. You only need to supply the unique ID that
was returned upon creation.
"""
if (id == null) {
throw new IllegalArgumentException("Group ... | java | public Group updateGroup(final String id, final GroupRequest groupRequest) throws UnauthorizedException, GeneralException {
if (id == null) {
throw new IllegalArgumentException("Group ID must be specified.");
}
String path = String.format("%s/%s", GROUPPATH, id);
return messa... | [
"public",
"Group",
"updateGroup",
"(",
"final",
"String",
"id",
",",
"final",
"GroupRequest",
"groupRequest",
")",
"throws",
"UnauthorizedException",
",",
"GeneralException",
"{",
"if",
"(",
"id",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",... | Updates an existing group. You only need to supply the unique ID that
was returned upon creation. | [
"Updates",
"an",
"existing",
"group",
".",
"You",
"only",
"need",
"to",
"supply",
"the",
"unique",
"ID",
"that",
"was",
"returned",
"upon",
"creation",
"."
] | train | https://github.com/messagebird/java-rest-api/blob/f92cd93afff413e6dc12aa6e41e69f26cbae8941/api/src/main/java/com/messagebird/MessageBirdClient.java#L684-L690 |
burberius/eve-esi | src/main/java/net/troja/eve/esi/api/CorporationApi.java | CorporationApi.getCorporationsCorporationIdStructures | public List<CorporationStructuresResponse> getCorporationsCorporationIdStructures(Integer corporationId,
String acceptLanguage, String datasource, String ifNoneMatch, String language, Integer page, String token)
throws ApiException {
"""
Get corporation structures Get a list of corporation ... | java | public List<CorporationStructuresResponse> getCorporationsCorporationIdStructures(Integer corporationId,
String acceptLanguage, String datasource, String ifNoneMatch, String language, Integer page, String token)
throws ApiException {
ApiResponse<List<CorporationStructuresResponse>> resp ... | [
"public",
"List",
"<",
"CorporationStructuresResponse",
">",
"getCorporationsCorporationIdStructures",
"(",
"Integer",
"corporationId",
",",
"String",
"acceptLanguage",
",",
"String",
"datasource",
",",
"String",
"ifNoneMatch",
",",
"String",
"language",
",",
"Integer",
... | Get corporation structures Get a list of corporation structures. This
route's version includes the changes to structures detailed in this
blog:
https://www.eveonline.com/article/upwell-2.0-structures-changes-coming
-on-february-13th --- This route is cached for up to 3600 seconds ---
Requires one of the following E... | [
"Get",
"corporation",
"structures",
"Get",
"a",
"list",
"of",
"corporation",
"structures",
".",
"This",
"route'",
";",
"s",
"version",
"includes",
"the",
"changes",
"to",
"structures",
"detailed",
"in",
"this",
"blog",
":",
"https",
":",
"//",
"www",
".",... | train | https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/CorporationApi.java#L3517-L3523 |
aws/aws-sdk-java | aws-java-sdk-pi/src/main/java/com/amazonaws/services/pi/model/ResponsePartitionKey.java | ResponsePartitionKey.withDimensions | public ResponsePartitionKey withDimensions(java.util.Map<String, String> dimensions) {
"""
<p>
A dimension map that contains the dimension(s) for this partition.
</p>
@param dimensions
A dimension map that contains the dimension(s) for this partition.
@return Returns a reference to this object so that metho... | java | public ResponsePartitionKey withDimensions(java.util.Map<String, String> dimensions) {
setDimensions(dimensions);
return this;
} | [
"public",
"ResponsePartitionKey",
"withDimensions",
"(",
"java",
".",
"util",
".",
"Map",
"<",
"String",
",",
"String",
">",
"dimensions",
")",
"{",
"setDimensions",
"(",
"dimensions",
")",
";",
"return",
"this",
";",
"}"
] | <p>
A dimension map that contains the dimension(s) for this partition.
</p>
@param dimensions
A dimension map that contains the dimension(s) for this partition.
@return Returns a reference to this object so that method calls can be chained together. | [
"<p",
">",
"A",
"dimension",
"map",
"that",
"contains",
"the",
"dimension",
"(",
"s",
")",
"for",
"this",
"partition",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pi/src/main/java/com/amazonaws/services/pi/model/ResponsePartitionKey.java#L74-L77 |
google/allocation-instrumenter | src/main/java/com/google/monitoring/runtime/instrumentation/AllocationClassAdapter.java | AllocationClassAdapter.visitMethod | @Override
public MethodVisitor visitMethod(
int access, String base, String desc, String signature, String[] exceptions) {
"""
For each method in the class being instrumented, <code>visitMethod</code> is called and the
returned MethodVisitor is used to visit the method. Note that a new MethodVisitor is
c... | java | @Override
public MethodVisitor visitMethod(
int access, String base, String desc, String signature, String[] exceptions) {
MethodVisitor mv = cv.visitMethod(access, base, desc, signature, exceptions);
if (mv != null) {
// We need to compute stackmaps (see
// AllocationInstrumenter#instrumen... | [
"@",
"Override",
"public",
"MethodVisitor",
"visitMethod",
"(",
"int",
"access",
",",
"String",
"base",
",",
"String",
"desc",
",",
"String",
"signature",
",",
"String",
"[",
"]",
"exceptions",
")",
"{",
"MethodVisitor",
"mv",
"=",
"cv",
".",
"visitMethod",
... | For each method in the class being instrumented, <code>visitMethod</code> is called and the
returned MethodVisitor is used to visit the method. Note that a new MethodVisitor is
constructed for each method. | [
"For",
"each",
"method",
"in",
"the",
"class",
"being",
"instrumented",
"<code",
">",
"visitMethod<",
"/",
"code",
">",
"is",
"called",
"and",
"the",
"returned",
"MethodVisitor",
"is",
"used",
"to",
"visit",
"the",
"method",
".",
"Note",
"that",
"a",
"new"... | train | https://github.com/google/allocation-instrumenter/blob/58d8473e8832e51f39ae7aa38328f61c4b747bff/src/main/java/com/google/monitoring/runtime/instrumentation/AllocationClassAdapter.java#L45-L64 |
facebook/fresco | imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java | PlatformBitmapFactory.createBitmap | public CloseableReference<Bitmap> createBitmap(
DisplayMetrics display,
int width,
int height,
Bitmap.Config config) {
"""
Creates a bitmap with the specified width and height. Its
initial density is determined from the given DisplayMetrics.
@param display Display metrics for the disp... | java | public CloseableReference<Bitmap> createBitmap(
DisplayMetrics display,
int width,
int height,
Bitmap.Config config) {
return createBitmap(display, width, height, config, null);
} | [
"public",
"CloseableReference",
"<",
"Bitmap",
">",
"createBitmap",
"(",
"DisplayMetrics",
"display",
",",
"int",
"width",
",",
"int",
"height",
",",
"Bitmap",
".",
"Config",
"config",
")",
"{",
"return",
"createBitmap",
"(",
"display",
",",
"width",
",",
"h... | Creates a bitmap with the specified width and height. Its
initial density is determined from the given DisplayMetrics.
@param display Display metrics for the display this bitmap will be
drawn on.
@param width The width of the bitmap
@param height The height of the bitmap
@param config The bitmap config to cre... | [
"Creates",
"a",
"bitmap",
"with",
"the",
"specified",
"width",
"and",
"height",
".",
"Its",
"initial",
"density",
"is",
"determined",
"from",
"the",
"given",
"DisplayMetrics",
"."
] | train | https://github.com/facebook/fresco/blob/0b85879d51c5036d5e46e627a6651afefc0b971a/imagepipeline-base/src/main/java/com/facebook/imagepipeline/bitmaps/PlatformBitmapFactory.java#L373-L379 |
Javen205/IJPay | src/main/java/com/jpay/util/HttpKitExt.java | HttpKitExt.uploadMedia | protected static String uploadMedia(String url, File file, String params) throws IOException {
"""
上传临时素材,本段代码来自老版本(____′↘夏悸 / wechat),致敬!
@param url
图片上传地址
@param file
需要上传的文件
@return ApiResult
@throws IOException
"""
URL urlGet = new URL(url);
HttpURLConnection conn = (HttpURLConnection) urlGet.o... | java | protected static String uploadMedia(String url, File file, String params) throws IOException {
URL urlGet = new URL(url);
HttpURLConnection conn = (HttpURLConnection) urlGet.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");
conn.setRe... | [
"protected",
"static",
"String",
"uploadMedia",
"(",
"String",
"url",
",",
"File",
"file",
",",
"String",
"params",
")",
"throws",
"IOException",
"{",
"URL",
"urlGet",
"=",
"new",
"URL",
"(",
"url",
")",
";",
"HttpURLConnection",
"conn",
"=",
"(",
"HttpURL... | 上传临时素材,本段代码来自老版本(____′↘夏悸 / wechat),致敬!
@param url
图片上传地址
@param file
需要上传的文件
@return ApiResult
@throws IOException | [
"上传临时素材,本段代码来自老版本(____′↘夏悸",
"/",
"wechat),致敬!"
] | train | https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/util/HttpKitExt.java#L43-L102 |
xerial/snappy-java | src/main/java/org/xerial/snappy/Snappy.java | Snappy.uncompressedLength | public static int uncompressedLength(ByteBuffer compressed)
throws IOException {
"""
Get the uncompressed byte size of the given compressed input. This
operation takes O(1) time.
@param compressed input data [pos() ... limit())
@return uncompressed byte length of the given input
@throws IOExcepti... | java | public static int uncompressedLength(ByteBuffer compressed)
throws IOException
{
if (!compressed.isDirect()) {
throw new SnappyError(SnappyErrorCode.NOT_A_DIRECT_BUFFER, "input is not a direct buffer");
}
return impl.uncompressedLength(compressed, compressed.position... | [
"public",
"static",
"int",
"uncompressedLength",
"(",
"ByteBuffer",
"compressed",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"compressed",
".",
"isDirect",
"(",
")",
")",
"{",
"throw",
"new",
"SnappyError",
"(",
"SnappyErrorCode",
".",
"NOT_A_DIRECT_BUFF... | Get the uncompressed byte size of the given compressed input. This
operation takes O(1) time.
@param compressed input data [pos() ... limit())
@return uncompressed byte length of the given input
@throws IOException when failed to uncompress the given input. The error code is
{@link SnappyErrorCode#PARSING_ERROR}
@thro... | [
"Get",
"the",
"uncompressed",
"byte",
"size",
"of",
"the",
"given",
"compressed",
"input",
".",
"This",
"operation",
"takes",
"O",
"(",
"1",
")",
"time",
"."
] | train | https://github.com/xerial/snappy-java/blob/9df6ed7bbce88186c82f2e7cdcb7b974421b3340/src/main/java/org/xerial/snappy/Snappy.java#L647-L655 |
liuyukuai/commons | commons-core/src/main/java/com/itxiaoer/commons/core/date/LocalDateTimeUtil.java | LocalDateTimeUtil.parse | public static LocalDateTime parse(String localDate, String pattern) {
"""
格式化时间
@param localDate 时间
@param pattern 时间格式
@return 时间字符串
"""
return LocalDateTime.from(DateTimeFormatter.ofPattern(pattern).parse(localDate));
} | java | public static LocalDateTime parse(String localDate, String pattern) {
return LocalDateTime.from(DateTimeFormatter.ofPattern(pattern).parse(localDate));
} | [
"public",
"static",
"LocalDateTime",
"parse",
"(",
"String",
"localDate",
",",
"String",
"pattern",
")",
"{",
"return",
"LocalDateTime",
".",
"from",
"(",
"DateTimeFormatter",
".",
"ofPattern",
"(",
"pattern",
")",
".",
"parse",
"(",
"localDate",
")",
")",
"... | 格式化时间
@param localDate 时间
@param pattern 时间格式
@return 时间字符串 | [
"格式化时间"
] | train | https://github.com/liuyukuai/commons/blob/ba67eddb542446b12f419f1866dbaa82e47fbf35/commons-core/src/main/java/com/itxiaoer/commons/core/date/LocalDateTimeUtil.java#L116-L118 |
deeplearning4j/deeplearning4j | deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java | WordVectorSerializer.writeWordVectors | @Deprecated
public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull BufferedWriter writer) throws IOException {
"""
Writes the word vectors to the given BufferedWriter. Note that this assumes an in memory cache.
BufferedWriter can be writer to local file, or hdfs file, or any compatible to java ta... | java | @Deprecated
public static void writeWordVectors(@NonNull Word2Vec vec, @NonNull BufferedWriter writer) throws IOException {
int words = 0;
String str = vec.getVocab().numWords() + " " + vec.getLayerSize() + " " + vec.getVocab().totalNumberOfDocs();
log.debug("Saving header: {}", str);
... | [
"@",
"Deprecated",
"public",
"static",
"void",
"writeWordVectors",
"(",
"@",
"NonNull",
"Word2Vec",
"vec",
",",
"@",
"NonNull",
"BufferedWriter",
"writer",
")",
"throws",
"IOException",
"{",
"int",
"words",
"=",
"0",
";",
"String",
"str",
"=",
"vec",
".",
... | Writes the word vectors to the given BufferedWriter. Note that this assumes an in memory cache.
BufferedWriter can be writer to local file, or hdfs file, or any compatible to java target.
@param vec the word2vec to write
@param writer - BufferedWriter, where all data should be written to
the path to write
@throws I... | [
"Writes",
"the",
"word",
"vectors",
"to",
"the",
"given",
"BufferedWriter",
".",
"Note",
"that",
"this",
"assumes",
"an",
"in",
"memory",
"cache",
".",
"BufferedWriter",
"can",
"be",
"writer",
"to",
"local",
"file",
"or",
"hdfs",
"file",
"or",
"any",
"comp... | train | https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java#L1527-L1559 |
Impetus/Kundera | src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java | ESResponseWrapper.onId | private Object onId(Object key, Attribute attribute, Object fieldValue) {
"""
On id.
@param key
the key
@param attribute
the attribute
@param fieldValue
the field value
@return the object
"""
if (SingularAttribute.class.isAssignableFrom(attribute.getClass()) && ((SingularAttribute) attribute).... | java | private Object onId(Object key, Attribute attribute, Object fieldValue)
{
if (SingularAttribute.class.isAssignableFrom(attribute.getClass()) && ((SingularAttribute) attribute).isId())
{
key = fieldValue;
}
return key;
} | [
"private",
"Object",
"onId",
"(",
"Object",
"key",
",",
"Attribute",
"attribute",
",",
"Object",
"fieldValue",
")",
"{",
"if",
"(",
"SingularAttribute",
".",
"class",
".",
"isAssignableFrom",
"(",
"attribute",
".",
"getClass",
"(",
")",
")",
"&&",
"(",
"("... | On id.
@param key
the key
@param attribute
the attribute
@param fieldValue
the field value
@return the object | [
"On",
"id",
"."
] | train | https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-elastic-search/src/main/java/com/impetus/client/es/utils/ESResponseWrapper.java#L715-L722 |
liferay/com-liferay-commerce | commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java | CommerceWarehousePersistenceImpl.findByG_C | @Override
public List<CommerceWarehouse> findByG_C(long groupId,
long commerceCountryId, int start, int end) {
"""
Returns a range of all the commerce warehouses where groupId = ? and commerceCountryId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. ... | java | @Override
public List<CommerceWarehouse> findByG_C(long groupId,
long commerceCountryId, int start, int end) {
return findByG_C(groupId, commerceCountryId, start, end, null);
} | [
"@",
"Override",
"public",
"List",
"<",
"CommerceWarehouse",
">",
"findByG_C",
"(",
"long",
"groupId",
",",
"long",
"commerceCountryId",
",",
"int",
"start",
",",
"int",
"end",
")",
"{",
"return",
"findByG_C",
"(",
"groupId",
",",
"commerceCountryId",
",",
"... | Returns a range of all the commerce warehouses where groupId = ? and commerceCountryId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers ... | [
"Returns",
"a",
"range",
"of",
"all",
"the",
"commerce",
"warehouses",
"where",
"groupId",
"=",
"?",
";",
"and",
"commerceCountryId",
"=",
"?",
";",
"."
] | train | https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceWarehousePersistenceImpl.java#L1199-L1203 |
cesarferreira/AndroidQuickUtils | library/src/main/java/quickutils/core/cache/image/AbstractCache.java | AbstractCache.enableDiskCache | public boolean enableDiskCache(Context context, int storageDevice) {
"""
Enable caching to the phone's internal storage or SD card.
@param context
the current context
@param storageDevice
where to store the cached files, either {@link #DISK_CACHE_INTERNAL} or
{@link #DISK_CACHE_SDCARD})
@return
"""
... | java | public boolean enableDiskCache(Context context, int storageDevice) {
Context appContext = context.getApplicationContext();
String rootDir = null;
if (storageDevice == DISK_CACHE_SDCARD
&& Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) {
// S... | [
"public",
"boolean",
"enableDiskCache",
"(",
"Context",
"context",
",",
"int",
"storageDevice",
")",
"{",
"Context",
"appContext",
"=",
"context",
".",
"getApplicationContext",
"(",
")",
";",
"String",
"rootDir",
"=",
"null",
";",
"if",
"(",
"storageDevice",
"... | Enable caching to the phone's internal storage or SD card.
@param context
the current context
@param storageDevice
where to store the cached files, either {@link #DISK_CACHE_INTERNAL} or
{@link #DISK_CACHE_SDCARD})
@return | [
"Enable",
"caching",
"to",
"the",
"phone",
"s",
"internal",
"storage",
"or",
"SD",
"card",
"."
] | train | https://github.com/cesarferreira/AndroidQuickUtils/blob/73a91daedbb9f7be7986ea786fbc441c9e5a881c/library/src/main/java/quickutils/core/cache/image/AbstractCache.java#L134-L177 |
jbossws/jbossws-cxf | modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java | SoapAddressRewriteHelper.getRewrittenPublishedEndpointUrl | public static String getRewrittenPublishedEndpointUrl(String wsdlAddress, String epAddress, SOAPAddressRewriteMetadata sarm) {
"""
Rewrite and get address to be used for CXF published endpoint url prop (rewritten wsdl address)
@param wsdlAddress The soap:address in the wsdl
@param epAddress The address... | java | public static String getRewrittenPublishedEndpointUrl(String wsdlAddress, String epAddress, SOAPAddressRewriteMetadata sarm) {
if (wsdlAddress == null) {
return null;
}
if (isRewriteRequired(sarm, wsdlAddress))
{
final String origUriScheme = getUriScheme(wsdlAddress); //will be... | [
"public",
"static",
"String",
"getRewrittenPublishedEndpointUrl",
"(",
"String",
"wsdlAddress",
",",
"String",
"epAddress",
",",
"SOAPAddressRewriteMetadata",
"sarm",
")",
"{",
"if",
"(",
"wsdlAddress",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"... | Rewrite and get address to be used for CXF published endpoint url prop (rewritten wsdl address)
@param wsdlAddress The soap:address in the wsdl
@param epAddress The address that has been computed for the endpoint
@param sarm The deployment SOAPAddressRewriteMetadata
@return The rewritte... | [
"Rewrite",
"and",
"get",
"address",
"to",
"be",
"used",
"for",
"CXF",
"published",
"endpoint",
"url",
"prop",
"(",
"rewritten",
"wsdl",
"address",
")"
] | train | https://github.com/jbossws/jbossws-cxf/blob/e1d5df3664cbc2482ebc83cafd355a4d60d12150/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java#L54-L68 |
Azure/azure-sdk-for-java | edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java | DevicesInner.beginDownloadUpdates | public void beginDownloadUpdates(String deviceName, String resourceGroupName) {
"""
Downloads the updates on a data box edge/gateway device.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws C... | java | public void beginDownloadUpdates(String deviceName, String resourceGroupName) {
beginDownloadUpdatesWithServiceResponseAsync(deviceName, resourceGroupName).toBlocking().single().body();
} | [
"public",
"void",
"beginDownloadUpdates",
"(",
"String",
"deviceName",
",",
"String",
"resourceGroupName",
")",
"{",
"beginDownloadUpdatesWithServiceResponseAsync",
"(",
"deviceName",
",",
"resourceGroupName",
")",
".",
"toBlocking",
"(",
")",
".",
"single",
"(",
")",... | Downloads the updates on a data box edge/gateway device.
@param deviceName The device name.
@param resourceGroupName The resource group name.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException all other w... | [
"Downloads",
"the",
"updates",
"on",
"a",
"data",
"box",
"edge",
"/",
"gateway",
"device",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/edgegateway/resource-manager/v2019_03_01/src/main/java/com/microsoft/azure/management/edgegateway/v2019_03_01/implementation/DevicesInner.java#L1270-L1272 |
finmath/finmath-lib | src/main/java/net/finmath/marketdata2/model/curves/DiscountCurveInterpolation.java | DiscountCurveInterpolation.createDiscountFactorsFromForwardRates | public static DiscountCurveInterface createDiscountFactorsFromForwardRates(String name, TimeDiscretization tenor, RandomVariable [] forwardRates) {
"""
Create a discount curve from given time discretization and forward rates.
This function is provided for "single interest rate curve" frameworks.
@param name Th... | java | public static DiscountCurveInterface createDiscountFactorsFromForwardRates(String name, TimeDiscretization tenor, RandomVariable [] forwardRates) {
DiscountCurveInterpolation discountFactors = new DiscountCurveInterpolation(name);
RandomVariable df = forwardRates[0].mult(tenor.getTimeStep(0)).add(1.0).invert();
d... | [
"public",
"static",
"DiscountCurveInterface",
"createDiscountFactorsFromForwardRates",
"(",
"String",
"name",
",",
"TimeDiscretization",
"tenor",
",",
"RandomVariable",
"[",
"]",
"forwardRates",
")",
"{",
"DiscountCurveInterpolation",
"discountFactors",
"=",
"new",
"Discoun... | Create a discount curve from given time discretization and forward rates.
This function is provided for "single interest rate curve" frameworks.
@param name The name of this discount curve.
@param tenor Time discretization for the forward rates
@param forwardRates Array of forward rates.
@return A new discount factor ... | [
"Create",
"a",
"discount",
"curve",
"from",
"given",
"time",
"discretization",
"and",
"forward",
"rates",
".",
"This",
"function",
"is",
"provided",
"for",
"single",
"interest",
"rate",
"curve",
"frameworks",
"."
] | train | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/marketdata2/model/curves/DiscountCurveInterpolation.java#L380-L390 |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java | FileUtils.loadFileList | public static ImmutableList<File> loadFileList(final File fileList) throws IOException {
"""
Takes a file with filenames listed one per line and returns a list of the corresponding File
objects. Ignores blank lines and lines beginning with "#". Treats the
file as UTF-8 encoded.
"""
return loadFileList(F... | java | public static ImmutableList<File> loadFileList(final File fileList) throws IOException {
return loadFileList(Files.asCharSource(fileList, Charsets.UTF_8));
} | [
"public",
"static",
"ImmutableList",
"<",
"File",
">",
"loadFileList",
"(",
"final",
"File",
"fileList",
")",
"throws",
"IOException",
"{",
"return",
"loadFileList",
"(",
"Files",
".",
"asCharSource",
"(",
"fileList",
",",
"Charsets",
".",
"UTF_8",
")",
")",
... | Takes a file with filenames listed one per line and returns a list of the corresponding File
objects. Ignores blank lines and lines beginning with "#". Treats the
file as UTF-8 encoded. | [
"Takes",
"a",
"file",
"with",
"filenames",
"listed",
"one",
"per",
"line",
"and",
"returns",
"a",
"list",
"of",
"the",
"corresponding",
"File",
"objects",
".",
"Ignores",
"blank",
"lines",
"and",
"lines",
"beginning",
"with",
"#",
".",
"Treats",
"the",
"fi... | train | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/files/FileUtils.java#L102-L104 |
aNNiMON/Lightweight-Stream-API | stream/src/main/java/com/annimon/stream/DoubleStream.java | DoubleStream.iterate | @NotNull
public static DoubleStream iterate(
final double seed,
@NotNull final DoublePredicate predicate,
@NotNull final DoubleUnaryOperator op) {
"""
Creates an {@code DoubleStream} by iterative application {@code DoubleUnaryOperator} function
to an initial element {@code ... | java | @NotNull
public static DoubleStream iterate(
final double seed,
@NotNull final DoublePredicate predicate,
@NotNull final DoubleUnaryOperator op) {
Objects.requireNonNull(predicate);
return iterate(seed, op).takeWhile(predicate);
} | [
"@",
"NotNull",
"public",
"static",
"DoubleStream",
"iterate",
"(",
"final",
"double",
"seed",
",",
"@",
"NotNull",
"final",
"DoublePredicate",
"predicate",
",",
"@",
"NotNull",
"final",
"DoubleUnaryOperator",
"op",
")",
"{",
"Objects",
".",
"requireNonNull",
"(... | Creates an {@code DoubleStream} by iterative application {@code DoubleUnaryOperator} function
to an initial element {@code seed}, conditioned on satisfying the supplied predicate.
<p>Example:
<pre>
seed: 0.0
predicate: (a) -> a < 0.2
f: (a) -> a + 0.05
result: [0.0, 0.05, 0.1, 0.15]
</pre>
@param seed the i... | [
"Creates",
"an",
"{",
"@code",
"DoubleStream",
"}",
"by",
"iterative",
"application",
"{",
"@code",
"DoubleUnaryOperator",
"}",
"function",
"to",
"an",
"initial",
"element",
"{",
"@code",
"seed",
"}",
"conditioned",
"on",
"satisfying",
"the",
"supplied",
"predic... | train | https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/DoubleStream.java#L151-L158 |
hibernate/hibernate-ogm | core/src/main/java/org/hibernate/ogm/massindex/impl/Helper.java | Helper.getTransactionAndMarkForJoin | public static Transaction getTransactionAndMarkForJoin(Session session, ServiceManager serviceManager) throws ClassNotFoundException,
NoSuchMethodException, IllegalAccessException, InvocationTargetException {
"""
if the transaction object is a JoinableCMTTransaction, call markForJoined()
This must be done prio... | java | public static Transaction getTransactionAndMarkForJoin(Session session, ServiceManager serviceManager) throws ClassNotFoundException,
NoSuchMethodException, IllegalAccessException, InvocationTargetException {
Transaction transaction = session.getTransaction();
doMarkforJoined( serviceManager, transaction );
re... | [
"public",
"static",
"Transaction",
"getTransactionAndMarkForJoin",
"(",
"Session",
"session",
",",
"ServiceManager",
"serviceManager",
")",
"throws",
"ClassNotFoundException",
",",
"NoSuchMethodException",
",",
"IllegalAccessException",
",",
"InvocationTargetException",
"{",
... | if the transaction object is a JoinableCMTTransaction, call markForJoined()
This must be done prior to starting the transaction
@param serviceManager | [
"if",
"the",
"transaction",
"object",
"is",
"a",
"JoinableCMTTransaction",
"call",
"markForJoined",
"()",
"This",
"must",
"be",
"done",
"prior",
"to",
"starting",
"the",
"transaction"
] | train | https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/massindex/impl/Helper.java#L27-L32 |
avianey/facebook-api-android-maven | facebook/src/main/java/com/facebook/TokenCachingStrategy.java | TokenCachingStrategy.putLastRefreshDate | public static void putLastRefreshDate(Bundle bundle, Date value) {
"""
Puts the last refresh date into a Bundle.
@param bundle
A Bundle in which the last refresh date should be stored.
@param value
The Date representing the last refresh date, or null.
@throws NullPointerException if the passed in Bundle o... | java | public static void putLastRefreshDate(Bundle bundle, Date value) {
Validate.notNull(bundle, "bundle");
Validate.notNull(value, "value");
putDate(bundle, LAST_REFRESH_DATE_KEY, value);
} | [
"public",
"static",
"void",
"putLastRefreshDate",
"(",
"Bundle",
"bundle",
",",
"Date",
"value",
")",
"{",
"Validate",
".",
"notNull",
"(",
"bundle",
",",
"\"bundle\"",
")",
";",
"Validate",
".",
"notNull",
"(",
"value",
",",
"\"value\"",
")",
";",
"putDat... | Puts the last refresh date into a Bundle.
@param bundle
A Bundle in which the last refresh date should be stored.
@param value
The Date representing the last refresh date, or null.
@throws NullPointerException if the passed in Bundle or date value are null | [
"Puts",
"the",
"last",
"refresh",
"date",
"into",
"a",
"Bundle",
"."
] | train | https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/TokenCachingStrategy.java#L357-L361 |
katjahahn/PortEx | src/main/java/com/github/katjahahn/parser/PELoader.java | PELoader.loadSectionTable | private SectionTable loadSectionTable(PESignature pesig,
COFFFileHeader coff, RandomAccessFile raf) throws IOException {
"""
Loads the section table. Presumes a valid PE file.
@param pesig
pe signature
@param coff
coff file header
@param raf
the random access file instance
@return section tabl... | java | private SectionTable loadSectionTable(PESignature pesig,
COFFFileHeader coff, RandomAccessFile raf) throws IOException {
// offset is the start of the optional header + SizeOfOptionalHeader
long offset = pesig.getOffset() + PESignature.PE_SIG.length
+ COFFFileHeader.HEADER_SI... | [
"private",
"SectionTable",
"loadSectionTable",
"(",
"PESignature",
"pesig",
",",
"COFFFileHeader",
"coff",
",",
"RandomAccessFile",
"raf",
")",
"throws",
"IOException",
"{",
"// offset is the start of the optional header + SizeOfOptionalHeader",
"long",
"offset",
"=",
"pesig"... | Loads the section table. Presumes a valid PE file.
@param pesig
pe signature
@param coff
coff file header
@param raf
the random access file instance
@return section table
@throws IOException
if unable to read header | [
"Loads",
"the",
"section",
"table",
".",
"Presumes",
"a",
"valid",
"PE",
"file",
"."
] | train | https://github.com/katjahahn/PortEx/blob/319f08560aa58e3d5d7abe346ffdf623d6dc6990/src/main/java/com/github/katjahahn/parser/PELoader.java#L207-L227 |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/MobileProcessLauncher.java | MobileProcessLauncher.getProgramArguments | @Override
String[] getProgramArguments() throws IOException {
"""
Get program arguments to pass
@return the program arguments to pass represented as an array of {@link String}
@throws IOException
"""
LOGGER.entering();
List<String> args = new LinkedList<>(Arrays.asList(super.getProgramA... | java | @Override
String[] getProgramArguments() throws IOException {
LOGGER.entering();
List<String> args = new LinkedList<>(Arrays.asList(super.getProgramArguments()));
// add the defaults which we don't already have a value for
for (Entry<String, JsonElement> entry : defaultArgs.entrySet... | [
"@",
"Override",
"String",
"[",
"]",
"getProgramArguments",
"(",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"List",
"<",
"String",
">",
"args",
"=",
"new",
"LinkedList",
"<>",
"(",
"Arrays",
".",
"asList",
"(",
"super",
... | Get program arguments to pass
@return the program arguments to pass represented as an array of {@link String}
@throws IOException | [
"Get",
"program",
"arguments",
"to",
"pass"
] | train | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/MobileProcessLauncher.java#L60-L81 |
SeaCloudsEU/SeaCloudsPlatform | sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/ViolationRest.java | ViolationRest.getViolationByUuid | @GET
@Path(" {
"""
Returns the information of an specific violation given an uuid If the
violation it is not in the database, it returns 404 with empty payload
<pre>
GET /violations/{violation_uuid}
Request:
GET /violation HTTP/1.1
Accept: application/xml
Response:
HTTP/1.1 200 OK
Content-type: ... | java | @GET
@Path("{uuid}")
@Produces(MediaType.APPLICATION_XML)
public Response getViolationByUuid(@PathParam("uuid") UUID violationUuid) {
logger.debug("StartOf getViolationByUuid - REQUEST for /violations/" + violationUuid);
String serializedViolations = null;
ViolationHelper violationRe... | [
"@",
"GET",
"@",
"Path",
"(",
"\"{uuid}\"",
")",
"@",
"Produces",
"(",
"MediaType",
".",
"APPLICATION_XML",
")",
"public",
"Response",
"getViolationByUuid",
"(",
"@",
"PathParam",
"(",
"\"uuid\"",
")",
"UUID",
"violationUuid",
")",
"{",
"logger",
".",
"debug... | Returns the information of an specific violation given an uuid If the
violation it is not in the database, it returns 404 with empty payload
<pre>
GET /violations/{violation_uuid}
Request:
GET /violation HTTP/1.1
Accept: application/xml
Response:
HTTP/1.1 200 OK
Content-type: application/xml
{@code
<?xml version="1... | [
"Returns",
"the",
"information",
"of",
"an",
"specific",
"violation",
"given",
"an",
"uuid",
"If",
"the",
"violation",
"it",
"is",
"not",
"in",
"the",
"database",
"it",
"returns",
"404",
"with",
"empty",
"payload"
] | train | https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/sla/sla-core/sla-service/src/main/java/eu/atos/sla/service/rest/ViolationRest.java#L123-L140 |
phax/ph-commons | ph-jaxb/src/main/java/com/helger/jaxb/JAXBMarshallerHelper.java | JAXBMarshallerHelper.setSchemaLocation | public static void setSchemaLocation (@Nonnull final Marshaller aMarshaller, @Nullable final String sSchemaLocation) {
"""
Set the standard property for setting the namespace schema location
@param aMarshaller
The marshaller to set the property. May not be <code>null</code>.
@param sSchemaLocation
the value ... | java | public static void setSchemaLocation (@Nonnull final Marshaller aMarshaller, @Nullable final String sSchemaLocation)
{
_setProperty (aMarshaller, Marshaller.JAXB_SCHEMA_LOCATION, sSchemaLocation);
} | [
"public",
"static",
"void",
"setSchemaLocation",
"(",
"@",
"Nonnull",
"final",
"Marshaller",
"aMarshaller",
",",
"@",
"Nullable",
"final",
"String",
"sSchemaLocation",
")",
"{",
"_setProperty",
"(",
"aMarshaller",
",",
"Marshaller",
".",
"JAXB_SCHEMA_LOCATION",
",",... | Set the standard property for setting the namespace schema location
@param aMarshaller
The marshaller to set the property. May not be <code>null</code>.
@param sSchemaLocation
the value to be set | [
"Set",
"the",
"standard",
"property",
"for",
"setting",
"the",
"namespace",
"schema",
"location"
] | train | https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-jaxb/src/main/java/com/helger/jaxb/JAXBMarshallerHelper.java#L148-L151 |
line/armeria | core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedElementNameUtil.java | AnnotatedElementNameUtil.findName | static String findName(Header header, Object nameRetrievalTarget) {
"""
Returns the value of the {@link Header} annotation which is specified on the {@code element} if
the value is not blank. If the value is blank, it returns the name of the specified
{@code nameRetrievalTarget} object which is an instance of {@... | java | static String findName(Header header, Object nameRetrievalTarget) {
requireNonNull(nameRetrievalTarget, "nameRetrievalTarget");
final String value = header.value();
if (DefaultValues.isSpecified(value)) {
checkArgument(!value.isEmpty(), "value is empty");
return value;
... | [
"static",
"String",
"findName",
"(",
"Header",
"header",
",",
"Object",
"nameRetrievalTarget",
")",
"{",
"requireNonNull",
"(",
"nameRetrievalTarget",
",",
"\"nameRetrievalTarget\"",
")",
";",
"final",
"String",
"value",
"=",
"header",
".",
"value",
"(",
")",
";... | Returns the value of the {@link Header} annotation which is specified on the {@code element} if
the value is not blank. If the value is blank, it returns the name of the specified
{@code nameRetrievalTarget} object which is an instance of {@link Parameter} or {@link Field}.
<p>Note that the name of the specified {@cod... | [
"Returns",
"the",
"value",
"of",
"the",
"{",
"@link",
"Header",
"}",
"annotation",
"which",
"is",
"specified",
"on",
"the",
"{",
"@code",
"element",
"}",
"if",
"the",
"value",
"is",
"not",
"blank",
".",
"If",
"the",
"value",
"is",
"blank",
"it",
"retur... | train | https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/internal/annotation/AnnotatedElementNameUtil.java#L60-L69 |
GoogleCloudPlatform/appengine-plugins-core | src/main/java/com/google/cloud/tools/appengine/AppEngineDescriptor.java | AppEngineDescriptor.getServiceId | @Nullable
public String getServiceId() throws AppEngineException {
"""
Returns service ID from the <service> element of the appengine-web.xml, or null if it is
missing. Will also look at module ID.
"""
String serviceId = getText(getNode(document, "appengine-web-app", "service"));
if (serviceId... | java | @Nullable
public String getServiceId() throws AppEngineException {
String serviceId = getText(getNode(document, "appengine-web-app", "service"));
if (serviceId != null) {
return serviceId;
}
return getText(getNode(document, "appengine-web-app", "module"));
} | [
"@",
"Nullable",
"public",
"String",
"getServiceId",
"(",
")",
"throws",
"AppEngineException",
"{",
"String",
"serviceId",
"=",
"getText",
"(",
"getNode",
"(",
"document",
",",
"\"appengine-web-app\"",
",",
"\"service\"",
")",
")",
";",
"if",
"(",
"serviceId",
... | Returns service ID from the <service> element of the appengine-web.xml, or null if it is
missing. Will also look at module ID. | [
"Returns",
"service",
"ID",
"from",
"the",
"<",
";",
"service>",
";",
"element",
"of",
"the",
"appengine",
"-",
"web",
".",
"xml",
"or",
"null",
"if",
"it",
"is",
"missing",
".",
"Will",
"also",
"look",
"at",
"module",
"ID",
"."
] | train | https://github.com/GoogleCloudPlatform/appengine-plugins-core/blob/d22e9fa1103522409ab6fdfbf68c4a5a0bc5b97d/src/main/java/com/google/cloud/tools/appengine/AppEngineDescriptor.java#L98-L105 |
windup/windup | reporting/api/src/main/java/org/jboss/windup/reporting/category/IssueCategoryRegistry.java | IssueCategoryRegistry.loadFromGraph | @SuppressWarnings("unchecked")
public static IssueCategoryModel loadFromGraph(FramedGraph framedGraph, String issueCategoryID) {
"""
Loads the related graph vertex for the given {@link IssueCategory#getCategoryID()}.
"""
Iterable<Vertex> vertices = (Iterable<Vertex>)framedGraph.traverse(g -> framed... | java | @SuppressWarnings("unchecked")
public static IssueCategoryModel loadFromGraph(FramedGraph framedGraph, String issueCategoryID)
{
Iterable<Vertex> vertices = (Iterable<Vertex>)framedGraph.traverse(g -> framedGraph.getTypeResolver().hasType(g.V(), IssueCategoryModel.class))
.traverse(g -> ... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"static",
"IssueCategoryModel",
"loadFromGraph",
"(",
"FramedGraph",
"framedGraph",
",",
"String",
"issueCategoryID",
")",
"{",
"Iterable",
"<",
"Vertex",
">",
"vertices",
"=",
"(",
"Iterable",
"<",
"Ve... | Loads the related graph vertex for the given {@link IssueCategory#getCategoryID()}. | [
"Loads",
"the",
"related",
"graph",
"vertex",
"for",
"the",
"given",
"{"
] | train | https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/category/IssueCategoryRegistry.java#L89-L104 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ResourceBundle.java | ResourceBundle.getBundle | public static ResourceBundle getBundle(String bundleName) throws MissingResourceException {
"""
Finds the named resource bundle for the default {@code Locale} and the caller's
{@code ClassLoader}.
@param bundleName
the name of the {@code ResourceBundle}.
@return the requested {@code ResourceBundle}.
@throws... | java | public static ResourceBundle getBundle(String bundleName) throws MissingResourceException {
ClassLoader classLoader = ClassLoader.getSystemClassLoader();
if (classLoader == null) {
classLoader = getLoader();
}
return getBundle(bundleName, Locale.getDefault(), classLoader);
... | [
"public",
"static",
"ResourceBundle",
"getBundle",
"(",
"String",
"bundleName",
")",
"throws",
"MissingResourceException",
"{",
"ClassLoader",
"classLoader",
"=",
"ClassLoader",
".",
"getSystemClassLoader",
"(",
")",
";",
"if",
"(",
"classLoader",
"==",
"null",
")",... | Finds the named resource bundle for the default {@code Locale} and the caller's
{@code ClassLoader}.
@param bundleName
the name of the {@code ResourceBundle}.
@return the requested {@code ResourceBundle}.
@throws MissingResourceException
if the {@code ResourceBundle} cannot be found. | [
"Finds",
"the",
"named",
"resource",
"bundle",
"for",
"the",
"default",
"{",
"@code",
"Locale",
"}",
"and",
"the",
"caller",
"s",
"{",
"@code",
"ClassLoader",
"}",
"."
] | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ResourceBundle.java#L134-L140 |
jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/DWsdlAccessScreen.java | DWsdlAccessScreen.sendData | public void sendData(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
"""
Process an HTML get or post.
You must override this method.
@param req The servlet request.
@param res The servlet response object.
@exception ServletException From inherited class.
@exception IOEx... | java | public void sendData(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
{
res.setContentType("text/xml");
PrintWriter out = res.getWriter();
this.printXML(req, out);
out.flush();
} | [
"public",
"void",
"sendData",
"(",
"HttpServletRequest",
"req",
",",
"HttpServletResponse",
"res",
")",
"throws",
"ServletException",
",",
"IOException",
"{",
"res",
".",
"setContentType",
"(",
"\"text/xml\"",
")",
";",
"PrintWriter",
"out",
"=",
"res",
".",
"ge... | Process an HTML get or post.
You must override this method.
@param req The servlet request.
@param res The servlet response object.
@exception ServletException From inherited class.
@exception IOException From inherited class. | [
"Process",
"an",
"HTML",
"get",
"or",
"post",
".",
"You",
"must",
"override",
"this",
"method",
"."
] | train | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/DWsdlAccessScreen.java#L67-L73 |
BBN-E/bue-common-open | common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java | Parameters.getIntegerList | public List<Integer> getIntegerList(final String param) {
"""
Gets a parameter whose value is a (possibly empty) list of integers.
"""
return getList(param, new StringToInteger(),
new AlwaysValid<Integer>(), "integer");
} | java | public List<Integer> getIntegerList(final String param) {
return getList(param, new StringToInteger(),
new AlwaysValid<Integer>(), "integer");
} | [
"public",
"List",
"<",
"Integer",
">",
"getIntegerList",
"(",
"final",
"String",
"param",
")",
"{",
"return",
"getList",
"(",
"param",
",",
"new",
"StringToInteger",
"(",
")",
",",
"new",
"AlwaysValid",
"<",
"Integer",
">",
"(",
")",
",",
"\"integer\"",
... | Gets a parameter whose value is a (possibly empty) list of integers. | [
"Gets",
"a",
"parameter",
"whose",
"value",
"is",
"a",
"(",
"possibly",
"empty",
")",
"list",
"of",
"integers",
"."
] | train | https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/parameters/Parameters.java#L604-L607 |
spring-projects/spring-android | spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java | BridgeMethodResolver.isBridgeMethodFor | static boolean isBridgeMethodFor(Method bridgeMethod, Method candidateMethod, Map<TypeVariable, Type> typeVariableMap) {
"""
Determines whether or not the bridge {@link Method} is the bridge for the
supplied candidate {@link Method}.
"""
if (isResolvedTypeMatch(candidateMethod, bridgeMethod, typeVariableMap... | java | static boolean isBridgeMethodFor(Method bridgeMethod, Method candidateMethod, Map<TypeVariable, Type> typeVariableMap) {
if (isResolvedTypeMatch(candidateMethod, bridgeMethod, typeVariableMap)) {
return true;
}
Method method = findGenericDeclaration(bridgeMethod);
return (method != null && isResolvedTypeMatc... | [
"static",
"boolean",
"isBridgeMethodFor",
"(",
"Method",
"bridgeMethod",
",",
"Method",
"candidateMethod",
",",
"Map",
"<",
"TypeVariable",
",",
"Type",
">",
"typeVariableMap",
")",
"{",
"if",
"(",
"isResolvedTypeMatch",
"(",
"candidateMethod",
",",
"bridgeMethod",
... | Determines whether or not the bridge {@link Method} is the bridge for the
supplied candidate {@link Method}. | [
"Determines",
"whether",
"or",
"not",
"the",
"bridge",
"{"
] | train | https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/core/BridgeMethodResolver.java#L131-L137 |
aNNiMON/Lightweight-Stream-API | stream/src/main/java/com/annimon/stream/Collectors.java | Collectors.joining | @NotNull
public static Collector<CharSequence, ?, String> joining(@NotNull CharSequence delimiter) {
"""
Returns a {@code Collector} that concatenates input elements into new string.
@param delimiter the delimiter between each element
@return a {@code Collector}
"""
return joining(delimiter, "... | java | @NotNull
public static Collector<CharSequence, ?, String> joining(@NotNull CharSequence delimiter) {
return joining(delimiter, "", "");
} | [
"@",
"NotNull",
"public",
"static",
"Collector",
"<",
"CharSequence",
",",
"?",
",",
"String",
">",
"joining",
"(",
"@",
"NotNull",
"CharSequence",
"delimiter",
")",
"{",
"return",
"joining",
"(",
"delimiter",
",",
"\"\"",
",",
"\"\"",
")",
";",
"}"
] | Returns a {@code Collector} that concatenates input elements into new string.
@param delimiter the delimiter between each element
@return a {@code Collector} | [
"Returns",
"a",
"{",
"@code",
"Collector",
"}",
"that",
"concatenates",
"input",
"elements",
"into",
"new",
"string",
"."
] | train | https://github.com/aNNiMON/Lightweight-Stream-API/blob/f29fd57208c20252a4549b084d55ed082c3e58f0/stream/src/main/java/com/annimon/stream/Collectors.java#L385-L388 |
Azure/azure-sdk-for-java | hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java | ExtensionsInner.beginEnableMonitoringAsync | public Observable<Void> beginEnableMonitoringAsync(String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters) {
"""
Enables the Operations Management Suite (OMS) on the HDInsight cluster.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster... | java | public Observable<Void> beginEnableMonitoringAsync(String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters) {
return beginEnableMonitoringWithServiceResponseAsync(resourceGroupName, clusterName, parameters).map(new Func1<ServiceResponse<Void>, Void>() {
@Override
... | [
"public",
"Observable",
"<",
"Void",
">",
"beginEnableMonitoringAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"clusterName",
",",
"ClusterMonitoringRequest",
"parameters",
")",
"{",
"return",
"beginEnableMonitoringWithServiceResponseAsync",
"(",
"resourceGroupNam... | Enables the Operations Management Suite (OMS) on the HDInsight cluster.
@param resourceGroupName The name of the resource group.
@param clusterName The name of the cluster.
@param parameters The Operations Management Suite (OMS) workspace parameters.
@throws IllegalArgumentException thrown if parameters fail the valid... | [
"Enables",
"the",
"Operations",
"Management",
"Suite",
"(",
"OMS",
")",
"on",
"the",
"HDInsight",
"cluster",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java#L214-L221 |
codeprimate-software/cp-elements | src/main/java/org/cp/elements/lang/Assert.java | Assert.hasText | public static void hasText(String value, String message, Object... arguments) {
"""
Assert that the given {@link String} is not blank.
The assertion holds if and only if the {@link String} is not {@literal null}, {@link String#isEmpty() empty}
or contains only {@link Character#isWhitespace(char) whitespace cha... | java | public static void hasText(String value, String message, Object... arguments) {
hasText(value, new IllegalArgumentException(format(message, arguments)));
} | [
"public",
"static",
"void",
"hasText",
"(",
"String",
"value",
",",
"String",
"message",
",",
"Object",
"...",
"arguments",
")",
"{",
"hasText",
"(",
"value",
",",
"new",
"IllegalArgumentException",
"(",
"format",
"(",
"message",
",",
"arguments",
")",
")",
... | Assert that the given {@link String} is not blank.
The assertion holds if and only if the {@link String} is not {@literal null}, {@link String#isEmpty() empty}
or contains only {@link Character#isWhitespace(char) whitespace characters}.
@param value {@link String} being evaluated.
@param message {@link String} contai... | [
"Assert",
"that",
"the",
"given",
"{",
"@link",
"String",
"}",
"is",
"not",
"blank",
"."
] | train | https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L365-L367 |
JakeWharton/NineOldAndroids | library/src/com/nineoldandroids/animation/ValueAnimator.java | ValueAnimator.ofObject | public static ValueAnimator ofObject(TypeEvaluator evaluator, Object... values) {
"""
Constructs and returns a ValueAnimator that animates between Object values. A single
value implies that that value is the one being animated to. However, this is not typically
useful in a ValueAnimator object because there is n... | java | public static ValueAnimator ofObject(TypeEvaluator evaluator, Object... values) {
ValueAnimator anim = new ValueAnimator();
anim.setObjectValues(values);
anim.setEvaluator(evaluator);
return anim;
} | [
"public",
"static",
"ValueAnimator",
"ofObject",
"(",
"TypeEvaluator",
"evaluator",
",",
"Object",
"...",
"values",
")",
"{",
"ValueAnimator",
"anim",
"=",
"new",
"ValueAnimator",
"(",
")",
";",
"anim",
".",
"setObjectValues",
"(",
"values",
")",
";",
"anim",
... | Constructs and returns a ValueAnimator that animates between Object values. A single
value implies that that value is the one being animated to. However, this is not typically
useful in a ValueAnimator object because there is no way for the object to determine the
starting value for the animation (unlike ObjectAnimator... | [
"Constructs",
"and",
"returns",
"a",
"ValueAnimator",
"that",
"animates",
"between",
"Object",
"values",
".",
"A",
"single",
"value",
"implies",
"that",
"that",
"value",
"is",
"the",
"one",
"being",
"animated",
"to",
".",
"However",
"this",
"is",
"not",
"typ... | train | https://github.com/JakeWharton/NineOldAndroids/blob/d582f0ec8e79013e9fa96c07986160b52e662e63/library/src/com/nineoldandroids/animation/ValueAnimator.java#L351-L356 |
SeleniumJT/seleniumjt-core | src/main/java/com/jt/selenium/SeleniumJT.java | SeleniumJT.typeTinyMceEditor | @LogExecTime
public void typeTinyMceEditor(String locator, String value) {
"""
Custom method for typing text into a tinyMce which is formed of an embedded iframe html page which we need to target and type into. After we have typed
our value we then need to exit the selected iFrame and return to the main page.
... | java | @LogExecTime
public void typeTinyMceEditor(String locator, String value)
{
jtTinyMce.typeTinyMceEditor(locator, value);
} | [
"@",
"LogExecTime",
"public",
"void",
"typeTinyMceEditor",
"(",
"String",
"locator",
",",
"String",
"value",
")",
"{",
"jtTinyMce",
".",
"typeTinyMceEditor",
"(",
"locator",
",",
"value",
")",
";",
"}"
] | Custom method for typing text into a tinyMce which is formed of an embedded iframe html page which we need to target and type into. After we have typed
our value we then need to exit the selected iFrame and return to the main page.
@param locator
@param value | [
"Custom",
"method",
"for",
"typing",
"text",
"into",
"a",
"tinyMce",
"which",
"is",
"formed",
"of",
"an",
"embedded",
"iframe",
"html",
"page",
"which",
"we",
"need",
"to",
"target",
"and",
"type",
"into",
".",
"After",
"we",
"have",
"typed",
"our",
"val... | train | https://github.com/SeleniumJT/seleniumjt-core/blob/8e972f69adc4846a3f1d7b8ca9c3f8d953a2d0f3/src/main/java/com/jt/selenium/SeleniumJT.java#L342-L346 |
cdk/cdk | base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java | StereoTool.getNormal | public static Vector3d getNormal(Point3d ptA, Point3d ptB, Point3d ptC) {
"""
<p>Given three points (A, B, C), makes the vectors A-B and A-C, and makes
the cross product of these two vectors; this has the effect of making a
third vector at right angles to AB and AC.</p>
<p>NOTE : the returned normal is normal... | java | public static Vector3d getNormal(Point3d ptA, Point3d ptB, Point3d ptC) {
Vector3d vectorAB = new Vector3d();
Vector3d vectorAC = new Vector3d();
Vector3d normal = new Vector3d();
StereoTool.getRawNormal(ptA, ptB, ptC, normal, vectorAB, vectorAC);
normal.normalize();
retu... | [
"public",
"static",
"Vector3d",
"getNormal",
"(",
"Point3d",
"ptA",
",",
"Point3d",
"ptB",
",",
"Point3d",
"ptC",
")",
"{",
"Vector3d",
"vectorAB",
"=",
"new",
"Vector3d",
"(",
")",
";",
"Vector3d",
"vectorAC",
"=",
"new",
"Vector3d",
"(",
")",
";",
"Vec... | <p>Given three points (A, B, C), makes the vectors A-B and A-C, and makes
the cross product of these two vectors; this has the effect of making a
third vector at right angles to AB and AC.</p>
<p>NOTE : the returned normal is normalized; that is, it has been
divided by its length.</p>
@param ptA the 'middle' point
@p... | [
"<p",
">",
"Given",
"three",
"points",
"(",
"A",
"B",
"C",
")",
"makes",
"the",
"vectors",
"A",
"-",
"B",
"and",
"A",
"-",
"C",
"and",
"makes",
"the",
"cross",
"product",
"of",
"these",
"two",
"vectors",
";",
"this",
"has",
"the",
"effect",
"of",
... | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/standard/src/main/java/org/openscience/cdk/stereo/StereoTool.java#L388-L395 |
google/j2objc | jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Period.java | Period.plusDays | public Period plusDays(long daysToAdd) {
"""
Returns a copy of this period with the specified days added.
<p>
This adds the amount to the days unit in a copy of this period.
The years and months units are unaffected.
For example, "1 year, 6 months and 3 days" plus 2 days returns "1 year, 6 months and 5 days".
... | java | public Period plusDays(long daysToAdd) {
if (daysToAdd == 0) {
return this;
}
return create(years, months, Math.toIntExact(Math.addExact(days, daysToAdd)));
} | [
"public",
"Period",
"plusDays",
"(",
"long",
"daysToAdd",
")",
"{",
"if",
"(",
"daysToAdd",
"==",
"0",
")",
"{",
"return",
"this",
";",
"}",
"return",
"create",
"(",
"years",
",",
"months",
",",
"Math",
".",
"toIntExact",
"(",
"Math",
".",
"addExact",
... | Returns a copy of this period with the specified days added.
<p>
This adds the amount to the days unit in a copy of this period.
The years and months units are unaffected.
For example, "1 year, 6 months and 3 days" plus 2 days returns "1 year, 6 months and 5 days".
<p>
This instance is immutable and unaffected by this ... | [
"Returns",
"a",
"copy",
"of",
"this",
"period",
"with",
"the",
"specified",
"days",
"added",
".",
"<p",
">",
"This",
"adds",
"the",
"amount",
"to",
"the",
"days",
"unit",
"in",
"a",
"copy",
"of",
"this",
"period",
".",
"The",
"years",
"and",
"months",
... | train | https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/Period.java#L680-L685 |
GistLabs/mechanize | src/main/java/com/gistlabs/mechanize/util/Util.java | Util.findHeader | public static Header findHeader(HttpResponse response, String headerName) {
"""
Returns the first header with the given name (case-insensitive) or null.
"""
Header[] headers = response.getHeaders(headerName);
return headers.length > 0 ? headers[0] : null;
} | java | public static Header findHeader(HttpResponse response, String headerName) {
Header[] headers = response.getHeaders(headerName);
return headers.length > 0 ? headers[0] : null;
} | [
"public",
"static",
"Header",
"findHeader",
"(",
"HttpResponse",
"response",
",",
"String",
"headerName",
")",
"{",
"Header",
"[",
"]",
"headers",
"=",
"response",
".",
"getHeaders",
"(",
"headerName",
")",
";",
"return",
"headers",
".",
"length",
">",
"0",
... | Returns the first header with the given name (case-insensitive) or null. | [
"Returns",
"the",
"first",
"header",
"with",
"the",
"given",
"name",
"(",
"case",
"-",
"insensitive",
")",
"or",
"null",
"."
] | train | https://github.com/GistLabs/mechanize/blob/32ddd0774439a4c08513c05d7ac7416a3899efed/src/main/java/com/gistlabs/mechanize/util/Util.java#L33-L36 |
opsmatters/opsmatters-core | src/main/java/com/opsmatters/core/util/DateUtilities.java | DateUtilities.getDateForHour | private static long getDateForHour(long dt, TimeZone tz, int hour, int dayoffset) {
"""
Returns the date for the given hour.
@param dt The date to be checked
@param tz The timezone associated with the date
@param hour The hour to be checked
@param dayoffset The day of the month to offset
@return The date for ... | java | private static long getDateForHour(long dt, TimeZone tz, int hour, int dayoffset)
{
Calendar c = getCalendar(tz);
c.setTimeInMillis(dt);
int dd = c.get(Calendar.DAY_OF_MONTH);
int mm = c.get(Calendar.MONTH);
int yy = c.get(Calendar.YEAR);
c.set(yy, mm, dd, hour, 0, 0)... | [
"private",
"static",
"long",
"getDateForHour",
"(",
"long",
"dt",
",",
"TimeZone",
"tz",
",",
"int",
"hour",
",",
"int",
"dayoffset",
")",
"{",
"Calendar",
"c",
"=",
"getCalendar",
"(",
"tz",
")",
";",
"c",
".",
"setTimeInMillis",
"(",
"dt",
")",
";",
... | Returns the date for the given hour.
@param dt The date to be checked
@param tz The timezone associated with the date
@param hour The hour to be checked
@param dayoffset The day of the month to offset
@return The date for the given hour | [
"Returns",
"the",
"date",
"for",
"the",
"given",
"hour",
"."
] | train | https://github.com/opsmatters/opsmatters-core/blob/c48904f7e8d029fd45357811ec38a735e261e3fd/src/main/java/com/opsmatters/core/util/DateUtilities.java#L175-L187 |
UrielCh/ovh-java-sdk | ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java | ApiOvhXdsl.serviceName_antiSpams_ip_evidences_GET | public OvhEvidencesInfo serviceName_antiSpams_ip_evidences_GET(String serviceName, String ip) throws IOException {
"""
List of evidences stored on PCS for this ip
REST: GET /xdsl/{serviceName}/antiSpams/{ip}/evidences
@param serviceName [required] The internal name of your XDSL offer
@param ip [required] IP w... | java | public OvhEvidencesInfo serviceName_antiSpams_ip_evidences_GET(String serviceName, String ip) throws IOException {
String qPath = "/xdsl/{serviceName}/antiSpams/{ip}/evidences";
StringBuilder sb = path(qPath, serviceName, ip);
String resp = exec(qPath, "GET", sb.toString(), null);
return convertTo(resp, OvhEvid... | [
"public",
"OvhEvidencesInfo",
"serviceName_antiSpams_ip_evidences_GET",
"(",
"String",
"serviceName",
",",
"String",
"ip",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/xdsl/{serviceName}/antiSpams/{ip}/evidences\"",
";",
"StringBuilder",
"sb",
"=",
"path",... | List of evidences stored on PCS for this ip
REST: GET /xdsl/{serviceName}/antiSpams/{ip}/evidences
@param serviceName [required] The internal name of your XDSL offer
@param ip [required] IP which spam | [
"List",
"of",
"evidences",
"stored",
"on",
"PCS",
"for",
"this",
"ip"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-xdsl/src/main/java/net/minidev/ovh/api/ApiOvhXdsl.java#L1534-L1539 |
k3po/k3po | driver/src/main/java/org/kaazing/k3po/driver/internal/netty/channel/Channels.java | Channels.shutdownInput | public static ChannelFuture shutdownInput(Channel channel) {
"""
Sends a {@code "shutdownInput"} request to the last
{@link ChannelDownstreamHandler} in the {@link ChannelPipeline} of
the specified {@link Channel}.
@param channel the channel to bind
@return the {@link ChannelFuture} which will be notified... | java | public static ChannelFuture shutdownInput(Channel channel) {
ChannelFuture future = future(channel);
channel.getPipeline().sendDownstream(
new DownstreamShutdownInputEvent(channel, future));
return future;
} | [
"public",
"static",
"ChannelFuture",
"shutdownInput",
"(",
"Channel",
"channel",
")",
"{",
"ChannelFuture",
"future",
"=",
"future",
"(",
"channel",
")",
";",
"channel",
".",
"getPipeline",
"(",
")",
".",
"sendDownstream",
"(",
"new",
"DownstreamShutdownInputEvent... | Sends a {@code "shutdownInput"} request to the last
{@link ChannelDownstreamHandler} in the {@link ChannelPipeline} of
the specified {@link Channel}.
@param channel the channel to bind
@return the {@link ChannelFuture} which will be notified when the
shutdownInput operation is done | [
"Sends",
"a",
"{",
"@code",
"shutdownInput",
"}",
"request",
"to",
"the",
"last",
"{",
"@link",
"ChannelDownstreamHandler",
"}",
"in",
"the",
"{",
"@link",
"ChannelPipeline",
"}",
"of",
"the",
"specified",
"{",
"@link",
"Channel",
"}",
"."
] | train | https://github.com/k3po/k3po/blob/3ca4fd31ab4a397893aa640c62ada0e485c8bbd4/driver/src/main/java/org/kaazing/k3po/driver/internal/netty/channel/Channels.java#L72-L77 |
grails/grails-core | grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java | GrailsASTUtils.addDelegateStaticMethod | public static MethodNode addDelegateStaticMethod(Expression expression, ClassNode classNode, MethodNode delegateMethod) {
"""
Adds a static method to the given class node that delegates to the given method
and resolves the object to invoke the method on from the given expression.
@param expression The expressi... | java | public static MethodNode addDelegateStaticMethod(Expression expression, ClassNode classNode, MethodNode delegateMethod) {
return addDelegateStaticMethod(expression, classNode, delegateMethod, null, null, true);
} | [
"public",
"static",
"MethodNode",
"addDelegateStaticMethod",
"(",
"Expression",
"expression",
",",
"ClassNode",
"classNode",
",",
"MethodNode",
"delegateMethod",
")",
"{",
"return",
"addDelegateStaticMethod",
"(",
"expression",
",",
"classNode",
",",
"delegateMethod",
"... | Adds a static method to the given class node that delegates to the given method
and resolves the object to invoke the method on from the given expression.
@param expression The expression
@param classNode The class node
@param delegateMethod The delegate method
@return The added method node or null if it couldn't be a... | [
"Adds",
"a",
"static",
"method",
"to",
"the",
"given",
"class",
"node",
"that",
"delegates",
"to",
"the",
"given",
"method",
"and",
"resolves",
"the",
"object",
"to",
"invoke",
"the",
"method",
"on",
"from",
"the",
"given",
"expression",
"."
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/org/grails/compiler/injection/GrailsASTUtils.java#L383-L385 |
cdk/cdk | base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java | IsotopeFactory.getIsotope | public IIsotope getIsotope(String symbol, double exactMass, double tolerance) {
"""
Get an isotope based on the element symbol and exact mass.
@param symbol the element symbol
@param exactMass the mass number
@param tolerance allowed difference from provided exact mass
@return the corresponding isotope
... | java | public IIsotope getIsotope(String symbol, double exactMass, double tolerance) {
IIsotope ret = null;
double minDiff = Double.MAX_VALUE;
int elem = Elements.ofString(symbol).number();
List<IIsotope> isotopes = this.isotopes[elem];
if (isotopes == null)
return null;
... | [
"public",
"IIsotope",
"getIsotope",
"(",
"String",
"symbol",
",",
"double",
"exactMass",
",",
"double",
"tolerance",
")",
"{",
"IIsotope",
"ret",
"=",
"null",
";",
"double",
"minDiff",
"=",
"Double",
".",
"MAX_VALUE",
";",
"int",
"elem",
"=",
"Elements",
"... | Get an isotope based on the element symbol and exact mass.
@param symbol the element symbol
@param exactMass the mass number
@param tolerance allowed difference from provided exact mass
@return the corresponding isotope | [
"Get",
"an",
"isotope",
"based",
"on",
"the",
"element",
"symbol",
"and",
"exact",
"mass",
"."
] | train | https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/base/core/src/main/java/org/openscience/cdk/config/IsotopeFactory.java#L173-L188 |
box/box-java-sdk | src/main/java/com/box/sdk/BoxFolder.java | BoxFolder.deleteMetadata | public void deleteMetadata(String templateName, String scope) {
"""
Deletes the metadata on this folder associated with a specified scope and template.
@param templateName the metadata template type name.
@param scope the scope of the template (usually "global" or "enterprise").
"""
URL url ... | java | public void deleteMetadata(String templateName, String scope) {
URL url = METADATA_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID(), scope, templateName);
BoxAPIRequest request = new BoxAPIRequest(this.getAPI(), url, "DELETE");
BoxAPIResponse response = request.send();
respons... | [
"public",
"void",
"deleteMetadata",
"(",
"String",
"templateName",
",",
"String",
"scope",
")",
"{",
"URL",
"url",
"=",
"METADATA_URL_TEMPLATE",
".",
"build",
"(",
"this",
".",
"getAPI",
"(",
")",
".",
"getBaseURL",
"(",
")",
",",
"this",
".",
"getID",
"... | Deletes the metadata on this folder associated with a specified scope and template.
@param templateName the metadata template type name.
@param scope the scope of the template (usually "global" or "enterprise"). | [
"Deletes",
"the",
"metadata",
"on",
"this",
"folder",
"associated",
"with",
"a",
"specified",
"scope",
"and",
"template",
"."
] | train | https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxFolder.java#L970-L975 |
RestComm/sip-servlets | sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java | FacebookRestClient.photos_getAlbums | public T photos_getAlbums(Integer userId, Collection<Long> albumIds)
throws FacebookException, IOException {
"""
Retrieves album metadata. Pass a user id and/or a list of album ids to specify the albums
to be retrieved (at least one must be provided)
@param userId (optional) the id of the albums' owner (... | java | public T photos_getAlbums(Integer userId, Collection<Long> albumIds)
throws FacebookException, IOException {
boolean hasUserId = null != userId && userId != 0;
boolean hasAlbumIds = null != albumIds && !albumIds.isEmpty();
assert (hasUserId || hasAlbumIds); // one of the two must be provided
if (ha... | [
"public",
"T",
"photos_getAlbums",
"(",
"Integer",
"userId",
",",
"Collection",
"<",
"Long",
">",
"albumIds",
")",
"throws",
"FacebookException",
",",
"IOException",
"{",
"boolean",
"hasUserId",
"=",
"null",
"!=",
"userId",
"&&",
"userId",
"!=",
"0",
";",
"b... | Retrieves album metadata. Pass a user id and/or a list of album ids to specify the albums
to be retrieved (at least one must be provided)
@param userId (optional) the id of the albums' owner (optional)
@param albumIds (optional) the ids of albums whose metadata is to be retrieved
@return album objects
@see <a href="... | [
"Retrieves",
"album",
"metadata",
".",
"Pass",
"a",
"user",
"id",
"and",
"/",
"or",
"a",
"list",
"of",
"album",
"ids",
"to",
"specify",
"the",
"albums",
"to",
"be",
"retrieved",
"(",
"at",
"least",
"one",
"must",
"be",
"provided",
")"
] | train | https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/sip-servlets-examples/facebook-c2c/src/main/java/com/facebook/api/FacebookRestClient.java#L1801-L1817 |
Azure/azure-sdk-for-java | keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java | KeyVaultClientBaseImpl.getDeletedStorageAccountAsync | public ServiceFuture<DeletedStorageBundle> getDeletedStorageAccountAsync(String vaultBaseUrl, String storageAccountName, final ServiceCallback<DeletedStorageBundle> serviceCallback) {
"""
Gets the specified deleted storage account.
The Get Deleted Storage Account operation returns the specified deleted storage ac... | java | public ServiceFuture<DeletedStorageBundle> getDeletedStorageAccountAsync(String vaultBaseUrl, String storageAccountName, final ServiceCallback<DeletedStorageBundle> serviceCallback) {
return ServiceFuture.fromResponse(getDeletedStorageAccountWithServiceResponseAsync(vaultBaseUrl, storageAccountName), serviceCal... | [
"public",
"ServiceFuture",
"<",
"DeletedStorageBundle",
">",
"getDeletedStorageAccountAsync",
"(",
"String",
"vaultBaseUrl",
",",
"String",
"storageAccountName",
",",
"final",
"ServiceCallback",
"<",
"DeletedStorageBundle",
">",
"serviceCallback",
")",
"{",
"return",
"Ser... | Gets the specified deleted storage account.
The Get Deleted Storage Account operation returns the specified deleted storage account along with its attributes. This operation requires the storage/get permission.
@param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
@param storageAccountName T... | [
"Gets",
"the",
"specified",
"deleted",
"storage",
"account",
".",
"The",
"Get",
"Deleted",
"Storage",
"Account",
"operation",
"returns",
"the",
"specified",
"deleted",
"storage",
"account",
"along",
"with",
"its",
"attributes",
".",
"This",
"operation",
"requires"... | 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#L9271-L9273 |
killbill/killbill | util/src/main/java/org/killbill/billing/util/entity/dao/EntitySqlDaoWrapperFactory.java | EntitySqlDaoWrapperFactory.become | public <NewSqlDao extends EntitySqlDao<NewEntityModelDao, NewEntity>,
NewEntityModelDao extends EntityModelDao<NewEntity>,
NewEntity extends Entity> NewSqlDao become(final Class<NewSqlDao> newSqlDaoClass) {
"""
Get an instance of a specified EntitySqlDao class, sharing the same database ses... | java | public <NewSqlDao extends EntitySqlDao<NewEntityModelDao, NewEntity>,
NewEntityModelDao extends EntityModelDao<NewEntity>,
NewEntity extends Entity> NewSqlDao become(final Class<NewSqlDao> newSqlDaoClass) {
final NewSqlDao newSqlDao = SqlObjectBuilder.attach(handle, newSqlDaoClass);
... | [
"public",
"<",
"NewSqlDao",
"extends",
"EntitySqlDao",
"<",
"NewEntityModelDao",
",",
"NewEntity",
">",
",",
"NewEntityModelDao",
"extends",
"EntityModelDao",
"<",
"NewEntity",
">",
",",
"NewEntity",
"extends",
"Entity",
">",
"NewSqlDao",
"become",
"(",
"final",
"... | Get an instance of a specified EntitySqlDao class, sharing the same database session as the
initial sql dao class with which this wrapper factory was created.
@param newSqlDaoClass the class to instantiate
@param <NewSqlDao> EntitySqlDao type to create
@return instance of NewSqlDao | [
"Get",
"an",
"instance",
"of",
"a",
"specified",
"EntitySqlDao",
"class",
"sharing",
"the",
"same",
"database",
"session",
"as",
"the",
"initial",
"sql",
"dao",
"class",
"with",
"which",
"this",
"wrapper",
"factory",
"was",
"created",
"."
] | train | https://github.com/killbill/killbill/blob/6457b485fb32a182c76197a83f428123331f1380/util/src/main/java/org/killbill/billing/util/entity/dao/EntitySqlDaoWrapperFactory.java#L59-L64 |
JOML-CI/JOML | src/org/joml/Intersectiond.java | Intersectiond.findClosestPointOnTriangle | public static int findClosestPointOnTriangle(Vector3dc v0, Vector3dc v1, Vector3dc v2, Vector3dc p, Vector3d result) {
"""
Determine the closest point on the triangle with the vertices <code>v0</code>, <code>v1</code>, <code>v2</code>
between that triangle and the given point <code>p</code> and store that point i... | java | public static int findClosestPointOnTriangle(Vector3dc v0, Vector3dc v1, Vector3dc v2, Vector3dc p, Vector3d result) {
return findClosestPointOnTriangle(v0.x(), v0.y(), v0.z(), v1.x(), v1.y(), v1.z(), v2.x(), v2.y(), v2.z(), p.x(), p.y(), p.z(), result);
} | [
"public",
"static",
"int",
"findClosestPointOnTriangle",
"(",
"Vector3dc",
"v0",
",",
"Vector3dc",
"v1",
",",
"Vector3dc",
"v2",
",",
"Vector3dc",
"p",
",",
"Vector3d",
"result",
")",
"{",
"return",
"findClosestPointOnTriangle",
"(",
"v0",
".",
"x",
"(",
")",
... | Determine the closest point on the triangle with the vertices <code>v0</code>, <code>v1</code>, <code>v2</code>
between that triangle and the given point <code>p</code> and store that point into the given <code>result</code>.
<p>
Additionally, this method returns whether the closest point is a vertex ({@link #POINT_ON_... | [
"Determine",
"the",
"closest",
"point",
"on",
"the",
"triangle",
"with",
"the",
"vertices",
"<code",
">",
"v0<",
"/",
"code",
">",
"<code",
">",
"v1<",
"/",
"code",
">",
"<code",
">",
"v2<",
"/",
"code",
">",
"between",
"that",
"triangle",
"and",
"the"... | train | https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Intersectiond.java#L1668-L1670 |
xmlet/XsdAsmFaster | src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java | XsdAsmUtils.writeClassToFile | static void writeClassToFile(String className, ClassWriter classWriter, String apiName) {
"""
Writes a given class to a .class file.
@param className The class name, needed to name the file.
@param classWriter The classWriter, which contains all the class information.
"""
classWriter.visitEnd();
... | java | static void writeClassToFile(String className, ClassWriter classWriter, String apiName){
classWriter.visitEnd();
byte[] constructedClass = classWriter.toByteArray();
try (FileOutputStream os = new FileOutputStream(new File(getFinalPathPart(className, apiName)))){
os.write(construct... | [
"static",
"void",
"writeClassToFile",
"(",
"String",
"className",
",",
"ClassWriter",
"classWriter",
",",
"String",
"apiName",
")",
"{",
"classWriter",
".",
"visitEnd",
"(",
")",
";",
"byte",
"[",
"]",
"constructedClass",
"=",
"classWriter",
".",
"toByteArray",
... | Writes a given class to a .class file.
@param className The class name, needed to name the file.
@param classWriter The classWriter, which contains all the class information. | [
"Writes",
"a",
"given",
"class",
"to",
"a",
".",
"class",
"file",
"."
] | train | https://github.com/xmlet/XsdAsmFaster/blob/ccb78f9dd4b957ad5ac1ca349eaf24338c421e94/src/main/java/org/xmlet/xsdasmfaster/classes/XsdAsmUtils.java#L223-L233 |
finmath/finmath-lib | src/main/java/net/finmath/functions/LinearAlgebra.java | LinearAlgebra.solveLinearEquationLeastSquare | public static double[][] solveLinearEquationLeastSquare(double[][] matrix, double[][] rhs) {
"""
Find a solution of the linear equation A X = B in the least square sense where
<ul>
<li>A is an n x m - matrix given as double[n][m]</li>
<li>B is an m x k - matrix given as double[m][k],</li>
<li>X is an n x k - m... | java | public static double[][] solveLinearEquationLeastSquare(double[][] matrix, double[][] rhs) {
// We use the linear algebra package apache commons math
DecompositionSolver solver = new SingularValueDecomposition(new Array2DRowRealMatrix(matrix, false)).getSolver();
return solver.solve(new Array2DRowRealMatrix(rhs))... | [
"public",
"static",
"double",
"[",
"]",
"[",
"]",
"solveLinearEquationLeastSquare",
"(",
"double",
"[",
"]",
"[",
"]",
"matrix",
",",
"double",
"[",
"]",
"[",
"]",
"rhs",
")",
"{",
"// We use the linear algebra package apache commons math",
"DecompositionSolver",
... | Find a solution of the linear equation A X = B in the least square sense where
<ul>
<li>A is an n x m - matrix given as double[n][m]</li>
<li>B is an m x k - matrix given as double[m][k],</li>
<li>X is an n x k - matrix given as double[n][k],</li>
</ul>
@param matrix The matrix A (left hand side of the linear equation... | [
"Find",
"a",
"solution",
"of",
"the",
"linear",
"equation",
"A",
"X",
"=",
"B",
"in",
"the",
"least",
"square",
"sense",
"where",
"<ul",
">",
"<li",
">",
"A",
"is",
"an",
"n",
"x",
"m",
"-",
"matrix",
"given",
"as",
"double",
"[",
"n",
"]",
"[",
... | train | https://github.com/finmath/finmath-lib/blob/a3c067d52dd33feb97d851df6cab130e4116759f/src/main/java/net/finmath/functions/LinearAlgebra.java#L339-L343 |
lessthanoptimal/ejml | main/ejml-simple/src/org/ejml/simple/SimpleBase.java | SimpleBase.setColumn | public void setColumn( int column , int startRow , double ...values ) {
"""
<p>
Assigns consecutive elements inside a column to the provided array.<br>
<br>
A(offset:(offset + values.length),column) = values
</p>
@param column The column that the array is to be written to.
@param startRow The initial colum... | java | public void setColumn( int column , int startRow , double ...values ) {
ops.setColumn(mat,column,startRow,values);
} | [
"public",
"void",
"setColumn",
"(",
"int",
"column",
",",
"int",
"startRow",
",",
"double",
"...",
"values",
")",
"{",
"ops",
".",
"setColumn",
"(",
"mat",
",",
"column",
",",
"startRow",
",",
"values",
")",
";",
"}"
] | <p>
Assigns consecutive elements inside a column to the provided array.<br>
<br>
A(offset:(offset + values.length),column) = values
</p>
@param column The column that the array is to be written to.
@param startRow The initial column that the array is written to.
@param values Values which are to be written to the row ... | [
"<p",
">",
"Assigns",
"consecutive",
"elements",
"inside",
"a",
"column",
"to",
"the",
"provided",
"array",
".",
"<br",
">",
"<br",
">",
"A",
"(",
"offset",
":",
"(",
"offset",
"+",
"values",
".",
"length",
")",
"column",
")",
"=",
"values",
"<",
"/"... | train | https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-simple/src/org/ejml/simple/SimpleBase.java#L676-L678 |
wildfly/wildfly-core | controller/src/main/java/org/jboss/as/controller/registry/NotificationHandlerNodeRegistry.java | NotificationHandlerNodeRegistry.unregisterEntry | void unregisterEntry(ListIterator<PathElement> iterator, ConcreteNotificationHandlerRegistration.NotificationHandlerEntry entry) {
"""
Unregister the entry from here (if the registry is the leaf node) or continue to traverse the tree
"""
if (!iterator.hasNext()) {
// leaf node, unregister t... | java | void unregisterEntry(ListIterator<PathElement> iterator, ConcreteNotificationHandlerRegistration.NotificationHandlerEntry entry) {
if (!iterator.hasNext()) {
// leaf node, unregister the entry here
entries.remove(entry);
return;
}
PathElement element = iterat... | [
"void",
"unregisterEntry",
"(",
"ListIterator",
"<",
"PathElement",
">",
"iterator",
",",
"ConcreteNotificationHandlerRegistration",
".",
"NotificationHandlerEntry",
"entry",
")",
"{",
"if",
"(",
"!",
"iterator",
".",
"hasNext",
"(",
")",
")",
"{",
"// leaf node, un... | Unregister the entry from here (if the registry is the leaf node) or continue to traverse the tree | [
"Unregister",
"the",
"entry",
"from",
"here",
"(",
"if",
"the",
"registry",
"is",
"the",
"leaf",
"node",
")",
"or",
"continue",
"to",
"traverse",
"the",
"tree"
] | train | https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/controller/src/main/java/org/jboss/as/controller/registry/NotificationHandlerNodeRegistry.java#L85-L99 |
looly/hutool | hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java | QrCodeUtil.encode | public static BitMatrix encode(String content, QrConfig config) {
"""
将文本内容编码为二维码
@param content 文本内容
@param config 二维码配置,包括长、宽、边距、颜色等
@return {@link BitMatrix}
@since 4.1.2
"""
return encode(content, BarcodeFormat.QR_CODE, config);
} | java | public static BitMatrix encode(String content, QrConfig config) {
return encode(content, BarcodeFormat.QR_CODE, config);
} | [
"public",
"static",
"BitMatrix",
"encode",
"(",
"String",
"content",
",",
"QrConfig",
"config",
")",
"{",
"return",
"encode",
"(",
"content",
",",
"BarcodeFormat",
".",
"QR_CODE",
",",
"config",
")",
";",
"}"
] | 将文本内容编码为二维码
@param content 文本内容
@param config 二维码配置,包括长、宽、边距、颜色等
@return {@link BitMatrix}
@since 4.1.2 | [
"将文本内容编码为二维码"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-extra/src/main/java/cn/hutool/extra/qrcode/QrCodeUtil.java#L221-L223 |
looly/hutool | hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java | DateUtil.round | public static DateTime round(Date date, DateField dateField) {
"""
修改日期为某个时间字段四舍五入时间
@param date {@link Date}
@param dateField 时间字段
@return {@link DateTime}
@since 4.5.7
"""
return new DateTime(round(calendar(date), dateField));
} | java | public static DateTime round(Date date, DateField dateField) {
return new DateTime(round(calendar(date), dateField));
} | [
"public",
"static",
"DateTime",
"round",
"(",
"Date",
"date",
",",
"DateField",
"dateField",
")",
"{",
"return",
"new",
"DateTime",
"(",
"round",
"(",
"calendar",
"(",
"date",
")",
",",
"dateField",
")",
")",
";",
"}"
] | 修改日期为某个时间字段四舍五入时间
@param date {@link Date}
@param dateField 时间字段
@return {@link DateTime}
@since 4.5.7 | [
"修改日期为某个时间字段四舍五入时间"
] | train | https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L779-L781 |
grails/grails-core | grails-core/src/main/groovy/grails/util/GrailsClassUtils.java | GrailsClassUtils.isVisible | public static boolean isVisible(Class<?> clazz, ClassLoader classLoader) {
"""
Check whether the given class is visible in the given ClassLoader.
@param clazz the class to check (typically an interface)
@param classLoader the ClassLoader to check against (may be {@code null},
in which case this method will alwa... | java | public static boolean isVisible(Class<?> clazz, ClassLoader classLoader) {
if (classLoader == null) {
return true;
}
try {
Class<?> actualClass = classLoader.loadClass(clazz.getName());
return (clazz == actualClass);
// Else: different interface cl... | [
"public",
"static",
"boolean",
"isVisible",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"ClassLoader",
"classLoader",
")",
"{",
"if",
"(",
"classLoader",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"try",
"{",
"Class",
"<",
"?",
">",
"actualClas... | Check whether the given class is visible in the given ClassLoader.
@param clazz the class to check (typically an interface)
@param classLoader the ClassLoader to check against (may be {@code null},
in which case this method will always return {@code true}) | [
"Check",
"whether",
"the",
"given",
"class",
"is",
"visible",
"in",
"the",
"given",
"ClassLoader",
"."
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L177-L190 |
gallandarakhneorg/afc | advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/AbstractRectangularShape2ifx.java | AbstractRectangularShape2ifx.maxYProperty | @Pure
public IntegerProperty maxYProperty() {
"""
Replies the property that is the maximum y coordinate of the box.
@return the maxY property.
"""
if (this.maxY == null) {
this.maxY = new SimpleIntegerProperty(this, MathFXAttributeNames.MAXIMUM_Y) {
@Override
protected void invalidated() {
... | java | @Pure
public IntegerProperty maxYProperty() {
if (this.maxY == null) {
this.maxY = new SimpleIntegerProperty(this, MathFXAttributeNames.MAXIMUM_Y) {
@Override
protected void invalidated() {
final int currentMax = get();
final int currentMin = getMinY();
if (currentMax < currentMin) {
... | [
"@",
"Pure",
"public",
"IntegerProperty",
"maxYProperty",
"(",
")",
"{",
"if",
"(",
"this",
".",
"maxY",
"==",
"null",
")",
"{",
"this",
".",
"maxY",
"=",
"new",
"SimpleIntegerProperty",
"(",
"this",
",",
"MathFXAttributeNames",
".",
"MAXIMUM_Y",
")",
"{",... | Replies the property that is the maximum y coordinate of the box.
@return the maxY property. | [
"Replies",
"the",
"property",
"that",
"is",
"the",
"maximum",
"y",
"coordinate",
"of",
"the",
"box",
"."
] | train | https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/mathfx/src/main/java/org/arakhne/afc/math/geometry/d2/ifx/AbstractRectangularShape2ifx.java#L240-L256 |
ops4j/org.ops4j.pax.web | pax-web-runtime/src/main/java/org/ops4j/pax/web/service/internal/WhiteboardDtoService.java | WhiteboardDtoService.mapServletContext | private ServletContextDTO mapServletContext(Map.Entry<ServiceReference<ServletContext>, ServletContext> mapEntry) {
"""
/*
Maps a default context (whithout whiteboard-service) to a ServletContextDTO
"""
final ServiceReference<ServletContext> ref = mapEntry.getKey();
final ServletContext servle... | java | private ServletContextDTO mapServletContext(Map.Entry<ServiceReference<ServletContext>, ServletContext> mapEntry) {
final ServiceReference<ServletContext> ref = mapEntry.getKey();
final ServletContext servletContext = mapEntry.getValue();
ServletContextDTO dto = new ServletContextDTO();
... | [
"private",
"ServletContextDTO",
"mapServletContext",
"(",
"Map",
".",
"Entry",
"<",
"ServiceReference",
"<",
"ServletContext",
">",
",",
"ServletContext",
">",
"mapEntry",
")",
"{",
"final",
"ServiceReference",
"<",
"ServletContext",
">",
"ref",
"=",
"mapEntry",
"... | /*
Maps a default context (whithout whiteboard-service) to a ServletContextDTO | [
"/",
"*",
"Maps",
"a",
"default",
"context",
"(",
"whithout",
"whiteboard",
"-",
"service",
")",
"to",
"a",
"ServletContextDTO"
] | train | https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-runtime/src/main/java/org/ops4j/pax/web/service/internal/WhiteboardDtoService.java#L276-L295 |
lessthanoptimal/BoofCV | main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java | ColorYuv.yuvToRgb | public static void yuvToRgb( double y , double u , double v , double rgb[] ) {
"""
Conversion from YUV to RGB using same equations as Intel IPP.
"""
rgb[0] = y + 1.13983*v;
rgb[1] = y - 0.39465*u - 0.58060*v;
rgb[2] = y + 2.032*u;
} | java | public static void yuvToRgb( double y , double u , double v , double rgb[] ) {
rgb[0] = y + 1.13983*v;
rgb[1] = y - 0.39465*u - 0.58060*v;
rgb[2] = y + 2.032*u;
} | [
"public",
"static",
"void",
"yuvToRgb",
"(",
"double",
"y",
",",
"double",
"u",
",",
"double",
"v",
",",
"double",
"rgb",
"[",
"]",
")",
"{",
"rgb",
"[",
"0",
"]",
"=",
"y",
"+",
"1.13983",
"*",
"v",
";",
"rgb",
"[",
"1",
"]",
"=",
"y",
"-",
... | Conversion from YUV to RGB using same equations as Intel IPP. | [
"Conversion",
"from",
"YUV",
"to",
"RGB",
"using",
"same",
"equations",
"as",
"Intel",
"IPP",
"."
] | train | https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorYuv.java#L82-L86 |
spotbugs/spotbugs | spotbugs/src/main/java/edu/umd/cs/findbugs/ba/URLClassPath.java | URLClassPath.lookupClass | public JavaClass lookupClass(String className) throws ClassNotFoundException {
"""
Look up a class from the classpath.
@param className
name of class to look up
@return the JavaClass object for the class
@throws ClassNotFoundException
if the class couldn't be found
"""
if (classesThatCantBeFound... | java | public JavaClass lookupClass(String className) throws ClassNotFoundException {
if (classesThatCantBeFound.contains(className)) {
throw new ClassNotFoundException("Error while looking for class " + className + ": class not found");
}
String resourceName = className.replace('.', '/') +... | [
"public",
"JavaClass",
"lookupClass",
"(",
"String",
"className",
")",
"throws",
"ClassNotFoundException",
"{",
"if",
"(",
"classesThatCantBeFound",
".",
"contains",
"(",
"className",
")",
")",
"{",
"throw",
"new",
"ClassNotFoundException",
"(",
"\"Error while looking... | Look up a class from the classpath.
@param className
name of class to look up
@return the JavaClass object for the class
@throws ClassNotFoundException
if the class couldn't be found | [
"Look",
"up",
"a",
"class",
"from",
"the",
"classpath",
"."
] | train | https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/ba/URLClassPath.java#L412-L445 |
xcesco/kripton | kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/AbstractSelectCodeGenerator.java | AbstractSelectCodeGenerator.generateMethodSignature | protected void generateMethodSignature(SQLiteModelMethod method, MethodSpec.Builder methodBuilder, TypeName returnTypeName, ParameterSpec... additionalParameterSpec) {
"""
Generate method signature.
@param method
the method
@param methodBuilder
the method builder
@param returnTypeName
the return type name
... | java | protected void generateMethodSignature(SQLiteModelMethod method, MethodSpec.Builder methodBuilder, TypeName returnTypeName, ParameterSpec... additionalParameterSpec) {
boolean finalParameter = false;
if (method.hasLiveData() && returnTypeName.equals(method.liveDataReturnClass)) {
finalParameter = true;
}
//... | [
"protected",
"void",
"generateMethodSignature",
"(",
"SQLiteModelMethod",
"method",
",",
"MethodSpec",
".",
"Builder",
"methodBuilder",
",",
"TypeName",
"returnTypeName",
",",
"ParameterSpec",
"...",
"additionalParameterSpec",
")",
"{",
"boolean",
"finalParameter",
"=",
... | Generate method signature.
@param method
the method
@param methodBuilder
the method builder
@param returnTypeName
the return type name
@param additionalParameterSpec
the additional parameter spec | [
"Generate",
"method",
"signature",
"."
] | train | https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/AbstractSelectCodeGenerator.java#L724-L748 |
UrielCh/ovh-java-sdk | ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java | ApiOvhDedicatedCloud.serviceName_user_POST | public OvhTask serviceName_user_POST(String serviceName, Boolean canAddRessource, Boolean canManageRights, String email, Date expirationDate, String firstName, String lastName, String name, OvhNetworkRoleEnum networkRole, Boolean nsxRight, String password, String phoneNumber, Boolean receiveAlerts, OvhRightEnum right, ... | java | public OvhTask serviceName_user_POST(String serviceName, Boolean canAddRessource, Boolean canManageRights, String email, Date expirationDate, String firstName, String lastName, String name, OvhNetworkRoleEnum networkRole, Boolean nsxRight, String password, String phoneNumber, Boolean receiveAlerts, OvhRightEnum right, ... | [
"public",
"OvhTask",
"serviceName_user_POST",
"(",
"String",
"serviceName",
",",
"Boolean",
"canAddRessource",
",",
"Boolean",
"canManageRights",
",",
"String",
"email",
",",
"Date",
"expirationDate",
",",
"String",
"firstName",
",",
"String",
"lastName",
",",
"Stri... | Create a new User in your Private Cloud
REST: POST /dedicatedCloud/{serviceName}/user
@param phoneNumber [required] Mobile phone number of the user
@param email [required] The user email. If this field is empty, user informations will be sent to the dedicatedCloud administrator contact.
@param lastName [required] Last... | [
"Create",
"a",
"new",
"User",
"in",
"your",
"Private",
"Cloud"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L967-L988 |
apache/incubator-gobblin | gobblin-core/src/main/java/org/apache/gobblin/source/extractor/utils/Utils.java | Utils.toDateTime | public static DateTime toDateTime(String input, String format, String timezone) {
"""
Convert timestamp in a string format to joda time
@param input timestamp
@param format timestamp format
@param timezone time zone of timestamp
@return joda time
"""
String tz = StringUtils.defaultString(timezone, Conf... | java | public static DateTime toDateTime(String input, String format, String timezone) {
String tz = StringUtils.defaultString(timezone, ConfigurationKeys.DEFAULT_SOURCE_TIMEZONE);
DateTimeZone dateTimeZone = getTimeZone(tz);
DateTimeFormatter inputDtFormat = DateTimeFormat.forPattern(format).withZone(dateTimeZone... | [
"public",
"static",
"DateTime",
"toDateTime",
"(",
"String",
"input",
",",
"String",
"format",
",",
"String",
"timezone",
")",
"{",
"String",
"tz",
"=",
"StringUtils",
".",
"defaultString",
"(",
"timezone",
",",
"ConfigurationKeys",
".",
"DEFAULT_SOURCE_TIMEZONE",... | Convert timestamp in a string format to joda time
@param input timestamp
@param format timestamp format
@param timezone time zone of timestamp
@return joda time | [
"Convert",
"timestamp",
"in",
"a",
"string",
"format",
"to",
"joda",
"time"
] | train | https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/utils/Utils.java#L334-L340 |
yavijava/yavijava | src/main/java/com/vmware/vim25/mo/AlarmManager.java | AlarmManager.setAlarmStatus | public void setAlarmStatus(Alarm alarm, ManagedEntity entity, String status) throws RuntimeFault, RemoteException {
"""
Set the status of an alarm for the given managed entity. Not a public
VMware API.
@param alarm
The {@link Alarm} to set the status of.
@param entity
The {@link ManagedEntity} the alarm app... | java | public void setAlarmStatus(Alarm alarm, ManagedEntity entity, String status) throws RuntimeFault, RemoteException {
getVimService().setAlarmStatus(getMOR(), alarm.getMOR(), entity.getMOR(), status);
} | [
"public",
"void",
"setAlarmStatus",
"(",
"Alarm",
"alarm",
",",
"ManagedEntity",
"entity",
",",
"String",
"status",
")",
"throws",
"RuntimeFault",
",",
"RemoteException",
"{",
"getVimService",
"(",
")",
".",
"setAlarmStatus",
"(",
"getMOR",
"(",
")",
",",
"ala... | Set the status of an alarm for the given managed entity. Not a public
VMware API.
@param alarm
The {@link Alarm} to set the status of.
@param entity
The {@link ManagedEntity} the alarm applies to.
@param status
The string status corresponding to a
{@link ManagedEntityStatus} to set.
@throws RuntimeFault
if any unhandl... | [
"Set",
"the",
"status",
"of",
"an",
"alarm",
"for",
"the",
"given",
"managed",
"entity",
".",
"Not",
"a",
"public",
"VMware",
"API",
"."
] | train | https://github.com/yavijava/yavijava/blob/27fd2c5826115782d5eeb934f86e3e39240179cd/src/main/java/com/vmware/vim25/mo/AlarmManager.java#L95-L97 |
Azure/azure-sdk-for-java | cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java | ModelsImpl.createCustomPrebuiltEntityRoleAsync | public Observable<UUID> createCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, CreateCustomPrebuiltEntityRoleOptionalParameter createCustomPrebuiltEntityRoleOptionalParameter) {
"""
Create an entity role for an entity in the application.
@param appId The application ID.
@param version... | java | public Observable<UUID> createCustomPrebuiltEntityRoleAsync(UUID appId, String versionId, UUID entityId, CreateCustomPrebuiltEntityRoleOptionalParameter createCustomPrebuiltEntityRoleOptionalParameter) {
return createCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, createCustomPrebui... | [
"public",
"Observable",
"<",
"UUID",
">",
"createCustomPrebuiltEntityRoleAsync",
"(",
"UUID",
"appId",
",",
"String",
"versionId",
",",
"UUID",
"entityId",
",",
"CreateCustomPrebuiltEntityRoleOptionalParameter",
"createCustomPrebuiltEntityRoleOptionalParameter",
")",
"{",
"re... | Create an entity role for an entity in the application.
@param appId The application ID.
@param versionId The version ID.
@param entityId The entity model ID.
@param createCustomPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API
@throws IllegalArgument... | [
"Create",
"an",
"entity",
"role",
"for",
"an",
"entity",
"in",
"the",
"application",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L9741-L9748 |
infinispan/infinispan | commons/src/main/java/org/infinispan/commons/io/UnsignedNumeric.java | UnsignedNumeric.writeUnsignedInt | public static void writeUnsignedInt(ObjectOutput out, int i) throws IOException {
"""
Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes.
Negative numbers are not supported.
@param i int to write
"""
while ((i & ~0x7F) != 0) {
out.... | java | public static void writeUnsignedInt(ObjectOutput out, int i) throws IOException {
while ((i & ~0x7F) != 0) {
out.writeByte((byte) ((i & 0x7f) | 0x80));
i >>>= 7;
}
out.writeByte((byte) i);
} | [
"public",
"static",
"void",
"writeUnsignedInt",
"(",
"ObjectOutput",
"out",
",",
"int",
"i",
")",
"throws",
"IOException",
"{",
"while",
"(",
"(",
"i",
"&",
"~",
"0x7F",
")",
"!=",
"0",
")",
"{",
"out",
".",
"writeByte",
"(",
"(",
"byte",
")",
"(",
... | Writes an int in a variable-length format. Writes between one and five bytes. Smaller values take fewer bytes.
Negative numbers are not supported.
@param i int to write | [
"Writes",
"an",
"int",
"in",
"a",
"variable",
"-",
"length",
"format",
".",
"Writes",
"between",
"one",
"and",
"five",
"bytes",
".",
"Smaller",
"values",
"take",
"fewer",
"bytes",
".",
"Negative",
"numbers",
"are",
"not",
"supported",
"."
] | train | https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/io/UnsignedNumeric.java#L56-L62 |
OpenLiberty/open-liberty | dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2StreamProcessor.java | H2StreamProcessor.isValidH2Request | private boolean isValidH2Request(HashMap<String, String> pseudoHeaders) {
"""
Check to see if the passed headers contain values for :method, :scheme, and :path
If the CONNECT method header was found, :path and :scheme are not allowed, and :authority is required
@param HashMap<String, String> headers
@return t... | java | private boolean isValidH2Request(HashMap<String, String> pseudoHeaders) {
if (MethodValues.CONNECT.getName().equals(pseudoHeaders.get(HpackConstants.METHOD))) {
if (pseudoHeaders.get(HpackConstants.PATH) == null && pseudoHeaders.get(HpackConstants.SCHEME) == null
&& pseudoHeaders.get... | [
"private",
"boolean",
"isValidH2Request",
"(",
"HashMap",
"<",
"String",
",",
"String",
">",
"pseudoHeaders",
")",
"{",
"if",
"(",
"MethodValues",
".",
"CONNECT",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"pseudoHeaders",
".",
"get",
"(",
"HpackConstants... | Check to see if the passed headers contain values for :method, :scheme, and :path
If the CONNECT method header was found, :path and :scheme are not allowed, and :authority is required
@param HashMap<String, String> headers
@return true if :method, :scheme, and :path are found | [
"Check",
"to",
"see",
"if",
"the",
"passed",
"headers",
"contain",
"values",
"for",
":",
"method",
":",
"scheme",
"and",
":",
"path",
"If",
"the",
"CONNECT",
"method",
"header",
"was",
"found",
":",
"path",
"and",
":",
"scheme",
"are",
"not",
"allowed",
... | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/h2internal/H2StreamProcessor.java#L1504-L1518 |
DataSketches/sketches-core | src/main/java/com/yahoo/sketches/sampling/VarOptItemsSketch.java | VarOptItemsSketch.toByteArray | public byte[] toByteArray(final ArrayOfItemsSerDe<? super T> serDe) {
"""
Returns a byte array representation of this sketch. May fail for polymorphic item types.
@param serDe An instance of ArrayOfItemsSerDe
@return a byte array representation of this sketch
"""
if ((r_ == 0) && (h_ == 0)) {
// ... | java | public byte[] toByteArray(final ArrayOfItemsSerDe<? super T> serDe) {
if ((r_ == 0) && (h_ == 0)) {
// null class is ok since empty -- no need to call serDe
return toByteArray(serDe, null);
} else {
final int validIndex = (h_ == 0 ? 1 : 0);
final Class<?> clazz = data_.get(validIndex).ge... | [
"public",
"byte",
"[",
"]",
"toByteArray",
"(",
"final",
"ArrayOfItemsSerDe",
"<",
"?",
"super",
"T",
">",
"serDe",
")",
"{",
"if",
"(",
"(",
"r_",
"==",
"0",
")",
"&&",
"(",
"h_",
"==",
"0",
")",
")",
"{",
"// null class is ok since empty -- no need to ... | Returns a byte array representation of this sketch. May fail for polymorphic item types.
@param serDe An instance of ArrayOfItemsSerDe
@return a byte array representation of this sketch | [
"Returns",
"a",
"byte",
"array",
"representation",
"of",
"this",
"sketch",
".",
"May",
"fail",
"for",
"polymorphic",
"item",
"types",
"."
] | train | https://github.com/DataSketches/sketches-core/blob/900c8c9668a1e2f1d54d453e956caad54702e540/src/main/java/com/yahoo/sketches/sampling/VarOptItemsSketch.java#L524-L533 |
seancfoley/IPAddress | IPAddress/src/inet.ipaddr/inet/ipaddr/IPAddress.java | IPAddress.getMatchesSQLClause | public void getMatchesSQLClause(StringBuilder builder, String sqlExpression, IPAddressSQLTranslator translator) {
"""
Returns a clause for matching this address.
<p>
Similar to getMatchesSQLClause(StringBuilder builder, String sqlExpression) but allows you to tailor the SQL produced.
@param builder
@param sq... | java | public void getMatchesSQLClause(StringBuilder builder, String sqlExpression, IPAddressSQLTranslator translator) {
getSection().getStartsWithSQLClause(builder, sqlExpression, translator);
} | [
"public",
"void",
"getMatchesSQLClause",
"(",
"StringBuilder",
"builder",
",",
"String",
"sqlExpression",
",",
"IPAddressSQLTranslator",
"translator",
")",
"{",
"getSection",
"(",
")",
".",
"getStartsWithSQLClause",
"(",
"builder",
",",
"sqlExpression",
",",
"translat... | Returns a clause for matching this address.
<p>
Similar to getMatchesSQLClause(StringBuilder builder, String sqlExpression) but allows you to tailor the SQL produced.
@param builder
@param sqlExpression
@param translator | [
"Returns",
"a",
"clause",
"for",
"matching",
"this",
"address",
".",
"<p",
">",
"Similar",
"to",
"getMatchesSQLClause",
"(",
"StringBuilder",
"builder",
"String",
"sqlExpression",
")",
"but",
"allows",
"you",
"to",
"tailor",
"the",
"SQL",
"produced",
"."
] | train | https://github.com/seancfoley/IPAddress/blob/90493d0673511d673100c36d020dd93dd870111a/IPAddress/src/inet.ipaddr/inet/ipaddr/IPAddress.java#L1605-L1607 |
camunda/camunda-spin | dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java | DomXmlEnsure.ensureChildElement | public static void ensureChildElement(DomXmlElement parentElement, DomXmlElement childElement) {
"""
Ensures that the element is child element of the parent element.
@param parentElement the parent xml dom element
@param childElement the child element
@throws SpinXmlElementException if the element is not chil... | java | public static void ensureChildElement(DomXmlElement parentElement, DomXmlElement childElement) {
Node parent = childElement.unwrap().getParentNode();
if (parent == null || !parentElement.unwrap().isEqualNode(parent)) {
throw LOG.elementIsNotChildOfThisElement(childElement, parentElement);
}
} | [
"public",
"static",
"void",
"ensureChildElement",
"(",
"DomXmlElement",
"parentElement",
",",
"DomXmlElement",
"childElement",
")",
"{",
"Node",
"parent",
"=",
"childElement",
".",
"unwrap",
"(",
")",
".",
"getParentNode",
"(",
")",
";",
"if",
"(",
"parent",
"... | Ensures that the element is child element of the parent element.
@param parentElement the parent xml dom element
@param childElement the child element
@throws SpinXmlElementException if the element is not child of the parent element | [
"Ensures",
"that",
"the",
"element",
"is",
"child",
"element",
"of",
"the",
"parent",
"element",
"."
] | train | https://github.com/camunda/camunda-spin/blob/cfe65161eb97fd5023a945cb97c47fbfe69e9fdd/dataformat-xml-dom/src/main/java/org/camunda/spin/impl/xml/dom/util/DomXmlEnsure.java#L46-L51 |
OpenLiberty/open-liberty | dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchemaInterpreterImpl.java | JSchemaInterpreterImpl.getMessageMap | static public synchronized MessageMap getMessageMap(JSchema sfs, BigInteger code) {
"""
Method to retrieve (and possibly construct) the MessageMap for a particular
multiChoice code
"""
// This method must be synchronized since some of the work done when constructing
// a new MessageMap is not thread s... | java | static public synchronized MessageMap getMessageMap(JSchema sfs, BigInteger code) {
// This method must be synchronized since some of the work done when constructing
// a new MessageMap is not thread safe.
MessageMapTable maps = (MessageMapTable)sfs.getInterpreterCache(JMFRegistry.JMF_ENCODING_VERSION);
... | [
"static",
"public",
"synchronized",
"MessageMap",
"getMessageMap",
"(",
"JSchema",
"sfs",
",",
"BigInteger",
"code",
")",
"{",
"// This method must be synchronized since some of the work done when constructing",
"// a new MessageMap is not thread safe.",
"MessageMapTable",
"maps",
... | Method to retrieve (and possibly construct) the MessageMap for a particular
multiChoice code | [
"Method",
"to",
"retrieve",
"(",
"and",
"possibly",
"construct",
")",
"the",
"MessageMap",
"for",
"a",
"particular",
"multiChoice",
"code"
] | train | https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/jmf/impl/JSchemaInterpreterImpl.java#L114-L127 |
Azure/azure-sdk-for-java | appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java | AppServicePlansInner.getVnetGatewayAsync | public Observable<VnetGatewayInner> getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) {
"""
Get a Virtual Network gateway.
Get a Virtual Network gateway.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of the App... | java | public Observable<VnetGatewayInner> getVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName) {
return getVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).map(new Func1<ServiceResponse<VnetGatewayInner>, VnetGatewayInner>() {
@... | [
"public",
"Observable",
"<",
"VnetGatewayInner",
">",
"getVnetGatewayAsync",
"(",
"String",
"resourceGroupName",
",",
"String",
"name",
",",
"String",
"vnetName",
",",
"String",
"gatewayName",
")",
"{",
"return",
"getVnetGatewayWithServiceResponseAsync",
"(",
"resourceG... | Get a Virtual Network gateway.
Get a Virtual Network gateway.
@param resourceGroupName Name of the resource group to which the resource belongs.
@param name Name of the App Service plan.
@param vnetName Name of the Virtual Network.
@param gatewayName Name of the gateway. Only the 'primary' gateway is supported.
@throw... | [
"Get",
"a",
"Virtual",
"Network",
"gateway",
".",
"Get",
"a",
"Virtual",
"Network",
"gateway",
"."
] | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/appservice/v2016_09_01/implementation/AppServicePlansInner.java#L3205-L3212 |
Jasig/uPortal | uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java | ReferenceIndividualGroupService.findParentGroups | @Override
public Iterator findParentGroups(IGroupMember gm) throws GroupsException {
"""
Returns and caches the containing groups for the <code>IGroupMember</code>
@param gm IGroupMember
"""
log.debug("Finding containing groups for member {}", gm.getKey());
Collection groups = new ArrayL... | java | @Override
public Iterator findParentGroups(IGroupMember gm) throws GroupsException {
log.debug("Finding containing groups for member {}", gm.getKey());
Collection groups = new ArrayList(10);
IEntityGroup group = null;
for (Iterator it = getGroupStore().findParentGroups(gm); it.hasNex... | [
"@",
"Override",
"public",
"Iterator",
"findParentGroups",
"(",
"IGroupMember",
"gm",
")",
"throws",
"GroupsException",
"{",
"log",
".",
"debug",
"(",
"\"Finding containing groups for member {}\"",
",",
"gm",
".",
"getKey",
"(",
")",
")",
";",
"Collection",
"group... | Returns and caches the containing groups for the <code>IGroupMember</code>
@param gm IGroupMember | [
"Returns",
"and",
"caches",
"the",
"containing",
"groups",
"for",
"the",
"<code",
">",
"IGroupMember<",
"/",
"code",
">"
] | train | https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-groups/uPortal-groups-core/src/main/java/org/apereo/portal/groups/ReferenceIndividualGroupService.java#L173-L193 |
DDTH/ddth-kafka | src/main/java/com/github/ddth/kafka/internal/KafkaHelper.java | KafkaHelper.createKafkaProducer | public static KafkaProducer<String, byte[]> createKafkaProducer(ProducerType type,
String bootstrapServers) {
"""
Creates a new {@link KafkaProducer} instance, with default
configurations.
@param type
@param bootstrapServers
@return
"""
return createKafkaProducer(type, bootstrapServer... | java | public static KafkaProducer<String, byte[]> createKafkaProducer(ProducerType type,
String bootstrapServers) {
return createKafkaProducer(type, bootstrapServers, null);
} | [
"public",
"static",
"KafkaProducer",
"<",
"String",
",",
"byte",
"[",
"]",
">",
"createKafkaProducer",
"(",
"ProducerType",
"type",
",",
"String",
"bootstrapServers",
")",
"{",
"return",
"createKafkaProducer",
"(",
"type",
",",
"bootstrapServers",
",",
"null",
"... | Creates a new {@link KafkaProducer} instance, with default
configurations.
@param type
@param bootstrapServers
@return | [
"Creates",
"a",
"new",
"{",
"@link",
"KafkaProducer",
"}",
"instance",
"with",
"default",
"configurations",
"."
] | train | https://github.com/DDTH/ddth-kafka/blob/aaeb8536e28a109ac0b69022f0ea4bbf5696b76f/src/main/java/com/github/ddth/kafka/internal/KafkaHelper.java#L141-L144 |
docusign/docusign-java-client | src/main/java/com/docusign/esign/client/ApiClient.java | ApiClient.getAuthorizationUri | public URI getAuthorizationUri(String clientId, java.util.List<String> scopes, String redirectUri, String responseType) throws IllegalArgumentException, UriBuilderException {
"""
Helper method to configure the OAuth accessCode/implicit flow parameters
@param clientId OAuth2 client ID: Identifies the client making... | java | public URI getAuthorizationUri(String clientId, java.util.List<String> scopes, String redirectUri, String responseType) throws IllegalArgumentException, UriBuilderException {
return this.getAuthorizationUri(clientId, scopes, redirectUri, responseType, null);
} | [
"public",
"URI",
"getAuthorizationUri",
"(",
"String",
"clientId",
",",
"java",
".",
"util",
".",
"List",
"<",
"String",
">",
"scopes",
",",
"String",
"redirectUri",
",",
"String",
"responseType",
")",
"throws",
"IllegalArgumentException",
",",
"UriBuilderExceptio... | Helper method to configure the OAuth accessCode/implicit flow parameters
@param clientId OAuth2 client ID: Identifies the client making the request.
Client applications may be scoped to a limited set of system access.
@param scopes the list of requested scopes. Values include {@link OAuth#Scope_SIGNATURE}, {@link OAuth... | [
"Helper",
"method",
"to",
"configure",
"the",
"OAuth",
"accessCode",
"/",
"implicit",
"flow",
"parameters"
] | train | https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/client/ApiClient.java#L512-L514 |
UrielCh/ovh-java-sdk | ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java | ApiOvhCloud.project_serviceName_storage_containerId_DELETE | public void project_serviceName_storage_containerId_DELETE(String serviceName, String containerId) throws IOException {
"""
Delete container
REST: DELETE /cloud/project/{serviceName}/storage/{containerId}
@param containerId [required] Container id
@param serviceName [required] Service name
"""
String qP... | java | public void project_serviceName_storage_containerId_DELETE(String serviceName, String containerId) throws IOException {
String qPath = "/cloud/project/{serviceName}/storage/{containerId}";
StringBuilder sb = path(qPath, serviceName, containerId);
exec(qPath, "DELETE", sb.toString(), null);
} | [
"public",
"void",
"project_serviceName_storage_containerId_DELETE",
"(",
"String",
"serviceName",
",",
"String",
"containerId",
")",
"throws",
"IOException",
"{",
"String",
"qPath",
"=",
"\"/cloud/project/{serviceName}/storage/{containerId}\"",
";",
"StringBuilder",
"sb",
"="... | Delete container
REST: DELETE /cloud/project/{serviceName}/storage/{containerId}
@param containerId [required] Container id
@param serviceName [required] Service name | [
"Delete",
"container"
] | train | https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L606-L610 |
spotify/scio | scio-bigquery/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/PatchedBigQueryTableRowIterator.java | PatchedBigQueryTableRowIterator.fromQuery | static PatchedBigQueryTableRowIterator fromQuery(
JobConfigurationQuery queryConfig, String projectId, Bigquery client) {
"""
Constructs a {@code PatchedBigQueryTableRowIterator} that reads from the results of executing the
specified query in the specified project.
"""
checkNotNull(queryConfig, "que... | java | static PatchedBigQueryTableRowIterator fromQuery(
JobConfigurationQuery queryConfig, String projectId, Bigquery client) {
checkNotNull(queryConfig, "queryConfig");
checkNotNull(projectId, "projectId");
checkNotNull(client, "client");
return new PatchedBigQueryTableRowIterator(/* ref */null, queryC... | [
"static",
"PatchedBigQueryTableRowIterator",
"fromQuery",
"(",
"JobConfigurationQuery",
"queryConfig",
",",
"String",
"projectId",
",",
"Bigquery",
"client",
")",
"{",
"checkNotNull",
"(",
"queryConfig",
",",
"\"queryConfig\"",
")",
";",
"checkNotNull",
"(",
"projectId"... | Constructs a {@code PatchedBigQueryTableRowIterator} that reads from the results of executing the
specified query in the specified project. | [
"Constructs",
"a",
"{"
] | train | https://github.com/spotify/scio/blob/ed9a44428251b0c6834aad231b463d8eda418471/scio-bigquery/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/PatchedBigQueryTableRowIterator.java#L126-L132 |
pawelprazak/java-extended | guava/src/main/java/com/bluecatcode/common/hash/Hash.java | Hash.newHash | public static HashCode newHash(String input, HashFunction function) {
"""
Creates a UTF-8 encoded hash using the hash function
@param input string to encode
@param function hash function to use
@return the hash code
"""
return function.hashString(input, Charsets.UTF_8);
} | java | public static HashCode newHash(String input, HashFunction function) {
return function.hashString(input, Charsets.UTF_8);
} | [
"public",
"static",
"HashCode",
"newHash",
"(",
"String",
"input",
",",
"HashFunction",
"function",
")",
"{",
"return",
"function",
".",
"hashString",
"(",
"input",
",",
"Charsets",
".",
"UTF_8",
")",
";",
"}"
] | Creates a UTF-8 encoded hash using the hash function
@param input string to encode
@param function hash function to use
@return the hash code | [
"Creates",
"a",
"UTF",
"-",
"8",
"encoded",
"hash",
"using",
"the",
"hash",
"function"
] | train | https://github.com/pawelprazak/java-extended/blob/ce1a556a95cbbf7c950a03662938bc02622de69b/guava/src/main/java/com/bluecatcode/common/hash/Hash.java#L28-L30 |
krummas/DrizzleJDBC | src/main/java/org/drizzle/jdbc/DrizzleConnection.java | DrizzleConnection.createStatement | public Statement createStatement(final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability)
throws SQLException {
"""
Creates a <code>Statement</code> object that will generate <code>ResultSet</code> objects with the given type,
concurrency, and holdability. This method i... | java | public Statement createStatement(final int resultSetType, final int resultSetConcurrency, final int resultSetHoldability)
throws SQLException {
if (resultSetConcurrency != ResultSet.CONCUR_READ_ONLY) {
throw SQLExceptionMapper.getFeatureNotSupportedException("Only read-only result sets a... | [
"public",
"Statement",
"createStatement",
"(",
"final",
"int",
"resultSetType",
",",
"final",
"int",
"resultSetConcurrency",
",",
"final",
"int",
"resultSetHoldability",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"resultSetConcurrency",
"!=",
"ResultSet",
".",
"... | Creates a <code>Statement</code> object that will generate <code>ResultSet</code> objects with the given type,
concurrency, and holdability. This method is the same as the <code>createStatement</code> method above, but it
allows the default result set type, concurrency, and holdability to be overridden.
@param resultS... | [
"Creates",
"a",
"<code",
">",
"Statement<",
"/",
"code",
">",
"object",
"that",
"will",
"generate",
"<code",
">",
"ResultSet<",
"/",
"code",
">",
"objects",
"with",
"the",
"given",
"type",
"concurrency",
"and",
"holdability",
".",
"This",
"method",
"is",
"... | train | https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleConnection.java#L694-L704 |
groundupworks/wings | wings/src/main/java/com/groundupworks/wings/core/WingsService.java | WingsService.startWakefulService | public static void startWakefulService(Context context) {
"""
Starts this {@link IntentService}, ensuring the device does not sleep before the service is started or during
{@link #onHandleIntent(Intent)}.
@param context the {@link Context}.
"""
acquireWakeLock(context);
context.startService... | java | public static void startWakefulService(Context context) {
acquireWakeLock(context);
context.startService(new Intent(context, WingsService.class));
} | [
"public",
"static",
"void",
"startWakefulService",
"(",
"Context",
"context",
")",
"{",
"acquireWakeLock",
"(",
"context",
")",
";",
"context",
".",
"startService",
"(",
"new",
"Intent",
"(",
"context",
",",
"WingsService",
".",
"class",
")",
")",
";",
"}"
] | Starts this {@link IntentService}, ensuring the device does not sleep before the service is started or during
{@link #onHandleIntent(Intent)}.
@param context the {@link Context}. | [
"Starts",
"this",
"{",
"@link",
"IntentService",
"}",
"ensuring",
"the",
"device",
"does",
"not",
"sleep",
"before",
"the",
"service",
"is",
"started",
"or",
"during",
"{",
"@link",
"#onHandleIntent",
"(",
"Intent",
")",
"}",
"."
] | train | https://github.com/groundupworks/wings/blob/03d2827c30ef55f2db4e23f7500e016c7771fa39/wings/src/main/java/com/groundupworks/wings/core/WingsService.java#L259-L262 |
davidcarboni/cryptolite-java | src/main/java/com/github/davidcarboni/cryptolite/Keys.java | Keys.canUseStrongKeys | public static boolean canUseStrongKeys() {
"""
Tests whether the
"Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" is
correctly installed.
@return If strong keys can be used, true, otherwise false.
"""
try {
int maxKeyLen = Cipher.getMaxAllowedKeyLength... | java | public static boolean canUseStrongKeys() {
try {
int maxKeyLen = Cipher.getMaxAllowedKeyLength(Crypto.CIPHER_ALGORITHM);
return maxKeyLen > 128;
} catch (NoSuchAlgorithmException e) {
throw new IllegalStateException("Algorithm unavailable: " + Crypto.CIPHER_ALGOR... | [
"public",
"static",
"boolean",
"canUseStrongKeys",
"(",
")",
"{",
"try",
"{",
"int",
"maxKeyLen",
"=",
"Cipher",
".",
"getMaxAllowedKeyLength",
"(",
"Crypto",
".",
"CIPHER_ALGORITHM",
")",
";",
"return",
"maxKeyLen",
">",
"128",
";",
"}",
"catch",
"(",
"NoSu... | Tests whether the
"Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" is
correctly installed.
@return If strong keys can be used, true, otherwise false. | [
"Tests",
"whether",
"the",
"Java",
"Cryptography",
"Extension",
"(",
"JCE",
")",
"Unlimited",
"Strength",
"Jurisdiction",
"Policy",
"Files",
"is",
"correctly",
"installed",
"."
] | train | https://github.com/davidcarboni/cryptolite-java/blob/e67954181a04ffc9beb1d9abca1421195fcf9764/src/main/java/com/github/davidcarboni/cryptolite/Keys.java#L277-L284 |
monitorjbl/excel-streaming-reader | src/main/java/com/monitorjbl/xlsx/impl/StreamingSheetReader.java | StreamingSheetReader.getRow | private boolean getRow() {
"""
Read through a number of rows equal to the rowCacheSize field or until there is no more data to read
@return true if data was read
"""
try {
rowCache.clear();
while(rowCache.size() < rowCacheSize && parser.hasNext()) {
handleEvent(parser.nextEvent());
... | java | private boolean getRow() {
try {
rowCache.clear();
while(rowCache.size() < rowCacheSize && parser.hasNext()) {
handleEvent(parser.nextEvent());
}
rowCacheIterator = rowCache.iterator();
return rowCacheIterator.hasNext();
} catch(XMLStreamException e) {
throw new Parse... | [
"private",
"boolean",
"getRow",
"(",
")",
"{",
"try",
"{",
"rowCache",
".",
"clear",
"(",
")",
";",
"while",
"(",
"rowCache",
".",
"size",
"(",
")",
"<",
"rowCacheSize",
"&&",
"parser",
".",
"hasNext",
"(",
")",
")",
"{",
"handleEvent",
"(",
"parser"... | Read through a number of rows equal to the rowCacheSize field or until there is no more data to read
@return true if data was read | [
"Read",
"through",
"a",
"number",
"of",
"rows",
"equal",
"to",
"the",
"rowCacheSize",
"field",
"or",
"until",
"there",
"is",
"no",
"more",
"data",
"to",
"read"
] | train | https://github.com/monitorjbl/excel-streaming-reader/blob/4e95c9aaaecf33685a09f8c267af3a578ba5e070/src/main/java/com/monitorjbl/xlsx/impl/StreamingSheetReader.java#L66-L77 |
apache/groovy | src/main/groovy/groovy/util/FactoryBuilderSupport.java | FactoryBuilderSupport.setParent | protected void setParent(Object parent, Object child) {
"""
Strategy method to establish parent/child relationships.
@param parent the object from the parent node
@param child the object from the child node
"""
getProxyBuilder().getCurrentFactory().setParent(getProxyBuilder().getChildBuilder(), pa... | java | protected void setParent(Object parent, Object child) {
getProxyBuilder().getCurrentFactory().setParent(getProxyBuilder().getChildBuilder(), parent, child);
Factory parentFactory = getProxyBuilder().getParentFactory();
if (parentFactory != null) {
parentFactory.setChild(getProxyBuild... | [
"protected",
"void",
"setParent",
"(",
"Object",
"parent",
",",
"Object",
"child",
")",
"{",
"getProxyBuilder",
"(",
")",
".",
"getCurrentFactory",
"(",
")",
".",
"setParent",
"(",
"getProxyBuilder",
"(",
")",
".",
"getChildBuilder",
"(",
")",
",",
"parent",... | Strategy method to establish parent/child relationships.
@param parent the object from the parent node
@param child the object from the child node | [
"Strategy",
"method",
"to",
"establish",
"parent",
"/",
"child",
"relationships",
"."
] | train | https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/groovy/groovy/util/FactoryBuilderSupport.java#L1114-L1120 |
classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/PlexusClassWorldsClassRealmClassLoaderHandler.java | PlexusClassWorldsClassRealmClassLoaderHandler.findClassLoaderOrder | public static void findClassLoaderOrder(final ClassLoader classRealm, final ClassLoaderOrder classLoaderOrder) {
"""
Find the {@link ClassLoader} delegation order for a {@link ClassLoader}.
@param classRealm
the {@link ClassLoader} to find the order for.
@param classLoaderOrder
a {@link ClassLoaderOrder} obj... | java | public static void findClassLoaderOrder(final ClassLoader classRealm, final ClassLoaderOrder classLoaderOrder) {
// From ClassRealm#loadClassFromImport(String) -> getImportClassLoader(String)
final Object foreignImports = ReflectionUtils.getFieldVal(classRealm, "foreignImports", false);
if (fore... | [
"public",
"static",
"void",
"findClassLoaderOrder",
"(",
"final",
"ClassLoader",
"classRealm",
",",
"final",
"ClassLoaderOrder",
"classLoaderOrder",
")",
"{",
"// From ClassRealm#loadClassFromImport(String) -> getImportClassLoader(String)",
"final",
"Object",
"foreignImports",
"=... | Find the {@link ClassLoader} delegation order for a {@link ClassLoader}.
@param classRealm
the {@link ClassLoader} to find the order for.
@param classLoaderOrder
a {@link ClassLoaderOrder} object to update. | [
"Find",
"the",
"{",
"@link",
"ClassLoader",
"}",
"delegation",
"order",
"for",
"a",
"{",
"@link",
"ClassLoader",
"}",
"."
] | train | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/PlexusClassWorldsClassRealmClassLoaderHandler.java#L89-L125 |
Azure/azure-sdk-for-java | batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java | JobsImpl.listPreparationAndReleaseTaskStatusAsync | public Observable<Page<JobPreparationAndReleaseTaskExecutionInformation>> listPreparationAndReleaseTaskStatusAsync(final String jobId, final JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions) {
"""
Lists the execution status of the Job Preparation and Job Release task for ... | java | public Observable<Page<JobPreparationAndReleaseTaskExecutionInformation>> listPreparationAndReleaseTaskStatusAsync(final String jobId, final JobListPreparationAndReleaseTaskStatusOptions jobListPreparationAndReleaseTaskStatusOptions) {
return listPreparationAndReleaseTaskStatusWithServiceResponseAsync(jobId, jo... | [
"public",
"Observable",
"<",
"Page",
"<",
"JobPreparationAndReleaseTaskExecutionInformation",
">",
">",
"listPreparationAndReleaseTaskStatusAsync",
"(",
"final",
"String",
"jobId",
",",
"final",
"JobListPreparationAndReleaseTaskStatusOptions",
"jobListPreparationAndReleaseTaskStatusO... | Lists the execution status of the Job Preparation and Job Release task for the specified job across the compute nodes where the job has run.
This API returns the Job Preparation and Job Release task status on all compute nodes that have run the Job Preparation or Job Release task. This includes nodes which have since b... | [
"Lists",
"the",
"execution",
"status",
"of",
"the",
"Job",
"Preparation",
"and",
"Job",
"Release",
"task",
"for",
"the",
"specified",
"job",
"across",
"the",
"compute",
"nodes",
"where",
"the",
"job",
"has",
"run",
".",
"This",
"API",
"returns",
"the",
"Jo... | train | https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/JobsImpl.java#L2996-L3004 |
googleads/googleads-java-lib | extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/ApiServicesRetryStrategy.java | ApiServicesRetryStrategy.updateAccountWaitTime | private void updateAccountWaitTime(long clientCustomerId, long waitForMillis) {
"""
Update the wait time for ACCOUNT scope.
@param clientCustomerId the client customer ID
@param waitForMillis the wait time in milliseconds
"""
final long minWaitTime = millisFromNow(waitForMillis);
// Here we are as... | java | private void updateAccountWaitTime(long clientCustomerId, long waitForMillis) {
final long minWaitTime = millisFromNow(waitForMillis);
// Here we are assuming that the AtomicLong reference isn't changed once inserted. Therefore,
// the content of this map grows with the number of account rate limits encoun... | [
"private",
"void",
"updateAccountWaitTime",
"(",
"long",
"clientCustomerId",
",",
"long",
"waitForMillis",
")",
"{",
"final",
"long",
"minWaitTime",
"=",
"millisFromNow",
"(",
"waitForMillis",
")",
";",
"// Here we are assuming that the AtomicLong reference isn't changed once... | Update the wait time for ACCOUNT scope.
@param clientCustomerId the client customer ID
@param waitForMillis the wait time in milliseconds | [
"Update",
"the",
"wait",
"time",
"for",
"ACCOUNT",
"scope",
"."
] | train | https://github.com/googleads/googleads-java-lib/blob/967957cc4f6076514e3a7926fe653e4f1f7cc9c9/extensions/adwords_rate_limiter/src/main/java/com/google/api/ads/adwords/extension/ratelimiter/ApiServicesRetryStrategy.java#L143-L174 |
spring-projects/spring-android | spring-android-core/src/main/java/org/springframework/util/ClassUtils.java | ClassUtils.addResourcePathToPackagePath | public static String addResourcePathToPackagePath(Class<?> clazz, String resourceName) {
"""
Return a path suitable for use with {@code ClassLoader.getResource}
(also suitable for use with {@code Class.getResource} by prepending a
slash ('/') to the return value). Built by taking the package of the specified
cl... | java | public static String addResourcePathToPackagePath(Class<?> clazz, String resourceName) {
Assert.notNull(resourceName, "Resource name must not be null");
if (!resourceName.startsWith("/")) {
return classPackageAsResourcePath(clazz) + "/" + resourceName;
}
return classPackageAsResourcePath(clazz) + resourceNam... | [
"public",
"static",
"String",
"addResourcePathToPackagePath",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"resourceName",
")",
"{",
"Assert",
".",
"notNull",
"(",
"resourceName",
",",
"\"Resource name must not be null\"",
")",
";",
"if",
"(",
"!",
"reso... | Return a path suitable for use with {@code ClassLoader.getResource}
(also suitable for use with {@code Class.getResource} by prepending a
slash ('/') to the return value). Built by taking the package of the specified
class file, converting all dots ('.') to slashes ('/'), adding a trailing slash
if necessary, and conca... | [
"Return",
"a",
"path",
"suitable",
"for",
"use",
"with",
"{"
] | train | https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ClassUtils.java#L972-L978 |
ModeShape/modeshape | sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlTokenStream.java | DdlTokenStream.getMarkedContent | public String getMarkedContent() {
"""
Returns the string content for characters bounded by the previous marked position and the position of the currentToken
(inclusive). Method also marks() the new position the the currentToken.
@return the string content for characters bounded by the previous marked position... | java | public String getMarkedContent() {
Position startPosition = new Position(currentMarkedPosition.getIndexInContent(), currentMarkedPosition.getLine(),
currentMarkedPosition.getColumn());
mark();
return getContentBetween(startPosition, currentMarkedPo... | [
"public",
"String",
"getMarkedContent",
"(",
")",
"{",
"Position",
"startPosition",
"=",
"new",
"Position",
"(",
"currentMarkedPosition",
".",
"getIndexInContent",
"(",
")",
",",
"currentMarkedPosition",
".",
"getLine",
"(",
")",
",",
"currentMarkedPosition",
".",
... | Returns the string content for characters bounded by the previous marked position and the position of the currentToken
(inclusive). Method also marks() the new position the the currentToken.
@return the string content for characters bounded by the previous marked position and the position of the currentToken
(inclusiv... | [
"Returns",
"the",
"string",
"content",
"for",
"characters",
"bounded",
"by",
"the",
"previous",
"marked",
"position",
"and",
"the",
"position",
"of",
"the",
"currentToken",
"(",
"inclusive",
")",
".",
"Method",
"also",
"marks",
"()",
"the",
"new",
"position",
... | train | https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/sequencers/modeshape-sequencer-ddl/src/main/java/org/modeshape/sequencer/ddl/DdlTokenStream.java#L222-L229 |
camunda/camunda-bpm-platform | engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/EventSubscriptionManager.java | EventSubscriptionManager.findMessageStartEventSubscriptionByNameAndTenantId | public EventSubscriptionEntity findMessageStartEventSubscriptionByNameAndTenantId(String messageName, String tenantId) {
"""
@return the message start event subscription with the given message name and tenant id
@see #findMessageStartEventSubscriptionByName(String)
"""
Map<String, String> parameters = n... | java | public EventSubscriptionEntity findMessageStartEventSubscriptionByNameAndTenantId(String messageName, String tenantId) {
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("messageName", messageName);
parameters.put("tenantId", tenantId);
return (EventSubscriptionEntity) get... | [
"public",
"EventSubscriptionEntity",
"findMessageStartEventSubscriptionByNameAndTenantId",
"(",
"String",
"messageName",
",",
"String",
"tenantId",
")",
"{",
"Map",
"<",
"String",
",",
"String",
">",
"parameters",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
... | @return the message start event subscription with the given message name and tenant id
@see #findMessageStartEventSubscriptionByName(String) | [
"@return",
"the",
"message",
"start",
"event",
"subscription",
"with",
"the",
"given",
"message",
"name",
"and",
"tenant",
"id"
] | train | https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/persistence/entity/EventSubscriptionManager.java#L279-L285 |
joniles/mpxj | src/main/java/net/sf/mpxj/Task.java | Task.setEnterpriseNumber | public void setEnterpriseNumber(int index, Number value) {
"""
Set an enterprise field value.
@param index field index
@param value field value
"""
set(selectField(TaskFieldLists.ENTERPRISE_NUMBER, index), value);
} | java | public void setEnterpriseNumber(int index, Number value)
{
set(selectField(TaskFieldLists.ENTERPRISE_NUMBER, index), value);
} | [
"public",
"void",
"setEnterpriseNumber",
"(",
"int",
"index",
",",
"Number",
"value",
")",
"{",
"set",
"(",
"selectField",
"(",
"TaskFieldLists",
".",
"ENTERPRISE_NUMBER",
",",
"index",
")",
",",
"value",
")",
";",
"}"
] | Set an enterprise field value.
@param index field index
@param value field value | [
"Set",
"an",
"enterprise",
"field",
"value",
"."
] | train | https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/Task.java#L3925-L3928 |
stanfy/goro | goro/src/main/java/com/stanfy/enroscar/goro/GoroService.java | GoroService.taskIntent | public static <T extends Callable<?> & Parcelable> Intent taskIntent(final Context context,
final String queueName,
final T task) {
"""
Create an intent that contains a task... | java | public static <T extends Callable<?> & Parcelable> Intent taskIntent(final Context context,
final String queueName,
final T task) {
// XXX http://code.google.com/p/android/is... | [
"public",
"static",
"<",
"T",
"extends",
"Callable",
"<",
"?",
">",
"&",
"Parcelable",
">",
"Intent",
"taskIntent",
"(",
"final",
"Context",
"context",
",",
"final",
"String",
"queueName",
",",
"final",
"T",
"task",
")",
"{",
"// XXX http://code.google.com/p/a... | Create an intent that contains a task that should be scheduled
on a defined queue.
Intent can be used as an argument for
{@link android.content.Context#startService(android.content.Intent)}.
@param context context instance
@param task task instance
@param queueName queue name
@param <T> task type | [
"Create",
"an",
"intent",
"that",
"contains",
"a",
"task",
"that",
"should",
"be",
"scheduled",
"on",
"a",
"defined",
"queue",
".",
"Intent",
"can",
"be",
"used",
"as",
"an",
"argument",
"for",
"{",
"@link",
"android",
".",
"content",
".",
"Context#startSe... | train | https://github.com/stanfy/goro/blob/6618e63a926833d61f492ec611ee77668d756820/goro/src/main/java/com/stanfy/enroscar/goro/GoroService.java#L178-L187 |
grails/grails-core | grails-core/src/main/groovy/grails/util/GrailsClassUtils.java | GrailsClassUtils.getStaticPropertyValue | public static Object getStaticPropertyValue(Class<?> clazz, String name) {
"""
<p>Get a static property value, which has a public static getter or is just a public static field.</p>
@param clazz The class to check for static property
@param name The property name
@return The value if there is one, or null if ... | java | public static Object getStaticPropertyValue(Class<?> clazz, String name) {
Method getter = BeanUtils.findDeclaredMethod(clazz, getGetterName(name), (Class[])null);
try {
if (getter != null) {
ReflectionUtils.makeAccessible(getter);
return getter.invoke(clazz);... | [
"public",
"static",
"Object",
"getStaticPropertyValue",
"(",
"Class",
"<",
"?",
">",
"clazz",
",",
"String",
"name",
")",
"{",
"Method",
"getter",
"=",
"BeanUtils",
".",
"findDeclaredMethod",
"(",
"clazz",
",",
"getGetterName",
"(",
"name",
")",
",",
"(",
... | <p>Get a static property value, which has a public static getter or is just a public static field.</p>
@param clazz The class to check for static property
@param name The property name
@return The value if there is one, or null if unset OR there is no such property | [
"<p",
">",
"Get",
"a",
"static",
"property",
"value",
"which",
"has",
"a",
"public",
"static",
"getter",
"or",
"is",
"just",
"a",
"public",
"static",
"field",
".",
"<",
"/",
"p",
">"
] | train | https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-core/src/main/groovy/grails/util/GrailsClassUtils.java#L598-L611 |
skuzzle/jeve | jeve/src/it/java/de/skuzzle/jeve/AWTEventProviderIT.java | AWTEventProviderIT.getParameters | @Parameters
public static final Collection<Object[]> getParameters() {
"""
Parameterizes the test instances.
@return Collection of parameters for the constructor of
{@link EventProviderTestBase}.
"""
return Arrays.asList(
new Object[] {
(Function<Listener... | java | @Parameters
public static final Collection<Object[]> getParameters() {
return Arrays.asList(
new Object[] {
(Function<ListenerStore, ? extends EventProvider>) store -> new AWTEventProvider(store, true),
(Supplier<ListenerStore>) () -> Performan... | [
"@",
"Parameters",
"public",
"static",
"final",
"Collection",
"<",
"Object",
"[",
"]",
">",
"getParameters",
"(",
")",
"{",
"return",
"Arrays",
".",
"asList",
"(",
"new",
"Object",
"[",
"]",
"{",
"(",
"Function",
"<",
"ListenerStore",
",",
"?",
"extends"... | Parameterizes the test instances.
@return Collection of parameters for the constructor of
{@link EventProviderTestBase}. | [
"Parameterizes",
"the",
"test",
"instances",
"."
] | train | https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/it/java/de/skuzzle/jeve/AWTEventProviderIT.java#L40-L60 |
stratosphere/stratosphere | stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java | ManagementGraph.getInputGroupVertex | public ManagementGroupVertex getInputGroupVertex(final int stage, final int index) {
"""
Returns the input group vertex at the given index in the given stage.
@param stage
the index to the management stage
@param index
the index to the input group vertex
@return the input group vertex at the given index in ... | java | public ManagementGroupVertex getInputGroupVertex(final int stage, final int index) {
if (stage >= this.stages.size()) {
return null;
}
return this.stages.get(stage).getInputGroupVertex(index);
} | [
"public",
"ManagementGroupVertex",
"getInputGroupVertex",
"(",
"final",
"int",
"stage",
",",
"final",
"int",
"index",
")",
"{",
"if",
"(",
"stage",
">=",
"this",
".",
"stages",
".",
"size",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"this"... | Returns the input group vertex at the given index in the given stage.
@param stage
the index to the management stage
@param index
the index to the input group vertex
@return the input group vertex at the given index in the given stage or <code>null</code> if either the stage
does not exists or the given index is inval... | [
"Returns",
"the",
"input",
"group",
"vertex",
"at",
"the",
"given",
"index",
"in",
"the",
"given",
"stage",
"."
] | train | https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/nephele/managementgraph/ManagementGraph.java#L220-L227 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.