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
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/ParameterUtil.java
ParameterUtil.getLongParameter
public static long getLongParameter ( HttpServletRequest req, String name, long defval, String invalidDataMessage) throws DataValidationException { """ Fetches the supplied parameter from the request and converts it to a long. If the parameter does not exist, <code>defval</code> is returned. If th...
java
public static long getLongParameter ( HttpServletRequest req, String name, long defval, String invalidDataMessage) throws DataValidationException { String value = getParameter(req, name, false); if (StringUtil.isBlank(value)) { return defval; } return pars...
[ "public", "static", "long", "getLongParameter", "(", "HttpServletRequest", "req", ",", "String", "name", ",", "long", "defval", ",", "String", "invalidDataMessage", ")", "throws", "DataValidationException", "{", "String", "value", "=", "getParameter", "(", "req", ...
Fetches the supplied parameter from the request and converts it to a long. If the parameter does not exist, <code>defval</code> is returned. If the parameter is not a well-formed integer, a data validation exception is thrown with the supplied message.
[ "Fetches", "the", "supplied", "parameter", "from", "the", "request", "and", "converts", "it", "to", "a", "long", ".", "If", "the", "parameter", "does", "not", "exist", "<code", ">", "defval<", "/", "code", ">", "is", "returned", ".", "If", "the", "parame...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ParameterUtil.java#L189-L198
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java
ColorXyz.xyzToSrgb
public static void xyzToSrgb( float x , float y , float z , float srgb[] ) { """ Conversion from normalized RGB into XYZ. Normalized RGB values have a range of 0:1 """ srgb[0] = 3.240479f*x - 1.53715f*y - 0.498535f*z; srgb[1] = -0.969256f*x + 1.875991f*y + 0.041556f*z; srgb[2] = 0.055648f*x - 0.204043f*...
java
public static void xyzToSrgb( float x , float y , float z , float srgb[] ) { srgb[0] = 3.240479f*x - 1.53715f*y - 0.498535f*z; srgb[1] = -0.969256f*x + 1.875991f*y + 0.041556f*z; srgb[2] = 0.055648f*x - 0.204043f*y + 1.057311f*z; }
[ "public", "static", "void", "xyzToSrgb", "(", "float", "x", ",", "float", "y", ",", "float", "z", ",", "float", "srgb", "[", "]", ")", "{", "srgb", "[", "0", "]", "=", "3.240479f", "*", "x", "-", "1.53715f", "*", "y", "-", "0.498535f", "*", "z", ...
Conversion from normalized RGB into XYZ. Normalized RGB values have a range of 0:1
[ "Conversion", "from", "normalized", "RGB", "into", "XYZ", ".", "Normalized", "RGB", "values", "have", "a", "range", "of", "0", ":", "1" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/color/ColorXyz.java#L88-L92
sd4324530/fastweixin
src/main/java/com/github/sd4324530/fastweixin/servlet/WeixinServletSupport.java
WeixinServletSupport.doGet
@Override protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { """ 重写servlet中的get方法,用于处理微信服务器绑定,置为final方法,用户已经无需重写这个方法啦 @param request http请求对象 @param response http响应对象 @throws ServletException servlet异常 @throws IOException IO异常...
java
@Override protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { support.bindServer(request, response); }
[ "@", "Override", "protected", "final", "void", "doGet", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "ServletException", ",", "IOException", "{", "support", ".", "bindServer", "(", "request", ",", "response", ")", ";...
重写servlet中的get方法,用于处理微信服务器绑定,置为final方法,用户已经无需重写这个方法啦 @param request http请求对象 @param response http响应对象 @throws ServletException servlet异常 @throws IOException IO异常
[ "重写servlet中的get方法,用于处理微信服务器绑定,置为final方法,用户已经无需重写这个方法啦" ]
train
https://github.com/sd4324530/fastweixin/blob/6bc0a7abfa23aad0dbad4c3123a47a7fb53f3447/src/main/java/com/github/sd4324530/fastweixin/servlet/WeixinServletSupport.java#L40-L43
alkacon/opencms-core
src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java
CmsSolrSpellchecker.sendResponse
private void sendResponse(final HttpServletResponse res, final CmsSpellcheckingRequest request) throws IOException { """ Sends the JSON-formatted spellchecking results to the client. @param res The HttpServletResponse object. @param request The spellchecking request object. @throws IOException in case writi...
java
private void sendResponse(final HttpServletResponse res, final CmsSpellcheckingRequest request) throws IOException { final PrintWriter pw = res.getWriter(); final JSONObject response = getJsonFormattedSpellcheckResult(request); pw.println(response.toString()); pw.close(); }
[ "private", "void", "sendResponse", "(", "final", "HttpServletResponse", "res", ",", "final", "CmsSpellcheckingRequest", "request", ")", "throws", "IOException", "{", "final", "PrintWriter", "pw", "=", "res", ".", "getWriter", "(", ")", ";", "final", "JSONObject", ...
Sends the JSON-formatted spellchecking results to the client. @param res The HttpServletResponse object. @param request The spellchecking request object. @throws IOException in case writing the response fails
[ "Sends", "the", "JSON", "-", "formatted", "spellchecking", "results", "to", "the", "client", "." ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/search/solr/spellchecking/CmsSolrSpellchecker.java#L494-L500
kirgor/enklib
rest/src/main/java/com/kirgor/enklib/rest/RESTClient.java
RESTClient.deleteWithListResult
public <T> EntityResponse<List<T>> deleteWithListResult(Class<T> entityClass, String path, Map<String, String> headers) throws IOException, RESTException { """ Performs DELETE request, while expected response entity is a list of specified type. @param entityClass Class, which contains expected response entity f...
java
public <T> EntityResponse<List<T>> deleteWithListResult(Class<T> entityClass, String path, Map<String, String> headers) throws IOException, RESTException { return parseListEntityResponse(entityClass, getHttpResponse(new HttpDelete(baseUrl + path), headers)); }
[ "public", "<", "T", ">", "EntityResponse", "<", "List", "<", "T", ">", ">", "deleteWithListResult", "(", "Class", "<", "T", ">", "entityClass", ",", "String", "path", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "throws", "IOException",...
Performs DELETE request, while expected response entity is a list of specified type. @param entityClass Class, which contains expected response entity fields. @param path Request path. @param headers Map of HTTP request headers. @param <T> Type of class, which contains expected response entity field...
[ "Performs", "DELETE", "request", "while", "expected", "response", "entity", "is", "a", "list", "of", "specified", "type", "." ]
train
https://github.com/kirgor/enklib/blob/8a24db296dc43db5d8fe509cf64ace0a0c7be8f2/rest/src/main/java/com/kirgor/enklib/rest/RESTClient.java#L554-L556
mapsforge/mapsforge
mapsforge-map-reader/src/main/java/org/mapsforge/map/reader/header/MapFileHeader.java
MapFileHeader.readHeader
public void readHeader(ReadBuffer readBuffer, long fileSize) throws IOException { """ Reads and validates the header block from the map file. @param readBuffer the ReadBuffer for the file data. @param fileSize the size of the map file in bytes. @throws IOException if an error occurs while reading the file. ...
java
public void readHeader(ReadBuffer readBuffer, long fileSize) throws IOException { RequiredFields.readMagicByte(readBuffer); RequiredFields.readRemainingHeader(readBuffer); MapFileInfoBuilder mapFileInfoBuilder = new MapFileInfoBuilder(); RequiredFields.readFileVersion(readBuffer, mapFi...
[ "public", "void", "readHeader", "(", "ReadBuffer", "readBuffer", ",", "long", "fileSize", ")", "throws", "IOException", "{", "RequiredFields", ".", "readMagicByte", "(", "readBuffer", ")", ";", "RequiredFields", ".", "readRemainingHeader", "(", "readBuffer", ")", ...
Reads and validates the header block from the map file. @param readBuffer the ReadBuffer for the file data. @param fileSize the size of the map file in bytes. @throws IOException if an error occurs while reading the file.
[ "Reads", "and", "validates", "the", "header", "block", "from", "the", "map", "file", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-reader/src/main/java/org/mapsforge/map/reader/header/MapFileHeader.java#L86-L113
apache/groovy
subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java
DateTimeExtensions.leftShift
public static OffsetDateTime leftShift(final ZoneOffset self, LocalDateTime dateTime) { """ Returns an {@link java.time.OffsetDateTime} of this offset and the provided {@link java.time.LocalDateTime}. @param self a ZoneOffset @param dateTime a LocalDateTime @return an OffsetDateTime @since 2.5.0 """ ...
java
public static OffsetDateTime leftShift(final ZoneOffset self, LocalDateTime dateTime) { return OffsetDateTime.of(dateTime, self); }
[ "public", "static", "OffsetDateTime", "leftShift", "(", "final", "ZoneOffset", "self", ",", "LocalDateTime", "dateTime", ")", "{", "return", "OffsetDateTime", ".", "of", "(", "dateTime", ",", "self", ")", ";", "}" ]
Returns an {@link java.time.OffsetDateTime} of this offset and the provided {@link java.time.LocalDateTime}. @param self a ZoneOffset @param dateTime a LocalDateTime @return an OffsetDateTime @since 2.5.0
[ "Returns", "an", "{", "@link", "java", ".", "time", ".", "OffsetDateTime", "}", "of", "this", "offset", "and", "the", "provided", "{", "@link", "java", ".", "time", ".", "LocalDateTime", "}", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-datetime/src/main/java/org/apache/groovy/datetime/extensions/DateTimeExtensions.java#L1954-L1956
nostra13/Android-Universal-Image-Loader
library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java
ImageLoader.displayImage
public void displayImage(String uri, ImageAware imageAware) { """ Adds display image task to execution pool. Image will be set to ImageAware when it's turn. <br/> Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration configuration} will be used.<br /> <b>NOTE:<...
java
public void displayImage(String uri, ImageAware imageAware) { displayImage(uri, imageAware, null, null, null); }
[ "public", "void", "displayImage", "(", "String", "uri", ",", "ImageAware", "imageAware", ")", "{", "displayImage", "(", "uri", ",", "imageAware", ",", "null", ",", "null", ",", "null", ")", ";", "}" ]
Adds display image task to execution pool. Image will be set to ImageAware when it's turn. <br/> Default {@linkplain DisplayImageOptions display image options} from {@linkplain ImageLoaderConfiguration configuration} will be used.<br /> <b>NOTE:</b> {@link #init(ImageLoaderConfiguration)} method must be called before t...
[ "Adds", "display", "image", "task", "to", "execution", "pool", ".", "Image", "will", "be", "set", "to", "ImageAware", "when", "it", "s", "turn", ".", "<br", "/", ">", "Default", "{", "@linkplain", "DisplayImageOptions", "display", "image", "options", "}", ...
train
https://github.com/nostra13/Android-Universal-Image-Loader/blob/fc3c5f6779bb4f702e233653b61bd9d559e345cc/library/src/main/java/com/nostra13/universalimageloader/core/ImageLoader.java#L125-L127
mapbox/mapbox-java
services-geojson/src/main/java/com/mapbox/geojson/Polygon.java
Polygon.fromLngLats
public static Polygon fromLngLats(@NonNull List<List<Point>> coordinates, @Nullable BoundingBox bbox) { """ Create a new instance of this class by defining a list of {@link Point}s which follow the correct specifications described in the Point documentation. Note that the first...
java
public static Polygon fromLngLats(@NonNull List<List<Point>> coordinates, @Nullable BoundingBox bbox) { return new Polygon(TYPE, bbox, coordinates); }
[ "public", "static", "Polygon", "fromLngLats", "(", "@", "NonNull", "List", "<", "List", "<", "Point", ">", ">", "coordinates", ",", "@", "Nullable", "BoundingBox", "bbox", ")", "{", "return", "new", "Polygon", "(", "TYPE", ",", "bbox", ",", "coordinates", ...
Create a new instance of this class by defining a list of {@link Point}s which follow the correct specifications described in the Point documentation. Note that the first and last point in the list should be the same enclosing the linear ring. @param coordinates a list of a list of points which represent the polygon g...
[ "Create", "a", "new", "instance", "of", "this", "class", "by", "defining", "a", "list", "of", "{", "@link", "Point", "}", "s", "which", "follow", "the", "correct", "specifications", "described", "in", "the", "Point", "documentation", ".", "Note", "that", "...
train
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-geojson/src/main/java/com/mapbox/geojson/Polygon.java#L113-L116
alibaba/jstorm
jstorm-utility/jstorm-flux/flux-core/src/main/java/com/alibaba/jstorm/flux/FluxBuilder.java
FluxBuilder.buildSpout
private static IRichSpout buildSpout(SpoutDef def, ExecutionContext context) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { """ Given a spout definition, return a Storm spout implementation by attempting to find a matchi...
java
private static IRichSpout buildSpout(SpoutDef def, ExecutionContext context) throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { return (IRichSpout)buildObject(def, context); }
[ "private", "static", "IRichSpout", "buildSpout", "(", "SpoutDef", "def", ",", "ExecutionContext", "context", ")", "throws", "ClassNotFoundException", ",", "IllegalAccessException", ",", "InstantiationException", ",", "NoSuchMethodException", ",", "InvocationTargetException", ...
Given a spout definition, return a Storm spout implementation by attempting to find a matching constructor in the given spout class. Perform list to array conversion as necessary.
[ "Given", "a", "spout", "definition", "return", "a", "Storm", "spout", "implementation", "by", "attempting", "to", "find", "a", "matching", "constructor", "in", "the", "given", "spout", "class", ".", "Perform", "list", "to", "array", "conversion", "as", "necess...
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-utility/jstorm-flux/flux-core/src/main/java/com/alibaba/jstorm/flux/FluxBuilder.java#L376-L379
taimos/dvalin
jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java
ServerJSONWebSocketAdapter.sendObjectToSocket
protected final void sendObjectToSocket(Object objectToSend, WriteCallback cb) { """ send object to client and serialize it using JSON @param objectToSend the object to send @param cb the callback after sending the message """ Session sess = this.getSession(); if (sess != null) { ...
java
protected final void sendObjectToSocket(Object objectToSend, WriteCallback cb) { Session sess = this.getSession(); if (sess != null) { String json; try { json = this.mapper.writeValueAsString(objectToSend); } catch (JsonProcessingException e) { ...
[ "protected", "final", "void", "sendObjectToSocket", "(", "Object", "objectToSend", ",", "WriteCallback", "cb", ")", "{", "Session", "sess", "=", "this", ".", "getSession", "(", ")", ";", "if", "(", "sess", "!=", "null", ")", "{", "String", "json", ";", "...
send object to client and serialize it using JSON @param objectToSend the object to send @param cb the callback after sending the message
[ "send", "object", "to", "client", "and", "serialize", "it", "using", "JSON" ]
train
https://github.com/taimos/dvalin/blob/ff8f1bf594e43d7e8ca8de0b4da9f923b66a1a47/jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ServerJSONWebSocketAdapter.java#L133-L144
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/xml/NodeProcessor.java
NodeProcessor.applyNamespace
public static void applyNamespace(Namespace nsp, Element e) { """ Recursively applies the specified <code>Namespace</code> to the specified <code>Element</code>, unless the <code>Element</code> (or any child <code>Element</code>) already specifies a <code>Namespace</code>. @param nsp Namespace to apply. @par...
java
public static void applyNamespace(Namespace nsp, Element e) { // Assertions... if (nsp == null) { String msg = "Argument 'nsp' cannot be null."; throw new IllegalArgumentException(msg); } if (e == null) { String msg = "Argument 'e [Element]' cannot be null."; throw new IllegalArgumentException(msg)...
[ "public", "static", "void", "applyNamespace", "(", "Namespace", "nsp", ",", "Element", "e", ")", "{", "// Assertions...", "if", "(", "nsp", "==", "null", ")", "{", "String", "msg", "=", "\"Argument 'nsp' cannot be null.\"", ";", "throw", "new", "IllegalArgumentE...
Recursively applies the specified <code>Namespace</code> to the specified <code>Element</code>, unless the <code>Element</code> (or any child <code>Element</code>) already specifies a <code>Namespace</code>. @param nsp Namespace to apply. @param e XML structure upon which to apply the Namespace.
[ "Recursively", "applies", "the", "specified", "<code", ">", "Namespace<", "/", "code", ">", "to", "the", "specified", "<code", ">", "Element<", "/", "code", ">", "unless", "the", "<code", ">", "Element<", "/", "code", ">", "(", "or", "any", "child", "<co...
train
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/xml/NodeProcessor.java#L86-L105
Waikato/jclasslocator
src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java
ClassLocator.matches
public static boolean matches(String superclassOrIntf, String otherclass) { """ Checks whether the "otherclass" is a subclass of the given "superclassOrIntf" or whether it implements "superclassOrIntf". @param superclassOrIntf the superclass/interface to check against @param otherclass this cl...
java
public static boolean matches(String superclassOrIntf, String otherclass) { return isSubclass(superclassOrIntf, otherclass) || hasInterface(superclassOrIntf, otherclass); }
[ "public", "static", "boolean", "matches", "(", "String", "superclassOrIntf", ",", "String", "otherclass", ")", "{", "return", "isSubclass", "(", "superclassOrIntf", ",", "otherclass", ")", "||", "hasInterface", "(", "superclassOrIntf", ",", "otherclass", ")", ";",...
Checks whether the "otherclass" is a subclass of the given "superclassOrIntf" or whether it implements "superclassOrIntf". @param superclassOrIntf the superclass/interface to check against @param otherclass this class is checked whether it is a subclass of the the superclass @return ...
[ "Checks", "whether", "the", "otherclass", "is", "a", "subclass", "of", "the", "given", "superclassOrIntf", "or", "whether", "it", "implements", "superclassOrIntf", "." ]
train
https://github.com/Waikato/jclasslocator/blob/c899072fff607a56ee7f8c2d01fbeb15157ad144/src/main/java/nz/ac/waikato/cms/locator/ClassLocator.java#L690-L692
GwtMaterialDesign/gwt-material
gwt-material/src/main/java/gwt/material/design/client/base/BaseCheckBox.java
BaseCheckBox.setValue
@Override public void setValue(Boolean value, boolean fireEvents) { """ Checks or unchecks the check box, firing {@link ValueChangeEvent} if appropriate. <p> Note that this <em>does not</em> set the value property of the checkbox input element wrapped by this widget. For access to that property, see {@lin...
java
@Override public void setValue(Boolean value, boolean fireEvents) { if (value == null) { value = Boolean.FALSE; } Boolean oldValue = getValue(); inputElem.setChecked(value); inputElem.setDefaultChecked(value); if (value.equals(oldValue)) { ret...
[ "@", "Override", "public", "void", "setValue", "(", "Boolean", "value", ",", "boolean", "fireEvents", ")", "{", "if", "(", "value", "==", "null", ")", "{", "value", "=", "Boolean", ".", "FALSE", ";", "}", "Boolean", "oldValue", "=", "getValue", "(", ")...
Checks or unchecks the check box, firing {@link ValueChangeEvent} if appropriate. <p> Note that this <em>does not</em> set the value property of the checkbox input element wrapped by this widget. For access to that property, see {@link #setFormValue(String)} @param value true to check, false to uncheck; null valu...
[ "Checks", "or", "unchecks", "the", "check", "box", "firing", "{", "@link", "ValueChangeEvent", "}", "if", "appropriate", ".", "<p", ">", "Note", "that", "this", "<em", ">", "does", "not<", "/", "em", ">", "set", "the", "value", "property", "of", "the", ...
train
https://github.com/GwtMaterialDesign/gwt-material/blob/86feefb282b007c0a44784c09e651a50f257138e/gwt-material/src/main/java/gwt/material/design/client/base/BaseCheckBox.java#L445-L460
jparsec/jparsec
jparsec/src/main/java/org/jparsec/ParseContext.java
ParseContext.enableTrace
final void enableTrace(final String rootName) { """ Enables parse tree tracing with {@code rootName} as the name of the root node. """ this.trace = new ParserTrace() { private TreeNode current = new TreeNode(rootName, getIndex()); @Override public void push(String name) { thi...
java
final void enableTrace(final String rootName) { this.trace = new ParserTrace() { private TreeNode current = new TreeNode(rootName, getIndex()); @Override public void push(String name) { this.current = current.addChild(name, getIndex()); } @Override public void pop() { ...
[ "final", "void", "enableTrace", "(", "final", "String", "rootName", ")", "{", "this", ".", "trace", "=", "new", "ParserTrace", "(", ")", "{", "private", "TreeNode", "current", "=", "new", "TreeNode", "(", "rootName", ",", "getIndex", "(", ")", ")", ";", ...
Enables parse tree tracing with {@code rootName} as the name of the root node.
[ "Enables", "parse", "tree", "tracing", "with", "{" ]
train
https://github.com/jparsec/jparsec/blob/df1280259f5da9eb5ffc537437569dddba66cb94/jparsec/src/main/java/org/jparsec/ParseContext.java#L347-L379
micronaut-projects/micronaut-core
cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java
MicronautConsole.userInput
public String userInput(String message, String[] validResponses) { """ Replacement for AntBuilder.input() to eliminate dependency of GrailsScriptRunner on the Ant libraries. Prints a message and list of valid responses, then returns whatever the user enters (once they press &lt;return&gt;). If the user enters so...
java
public String userInput(String message, String[] validResponses) { if (validResponses == null) { return userInput(message); } String question = createQuestion(message, validResponses); String response = userInput(question); for (String validResponse : validResponses)...
[ "public", "String", "userInput", "(", "String", "message", ",", "String", "[", "]", "validResponses", ")", "{", "if", "(", "validResponses", "==", "null", ")", "{", "return", "userInput", "(", "message", ")", ";", "}", "String", "question", "=", "createQue...
Replacement for AntBuilder.input() to eliminate dependency of GrailsScriptRunner on the Ant libraries. Prints a message and list of valid responses, then returns whatever the user enters (once they press &lt;return&gt;). If the user enters something that is not in the array of valid responses, the message is displayed ...
[ "Replacement", "for", "AntBuilder", ".", "input", "()", "to", "eliminate", "dependency", "of", "GrailsScriptRunner", "on", "the", "Ant", "libraries", ".", "Prints", "a", "message", "and", "list", "of", "valid", "responses", "then", "returns", "whatever", "the", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/cli/src/main/groovy/io/micronaut/cli/console/logging/MicronautConsole.java#L1058-L1072
leancloud/java-sdk-all
android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/game/FloatWindowApi.java
FloatWindowApi.showFinal
private void showFinal(boolean show, Activity activity, HuaweiApiClient client) { """ 最终调用接口显示/隐藏浮标 @param show 是否显示浮标 @param activity 当前界面的activity @param client HuaweiApiClient实例 """ // 保存当前浮标显示状态,以便出现异常浮标消失后,能够恢复 isCurFloatShow = show; Activity curActivity = activity!=null ...
java
private void showFinal(boolean show, Activity activity, HuaweiApiClient client) { // 保存当前浮标显示状态,以便出现异常浮标消失后,能够恢复 isCurFloatShow = show; Activity curActivity = activity!=null ? activity : ActivityMgr.INST.getLastActivity(); // 取得当前 activity 用于展示浮标 if (curActivity == nul...
[ "private", "void", "showFinal", "(", "boolean", "show", ",", "Activity", "activity", ",", "HuaweiApiClient", "client", ")", "{", "// 保存当前浮标显示状态,以便出现异常浮标消失后,能够恢复\r", "isCurFloatShow", "=", "show", ";", "Activity", "curActivity", "=", "activity", "!=", "null", "?", ...
最终调用接口显示/隐藏浮标 @param show 是否显示浮标 @param activity 当前界面的activity @param client HuaweiApiClient实例
[ "最终调用接口显示", "/", "隐藏浮标" ]
train
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/android-sdk/huawei-hmsagent/src/main/java/com/huawei/android/hms/agent/game/FloatWindowApi.java#L102-L129
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/SerializableUtil.java
SerializableUtil.save
public static void save(Object o, OutputStream stream) { """ Serializes the object to the provided stream. This method does not close the stream after writing. @param o the object to be stored in the file @param stream the stream in which the object should be stored """ try { ObjectOu...
java
public static void save(Object o, OutputStream stream) { try { ObjectOutputStream outStream = (stream instanceof ObjectOutputStream) ? (ObjectOutputStream)stream : new ObjectOutputStream(stream); outStream.writeObject(o); }...
[ "public", "static", "void", "save", "(", "Object", "o", ",", "OutputStream", "stream", ")", "{", "try", "{", "ObjectOutputStream", "outStream", "=", "(", "stream", "instanceof", "ObjectOutputStream", ")", "?", "(", "ObjectOutputStream", ")", "stream", ":", "ne...
Serializes the object to the provided stream. This method does not close the stream after writing. @param o the object to be stored in the file @param stream the stream in which the object should be stored
[ "Serializes", "the", "object", "to", "the", "provided", "stream", ".", "This", "method", "does", "not", "close", "the", "stream", "after", "writing", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/SerializableUtil.java#L90-L100
Azure/azure-sdk-for-java
network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java
VirtualNetworkGatewaysInner.getBgpPeerStatus
public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { """ The GetBgpPeerStatus operation retrieves the status of all BGP peers. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network ...
java
public BgpPeerStatusListResultInner getBgpPeerStatus(String resourceGroupName, String virtualNetworkGatewayName) { return getBgpPeerStatusWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().last().body(); }
[ "public", "BgpPeerStatusListResultInner", "getBgpPeerStatus", "(", "String", "resourceGroupName", ",", "String", "virtualNetworkGatewayName", ")", "{", "return", "getBgpPeerStatusWithServiceResponseAsync", "(", "resourceGroupName", ",", "virtualNetworkGatewayName", ")", ".", "t...
The GetBgpPeerStatus operation retrieves the status of all BGP peers. @param resourceGroupName The name of the resource group. @param virtualNetworkGatewayName The name of the virtual network gateway. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request...
[ "The", "GetBgpPeerStatus", "operation", "retrieves", "the", "status", "of", "all", "BGP", "peers", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworkGatewaysInner.java#L1951-L1953
jhy/jsoup
src/main/java/org/jsoup/nodes/Element.java
Element.getElementsByAttributeValueEnding
public Elements getElementsByAttributeValueEnding(String key, String valueSuffix) { """ Find elements that have attributes that end with the value suffix. Case insensitive. @param key name of the attribute @param valueSuffix end of the attribute value @return elements that have attributes that end with the va...
java
public Elements getElementsByAttributeValueEnding(String key, String valueSuffix) { return Collector.collect(new Evaluator.AttributeWithValueEnding(key, valueSuffix), this); }
[ "public", "Elements", "getElementsByAttributeValueEnding", "(", "String", "key", ",", "String", "valueSuffix", ")", "{", "return", "Collector", ".", "collect", "(", "new", "Evaluator", ".", "AttributeWithValueEnding", "(", "key", ",", "valueSuffix", ")", ",", "thi...
Find elements that have attributes that end with the value suffix. Case insensitive. @param key name of the attribute @param valueSuffix end of the attribute value @return elements that have attributes that end with the value suffix
[ "Find", "elements", "that", "have", "attributes", "that", "end", "with", "the", "value", "suffix", ".", "Case", "insensitive", "." ]
train
https://github.com/jhy/jsoup/blob/68ff8cbe7ad847059737a09c567a501a7f1d251f/src/main/java/org/jsoup/nodes/Element.java#L896-L898
carewebframework/carewebframework-vista
org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/DynamicByteBuffer.java
DynamicByteBuffer.put
public void put(byte[] bytes, int start, int end) { """ Writes a range of bytes from the specified array. @param bytes Array containing the bytes to be written. @param start Start of the range (inclusive). @param end End of the range (exclusive). """ byte[] buffer = chunk(); for (...
java
public void put(byte[] bytes, int start, int end) { byte[] buffer = chunk(); for (int i = start; i < end; i++) { if (position == buffer.length) { buffer = alloc(); } buffer[position++] = bytes[i]; size++; } ...
[ "public", "void", "put", "(", "byte", "[", "]", "bytes", ",", "int", "start", ",", "int", "end", ")", "{", "byte", "[", "]", "buffer", "=", "chunk", "(", ")", ";", "for", "(", "int", "i", "=", "start", ";", "i", "<", "end", ";", "i", "++", ...
Writes a range of bytes from the specified array. @param bytes Array containing the bytes to be written. @param start Start of the range (inclusive). @param end End of the range (exclusive).
[ "Writes", "a", "range", "of", "bytes", "from", "the", "specified", "array", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/DynamicByteBuffer.java#L172-L183
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPolicyDefinitionsInner.java
ServiceEndpointPolicyDefinitionsInner.createOrUpdateAsync
public Observable<ServiceEndpointPolicyDefinitionInner> createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { """ Creates or updates a service endpoint policy definition in...
java
public Observable<ServiceEndpointPolicyDefinitionInner> createOrUpdateAsync(String resourceGroupName, String serviceEndpointPolicyName, String serviceEndpointPolicyDefinitionName, ServiceEndpointPolicyDefinitionInner serviceEndpointPolicyDefinitions) { return createOrUpdateWithServiceResponseAsync(resourceGroup...
[ "public", "Observable", "<", "ServiceEndpointPolicyDefinitionInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "serviceEndpointPolicyName", ",", "String", "serviceEndpointPolicyDefinitionName", ",", "ServiceEndpointPolicyDefinitionInner", "servi...
Creates or updates a service endpoint policy definition in the specified service endpoint policy. @param resourceGroupName The name of the resource group. @param serviceEndpointPolicyName The name of the service endpoint policy. @param serviceEndpointPolicyDefinitionName The name of the service endpoint policy definit...
[ "Creates", "or", "updates", "a", "service", "endpoint", "policy", "definition", "in", "the", "specified", "service", "endpoint", "policy", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/ServiceEndpointPolicyDefinitionsInner.java#L391-L398
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java
IHEAuditor.auditActorStopEvent
public void auditActorStopEvent(RFC3881EventOutcomeCodes eventOutcome, String actorName, String actorStopper) { """ Sends a DICOM Application Activity / Application Stop Event audit message @param eventOutcome Event Outcome Indicator @param actorName Application Participant User ID (Actor Name) @param actorSt...
java
public void auditActorStopEvent(RFC3881EventOutcomeCodes eventOutcome, String actorName, String actorStopper) { if (!isAuditorEnabled()) { return; } ApplicationStopEvent stopEvent = new ApplicationStopEvent(eventOutcome); stopEvent.setAuditSourceId(getAuditSourceId(), getAuditEnterpriseSiteId()); stopEve...
[ "public", "void", "auditActorStopEvent", "(", "RFC3881EventOutcomeCodes", "eventOutcome", ",", "String", "actorName", ",", "String", "actorStopper", ")", "{", "if", "(", "!", "isAuditorEnabled", "(", ")", ")", "{", "return", ";", "}", "ApplicationStopEvent", "stop...
Sends a DICOM Application Activity / Application Stop Event audit message @param eventOutcome Event Outcome Indicator @param actorName Application Participant User ID (Actor Name) @param actorStopper Application Starter Participant User ID (Actor Starter Name)
[ "Sends", "a", "DICOM", "Application", "Activity", "/", "Application", "Stop", "Event", "audit", "message" ]
train
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/IHEAuditor.java#L624-L636
hyperledger/fabric-sdk-java
src/main/java/org/hyperledger/fabric/sdk/HFClient.java
HFClient.newChannel
public Channel newChannel(String name) throws InvalidArgumentException { """ newChannel - already configured channel. @param name @return a new channel. @throws InvalidArgumentException """ clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Chan...
java
public Channel newChannel(String name) throws InvalidArgumentException { clientCheck(); if (Utils.isNullOrEmpty(name)) { throw new InvalidArgumentException("Channel name can not be null or empty string."); } synchronized (channels) { if (channels.containsKey(nam...
[ "public", "Channel", "newChannel", "(", "String", "name", ")", "throws", "InvalidArgumentException", "{", "clientCheck", "(", ")", ";", "if", "(", "Utils", ".", "isNullOrEmpty", "(", "name", ")", ")", "{", "throw", "new", "InvalidArgumentException", "(", "\"Ch...
newChannel - already configured channel. @param name @return a new channel. @throws InvalidArgumentException
[ "newChannel", "-", "already", "configured", "channel", "." ]
train
https://github.com/hyperledger/fabric-sdk-java/blob/4a2d7b3408b8b0a1ed812aa36942c438159c37a0/src/main/java/org/hyperledger/fabric/sdk/HFClient.java#L230-L249
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.hpcspot_consumption_job_reference_GET
public OvhPrice hpcspot_consumption_job_reference_GET(net.minidev.ovh.api.price.hpcspot.consumption.OvhJobEnum reference) throws IOException { """ Get the price of a JOB consumption for 1 hour REST: GET /price/hpcspot/consumption/job/{reference} @param reference [required] The reference of the JOB consumption ...
java
public OvhPrice hpcspot_consumption_job_reference_GET(net.minidev.ovh.api.price.hpcspot.consumption.OvhJobEnum reference) throws IOException { String qPath = "/price/hpcspot/consumption/job/{reference}"; StringBuilder sb = path(qPath, reference); String resp = exec(qPath, "GET", sb.toString(), null); return con...
[ "public", "OvhPrice", "hpcspot_consumption_job_reference_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "hpcspot", ".", "consumption", ".", "OvhJobEnum", "reference", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/pr...
Get the price of a JOB consumption for 1 hour REST: GET /price/hpcspot/consumption/job/{reference} @param reference [required] The reference of the JOB consumption
[ "Get", "the", "price", "of", "a", "JOB", "consumption", "for", "1", "hour" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L180-L185
michel-kraemer/citeproc-java
citeproc-java/src/main/java/de/undercouch/citeproc/bibtex/BibTeXConverter.java
BibTeXConverter.loadDatabase
public BibTeXDatabase loadDatabase(InputStream is) throws IOException, ParseException { """ <p>Loads a BibTeX database from a stream.</p> <p>This method does not close the given stream. The caller is responsible for closing it.</p> @param is the input stream to read from @return the BibTeX database @throws IO...
java
public BibTeXDatabase loadDatabase(InputStream is) throws IOException, ParseException { Reader reader = new InputStreamReader(is, "UTF-8"); BibTeXParser parser = new BibTeXParser() { @Override public void checkStringResolution(Key key, BibTeXString string) { if (string == null) { //ignore } } ...
[ "public", "BibTeXDatabase", "loadDatabase", "(", "InputStream", "is", ")", "throws", "IOException", ",", "ParseException", "{", "Reader", "reader", "=", "new", "InputStreamReader", "(", "is", ",", "\"UTF-8\"", ")", ";", "BibTeXParser", "parser", "=", "new", "Bib...
<p>Loads a BibTeX database from a stream.</p> <p>This method does not close the given stream. The caller is responsible for closing it.</p> @param is the input stream to read from @return the BibTeX database @throws IOException if the database could not be read @throws ParseException if the database is invalid
[ "<p", ">", "Loads", "a", "BibTeX", "database", "from", "a", "stream", ".", "<", "/", "p", ">", "<p", ">", "This", "method", "does", "not", "close", "the", "given", "stream", ".", "The", "caller", "is", "responsible", "for", "closing", "it", ".", "<",...
train
https://github.com/michel-kraemer/citeproc-java/blob/1d5bf0e7bbb2bdc47309530babf0ecaba838bf10/citeproc-java/src/main/java/de/undercouch/citeproc/bibtex/BibTeXConverter.java#L139-L155
UrielCh/ovh-java-sdk
ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java
ApiOvhDedicatedCloud.location_pccZone_hostProfile_id_GET
public OvhHostProfile location_pccZone_hostProfile_id_GET(String pccZone, Long id) throws IOException { """ Get this object properties REST: GET /dedicatedCloud/location/{pccZone}/hostProfile/{id} @param pccZone [required] Name of pccZone @param id [required] Id of Host profile """ String qPath = "/dedi...
java
public OvhHostProfile location_pccZone_hostProfile_id_GET(String pccZone, Long id) throws IOException { String qPath = "/dedicatedCloud/location/{pccZone}/hostProfile/{id}"; StringBuilder sb = path(qPath, pccZone, id); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhHostProfile....
[ "public", "OvhHostProfile", "location_pccZone_hostProfile_id_GET", "(", "String", "pccZone", ",", "Long", "id", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dedicatedCloud/location/{pccZone}/hostProfile/{id}\"", ";", "StringBuilder", "sb", "=", "path", "...
Get this object properties REST: GET /dedicatedCloud/location/{pccZone}/hostProfile/{id} @param pccZone [required] Name of pccZone @param id [required] Id of Host profile
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dedicatedCloud/src/main/java/net/minidev/ovh/api/ApiOvhDedicatedCloud.java#L3008-L3013
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/integration/WSHelper.java
WSHelper.hasAttachment
public static boolean hasAttachment( final Deployment dep, final Class< ? > key ) { """ Returns true if webservice deployment have attachment value associated with the <b>key</b>. @param dep webservice deployment @param key attachment key @return true if contains attachment, false otherwise """ retu...
java
public static boolean hasAttachment( final Deployment dep, final Class< ? > key ) { return WSHelper.getOptionalAttachment( dep, key ) != null; }
[ "public", "static", "boolean", "hasAttachment", "(", "final", "Deployment", "dep", ",", "final", "Class", "<", "?", ">", "key", ")", "{", "return", "WSHelper", ".", "getOptionalAttachment", "(", "dep", ",", "key", ")", "!=", "null", ";", "}" ]
Returns true if webservice deployment have attachment value associated with the <b>key</b>. @param dep webservice deployment @param key attachment key @return true if contains attachment, false otherwise
[ "Returns", "true", "if", "webservice", "deployment", "have", "attachment", "value", "associated", "with", "the", "<b", ">", "key<", "/", "b", ">", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/integration/WSHelper.java#L92-L95
zaproxy/zaproxy
src/org/apache/commons/httpclient/HttpMethodBase.java
HttpMethodBase.addRequestHeader
@Override public void addRequestHeader(String headerName, String headerValue) { """ Adds the specified request header, NOT overwriting any previous value. Note that header-name matching is case insensitive. @param headerName the header's name @param headerValue the header's value """ addReques...
java
@Override public void addRequestHeader(String headerName, String headerValue) { addRequestHeader(new Header(headerName, headerValue)); }
[ "@", "Override", "public", "void", "addRequestHeader", "(", "String", "headerName", ",", "String", "headerValue", ")", "{", "addRequestHeader", "(", "new", "Header", "(", "headerName", ",", "headerValue", ")", ")", ";", "}" ]
Adds the specified request header, NOT overwriting any previous value. Note that header-name matching is case insensitive. @param headerName the header's name @param headerValue the header's value
[ "Adds", "the", "specified", "request", "header", "NOT", "overwriting", "any", "previous", "value", ".", "Note", "that", "header", "-", "name", "matching", "is", "case", "insensitive", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/apache/commons/httpclient/HttpMethodBase.java#L1000-L1003
symphonyoss/messageml-utils
src/main/java/org/symphonyoss/symphony/messageml/util/IndentedPrintStream.java
IndentedPrintStream.println
public void println(int tempIndent, char x) { """ Indent the current line and print a character on the same line, then print a line break @param tempIndent magnitude of the indent (number of tab spaces) @param x character to be printed """ if (startOfLine) { doIndent(tempIndent); } super.p...
java
public void println(int tempIndent, char x) { if (startOfLine) { doIndent(tempIndent); } super.println(x); startOfLine = true; }
[ "public", "void", "println", "(", "int", "tempIndent", ",", "char", "x", ")", "{", "if", "(", "startOfLine", ")", "{", "doIndent", "(", "tempIndent", ")", ";", "}", "super", ".", "println", "(", "x", ")", ";", "startOfLine", "=", "true", ";", "}" ]
Indent the current line and print a character on the same line, then print a line break @param tempIndent magnitude of the indent (number of tab spaces) @param x character to be printed
[ "Indent", "the", "current", "line", "and", "print", "a", "character", "on", "the", "same", "line", "then", "print", "a", "line", "break" ]
train
https://github.com/symphonyoss/messageml-utils/blob/68daed66267062d144a05b3ee9a9bf4b715e3f95/src/main/java/org/symphonyoss/symphony/messageml/util/IndentedPrintStream.java#L302-L308
craftercms/deployer
src/main/java/org/craftercms/deployer/utils/GitUtils.java
GitUtils.addRemote
private static void addRemote(Git git, String remoteName, String remoteUrl) throws GitAPIException, URISyntaxException { """ Adds a remote if it doesn't exist. If the remote exists but the URL is different, updates the URL @p...
java
private static void addRemote(Git git, String remoteName, String remoteUrl) throws GitAPIException, URISyntaxException { String currentUrl = git.getRepository().getConfig().getString("remote", remoteName, "url"); if (...
[ "private", "static", "void", "addRemote", "(", "Git", "git", ",", "String", "remoteName", ",", "String", "remoteUrl", ")", "throws", "GitAPIException", ",", "URISyntaxException", "{", "String", "currentUrl", "=", "git", ".", "getRepository", "(", ")", ".", "ge...
Adds a remote if it doesn't exist. If the remote exists but the URL is different, updates the URL @param git the Git repo @param remoteName the name oif the remote @param remoteUrl the URL of the remote @throws GitAPIException if a Git error occurs @throws URISyntaxException if the remote URL is an invalid Git URL
[ "Adds", "a", "remote", "if", "it", "doesn", "t", "exist", ".", "If", "the", "remote", "exists", "but", "the", "URL", "is", "different", "updates", "the", "URL" ]
train
https://github.com/craftercms/deployer/blob/3ed446e3cc8af1055de2de6f871907f90ef27f63/src/main/java/org/craftercms/deployer/utils/GitUtils.java#L204-L220
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/lang/MessageResolver.java
MessageResolver.getMessage
public String getMessage(final MSLocale formatLocale, Locale runtimeLocale, final String key) { """ 書式のロケールを優先して、キーに対するメッセージを取得する。 formatLocaleがnullのとき、runtimeLocaleから値を取得する。 @since 0.10 @param formatLocale 書式に指定されているロケール。nullの場合がある。 @param runtimeLocale 実行時のロケール。 @param key メッセージキー @return 該当するロケールのメッセージが...
java
public String getMessage(final MSLocale formatLocale, Locale runtimeLocale, final String key) { if(formatLocale != null) { return getMessage(formatLocale, key); } else { return getMessage(runtimeLocale, key); } }
[ "public", "String", "getMessage", "(", "final", "MSLocale", "formatLocale", ",", "Locale", "runtimeLocale", ",", "final", "String", "key", ")", "{", "if", "(", "formatLocale", "!=", "null", ")", "{", "return", "getMessage", "(", "formatLocale", ",", "key", "...
書式のロケールを優先して、キーに対するメッセージを取得する。 formatLocaleがnullのとき、runtimeLocaleから値を取得する。 @since 0.10 @param formatLocale 書式に指定されているロケール。nullの場合がある。 @param runtimeLocale 実行時のロケール。 @param key メッセージキー @return 該当するロケールのメッセージが見つからない場合は、デフォルトのリソースから取得する。
[ "書式のロケールを優先して、キーに対するメッセージを取得する。", "formatLocaleがnullのとき、runtimeLocaleから値を取得する。" ]
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/lang/MessageResolver.java#L338-L346
grandstaish/paperparcel
paperparcel-compiler/src/main/java/paperparcel/Utils.java
Utils.isCreatorType
static boolean isCreatorType(Element element, Elements elements, Types types) { """ Returns true if {@code element} is a {@code Parcelable.Creator} type. """ TypeMirror creatorType = types.getDeclaredType( elements.getTypeElement(PARCELABLE_CREATOR_CLASS_NAME), types.getWildcardType(null, n...
java
static boolean isCreatorType(Element element, Elements elements, Types types) { TypeMirror creatorType = types.getDeclaredType( elements.getTypeElement(PARCELABLE_CREATOR_CLASS_NAME), types.getWildcardType(null, null)); return types.isAssignable(element.asType(), creatorType); }
[ "static", "boolean", "isCreatorType", "(", "Element", "element", ",", "Elements", "elements", ",", "Types", "types", ")", "{", "TypeMirror", "creatorType", "=", "types", ".", "getDeclaredType", "(", "elements", ".", "getTypeElement", "(", "PARCELABLE_CREATOR_CLASS_N...
Returns true if {@code element} is a {@code Parcelable.Creator} type.
[ "Returns", "true", "if", "{" ]
train
https://github.com/grandstaish/paperparcel/blob/917686ced81b335b6708d81d6cc0e3e496f7280d/paperparcel-compiler/src/main/java/paperparcel/Utils.java#L212-L217
baasbox/Android-SDK
library/src/main/java/com/baasbox/android/BaasDocument.java
BaasDocument.saveSync
public BaasResult<BaasDocument> saveSync(SaveMode mode,BaasACL acl) { """ Synchronously saves the document on the server with initial acl @param mode {@link com.baasbox.android.SaveMode} @param acl {@link com.baasbox.android.BaasACL} the initial acl settings @return the result of the request """ Baa...
java
public BaasResult<BaasDocument> saveSync(SaveMode mode,BaasACL acl) { BaasBox box = BaasBox.getDefaultChecked(); if (mode == null) throw new IllegalArgumentException("mode cannot be null"); Save save = new Save(box, mode,acl, this, RequestOptions.DEFAULT, null); return box.submitSync(sav...
[ "public", "BaasResult", "<", "BaasDocument", ">", "saveSync", "(", "SaveMode", "mode", ",", "BaasACL", "acl", ")", "{", "BaasBox", "box", "=", "BaasBox", ".", "getDefaultChecked", "(", ")", ";", "if", "(", "mode", "==", "null", ")", "throw", "new", "Ille...
Synchronously saves the document on the server with initial acl @param mode {@link com.baasbox.android.SaveMode} @param acl {@link com.baasbox.android.BaasACL} the initial acl settings @return the result of the request
[ "Synchronously", "saves", "the", "document", "on", "the", "server", "with", "initial", "acl" ]
train
https://github.com/baasbox/Android-SDK/blob/6bb2203246b885b2ad63a7bfaf37c83caf15e0d8/library/src/main/java/com/baasbox/android/BaasDocument.java#L656-L661
stevespringett/Alpine
alpine/src/main/java/alpine/persistence/AlpineQueryManager.java
AlpineQueryManager.hasPermission
public boolean hasPermission(final Team team, String permissionName) { """ Determines if the specified Team has been assigned the specified permission. @param team the Team to query @param permissionName the name of the permission @return true if the team has the permission assigned, false if not @since 1.0.0 ...
java
public boolean hasPermission(final Team team, String permissionName) { final Query query = pm.newQuery(Permission.class, "name == :permissionName && teams.contains(:team)"); query.setResult("count(id)"); return (Long) query.execute(permissionName, team) > 0; }
[ "public", "boolean", "hasPermission", "(", "final", "Team", "team", ",", "String", "permissionName", ")", "{", "final", "Query", "query", "=", "pm", ".", "newQuery", "(", "Permission", ".", "class", ",", "\"name == :permissionName && teams.contains(:team)\"", ")", ...
Determines if the specified Team has been assigned the specified permission. @param team the Team to query @param permissionName the name of the permission @return true if the team has the permission assigned, false if not @since 1.0.0
[ "Determines", "if", "the", "specified", "Team", "has", "been", "assigned", "the", "specified", "permission", "." ]
train
https://github.com/stevespringett/Alpine/blob/6c5ef5e1ba4f38922096f1307d3950c09edb3093/alpine/src/main/java/alpine/persistence/AlpineQueryManager.java#L557-L561
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommonServerReceiveListener.java
CommonServerReceiveListener.rejectHandshake
private void rejectHandshake(Conversation conversation, int requestNumber, String rejectedField) { """ This method is used to inform the client that we are rejecting their handshake. Typically this will never happen unless a third party client is written, or an internal error occurs. However, we should check for...
java
private void rejectHandshake(Conversation conversation, int requestNumber, String rejectedField) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "rejectHandshake", new Object[] { conversation, requestNumber, rejected...
[ "private", "void", "rejectHandshake", "(", "Conversation", "conversation", ",", "int", "requestNumber", ",", "String", "rejectedField", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")",...
This method is used to inform the client that we are rejecting their handshake. Typically this will never happen unless a third party client is written, or an internal error occurs. However, we should check for an inproperly formatted handshake and inform the client if such an error occurs. @param conversation @param ...
[ "This", "method", "is", "used", "to", "inform", "the", "client", "that", "we", "are", "rejecting", "their", "handshake", ".", "Typically", "this", "will", "never", "happen", "unless", "a", "third", "party", "client", "is", "written", "or", "an", "internal", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.server/src/com/ibm/ws/sib/comms/server/CommonServerReceiveListener.java#L768-L796
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java
ReflectUtil.getFieldValue
public static Object getFieldValue(Object obj, Field field) throws UtilException { """ 获取字段值 @param obj 对象 @param field 字段 @return 字段值 @throws UtilException 包装IllegalAccessException异常 """ if (null == obj || null == field) { return null; } field.setAccessible(true); Object result = null; ...
java
public static Object getFieldValue(Object obj, Field field) throws UtilException { if (null == obj || null == field) { return null; } field.setAccessible(true); Object result = null; try { result = field.get(obj); } catch (IllegalAccessException e) { throw new UtilException(e, "IllegalAcce...
[ "public", "static", "Object", "getFieldValue", "(", "Object", "obj", ",", "Field", "field", ")", "throws", "UtilException", "{", "if", "(", "null", "==", "obj", "||", "null", "==", "field", ")", "{", "return", "null", ";", "}", "field", ".", "setAccessib...
获取字段值 @param obj 对象 @param field 字段 @return 字段值 @throws UtilException 包装IllegalAccessException异常
[ "获取字段值" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/ReflectUtil.java#L194-L206
jbossws/jbossws-common
src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java
ReflectionUtils.assertNoCheckedExceptionsAreThrown
public static void assertNoCheckedExceptionsAreThrown(final Method method, Class<? extends Annotation> annotation) { """ Asserts method don't throw checked exceptions. @param method to validate @param annotation annotation to propagate in exception message """ Class<?>[] declaredExceptions = method.g...
java
public static void assertNoCheckedExceptionsAreThrown(final Method method, Class<? extends Annotation> annotation) { Class<?>[] declaredExceptions = method.getExceptionTypes(); for (int i = 0; i < declaredExceptions.length; i++) { Class<?> exception = declaredExceptions[i]; if (!...
[ "public", "static", "void", "assertNoCheckedExceptionsAreThrown", "(", "final", "Method", "method", ",", "Class", "<", "?", "extends", "Annotation", ">", "annotation", ")", "{", "Class", "<", "?", ">", "[", "]", "declaredExceptions", "=", "method", ".", "getEx...
Asserts method don't throw checked exceptions. @param method to validate @param annotation annotation to propagate in exception message
[ "Asserts", "method", "don", "t", "throw", "checked", "exceptions", "." ]
train
https://github.com/jbossws/jbossws-common/blob/fcff8a3ef9bfe046d6fa8c855a3fe4f62841add7/src/main/java/org/jboss/ws/common/injection/finders/ReflectionUtils.java#L176-L187
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/Preconditions.java
Preconditions.checkInstanceOf
public static <E> E checkInstanceOf(Class<E> type, Object object, String errorMessage) { """ Tests whether the supplied object is an instance of the supplied class type. @param type the expected type. @param object the object tested against the expected type. @param errorMessage the errorMessage...
java
public static <E> E checkInstanceOf(Class<E> type, Object object, String errorMessage) { isNotNull(type, "type"); if (!type.isInstance(object)) { throw new IllegalArgumentException(errorMessage); } return (E) object; }
[ "public", "static", "<", "E", ">", "E", "checkInstanceOf", "(", "Class", "<", "E", ">", "type", ",", "Object", "object", ",", "String", "errorMessage", ")", "{", "isNotNull", "(", "type", ",", "\"type\"", ")", ";", "if", "(", "!", "type", ".", "isIns...
Tests whether the supplied object is an instance of the supplied class type. @param type the expected type. @param object the object tested against the expected type. @param errorMessage the errorMessage @return the object argument. @throws java.lang.IllegalArgumentException if the object is not an insta...
[ "Tests", "whether", "the", "supplied", "object", "is", "an", "instance", "of", "the", "supplied", "class", "type", "." ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/Preconditions.java#L272-L278
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/ConvergedApplicationContextFacade.java
ConvergedApplicationContextFacade.doPrivileged
private Object doPrivileged(final String methodName, final Object[] params) { """ Use reflection to invoke the requested method. Cache the method object to speed up the process @param methodName The method to call. @param params The arguments passed to the called method. """ try{ return ...
java
private Object doPrivileged(final String methodName, final Object[] params) { try{ return invokeMethod(context, methodName, params); }catch(Throwable t){ throw new RuntimeException(t.getMessage(), t); } }
[ "private", "Object", "doPrivileged", "(", "final", "String", "methodName", ",", "final", "Object", "[", "]", "params", ")", "{", "try", "{", "return", "invokeMethod", "(", "context", ",", "methodName", ",", "params", ")", ";", "}", "catch", "(", "Throwable...
Use reflection to invoke the requested method. Cache the method object to speed up the process @param methodName The method to call. @param params The arguments passed to the called method.
[ "Use", "reflection", "to", "invoke", "the", "requested", "method", ".", "Cache", "the", "method", "object", "to", "speed", "up", "the", "process" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/ConvergedApplicationContextFacade.java#L725-L731
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.buildMapClickTableDataWithMapBounds
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance) { """ Perform a query based upon the map click location and build feature table data @param latLng location @param zoom current zoom level @param mapBounds map view bounds ...
java
public FeatureTableData buildMapClickTableDataWithMapBounds(LatLng latLng, double zoom, BoundingBox mapBounds, double tolerance) { return buildMapClickTableDataWithMapBounds(latLng, zoom, mapBounds, tolerance, null); }
[ "public", "FeatureTableData", "buildMapClickTableDataWithMapBounds", "(", "LatLng", "latLng", ",", "double", "zoom", ",", "BoundingBox", "mapBounds", ",", "double", "tolerance", ")", "{", "return", "buildMapClickTableDataWithMapBounds", "(", "latLng", ",", "zoom", ",", ...
Perform a query based upon the map click location and build feature table data @param latLng location @param zoom current zoom level @param mapBounds map view bounds @param tolerance distance tolerance @return table data on what was clicked, or null @since 2.0.0
[ "Perform", "a", "query", "based", "upon", "the", "map", "click", "location", "and", "build", "feature", "table", "data" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L501-L503
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.importCertificateAsync
public Observable<CertificateBundle> importCertificateAsync(String vaultBaseUrl, String certificateName, String base64EncodedCertificate) { """ Imports a certificate into a specified key vault. Imports an existing valid certificate, containing a private key, into Azure Key Vault. The certificate to be imported ca...
java
public Observable<CertificateBundle> importCertificateAsync(String vaultBaseUrl, String certificateName, String base64EncodedCertificate) { return importCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, base64EncodedCertificate).map(new Func1<ServiceResponse<CertificateBundle>, CertificateBundl...
[ "public", "Observable", "<", "CertificateBundle", ">", "importCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "String", "base64EncodedCertificate", ")", "{", "return", "importCertificateWithServiceResponseAsync", "(", "vaultBaseUrl", ...
Imports a certificate into a specified key vault. Imports an existing valid certificate, containing a private key, into Azure Key Vault. The certificate to be imported can be in either PFX or PEM format. If the certificate is in PEM format the PEM file must contain the key as well as x509 certificates. This operation r...
[ "Imports", "a", "certificate", "into", "a", "specified", "key", "vault", ".", "Imports", "an", "existing", "valid", "certificate", "containing", "a", "private", "key", "into", "Azure", "Key", "Vault", ".", "The", "certificate", "to", "be", "imported", "can", ...
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#L6713-L6720
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1InstanceGetter.java
V1InstanceGetter.primaryWorkitems
public Collection<PrimaryWorkitem> primaryWorkitems( PrimaryWorkitemFilter filter) { """ Get primary workitems (stories and defects) filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as ...
java
public Collection<PrimaryWorkitem> primaryWorkitems( PrimaryWorkitemFilter filter) { return get(PrimaryWorkitem.class, (filter != null) ? filter : new PrimaryWorkitemFilter()); }
[ "public", "Collection", "<", "PrimaryWorkitem", ">", "primaryWorkitems", "(", "PrimaryWorkitemFilter", "filter", ")", "{", "return", "get", "(", "PrimaryWorkitem", ".", "class", ",", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "PrimaryWorkitemFi...
Get primary workitems (stories and defects) filtered by the criteria specified in the passed in filter. @param filter Limit the items returned. If null, then all items returned. @return Collection of items as specified in the filter.
[ "Get", "primary", "workitems", "(", "stories", "and", "defects", ")", "filtered", "by", "the", "criteria", "specified", "in", "the", "passed", "in", "filter", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1InstanceGetter.java#L146-L149
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java
IterableUtils.itemToIndexMap
public static <T> ImmutableMap<T, Integer> itemToIndexMap(final Iterable<T> sequence) { """ Transforms an Iterable<T> to a Map<T, Integer> where each item is mapped to its zero-indexed position in the Iterable's sequence. If an item occurs twice, an {@link IllegalArgumentException} will be thrown. """ r...
java
public static <T> ImmutableMap<T, Integer> itemToIndexMap(final Iterable<T> sequence) { return itemToIndexMapStartingFrom(sequence, 0); }
[ "public", "static", "<", "T", ">", "ImmutableMap", "<", "T", ",", "Integer", ">", "itemToIndexMap", "(", "final", "Iterable", "<", "T", ">", "sequence", ")", "{", "return", "itemToIndexMapStartingFrom", "(", "sequence", ",", "0", ")", ";", "}" ]
Transforms an Iterable<T> to a Map<T, Integer> where each item is mapped to its zero-indexed position in the Iterable's sequence. If an item occurs twice, an {@link IllegalArgumentException} will be thrown.
[ "Transforms", "an", "Iterable<T", ">", "to", "a", "Map<T", "Integer", ">", "where", "each", "item", "is", "mapped", "to", "its", "zero", "-", "indexed", "position", "in", "the", "Iterable", "s", "sequence", ".", "If", "an", "item", "occurs", "twice", "an...
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/IterableUtils.java#L296-L298
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/markup/AbstractImageMediaMarkupBuilder.java
AbstractImageMediaMarkupBuilder.setAdditionalAttributes
protected void setAdditionalAttributes(@Nullable HtmlElement<?> mediaElement, @NotNull Media media) { """ Set additional attributes on the media element from the MediaArgs properties. @param mediaElement Media element @param media Media """ if (mediaElement == null) { return; } MediaArgs me...
java
protected void setAdditionalAttributes(@Nullable HtmlElement<?> mediaElement, @NotNull Media media) { if (mediaElement == null) { return; } MediaArgs mediaArgs = media.getMediaRequest().getMediaArgs(); for (Entry<String, Object> entry : mediaArgs.getProperties().entrySet()) { if (StringUtils...
[ "protected", "void", "setAdditionalAttributes", "(", "@", "Nullable", "HtmlElement", "<", "?", ">", "mediaElement", ",", "@", "NotNull", "Media", "media", ")", "{", "if", "(", "mediaElement", "==", "null", ")", "{", "return", ";", "}", "MediaArgs", "mediaArg...
Set additional attributes on the media element from the MediaArgs properties. @param mediaElement Media element @param media Media
[ "Set", "additional", "attributes", "on", "the", "media", "element", "from", "the", "MediaArgs", "properties", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/markup/AbstractImageMediaMarkupBuilder.java#L102-L115
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
FSDirectory.getHdfsFileInfo
HdfsFileStatus getHdfsFileInfo(String src) { """ Get the file info for a specific file. @param src The string representation of the path to the file @return object containing information regarding the file or null if file not found """ String srcs = normalizePath(src); byte[][] components = INodeDir...
java
HdfsFileStatus getHdfsFileInfo(String src) { String srcs = normalizePath(src); byte[][] components = INodeDirectory.getPathComponents(srcs); readLock(); try { INode targetNode = rootDir.getNode(components); if (targetNode == null) { return null; } else { return cr...
[ "HdfsFileStatus", "getHdfsFileInfo", "(", "String", "src", ")", "{", "String", "srcs", "=", "normalizePath", "(", "src", ")", ";", "byte", "[", "]", "[", "]", "components", "=", "INodeDirectory", ".", "getPathComponents", "(", "srcs", ")", ";", "readLock", ...
Get the file info for a specific file. @param src The string representation of the path to the file @return object containing information regarding the file or null if file not found
[ "Get", "the", "file", "info", "for", "a", "specific", "file", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java#L1852-L1867
apereo/cas
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/validate/SamlObjectSignatureValidator.java
SamlObjectSignatureValidator.buildEntityCriteriaForSigningCredential
protected void buildEntityCriteriaForSigningCredential(final RequestAbstractType profileRequest, final CriteriaSet criteriaSet) { """ Build entity criteria for signing credential. @param profileRequest the profile request @param criteriaSet the criteria set """ criteriaSet.add(new EntityIdCriter...
java
protected void buildEntityCriteriaForSigningCredential(final RequestAbstractType profileRequest, final CriteriaSet criteriaSet) { criteriaSet.add(new EntityIdCriterion(SamlIdPUtils.getIssuerFromSamlObject(profileRequest))); criteriaSet.add(new EntityRoleCriterion(SPSSODescriptor.DEFAULT_ELEMENT_NAME)); ...
[ "protected", "void", "buildEntityCriteriaForSigningCredential", "(", "final", "RequestAbstractType", "profileRequest", ",", "final", "CriteriaSet", "criteriaSet", ")", "{", "criteriaSet", ".", "add", "(", "new", "EntityIdCriterion", "(", "SamlIdPUtils", ".", "getIssuerFro...
Build entity criteria for signing credential. @param profileRequest the profile request @param criteriaSet the criteria set
[ "Build", "entity", "criteria", "for", "signing", "credential", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/validate/SamlObjectSignatureValidator.java#L266-L269
wcm-io-caravan/caravan-hal
comparison/src/main/java/io/wcm/caravan/hal/comparison/impl/HalComparisonRecursionImpl.java
HalComparisonRecursionImpl.compareRecursively
public Observable<HalDifference> compareRecursively(HalComparisonContextImpl context, HalResource expected, HalResource actual) { """ This method is initially called by the {@link HalComparisonImpl} with the API entry point resources, and then again for each embedded and linked resource that is to be processed (a...
java
public Observable<HalDifference> compareRecursively(HalComparisonContextImpl context, HalResource expected, HalResource actual) { // don't follow links to any resources later that are already embedded (and have a self link) in the current resource expected.collectLinks("self").stream() .map(Link::getHr...
[ "public", "Observable", "<", "HalDifference", ">", "compareRecursively", "(", "HalComparisonContextImpl", "context", ",", "HalResource", "expected", ",", "HalResource", "actual", ")", "{", "// don't follow links to any resources later that are already embedded (and have a self link...
This method is initially called by the {@link HalComparisonImpl} with the API entry point resources, and then again for each embedded and linked resource that is to be processed (as decided via the {@link EmbeddedProcessing} and {@link LinkProcessing} interfaces) @param context specifies in which part of the tree the c...
[ "This", "method", "is", "initially", "called", "by", "the", "{" ]
train
https://github.com/wcm-io-caravan/caravan-hal/blob/25d58756b58c70c8c48a17fe781e673dd93d5085/comparison/src/main/java/io/wcm/caravan/hal/comparison/impl/HalComparisonRecursionImpl.java#L76-L86
apache/incubator-gobblin
gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/restapi/RestApiConnector.java
RestApiConnector.getResponse
public CommandOutput<?, ?> getResponse(List<Command> cmds) throws RestApiProcessingException { """ get http response in json format using url @return json string with the response """ String url = cmds.get(0).getParams().get(0); log.info("URL: " + url); String jsonStr = null; HttpRequestBase ...
java
public CommandOutput<?, ?> getResponse(List<Command> cmds) throws RestApiProcessingException { String url = cmds.get(0).getParams().get(0); log.info("URL: " + url); String jsonStr = null; HttpRequestBase httpRequest = new HttpGet(url); addHeaders(httpRequest); HttpEntity httpEntity = null; ...
[ "public", "CommandOutput", "<", "?", ",", "?", ">", "getResponse", "(", "List", "<", "Command", ">", "cmds", ")", "throws", "RestApiProcessingException", "{", "String", "url", "=", "cmds", ".", "get", "(", "0", ")", ".", "getParams", "(", ")", ".", "ge...
get http response in json format using url @return json string with the response
[ "get", "http", "response", "in", "json", "format", "using", "url" ]
train
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-core/src/main/java/org/apache/gobblin/source/extractor/extract/restapi/RestApiConnector.java#L151-L189
voldemort/voldemort
src/java/voldemort/store/bdb/BdbNativeBackup.java
BdbNativeBackup.recordBackupSet
private void recordBackupSet(File backupDir) throws IOException { """ Records the list of backedup files into a text file @param filesInEnv @param backupDir """ String[] filesInEnv = env.getHome().list(); SimpleDateFormat format = new SimpleDateFormat("yyyy_MM_dd_kk_mm_ss"); String ...
java
private void recordBackupSet(File backupDir) throws IOException { String[] filesInEnv = env.getHome().list(); SimpleDateFormat format = new SimpleDateFormat("yyyy_MM_dd_kk_mm_ss"); String recordFileName = "backupset-" + format.format(new Date()); File recordFile = new File(backupDir, rec...
[ "private", "void", "recordBackupSet", "(", "File", "backupDir", ")", "throws", "IOException", "{", "String", "[", "]", "filesInEnv", "=", "env", ".", "getHome", "(", ")", ".", "list", "(", ")", ";", "SimpleDateFormat", "format", "=", "new", "SimpleDateFormat...
Records the list of backedup files into a text file @param filesInEnv @param backupDir
[ "Records", "the", "list", "of", "backedup", "files", "into", "a", "text", "file" ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/store/bdb/BdbNativeBackup.java#L184-L202
apache/reef
lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/client/uploader/JobUploader.java
JobUploader.createJobFolder
public JobFolder createJobFolder(final String finalJobFolderPath) throws IOException { """ Convenience override for int ids. @param finalJobFolderPath @return @throws IOException """ LOG.log(Level.FINE, "Final job submission Directory: " + finalJobFolderPath); return new JobFolder(this.fileSystem,...
java
public JobFolder createJobFolder(final String finalJobFolderPath) throws IOException { LOG.log(Level.FINE, "Final job submission Directory: " + finalJobFolderPath); return new JobFolder(this.fileSystem, new Path(finalJobFolderPath)); }
[ "public", "JobFolder", "createJobFolder", "(", "final", "String", "finalJobFolderPath", ")", "throws", "IOException", "{", "LOG", ".", "log", "(", "Level", ".", "FINE", ",", "\"Final job submission Directory: \"", "+", "finalJobFolderPath", ")", ";", "return", "new"...
Convenience override for int ids. @param finalJobFolderPath @return @throws IOException
[ "Convenience", "override", "for", "int", "ids", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/client/uploader/JobUploader.java#L69-L72
joinfaces/joinfaces
joinfaces-tools/joinfaces-scan-tools/src/main/java/org/joinfaces/tools/ScanResultHandler.java
ScanResultHandler.writeClassList
protected void writeClassList(File file, Collection<String> classNames) throws IOException { """ Helper method which writes a list of class names to the given file. @param file The target file in which the class names should be written. @param classNames The class names which should be written in the tar...
java
protected void writeClassList(File file, Collection<String> classNames) throws IOException { File baseDir = file.getParentFile(); if (baseDir.isDirectory() || baseDir.mkdirs()) { Files.write(file.toPath(), classNames, StandardCharsets.UTF_8); } else { throw new IOException(baseDir + " does not exist and ...
[ "protected", "void", "writeClassList", "(", "File", "file", ",", "Collection", "<", "String", ">", "classNames", ")", "throws", "IOException", "{", "File", "baseDir", "=", "file", ".", "getParentFile", "(", ")", ";", "if", "(", "baseDir", ".", "isDirectory",...
Helper method which writes a list of class names to the given file. @param file The target file in which the class names should be written. @param classNames The class names which should be written in the target file. @throws IOException when the class names could not be written to the target file.
[ "Helper", "method", "which", "writes", "a", "list", "of", "class", "names", "to", "the", "given", "file", "." ]
train
https://github.com/joinfaces/joinfaces/blob/c9fc811a9eaf695820951f2c04715297dd1e6d66/joinfaces-tools/joinfaces-scan-tools/src/main/java/org/joinfaces/tools/ScanResultHandler.java#L58-L67
Azure/azure-sdk-for-java
servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java
ClientFactory.createMessageSenderFromEntityPath
public static IMessageSender createMessageSenderFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException { """ Creates a message sender to the entity using the client settings. @param namespaceName namespace of entity @param entityPat...
java
public static IMessageSender createMessageSenderFromEntityPath(String namespaceName, String entityPath, ClientSettings clientSettings) throws InterruptedException, ServiceBusException { return Utils.completeFuture(createMessageSenderFromEntityPathAsync(namespaceName, entityPath, clientSettings)); }
[ "public", "static", "IMessageSender", "createMessageSenderFromEntityPath", "(", "String", "namespaceName", ",", "String", "entityPath", ",", "ClientSettings", "clientSettings", ")", "throws", "InterruptedException", ",", "ServiceBusException", "{", "return", "Utils", ".", ...
Creates a message sender to the entity using the client settings. @param namespaceName namespace of entity @param entityPath path of entity @param clientSettings client settings @return IMessageSender instance @throws InterruptedException if the current thread was interrupted while waiting @throws ServiceBusException i...
[ "Creates", "a", "message", "sender", "to", "the", "entity", "using", "the", "client", "settings", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/servicebus/data-plane/azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java#L65-L67
timewalker74/ffmq
core/src/main/java/net/timewalker/ffmq4/transport/PacketTransportHub.java
PacketTransportHub.createEndpoint
public synchronized PacketTransportEndpoint createEndpoint() throws JMSException { """ Create a new transport endpoint @return a new transport endpoint """ if (closed || transport.isClosed()) throw new FFMQException("Transport is closed", "TRANSPORT_CLOSED"); PacketTranspo...
java
public synchronized PacketTransportEndpoint createEndpoint() throws JMSException { if (closed || transport.isClosed()) throw new FFMQException("Transport is closed", "TRANSPORT_CLOSED"); PacketTransportEndpoint endpoint = new PacketTransportEndpoint(nextEndpointId++, this); ...
[ "public", "synchronized", "PacketTransportEndpoint", "createEndpoint", "(", ")", "throws", "JMSException", "{", "if", "(", "closed", "||", "transport", ".", "isClosed", "(", ")", ")", "throw", "new", "FFMQException", "(", "\"Transport is closed\"", ",", "\"TRANSPORT...
Create a new transport endpoint @return a new transport endpoint
[ "Create", "a", "new", "transport", "endpoint" ]
train
https://github.com/timewalker74/ffmq/blob/638773ee29a4a5f9c6119ed74ad14ac9c46382b3/core/src/main/java/net/timewalker/ffmq4/transport/PacketTransportHub.java#L42-L50
threerings/nenya
core/src/main/java/com/threerings/resource/ResourceManager.java
ResourceManager.loadImage
protected static BufferedImage loadImage (File file, boolean useFastIO) throws IOException { """ Loads an image from the supplied file. Supports {@link FastImageIO} files and formats supported by {@link ImageIO} and will load the appropriate one based on the useFastIO param. """ if (file == nu...
java
protected static BufferedImage loadImage (File file, boolean useFastIO) throws IOException { if (file == null) { return null; } else if (useFastIO) { return FastImageIO.read(file); } return ImageIO.read(file); }
[ "protected", "static", "BufferedImage", "loadImage", "(", "File", "file", ",", "boolean", "useFastIO", ")", "throws", "IOException", "{", "if", "(", "file", "==", "null", ")", "{", "return", "null", ";", "}", "else", "if", "(", "useFastIO", ")", "{", "re...
Loads an image from the supplied file. Supports {@link FastImageIO} files and formats supported by {@link ImageIO} and will load the appropriate one based on the useFastIO param.
[ "Loads", "an", "image", "from", "the", "supplied", "file", ".", "Supports", "{" ]
train
https://github.com/threerings/nenya/blob/3165a012fd859009db3367f87bd2a5b820cc760a/core/src/main/java/com/threerings/resource/ResourceManager.java#L880-L889
line/armeria
core/src/main/java/com/linecorp/armeria/server/docs/DocServiceBuilder.java
DocServiceBuilder.exampleRequestForMethod
public DocServiceBuilder exampleRequestForMethod(Class<?> serviceType, String methodName, Object... exampleRequests) { """ Adds the example requests for the method with the specified service type and method name. This method is a shortcut to: <pre>{@code exam...
java
public DocServiceBuilder exampleRequestForMethod(Class<?> serviceType, String methodName, Object... exampleRequests) { requireNonNull(exampleRequests, "exampleRequests"); return exampleRequestForMethod(serviceType, methodName, ImmutableList.copyOf(exa...
[ "public", "DocServiceBuilder", "exampleRequestForMethod", "(", "Class", "<", "?", ">", "serviceType", ",", "String", "methodName", ",", "Object", "...", "exampleRequests", ")", "{", "requireNonNull", "(", "exampleRequests", ",", "\"exampleRequests\"", ")", ";", "ret...
Adds the example requests for the method with the specified service type and method name. This method is a shortcut to: <pre>{@code exampleRequest(serviceType.getName(), exampleRequests); }</pre>
[ "Adds", "the", "example", "requests", "for", "the", "method", "with", "the", "specified", "service", "type", "and", "method", "name", ".", "This", "method", "is", "a", "shortcut", "to", ":", "<pre", ">", "{" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/docs/DocServiceBuilder.java#L186-L190
biojava/biojava
biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/color/LinearColorInterpolator.java
LinearColorInterpolator.setColorSpace
public void setColorSpace(ColorSpace colorSpace, InterpolationDirection[] dir) { """ Sets the ColorSpace to use for interpolation. The most common scheme for color spaces is to use linear components between 0 and 1 (for instance red,green,blue). For such a component, a linear interpolation between two colors ...
java
public void setColorSpace(ColorSpace colorSpace, InterpolationDirection[] dir) { if(dir.length < colorSpace.getNumComponents()) { throw new IllegalArgumentException( "Must specify an interpolation " + "direction for each colorspace component ("+colorSpace.getNumComponents()+")"); } this.colorSpace = color...
[ "public", "void", "setColorSpace", "(", "ColorSpace", "colorSpace", ",", "InterpolationDirection", "[", "]", "dir", ")", "{", "if", "(", "dir", ".", "length", "<", "colorSpace", ".", "getNumComponents", "(", ")", ")", "{", "throw", "new", "IllegalArgumentExcep...
Sets the ColorSpace to use for interpolation. The most common scheme for color spaces is to use linear components between 0 and 1 (for instance red,green,blue). For such a component, a linear interpolation between two colors is used. Sometimes a component may be in cylindrical coordinates. In this case, the component...
[ "Sets", "the", "ColorSpace", "to", "use", "for", "interpolation", "." ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure-gui/src/main/java/org/biojava/nbio/structure/gui/util/color/LinearColorInterpolator.java#L148-L155
Stratio/stratio-cassandra
src/java/org/apache/cassandra/db/RangeTombstoneList.java
RangeTombstoneList.addInternal
private void addInternal(int i, Composite start, Composite end, long markedAt, int delTime) { """ /* Adds the new tombstone at index i, growing and/or moving elements to make room for it. """ assert i >= 0; if (size == capacity()) growToFree(i); else if (i < size) ...
java
private void addInternal(int i, Composite start, Composite end, long markedAt, int delTime) { assert i >= 0; if (size == capacity()) growToFree(i); else if (i < size) moveElements(i); setInternal(i, start, end, markedAt, delTime); size++; }
[ "private", "void", "addInternal", "(", "int", "i", ",", "Composite", "start", ",", "Composite", "end", ",", "long", "markedAt", ",", "int", "delTime", ")", "{", "assert", "i", ">=", "0", ";", "if", "(", "size", "==", "capacity", "(", ")", ")", "growT...
/* Adds the new tombstone at index i, growing and/or moving elements to make room for it.
[ "/", "*", "Adds", "the", "new", "tombstone", "at", "index", "i", "growing", "and", "/", "or", "moving", "elements", "to", "make", "room", "for", "it", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/db/RangeTombstoneList.java#L681-L692
jblas-project/jblas
src/main/java/org/jblas/Singular.java
Singular.sparseSVD
public static ComplexDoubleMatrix[] sparseSVD(ComplexDoubleMatrix A) { """ Compute a singular-value decomposition of A (sparse variant). Sparse means that the matrices U and V are not square but only have as many columns (or rows) as necessary. @param A @return A ComplexDoubleMatrix[3] array of U, S, V such ...
java
public static ComplexDoubleMatrix[] sparseSVD(ComplexDoubleMatrix A) { int m = A.rows; int n = A.columns; ComplexDoubleMatrix U = new ComplexDoubleMatrix(m, min(m, n)); DoubleMatrix S = new DoubleMatrix(min(m, n)); ComplexDoubleMatrix V = new ComplexDoubleMatrix(min(m, n), n); ...
[ "public", "static", "ComplexDoubleMatrix", "[", "]", "sparseSVD", "(", "ComplexDoubleMatrix", "A", ")", "{", "int", "m", "=", "A", ".", "rows", ";", "int", "n", "=", "A", ".", "columns", ";", "ComplexDoubleMatrix", "U", "=", "new", "ComplexDoubleMatrix", "...
Compute a singular-value decomposition of A (sparse variant). Sparse means that the matrices U and V are not square but only have as many columns (or rows) as necessary. @param A @return A ComplexDoubleMatrix[3] array of U, S, V such that A = U * diag(S) * V*
[ "Compute", "a", "singular", "-", "value", "decomposition", "of", "A", "(", "sparse", "variant", ")", ".", "Sparse", "means", "that", "the", "matrices", "U", "and", "V", "are", "not", "square", "but", "only", "have", "as", "many", "columns", "(", "or", ...
train
https://github.com/jblas-project/jblas/blob/2818f231228e655cda80dfd8e0b87709fdfd8a70/src/main/java/org/jblas/Singular.java#L71-L88
banq/jdonframework
src/main/java/com/jdon/util/UtilValidate.java
UtilValidate.isTime
public static boolean isTime(String hour, String minute, String second) { """ isTime returns true if string arguments hour, minute, and second form a valid time. """ // catch invalid years(not 2- or 4-digit) and invalid months and days. if (isHour(hour) && isMinute(minute) && isSecond(second)...
java
public static boolean isTime(String hour, String minute, String second) { // catch invalid years(not 2- or 4-digit) and invalid months and days. if (isHour(hour) && isMinute(minute) && isSecond(second)) return true; else return false; }
[ "public", "static", "boolean", "isTime", "(", "String", "hour", ",", "String", "minute", ",", "String", "second", ")", "{", "// catch invalid years(not 2- or 4-digit) and invalid months and days.\r", "if", "(", "isHour", "(", "hour", ")", "&&", "isMinute", "(", "min...
isTime returns true if string arguments hour, minute, and second form a valid time.
[ "isTime", "returns", "true", "if", "string", "arguments", "hour", "minute", "and", "second", "form", "a", "valid", "time", "." ]
train
https://github.com/banq/jdonframework/blob/72b451caac04f775e57f52aaed3d8775044ead53/src/main/java/com/jdon/util/UtilValidate.java#L821-L827
azkaban/azkaban
azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java
FetchActiveFlowDao.fetchUnfinishedFlowsMetadata
public Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlowsMetadata() throws ExecutorManagerException { """ Fetch unfinished flows similar to {@link #fetchUnfinishedFlows}, excluding flow data. @return unfinished flows map @throws ExecutorManagerException the executor manager excep...
java
public Map<Integer, Pair<ExecutionReference, ExecutableFlow>> fetchUnfinishedFlowsMetadata() throws ExecutorManagerException { try { return this.dbOperator.query(FetchUnfinishedFlowsMetadata.FETCH_UNFINISHED_FLOWS_METADATA, new FetchUnfinishedFlowsMetadata()); } catch (final SQLException e...
[ "public", "Map", "<", "Integer", ",", "Pair", "<", "ExecutionReference", ",", "ExecutableFlow", ">", ">", "fetchUnfinishedFlowsMetadata", "(", ")", "throws", "ExecutorManagerException", "{", "try", "{", "return", "this", ".", "dbOperator", ".", "query", "(", "Fe...
Fetch unfinished flows similar to {@link #fetchUnfinishedFlows}, excluding flow data. @return unfinished flows map @throws ExecutorManagerException the executor manager exception
[ "Fetch", "unfinished", "flows", "similar", "to", "{", "@link", "#fetchUnfinishedFlows", "}", "excluding", "flow", "data", "." ]
train
https://github.com/azkaban/azkaban/blob/d258ea7d6e66807c6eff79c5325d6d3443618dff/azkaban-common/src/main/java/azkaban/executor/FetchActiveFlowDao.java#L129-L137
burberius/eve-esi
src/main/java/net/troja/eve/esi/api/FleetsApi.java
FleetsApi.postFleetsFleetIdWings
public FleetWingCreatedResponse postFleetsFleetIdWings(Long fleetId, String datasource, String token) throws ApiException { """ Create fleet wing Create a new wing in a fleet --- SSO Scope: esi-fleets.write_fleet.v1 @param fleetId ID for a fleet (required) @param datasource The server name you w...
java
public FleetWingCreatedResponse postFleetsFleetIdWings(Long fleetId, String datasource, String token) throws ApiException { ApiResponse<FleetWingCreatedResponse> resp = postFleetsFleetIdWingsWithHttpInfo(fleetId, datasource, token); return resp.getData(); }
[ "public", "FleetWingCreatedResponse", "postFleetsFleetIdWings", "(", "Long", "fleetId", ",", "String", "datasource", ",", "String", "token", ")", "throws", "ApiException", "{", "ApiResponse", "<", "FleetWingCreatedResponse", ">", "resp", "=", "postFleetsFleetIdWingsWithHt...
Create fleet wing Create a new wing in a fleet --- SSO Scope: esi-fleets.write_fleet.v1 @param fleetId ID for a fleet (required) @param datasource The server name you would like data from (optional, default to tranquility) @param token Access token to use if unable to set a header (optional) @return FleetWingCreatedRe...
[ "Create", "fleet", "wing", "Create", "a", "new", "wing", "in", "a", "fleet", "---", "SSO", "Scope", ":", "esi", "-", "fleets", ".", "write_fleet", ".", "v1" ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/api/FleetsApi.java#L1479-L1483
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/ling/AnnotationLookup.java
AnnotationLookup.getValueType
@SuppressWarnings("unchecked") public static Class<?> getValueType(Class<? extends CoreAnnotation> key) { """ Returns the runtime value type associated with the given key. Caches results. """ Class type = valueCache.get(key); if (type == null) { try { type = key.newInstance().get...
java
@SuppressWarnings("unchecked") public static Class<?> getValueType(Class<? extends CoreAnnotation> key) { Class type = valueCache.get(key); if (type == null) { try { type = key.newInstance().getType(); } catch (Exception e) { throw new RuntimeException("Unexpected failure to...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Class", "<", "?", ">", "getValueType", "(", "Class", "<", "?", "extends", "CoreAnnotation", ">", "key", ")", "{", "Class", "type", "=", "valueCache", ".", "get", "(", "key", ")", ";...
Returns the runtime value type associated with the given key. Caches results.
[ "Returns", "the", "runtime", "value", "type", "associated", "with", "the", "given", "key", ".", "Caches", "results", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/ling/AnnotationLookup.java#L165-L177
craftercms/commons
utilities/src/main/java/org/craftercms/commons/http/HttpUtils.java
HttpUtils.addValue
public static void addValue(String key, Object value, MultiValueMap<String, String> params) { """ Adds a param value to a params map. If value is null, nothing is done. @param key the param key @param value the param value @param params the params map """ if (value != null) { param...
java
public static void addValue(String key, Object value, MultiValueMap<String, String> params) { if (value != null) { params.add(key, value.toString()); } }
[ "public", "static", "void", "addValue", "(", "String", "key", ",", "Object", "value", ",", "MultiValueMap", "<", "String", ",", "String", ">", "params", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "params", ".", "add", "(", "key", ",", "val...
Adds a param value to a params map. If value is null, nothing is done. @param key the param key @param value the param value @param params the params map
[ "Adds", "a", "param", "value", "to", "a", "params", "map", ".", "If", "value", "is", "null", "nothing", "is", "done", "." ]
train
https://github.com/craftercms/commons/blob/3074fe49e56c2a4aae0832f40b17ae563335dc83/utilities/src/main/java/org/craftercms/commons/http/HttpUtils.java#L185-L189
CloudSlang/cs-actions
cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/lambda/InvokeLambdaAction.java
InvokeLambdaAction.execute
@Action(name = "Invoke AWS Lambda Function", outputs = { """ Invokes an AWS Lambda Function in sync mode using AWS Java SDK @param identity Access key associated with your Amazon AWS or IAM account. Example: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" @param credential Secret access...
java
@Action(name = "Invoke AWS Lambda Function", outputs = { @Output(Outputs.RETURN_CODE), @Output(Outputs.RETURN_RESULT), @Output(Outputs.EXCEPTION) }, responses = { @Response(text = Outputs.SUCCESS, field =...
[ "@", "Action", "(", "name", "=", "\"Invoke AWS Lambda Function\"", ",", "outputs", "=", "{", "@", "Output", "(", "Outputs", ".", "RETURN_CODE", ")", ",", "@", "Output", "(", "Outputs", ".", "RETURN_RESULT", ")", ",", "@", "Output", "(", "Outputs", ".", "...
Invokes an AWS Lambda Function in sync mode using AWS Java SDK @param identity Access key associated with your Amazon AWS or IAM account. Example: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" @param credential Secret access key ID associated with your Amazon AWS or IAM account. @param proxyHost O...
[ "Invokes", "an", "AWS", "Lambda", "Function", "in", "sync", "mode", "using", "AWS", "Java", "SDK" ]
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/actions/lambda/InvokeLambdaAction.java#L71-L123
mockito/mockito
src/main/java/org/mockito/internal/util/JavaEightUtil.java
JavaEightUtil.invokeNullaryFactoryMethod
private static Object invokeNullaryFactoryMethod(final String fqcn, final String methodName) { """ Invokes a nullary static factory method using reflection to stay backwards-compatible with older JDKs. @param fqcn The fully qualified class name of the type to be produced. @param methodName The name of the fact...
java
private static Object invokeNullaryFactoryMethod(final String fqcn, final String methodName) { try { final Class<?> type = Class.forName(fqcn); final Method method = type.getMethod(methodName); return method.invoke(null); // any exception is really unexpected sin...
[ "private", "static", "Object", "invokeNullaryFactoryMethod", "(", "final", "String", "fqcn", ",", "final", "String", "methodName", ")", "{", "try", "{", "final", "Class", "<", "?", ">", "type", "=", "Class", ".", "forName", "(", "fqcn", ")", ";", "final", ...
Invokes a nullary static factory method using reflection to stay backwards-compatible with older JDKs. @param fqcn The fully qualified class name of the type to be produced. @param methodName The name of the factory method. @return the object produced.
[ "Invokes", "a", "nullary", "static", "factory", "method", "using", "reflection", "to", "stay", "backwards", "-", "compatible", "with", "older", "JDKs", "." ]
train
https://github.com/mockito/mockito/blob/c5e2b80af76e3192cae7c9550b70c4d1ab312034/src/main/java/org/mockito/internal/util/JavaEightUtil.java#L131-L143
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.findByC_C
@Override public CPInstance findByC_C(long CPDefinitionId, String CPInstanceUuid) throws NoSuchCPInstanceException { """ Returns the cp instance where CPDefinitionId = &#63; and CPInstanceUuid = &#63; or throws a {@link NoSuchCPInstanceException} if it could not be found. @param CPDefinitionId the cp definit...
java
@Override public CPInstance findByC_C(long CPDefinitionId, String CPInstanceUuid) throws NoSuchCPInstanceException { CPInstance cpInstance = fetchByC_C(CPDefinitionId, CPInstanceUuid); if (cpInstance == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append...
[ "@", "Override", "public", "CPInstance", "findByC_C", "(", "long", "CPDefinitionId", ",", "String", "CPInstanceUuid", ")", "throws", "NoSuchCPInstanceException", "{", "CPInstance", "cpInstance", "=", "fetchByC_C", "(", "CPDefinitionId", ",", "CPInstanceUuid", ")", ";"...
Returns the cp instance where CPDefinitionId = &#63; and CPInstanceUuid = &#63; or throws a {@link NoSuchCPInstanceException} if it could not be found. @param CPDefinitionId the cp definition ID @param CPInstanceUuid the cp instance uuid @return the matching cp instance @throws NoSuchCPInstanceException if a matching ...
[ "Returns", "the", "cp", "instance", "where", "CPDefinitionId", "=", "&#63", ";", "and", "CPInstanceUuid", "=", "&#63", ";", "or", "throws", "a", "{", "@link", "NoSuchCPInstanceException", "}", "if", "it", "could", "not", "be", "found", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L4086-L4112
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindingConfig.java
PathfindingConfig.imports
public static Collection<PathCategory> imports(Media configPathfinding) { """ Import the category data from configuration. @param configPathfinding The pathfinding descriptor (must not be <code>null</code>). @return The categories data. @throws LionEngineException If unable to read data. """ Chec...
java
public static Collection<PathCategory> imports(Media configPathfinding) { Check.notNull(configPathfinding); final Xml nodeCategories = new Xml(configPathfinding); final Collection<Xml> childrenTile = nodeCategories.getChildren(TILE_PATH); final Collection<PathCategory> categor...
[ "public", "static", "Collection", "<", "PathCategory", ">", "imports", "(", "Media", "configPathfinding", ")", "{", "Check", ".", "notNull", "(", "configPathfinding", ")", ";", "final", "Xml", "nodeCategories", "=", "new", "Xml", "(", "configPathfinding", ")", ...
Import the category data from configuration. @param configPathfinding The pathfinding descriptor (must not be <code>null</code>). @return The categories data. @throws LionEngineException If unable to read data.
[ "Import", "the", "category", "data", "from", "configuration", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/pathfinding/PathfindingConfig.java#L56-L80
google/closure-compiler
src/com/google/javascript/jscomp/PerformanceTracker.java
PerformanceTracker.outputTracerReport
public void outputTracerReport() { """ Prints a summary, which contains aggregate stats for all runs of each pass and a log, which contains stats for each individual run. """ JvmMetrics.maybeWriteJvmMetrics(this.output, "verbose:pretty:all"); calcTotalStats(); ArrayList<Entry<String, Stats>> stat...
java
public void outputTracerReport() { JvmMetrics.maybeWriteJvmMetrics(this.output, "verbose:pretty:all"); calcTotalStats(); ArrayList<Entry<String, Stats>> statEntries = new ArrayList<>(); statEntries.addAll(this.summary.entrySet()); Collections.sort( statEntries, new Comparator<Entry<...
[ "public", "void", "outputTracerReport", "(", ")", "{", "JvmMetrics", ".", "maybeWriteJvmMetrics", "(", "this", ".", "output", ",", "\"verbose:pretty:all\"", ")", ";", "calcTotalStats", "(", ")", ";", "ArrayList", "<", "Entry", "<", "String", ",", "Stats", ">",...
Prints a summary, which contains aggregate stats for all runs of each pass and a log, which contains stats for each individual run.
[ "Prints", "a", "summary", "which", "contains", "aggregate", "stats", "for", "all", "runs", "of", "each", "pass", "and", "a", "log", "which", "contains", "stats", "for", "each", "individual", "run", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/PerformanceTracker.java#L354-L422
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/normalization/KerasBatchNormalization.java
KerasBatchNormalization.getBatchNormAxis
private int getBatchNormAxis(Map<String, Object> layerConfig) throws InvalidKerasConfigurationException { """ Get BatchNormalization axis from Keras layer configuration. Currently unused. @param layerConfig dictionary containing Keras layer configuration @return batchnorm axis @throws InvalidKeras...
java
private int getBatchNormAxis(Map<String, Object> layerConfig) throws InvalidKerasConfigurationException { Map<String, Object> innerConfig = KerasLayerUtils.getInnerLayerConfigFromConfig(layerConfig, conf); return (int) innerConfig.get(LAYER_FIELD_AXIS); }
[ "private", "int", "getBatchNormAxis", "(", "Map", "<", "String", ",", "Object", ">", "layerConfig", ")", "throws", "InvalidKerasConfigurationException", "{", "Map", "<", "String", ",", "Object", ">", "innerConfig", "=", "KerasLayerUtils", ".", "getInnerLayerConfigFr...
Get BatchNormalization axis from Keras layer configuration. Currently unused. @param layerConfig dictionary containing Keras layer configuration @return batchnorm axis @throws InvalidKerasConfigurationException Invalid Keras config
[ "Get", "BatchNormalization", "axis", "from", "Keras", "layer", "configuration", ".", "Currently", "unused", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/normalization/KerasBatchNormalization.java#L352-L356
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemcpyPeer
public static int cudaMemcpyPeer(Pointer dst, int dstDevice, Pointer src, int srcDevice, long count) { """ Copies memory between two devices. <pre> cudaError_t cudaMemcpyPeer ( void* dst, int dstDevice, const void* src, int srcDevice, size_t count ) </pre> <div> <p>Copies memory between two devices. ...
java
public static int cudaMemcpyPeer(Pointer dst, int dstDevice, Pointer src, int srcDevice, long count) { return checkResult(cudaMemcpyPeerNative(dst, dstDevice, src, srcDevice, count)); }
[ "public", "static", "int", "cudaMemcpyPeer", "(", "Pointer", "dst", ",", "int", "dstDevice", ",", "Pointer", "src", ",", "int", "srcDevice", ",", "long", "count", ")", "{", "return", "checkResult", "(", "cudaMemcpyPeerNative", "(", "dst", ",", "dstDevice", "...
Copies memory between two devices. <pre> cudaError_t cudaMemcpyPeer ( void* dst, int dstDevice, const void* src, int srcDevice, size_t count ) </pre> <div> <p>Copies memory between two devices. Copies memory from one device to memory on another device. <tt>dst</tt> is the base device pointer of the destination memor...
[ "Copies", "memory", "between", "two", "devices", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L4673-L4676
katharsis-project/katharsis-framework
katharsis-core/src/main/java/io/katharsis/repository/ResourceRepositoryBase.java
ResourceRepositoryBase.findOne
@Override public T findOne(I id, QuerySpec querySpec) { """ Forwards to {@link #findAll(QuerySpec)} @param id of the resource @param querySpec for field and relation inclusion @return resource """ RegistryEntry entry = resourceRegistry.findEntry(resourceClass); String idName = entry.getResourceInfo...
java
@Override public T findOne(I id, QuerySpec querySpec) { RegistryEntry entry = resourceRegistry.findEntry(resourceClass); String idName = entry.getResourceInformation().getIdField().getUnderlyingName(); QuerySpec idQuerySpec = querySpec.duplicate(); idQuerySpec.addFilter(new FilterSpec(Arrays.asList(idName), F...
[ "@", "Override", "public", "T", "findOne", "(", "I", "id", ",", "QuerySpec", "querySpec", ")", "{", "RegistryEntry", "entry", "=", "resourceRegistry", ".", "findEntry", "(", "resourceClass", ")", ";", "String", "idName", "=", "entry", ".", "getResourceInformat...
Forwards to {@link #findAll(QuerySpec)} @param id of the resource @param querySpec for field and relation inclusion @return resource
[ "Forwards", "to", "{", "@link", "#findAll", "(", "QuerySpec", ")", "}" ]
train
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/repository/ResourceRepositoryBase.java#L56-L72
pravega/pravega
common/src/main/java/io/pravega/common/util/BitConverter.java
BitConverter.writeShort
public static int writeShort(ArrayView target, int offset, short value) { """ Writes the given 16-bit Short to the given ArrayView at the given offset. @param target The ArrayView to write to. @param offset The offset within the ArrayView to write at. @param value The value to write. @return The number of b...
java
public static int writeShort(ArrayView target, int offset, short value) { return writeShort(target.array(), target.arrayOffset() + offset, value); }
[ "public", "static", "int", "writeShort", "(", "ArrayView", "target", ",", "int", "offset", ",", "short", "value", ")", "{", "return", "writeShort", "(", "target", ".", "array", "(", ")", ",", "target", ".", "arrayOffset", "(", ")", "+", "offset", ",", ...
Writes the given 16-bit Short to the given ArrayView at the given offset. @param target The ArrayView to write to. @param offset The offset within the ArrayView to write at. @param value The value to write. @return The number of bytes written.
[ "Writes", "the", "given", "16", "-", "bit", "Short", "to", "the", "given", "ArrayView", "at", "the", "given", "offset", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/BitConverter.java#L30-L32
seedstack/i18n-addon
core/src/main/java/org/seedstack/i18n/internal/data/key/KeyDTO.java
KeyDTO.addTranslationDTO
public void addTranslationDTO(String locale, String value, boolean outdated, boolean approximate) { """ Adds a translation to the keyDTO @param locale translation locale @param value translation value @param outdated is the translation outdated @param approximate is the translation approximate ...
java
public void addTranslationDTO(String locale, String value, boolean outdated, boolean approximate) { translations.add(new TranslationDTO(locale, value, outdated, approximate)); }
[ "public", "void", "addTranslationDTO", "(", "String", "locale", ",", "String", "value", ",", "boolean", "outdated", ",", "boolean", "approximate", ")", "{", "translations", ".", "add", "(", "new", "TranslationDTO", "(", "locale", ",", "value", ",", "outdated",...
Adds a translation to the keyDTO @param locale translation locale @param value translation value @param outdated is the translation outdated @param approximate is the translation approximate
[ "Adds", "a", "translation", "to", "the", "keyDTO" ]
train
https://github.com/seedstack/i18n-addon/blob/1e65101d8554623f09bda2497b0151fd10a16615/core/src/main/java/org/seedstack/i18n/internal/data/key/KeyDTO.java#L36-L38
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java
CodepointHelper.verifyNot
public static void verifyNot (final ICodepointIterator aIter, @Nonnull final ECodepointProfile eProfile) { """ Verifies a sequence of codepoints using the specified profile @param aIter Codepoint iterator @param eProfile profile to use """ final CodepointIteratorRestricted rci = aIter.restrict (eProf...
java
public static void verifyNot (final ICodepointIterator aIter, @Nonnull final ECodepointProfile eProfile) { final CodepointIteratorRestricted rci = aIter.restrict (eProfile.getFilter (), false, true); while (rci.hasNext ()) rci.next (); }
[ "public", "static", "void", "verifyNot", "(", "final", "ICodepointIterator", "aIter", ",", "@", "Nonnull", "final", "ECodepointProfile", "eProfile", ")", "{", "final", "CodepointIteratorRestricted", "rci", "=", "aIter", ".", "restrict", "(", "eProfile", ".", "getF...
Verifies a sequence of codepoints using the specified profile @param aIter Codepoint iterator @param eProfile profile to use
[ "Verifies", "a", "sequence", "of", "codepoints", "using", "the", "specified", "profile" ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/text/codepoint/CodepointHelper.java#L818-L823
h2oai/h2o-3
h2o-core/src/main/java/jsr166y/ForkJoinPool.java
ForkJoinPool.helpJoinOnce
final int helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) { """ Stripped-down variant of awaitJoin used by timed joins. Tries to help join only while there is continuous progress. (Caller will then enter a timed wait.) @param joiner the joining worker @param task the task @return task status on exit ...
java
final int helpJoinOnce(WorkQueue joiner, ForkJoinTask<?> task) { int s; while ((s = task.status) >= 0 && (joiner.isEmpty() ? tryHelpStealer(joiner, task) : joiner.tryRemoveAndExec(task)) != 0) ; return s; }
[ "final", "int", "helpJoinOnce", "(", "WorkQueue", "joiner", ",", "ForkJoinTask", "<", "?", ">", "task", ")", "{", "int", "s", ";", "while", "(", "(", "s", "=", "task", ".", "status", ")", ">=", "0", "&&", "(", "joiner", ".", "isEmpty", "(", ")", ...
Stripped-down variant of awaitJoin used by timed joins. Tries to help join only while there is continuous progress. (Caller will then enter a timed wait.) @param joiner the joining worker @param task the task @return task status on exit
[ "Stripped", "-", "down", "variant", "of", "awaitJoin", "used", "by", "timed", "joins", ".", "Tries", "to", "help", "join", "only", "while", "there", "is", "continuous", "progress", ".", "(", "Caller", "will", "then", "enter", "a", "timed", "wait", ".", "...
train
https://github.com/h2oai/h2o-3/blob/845eb49dfeaadf638b6e2f779d82fac996391fad/h2o-core/src/main/java/jsr166y/ForkJoinPool.java#L1879-L1887
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
Resolve.findImmediateMemberType
Symbol findImmediateMemberType(Env<AttrContext> env, Type site, Name name, TypeSymbol c) { """ Find a type declared in a scope (not inherited). Return null if none is found. @param env The current envi...
java
Symbol findImmediateMemberType(Env<AttrContext> env, Type site, Name name, TypeSymbol c) { for (Symbol sym : c.members().getSymbolsByName(name)) { if (sym.kind == TYP) { return is...
[ "Symbol", "findImmediateMemberType", "(", "Env", "<", "AttrContext", ">", "env", ",", "Type", "site", ",", "Name", "name", ",", "TypeSymbol", "c", ")", "{", "for", "(", "Symbol", "sym", ":", "c", ".", "members", "(", ")", ".", "getSymbolsByName", "(", ...
Find a type declared in a scope (not inherited). Return null if none is found. @param env The current environment. @param site The original type from where the selection takes place. @param name The type's name. @param c The class to search for the member type. This is always a superclass or im...
[ "Find", "a", "type", "declared", "in", "a", "scope", "(", "not", "inherited", ")", ".", "Return", "null", "if", "none", "is", "found", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java#L2164-L2176
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.minLength
public static Validator<CharSequence> minLength(@NonNull final Context context, @StringRes final int resourceId, final int minLength) { """ Creates and returns a validator, which allows to validate texts to ensu...
java
public static Validator<CharSequence> minLength(@NonNull final Context context, @StringRes final int resourceId, final int minLength) { return new MinLengthValidator(context, resourceId, minLength); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "minLength", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "StringRes", "final", "int", "resourceId", ",", "final", "int", "minLength", ")", "{", "return", "new", "MinLengthValidator", ...
Creates and returns a validator, which allows to validate texts to ensure, that they have at least a specific length. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @param resourceId The resource ID of the string ...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "have", "at", "least", "a", "specific", "length", "." ]
train
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L425-L429
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java
ElementsExceptionsFactory.newIdentityException
public static IdentityException newIdentityException(String message, Object... args) { """ Constructs and initializes a new {@link IdentityException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IdentityException ...
java
public static IdentityException newIdentityException(String message, Object... args) { return newIdentityException(null, message, args); }
[ "public", "static", "IdentityException", "newIdentityException", "(", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "newIdentityException", "(", "null", ",", "message", ",", "args", ")", ";", "}" ]
Constructs and initializes a new {@link IdentityException} with the given {@link String message} formatted with the given {@link Object[] arguments}. @param message {@link String} describing the {@link IdentityException exception}. @param args {@link Object[] arguments} used to replace format placeholders in the {@lin...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IdentityException", "}", "with", "the", "given", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", "Object", "[]", "arguments", "}", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/ElementsExceptionsFactory.java#L355-L357
UrielCh/ovh-java-sdk
ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java
ApiOvhDomain.zone_zoneName_history_creationDate_restore_POST
public OvhTask zone_zoneName_history_creationDate_restore_POST(String zoneName, java.util.Date creationDate) throws IOException { """ Restore the DNS zone REST: POST /domain/zone/{zoneName}/history/{creationDate}/restore @param zoneName [required] The internal name of your zone @param creationDate [required] ...
java
public OvhTask zone_zoneName_history_creationDate_restore_POST(String zoneName, java.util.Date creationDate) throws IOException { String qPath = "/domain/zone/{zoneName}/history/{creationDate}/restore"; StringBuilder sb = path(qPath, zoneName, creationDate); String resp = exec(qPath, "POST", sb.toString(), null);...
[ "public", "OvhTask", "zone_zoneName_history_creationDate_restore_POST", "(", "String", "zoneName", ",", "java", ".", "util", ".", "Date", "creationDate", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/domain/zone/{zoneName}/history/{creationDate}/restore\"", ...
Restore the DNS zone REST: POST /domain/zone/{zoneName}/history/{creationDate}/restore @param zoneName [required] The internal name of your zone @param creationDate [required] Date of backup creation API beta
[ "Restore", "the", "DNS", "zone" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-domain/src/main/java/net/minidev/ovh/api/ApiOvhDomain.java#L604-L609
VoltDB/voltdb
third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java
DataTree.serializeNode
void serializeNode(OutputArchive oa, StringBuilder path) throws IOException { """ this method uses a stringbuilder to create a new path for children. This is faster than string appends ( str1 + str2). @param oa OutputArchive to write to. @param path a string builder. @throws IOException @throws Interrupte...
java
void serializeNode(OutputArchive oa, StringBuilder path) throws IOException { String pathString = path.toString(); DataNode node = getNode(pathString); if (node == null) { return; } String children[] = null; synchronized (node) { scount++; ...
[ "void", "serializeNode", "(", "OutputArchive", "oa", ",", "StringBuilder", "path", ")", "throws", "IOException", "{", "String", "pathString", "=", "path", ".", "toString", "(", ")", ";", "DataNode", "node", "=", "getNode", "(", "pathString", ")", ";", "if", ...
this method uses a stringbuilder to create a new path for children. This is faster than string appends ( str1 + str2). @param oa OutputArchive to write to. @param path a string builder. @throws IOException @throws InterruptedException
[ "this", "method", "uses", "a", "stringbuilder", "to", "create", "a", "new", "path", "for", "children", ".", "This", "is", "faster", "than", "string", "appends", "(", "str1", "+", "str2", ")", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/zookeeper_voltpatches/server/DataTree.java#L962-L990
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionComputer.java
MapTileCollisionComputer.getCollisionY
private static Double getCollisionY(CollisionCategory category, TileCollision tileCollision, double x, double y) { """ Get the vertical collision from current location. @param category The collision category. @param tileCollision The current tile collision. @param x The current horizontal location. @param y ...
java
private static Double getCollisionY(CollisionCategory category, TileCollision tileCollision, double x, double y) { if (Axis.Y == category.getAxis()) { return tileCollision.getCollisionY(category, x, y); } return null; }
[ "private", "static", "Double", "getCollisionY", "(", "CollisionCategory", "category", ",", "TileCollision", "tileCollision", ",", "double", "x", ",", "double", "y", ")", "{", "if", "(", "Axis", ".", "Y", "==", "category", ".", "getAxis", "(", ")", ")", "{"...
Get the vertical collision from current location. @param category The collision category. @param tileCollision The current tile collision. @param x The current horizontal location. @param y The current vertical location. @return The computed vertical collision.
[ "Get", "the", "vertical", "collision", "from", "current", "location", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/tile/map/collision/MapTileCollisionComputer.java#L78-L85
nabedge/mixer2
src/main/java/org/mixer2/xhtml/AbstractJaxb.java
AbstractJaxb.setData
public void setData(String key, String value) { """ <p> set data-* attribute </p> <pre> Div div = new Div(); div.setData(&quot;foo&quot;, &quot;bar&quot;); // you get &lt;div data-foo=&quot;bar&quot;&gt;&lt;/div&gt; </pre> @param key data-"key" """ QName qn = new QName("data-" + key); ...
java
public void setData(String key, String value) { QName qn = new QName("data-" + key); this.getOtherAttributes().put(qn, value); }
[ "public", "void", "setData", "(", "String", "key", ",", "String", "value", ")", "{", "QName", "qn", "=", "new", "QName", "(", "\"data-\"", "+", "key", ")", ";", "this", ".", "getOtherAttributes", "(", ")", ".", "put", "(", "qn", ",", "value", ")", ...
<p> set data-* attribute </p> <pre> Div div = new Div(); div.setData(&quot;foo&quot;, &quot;bar&quot;); // you get &lt;div data-foo=&quot;bar&quot;&gt;&lt;/div&gt; </pre> @param key data-"key"
[ "<p", ">", "set", "data", "-", "*", "attribute", "<", "/", "p", ">" ]
train
https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/AbstractJaxb.java#L650-L653
js-lib-com/commons
src/main/java/js/io/FilesInputStream.java
FilesInputStream.getMeta
public String getMeta(String key) { """ Get string value from files archive meta data. Meta data was added into archive by {@link FilesOutputStream#putMeta(String, Object)}. @param key meta data key. @return meta data value. @throws InvalidFilesArchiveException if requested meta data key does not exists. ...
java
public String getMeta(String key) { String value = manifest.getMainAttributes().getValue(key); if (value == null) { throw new InvalidFilesArchiveException("Missing |%s| attribute from manifest.", key); } return value; }
[ "public", "String", "getMeta", "(", "String", "key", ")", "{", "String", "value", "=", "manifest", ".", "getMainAttributes", "(", ")", ".", "getValue", "(", "key", ")", ";", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "InvalidFilesArchive...
Get string value from files archive meta data. Meta data was added into archive by {@link FilesOutputStream#putMeta(String, Object)}. @param key meta data key. @return meta data value. @throws InvalidFilesArchiveException if requested meta data key does not exists.
[ "Get", "string", "value", "from", "files", "archive", "meta", "data", ".", "Meta", "data", "was", "added", "into", "archive", "by", "{", "@link", "FilesOutputStream#putMeta", "(", "String", "Object", ")", "}", "." ]
train
https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesInputStream.java#L158-L164
kiegroup/drools
drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java
RuleSheetParserUtil.getImportList
public static List<Import> getImportList(final List<String> importCells) { """ Create a list of Import model objects from cell contents. @param importCells The cells containing text for all the classes to import. @return A list of Import classes, which can be added to the ruleset. """ final List<Impo...
java
public static List<Import> getImportList(final List<String> importCells) { final List<Import> importList = new ArrayList<Import>(); if ( importCells == null ) return importList; for( String importCell: importCells ){ final StringTokenizer tokens = new StringTokenizer( importCell, ",...
[ "public", "static", "List", "<", "Import", ">", "getImportList", "(", "final", "List", "<", "String", ">", "importCells", ")", "{", "final", "List", "<", "Import", ">", "importList", "=", "new", "ArrayList", "<", "Import", ">", "(", ")", ";", "if", "("...
Create a list of Import model objects from cell contents. @param importCells The cells containing text for all the classes to import. @return A list of Import classes, which can be added to the ruleset.
[ "Create", "a", "list", "of", "Import", "model", "objects", "from", "cell", "contents", "." ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-decisiontables/src/main/java/org/drools/decisiontable/parser/RuleSheetParserUtil.java#L52-L65
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/engine/bcel/AnalysisFactory.java
AnalysisFactory.getCFG
protected CFG getCFG(IAnalysisCache analysisCache, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { """ /* ---------------------------------------------------------------------- Helper methods to get required analysis objects. -----------------------------------------------------------------...
java
protected CFG getCFG(IAnalysisCache analysisCache, MethodDescriptor methodDescriptor) throws CheckedAnalysisException { return analysisCache.getMethodAnalysis(CFG.class, methodDescriptor); }
[ "protected", "CFG", "getCFG", "(", "IAnalysisCache", "analysisCache", ",", "MethodDescriptor", "methodDescriptor", ")", "throws", "CheckedAnalysisException", "{", "return", "analysisCache", ".", "getMethodAnalysis", "(", "CFG", ".", "class", ",", "methodDescriptor", ")"...
/* ---------------------------------------------------------------------- Helper methods to get required analysis objects. ----------------------------------------------------------------------
[ "/", "*", "----------------------------------------------------------------------", "Helper", "methods", "to", "get", "required", "analysis", "objects", ".", "----------------------------------------------------------------------" ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/engine/bcel/AnalysisFactory.java#L92-L94
b3dgs/lionengine
lionengine-core/src/main/java/com/b3dgs/lionengine/UtilZip.java
UtilZip.getEntriesByExtension
public static Collection<ZipEntry> getEntriesByExtension(File jar, String path, String extension) { """ Get all entries existing in the path considering the extension. @param jar The JAR to check (must not be <code>null</code>). @param path The path to check (must not be <code>null</code>). @param extension T...
java
public static Collection<ZipEntry> getEntriesByExtension(File jar, String path, String extension) { Check.notNull(jar); Check.notNull(path); Check.notNull(extension); try (ZipFile zip = new ZipFile(jar)) { return checkEntries(zip, path, extension); } ...
[ "public", "static", "Collection", "<", "ZipEntry", ">", "getEntriesByExtension", "(", "File", "jar", ",", "String", "path", ",", "String", "extension", ")", "{", "Check", ".", "notNull", "(", "jar", ")", ";", "Check", ".", "notNull", "(", "path", ")", ";...
Get all entries existing in the path considering the extension. @param jar The JAR to check (must not be <code>null</code>). @param path The path to check (must not be <code>null</code>). @param extension The extension without dot; eg: xml (must not be <code>null</code>). @return The entries list. @throws LionEngineEx...
[ "Get", "all", "entries", "existing", "in", "the", "path", "considering", "the", "extension", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-core/src/main/java/com/b3dgs/lionengine/UtilZip.java#L48-L62
crawljax/crawljax
core/src/main/java/com/crawljax/browser/WebDriverBackedEmbeddedBrowser.java
WebDriverBackedEmbeddedBrowser.buildRemoteWebDriver
private static RemoteWebDriver buildRemoteWebDriver(String hubUrl) { """ Private used static method for creation of a RemoteWebDriver. Taking care of the default Capabilities and using the HttpCommandExecutor. @param hubUrl the url of the hub to use. @return the RemoteWebDriver instance. """ DesiredCapa...
java
private static RemoteWebDriver buildRemoteWebDriver(String hubUrl) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setPlatform(Platform.ANY); URL url; try { url = new URL(hubUrl); } catch (MalformedURLException e) { LOGGER.error("The given hub url of the remote server is mal...
[ "private", "static", "RemoteWebDriver", "buildRemoteWebDriver", "(", "String", "hubUrl", ")", "{", "DesiredCapabilities", "capabilities", "=", "new", "DesiredCapabilities", "(", ")", ";", "capabilities", ".", "setPlatform", "(", "Platform", ".", "ANY", ")", ";", "...
Private used static method for creation of a RemoteWebDriver. Taking care of the default Capabilities and using the HttpCommandExecutor. @param hubUrl the url of the hub to use. @return the RemoteWebDriver instance.
[ "Private", "used", "static", "method", "for", "creation", "of", "a", "RemoteWebDriver", ".", "Taking", "care", "of", "the", "default", "Capabilities", "and", "using", "the", "HttpCommandExecutor", "." ]
train
https://github.com/crawljax/crawljax/blob/d339f4f622ca902ccd35322065821e52a62ec543/core/src/main/java/com/crawljax/browser/WebDriverBackedEmbeddedBrowser.java#L145-L170
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/structures/BuildDatabase.java
BuildDatabase.setDatabaseDuplicateIds
public void setDatabaseDuplicateIds() { """ Sets the Duplicate IDs for all the SpecTopics in the Database. """ // Set the spec topic duplicate ids based on topic title for (final Entry<Integer, List<ITopicNode>> topicTitleEntry : topics.entrySet()) { final List<ITopicNode> topics = ...
java
public void setDatabaseDuplicateIds() { // Set the spec topic duplicate ids based on topic title for (final Entry<Integer, List<ITopicNode>> topicTitleEntry : topics.entrySet()) { final List<ITopicNode> topics = topicTitleEntry.getValue(); if (topics.size() > 1) { ...
[ "public", "void", "setDatabaseDuplicateIds", "(", ")", "{", "// Set the spec topic duplicate ids based on topic title", "for", "(", "final", "Entry", "<", "Integer", ",", "List", "<", "ITopicNode", ">", ">", "topicTitleEntry", ":", "topics", ".", "entrySet", "(", ")...
Sets the Duplicate IDs for all the SpecTopics in the Database.
[ "Sets", "the", "Duplicate", "IDs", "for", "all", "the", "SpecTopics", "in", "the", "Database", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/structures/BuildDatabase.java#L81-L91
spring-projects/spring-data-solr
src/main/java/org/springframework/data/solr/core/query/PartialUpdate.java
PartialUpdate.setValueOfField
public void setValueOfField(String fieldName, Object value) { """ Add field with given name and value using {@link UpdateAction#SET} to the fields to be updated. @param fieldName @param value """ add(new SimpleUpdateField(fieldName, value, UpdateAction.SET)); }
java
public void setValueOfField(String fieldName, Object value) { add(new SimpleUpdateField(fieldName, value, UpdateAction.SET)); }
[ "public", "void", "setValueOfField", "(", "String", "fieldName", ",", "Object", "value", ")", "{", "add", "(", "new", "SimpleUpdateField", "(", "fieldName", ",", "value", ",", "UpdateAction", ".", "SET", ")", ")", ";", "}" ]
Add field with given name and value using {@link UpdateAction#SET} to the fields to be updated. @param fieldName @param value
[ "Add", "field", "with", "given", "name", "and", "value", "using", "{", "@link", "UpdateAction#SET", "}", "to", "the", "fields", "to", "be", "updated", "." ]
train
https://github.com/spring-projects/spring-data-solr/blob/20be5cb82498b70134dfda6c1a91ad21f8e657e0/src/main/java/org/springframework/data/solr/core/query/PartialUpdate.java#L89-L91
di2e/Argo
ProbeSender/src/main/java/ws/argo/probe/ProbeSenderFactory.java
ProbeSenderFactory.createSNSProbeSender
public static ProbeSender createSNSProbeSender(String ak, String sk) throws ProbeSenderException { """ Create a AmazonSNS transport ProbeSender using the default values. @param ak the amazon access key @param sk the amazon secret key @return configured ProbeSender instance @throws ProbeSenderException if som...
java
public static ProbeSender createSNSProbeSender(String ak, String sk) throws ProbeSenderException { Transport snsTransport = new AmazonSNSTransport(ak, sk); ProbeSender gen = new ProbeSender(snsTransport); return gen; }
[ "public", "static", "ProbeSender", "createSNSProbeSender", "(", "String", "ak", ",", "String", "sk", ")", "throws", "ProbeSenderException", "{", "Transport", "snsTransport", "=", "new", "AmazonSNSTransport", "(", "ak", ",", "sk", ")", ";", "ProbeSender", "gen", ...
Create a AmazonSNS transport ProbeSender using the default values. @param ak the amazon access key @param sk the amazon secret key @return configured ProbeSender instance @throws ProbeSenderException if something went wrong
[ "Create", "a", "AmazonSNS", "transport", "ProbeSender", "using", "the", "default", "values", "." ]
train
https://github.com/di2e/Argo/blob/f537a03d2d25fdfecda7999ec10e1da67dc3b8f3/ProbeSender/src/main/java/ws/argo/probe/ProbeSenderFactory.java#L108-L112
aoindustries/aoweb-framework
src/main/java/com/aoindustries/website/framework/WebSiteRequest.java
WebSiteRequest.getURL
public String getURL(String classAndParams) throws IOException, SQLException { """ Gets a relative URL from a String containing a classname and optional parameters. Parameters should already be URL encoded but not XML encoded. """ String className, params; int pos=classAndParams.indexOf('?'); if(pos==-1...
java
public String getURL(String classAndParams) throws IOException, SQLException { String className, params; int pos=classAndParams.indexOf('?'); if(pos==-1) { className=classAndParams; params=null; } else { className=classAndParams.substring(0, pos); params=classAndParams.substring(pos+1); } return...
[ "public", "String", "getURL", "(", "String", "classAndParams", ")", "throws", "IOException", ",", "SQLException", "{", "String", "className", ",", "params", ";", "int", "pos", "=", "classAndParams", ".", "indexOf", "(", "'", "'", ")", ";", "if", "(", "pos"...
Gets a relative URL from a String containing a classname and optional parameters. Parameters should already be URL encoded but not XML encoded.
[ "Gets", "a", "relative", "URL", "from", "a", "String", "containing", "a", "classname", "and", "optional", "parameters", ".", "Parameters", "should", "already", "be", "URL", "encoded", "but", "not", "XML", "encoded", "." ]
train
https://github.com/aoindustries/aoweb-framework/blob/8e58af4f5dd898cd2fdb855ffa810a1ca6973ae0/src/main/java/com/aoindustries/website/framework/WebSiteRequest.java#L351-L362
tango-controls/JTango
client/src/main/java/fr/soleil/tango/clientapi/TangoAttribute.java
TangoAttribute.extractToString
public String extractToString(final String separator, final String endSeparator) throws DevFailed { """ Extract data and format it as followed :\n SCALAR: ex: 1 SPECTRUM: one line separated by separator. \n ex: 1 3 5 IMAGE: x lines and y colums separated by endSeparator.\n ex: 3 5 8 5 6 9 @param separator @p...
java
public String extractToString(final String separator, final String endSeparator) throws DevFailed { logger.debug(LOG_EXTRACTING, this); return attributeImpl.extractToString(separator, endSeparator); }
[ "public", "String", "extractToString", "(", "final", "String", "separator", ",", "final", "String", "endSeparator", ")", "throws", "DevFailed", "{", "logger", ".", "debug", "(", "LOG_EXTRACTING", ",", "this", ")", ";", "return", "attributeImpl", ".", "extractToS...
Extract data and format it as followed :\n SCALAR: ex: 1 SPECTRUM: one line separated by separator. \n ex: 1 3 5 IMAGE: x lines and y colums separated by endSeparator.\n ex: 3 5 8 5 6 9 @param separator @param endSeparator @return @throws DevFailed
[ "Extract", "data", "and", "format", "it", "as", "followed", ":", "\\", "n", "SCALAR", ":", "ex", ":", "1", "SPECTRUM", ":", "one", "line", "separated", "by", "separator", ".", "\\", "n", "ex", ":", "1", "3", "5", "IMAGE", ":", "x", "lines", "and", ...
train
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/client/src/main/java/fr/soleil/tango/clientapi/TangoAttribute.java#L358-L361
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/UpdateItemRequest.java
UpdateItemRequest.withExpected
public UpdateItemRequest withExpected(java.util.Map<String, ExpectedAttributeValue> expected) { """ <p> This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href= "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expect...
java
public UpdateItemRequest withExpected(java.util.Map<String, ExpectedAttributeValue> expected) { setExpected(expected); return this; }
[ "public", "UpdateItemRequest", "withExpected", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "ExpectedAttributeValue", ">", "expected", ")", "{", "setExpected", "(", "expected", ")", ";", "return", "this", ";", "}" ]
<p> This is a legacy parameter. Use <code>ConditionExpression</code> instead. For more information, see <a href= "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/LegacyConditionalParameters.Expected.html" >Expected</a> in the <i>Amazon DynamoDB Developer Guide</i>. </p> @param expected This is a legac...
[ "<p", ">", "This", "is", "a", "legacy", "parameter", ".", "Use", "<code", ">", "ConditionExpression<", "/", "code", ">", "instead", ".", "For", "more", "information", "see", "<a", "href", "=", "https", ":", "//", "docs", ".", "aws", ".", "amazon", ".",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/model/UpdateItemRequest.java#L800-L803
belaban/JGroups
src/org/jgroups/util/Bits.java
Bits.readInt
public static int readInt(ByteBuffer buf) { """ Reads an int from a buffer. @param buf the buffer @return the int read from the buffer """ byte len=buf.get(); if(len == 0) return 0; return makeInt(buf, len); }
java
public static int readInt(ByteBuffer buf) { byte len=buf.get(); if(len == 0) return 0; return makeInt(buf, len); }
[ "public", "static", "int", "readInt", "(", "ByteBuffer", "buf", ")", "{", "byte", "len", "=", "buf", ".", "get", "(", ")", ";", "if", "(", "len", "==", "0", ")", "return", "0", ";", "return", "makeInt", "(", "buf", ",", "len", ")", ";", "}" ]
Reads an int from a buffer. @param buf the buffer @return the int read from the buffer
[ "Reads", "an", "int", "from", "a", "buffer", "." ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/util/Bits.java#L137-L142
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.compactDecimal
public static String compactDecimal(final Number value, final Locale locale) { """ <p> Same as {@link #compactDecimal(Number) compactDecimal} for the specified locale. </p> @param value The number to be abbreviated @param locale The locale @return a compact textual representation of the given value "...
java
public static String compactDecimal(final Number value, final Locale locale) { return compactDecimal(value, CompactStyle.SHORT, locale); }
[ "public", "static", "String", "compactDecimal", "(", "final", "Number", "value", ",", "final", "Locale", "locale", ")", "{", "return", "compactDecimal", "(", "value", ",", "CompactStyle", ".", "SHORT", ",", "locale", ")", ";", "}" ]
<p> Same as {@link #compactDecimal(Number) compactDecimal} for the specified locale. </p> @param value The number to be abbreviated @param locale The locale @return a compact textual representation of the given value
[ "<p", ">", "Same", "as", "{", "@link", "#compactDecimal", "(", "Number", ")", "compactDecimal", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L143-L146
burberius/eve-esi
src/main/java/net/troja/eve/esi/auth/OAuth.java
OAuth.finishFlow
public void finishFlow(final String code, final String state) throws ApiException { """ Finish the oauth flow after the user was redirected back. @param code Code returned by the Eve Online SSO @param state This should be some secret to prevent XRSF see getAuthorizationUri @throws net.troja.eve.esi.ApiExce...
java
public void finishFlow(final String code, final String state) throws ApiException { if (account == null) throw new IllegalArgumentException("Auth is not set"); if (codeVerifier == null) throw new IllegalArgumentException("code_verifier is not set"); if (account.getClientI...
[ "public", "void", "finishFlow", "(", "final", "String", "code", ",", "final", "String", "state", ")", "throws", "ApiException", "{", "if", "(", "account", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "\"Auth is not set\"", ")", ";", "if"...
Finish the oauth flow after the user was redirected back. @param code Code returned by the Eve Online SSO @param state This should be some secret to prevent XRSF see getAuthorizationUri @throws net.troja.eve.esi.ApiException
[ "Finish", "the", "oauth", "flow", "after", "the", "user", "was", "redirected", "back", "." ]
train
https://github.com/burberius/eve-esi/blob/24a941c592cfc15f23471ef849b282fbc582ca13/src/main/java/net/troja/eve/esi/auth/OAuth.java#L198-L215
ReactiveX/RxNetty
rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java
TrailingHeaders.addHeader
public TrailingHeaders addHeader(CharSequence name, Iterable<Object> values) { """ Adds an HTTP trailing header with the passed {@code name} and {@code values} to this request. @param name Name of the header. @param values Values for the header. @return {@code this}. """ lastHttpContent.trailing...
java
public TrailingHeaders addHeader(CharSequence name, Iterable<Object> values) { lastHttpContent.trailingHeaders().add(name, values); return this; }
[ "public", "TrailingHeaders", "addHeader", "(", "CharSequence", "name", ",", "Iterable", "<", "Object", ">", "values", ")", "{", "lastHttpContent", ".", "trailingHeaders", "(", ")", ".", "add", "(", "name", ",", "values", ")", ";", "return", "this", ";", "}...
Adds an HTTP trailing header with the passed {@code name} and {@code values} to this request. @param name Name of the header. @param values Values for the header. @return {@code this}.
[ "Adds", "an", "HTTP", "trailing", "header", "with", "the", "passed", "{", "@code", "name", "}", "and", "{", "@code", "values", "}", "to", "this", "request", "." ]
train
https://github.com/ReactiveX/RxNetty/blob/a7ca9a9c1d544a79c82f7b17036daf6958bf1cd6/rxnetty-http/src/main/java/io/reactivex/netty/protocol/http/TrailingHeaders.java#L62-L65
michael-rapp/AndroidMaterialPreferences
example/src/main/java/de/mrapp/android/preference/example/PreferenceFragment.java
PreferenceFragment.createShowDialogButtonBarDividerListener
private Preference.OnPreferenceChangeListener createShowDialogButtonBarDividerListener() { """ Creates and returns a listener, which allows to adapt, whether the button bar dividers of the preference's dialogs should be shown, or not, when the corresponding setting has been changed. @return The listener, whic...
java
private Preference.OnPreferenceChangeListener createShowDialogButtonBarDividerListener() { return new Preference.OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(final Preference preference, final Object newValue) { boolean showDialogButtonBarDi...
[ "private", "Preference", ".", "OnPreferenceChangeListener", "createShowDialogButtonBarDividerListener", "(", ")", "{", "return", "new", "Preference", ".", "OnPreferenceChangeListener", "(", ")", "{", "@", "Override", "public", "boolean", "onPreferenceChange", "(", "final"...
Creates and returns a listener, which allows to adapt, whether the button bar dividers of the preference's dialogs should be shown, or not, when the corresponding setting has been changed. @return The listener, which has been created, as an instance of the type {@link Preference.OnPreferenceChangeListener}
[ "Creates", "and", "returns", "a", "listener", "which", "allows", "to", "adapt", "whether", "the", "button", "bar", "dividers", "of", "the", "preference", "s", "dialogs", "should", "be", "shown", "or", "not", "when", "the", "corresponding", "setting", "has", ...
train
https://github.com/michael-rapp/AndroidMaterialPreferences/blob/73a7e449458313bd041fc8d6038e290506b68eb1/example/src/main/java/de/mrapp/android/preference/example/PreferenceFragment.java#L205-L224
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/time/DateUtils.java
DateUtils.truncatedEquals
public static boolean truncatedEquals(final Date date1, final Date date2, final int field) { """ Determines if two dates are equal up to no more than the specified most significant field. @param date1 the first date, not <code>null</code> @param date2 the second date, not <code>null</code> @param field the f...
java
public static boolean truncatedEquals(final Date date1, final Date date2, final int field) { return truncatedCompareTo(date1, date2, field) == 0; }
[ "public", "static", "boolean", "truncatedEquals", "(", "final", "Date", "date1", ",", "final", "Date", "date2", ",", "final", "int", "field", ")", "{", "return", "truncatedCompareTo", "(", "date1", ",", "date2", ",", "field", ")", "==", "0", ";", "}" ]
Determines if two dates are equal up to no more than the specified most significant field. @param date1 the first date, not <code>null</code> @param date2 the second date, not <code>null</code> @param field the field from {@code Calendar} @return <code>true</code> if equal; otherwise <code>false</code> @throws Illegal...
[ "Determines", "if", "two", "dates", "are", "equal", "up", "to", "no", "more", "than", "the", "specified", "most", "significant", "field", "." ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/time/DateUtils.java#L1760-L1762