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
code4everything/util
src/main/java/com/zhazhapan/util/MailSender.java
MailSender.config
public static void config(String host, String personal, String from, String key, int port) { """ 配置邮箱 @param host 邮件服务器 @param personal 个人名称 @param from 发件箱 @param key 密码 @param port 端口 """ config(host, personal, from, key); setPort(port); }
java
public static void config(String host, String personal, String from, String key, int port) { config(host, personal, from, key); setPort(port); }
[ "public", "static", "void", "config", "(", "String", "host", ",", "String", "personal", ",", "String", "from", ",", "String", "key", ",", "int", "port", ")", "{", "config", "(", "host", ",", "personal", ",", "from", ",", "key", ")", ";", "setPort", "...
配置邮箱 @param host 邮件服务器 @param personal 个人名称 @param from 发件箱 @param key 密码 @param port 端口
[ "配置邮箱" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/MailSender.java#L79-L82
alkacon/opencms-core
src/org/opencms/loader/CmsResourceManager.java
CmsResourceManager.loadResource
public void loadResource(CmsObject cms, CmsResource resource, HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException, CmsException { """ Loads the requested resource and writes the contents to the response stream.<p> @param req the current HTTP request @param res the current ...
java
public void loadResource(CmsObject cms, CmsResource resource, HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException, CmsException { res.setContentType(getMimeType(resource.getName(), cms.getRequestContext().getEncoding())); I_CmsResourceLoader loader = getLoader(reso...
[ "public", "void", "loadResource", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ",", "HttpServletRequest", "req", ",", "HttpServletResponse", "res", ")", "throws", "ServletException", ",", "IOException", ",", "CmsException", "{", "res", ".", "setContentTy...
Loads the requested resource and writes the contents to the response stream.<p> @param req the current HTTP request @param res the current HTTP response @param cms the current OpenCms user context @param resource the requested resource @throws ServletException if something goes wrong @throws IOException if something g...
[ "Loads", "the", "requested", "resource", "and", "writes", "the", "contents", "to", "the", "response", "stream", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/loader/CmsResourceManager.java#L1189-L1195
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/utils/BinaryFast.java
BinaryFast.generateBackgroundEdgeFromForegroundEdge
public void generateBackgroundEdgeFromForegroundEdge() { """ Generates the background edge hash set from the foreground edge hash set and the 2D array of pixels. """ backgroundEdgePixels.clear(); Point p, p2; Iterator<Point> it = foregroundEdgePixels.iterator(); while( it.hasNe...
java
public void generateBackgroundEdgeFromForegroundEdge() { backgroundEdgePixels.clear(); Point p, p2; Iterator<Point> it = foregroundEdgePixels.iterator(); while( it.hasNext() ) { p = new Point(it.next()); for( int j = -1; j < 2; ++j ) { for( int i =...
[ "public", "void", "generateBackgroundEdgeFromForegroundEdge", "(", ")", "{", "backgroundEdgePixels", ".", "clear", "(", ")", ";", "Point", "p", ",", "p2", ";", "Iterator", "<", "Point", ">", "it", "=", "foregroundEdgePixels", ".", "iterator", "(", ")", ";", ...
Generates the background edge hash set from the foreground edge hash set and the 2D array of pixels.
[ "Generates", "the", "background", "edge", "hash", "set", "from", "the", "foreground", "edge", "hash", "set", "and", "the", "2D", "array", "of", "pixels", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/utils/BinaryFast.java#L207-L224
alkacon/opencms-core
src/org/opencms/ade/configuration/CmsConfigurationReader.java
CmsConfigurationReader.parseFolderOrName
public CmsContentFolderDescriptor parseFolderOrName(String basePath, I_CmsXmlContentLocation location) throws CmsException { """ Parses a folder which may either be given as a path or as a folder name.<p> @param basePath the base path for the configuration @param location the XML content node from which t...
java
public CmsContentFolderDescriptor parseFolderOrName(String basePath, I_CmsXmlContentLocation location) throws CmsException { if (location == null) { return null; } I_CmsXmlContentValueLocation nameLoc = location.getSubValue(N_NAME); I_CmsXmlContentValueLocation pathLoc =...
[ "public", "CmsContentFolderDescriptor", "parseFolderOrName", "(", "String", "basePath", ",", "I_CmsXmlContentLocation", "location", ")", "throws", "CmsException", "{", "if", "(", "location", "==", "null", ")", "{", "return", "null", ";", "}", "I_CmsXmlContentValueLoca...
Parses a folder which may either be given as a path or as a folder name.<p> @param basePath the base path for the configuration @param location the XML content node from which to parse the folder @return the folder bean @throws CmsException if something goes wrong
[ "Parses", "a", "folder", "which", "may", "either", "be", "given", "as", "a", "path", "or", "as", "a", "folder", "name", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/configuration/CmsConfigurationReader.java#L502-L525
landawn/AbacusUtil
src/com/landawn/abacus/util/FileSystemUtil.java
FileSystemUtil.freeSpaceWindows
long freeSpaceWindows(String path, final long timeout) throws IOException { """ Find free space on the Windows platform using the 'dir' command. @param path the path to get free space for, including the colon @param timeout The timeout amount in milliseconds or no timeout if the value is zero or less @retur...
java
long freeSpaceWindows(String path, final long timeout) throws IOException { path = FilenameUtil.normalize(path, false); if (path.length() > 0 && path.charAt(0) != '"') { path = "\"" + path + "\""; } // build and run the 'dir' command final String[] cmdAttribs ...
[ "long", "freeSpaceWindows", "(", "String", "path", ",", "final", "long", "timeout", ")", "throws", "IOException", "{", "path", "=", "FilenameUtil", ".", "normalize", "(", "path", ",", "false", ")", ";", "if", "(", "path", ".", "length", "(", ")", ">", ...
Find free space on the Windows platform using the 'dir' command. @param path the path to get free space for, including the colon @param timeout The timeout amount in milliseconds or no timeout if the value is zero or less @return the amount of free drive space on the drive @throws IOException if an error occurs
[ "Find", "free", "space", "on", "the", "Windows", "platform", "using", "the", "dir", "command", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/FileSystemUtil.java#L248-L272
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseShapeInfoProvider.java
BaseShapeInfoProvider.createShapeInformation
@Override public Pair<DataBuffer, long[]> createShapeInformation(long[] shape, DataType dataType) { """ This method creates shapeInformation buffer, based on shape being passed in @param shape @return """ char order = Nd4j.order(); return createShapeInformation(shape, order, dataType);...
java
@Override public Pair<DataBuffer, long[]> createShapeInformation(long[] shape, DataType dataType) { char order = Nd4j.order(); return createShapeInformation(shape, order, dataType); }
[ "@", "Override", "public", "Pair", "<", "DataBuffer", ",", "long", "[", "]", ">", "createShapeInformation", "(", "long", "[", "]", "shape", ",", "DataType", "dataType", ")", "{", "char", "order", "=", "Nd4j", ".", "order", "(", ")", ";", "return", "cre...
This method creates shapeInformation buffer, based on shape being passed in @param shape @return
[ "This", "method", "creates", "shapeInformation", "buffer", "based", "on", "shape", "being", "passed", "in" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseShapeInfoProvider.java#L43-L48
williamwebb/alogger
ALogger/alogger-base/src/main/java/com/jug6ernaut/android/logging/LogEntry.java
LogEntry.fromLogRecord
public static LogEntry fromLogRecord(LogRecord record) { """ /* public Spanned toColorString(){ StringBuilder sb = new StringBuilder(); sb.append(toString()); LogLevel l = LogLevel.INFO; switch(level){ case INFO:{ sb.insert(0, "<font color=\"white\">"); sb.append("</font>"); }break; case Level.WA...
java
public static LogEntry fromLogRecord(LogRecord record){ Level level; long when = 0; String message = ""; when = record.getMillis(); message = (record.getMessage()==null?"":record.getMessage()); level = record.getLevel(); return new LogEntry(level, when, message); }
[ "public", "static", "LogEntry", "fromLogRecord", "(", "LogRecord", "record", ")", "{", "Level", "level", ";", "long", "when", "=", "0", ";", "String", "message", "=", "\"\"", ";", "when", "=", "record", ".", "getMillis", "(", ")", ";", "message", "=", ...
/* public Spanned toColorString(){ StringBuilder sb = new StringBuilder(); sb.append(toString()); LogLevel l = LogLevel.INFO; switch(level){ case INFO:{ sb.insert(0, "<font color=\"white\">"); sb.append("</font>"); }break; case Level.WARNING:{ sb.insert(0, "<font color=\"yellow\">"); sb.append("</font>"); }break; c...
[ "/", "*", "public", "Spanned", "toColorString", "()", "{" ]
train
https://github.com/williamwebb/alogger/blob/61fca49e0b8d9c3a76c40da8883ac354b240351e/ALogger/alogger-base/src/main/java/com/jug6ernaut/android/logging/LogEntry.java#L95-L105
mgormley/pacaya
src/main/java/edu/jhu/pacaya/gm/model/VarConfig.java
VarConfig.put
public void put(Var var, int state) { """ Sets the state value to state for the given variable, adding it if necessary. """ if (state < 0 || state >= var.getNumStates()) { throw new IllegalArgumentException("Invalid state idx " + state + " for var " + var); } config.put(var,...
java
public void put(Var var, int state) { if (state < 0 || state >= var.getNumStates()) { throw new IllegalArgumentException("Invalid state idx " + state + " for var " + var); } config.put(var, state); vars.add(var); }
[ "public", "void", "put", "(", "Var", "var", ",", "int", "state", ")", "{", "if", "(", "state", "<", "0", "||", "state", ">=", "var", ".", "getNumStates", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid state idx \"", "+", ...
Sets the state value to state for the given variable, adding it if necessary.
[ "Sets", "the", "state", "value", "to", "state", "for", "the", "given", "variable", "adding", "it", "if", "necessary", "." ]
train
https://github.com/mgormley/pacaya/blob/786294cbac7cc65dbc32210c10acc32ed0c69233/src/main/java/edu/jhu/pacaya/gm/model/VarConfig.java#L91-L97
Azure/azure-sdk-for-java
compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java
DisksInner.revokeAccessAsync
public Observable<Void> revokeAccessAsync(String resourceGroupName, String diskName) { """ Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported charac...
java
public Observable<Void> revokeAccessAsync(String resourceGroupName, String diskName) { return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { retu...
[ "public", "Observable", "<", "Void", ">", "revokeAccessAsync", "(", "String", "resourceGroupName", ",", "String", "diskName", ")", "{", "return", "revokeAccessWithServiceResponseAsync", "(", "resourceGroupName", ",", "diskName", ")", ".", "map", "(", "new", "Func1",...
Revokes access to a disk. @param resourceGroupName The name of the resource group. @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. @throws Illega...
[ "Revokes", "access", "to", "a", "disk", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/compute/v2018_04_01/implementation/DisksInner.java#L1146-L1153
kubernetes-client/java
util/src/main/java/io/kubernetes/client/util/Yaml.java
Yaml.loadAs
public static <T> T loadAs(String content, Class<T> clazz) { """ Load an API object from a YAML string representation. Returns a concrete typed object using the type specified. @param content The YAML content @param clazz The class of object to return. @return An instantiation of the object. @throws IOExcep...
java
public static <T> T loadAs(String content, Class<T> clazz) { return getSnakeYaml().loadAs(new StringReader(content), clazz); }
[ "public", "static", "<", "T", ">", "T", "loadAs", "(", "String", "content", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "getSnakeYaml", "(", ")", ".", "loadAs", "(", "new", "StringReader", "(", "content", ")", ",", "clazz", ")", ";", ...
Load an API object from a YAML string representation. Returns a concrete typed object using the type specified. @param content The YAML content @param clazz The class of object to return. @return An instantiation of the object. @throws IOException If an error occurs while reading the YAML.
[ "Load", "an", "API", "object", "from", "a", "YAML", "string", "representation", ".", "Returns", "a", "concrete", "typed", "object", "using", "the", "type", "specified", "." ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/util/src/main/java/io/kubernetes/client/util/Yaml.java#L196-L198
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataPropertyImpl_CustomFieldSerializer.java
OWLDataPropertyImpl_CustomFieldSerializer.serializeInstance
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataPropertyImpl instance) throws SerializationException { """ Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user....
java
@Override public void serializeInstance(SerializationStreamWriter streamWriter, OWLDataPropertyImpl instance) throws SerializationException { serialize(streamWriter, instance); }
[ "@", "Override", "public", "void", "serializeInstance", "(", "SerializationStreamWriter", "streamWriter", ",", "OWLDataPropertyImpl", "instance", ")", "throws", "SerializationException", "{", "serialize", "(", "streamWriter", ",", "instance", ")", ";", "}" ]
Serializes the content of the object into the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter}. @param streamWriter the {@link com.google.gwt.user.client.rpc.SerializationStreamWriter} to write the object's content to @param instance the object instance to serialize @throws com.google.gwt.user.client.rp...
[ "Serializes", "the", "content", "of", "the", "object", "into", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataPropertyImpl_CustomFieldSerializer.java#L63-L66
alkacon/opencms-core
src/org/opencms/db/CmsDriverManager.java
CmsDriverManager.getCacheKey
private String getCacheKey(String prefix, boolean flag, CmsUUID projectId, String resource) { """ Return a cache key build from the provided information.<p> @param prefix a prefix for the key @param flag a boolean flag for the key (only used if prefix is not null) @param projectId the project for which to gen...
java
private String getCacheKey(String prefix, boolean flag, CmsUUID projectId, String resource) { StringBuffer b = new StringBuffer(64); if (prefix != null) { b.append(prefix); b.append(flag ? '+' : '-'); } b.append(CmsProject.isOnlineProject(projectId) ? '+' : '-');...
[ "private", "String", "getCacheKey", "(", "String", "prefix", ",", "boolean", "flag", ",", "CmsUUID", "projectId", ",", "String", "resource", ")", "{", "StringBuffer", "b", "=", "new", "StringBuffer", "(", "64", ")", ";", "if", "(", "prefix", "!=", "null", ...
Return a cache key build from the provided information.<p> @param prefix a prefix for the key @param flag a boolean flag for the key (only used if prefix is not null) @param projectId the project for which to generate the key @param resource the resource for which to generate the key @return String a cache key build ...
[ "Return", "a", "cache", "key", "build", "from", "the", "provided", "information", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsDriverManager.java#L11166-L11175
OpenTSDB/opentsdb
src/tsd/HttpJsonSerializer.java
HttpJsonSerializer.parseQueryV1
public TSQuery parseQueryV1() { """ Parses a timeseries data query @return A TSQuery with data ready to validate @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed """ final String json = query.getContent(); if (json == null || json.isEmp...
java
public TSQuery parseQueryV1() { final String json = query.getContent(); if (json == null || json.isEmpty()) { throw new BadRequestException(HttpResponseStatus.BAD_REQUEST, "Missing message content", "Supply valid JSON formatted data in the body of your request"); } try { ...
[ "public", "TSQuery", "parseQueryV1", "(", ")", "{", "final", "String", "json", "=", "query", ".", "getContent", "(", ")", ";", "if", "(", "json", "==", "null", "||", "json", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "BadRequestException", "("...
Parses a timeseries data query @return A TSQuery with data ready to validate @throws JSONException if parsing failed @throws BadRequestException if the content was missing or parsing failed
[ "Parses", "a", "timeseries", "data", "query" ]
train
https://github.com/OpenTSDB/opentsdb/blob/3fc2d491c3c1ad397252c0a80203a69a3f9e3ef3/src/tsd/HttpJsonSerializer.java#L264-L281
pgjdbc/pgjdbc
pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java
EscapedFunctions2.sqlltrim
public static void sqlltrim(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { """ ltrim translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens """ singleArgumentFunctionCall(buf, "trim(leading from ",...
java
public static void sqlltrim(StringBuilder buf, List<? extends CharSequence> parsedArgs) throws SQLException { singleArgumentFunctionCall(buf, "trim(leading from ", "ltrim", parsedArgs); }
[ "public", "static", "void", "sqlltrim", "(", "StringBuilder", "buf", ",", "List", "<", "?", "extends", "CharSequence", ">", "parsedArgs", ")", "throws", "SQLException", "{", "singleArgumentFunctionCall", "(", "buf", ",", "\"trim(leading from \"", ",", "\"ltrim\"", ...
ltrim translation @param buf The buffer to append into @param parsedArgs arguments @throws SQLException if something wrong happens
[ "ltrim", "translation" ]
train
https://github.com/pgjdbc/pgjdbc/blob/95ba7b261e39754674c5817695ae5ebf9a341fae/pgjdbc/src/main/java/org/postgresql/jdbc/EscapedFunctions2.java#L250-L252
Azure/azure-sdk-for-java
appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getHostingEnvironmentDetectorResponse
public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName) { """ Get Hosting Environment Detector Response. Get Hosting Environment Detector Response. @param resourceGroupName Name of the resource group to which the resource belongs. @param n...
java
public DetectorResponseInner getHostingEnvironmentDetectorResponse(String resourceGroupName, String name, String detectorName) { return getHostingEnvironmentDetectorResponseWithServiceResponseAsync(resourceGroupName, name, detectorName).toBlocking().single().body(); }
[ "public", "DetectorResponseInner", "getHostingEnvironmentDetectorResponse", "(", "String", "resourceGroupName", ",", "String", "name", ",", "String", "detectorName", ")", "{", "return", "getHostingEnvironmentDetectorResponseWithServiceResponseAsync", "(", "resourceGroupName", ","...
Get Hosting Environment Detector Response. Get Hosting Environment Detector Response. @param resourceGroupName Name of the resource group to which the resource belongs. @param name App Service Environment Name @param detectorName Detector Resource Name @throws IllegalArgumentException thrown if parameters fail the val...
[ "Get", "Hosting", "Environment", "Detector", "Response", ".", "Get", "Hosting", "Environment", "Detector", "Response", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2016_03_01/src/main/java/com/microsoft/azure/management/appservice/v2016_03_01/implementation/DiagnosticsInner.java#L336-L338
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java
VMath.setRow
public static void setRow(final double[][] m1, final int r, final double[] row) { """ Sets the <code>r</code>th row of this matrix to the specified vector. @param m1 Original matrix @param r the index of the column to be set @param row the value of the column to be set """ final int columndimension = ...
java
public static void setRow(final double[][] m1, final int r, final double[] row) { final int columndimension = getColumnDimensionality(m1); assert row.length == columndimension : ERR_DIMENSIONS; System.arraycopy(row, 0, m1[r], 0, columndimension); }
[ "public", "static", "void", "setRow", "(", "final", "double", "[", "]", "[", "]", "m1", ",", "final", "int", "r", ",", "final", "double", "[", "]", "row", ")", "{", "final", "int", "columndimension", "=", "getColumnDimensionality", "(", "m1", ")", ";",...
Sets the <code>r</code>th row of this matrix to the specified vector. @param m1 Original matrix @param r the index of the column to be set @param row the value of the column to be set
[ "Sets", "the", "<code", ">", "r<", "/", "code", ">", "th", "row", "of", "this", "matrix", "to", "the", "specified", "vector", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/linearalgebra/VMath.java#L1078-L1082
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.agreements_GET
public ArrayList<Long> agreements_GET(OvhAgreementStateEnum agreed, Long contractId) throws IOException { """ List of contracts signed between you and OVH REST: GET /me/agreements @param contractId [required] Filter the value of contractId property (like) @param agreed [required] Filter the value of agreed pr...
java
public ArrayList<Long> agreements_GET(OvhAgreementStateEnum agreed, Long contractId) throws IOException { String qPath = "/me/agreements"; StringBuilder sb = path(qPath); query(sb, "agreed", agreed); query(sb, "contractId", contractId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo...
[ "public", "ArrayList", "<", "Long", ">", "agreements_GET", "(", "OvhAgreementStateEnum", "agreed", ",", "Long", "contractId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/agreements\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ...
List of contracts signed between you and OVH REST: GET /me/agreements @param contractId [required] Filter the value of contractId property (like) @param agreed [required] Filter the value of agreed property (like)
[ "List", "of", "contracts", "signed", "between", "you", "and", "OVH" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1468-L1475
phax/ph-commons
ph-commons/src/main/java/com/helger/commons/http/HttpHeaderMap.java
HttpHeaderMap.addIntHeader
public void addIntHeader (@Nonnull @Nonempty final String sName, final int nValue) { """ Add the passed header as a number. @param sName Header name. May neither be <code>null</code> nor empty. @param nValue The value to be set. May not be <code>null</code>. """ _addHeader (sName, Integer.toString (n...
java
public void addIntHeader (@Nonnull @Nonempty final String sName, final int nValue) { _addHeader (sName, Integer.toString (nValue)); }
[ "public", "void", "addIntHeader", "(", "@", "Nonnull", "@", "Nonempty", "final", "String", "sName", ",", "final", "int", "nValue", ")", "{", "_addHeader", "(", "sName", ",", "Integer", ".", "toString", "(", "nValue", ")", ")", ";", "}" ]
Add the passed header as a number. @param sName Header name. May neither be <code>null</code> nor empty. @param nValue The value to be set. May not be <code>null</code>.
[ "Add", "the", "passed", "header", "as", "a", "number", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-commons/src/main/java/com/helger/commons/http/HttpHeaderMap.java#L356-L359
OpenLiberty/open-liberty
dev/com.ibm.ws.injection/src/com/ibm/ws/injectionengine/osgi/internal/IndirectJndiLookupObjectFactory.java
IndirectJndiLookupObjectFactory.createResource
private Object createResource(String refName, String className, String bindingName, ResourceInfo resourceRefInfo) throws Exception { """ Try to obtain an object instance by creating a resource using a ResourceFactory. @return the object instance, or null if an object could not be found """ String n...
java
private Object createResource(String refName, String className, String bindingName, ResourceInfo resourceRefInfo) throws Exception { String nameFilter = FilterUtils.createPropertyFilter(ResourceFactory.JNDI_NAME, bindingName); String createsFilter = className == null ? null : FilterUtils.createPropertyF...
[ "private", "Object", "createResource", "(", "String", "refName", ",", "String", "className", ",", "String", "bindingName", ",", "ResourceInfo", "resourceRefInfo", ")", "throws", "Exception", "{", "String", "nameFilter", "=", "FilterUtils", ".", "createPropertyFilter",...
Try to obtain an object instance by creating a resource using a ResourceFactory. @return the object instance, or null if an object could not be found
[ "Try", "to", "obtain", "an", "object", "instance", "by", "creating", "a", "resource", "using", "a", "ResourceFactory", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.injection/src/com/ibm/ws/injectionengine/osgi/internal/IndirectJndiLookupObjectFactory.java#L333-L339
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java
ICUResourceBundle.getAvailableLocales
public static final Locale[] getAvailableLocales(String baseName, ClassLoader loader) { """ Get the set of Locales installed in the specified bundles. @return the list of available locales """ return getAvailEntry(baseName, loader).getLocaleList(); }
java
public static final Locale[] getAvailableLocales(String baseName, ClassLoader loader) { return getAvailEntry(baseName, loader).getLocaleList(); }
[ "public", "static", "final", "Locale", "[", "]", "getAvailableLocales", "(", "String", "baseName", ",", "ClassLoader", "loader", ")", "{", "return", "getAvailEntry", "(", "baseName", ",", "loader", ")", ".", "getLocaleList", "(", ")", ";", "}" ]
Get the set of Locales installed in the specified bundles. @return the list of available locales
[ "Get", "the", "set", "of", "Locales", "installed", "in", "the", "specified", "bundles", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/ICUResourceBundle.java#L491-L493
aws/aws-sdk-java
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/DomainEntry.java
DomainEntry.withOptions
@Deprecated public DomainEntry withOptions(java.util.Map<String, String> options) { """ <p> (Deprecated) The options for the domain entry. </p> <note> <p> In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated. </p> </note> @param options (...
java
@Deprecated public DomainEntry withOptions(java.util.Map<String, String> options) { setOptions(options); return this; }
[ "@", "Deprecated", "public", "DomainEntry", "withOptions", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "options", ")", "{", "setOptions", "(", "options", ")", ";", "return", "this", ";", "}" ]
<p> (Deprecated) The options for the domain entry. </p> <note> <p> In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated. </p> </note> @param options (Deprecated) The options for the domain entry.</p> <note> <p> In releases prior to November 29, 2017, this pa...
[ "<p", ">", "(", "Deprecated", ")", "The", "options", "for", "the", "domain", "entry", ".", "<", "/", "p", ">", "<note", ">", "<p", ">", "In", "releases", "prior", "to", "November", "29", "2017", "this", "parameter", "was", "not", "included", "in", "t...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/DomainEntry.java#L685-L689
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbmonbindings_binding.java
lbmonbindings_binding.get
public static lbmonbindings_binding get(nitro_service service, String monitorname) throws Exception { """ Use this API to fetch lbmonbindings_binding resource of given name . """ lbmonbindings_binding obj = new lbmonbindings_binding(); obj.set_monitorname(monitorname); lbmonbindings_binding response = (l...
java
public static lbmonbindings_binding get(nitro_service service, String monitorname) throws Exception{ lbmonbindings_binding obj = new lbmonbindings_binding(); obj.set_monitorname(monitorname); lbmonbindings_binding response = (lbmonbindings_binding) obj.get_resource(service); return response; }
[ "public", "static", "lbmonbindings_binding", "get", "(", "nitro_service", "service", ",", "String", "monitorname", ")", "throws", "Exception", "{", "lbmonbindings_binding", "obj", "=", "new", "lbmonbindings_binding", "(", ")", ";", "obj", ".", "set_monitorname", "("...
Use this API to fetch lbmonbindings_binding resource of given name .
[ "Use", "this", "API", "to", "fetch", "lbmonbindings_binding", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/lb/lbmonbindings_binding.java#L114-L119
facebookarchive/hadoop-20
src/core/org/apache/hadoop/io/BufferedByteOutputStream.java
BufferedByteOutputStream.wrapOutputStream
public static DataOutputStream wrapOutputStream(OutputStream os, int bufferSize, int writeBufferSize) { """ Wrap given output stream with BufferedByteInputOutput. This is the only way to instantiate the buffered output stream. @param os underlying output stream @param bufferSize size of the in memory buff...
java
public static DataOutputStream wrapOutputStream(OutputStream os, int bufferSize, int writeBufferSize) { // wrapping BufferedByteOutputStream in BufferedOutputStream decreases // pressure on BBOS internal locks, and we read from the BBOS in // bigger chunks return new DataOutputStream(new BufferedO...
[ "public", "static", "DataOutputStream", "wrapOutputStream", "(", "OutputStream", "os", ",", "int", "bufferSize", ",", "int", "writeBufferSize", ")", "{", "// wrapping BufferedByteOutputStream in BufferedOutputStream decreases", "// pressure on BBOS internal locks, and we read from th...
Wrap given output stream with BufferedByteInputOutput. This is the only way to instantiate the buffered output stream. @param os underlying output stream @param bufferSize size of the in memory buffer @param writeBufferSize size of the buffer used for writing to is
[ "Wrap", "given", "output", "stream", "with", "BufferedByteInputOutput", ".", "This", "is", "the", "only", "way", "to", "instantiate", "the", "buffered", "output", "stream", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/io/BufferedByteOutputStream.java#L59-L66
jtrfp/javamod
src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java
ID3v1Tag.checkHeader
private boolean checkHeader(RandomAccessInputStream raf) throws FileNotFoundException, IOException { """ Checks whether a header for the id3 tag exists yet @return true if a tag is found @exception FileNotFoundException if an error occurs @exception IOException if an error occurs """ boolean retval = fa...
java
private boolean checkHeader(RandomAccessInputStream raf) throws FileNotFoundException, IOException { boolean retval = false; if (raf.length() > TAG_SIZE) { raf.seek(raf.length() - TAG_SIZE); byte[] buf = new byte[3]; if (raf.read(buf) != 3) { throw new IOException("Error encountered reading ID3...
[ "private", "boolean", "checkHeader", "(", "RandomAccessInputStream", "raf", ")", "throws", "FileNotFoundException", ",", "IOException", "{", "boolean", "retval", "=", "false", ";", "if", "(", "raf", ".", "length", "(", ")", ">", "TAG_SIZE", ")", "{", "raf", ...
Checks whether a header for the id3 tag exists yet @return true if a tag is found @exception FileNotFoundException if an error occurs @exception IOException if an error occurs
[ "Checks", "whether", "a", "header", "for", "the", "id3", "tag", "exists", "yet" ]
train
https://github.com/jtrfp/javamod/blob/cda4fe943a589dc49415f4413453e2eece72076a/src/main/java/de/quippy/javamod/multimedia/mp3/id3/ID3v1Tag.java#L107-L128
meertensinstituut/mtas
src/main/java/mtas/analysis/parser/MtasBasicParser.java
MtasBasicParser.addAndEncodeValue
private String addAndEncodeValue(String originalValue, String newValue, boolean encode) { """ Adds the and encode value. @param originalValue the original value @param newValue the new value @param encode the encode @return the string """ return addAndEncode(originalValue, null, newValue, encod...
java
private String addAndEncodeValue(String originalValue, String newValue, boolean encode) { return addAndEncode(originalValue, null, newValue, encode); }
[ "private", "String", "addAndEncodeValue", "(", "String", "originalValue", ",", "String", "newValue", ",", "boolean", "encode", ")", "{", "return", "addAndEncode", "(", "originalValue", ",", "null", ",", "newValue", ",", "encode", ")", ";", "}" ]
Adds the and encode value. @param originalValue the original value @param newValue the new value @param encode the encode @return the string
[ "Adds", "the", "and", "encode", "value", "." ]
train
https://github.com/meertensinstituut/mtas/blob/f02ae730848616bd88b553efa7f9eddc32818e64/src/main/java/mtas/analysis/parser/MtasBasicParser.java#L1031-L1034
italiangrid/voms-clients
src/main/java/org/italiangrid/voms/clients/util/UsageProvider.java
UsageProvider.displayUsage
public static void displayUsage(String cmdLineSyntax, Options options) { """ Displays usage. @param cmdLineSyntax the string that will be displayed on top of the usage message @param options the command options """ HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp(cmdLin...
java
public static void displayUsage(String cmdLineSyntax, Options options) { HelpFormatter helpFormatter = new HelpFormatter(); helpFormatter.printHelp(cmdLineSyntax, options); }
[ "public", "static", "void", "displayUsage", "(", "String", "cmdLineSyntax", ",", "Options", "options", ")", "{", "HelpFormatter", "helpFormatter", "=", "new", "HelpFormatter", "(", ")", ";", "helpFormatter", ".", "printHelp", "(", "cmdLineSyntax", ",", "options", ...
Displays usage. @param cmdLineSyntax the string that will be displayed on top of the usage message @param options the command options
[ "Displays", "usage", "." ]
train
https://github.com/italiangrid/voms-clients/blob/069cbe324c85286fa454bd78c3f76c23e97e5768/src/main/java/org/italiangrid/voms/clients/util/UsageProvider.java#L38-L42
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java
DefaultShardManagerBuilder.setCallbackPool
public DefaultShardManagerBuilder setCallbackPool(ExecutorService executor, boolean automaticShutdown) { """ Sets the {@link ExecutorService ExecutorService} that should be used in the JDA callback handler which mostly consists of {@link net.dv8tion.jda.core.requests.RestAction RestAction} callbacks. By default ...
java
public DefaultShardManagerBuilder setCallbackPool(ExecutorService executor, boolean automaticShutdown) { return setCallbackPoolProvider(executor == null ? null : new ThreadPoolProviderImpl<>(executor, automaticShutdown)); }
[ "public", "DefaultShardManagerBuilder", "setCallbackPool", "(", "ExecutorService", "executor", ",", "boolean", "automaticShutdown", ")", "{", "return", "setCallbackPoolProvider", "(", "executor", "==", "null", "?", "null", ":", "new", "ThreadPoolProviderImpl", "<>", "("...
Sets the {@link ExecutorService ExecutorService} that should be used in the JDA callback handler which mostly consists of {@link net.dv8tion.jda.core.requests.RestAction RestAction} callbacks. By default JDA will use {@link ForkJoinPool#commonPool()} <br><b>Only change this pool if you know what you're doing.</b> @par...
[ "Sets", "the", "{", "@link", "ExecutorService", "ExecutorService", "}", "that", "should", "be", "used", "in", "the", "JDA", "callback", "handler", "which", "mostly", "consists", "of", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "requ...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/bot/sharding/DefaultShardManagerBuilder.java#L837-L840
looly/hutool
hutool-core/src/main/java/cn/hutool/core/text/csv/CsvReader.java
CsvReader.read
public CsvData read(File file, Charset charset) throws IORuntimeException { """ 读取CSV文件 @param file CSV文件 @param charset 文件编码,默认系统编码 @return {@link CsvData},包含数据列表和行信息 @throws IORuntimeException IO异常 """ return read(Objects.requireNonNull(file.toPath(), "file must not be null"), charset); }
java
public CsvData read(File file, Charset charset) throws IORuntimeException { return read(Objects.requireNonNull(file.toPath(), "file must not be null"), charset); }
[ "public", "CsvData", "read", "(", "File", "file", ",", "Charset", "charset", ")", "throws", "IORuntimeException", "{", "return", "read", "(", "Objects", ".", "requireNonNull", "(", "file", ".", "toPath", "(", ")", ",", "\"file must not be null\"", ")", ",", ...
读取CSV文件 @param file CSV文件 @param charset 文件编码,默认系统编码 @return {@link CsvData},包含数据列表和行信息 @throws IORuntimeException IO异常
[ "读取CSV文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/text/csv/CsvReader.java#L108-L110
google/closure-compiler
src/com/google/javascript/jscomp/AstValidator.java
AstValidator.validateClassDeclaration
private void validateClassDeclaration(Node n, boolean isAmbient) { """ In a class declaration, unlike a class expression, the class name is required. """ validateClassHelper(n, isAmbient); validateName(n.getFirstChild()); }
java
private void validateClassDeclaration(Node n, boolean isAmbient) { validateClassHelper(n, isAmbient); validateName(n.getFirstChild()); }
[ "private", "void", "validateClassDeclaration", "(", "Node", "n", ",", "boolean", "isAmbient", ")", "{", "validateClassHelper", "(", "n", ",", "isAmbient", ")", ";", "validateName", "(", "n", ".", "getFirstChild", "(", ")", ")", ";", "}" ]
In a class declaration, unlike a class expression, the class name is required.
[ "In", "a", "class", "declaration", "unlike", "a", "class", "expression", "the", "class", "name", "is", "required", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/AstValidator.java#L723-L726
james-hu/jabb-core
src/main/java/net/sf/jabb/web/action/VfsTreeAction.java
VfsTreeAction.populateTreeNodeData
protected JsTreeNodeData populateTreeNodeData(FileObject file, boolean noChild, String relativePath) throws FileSystemException { """ It transforms FileObject into JsTreeNodeData. @param file the file whose information will be encapsulated in the node data structure. @return The node data structure which presen...
java
protected JsTreeNodeData populateTreeNodeData(FileObject file, boolean noChild, String relativePath) throws FileSystemException { JsTreeNodeData node = new JsTreeNodeData(); String baseName = file.getName().getBaseName(); FileContent content = file.getContent(); FileType type = file.getType(); node...
[ "protected", "JsTreeNodeData", "populateTreeNodeData", "(", "FileObject", "file", ",", "boolean", "noChild", ",", "String", "relativePath", ")", "throws", "FileSystemException", "{", "JsTreeNodeData", "node", "=", "new", "JsTreeNodeData", "(", ")", ";", "String", "b...
It transforms FileObject into JsTreeNodeData. @param file the file whose information will be encapsulated in the node data structure. @return The node data structure which presents the file. @throws FileSystemException
[ "It", "transforms", "FileObject", "into", "JsTreeNodeData", "." ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/web/action/VfsTreeAction.java#L152-L181
j256/simplecsv
src/main/java/com/j256/simplecsv/processor/CsvProcessor.java
CsvProcessor.writeAll
public void writeAll(File file, Collection<T> entities, boolean writeHeader) throws IOException { """ Write a collection of entities to the writer. @param file Where to write the header and entities. @param entities Collection of entities to write to the writer. @param writeHeader Set to true to write head...
java
public void writeAll(File file, Collection<T> entities, boolean writeHeader) throws IOException { writeAll(new FileWriter(file), entities, writeHeader); }
[ "public", "void", "writeAll", "(", "File", "file", ",", "Collection", "<", "T", ">", "entities", ",", "boolean", "writeHeader", ")", "throws", "IOException", "{", "writeAll", "(", "new", "FileWriter", "(", "file", ")", ",", "entities", ",", "writeHeader", ...
Write a collection of entities to the writer. @param file Where to write the header and entities. @param entities Collection of entities to write to the writer. @param writeHeader Set to true to write header at the start of the output file. @throws IOException If there are any IO exceptions thrown when writing.
[ "Write", "a", "collection", "of", "entities", "to", "the", "writer", "." ]
train
https://github.com/j256/simplecsv/blob/964fe53073c43e2a311341e3f8fd2c94372f60cb/src/main/java/com/j256/simplecsv/processor/CsvProcessor.java#L410-L412
att/AAF
cadi/core/src/main/java/com/att/cadi/Symm.java
Symm.exec
private synchronized void exec(AESExec exec) throws IOException { """ /* Note: AES Encryption is NOT thread-safe. Must surround entire use with synchronized """ if(aes == null) { try { byte[] bytes = new byte[AES.AES_KEY_SIZE/8]; int offset = (Math.abs(codeset[0])+47)%(codeset.length-bytes.lengt...
java
private synchronized void exec(AESExec exec) throws IOException { if(aes == null) { try { byte[] bytes = new byte[AES.AES_KEY_SIZE/8]; int offset = (Math.abs(codeset[0])+47)%(codeset.length-bytes.length); for(int i=0;i<bytes.length;++i) { bytes[i] = (byte)codeset[i+offset]; } aes = new AES...
[ "private", "synchronized", "void", "exec", "(", "AESExec", "exec", ")", "throws", "IOException", "{", "if", "(", "aes", "==", "null", ")", "{", "try", "{", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "AES", ".", "AES_KEY_SIZE", "/", "8", "]",...
/* Note: AES Encryption is NOT thread-safe. Must surround entire use with synchronized
[ "/", "*", "Note", ":", "AES", "Encryption", "is", "NOT", "thread", "-", "safe", ".", "Must", "surround", "entire", "use", "with", "synchronized" ]
train
https://github.com/att/AAF/blob/090562e956c0035db972aafba844dc6d3fc948ee/cadi/core/src/main/java/com/att/cadi/Symm.java#L190-L204
astrapi69/jaulp-wicket
jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/checkbox/img/LabeledImageCheckboxPanel.java
LabeledImageCheckboxPanel.newImage
protected Image newImage(final String id, final IModel<LabeledImageCheckboxModelBean> model) { """ Factory method for create a new {@link Image}. This method is invoked in the constructor from this class and can be overridden so users can provide their own version of a new {@link Image}. @param id the id @p...
java
protected Image newImage(final String id, final IModel<LabeledImageCheckboxModelBean> model) { return ComponentFactory.newImage(id, model.getObject().getImageResource()); }
[ "protected", "Image", "newImage", "(", "final", "String", "id", ",", "final", "IModel", "<", "LabeledImageCheckboxModelBean", ">", "model", ")", "{", "return", "ComponentFactory", ".", "newImage", "(", "id", ",", "model", ".", "getObject", "(", ")", ".", "ge...
Factory method for create a new {@link Image}. This method is invoked in the constructor from this class and can be overridden so users can provide their own version of a new {@link Image}. @param id the id @param model the model that contains the IResource object @return the new {@link Image}.
[ "Factory", "method", "for", "create", "a", "new", "{", "@link", "Image", "}", ".", "This", "method", "is", "invoked", "in", "the", "constructor", "from", "this", "class", "and", "can", "be", "overridden", "so", "users", "can", "provide", "their", "own", ...
train
https://github.com/astrapi69/jaulp-wicket/blob/85d74368d00abd9bb97659b5794e38c0f8a013d4/jaulp-wicket-components/src/main/java/de/alpharogroup/wicket/components/labeled/checkbox/img/LabeledImageCheckboxPanel.java#L91-L94
defei/codelogger-utils
src/main/java/org/codelogger/utils/DateUtils.java
DateUtils.getDateOfHoursBack
public static Date getDateOfHoursBack(final int hoursBack, final Date date) { """ Get specify hours back form given date. @param hoursBack how many hours want to be back. @param date date to be handled. @return a new Date object. """ return dateBack(Calendar.HOUR_OF_DAY, hoursBack, date); }
java
public static Date getDateOfHoursBack(final int hoursBack, final Date date) { return dateBack(Calendar.HOUR_OF_DAY, hoursBack, date); }
[ "public", "static", "Date", "getDateOfHoursBack", "(", "final", "int", "hoursBack", ",", "final", "Date", "date", ")", "{", "return", "dateBack", "(", "Calendar", ".", "HOUR_OF_DAY", ",", "hoursBack", ",", "date", ")", ";", "}" ]
Get specify hours back form given date. @param hoursBack how many hours want to be back. @param date date to be handled. @return a new Date object.
[ "Get", "specify", "hours", "back", "form", "given", "date", "." ]
train
https://github.com/defei/codelogger-utils/blob/d906f5d217b783c7ae3e53442cd6fb87b20ecc0a/src/main/java/org/codelogger/utils/DateUtils.java#L173-L176
kaazing/gateway
resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java
URIUtils.getCanonicalURI
public static String getCanonicalURI(String uriString, boolean canonicalizePath) { """ Create a canonical URI from a given URI. A canonical URI is a URI with:<ul> <li>the host part of the authority lower-case since URI semantics dictate that hostnames are case insensitive <li>(optionally, NOT appropriate for Or...
java
public static String getCanonicalURI(String uriString, boolean canonicalizePath) { if ((uriString != null) && !"".equals(uriString)) { return getCanonicalizedURI(uriString, canonicalizePath); } return null; }
[ "public", "static", "String", "getCanonicalURI", "(", "String", "uriString", ",", "boolean", "canonicalizePath", ")", "{", "if", "(", "(", "uriString", "!=", "null", ")", "&&", "!", "\"\"", ".", "equals", "(", "uriString", ")", ")", "{", "return", "getCano...
Create a canonical URI from a given URI. A canonical URI is a URI with:<ul> <li>the host part of the authority lower-case since URI semantics dictate that hostnames are case insensitive <li>(optionally, NOT appropriate for Origin headers) the path part set to "/" if there was no path in the input URI (this conforms t...
[ "Create", "a", "canonical", "URI", "from", "a", "given", "URI", ".", "A", "canonical", "URI", "is", "a", "URI", "with", ":", "<ul", ">", "<li", ">", "the", "host", "part", "of", "the", "authority", "lower", "-", "case", "since", "URI", "semantics", "...
train
https://github.com/kaazing/gateway/blob/06017b19273109b3b992e528e702586446168d57/resource.address/spi/src/main/java/org/kaazing/gateway/resource/address/uri/URIUtils.java#L641-L646
jamesagnew/hapi-fhir
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java
BaseHapiFhirDao.createForcedIdIfNeeded
protected ForcedId createForcedIdIfNeeded(ResourceTable theEntity, IIdType theId, boolean theCreateForPureNumericIds) { """ Returns the newly created forced ID. If the entity already had a forced ID, or if none was created, returns null. """ if (theId.isEmpty() == false && theId.hasIdPart() && theEntity.get...
java
protected ForcedId createForcedIdIfNeeded(ResourceTable theEntity, IIdType theId, boolean theCreateForPureNumericIds) { if (theId.isEmpty() == false && theId.hasIdPart() && theEntity.getForcedId() == null) { if (!theCreateForPureNumericIds && IdHelperService.isValidPid(theId)) { return null; } ForcedId ...
[ "protected", "ForcedId", "createForcedIdIfNeeded", "(", "ResourceTable", "theEntity", ",", "IIdType", "theId", ",", "boolean", "theCreateForPureNumericIds", ")", "{", "if", "(", "theId", ".", "isEmpty", "(", ")", "==", "false", "&&", "theId", ".", "hasIdPart", "...
Returns the newly created forced ID. If the entity already had a forced ID, or if none was created, returns null.
[ "Returns", "the", "newly", "created", "forced", "ID", ".", "If", "the", "entity", "already", "had", "a", "forced", "ID", "or", "if", "none", "was", "created", "returns", "null", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseHapiFhirDao.java#L193-L208
alkacon/opencms-core
src/org/opencms/db/CmsExportPointDriver.java
CmsExportPointDriver.deleteResource
public void deleteResource(String resourceName, String exportpoint) { """ Deletes a file or a folder in the real file sytem.<p> If the given resource name points to a folder, then this folder is only deleted if it is empty. This is required since the same export point RFS target folder may be used by multiple ...
java
public void deleteResource(String resourceName, String exportpoint) { File file = getExportPointFile(resourceName, exportpoint); if (file.exists() && file.canWrite()) { // delete the file (or folder) file.delete(); // also delete empty parent directories ...
[ "public", "void", "deleteResource", "(", "String", "resourceName", ",", "String", "exportpoint", ")", "{", "File", "file", "=", "getExportPointFile", "(", "resourceName", ",", "exportpoint", ")", ";", "if", "(", "file", ".", "exists", "(", ")", "&&", "file",...
Deletes a file or a folder in the real file sytem.<p> If the given resource name points to a folder, then this folder is only deleted if it is empty. This is required since the same export point RFS target folder may be used by multiple export points. For example, this is usually the case with the <code>/WEB-INF/class...
[ "Deletes", "a", "file", "or", "a", "folder", "in", "the", "real", "file", "sytem", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsExportPointDriver.java#L108-L120
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/TaskOperations.java
TaskOperations.createTask
public void createTask(String jobId, TaskAddParameter taskToAdd, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { """ Adds a single task to a job. @param jobId The ID of the job to which to add the task. @param taskToAdd The {@link TaskAddParameter task...
java
public void createTask(String jobId, TaskAddParameter taskToAdd, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { TaskAddOptions options = new TaskAddOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors...
[ "public", "void", "createTask", "(", "String", "jobId", ",", "TaskAddParameter", "taskToAdd", ",", "Iterable", "<", "BatchClientBehavior", ">", "additionalBehaviors", ")", "throws", "BatchErrorException", ",", "IOException", "{", "TaskAddOptions", "options", "=", "new...
Adds a single task to a job. @param jobId The ID of the job to which to add the task. @param taskToAdd The {@link TaskAddParameter task} to add. @param additionalBehaviors A collection of {@link BatchClientBehavior} instances that are applied to the Batch service request. @throws BatchErrorException Exception thrown w...
[ "Adds", "a", "single", "task", "to", "a", "job", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/TaskOperations.java#L116-L123
xwiki/xwiki-commons
xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/src/main/java/org/xwiki/component/util/ReflectionUtils.java
ReflectionUtils.getDirectAnnotation
public static <T extends Annotation> T getDirectAnnotation(Class<T> annotationClass, AnnotatedElement element) { """ Get the first found annotation with the provided class directly assigned to the provided {@link AnnotatedElement} . @param <T> the type of the annotation @param annotationClass the annotation c...
java
public static <T extends Annotation> T getDirectAnnotation(Class<T> annotationClass, AnnotatedElement element) { // Handle interfaces directly declared in the passed component class for (Annotation annotation : element.getDeclaredAnnotations()) { if (annotation.annotationType() == annota...
[ "public", "static", "<", "T", "extends", "Annotation", ">", "T", "getDirectAnnotation", "(", "Class", "<", "T", ">", "annotationClass", ",", "AnnotatedElement", "element", ")", "{", "// Handle interfaces directly declared in the passed component class", "for", "(", "Ann...
Get the first found annotation with the provided class directly assigned to the provided {@link AnnotatedElement} . @param <T> the type of the annotation @param annotationClass the annotation class @param element the class on which annotation are assigned @return the found annotation or null if there is none
[ "Get", "the", "first", "found", "annotation", "with", "the", "provided", "class", "directly", "assigned", "to", "the", "provided", "{", "@link", "AnnotatedElement", "}", "." ]
train
https://github.com/xwiki/xwiki-commons/blob/5374d8c6d966588c1eac7392c83da610dfb9f129/xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-api/src/main/java/org/xwiki/component/util/ReflectionUtils.java#L557-L567
alkacon/opencms-core
src/org/opencms/ui/dialogs/permissions/CmsPrincipalSelectDialog.java
CmsPrincipalSelectDialog.openEmbeddedDialog
public static void openEmbeddedDialog(final CmsEmbeddedDialogContext dialogContext, Map<String, String[]> params) { """ Opens the principal select dialog within an embedded dialog context.<p> @param dialogContext the dialog context @param params the request parameters """ openEmbeddedDialog(dialog...
java
public static void openEmbeddedDialog(final CmsEmbeddedDialogContext dialogContext, Map<String, String[]> params) { openEmbeddedDialog(dialogContext, params, true); }
[ "public", "static", "void", "openEmbeddedDialog", "(", "final", "CmsEmbeddedDialogContext", "dialogContext", ",", "Map", "<", "String", ",", "String", "[", "]", ">", "params", ")", "{", "openEmbeddedDialog", "(", "dialogContext", ",", "params", ",", "true", ")",...
Opens the principal select dialog within an embedded dialog context.<p> @param dialogContext the dialog context @param params the request parameters
[ "Opens", "the", "principal", "select", "dialog", "within", "an", "embedded", "dialog", "context", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/dialogs/permissions/CmsPrincipalSelectDialog.java#L303-L306
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/Kickflip.java
Kickflip.startBroadcastActivity
public static void startBroadcastActivity(Activity host, BroadcastListener listener) { """ Start {@link io.kickflip.sdk.activity.BroadcastActivity}. This Activity facilitates control over a single live broadcast. <p/> <b>Must be called after {@link Kickflip#setup(android.content.Context, String, String)} or {@...
java
public static void startBroadcastActivity(Activity host, BroadcastListener listener) { checkNotNull(listener, host.getString(R.string.error_no_broadcastlistener)); if (sSessionConfig == null) { setupDefaultSessionConfig(); } checkNotNull(sClientKey); checkNotNull(sCli...
[ "public", "static", "void", "startBroadcastActivity", "(", "Activity", "host", ",", "BroadcastListener", "listener", ")", "{", "checkNotNull", "(", "listener", ",", "host", ".", "getString", "(", "R", ".", "string", ".", "error_no_broadcastlistener", ")", ")", "...
Start {@link io.kickflip.sdk.activity.BroadcastActivity}. This Activity facilitates control over a single live broadcast. <p/> <b>Must be called after {@link Kickflip#setup(android.content.Context, String, String)} or {@link Kickflip#setup(android.content.Context, String, String, io.kickflip.sdk.api.KickflipCallback)}....
[ "Start", "{", "@link", "io", ".", "kickflip", ".", "sdk", ".", "activity", ".", "BroadcastActivity", "}", ".", "This", "Activity", "facilitates", "control", "over", "a", "single", "live", "broadcast", ".", "<p", "/", ">", "<b", ">", "Must", "be", "called...
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/Kickflip.java#L135-L146
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/operators/LatchedObserver.java
LatchedObserver.createIndexed
public static <T> LatchedObserver<T> createIndexed(Action2<? super T, ? super Integer> onNext, Action1<? super Throwable> onError) { """ Create a LatchedObserver with the given indexed callback function(s). """ return createIndexed(onNext, onError, new CountDownLatch(1)); }
java
public static <T> LatchedObserver<T> createIndexed(Action2<? super T, ? super Integer> onNext, Action1<? super Throwable> onError) { return createIndexed(onNext, onError, new CountDownLatch(1)); }
[ "public", "static", "<", "T", ">", "LatchedObserver", "<", "T", ">", "createIndexed", "(", "Action2", "<", "?", "super", "T", ",", "?", "super", "Integer", ">", "onNext", ",", "Action1", "<", "?", "super", "Throwable", ">", "onError", ")", "{", "return...
Create a LatchedObserver with the given indexed callback function(s).
[ "Create", "a", "LatchedObserver", "with", "the", "given", "indexed", "callback", "function", "(", "s", ")", "." ]
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/operators/LatchedObserver.java#L172-L174
EsotericSoftware/kryonet
src/com/esotericsoftware/kryonet/util/ObjectIntMap.java
ObjectIntMap.getAndIncrement
public int getAndIncrement (K key, int defaultValue, int increment) { """ Returns the key's current value and increments the stored value. If the key is not in the map, defaultValue + increment is put into the map. """ int hashCode = key.hashCode(); int index = hashCode & mask; if (!key.equals(keyTable[...
java
public int getAndIncrement (K key, int defaultValue, int increment) { int hashCode = key.hashCode(); int index = hashCode & mask; if (!key.equals(keyTable[index])) { index = hash2(hashCode); if (!key.equals(keyTable[index])) { index = hash3(hashCode); if (!key.equals(keyTable[index])) return getAndI...
[ "public", "int", "getAndIncrement", "(", "K", "key", ",", "int", "defaultValue", ",", "int", "increment", ")", "{", "int", "hashCode", "=", "key", ".", "hashCode", "(", ")", ";", "int", "index", "=", "hashCode", "&", "mask", ";", "if", "(", "!", "key...
Returns the key's current value and increments the stored value. If the key is not in the map, defaultValue + increment is put into the map.
[ "Returns", "the", "key", "s", "current", "value", "and", "increments", "the", "stored", "value", ".", "If", "the", "key", "is", "not", "in", "the", "map", "defaultValue", "+", "increment", "is", "put", "into", "the", "map", "." ]
train
https://github.com/EsotericSoftware/kryonet/blob/2ed19b4743667664d15e3778447e579855ba3a65/src/com/esotericsoftware/kryonet/util/ObjectIntMap.java#L294-L307
samskivert/samskivert
src/main/java/com/samskivert/servlet/util/ParameterUtil.java
ParameterUtil.requireIntParameter
public static int requireIntParameter (HttpServletRequest req, String name, String invalidDataMessage, ParameterValidator validator) throws DataValidationException { """ Fetches the supplied parameter from the request and converts it to an integer. If the paramet...
java
public static int requireIntParameter (HttpServletRequest req, String name, String invalidDataMessage, ParameterValidator validator) throws DataValidationException { String value = getParameter(req, name, false); validator.validateParameter(name, va...
[ "public", "static", "int", "requireIntParameter", "(", "HttpServletRequest", "req", ",", "String", "name", ",", "String", "invalidDataMessage", ",", "ParameterValidator", "validator", ")", "throws", "DataValidationException", "{", "String", "value", "=", "getParameter",...
Fetches the supplied parameter from the request and converts it to an integer. If the parameter does not exist or 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", "an", "integer", ".", "If", "the", "parameter", "does", "not", "exist", "or", "is", "not", "a", "well", "-", "formed", "integer", "a", "data", "validation",...
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/servlet/util/ParameterUtil.java#L98-L105
UrielCh/ovh-java-sdk
ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java
ApiOvhHostingweb.serviceName_module_POST
public OvhTask serviceName_module_POST(String serviceName, String adminName, String adminPassword, OvhDependencyType[] dependencies, String domain, net.minidev.ovh.api.hosting.web.module.OvhLanguageEnum language, Long moduleId, String path) throws IOException { """ Install a new module REST: POST /hosting/web/{...
java
public OvhTask serviceName_module_POST(String serviceName, String adminName, String adminPassword, OvhDependencyType[] dependencies, String domain, net.minidev.ovh.api.hosting.web.module.OvhLanguageEnum language, Long moduleId, String path) throws IOException { String qPath = "/hosting/web/{serviceName}/module"; St...
[ "public", "OvhTask", "serviceName_module_POST", "(", "String", "serviceName", ",", "String", "adminName", ",", "String", "adminPassword", ",", "OvhDependencyType", "[", "]", "dependencies", ",", "String", "domain", ",", "net", ".", "minidev", ".", "ovh", ".", "a...
Install a new module REST: POST /hosting/web/{serviceName}/module @param language [required] The language to set to your module @param adminName [required] The login for the admin account (may be a standard string or your email) @param adminPassword [required] The password for the admin account (at least 8 characters)...
[ "Install", "a", "new", "module" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java#L1652-L1665
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/hc/render/HCRenderer.java
HCRenderer.getAsNode
@Nullable public static IMicroNode getAsNode (@Nonnull final IHCNode aHCNode) { """ Convert the passed HC node to a micro node using the default conversion settings. @param aHCNode The node to be converted. May not be <code>null</code>. @return The fully created HTML node """ return getAsNode (aHCN...
java
@Nullable public static IMicroNode getAsNode (@Nonnull final IHCNode aHCNode) { return getAsNode (aHCNode, HCSettings.getConversionSettings ()); }
[ "@", "Nullable", "public", "static", "IMicroNode", "getAsNode", "(", "@", "Nonnull", "final", "IHCNode", "aHCNode", ")", "{", "return", "getAsNode", "(", "aHCNode", ",", "HCSettings", ".", "getConversionSettings", "(", ")", ")", ";", "}" ]
Convert the passed HC node to a micro node using the default conversion settings. @param aHCNode The node to be converted. May not be <code>null</code>. @return The fully created HTML node
[ "Convert", "the", "passed", "HC", "node", "to", "a", "micro", "node", "using", "the", "default", "conversion", "settings", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/hc/render/HCRenderer.java#L176-L180
codeprimate-software/cp-elements
src/main/java/org/cp/elements/data/caching/support/CachingTemplate.java
CachingTemplate.withCachePut
@SuppressWarnings("unchecked") public <T extends VALUE> T withCachePut(KEY key, Supplier<VALUE> cacheableOperation) { """ This caching data access operation invokes the supplied {@link Supplier cacheable operation} and then caches the {@link VALUE result} before returning the computed {@link VALUE}. The {@li...
java
@SuppressWarnings("unchecked") public <T extends VALUE> T withCachePut(KEY key, Supplier<VALUE> cacheableOperation) { Assert.notNull(key, "Key is required"); Assert.notNull(cacheableOperation, "Supplier is required"); return (T) Optional.ofNullable(cacheableOperation.get()) .map(value -> write(get...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "VALUE", ">", "T", "withCachePut", "(", "KEY", "key", ",", "Supplier", "<", "VALUE", ">", "cacheableOperation", ")", "{", "Assert", ".", "notNull", "(", "key", ",", "\"Key i...
This caching data access operation invokes the supplied {@link Supplier cacheable operation} and then caches the {@link VALUE result} before returning the computed {@link VALUE}. The {@link VALUE result} of the {@link Supplier cacheable operation} is only cached if the {@link VALUE result} is not {@literal null}. @pa...
[ "This", "caching", "data", "access", "operation", "invokes", "the", "supplied", "{", "@link", "Supplier", "cacheable", "operation", "}", "and", "then", "caches", "the", "{", "@link", "VALUE", "result", "}", "before", "returning", "the", "computed", "{", "@link...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/data/caching/support/CachingTemplate.java#L348-L357
lets-blade/blade
src/main/java/com/blade/kit/PatternKit.java
PatternKit.isMatch
public static boolean isMatch(final String regex, final CharSequence input) { """ Determines whether the regular is matched. @param regex regular expression @param input the string to match. @return {@code true}: matching<br>{@code false}: mismatching """ return input != null && input.length() > 0...
java
public static boolean isMatch(final String regex, final CharSequence input) { return input != null && input.length() > 0 && Pattern.matches(regex, input); }
[ "public", "static", "boolean", "isMatch", "(", "final", "String", "regex", ",", "final", "CharSequence", "input", ")", "{", "return", "input", "!=", "null", "&&", "input", ".", "length", "(", ")", ">", "0", "&&", "Pattern", ".", "matches", "(", "regex", ...
Determines whether the regular is matched. @param regex regular expression @param input the string to match. @return {@code true}: matching<br>{@code false}: mismatching
[ "Determines", "whether", "the", "regular", "is", "matched", "." ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/PatternKit.java#L214-L216
VoltDB/voltdb
third_party/java/src/org/HdrHistogram_voltpatches/ShortCountsHistogram.java
ShortCountsHistogram.decodeFromCompressedByteBuffer
public static ShortCountsHistogram decodeFromCompressedByteBuffer(final ByteBuffer buffer, final long minBarForHighestTrackableValue) throws DataFormatException { """ Construct a new histogram by decoding it from a compressed form in a ByteBuffer. @p...
java
public static ShortCountsHistogram decodeFromCompressedByteBuffer(final ByteBuffer buffer, final long minBarForHighestTrackableValue) throws DataFormatException { return decodeFromCompressedByteBuffer(buffer, ShortCountsHistogram.class, minBarForHi...
[ "public", "static", "ShortCountsHistogram", "decodeFromCompressedByteBuffer", "(", "final", "ByteBuffer", "buffer", ",", "final", "long", "minBarForHighestTrackableValue", ")", "throws", "DataFormatException", "{", "return", "decodeFromCompressedByteBuffer", "(", "buffer", ",...
Construct a new histogram by decoding it from a compressed form in a ByteBuffer. @param buffer The buffer to decode from @param minBarForHighestTrackableValue Force highestTrackableValue to be set at least this high @return The newly constructed histogram @throws DataFormatException on error parsing/decompressing the b...
[ "Construct", "a", "new", "histogram", "by", "decoding", "it", "from", "a", "compressed", "form", "in", "a", "ByteBuffer", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/HdrHistogram_voltpatches/ShortCountsHistogram.java#L230-L233
netty/netty
example/src/main/java/io/netty/example/ocsp/OcspUtils.java
OcspUtils.ocspUri
public static URI ocspUri(X509Certificate certificate) throws IOException { """ Returns the OCSP responder {@link URI} or {@code null} if it doesn't have one. """ byte[] value = certificate.getExtensionValue(Extension.authorityInfoAccess.getId()); if (value == null) { return null; ...
java
public static URI ocspUri(X509Certificate certificate) throws IOException { byte[] value = certificate.getExtensionValue(Extension.authorityInfoAccess.getId()); if (value == null) { return null; } ASN1Primitive authorityInfoAccess = X509ExtensionUtil.fromExtensionValue(value...
[ "public", "static", "URI", "ocspUri", "(", "X509Certificate", "certificate", ")", "throws", "IOException", "{", "byte", "[", "]", "value", "=", "certificate", ".", "getExtensionValue", "(", "Extension", ".", "authorityInfoAccess", ".", "getId", "(", ")", ")", ...
Returns the OCSP responder {@link URI} or {@code null} if it doesn't have one.
[ "Returns", "the", "OCSP", "responder", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/example/src/main/java/io/netty/example/ocsp/OcspUtils.java#L63-L88
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java
AiMaterial.checkTexRange
private void checkTexRange(AiTextureType type, int index) { """ Checks that index is valid an throw an exception if not. @param type the type @param index the index to check """ if (index < 0 || index > m_numTextures.get(type)) { throw new IndexOutOfBoundsException("Index: " + index + "...
java
private void checkTexRange(AiTextureType type, int index) { if (index < 0 || index > m_numTextures.get(type)) { throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + m_numTextures.get(type)); } }
[ "private", "void", "checkTexRange", "(", "AiTextureType", "type", ",", "int", "index", ")", "{", "if", "(", "index", "<", "0", "||", "index", ">", "m_numTextures", ".", "get", "(", "type", ")", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", ...
Checks that index is valid an throw an exception if not. @param type the type @param index the index to check
[ "Checks", "that", "index", "is", "valid", "an", "throw", "an", "exception", "if", "not", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/jassimp/AiMaterial.java#L1268-L1273
aws/aws-sdk-java
aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/MessageRequest.java
MessageRequest.withEndpoints
public MessageRequest withEndpoints(java.util.Map<String, EndpointSendConfiguration> endpoints) { """ A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. Within an EndpointSendConfiguration object, you can tailor the message for an endpoint by specifyi...
java
public MessageRequest withEndpoints(java.util.Map<String, EndpointSendConfiguration> endpoints) { setEndpoints(endpoints); return this; }
[ "public", "MessageRequest", "withEndpoints", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "EndpointSendConfiguration", ">", "endpoints", ")", "{", "setEndpoints", "(", "endpoints", ")", ";", "return", "this", ";", "}" ]
A map of key-value pairs, where each key is an endpoint ID and each value is an EndpointSendConfiguration object. Within an EndpointSendConfiguration object, you can tailor the message for an endpoint by specifying message overrides or substitutions. @param endpoints A map of key-value pairs, where each key is an endp...
[ "A", "map", "of", "key", "-", "value", "pairs", "where", "each", "key", "is", "an", "endpoint", "ID", "and", "each", "value", "is", "an", "EndpointSendConfiguration", "object", ".", "Within", "an", "EndpointSendConfiguration", "object", "you", "can", "tailor",...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-pinpoint/src/main/java/com/amazonaws/services/pinpoint/model/MessageRequest.java#L213-L216
TNG/property-loader
src/main/java/com/tngtech/propertyloader/Obfuscator.java
Obfuscator.decryptInternal
private String decryptInternal(SecretKeySpec key, byte[] encryptedBytes) { """ Internal decryption method. @param key - the SecretKeySpec used to decrypt @param encryptedBytes - the byte[] to decrypt @return the decrypted plaintext String. """ try { Cipher cipher = Cipher.ge...
java
private String decryptInternal(SecretKeySpec key, byte[] encryptedBytes) { try { Cipher cipher = Cipher.getInstance(ENCRYPTION_ALGORITHM + ENCRYPTION_ALGORITHM_MODIFIER); cipher.init(Cipher.DECRYPT_MODE, key); byte[] decryptedBytes = cipher.doFinal(encryptedBytes); ...
[ "private", "String", "decryptInternal", "(", "SecretKeySpec", "key", ",", "byte", "[", "]", "encryptedBytes", ")", "{", "try", "{", "Cipher", "cipher", "=", "Cipher", ".", "getInstance", "(", "ENCRYPTION_ALGORITHM", "+", "ENCRYPTION_ALGORITHM_MODIFIER", ")", ";", ...
Internal decryption method. @param key - the SecretKeySpec used to decrypt @param encryptedBytes - the byte[] to decrypt @return the decrypted plaintext String.
[ "Internal", "decryption", "method", "." ]
train
https://github.com/TNG/property-loader/blob/0fbc8a091795aaf2bdaf7c0d494a32772bff0e1f/src/main/java/com/tngtech/propertyloader/Obfuscator.java#L83-L94
jingwei/krati
krati-main/src/main/java/krati/core/array/entry/EntryValueShort.java
EntryValueShort.updateArrayFile
@Override public void updateArrayFile(DataWriter writer, long position) throws IOException { """ Writes this EntryValue at a given position of a data writer. @param writer @param position @throws IOException """ writer.writeShort(position, val); }
java
@Override public void updateArrayFile(DataWriter writer, long position) throws IOException { writer.writeShort(position, val); }
[ "@", "Override", "public", "void", "updateArrayFile", "(", "DataWriter", "writer", ",", "long", "position", ")", "throws", "IOException", "{", "writer", ".", "writeShort", "(", "position", ",", "val", ")", ";", "}" ]
Writes this EntryValue at a given position of a data writer. @param writer @param position @throws IOException
[ "Writes", "this", "EntryValue", "at", "a", "given", "position", "of", "a", "data", "writer", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/entry/EntryValueShort.java#L95-L98
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java
AbstractManagedType.isListAttribute
private boolean isListAttribute(PluralAttribute<? super X, ?, ?> attribute) { """ Checks if is list attribute. @param attribute the attribute @return true, if is list attribute """ return attribute != null && attribute.getCollectionType().equals(CollectionType.LIST); }
java
private boolean isListAttribute(PluralAttribute<? super X, ?, ?> attribute) { return attribute != null && attribute.getCollectionType().equals(CollectionType.LIST); }
[ "private", "boolean", "isListAttribute", "(", "PluralAttribute", "<", "?", "super", "X", ",", "?", ",", "?", ">", "attribute", ")", "{", "return", "attribute", "!=", "null", "&&", "attribute", ".", "getCollectionType", "(", ")", ".", "equals", "(", "Collec...
Checks if is list attribute. @param attribute the attribute @return true, if is list attribute
[ "Checks", "if", "is", "list", "attribute", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/metadata/model/type/AbstractManagedType.java#L1039-L1042
codeprimate-software/cp-elements
src/main/java/org/cp/elements/util/zip/ZipUtils.java
ZipUtils.resolveZipEntryName
static String resolveZipEntryName(File zipDirectory, File file) { """ Tries to resolve the {@link String} of the {@link ZipEntry} given the {@link File directory} being zipped and the {@link File} from when the {@link ZipEntry} is being constructed. The resolved {@link ZipEntry} {@link String name} will be the...
java
static String resolveZipEntryName(File zipDirectory, File file) { return Optional.ofNullable(zipDirectory) .filter(File::isDirectory) .map(File::getName) .filter(StringUtils::hasText) .map(zipDirectoryName -> { String filePath = file.getAbsolutePath(); int index = filePath...
[ "static", "String", "resolveZipEntryName", "(", "File", "zipDirectory", ",", "File", "file", ")", "{", "return", "Optional", ".", "ofNullable", "(", "zipDirectory", ")", ".", "filter", "(", "File", "::", "isDirectory", ")", ".", "map", "(", "File", "::", "...
Tries to resolve the {@link String} of the {@link ZipEntry} given the {@link File directory} being zipped and the {@link File} from when the {@link ZipEntry} is being constructed. The resolved {@link ZipEntry} {@link String name} will be the relative path of the given {@link File} if the {@link File} is relative to th...
[ "Tries", "to", "resolve", "the", "{", "@link", "String", "}", "of", "the", "{", "@link", "ZipEntry", "}", "given", "the", "{", "@link", "File", "directory", "}", "being", "zipped", "and", "the", "{", "@link", "File", "}", "from", "when", "the", "{", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/util/zip/ZipUtils.java#L93-L108
carewebframework/carewebframework-core
org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/chm/BaseTransform.java
BaseTransform.extractAttribute
protected String extractAttribute(String name, String line) { """ Extracts the value of the named attribute. @param name The attribute name. @param line The source line. @return The attribute value, or null if not found. """ int i = line.indexOf(name + "=\""); i = i == -1 ? i : i + name.le...
java
protected String extractAttribute(String name, String line) { int i = line.indexOf(name + "=\""); i = i == -1 ? i : i + name.length() + 2; int j = i == -1 ? -1 : line.indexOf("\"", i); return j == -1 ? null : line.substring(i, j); }
[ "protected", "String", "extractAttribute", "(", "String", "name", ",", "String", "line", ")", "{", "int", "i", "=", "line", ".", "indexOf", "(", "name", "+", "\"=\\\"\"", ")", ";", "i", "=", "i", "==", "-", "1", "?", "i", ":", "i", "+", "name", "...
Extracts the value of the named attribute. @param name The attribute name. @param line The source line. @return The attribute value, or null if not found.
[ "Extracts", "the", "value", "of", "the", "named", "attribute", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.mvn-parent/org.carewebframework.mvn.plugin-parent/org.carewebframework.mvn.plugin.helpconverter/src/main/java/org/carewebframework/maven/plugin/help/chm/BaseTransform.java#L84-L89
eclipse/xtext-core
org.eclipse.xtext/src/org/eclipse/xtext/scoping/impl/ImportedNamespaceAwareLocalScopeProvider.java
ImportedNamespaceAwareLocalScopeProvider.createImportedNamespaceResolver
protected ImportNormalizer createImportedNamespaceResolver(final String namespace, boolean ignoreCase) { """ Create a new {@link ImportNormalizer} for the given namespace. @param namespace the namespace. @param ignoreCase <code>true</code> if the resolver should be case insensitive. @return a new {@link ImportN...
java
protected ImportNormalizer createImportedNamespaceResolver(final String namespace, boolean ignoreCase) { if (Strings.isEmpty(namespace)) return null; QualifiedName importedNamespace = qualifiedNameConverter.toQualifiedName(namespace); if (importedNamespace == null || importedNamespace.isEmpty()) { return nu...
[ "protected", "ImportNormalizer", "createImportedNamespaceResolver", "(", "final", "String", "namespace", ",", "boolean", "ignoreCase", ")", "{", "if", "(", "Strings", ".", "isEmpty", "(", "namespace", ")", ")", "return", "null", ";", "QualifiedName", "importedNamesp...
Create a new {@link ImportNormalizer} for the given namespace. @param namespace the namespace. @param ignoreCase <code>true</code> if the resolver should be case insensitive. @return a new {@link ImportNormalizer} or <code>null</code> if the namespace cannot be converted to a valid qualified name.
[ "Create", "a", "new", "{" ]
train
https://github.com/eclipse/xtext-core/blob/bac941cb75cb24706519845ec174cfef874d7557/org.eclipse.xtext/src/org/eclipse/xtext/scoping/impl/ImportedNamespaceAwareLocalScopeProvider.java#L167-L184
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.deleteByScopeAsync
public Observable<Void> deleteByScopeAsync(String scope, String lockName) { """ Delete a management lock by scope. @param scope The scope for the lock. @param lockName The name of lock. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if suc...
java
public Observable<Void> deleteByScopeAsync(String scope, String lockName) { return deleteByScopeWithServiceResponseAsync(scope, lockName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); ...
[ "public", "Observable", "<", "Void", ">", "deleteByScopeAsync", "(", "String", "scope", ",", "String", "lockName", ")", "{", "return", "deleteByScopeWithServiceResponseAsync", "(", "scope", ",", "lockName", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResp...
Delete a management lock by scope. @param scope The scope for the lock. @param lockName The name of lock. @throws IllegalArgumentException thrown if parameters fail the validation @return the {@link ServiceResponse} object if successful.
[ "Delete", "a", "management", "lock", "by", "scope", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L541-L548
jdereg/java-util
src/main/java/com/cedarsoftware/util/DeepEquals.java
DeepEquals.compareFloatingPointNumbers
private static boolean compareFloatingPointNumbers(Object a, Object b, double epsilon) { """ Compare if two floating point numbers are within a given range """ double a1 = a instanceof Double ? (Double) a : (Float) a; double b1 = b instanceof Double ? (Double) b : (Float) b; return near...
java
private static boolean compareFloatingPointNumbers(Object a, Object b, double epsilon) { double a1 = a instanceof Double ? (Double) a : (Float) a; double b1 = b instanceof Double ? (Double) b : (Float) b; return nearlyEqual(a1, b1, epsilon); }
[ "private", "static", "boolean", "compareFloatingPointNumbers", "(", "Object", "a", ",", "Object", "b", ",", "double", "epsilon", ")", "{", "double", "a1", "=", "a", "instanceof", "Double", "?", "(", "Double", ")", "a", ":", "(", "Float", ")", "a", ";", ...
Compare if two floating point numbers are within a given range
[ "Compare", "if", "two", "floating", "point", "numbers", "are", "within", "a", "given", "range" ]
train
https://github.com/jdereg/java-util/blob/a2dce61aed16d6454ee575174dda1ba6bff0015c/src/main/java/com/cedarsoftware/util/DeepEquals.java#L636-L641
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java
ServerTableAuditingPoliciesInner.listByServerAsync
public Observable<ServerTableAuditingPolicyListResultInner> listByServerAsync(String resourceGroupName, String serverName) { """ Lists a servers's table auditing policies. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resource....
java
public Observable<ServerTableAuditingPolicyListResultInner> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<ServerTableAuditingPolicyListResultInner>, ServerTableAuditingPolicyListResultInne...
[ "public", "Observable", "<", "ServerTableAuditingPolicyListResultInner", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ...
Lists a servers's table auditing policies. Table auditing is deprecated, use blob auditing instead. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalA...
[ "Lists", "a", "servers", "s", "table", "auditing", "policies", ".", "Table", "auditing", "is", "deprecated", "use", "blob", "auditing", "instead", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ServerTableAuditingPoliciesInner.java#L289-L296
elki-project/elki
elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java
DiSH.sortClusters
private List<Cluster<SubspaceModel>> sortClusters(Relation<V> relation, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) { """ Returns a sorted list of the clusters w.r.t. the subspace dimensionality in descending order. @param relation the database storing the objects @param clustersMap the ...
java
private List<Cluster<SubspaceModel>> sortClusters(Relation<V> relation, Object2ObjectMap<long[], List<ArrayModifiableDBIDs>> clustersMap) { final int db_dim = RelationUtil.dimensionality(relation); // int num = 1; List<Cluster<SubspaceModel>> clusters = new ArrayList<>(); for(long[] pv : clustersMap.key...
[ "private", "List", "<", "Cluster", "<", "SubspaceModel", ">", ">", "sortClusters", "(", "Relation", "<", "V", ">", "relation", ",", "Object2ObjectMap", "<", "long", "[", "]", ",", "List", "<", "ArrayModifiableDBIDs", ">", ">", "clustersMap", ")", "{", "fin...
Returns a sorted list of the clusters w.r.t. the subspace dimensionality in descending order. @param relation the database storing the objects @param clustersMap the mapping of bits sets to clusters @return a sorted list of the clusters
[ "Returns", "a", "sorted", "list", "of", "the", "clusters", "w", ".", "r", ".", "t", ".", "the", "subspace", "dimensionality", "in", "descending", "order", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/subspace/DiSH.java#L334-L359
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java
BeanPath.createMap
@SuppressWarnings("unchecked") protected <K, V, E extends SimpleExpression<? super V>> MapPath<K, V, E> createMap(String property, Class<? super K> key, Class<? super V> value, Class<? super E> queryType) { """ Create a new Map typed path @param <K> @param <V> @param <E> @param property property name @p...
java
@SuppressWarnings("unchecked") protected <K, V, E extends SimpleExpression<? super V>> MapPath<K, V, E> createMap(String property, Class<? super K> key, Class<? super V> value, Class<? super E> queryType) { return add(new MapPath<K, V, E>(key, value, (Class) queryType, forProperty(property))); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "<", "K", ",", "V", ",", "E", "extends", "SimpleExpression", "<", "?", "super", "V", ">", ">", "MapPath", "<", "K", ",", "V", ",", "E", ">", "createMap", "(", "String", "property", ",", ...
Create a new Map typed path @param <K> @param <V> @param <E> @param property property name @param key key type @param value value type @param queryType expression type @return property path
[ "Create", "a", "new", "Map", "typed", "path" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/BeanPath.java#L233-L236
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java
WikipediaTemplateInfo.getPageIdsContainingTemplateNames
public List<Integer> getPageIdsContainingTemplateNames(List<String> templateNames) throws WikiApiException { """ Returns a list containing the ids of all pages that contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @retu...
java
public List<Integer> getPageIdsContainingTemplateNames(List<String> templateNames) throws WikiApiException{ return getFilteredPageIds(templateNames, true); }
[ "public", "List", "<", "Integer", ">", "getPageIdsContainingTemplateNames", "(", "List", "<", "String", ">", "templateNames", ")", "throws", "WikiApiException", "{", "return", "getFilteredPageIds", "(", "templateNames", ",", "true", ")", ";", "}" ]
Returns a list containing the ids of all pages that contain a template the name of which equals any of the given Strings. @param templateNames the names of the template that we want to match @return A list with the ids of all pages that contain any of the the specified templates @throws WikiApiException If there was a...
[ "Returns", "a", "list", "containing", "the", "ids", "of", "all", "pages", "that", "contain", "a", "template", "the", "name", "of", "which", "equals", "any", "of", "the", "given", "Strings", "." ]
train
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.util/src/main/java/de/tudarmstadt/ukp/wikipedia/util/templates/WikipediaTemplateInfo.java#L975-L977
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java
SlotProfile.noLocality
public static SlotProfile noLocality(ResourceProfile resourceProfile) { """ Returns a slot profile for the given resource profile, without any locality requirements. """ return new SlotProfile(resourceProfile, Collections.emptyList(), Collections.emptyList()); }
java
public static SlotProfile noLocality(ResourceProfile resourceProfile) { return new SlotProfile(resourceProfile, Collections.emptyList(), Collections.emptyList()); }
[ "public", "static", "SlotProfile", "noLocality", "(", "ResourceProfile", "resourceProfile", ")", "{", "return", "new", "SlotProfile", "(", "resourceProfile", ",", "Collections", ".", "emptyList", "(", ")", ",", "Collections", ".", "emptyList", "(", ")", ")", ";"...
Returns a slot profile for the given resource profile, without any locality requirements.
[ "Returns", "a", "slot", "profile", "for", "the", "given", "resource", "profile", "without", "any", "locality", "requirements", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/SlotProfile.java#L121-L123
tzaeschke/zoodb
src/org/zoodb/internal/query/TypeConverterTools.java
TypeConverterTools.checkAssignability
public static void checkAssignability(Object o, Class<?> type) { """ This assumes that comparability implies assignability or convertability... @param o object @param type type """ COMPARISON_TYPE ctO = COMPARISON_TYPE.fromObject(o); COMPARISON_TYPE ctT = COMPARISON_TYPE.fromClass(type); try { COMPA...
java
public static void checkAssignability(Object o, Class<?> type) { COMPARISON_TYPE ctO = COMPARISON_TYPE.fromObject(o); COMPARISON_TYPE ctT = COMPARISON_TYPE.fromClass(type); try { COMPARISON_TYPE.fromOperands(ctO, ctT); } catch (Exception e) { throw DBLogger.newUser("Cannot assign " + o.getClass() + " to "...
[ "public", "static", "void", "checkAssignability", "(", "Object", "o", ",", "Class", "<", "?", ">", "type", ")", "{", "COMPARISON_TYPE", "ctO", "=", "COMPARISON_TYPE", ".", "fromObject", "(", "o", ")", ";", "COMPARISON_TYPE", "ctT", "=", "COMPARISON_TYPE", "....
This assumes that comparability implies assignability or convertability... @param o object @param type type
[ "This", "assumes", "that", "comparability", "implies", "assignability", "or", "convertability", "..." ]
train
https://github.com/tzaeschke/zoodb/blob/058d0ff161a8ee9d53244c433aca97ee9c654410/src/org/zoodb/internal/query/TypeConverterTools.java#L168-L176
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsappflowcollector.java
nsappflowcollector.get
public static nsappflowcollector get(nitro_service service, String name) throws Exception { """ Use this API to fetch nsappflowcollector resource of given name . """ nsappflowcollector obj = new nsappflowcollector(); obj.set_name(name); nsappflowcollector response = (nsappflowcollector) obj.get_resource(...
java
public static nsappflowcollector get(nitro_service service, String name) throws Exception{ nsappflowcollector obj = new nsappflowcollector(); obj.set_name(name); nsappflowcollector response = (nsappflowcollector) obj.get_resource(service); return response; }
[ "public", "static", "nsappflowcollector", "get", "(", "nitro_service", "service", ",", "String", "name", ")", "throws", "Exception", "{", "nsappflowcollector", "obj", "=", "new", "nsappflowcollector", "(", ")", ";", "obj", ".", "set_name", "(", "name", ")", ";...
Use this API to fetch nsappflowcollector resource of given name .
[ "Use", "this", "API", "to", "fetch", "nsappflowcollector", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ns/nsappflowcollector.java#L235-L240
Stratio/stratio-connector-commons
connector-commons/src/main/java/com/stratio/connector/commons/engine/CommonsMetadataEngine.java
CommonsMetadataEngine.alterTable
@Override public final void alterTable(ClusterName targetCluster, TableName name, AlterOptions alterOptions) throws UnsupportedException, ExecutionException { """ This method add, delete, or modify columns in an existing table. @param targetCluster the target cluster where the table will be alte...
java
@Override public final void alterTable(ClusterName targetCluster, TableName name, AlterOptions alterOptions) throws UnsupportedException, ExecutionException { try { connectionHandler.startJob(targetCluster.getName()); if (logger.isDebugEnabled()) { logge...
[ "@", "Override", "public", "final", "void", "alterTable", "(", "ClusterName", "targetCluster", ",", "TableName", "name", ",", "AlterOptions", "alterOptions", ")", "throws", "UnsupportedException", ",", "ExecutionException", "{", "try", "{", "connectionHandler", ".", ...
This method add, delete, or modify columns in an existing table. @param targetCluster the target cluster where the table will be altered. @param name the table name. @param alterOptions the alter options. @throws UnsupportedException the unsupported exception @throws ExecutionException the execution except...
[ "This", "method", "add", "delete", "or", "modify", "columns", "in", "an", "existing", "table", "." ]
train
https://github.com/Stratio/stratio-connector-commons/blob/d7cc66cb9591344a13055962e87a91f01c3707d1/connector-commons/src/main/java/com/stratio/connector/commons/engine/CommonsMetadataEngine.java#L270-L290
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java
ArgumentAttr.checkSpeculative
Type checkSpeculative(DiagnosticPosition pos, Type t, ResultInfo resultInfo) { """ Checks a type in the speculative tree against a given result; the type can be either a plain type or an argument type,in which case a more complex check is required. """ if (t.hasTag(DEFERRED)) { return ((De...
java
Type checkSpeculative(DiagnosticPosition pos, Type t, ResultInfo resultInfo) { if (t.hasTag(DEFERRED)) { return ((DeferredType)t).check(resultInfo); } else { return resultInfo.check(pos, t); } }
[ "Type", "checkSpeculative", "(", "DiagnosticPosition", "pos", ",", "Type", "t", ",", "ResultInfo", "resultInfo", ")", "{", "if", "(", "t", ".", "hasTag", "(", "DEFERRED", ")", ")", "{", "return", "(", "(", "DeferredType", ")", "t", ")", ".", "check", "...
Checks a type in the speculative tree against a given result; the type can be either a plain type or an argument type,in which case a more complex check is required.
[ "Checks", "a", "type", "in", "the", "speculative", "tree", "against", "a", "given", "result", ";", "the", "type", "can", "be", "either", "a", "plain", "type", "or", "an", "argument", "type", "in", "which", "case", "a", "more", "complex", "check", "is", ...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java#L152-L158
lessthanoptimal/BoofCV
integration/boofcv-swing/src/main/java/boofcv/gui/BoofSwingUtil.java
BoofSwingUtil.selectZoomToShowAll
public static double selectZoomToShowAll(JComponent panel , int width , int height ) { """ Select a zoom which will allow the entire image to be shown in the panel """ int w = panel.getWidth(); int h = panel.getHeight(); if( w == 0 ) { w = panel.getPreferredSize().width; h = panel.getPreferredSize(...
java
public static double selectZoomToShowAll(JComponent panel , int width , int height ) { int w = panel.getWidth(); int h = panel.getHeight(); if( w == 0 ) { w = panel.getPreferredSize().width; h = panel.getPreferredSize().height; } double scale = Math.max(width/(double)w,height/(double)h); if( scale > ...
[ "public", "static", "double", "selectZoomToShowAll", "(", "JComponent", "panel", ",", "int", "width", ",", "int", "height", ")", "{", "int", "w", "=", "panel", ".", "getWidth", "(", ")", ";", "int", "h", "=", "panel", ".", "getHeight", "(", ")", ";", ...
Select a zoom which will allow the entire image to be shown in the panel
[ "Select", "a", "zoom", "which", "will", "allow", "the", "entire", "image", "to", "be", "shown", "in", "the", "panel" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-swing/src/main/java/boofcv/gui/BoofSwingUtil.java#L209-L223
digitalfondue/stampo
src/main/java/ch/digitalfondue/stampo/processor/IncludeAllPaginator.java
IncludeAllPaginator.flattenAndGroupRecursively
private List<IncludeAllPage> flattenAndGroupRecursively(Directory dir, int maxDepth, int depth) { """ /* From a given directory, it will flatten the file hierarchy in a list of "pages" (That can contain more than one FileResource) """ List<FileOrDir> fileOrDirs = new ArrayList<>(); Set<String> paire...
java
private List<IncludeAllPage> flattenAndGroupRecursively(Directory dir, int maxDepth, int depth) { List<FileOrDir> fileOrDirs = new ArrayList<>(); Set<String> pairedDirectories = new HashSet<>(); Map<String, Directory> childDirs = dir.getDirectories(); Map<String, FileResource> childFiles = dir.getFil...
[ "private", "List", "<", "IncludeAllPage", ">", "flattenAndGroupRecursively", "(", "Directory", "dir", ",", "int", "maxDepth", ",", "int", "depth", ")", "{", "List", "<", "FileOrDir", ">", "fileOrDirs", "=", "new", "ArrayList", "<>", "(", ")", ";", "Set", "...
/* From a given directory, it will flatten the file hierarchy in a list of "pages" (That can contain more than one FileResource)
[ "/", "*", "From", "a", "given", "directory", "it", "will", "flatten", "the", "file", "hierarchy", "in", "a", "list", "of", "pages", "(", "That", "can", "contain", "more", "than", "one", "FileResource", ")" ]
train
https://github.com/digitalfondue/stampo/blob/5a41f20acd9211cf3951c30d0e0825994ae95573/src/main/java/ch/digitalfondue/stampo/processor/IncludeAllPaginator.java#L133-L185
spring-projects/spring-android
spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java
UriUtils.encodeQueryParam
public static String encodeQueryParam(String queryParam, String encoding) throws UnsupportedEncodingException { """ Encodes the given URI query parameter with the given encoding. @param queryParam the query parameter to be encoded @param encoding the character encoding to encode to @return the encoded query par...
java
public static String encodeQueryParam(String queryParam, String encoding) throws UnsupportedEncodingException { return HierarchicalUriComponents.encodeUriComponent(queryParam, encoding, HierarchicalUriComponents.Type.QUERY_PARAM); }
[ "public", "static", "String", "encodeQueryParam", "(", "String", "queryParam", ",", "String", "encoding", ")", "throws", "UnsupportedEncodingException", "{", "return", "HierarchicalUriComponents", ".", "encodeUriComponent", "(", "queryParam", ",", "encoding", ",", "Hier...
Encodes the given URI query parameter with the given encoding. @param queryParam the query parameter to be encoded @param encoding the character encoding to encode to @return the encoded query parameter @throws UnsupportedEncodingException when the given encoding parameter is not supported
[ "Encodes", "the", "given", "URI", "query", "parameter", "with", "the", "given", "encoding", "." ]
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-rest-template/src/main/java/org/springframework/web/util/UriUtils.java#L307-L309
google/j2objc
translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java
ElementUtil.isNonnull
public static boolean isNonnull(Element element, boolean parametersNonnullByDefault) { """ Returns whether an element is marked as always being non-null. Field, method, and parameter elements can be defined as non-null with a Nonnull annotation. Method parameters can also be defined as non-null by annotating the...
java
public static boolean isNonnull(Element element, boolean parametersNonnullByDefault) { return hasNonnullAnnotation(element) || isConstructor(element) // Java constructors are always non-null. || (isParameter(element) && parametersNonnullByDefault && !((VariableElement) eleme...
[ "public", "static", "boolean", "isNonnull", "(", "Element", "element", ",", "boolean", "parametersNonnullByDefault", ")", "{", "return", "hasNonnullAnnotation", "(", "element", ")", "||", "isConstructor", "(", "element", ")", "// Java constructors are always non-null.", ...
Returns whether an element is marked as always being non-null. Field, method, and parameter elements can be defined as non-null with a Nonnull annotation. Method parameters can also be defined as non-null by annotating the owning package or type element with the ParametersNonnullByDefault annotation.
[ "Returns", "whether", "an", "element", "is", "marked", "as", "always", "being", "non", "-", "null", ".", "Field", "method", "and", "parameter", "elements", "can", "be", "defined", "as", "non", "-", "null", "with", "a", "Nonnull", "annotation", ".", "Method...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/translator/src/main/java/com/google/devtools/j2objc/util/ElementUtil.java#L809-L815
jbundle/jbundle
thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java
TaskProxy.makeRemoteTable
public RemoteTable makeRemoteTable(String strRecordClassName, String strTableSessionClassName, Map<String, Object> properties, Map<String, Object> propDatabase) throws RemoteException { """ Make a table for this database. @param strRecordClassName The record class name. @param strTableSessionClassName Th...
java
public RemoteTable makeRemoteTable(String strRecordClassName, String strTableSessionClassName, Map<String, Object> properties, Map<String, Object> propDatabase) throws RemoteException { BaseTransport transport = this.createProxyTransport(MAKE_REMOTE_TABLE); transport.addParam(NAME, strRecord...
[ "public", "RemoteTable", "makeRemoteTable", "(", "String", "strRecordClassName", ",", "String", "strTableSessionClassName", ",", "Map", "<", "String", ",", "Object", ">", "properties", ",", "Map", "<", "String", ",", "Object", ">", "propDatabase", ")", "throws", ...
Make a table for this database. @param strRecordClassName The record class name. @param strTableSessionClassName The (optional) session name for the table. @param properties The properties for the remote table.
[ "Make", "a", "table", "for", "this", "database", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/remote/src/main/java/org/jbundle/thin/base/remote/proxy/TaskProxy.java#L95-L110
Microsoft/malmo
Minecraft/src/main/java/com/microsoft/Malmo/Client/MalmoModClient.java
MalmoModClient.setUpExtraKeys
private void setUpExtraKeys(GameSettings settings) { """ Set up some handy extra keys: @param settings Minecraft's original GameSettings object """ // Create extra key bindings here and pass them to the KeyManager. ArrayList<InternalKey> extraKeys = new ArrayList<InternalKey>(); // Cre...
java
private void setUpExtraKeys(GameSettings settings) { // Create extra key bindings here and pass them to the KeyManager. ArrayList<InternalKey> extraKeys = new ArrayList<InternalKey>(); // Create a key binding to toggle between player and Malmo control: extraKeys.add(new InternalKey("...
[ "private", "void", "setUpExtraKeys", "(", "GameSettings", "settings", ")", "{", "// Create extra key bindings here and pass them to the KeyManager.", "ArrayList", "<", "InternalKey", ">", "extraKeys", "=", "new", "ArrayList", "<", "InternalKey", ">", "(", ")", ";", "// ...
Set up some handy extra keys: @param settings Minecraft's original GameSettings object
[ "Set", "up", "some", "handy", "extra", "keys", ":" ]
train
https://github.com/Microsoft/malmo/blob/4139cd6f3e52f6e893a931a1d4b70d35f8e70e5a/Minecraft/src/main/java/com/microsoft/Malmo/Client/MalmoModClient.java#L159-L193
looly/hutool
hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java
MapUtil.join
public static <K, V> String join(Map<K, V> map, String separator, String keyValueSeparator, boolean isIgnoreNull) { """ 将map转成字符串 @param <K> 键类型 @param <V> 值类型 @param map Map @param separator entry之间的连接符 @param keyValueSeparator kv之间的连接符 @param isIgnoreNull 是否忽略null的键和值 @return 连接后的字符串 @since 3.1.1 "...
java
public static <K, V> String join(Map<K, V> map, String separator, String keyValueSeparator, boolean isIgnoreNull) { final StringBuilder strBuilder = StrUtil.builder(); boolean isFirst = true; for (Entry<K, V> entry : map.entrySet()) { if (false == isIgnoreNull || entry.getKey() != null && entry.getValue() ...
[ "public", "static", "<", "K", ",", "V", ">", "String", "join", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "String", "separator", ",", "String", "keyValueSeparator", ",", "boolean", "isIgnoreNull", ")", "{", "final", "StringBuilder", "strBuilder", "...
将map转成字符串 @param <K> 键类型 @param <V> 值类型 @param map Map @param separator entry之间的连接符 @param keyValueSeparator kv之间的连接符 @param isIgnoreNull 是否忽略null的键和值 @return 连接后的字符串 @since 3.1.1
[ "将map转成字符串" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/map/MapUtil.java#L458-L472
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java
CollectionNamingConfusion.checkConfusedName
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "EXS_EXCEPTION_SOFTENING_RETURN_FALSE", justification = "No other simple way to determine whether class exists") private boolean checkConfusedName(String methodOrVariableName, String signature) { """ looks for a name that mentions a collection type bu...
java
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "EXS_EXCEPTION_SOFTENING_RETURN_FALSE", justification = "No other simple way to determine whether class exists") private boolean checkConfusedName(String methodOrVariableName, String signature) { try { String name = methodOrVariableName...
[ "@", "edu", ".", "umd", ".", "cs", ".", "findbugs", ".", "annotations", ".", "SuppressFBWarnings", "(", "value", "=", "\"EXS_EXCEPTION_SOFTENING_RETURN_FALSE\"", ",", "justification", "=", "\"No other simple way to determine whether class exists\"", ")", "private", "boole...
looks for a name that mentions a collection type but the wrong type for the variable @param methodOrVariableName the method or variable name @param signature the variable signature @return whether the name doesn't match the type
[ "looks", "for", "a", "name", "that", "mentions", "a", "collection", "type", "but", "the", "wrong", "type", "for", "the", "variable" ]
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/CollectionNamingConfusion.java#L135-L154
code4everything/util
src/main/java/com/zhazhapan/util/DateUtils.java
DateUtils.greatThan
public static boolean greatThan(Time big, Time small) { """ 第一个值是否大于第二个值 @param big 第一个值 @param small 第二个值 @return {@link Boolean} @since 1.1.0 """ return compare(big, small, CompareWay.GT); }
java
public static boolean greatThan(Time big, Time small) { return compare(big, small, CompareWay.GT); }
[ "public", "static", "boolean", "greatThan", "(", "Time", "big", ",", "Time", "small", ")", "{", "return", "compare", "(", "big", ",", "small", ",", "CompareWay", ".", "GT", ")", ";", "}" ]
第一个值是否大于第二个值 @param big 第一个值 @param small 第二个值 @return {@link Boolean} @since 1.1.0
[ "第一个值是否大于第二个值" ]
train
https://github.com/code4everything/util/blob/1fc9f0ead1108f4d7208ba7c000df4244f708418/src/main/java/com/zhazhapan/util/DateUtils.java#L118-L120
looly/hutool
hutool-json/src/main/java/cn/hutool/json/JSONObject.java
JSONObject.toBean
public <T> T toBean(Type type, boolean ignoreError) { """ 转为实体类对象 @param <T> Bean类型 @param type {@link Type} @param ignoreError 是否忽略转换错误 @return 实体类对象 @since 4.3.2 """ return JSONConverter.jsonConvert(type, this, ignoreError); }
java
public <T> T toBean(Type type, boolean ignoreError) { return JSONConverter.jsonConvert(type, this, ignoreError); }
[ "public", "<", "T", ">", "T", "toBean", "(", "Type", "type", ",", "boolean", "ignoreError", ")", "{", "return", "JSONConverter", ".", "jsonConvert", "(", "type", ",", "this", ",", "ignoreError", ")", ";", "}" ]
转为实体类对象 @param <T> Bean类型 @param type {@link Type} @param ignoreError 是否忽略转换错误 @return 实体类对象 @since 4.3.2
[ "转为实体类对象" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-json/src/main/java/cn/hutool/json/JSONObject.java#L321-L323
apache/flink
flink-core/src/main/java/org/apache/flink/core/fs/ConnectionLimitingFactory.java
ConnectionLimitingFactory.decorateIfLimited
public static FileSystemFactory decorateIfLimited(FileSystemFactory factory, String scheme, Configuration config) { """ Decorates the given factory for a {@code ConnectionLimitingFactory}, if the given configuration configured connection limiting for the given file system scheme. Otherwise, it returns the given ...
java
public static FileSystemFactory decorateIfLimited(FileSystemFactory factory, String scheme, Configuration config) { checkNotNull(factory, "factory"); final ConnectionLimitingSettings settings = ConnectionLimitingSettings.fromConfig(config, scheme); // decorate only if any limit is configured if (settings == n...
[ "public", "static", "FileSystemFactory", "decorateIfLimited", "(", "FileSystemFactory", "factory", ",", "String", "scheme", ",", "Configuration", "config", ")", "{", "checkNotNull", "(", "factory", ",", "\"factory\"", ")", ";", "final", "ConnectionLimitingSettings", "...
Decorates the given factory for a {@code ConnectionLimitingFactory}, if the given configuration configured connection limiting for the given file system scheme. Otherwise, it returns the given factory as is. @param factory The factory to potentially decorate. @param scheme The file scheme for which to check the config...
[ "Decorates", "the", "given", "factory", "for", "a", "{", "@code", "ConnectionLimitingFactory", "}", "if", "the", "given", "configuration", "configured", "connection", "limiting", "for", "the", "given", "file", "system", "scheme", ".", "Otherwise", "it", "returns",...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/core/fs/ConnectionLimitingFactory.java#L81-L94
woo-j/OkapiBarcode
src/main/java/uk/org/okapibarcode/util/Arrays.java
Arrays.containsAt
public static boolean containsAt(byte[] array, byte[] searchFor, int index) { """ Returns <code>true</code> if the specified array contains the specified sub-array at the specified index. @param array the array to search in @param searchFor the sub-array to search for @param index the index at which to search...
java
public static boolean containsAt(byte[] array, byte[] searchFor, int index) { for (int i = 0; i < searchFor.length; i++) { if (index + i >= array.length || array[index + i] != searchFor[i]) { return false; } } return true; }
[ "public", "static", "boolean", "containsAt", "(", "byte", "[", "]", "array", ",", "byte", "[", "]", "searchFor", ",", "int", "index", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "searchFor", ".", "length", ";", "i", "++", ")", "{",...
Returns <code>true</code> if the specified array contains the specified sub-array at the specified index. @param array the array to search in @param searchFor the sub-array to search for @param index the index at which to search @return whether or not the specified array contains the specified sub-array at the specifi...
[ "Returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "specified", "array", "contains", "the", "specified", "sub", "-", "array", "at", "the", "specified", "index", "." ]
train
https://github.com/woo-j/OkapiBarcode/blob/d1cb4f4ab64557cd3db64d9a473528a52ce58081/src/main/java/uk/org/okapibarcode/util/Arrays.java#L88-L95
deeplearning4j/deeplearning4j
datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java
Normalization.minMaxColumns
public static List<Row> minMaxColumns(DataRowsFacade data, List<String> columns) { """ Returns the min and max of the given columns @param data the data to get the max for @param columns the columns to get the @return """ String[] arr = new String[columns.size()]; for (int i = 0; i < arr.len...
java
public static List<Row> minMaxColumns(DataRowsFacade data, List<String> columns) { String[] arr = new String[columns.size()]; for (int i = 0; i < arr.length; i++) arr[i] = columns.get(i); return minMaxColumns(data, arr); }
[ "public", "static", "List", "<", "Row", ">", "minMaxColumns", "(", "DataRowsFacade", "data", ",", "List", "<", "String", ">", "columns", ")", "{", "String", "[", "]", "arr", "=", "new", "String", "[", "columns", ".", "size", "(", ")", "]", ";", "for"...
Returns the min and max of the given columns @param data the data to get the max for @param columns the columns to get the @return
[ "Returns", "the", "min", "and", "max", "of", "the", "given", "columns" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/datavec/datavec-spark/src/main/java/org/datavec/spark/transform/Normalization.java#L199-L204
couchbase/couchbase-java-client
src/main/java/com/couchbase/client/java/transcoder/TranscoderUtils.java
TranscoderUtils.byteBufToGenericObject
public static Object byteBufToGenericObject(ByteBuf input, ObjectMapper mapper) throws IOException { """ Converts a {@link ByteBuf} representing a valid JSON entity to a generic {@link Object}, <b>without releasing the buffer</b>. The entity can either be a JSON object, array or scalar value, potentially with le...
java
public static Object byteBufToGenericObject(ByteBuf input, ObjectMapper mapper) throws IOException { //skip leading whitespaces int toSkip = input.forEachByte(new WhitespaceSkipper()); if (toSkip > 0) { input.skipBytes(toSkip); } //peek into the buffer for quick detec...
[ "public", "static", "Object", "byteBufToGenericObject", "(", "ByteBuf", "input", ",", "ObjectMapper", "mapper", ")", "throws", "IOException", "{", "//skip leading whitespaces", "int", "toSkip", "=", "input", ".", "forEachByte", "(", "new", "WhitespaceSkipper", "(", ...
Converts a {@link ByteBuf} representing a valid JSON entity to a generic {@link Object}, <b>without releasing the buffer</b>. The entity can either be a JSON object, array or scalar value, potentially with leading whitespace (which gets ignored). JSON objects are converted to a {@link JsonObject} and JSON arrays to a {...
[ "Converts", "a", "{", "@link", "ByteBuf", "}", "representing", "a", "valid", "JSON", "entity", "to", "a", "generic", "{", "@link", "Object", "}", "<b", ">", "without", "releasing", "the", "buffer<", "/", "b", ">", ".", "The", "entity", "can", "either", ...
train
https://github.com/couchbase/couchbase-java-client/blob/f36a0ee0c66923bdde47838ca543e50cbaa99e14/src/main/java/com/couchbase/client/java/transcoder/TranscoderUtils.java#L362-L398
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/VpnGatewaysInner.java
VpnGatewaysInner.createOrUpdateAsync
public Observable<VpnGatewayInner> createOrUpdateAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { """ Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the VpnGateway. @param ga...
java
public Observable<VpnGatewayInner> createOrUpdateAsync(String resourceGroupName, String gatewayName, VpnGatewayInner vpnGatewayParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, gatewayName, vpnGatewayParameters).map(new Func1<ServiceResponse<VpnGatewayInner>, VpnGatewayInner>() { ...
[ "public", "Observable", "<", "VpnGatewayInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "gatewayName", ",", "VpnGatewayInner", "vpnGatewayParameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName"...
Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. @param resourceGroupName The resource group name of the VpnGateway. @param gatewayName The name of the gateway. @param vpnGatewayParameters Parameters supplied to create or Update a virtual wan vpn gateway. @throws IllegalArgument...
[ "Creates", "a", "virtual", "wan", "vpn", "gateway", "if", "it", "doesn", "t", "exist", "else", "updates", "the", "existing", "gateway", "." ]
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/VpnGatewaysInner.java#L238-L245
javagl/Common
src/main/java/de/javagl/common/xml/XmlUtils.java
XmlUtils.createTextNode
public static Node createTextNode(String tagName, Object contents) { """ Creates an XML node from the {@link #getDefaultDocument() default document} whose only child is a text node that contains the string representation of the given object @param tagName The tag name for the node @param contents The object...
java
public static Node createTextNode(String tagName, Object contents) { Document d = XmlUtils.getDefaultDocument(); Element node = d.createElement(tagName); node.appendChild(d.createTextNode(String.valueOf(contents))); return node; }
[ "public", "static", "Node", "createTextNode", "(", "String", "tagName", ",", "Object", "contents", ")", "{", "Document", "d", "=", "XmlUtils", ".", "getDefaultDocument", "(", ")", ";", "Element", "node", "=", "d", ".", "createElement", "(", "tagName", ")", ...
Creates an XML node from the {@link #getDefaultDocument() default document} whose only child is a text node that contains the string representation of the given object @param tagName The tag name for the node @param contents The object whose string representation will be the contents of the text node @return The node
[ "Creates", "an", "XML", "node", "from", "the", "{", "@link", "#getDefaultDocument", "()", "default", "document", "}", "whose", "only", "child", "is", "a", "text", "node", "that", "contains", "the", "string", "representation", "of", "the", "given", "object" ]
train
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L275-L281
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java
CommonOps_DDRM.scaleCol
public static void scaleCol( double alpha , DMatrixRMaj A , int col ) { """ In-place scaling of a column in A @param alpha scale factor @param A matrix @param col which row in A """ int idx = col; for (int row = 0; row < A.numRows; row++, idx += A.numCols) { A.data[idx] *= alph...
java
public static void scaleCol( double alpha , DMatrixRMaj A , int col ) { int idx = col; for (int row = 0; row < A.numRows; row++, idx += A.numCols) { A.data[idx] *= alpha; } }
[ "public", "static", "void", "scaleCol", "(", "double", "alpha", ",", "DMatrixRMaj", "A", ",", "int", "col", ")", "{", "int", "idx", "=", "col", ";", "for", "(", "int", "row", "=", "0", ";", "row", "<", "A", ".", "numRows", ";", "row", "++", ",", ...
In-place scaling of a column in A @param alpha scale factor @param A matrix @param col which row in A
[ "In", "-", "place", "scaling", "of", "a", "column", "in", "A" ]
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/CommonOps_DDRM.java#L2412-L2417
vvakame/JsonPullParser
jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java
JsonModelCoder.get
public T get(InputStream stream) throws IOException, JsonFormatException { """ Attempts to parse the given data as an object. @param stream JSON-formatted data @return An object instance @throws IOException @throws JsonFormatException The given data is malformed, or its type is unexpected """ JsonPullP...
java
public T get(InputStream stream) throws IOException, JsonFormatException { JsonPullParser parser = JsonPullParser.newParser(stream); return get(parser, null); }
[ "public", "T", "get", "(", "InputStream", "stream", ")", "throws", "IOException", ",", "JsonFormatException", "{", "JsonPullParser", "parser", "=", "JsonPullParser", ".", "newParser", "(", "stream", ")", ";", "return", "get", "(", "parser", ",", "null", ")", ...
Attempts to parse the given data as an object. @param stream JSON-formatted data @return An object instance @throws IOException @throws JsonFormatException The given data is malformed, or its type is unexpected
[ "Attempts", "to", "parse", "the", "given", "data", "as", "an", "object", "." ]
train
https://github.com/vvakame/JsonPullParser/blob/fce183ca66354723323a77f2ae8cb5222b5836bc/jsonpullparser-core/src/main/java/net/vvakame/util/jsonpullparser/builder/JsonModelCoder.java#L186-L189
johncarl81/transfuse
transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java
Contract.notEmpty
public static void notEmpty(final Collection<?> collection, final String collectionName) { """ Check that a collection is not empty @param collection the collection to check @param collectionName the name of the collection @throws IllegalArgumentException if collection is null or if the collection is empty ...
java
public static void notEmpty(final Collection<?> collection, final String collectionName) { notNull(collection, collectionName); if (collection.isEmpty()) { throw new IllegalArgumentException("expecting " + maskNullArgument(collectionName) + " to contain 1 or more elements"); } }
[ "public", "static", "void", "notEmpty", "(", "final", "Collection", "<", "?", ">", "collection", ",", "final", "String", "collectionName", ")", "{", "notNull", "(", "collection", ",", "collectionName", ")", ";", "if", "(", "collection", ".", "isEmpty", "(", ...
Check that a collection is not empty @param collection the collection to check @param collectionName the name of the collection @throws IllegalArgumentException if collection is null or if the collection is empty
[ "Check", "that", "a", "collection", "is", "not", "empty" ]
train
https://github.com/johncarl81/transfuse/blob/a5f837504797a6c4f8628f7e1dde09b8e6368c8b/transfuse-support/src/main/java/org/androidtransfuse/util/Contract.java#L82-L88
JOML-CI/JOML
src/org/joml/Matrix4d.java
Matrix4d.scaleAround
public Matrix4d scaleAround(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d dest) { """ /* (non-Javadoc) @see org.joml.Matrix4dc#scaleAround(double, double, double, double, double, double, org.joml.Matrix4d) """ double nm30 = m00 * ox + m10 * oy + m20 * oz + m30; dou...
java
public Matrix4d scaleAround(double sx, double sy, double sz, double ox, double oy, double oz, Matrix4d dest) { double nm30 = m00 * ox + m10 * oy + m20 * oz + m30; double nm31 = m01 * ox + m11 * oy + m21 * oz + m31; double nm32 = m02 * ox + m12 * oy + m22 * oz + m32; double nm33 = m03 * o...
[ "public", "Matrix4d", "scaleAround", "(", "double", "sx", ",", "double", "sy", ",", "double", "sz", ",", "double", "ox", ",", "double", "oy", ",", "double", "oz", ",", "Matrix4d", "dest", ")", "{", "double", "nm30", "=", "m00", "*", "ox", "+", "m10",...
/* (non-Javadoc) @see org.joml.Matrix4dc#scaleAround(double, double, double, double, double, double, org.joml.Matrix4d)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4d.java#L4426-L4451
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/id/XID.java
XID.write
public static void write(XID id, DataOutput out) throws IOException { """ Serializes an XID object binarily to a data output stream. @param id XID to be serialized. @param out Data output to store XID serialization. """ out.writeLong(id.uuid.getMostSignificantBits()); out.writeLong(id.uuid.getLeastSi...
java
public static void write(XID id, DataOutput out) throws IOException { out.writeLong(id.uuid.getMostSignificantBits()); out.writeLong(id.uuid.getLeastSignificantBits()); }
[ "public", "static", "void", "write", "(", "XID", "id", ",", "DataOutput", "out", ")", "throws", "IOException", "{", "out", ".", "writeLong", "(", "id", ".", "uuid", ".", "getMostSignificantBits", "(", ")", ")", ";", "out", ".", "writeLong", "(", "id", ...
Serializes an XID object binarily to a data output stream. @param id XID to be serialized. @param out Data output to store XID serialization.
[ "Serializes", "an", "XID", "object", "binarily", "to", "a", "data", "output", "stream", "." ]
train
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/id/XID.java#L115-L118
ixa-ehu/ixa-pipe-ml
src/main/java/eus/ixa/ixa/pipe/ml/features/MFSFeatureGenerator.java
MFSFeatureGenerator.processRangeOptions
private void processRangeOptions(final Map<String, String> properties) { """ Process the options of which kind of features are to be generated. @param properties the properties map """ final String featuresRange = properties.get("range"); final String[] rangeArray = Flags.processMFSFeaturesRange(fe...
java
private void processRangeOptions(final Map<String, String> properties) { final String featuresRange = properties.get("range"); final String[] rangeArray = Flags.processMFSFeaturesRange(featuresRange); // options if (rangeArray[0].equalsIgnoreCase("pos")) { this.isPos = true; } if (rangeArr...
[ "private", "void", "processRangeOptions", "(", "final", "Map", "<", "String", ",", "String", ">", "properties", ")", "{", "final", "String", "featuresRange", "=", "properties", ".", "get", "(", "\"range\"", ")", ";", "final", "String", "[", "]", "rangeArray"...
Process the options of which kind of features are to be generated. @param properties the properties map
[ "Process", "the", "options", "of", "which", "kind", "of", "features", "are", "to", "be", "generated", "." ]
train
https://github.com/ixa-ehu/ixa-pipe-ml/blob/c817fa1e40e96ed15fc79d22c3a7c25f1a40d172/src/main/java/eus/ixa/ixa/pipe/ml/features/MFSFeatureGenerator.java#L156-L175
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java
ModelsImpl.listEntitiesWithServiceResponseAsync
public Observable<ServiceResponse<List<EntityExtractor>>> listEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) { """ Gets information about the entity models. @param appId The application ID. @param versionId The version ID. @param lis...
java
public Observable<ServiceResponse<List<EntityExtractor>>> listEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is re...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "EntityExtractor", ">", ">", ">", "listEntitiesWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "ListEntitiesOptionalParameter", "listEntitiesOptionalParameter", ")", "{", ...
Gets information about the entity models. @param appId The application ID. @param versionId The version ID. @param listEntitiesOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @return the observ...
[ "Gets", "information", "about", "the", "entity", "models", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L1148-L1162
googleapis/google-cloud-java
google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketClient.java
BackendBucketClient.insertBackendBucket
@BetaApi public final Operation insertBackendBucket(String project, BackendBucket backendBucketResource) { """ Creates a BackendBucket resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (BackendBucketClient backendBucketClient = BackendBucketClient.c...
java
@BetaApi public final Operation insertBackendBucket(String project, BackendBucket backendBucketResource) { InsertBackendBucketHttpRequest request = InsertBackendBucketHttpRequest.newBuilder() .setProject(project) .setBackendBucketResource(backendBucketResource) .build(...
[ "@", "BetaApi", "public", "final", "Operation", "insertBackendBucket", "(", "String", "project", ",", "BackendBucket", "backendBucketResource", ")", "{", "InsertBackendBucketHttpRequest", "request", "=", "InsertBackendBucketHttpRequest", ".", "newBuilder", "(", ")", ".", ...
Creates a BackendBucket resource in the specified project using the data included in the request. <p>Sample code: <pre><code> try (BackendBucketClient backendBucketClient = BackendBucketClient.create()) { ProjectName project = ProjectName.of("[PROJECT]"); BackendBucket backendBucketResource = BackendBucket.newBuilder...
[ "Creates", "a", "BackendBucket", "resource", "in", "the", "specified", "project", "using", "the", "data", "included", "in", "the", "request", "." ]
train
https://github.com/googleapis/google-cloud-java/blob/d2f0bc64a53049040fe9c9d338b12fab3dd1ad6a/google-cloud-clients/google-cloud-compute/src/main/java/com/google/cloud/compute/v1/BackendBucketClient.java#L640-L649
marvinlabs/android-slideshow-widget
library/src/main/java/com/marvinlabs/widget/slideshow/SlideShowView.java
SlideShowView.onSizeChanged
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { """ /* When the size of the view changes, the size of the selector must scale with it """ super.onSizeChanged(w, h, oldw, oldh); if (onClickedDrawable != null) { onClickedDrawable.setBounds(0, 0, w, h); ...
java
@Override protected void onSizeChanged(int w, int h, int oldw, int oldh) { super.onSizeChanged(w, h, oldw, oldh); if (onClickedDrawable != null) { onClickedDrawable.setBounds(0, 0, w, h); } }
[ "@", "Override", "protected", "void", "onSizeChanged", "(", "int", "w", ",", "int", "h", ",", "int", "oldw", ",", "int", "oldh", ")", "{", "super", ".", "onSizeChanged", "(", "w", ",", "h", ",", "oldw", ",", "oldh", ")", ";", "if", "(", "onClickedD...
/* When the size of the view changes, the size of the selector must scale with it
[ "/", "*", "When", "the", "size", "of", "the", "view", "changes", "the", "size", "of", "the", "selector", "must", "scale", "with", "it" ]
train
https://github.com/marvinlabs/android-slideshow-widget/blob/0d8ddca9a8f62787d78b5eb7f184cabfee569d8d/library/src/main/java/com/marvinlabs/widget/slideshow/SlideShowView.java#L291-L297
square/okhttp
okhttp/src/main/java/okhttp3/internal/connection/RealConnection.java
RealConnection.createTunnel
private Request createTunnel(int readTimeout, int writeTimeout, Request tunnelRequest, HttpUrl url) throws IOException { """ To make an HTTPS connection over an HTTP proxy, send an unencrypted CONNECT request to create the proxy connection. This may need to be retried if the proxy requires authorization. ...
java
private Request createTunnel(int readTimeout, int writeTimeout, Request tunnelRequest, HttpUrl url) throws IOException { // Make an SSL Tunnel on the first message pair of each SSL + proxy connection. String requestLine = "CONNECT " + Util.hostHeader(url, true) + " HTTP/1.1"; while (true) { Http...
[ "private", "Request", "createTunnel", "(", "int", "readTimeout", ",", "int", "writeTimeout", ",", "Request", "tunnelRequest", ",", "HttpUrl", "url", ")", "throws", "IOException", "{", "// Make an SSL Tunnel on the first message pair of each SSL + proxy connection.", "String",...
To make an HTTPS connection over an HTTP proxy, send an unencrypted CONNECT request to create the proxy connection. This may need to be retried if the proxy requires authorization.
[ "To", "make", "an", "HTTPS", "connection", "over", "an", "HTTP", "proxy", "send", "an", "unencrypted", "CONNECT", "request", "to", "create", "the", "proxy", "connection", ".", "This", "may", "need", "to", "be", "retried", "if", "the", "proxy", "requires", ...
train
https://github.com/square/okhttp/blob/a8c65a822dd6cadd2de7d115bf94adf312e67868/okhttp/src/main/java/okhttp3/internal/connection/RealConnection.java#L391-L431
stratosphere/stratosphere
stratosphere-core/src/main/java/eu/stratosphere/types/StringValue.java
StringValue.setValue
public void setValue(CharSequence value, int offset, int len) { """ Sets the value of the StringValue to a substring of the given string. @param value The new string value. @param offset The position to start the substring. @param len The length of the substring. """ Validate.notNull(value); if (offse...
java
public void setValue(CharSequence value, int offset, int len) { Validate.notNull(value); if (offset < 0 || len < 0 || offset > value.length() - len) { throw new IndexOutOfBoundsException("offset: " + offset + " len: " + len + " value.len: " + len); } ensureSize(len); this.len = len; for (int i = 0; i ...
[ "public", "void", "setValue", "(", "CharSequence", "value", ",", "int", "offset", ",", "int", "len", ")", "{", "Validate", ".", "notNull", "(", "value", ")", ";", "if", "(", "offset", "<", "0", "||", "len", "<", "0", "||", "offset", ">", "value", "...
Sets the value of the StringValue to a substring of the given string. @param value The new string value. @param offset The position to start the substring. @param len The length of the substring.
[ "Sets", "the", "value", "of", "the", "StringValue", "to", "a", "substring", "of", "the", "given", "string", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-core/src/main/java/eu/stratosphere/types/StringValue.java#L178-L191
micronaut-projects/micronaut-core
inject/src/main/java/io/micronaut/inject/annotation/AnnotationMetadataWriter.java
AnnotationMetadataWriter.instantiateNewMetadata
@Internal public static void instantiateNewMetadata(Type owningType, ClassWriter declaringClassWriter, GeneratorAdapter generatorAdapter, DefaultAnnotationMetadata annotationMetadata, Map<String, GeneratorAdapter> loadTypeMethods) { """ Writes out the byte code necessary to instantiate the given {@link Default...
java
@Internal public static void instantiateNewMetadata(Type owningType, ClassWriter declaringClassWriter, GeneratorAdapter generatorAdapter, DefaultAnnotationMetadata annotationMetadata, Map<String, GeneratorAdapter> loadTypeMethods) { instantiateInternal(owningType, declaringClassWriter, generatorAdapter, ann...
[ "@", "Internal", "public", "static", "void", "instantiateNewMetadata", "(", "Type", "owningType", ",", "ClassWriter", "declaringClassWriter", ",", "GeneratorAdapter", "generatorAdapter", ",", "DefaultAnnotationMetadata", "annotationMetadata", ",", "Map", "<", "String", ",...
Writes out the byte code necessary to instantiate the given {@link DefaultAnnotationMetadata}. @param owningType The owning type @param declaringClassWriter The declaring class writer @param generatorAdapter The generator adapter @param annotationMetadata The annotation metadata @param loadTypeMethods ...
[ "Writes", "out", "the", "byte", "code", "necessary", "to", "instantiate", "the", "given", "{", "@link", "DefaultAnnotationMetadata", "}", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject/src/main/java/io/micronaut/inject/annotation/AnnotationMetadataWriter.java#L215-L218
bluelinelabs/Conductor
conductor/src/main/java/com/bluelinelabs/conductor/Router.java
Router.popToTag
@UiThread public boolean popToTag(@NonNull String tag) { """ Pops all {@link Controller}s until the Controller with the passed tag is at the top @param tag The tag being popped to @return Whether or not any {@link Controller}s were popped in order to get to the transaction with the passed tag """ ...
java
@UiThread public boolean popToTag(@NonNull String tag) { ThreadUtils.ensureMainThread(); return popToTag(tag, null); }
[ "@", "UiThread", "public", "boolean", "popToTag", "(", "@", "NonNull", "String", "tag", ")", "{", "ThreadUtils", ".", "ensureMainThread", "(", ")", ";", "return", "popToTag", "(", "tag", ",", "null", ")", ";", "}" ]
Pops all {@link Controller}s until the Controller with the passed tag is at the top @param tag The tag being popped to @return Whether or not any {@link Controller}s were popped in order to get to the transaction with the passed tag
[ "Pops", "all", "{", "@link", "Controller", "}", "s", "until", "the", "Controller", "with", "the", "passed", "tag", "is", "at", "the", "top" ]
train
https://github.com/bluelinelabs/Conductor/blob/94c9121bb16f93b481954513a8e3905846829fb2/conductor/src/main/java/com/bluelinelabs/conductor/Router.java#L301-L306
jayantk/jklol
src/com/jayantkrish/jklol/ccg/supertag/ListSupertaggedSentence.java
ListSupertaggedSentence.createWithUnobservedSupertags
public static ListSupertaggedSentence createWithUnobservedSupertags(List<String> words, List<String> pos) { """ Creates a supertagged sentence where the supertags for each word are unobserved. Using this sentence during CCG parsing allows any syntactic category to be assigned to each word. @param words @para...
java
public static ListSupertaggedSentence createWithUnobservedSupertags(List<String> words, List<String> pos) { return new ListSupertaggedSentence(WordAndPos.createExample(words, pos), Collections.nCopies(words.size(), Collections.<HeadedSyntacticCategory>emptyList()), Collections.nCopies(words.size(), ...
[ "public", "static", "ListSupertaggedSentence", "createWithUnobservedSupertags", "(", "List", "<", "String", ">", "words", ",", "List", "<", "String", ">", "pos", ")", "{", "return", "new", "ListSupertaggedSentence", "(", "WordAndPos", ".", "createExample", "(", "w...
Creates a supertagged sentence where the supertags for each word are unobserved. Using this sentence during CCG parsing allows any syntactic category to be assigned to each word. @param words @param pos @return
[ "Creates", "a", "supertagged", "sentence", "where", "the", "supertags", "for", "each", "word", "are", "unobserved", ".", "Using", "this", "sentence", "during", "CCG", "parsing", "allows", "any", "syntactic", "category", "to", "be", "assigned", "to", "each", "w...
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/ccg/supertag/ListSupertaggedSentence.java#L28-L32
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.approximately
public String approximately(long delta) { """ Returns the number of minutes, hours, months elapsed for a time delta (milliseconds). @param delta the time delta between two events, in milliseconds @return a string like "5m", "1h" """ MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); para...
java
public String approximately(long delta) { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("delta", Long.toString(delta)); return getEntity(invokeGet("utils/timeago", params), String.class); }
[ "public", "String", "approximately", "(", "long", "delta", ")", "{", "MultivaluedMap", "<", "String", ",", "String", ">", "params", "=", "new", "MultivaluedHashMap", "<>", "(", ")", ";", "params", ".", "putSingle", "(", "\"delta\"", ",", "Long", ".", "toSt...
Returns the number of minutes, hours, months elapsed for a time delta (milliseconds). @param delta the time delta between two events, in milliseconds @return a string like "5m", "1h"
[ "Returns", "the", "number", "of", "minutes", "hours", "months", "elapsed", "for", "a", "time", "delta", "(", "milliseconds", ")", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L1243-L1247