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
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/RemoveBrownPtoN_F32.java
RemoveBrownPtoN_F32.setK
public RemoveBrownPtoN_F32 setK( /**/double fx, /**/double fy, /**/double skew, /**/double cx, /**/double cy ) { """ Specify camera calibration parameters @param fx Focal length x-axis in pixels @param fy Focal length y-axis in pixels @param skew skew in pixels @param cx camera center x-axis in pixels @para...
java
public RemoveBrownPtoN_F32 setK( /**/double fx, /**/double fy, /**/double skew, /**/double cx, /**/double cy ) { this.fx = (float)fx; this.fy = (float)fy; this.skew = (float)skew; this.cx = (float)cx; this.cy = (float)cy; // analytic solution to matrix inverse a11 = (float)(1.0f/fx); a12 = (float)(-sk...
[ "public", "RemoveBrownPtoN_F32", "setK", "(", "/**/", "double", "fx", ",", "/**/", "double", "fy", ",", "/**/", "double", "skew", ",", "/**/", "double", "cx", ",", "/**/", "double", "cy", ")", "{", "this", ".", "fx", "=", "(", "float", ")", "fx", ";"...
Specify camera calibration parameters @param fx Focal length x-axis in pixels @param fy Focal length y-axis in pixels @param skew skew in pixels @param cx camera center x-axis in pixels @param cy center center y-axis in pixels
[ "Specify", "camera", "calibration", "parameters" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/distort/brown/RemoveBrownPtoN_F32.java#L69-L85
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/core/util/MimeTypeUtil.java
MimeTypeUtil.getMimeType
public static String getMimeType(Resource resource, String defaultValue) { """ Detects the mime type of a binary resource (nt:file, nt:resource or another asset type). @param resource the binary resource @param defaultValue the default value if the detection has no useful result @return he detected mime t...
java
public static String getMimeType(Resource resource, String defaultValue) { MimeType mimeType = getMimeType(resource); return mimeType != null ? mimeType.toString() : defaultValue; }
[ "public", "static", "String", "getMimeType", "(", "Resource", "resource", ",", "String", "defaultValue", ")", "{", "MimeType", "mimeType", "=", "getMimeType", "(", "resource", ")", ";", "return", "mimeType", "!=", "null", "?", "mimeType", ".", "toString", "(",...
Detects the mime type of a binary resource (nt:file, nt:resource or another asset type). @param resource the binary resource @param defaultValue the default value if the detection has no useful result @return he detected mime type or the default value given
[ "Detects", "the", "mime", "type", "of", "a", "binary", "resource", "(", "nt", ":", "file", "nt", ":", "resource", "or", "another", "asset", "type", ")", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/util/MimeTypeUtil.java#L59-L62
spothero/volley-jackson-extension
Library/src/com/spothero/volley/JacksonNetwork.java
JacksonNetwork.newRequestQueue
public static RequestQueue newRequestQueue(Context context, HttpStack stack) { """ Creates a default instance of the worker pool and calls {@link RequestQueue#start()} on it. @param context A {@link Context} to use for creating the cache dir. @param stack An {@link com.android.volley.toolbox.HttpStack} to use ...
java
public static RequestQueue newRequestQueue(Context context, HttpStack stack) { RequestQueue queue = new RequestQueue(new DiskBasedCache(new File(context.getCacheDir(), "volley")), new JacksonNetwork(stack)); queue.start(); return queue; }
[ "public", "static", "RequestQueue", "newRequestQueue", "(", "Context", "context", ",", "HttpStack", "stack", ")", "{", "RequestQueue", "queue", "=", "new", "RequestQueue", "(", "new", "DiskBasedCache", "(", "new", "File", "(", "context", ".", "getCacheDir", "(",...
Creates a default instance of the worker pool and calls {@link RequestQueue#start()} on it. @param context A {@link Context} to use for creating the cache dir. @param stack An {@link com.android.volley.toolbox.HttpStack} to use for handling network calls @return A started {@link RequestQueue} instance.
[ "Creates", "a", "default", "instance", "of", "the", "worker", "pool", "and", "calls", "{", "@link", "RequestQueue#start", "()", "}", "on", "it", "." ]
train
https://github.com/spothero/volley-jackson-extension/blob/9b02df3e3e8fc648c80aec2dfae456de949fb74b/Library/src/com/spothero/volley/JacksonNetwork.java#L192-L196
lessthanoptimal/BoofCV
main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationGuessAndCheckFocus.java
SelfCalibrationGuessAndCheckFocus.computeRectifyH
boolean computeRectifyH( double f1 , double f2 , DMatrixRMaj P2, DMatrixRMaj H ) { """ Given the focal lengths for the first two views compute homography H @param f1 view 1 focal length @param f2 view 2 focal length @param P2 projective camera matrix for view 2 @param H (Output) homography @return true if suc...
java
boolean computeRectifyH( double f1 , double f2 , DMatrixRMaj P2, DMatrixRMaj H ) { estimatePlaneInf.setCamera1(f1,f1,0,0,0); estimatePlaneInf.setCamera2(f2,f2,0,0,0); if( !estimatePlaneInf.estimatePlaneAtInfinity(P2,planeInf) ) return false; // TODO add a cost for distance from nominal and scale other cos...
[ "boolean", "computeRectifyH", "(", "double", "f1", ",", "double", "f2", ",", "DMatrixRMaj", "P2", ",", "DMatrixRMaj", "H", ")", "{", "estimatePlaneInf", ".", "setCamera1", "(", "f1", ",", "f1", ",", "0", ",", "0", ",", "0", ")", ";", "estimatePlaneInf", ...
Given the focal lengths for the first two views compute homography H @param f1 view 1 focal length @param f2 view 2 focal length @param P2 projective camera matrix for view 2 @param H (Output) homography @return true if successful
[ "Given", "the", "focal", "lengths", "for", "the", "first", "two", "views", "compute", "homography", "H" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-calibration/src/main/java/boofcv/alg/geo/selfcalib/SelfCalibrationGuessAndCheckFocus.java#L302-L329
landawn/AbacusUtil
src/com/landawn/abacus/util/DateUtil.java
DateUtil.parseGregorianCalendar
public static GregorianCalendar parseGregorianCalendar(final String calendar, final String format, final TimeZone timeZone) { """ Converts the specified <code>calendar</code> with the specified {@code format} to a new instance of GregorianCalendar. <code>null</code> is returned if the specified <code>date</code> ...
java
public static GregorianCalendar parseGregorianCalendar(final String calendar, final String format, final TimeZone timeZone) { if (N.isNullOrEmpty(calendar) || (calendar.length() == 4 && "null".equalsIgnoreCase(calendar))) { return null; } return createGregorianCalendar(parse(ca...
[ "public", "static", "GregorianCalendar", "parseGregorianCalendar", "(", "final", "String", "calendar", ",", "final", "String", "format", ",", "final", "TimeZone", "timeZone", ")", "{", "if", "(", "N", ".", "isNullOrEmpty", "(", "calendar", ")", "||", "(", "cal...
Converts the specified <code>calendar</code> with the specified {@code format} to a new instance of GregorianCalendar. <code>null</code> is returned if the specified <code>date</code> is null or empty. @param calendar @param format @param timeZone @return
[ "Converts", "the", "specified", "<code", ">", "calendar<", "/", "code", ">", "with", "the", "specified", "{", "@code", "format", "}", "to", "a", "new", "instance", "of", "GregorianCalendar", ".", "<code", ">", "null<", "/", "code", ">", "is", "returned", ...
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/util/DateUtil.java#L508-L514
alkacon/opencms-core
src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java
CmsContainerpageController.getNewElement
public void getNewElement(final String resourceType, final I_CmsSimpleCallback<CmsContainerElementData> callback) { """ Returns the element data for a resource type representing a new element.<p> @param resourceType the resource type name @param callback the callback to execute with the new element data ""...
java
public void getNewElement(final String resourceType, final I_CmsSimpleCallback<CmsContainerElementData> callback) { CmsRpcAction<CmsContainerElementData> action = new CmsRpcAction<CmsContainerElementData>() { @Override public void execute() { getContainerpageService()....
[ "public", "void", "getNewElement", "(", "final", "String", "resourceType", ",", "final", "I_CmsSimpleCallback", "<", "CmsContainerElementData", ">", "callback", ")", "{", "CmsRpcAction", "<", "CmsContainerElementData", ">", "action", "=", "new", "CmsRpcAction", "<", ...
Returns the element data for a resource type representing a new element.<p> @param resourceType the resource type name @param callback the callback to execute with the new element data
[ "Returns", "the", "element", "data", "for", "a", "resource", "type", "representing", "a", "new", "element", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/containerpage/client/CmsContainerpageController.java#L1738-L1763
stratosphere/stratosphere
stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/cache/FileCache.java
FileCache.createTmpFile
public FutureTask<Path> createTmpFile(String name, String filePath, JobID jobID) { """ If the file doesn't exists locally, it will copy the file to the temp directory. """ synchronized (count) { Pair<JobID, String> key = new ImmutablePair(jobID,name); if (count.containsKey(key)) { count.put(key, c...
java
public FutureTask<Path> createTmpFile(String name, String filePath, JobID jobID) { synchronized (count) { Pair<JobID, String> key = new ImmutablePair(jobID,name); if (count.containsKey(key)) { count.put(key, count.get(key) + 1); } else { count.put(key, 1); } } CopyProcess cp = new CopyProcess...
[ "public", "FutureTask", "<", "Path", ">", "createTmpFile", "(", "String", "name", ",", "String", "filePath", ",", "JobID", "jobID", ")", "{", "synchronized", "(", "count", ")", "{", "Pair", "<", "JobID", ",", "String", ">", "key", "=", "new", "ImmutableP...
If the file doesn't exists locally, it will copy the file to the temp directory.
[ "If", "the", "file", "doesn", "t", "exists", "locally", "it", "will", "copy", "the", "file", "to", "the", "temp", "directory", "." ]
train
https://github.com/stratosphere/stratosphere/blob/c543a08f9676c5b2b0a7088123bd6e795a8ae0c8/stratosphere-runtime/src/main/java/eu/stratosphere/pact/runtime/cache/FileCache.java#L56-L70
redkale/redkale
src/org/redkale/util/Utility.java
Utility.createAsyncHandler
public static <A> CompletionHandler<Void, A> createAsyncHandler(final Consumer<A> success, final BiConsumer<Throwable, A> fail) { """ 创建没有返回结果的 CompletionHandler 对象 @param <A> 附件对象的泛型 @param success 成功的回调函数 @param fail 失败的回调函数 @return CompletionHandler """ return new CompletionHandler<V...
java
public static <A> CompletionHandler<Void, A> createAsyncHandler(final Consumer<A> success, final BiConsumer<Throwable, A> fail) { return new CompletionHandler<Void, A>() { @Override public void completed(Void result, A attachment) { if (success != null) success.accept...
[ "public", "static", "<", "A", ">", "CompletionHandler", "<", "Void", ",", "A", ">", "createAsyncHandler", "(", "final", "Consumer", "<", "A", ">", "success", ",", "final", "BiConsumer", "<", "Throwable", ",", "A", ">", "fail", ")", "{", "return", "new", ...
创建没有返回结果的 CompletionHandler 对象 @param <A> 附件对象的泛型 @param success 成功的回调函数 @param fail 失败的回调函数 @return CompletionHandler
[ "创建没有返回结果的", "CompletionHandler", "对象" ]
train
https://github.com/redkale/redkale/blob/ea5169b5c5ea7412fd762331c0c497165832e901/src/org/redkale/util/Utility.java#L908-L920
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java
MultiViewOps.decomposeDiac
public static void decomposeDiac( DMatrixRMaj w , CameraPinhole intrinsic ) { """ Extracts the camera calibration matrix on the dual image of the absolute conic (DIAC). Elements which could cause problems if negative have the absolute value taken to avoid NaN. @param w (input) DIAC 3x3 @param intrinsic (outpu...
java
public static void decomposeDiac( DMatrixRMaj w , CameraPinhole intrinsic ) { decomposeDiac(w.data[0],w.data[1],w.data[2],w.data[4],w.data[5],w.data[8],intrinsic); }
[ "public", "static", "void", "decomposeDiac", "(", "DMatrixRMaj", "w", ",", "CameraPinhole", "intrinsic", ")", "{", "decomposeDiac", "(", "w", ".", "data", "[", "0", "]", ",", "w", ".", "data", "[", "1", "]", ",", "w", ".", "data", "[", "2", "]", ",...
Extracts the camera calibration matrix on the dual image of the absolute conic (DIAC). Elements which could cause problems if negative have the absolute value taken to avoid NaN. @param w (input) DIAC 3x3 @param intrinsic (output) K extracted from w
[ "Extracts", "the", "camera", "calibration", "matrix", "on", "the", "dual", "image", "of", "the", "absolute", "conic", "(", "DIAC", ")", ".", "Elements", "which", "could", "cause", "problems", "if", "negative", "have", "the", "absolute", "value", "taken", "to...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/MultiViewOps.java#L1559-L1561
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java
TasksImpl.getAsync
public Observable<CloudTask> getAsync(String jobId, String taskId, TaskGetOptions taskGetOptions) { """ Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about...
java
public Observable<CloudTask> getAsync(String jobId, String taskId, TaskGetOptions taskGetOptions) { return getWithServiceResponseAsync(jobId, taskId, taskGetOptions).map(new Func1<ServiceResponseWithHeaders<CloudTask, TaskGetHeaders>, CloudTask>() { @Override public CloudTask call(Servic...
[ "public", "Observable", "<", "CloudTask", ">", "getAsync", "(", "String", "jobId", ",", "String", "taskId", ",", "TaskGetOptions", "taskGetOptions", ")", "{", "return", "getWithServiceResponseAsync", "(", "jobId", ",", "taskId", ",", "taskGetOptions", ")", ".", ...
Gets information about the specified task. For multi-instance tasks, information such as affinityId, executionInfo and nodeInfo refer to the primary task. Use the list subtasks API to retrieve information about subtasks. @param jobId The ID of the job that contains the task. @param taskId The ID of the task to get inf...
[ "Gets", "information", "about", "the", "specified", "task", ".", "For", "multi", "-", "instance", "tasks", "information", "such", "as", "affinityId", "executionInfo", "and", "nodeInfo", "refer", "to", "the", "primary", "task", ".", "Use", "the", "list", "subta...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/protocol/implementation/TasksImpl.java#L1261-L1268
facebookarchive/hadoop-20
src/mapred/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java
MultipleOutputFormat.getInputFileBasedOutputFileName
protected String getInputFileBasedOutputFileName(JobConf job, String name) { """ Generate the outfile name based on a given anme and the input file name. If the map input file does not exists (i.e. this is not for a map only job), the given name is returned unchanged. If the config value for "num.of.trailing.le...
java
protected String getInputFileBasedOutputFileName(JobConf job, String name) { String infilepath = job.get("map.input.file"); if (infilepath == null) { // if the map input file does not exists, then return the given name return name; } int numOfTrailingLegsToUse = job.getInt("mapred.outputform...
[ "protected", "String", "getInputFileBasedOutputFileName", "(", "JobConf", "job", ",", "String", "name", ")", "{", "String", "infilepath", "=", "job", ".", "get", "(", "\"map.input.file\"", ")", ";", "if", "(", "infilepath", "==", "null", ")", "{", "// if the m...
Generate the outfile name based on a given anme and the input file name. If the map input file does not exists (i.e. this is not for a map only job), the given name is returned unchanged. If the config value for "num.of.trailing.legs.to.use" is not set, or set 0 or negative, the given name is returned unchanged. Otherw...
[ "Generate", "the", "outfile", "name", "based", "on", "a", "given", "anme", "and", "the", "input", "file", "name", ".", "If", "the", "map", "input", "file", "does", "not", "exists", "(", "i", ".", "e", ".", "this", "is", "not", "for", "a", "map", "o...
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/mapred/org/apache/hadoop/mapred/lib/MultipleOutputFormat.java#L187-L209
rundeck/rundeck
core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java
JarPluginProviderLoader.extractJarContents
private void extractJarContents(final String[] entries, final File destdir) throws IOException { """ Extract specific entries from the jar to a destination directory. Creates the destination directory if it does not exist @param entries the entries to extract @param destdir destination directory """ ...
java
private void extractJarContents(final String[] entries, final File destdir) throws IOException { if (!destdir.exists()) { if (!destdir.mkdir()) { log.warn("Unable to create cache dir for plugin: " + destdir.getAbsolutePath()); } } debug("extracting lib fi...
[ "private", "void", "extractJarContents", "(", "final", "String", "[", "]", "entries", ",", "final", "File", "destdir", ")", "throws", "IOException", "{", "if", "(", "!", "destdir", ".", "exists", "(", ")", ")", "{", "if", "(", "!", "destdir", ".", "mkd...
Extract specific entries from the jar to a destination directory. Creates the destination directory if it does not exist @param entries the entries to extract @param destdir destination directory
[ "Extract", "specific", "entries", "from", "the", "jar", "to", "a", "destination", "directory", ".", "Creates", "the", "destination", "directory", "if", "it", "does", "not", "exist" ]
train
https://github.com/rundeck/rundeck/blob/8070f774f55bffaa1118ff0c03aea319d40a9668/core/src/main/java/com/dtolabs/rundeck/core/plugins/JarPluginProviderLoader.java#L530-L543
abel533/EasyXls
src/main/java/com/github/abel533/easyxls/EasyXls.java
EasyXls.list2Xls
public static boolean list2Xls(List<?> list, String xmlPath, OutputStream outputStream) throws Exception { """ 导出list对象到excel @param list 导出的list @param xmlPath xml完整路径 @param outputStream 输出流 @return 处理结果,true成功,false失败 @throws Exception """ return XlsUtil.list2Xls(list, xmlPath, outputStr...
java
public static boolean list2Xls(List<?> list, String xmlPath, OutputStream outputStream) throws Exception { return XlsUtil.list2Xls(list, xmlPath, outputStream); }
[ "public", "static", "boolean", "list2Xls", "(", "List", "<", "?", ">", "list", ",", "String", "xmlPath", ",", "OutputStream", "outputStream", ")", "throws", "Exception", "{", "return", "XlsUtil", ".", "list2Xls", "(", "list", ",", "xmlPath", ",", "outputStre...
导出list对象到excel @param list 导出的list @param xmlPath xml完整路径 @param outputStream 输出流 @return 处理结果,true成功,false失败 @throws Exception
[ "导出list对象到excel" ]
train
https://github.com/abel533/EasyXls/blob/f73be23745c2180d7c0b8f0a510e72e61cc37d5d/src/main/java/com/github/abel533/easyxls/EasyXls.java#L109-L111
belaban/JGroups
src/org/jgroups/blocks/MessageDispatcher.java
MessageDispatcher.sendMessage
public <T> T sendMessage(Address dest, byte[] data, int offset, int length, RequestOptions opts) throws Exception { """ Sends a unicast message and - depending on the options - returns a result @param dest the target to which to send the unicast message. Must not be null. @param data the payload to send @param ...
java
public <T> T sendMessage(Address dest, byte[] data, int offset, int length, RequestOptions opts) throws Exception { return sendMessage(dest, new Buffer(data, offset, length), opts); }
[ "public", "<", "T", ">", "T", "sendMessage", "(", "Address", "dest", ",", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "length", ",", "RequestOptions", "opts", ")", "throws", "Exception", "{", "return", "sendMessage", "(", "dest", ",", "...
Sends a unicast message and - depending on the options - returns a result @param dest the target to which to send the unicast message. Must not be null. @param data the payload to send @param offset the offset at which the data starts @param length the number of bytes to send @param opts the options to be used @return ...
[ "Sends", "a", "unicast", "message", "and", "-", "depending", "on", "the", "options", "-", "returns", "a", "result" ]
train
https://github.com/belaban/JGroups/blob/bd3ca786aa57fed41dfbc10a94b1281e388be03b/src/org/jgroups/blocks/MessageDispatcher.java#L344-L346
apache/flink
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java
SqlDateTimeUtils.dateToInternal
public static int dateToInternal(java.sql.Date date, TimeZone tz) { """ Converts the Java type used for UDF parameters of SQL DATE type ({@link java.sql.Date}) to internal representation (int). <p>Converse of {@link #internalToDate(int)}. """ long ts = date.getTime() + tz.getOffset(date.getTime()); ret...
java
public static int dateToInternal(java.sql.Date date, TimeZone tz) { long ts = date.getTime() + tz.getOffset(date.getTime()); return (int) (ts / MILLIS_PER_DAY); }
[ "public", "static", "int", "dateToInternal", "(", "java", ".", "sql", ".", "Date", "date", ",", "TimeZone", "tz", ")", "{", "long", "ts", "=", "date", ".", "getTime", "(", ")", "+", "tz", ".", "getOffset", "(", "date", ".", "getTime", "(", ")", ")"...
Converts the Java type used for UDF parameters of SQL DATE type ({@link java.sql.Date}) to internal representation (int). <p>Converse of {@link #internalToDate(int)}.
[ "Converts", "the", "Java", "type", "used", "for", "UDF", "parameters", "of", "SQL", "DATE", "type", "(", "{", "@link", "java", ".", "sql", ".", "Date", "}", ")", "to", "internal", "representation", "(", "int", ")", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlDateTimeUtils.java#L180-L183
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.billboardSpherical
public Matrix4f billboardSpherical(Vector3fc objPos, Vector3fc targetPos) { """ Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position <code>objPos</code> towards a target position at <code>targetPos</code> using a shortest arc rotation by not preser...
java
public Matrix4f billboardSpherical(Vector3fc objPos, Vector3fc targetPos) { float toDirX = targetPos.x() - objPos.x(); float toDirY = targetPos.y() - objPos.y(); float toDirZ = targetPos.z() - objPos.z(); float x = -toDirY; float y = toDirX; float w = (float) Math.sqrt(to...
[ "public", "Matrix4f", "billboardSpherical", "(", "Vector3fc", "objPos", ",", "Vector3fc", "targetPos", ")", "{", "float", "toDirX", "=", "targetPos", ".", "x", "(", ")", "-", "objPos", ".", "x", "(", ")", ";", "float", "toDirY", "=", "targetPos", ".", "y...
Set this matrix to a spherical billboard transformation that rotates the local +Z axis of a given object with position <code>objPos</code> towards a target position at <code>targetPos</code> using a shortest arc rotation by not preserving any <i>up</i> vector of the object. <p> This method can be used to create the com...
[ "Set", "this", "matrix", "to", "a", "spherical", "billboard", "transformation", "that", "rotates", "the", "local", "+", "Z", "axis", "of", "a", "given", "object", "with", "position", "<code", ">", "objPos<", "/", "code", ">", "towards", "a", "target", "pos...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L13402-L13436
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java
FaceListsImpl.addFaceFromStreamAsync
public Observable<PersistedFace> addFaceFromStreamAsync(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter) { """ Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added f...
java
public Observable<PersistedFace> addFaceFromStreamAsync(String faceListId, byte[] image, AddFaceFromStreamOptionalParameter addFaceFromStreamOptionalParameter) { return addFaceFromStreamWithServiceResponseAsync(faceListId, image, addFaceFromStreamOptionalParameter).map(new Func1<ServiceResponse<PersistedFace>, ...
[ "public", "Observable", "<", "PersistedFace", ">", "addFaceFromStreamAsync", "(", "String", "faceListId", ",", "byte", "[", "]", "image", ",", "AddFaceFromStreamOptionalParameter", "addFaceFromStreamOptionalParameter", ")", "{", "return", "addFaceFromStreamWithServiceResponse...
Add a face to a face list. The input face is specified as an image with a targetFace rectangle. It returns a persistedFaceId representing the added face, and persistedFaceId will not expire. @param faceListId Id referencing a particular face list. @param image An image stream. @param addFaceFromStreamOptionalParameter...
[ "Add", "a", "face", "to", "a", "face", "list", ".", "The", "input", "face", "is", "specified", "as", "an", "image", "with", "a", "targetFace", "rectangle", ".", "It", "returns", "a", "persistedFaceId", "representing", "the", "added", "face", "and", "persis...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/implementation/FaceListsImpl.java#L960-L967
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDate.java
LocalDate.withMonth
public LocalDate withMonth(int month) { """ Returns a copy of this {@code LocalDate} with the month-of-year altered. <p> If the day-of-month is invalid for the year, it will be changed to the last valid day of the month. <p> This instance is immutable and unaffected by this method call. @param month the mo...
java
public LocalDate withMonth(int month) { if (this.month == month) { return this; } MONTH_OF_YEAR.checkValidValue(month); return resolvePreviousValid(year, month, day); }
[ "public", "LocalDate", "withMonth", "(", "int", "month", ")", "{", "if", "(", "this", ".", "month", "==", "month", ")", "{", "return", "this", ";", "}", "MONTH_OF_YEAR", ".", "checkValidValue", "(", "month", ")", ";", "return", "resolvePreviousValid", "(",...
Returns a copy of this {@code LocalDate} with the month-of-year altered. <p> If the day-of-month is invalid for the year, it will be changed to the last valid day of the month. <p> This instance is immutable and unaffected by this method call. @param month the month-of-year to set in the result, from 1 (January) to 1...
[ "Returns", "a", "copy", "of", "this", "{", "@code", "LocalDate", "}", "with", "the", "month", "-", "of", "-", "year", "altered", ".", "<p", ">", "If", "the", "day", "-", "of", "-", "month", "is", "invalid", "for", "the", "year", "it", "will", "be",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/LocalDate.java#L1069-L1075
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/Assert.java
Assert.notEmpty
public static void notEmpty(Map<?, ?> map, Supplier<String> message) { """ Asserts that the {@link Map} is not empty. The assertion holds if and only if the {@link Map} is not {@literal null} and contains at least 1 key/value mapping. @param map {@link Map} to evaluate. @param message {@link Supplier} cont...
java
public static void notEmpty(Map<?, ?> map, Supplier<String> message) { if (isEmpty(map)) { throw new IllegalArgumentException(message.get()); } }
[ "public", "static", "void", "notEmpty", "(", "Map", "<", "?", ",", "?", ">", "map", ",", "Supplier", "<", "String", ">", "message", ")", "{", "if", "(", "isEmpty", "(", "map", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ...
Asserts that the {@link Map} is not empty. The assertion holds if and only if the {@link Map} is not {@literal null} and contains at least 1 key/value mapping. @param map {@link Map} to evaluate. @param message {@link Supplier} containing the message using in the {@link IllegalArgumentException} thrown if the asserti...
[ "Asserts", "that", "the", "{", "@link", "Map", "}", "is", "not", "empty", "." ]
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/Assert.java#L1129-L1133
nohana/Amalgam
amalgam/src/main/java/com/amalgam/app/FragmentManagerUtils.java
FragmentManagerUtils.supportFindFragmentById
@SuppressWarnings("unchecked") // we know that the returning fragment is child of fragment. public static <F extends android.support.v4.app.Fragment> F supportFindFragmentById(android.support.v4.app.FragmentManager manager, int id) { """ Find a fragment that is under {@link android.support.v4.app.FragmentManag...
java
@SuppressWarnings("unchecked") // we know that the returning fragment is child of fragment. public static <F extends android.support.v4.app.Fragment> F supportFindFragmentById(android.support.v4.app.FragmentManager manager, int id) { return (F) manager.findFragmentById(id); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// we know that the returning fragment is child of fragment.", "public", "static", "<", "F", "extends", "android", ".", "support", ".", "v4", ".", "app", ".", "Fragment", ">", "F", "supportFindFragmentById", "(", "a...
Find a fragment that is under {@link android.support.v4.app.FragmentManager}'s control by the id. @param manager the fragment manager. @param id the fragment id. @param <F> the concrete fragment class parameter. @return the fragment.
[ "Find", "a", "fragment", "that", "is", "under", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/app/FragmentManagerUtils.java#L36-L39
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java
TransformerIdentityImpl.notationDecl
public void notationDecl(String name, String publicId, String systemId) throws SAXException { """ Receive notification of a notation declaration. <p>By default, do nothing. Application writers may override this method in a subclass if they wish to keep track of the notations declared in a document....
java
public void notationDecl(String name, String publicId, String systemId) throws SAXException { if (null != m_resultDTDHandler) m_resultDTDHandler.notationDecl(name, publicId, systemId); }
[ "public", "void", "notationDecl", "(", "String", "name", ",", "String", "publicId", ",", "String", "systemId", ")", "throws", "SAXException", "{", "if", "(", "null", "!=", "m_resultDTDHandler", ")", "m_resultDTDHandler", ".", "notationDecl", "(", "name", ",", ...
Receive notification of a notation declaration. <p>By default, do nothing. Application writers may override this method in a subclass if they wish to keep track of the notations declared in a document.</p> @param name The notation name. @param publicId The notation public identifier, or null if not available. @param...
[ "Receive", "notification", "of", "a", "notation", "declaration", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java#L826-L831
alkacon/opencms-core
src/org/opencms/staticexport/CmsLinkManager.java
CmsLinkManager.getAbsoluteUri
public static String getAbsoluteUri(String relativeUri, String baseUri) { """ Calculates the absolute URI for the "relativeUri" with the given absolute "baseUri" as start. <p> If "relativeUri" is already absolute, it is returned unchanged. This method also returns "relativeUri" unchanged if it is not well-form...
java
public static String getAbsoluteUri(String relativeUri, String baseUri) { if (isAbsoluteUri(relativeUri)) { // URI is null or already absolute return relativeUri; } try { URL url = new URL(new URL(m_baseUrl, baseUri), relativeUri); StringBuffer re...
[ "public", "static", "String", "getAbsoluteUri", "(", "String", "relativeUri", ",", "String", "baseUri", ")", "{", "if", "(", "isAbsoluteUri", "(", "relativeUri", ")", ")", "{", "// URI is null or already absolute", "return", "relativeUri", ";", "}", "try", "{", ...
Calculates the absolute URI for the "relativeUri" with the given absolute "baseUri" as start. <p> If "relativeUri" is already absolute, it is returned unchanged. This method also returns "relativeUri" unchanged if it is not well-formed.<p> @param relativeUri the relative URI to calculate an absolute URI for @param ba...
[ "Calculates", "the", "absolute", "URI", "for", "the", "relativeUri", "with", "the", "given", "absolute", "baseUri", "as", "start", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/staticexport/CmsLinkManager.java#L115-L138
steveohara/j2mod
src/main/java/com/ghgande/j2mod/modbus/io/ModbusSerialTransport.java
ModbusSerialTransport.writeBytes
final int writeBytes(byte[] buffer, long bytesToWrite) throws IOException { """ Writes the bytes to the output stream @param buffer Buffer to write @param bytesToWrite Number of bytes to write @return Number of bytes written @throws java.io.IOException if writing to invalid port """ if (c...
java
final int writeBytes(byte[] buffer, long bytesToWrite) throws IOException { if (commPort != null && commPort.isOpen()) { return commPort.writeBytes(buffer, bytesToWrite); } else { throw new IOException("Comm port is not valid or not open"); } }
[ "final", "int", "writeBytes", "(", "byte", "[", "]", "buffer", ",", "long", "bytesToWrite", ")", "throws", "IOException", "{", "if", "(", "commPort", "!=", "null", "&&", "commPort", ".", "isOpen", "(", ")", ")", "{", "return", "commPort", ".", "writeByte...
Writes the bytes to the output stream @param buffer Buffer to write @param bytesToWrite Number of bytes to write @return Number of bytes written @throws java.io.IOException if writing to invalid port
[ "Writes", "the", "bytes", "to", "the", "output", "stream" ]
train
https://github.com/steveohara/j2mod/blob/67162c55d7c02564e50211a9df06b8314953b5f2/src/main/java/com/ghgande/j2mod/modbus/io/ModbusSerialTransport.java#L439-L446
box/box-java-sdk
src/main/java/com/box/sdk/BoxConfig.java
BoxConfig.readFrom
public static BoxConfig readFrom(Reader reader) throws IOException { """ Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format. @param reader a reader object which points to a JSON formatted configuration file @return a new Instance of BoxConfig @throws IOException whe...
java
public static BoxConfig readFrom(Reader reader) throws IOException { JsonObject config = JsonObject.readFrom(reader); JsonObject settings = (JsonObject) config.get("boxAppSettings"); String clientId = settings.get("clientID").asString(); String clientSecret = settings.get("clientSecret")...
[ "public", "static", "BoxConfig", "readFrom", "(", "Reader", "reader", ")", "throws", "IOException", "{", "JsonObject", "config", "=", "JsonObject", ".", "readFrom", "(", "reader", ")", ";", "JsonObject", "settings", "=", "(", "JsonObject", ")", "config", ".", ...
Reads OAuth 2.0 with JWT app configurations from the reader. The file should be in JSON format. @param reader a reader object which points to a JSON formatted configuration file @return a new Instance of BoxConfig @throws IOException when unable to access the mapping file's content of the reader
[ "Reads", "OAuth", "2", ".", "0", "with", "JWT", "app", "configurations", "from", "the", "reader", ".", "The", "file", "should", "be", "in", "JSON", "format", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxConfig.java#L98-L109
apache/incubator-shardingsphere
sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/packet/command/MySQLCommandPacketFactory.java
MySQLCommandPacketFactory.newInstance
public static MySQLCommandPacket newInstance(final MySQLCommandPacketType commandPacketType, final MySQLPacketPayload payload) throws SQLException { """ Create new instance of command packet. @param commandPacketType command packet type for MySQL @param payload packet payload for MySQL @return command packet ...
java
public static MySQLCommandPacket newInstance(final MySQLCommandPacketType commandPacketType, final MySQLPacketPayload payload) throws SQLException { switch (commandPacketType) { case COM_QUIT: return new MySQLComQuitPacket(); case COM_INIT_DB: return new M...
[ "public", "static", "MySQLCommandPacket", "newInstance", "(", "final", "MySQLCommandPacketType", "commandPacketType", ",", "final", "MySQLPacketPayload", "payload", ")", "throws", "SQLException", "{", "switch", "(", "commandPacketType", ")", "{", "case", "COM_QUIT", ":"...
Create new instance of command packet. @param commandPacketType command packet type for MySQL @param payload packet payload for MySQL @return command packet for MySQL @throws SQLException SQL exception
[ "Create", "new", "instance", "of", "command", "packet", "." ]
train
https://github.com/apache/incubator-shardingsphere/blob/f88fd29fc345dfb31fdce12e9e96cbfa0fd2402d/sharding-proxy/sharding-proxy-transport/sharding-proxy-transport-mysql/src/main/java/org/apache/shardingsphere/shardingproxy/transport/mysql/packet/command/MySQLCommandPacketFactory.java#L53-L74
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optCharSequence
@Nullable public static CharSequence optCharSequence(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional {@link CharSequence} value. In other words, returns the value mapped by key if it exists and is a {@link CharSequence}. The bundle argument is allowed to be {@code null}. If the bundle ...
java
@Nullable public static CharSequence optCharSequence(@Nullable Bundle bundle, @Nullable String key) { return optCharSequence(bundle, key, null); }
[ "@", "Nullable", "public", "static", "CharSequence", "optCharSequence", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optCharSequence", "(", "bundle", ",", "key", ",", "null", ")", ";", "}" ]
Returns a optional {@link CharSequence} value. In other words, returns the value mapped by key if it exists and is a {@link CharSequence}. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will return null. @par...
[ "Returns", "a", "optional", "{" ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L329-L332
spring-projects/spring-android
spring-android-core/src/main/java/org/springframework/util/ReflectionUtils.java
ReflectionUtils.doWithMethods
public static void doWithMethods(Class<?> clazz, MethodCallback mc) throws IllegalArgumentException { """ Perform the given callback operation on all matching methods of the given class and superclasses. <p>The same named method occurring on subclass and superclass will appear twice, unless excluded by a {@link...
java
public static void doWithMethods(Class<?> clazz, MethodCallback mc) throws IllegalArgumentException { doWithMethods(clazz, mc, null); }
[ "public", "static", "void", "doWithMethods", "(", "Class", "<", "?", ">", "clazz", ",", "MethodCallback", "mc", ")", "throws", "IllegalArgumentException", "{", "doWithMethods", "(", "clazz", ",", "mc", ",", "null", ")", ";", "}" ]
Perform the given callback operation on all matching methods of the given class and superclasses. <p>The same named method occurring on subclass and superclass will appear twice, unless excluded by a {@link MethodFilter}. @param clazz class to start looking at @param mc the callback to invoke for each method @see #doWi...
[ "Perform", "the", "given", "callback", "operation", "on", "all", "matching", "methods", "of", "the", "given", "class", "and", "superclasses", ".", "<p", ">", "The", "same", "named", "method", "occurring", "on", "subclass", "and", "superclass", "will", "appear"...
train
https://github.com/spring-projects/spring-android/blob/941296e152d49a40e0745a3e81628a974f72b7e4/spring-android-core/src/main/java/org/springframework/util/ReflectionUtils.java#L448-L450
alkacon/opencms-core
src/org/opencms/relations/CmsCategoryService.java
CmsCategoryService.readResourceCategories
public List<CmsCategory> readResourceCategories(CmsObject cms, CmsResource resource) throws CmsException { """ Reads the categories for a resource.<p> @param cms the current cms context @param resource the resource to get the categories for @return the categories list @throws CmsException if something go...
java
public List<CmsCategory> readResourceCategories(CmsObject cms, CmsResource resource) throws CmsException { return internalReadResourceCategories(cms, resource, false); }
[ "public", "List", "<", "CmsCategory", ">", "readResourceCategories", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "throws", "CmsException", "{", "return", "internalReadResourceCategories", "(", "cms", ",", "resource", ",", "false", ")", ";", "}" ]
Reads the categories for a resource.<p> @param cms the current cms context @param resource the resource to get the categories for @return the categories list @throws CmsException if something goes wrong
[ "Reads", "the", "categories", "for", "a", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/relations/CmsCategoryService.java#L649-L652
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java
TaggedArgumentParser.getDisplayString
public static String getDisplayString(final String longArgName, final TaggedArgument taggedArg) { """ Given a TaggedArgument implementation and a long argument name, return a string representation of argument, including the tag and attributes, for display purposes. @param taggedArg implementation of TaggedArgu...
java
public static String getDisplayString(final String longArgName, final TaggedArgument taggedArg) { Utils.nonNull(longArgName); Utils.nonNull(taggedArg); StringBuilder sb = new StringBuilder(); sb.append(longArgName); if (taggedArg.getTag() != null) { sb.append(ARGUMEN...
[ "public", "static", "String", "getDisplayString", "(", "final", "String", "longArgName", ",", "final", "TaggedArgument", "taggedArg", ")", "{", "Utils", ".", "nonNull", "(", "longArgName", ")", ";", "Utils", ".", "nonNull", "(", "taggedArg", ")", ";", "StringB...
Given a TaggedArgument implementation and a long argument name, return a string representation of argument, including the tag and attributes, for display purposes. @param taggedArg implementation of TaggedArgument interface @return a display string representing the tag name and attributes. May be empty if no tag name/...
[ "Given", "a", "TaggedArgument", "implementation", "and", "a", "long", "argument", "name", "return", "a", "string", "representation", "of", "argument", "including", "the", "tag", "and", "attributes", "for", "display", "purposes", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/TaggedArgumentParser.java#L249-L272
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetFiltersInner.java
AssetFiltersInner.listAsync
public Observable<Page<AssetFilterInner>> listAsync(final String resourceGroupName, final String accountName, final String assetName) { """ List Asset Filters. List Asset Filters associated with the specified Asset. @param resourceGroupName The name of the resource group within the Azure subscription. @param ...
java
public Observable<Page<AssetFilterInner>> listAsync(final String resourceGroupName, final String accountName, final String assetName) { return listWithServiceResponseAsync(resourceGroupName, accountName, assetName) .map(new Func1<ServiceResponse<Page<AssetFilterInner>>, Page<AssetFilterInner>>() { ...
[ "public", "Observable", "<", "Page", "<", "AssetFilterInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "accountName", ",", "final", "String", "assetName", ")", "{", "return", "listWithServiceResponseAsync", "(", "...
List Asset Filters. List Asset Filters associated with the specified Asset. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param assetName The Asset name. @throws IllegalArgumentException thrown if parameters fail the validati...
[ "List", "Asset", "Filters", ".", "List", "Asset", "Filters", "associated", "with", "the", "specified", "Asset", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/AssetFiltersInner.java#L146-L154
amaembo/streamex
src/main/java/one/util/streamex/IntStreamEx.java
IntStreamEx.foldLeft
public int foldLeft(int seed, IntBinaryOperator accumulator) { """ Folds the elements of this stream using the provided seed object and accumulation function, going left to right. This is equivalent to: <pre> {@code int result = seed; for (int element : this stream) result = accumulator.apply(result, eleme...
java
public int foldLeft(int seed, IntBinaryOperator accumulator) { int[] box = new int[] { seed }; forEachOrdered(t -> box[0] = accumulator.applyAsInt(box[0], t)); return box[0]; }
[ "public", "int", "foldLeft", "(", "int", "seed", ",", "IntBinaryOperator", "accumulator", ")", "{", "int", "[", "]", "box", "=", "new", "int", "[", "]", "{", "seed", "}", ";", "forEachOrdered", "(", "t", "->", "box", "[", "0", "]", "=", "accumulator"...
Folds the elements of this stream using the provided seed object and accumulation function, going left to right. This is equivalent to: <pre> {@code int result = seed; for (int element : this stream) result = accumulator.apply(result, element) return result; } </pre> <p> This is a terminal operation. <p> This method...
[ "Folds", "the", "elements", "of", "this", "stream", "using", "the", "provided", "seed", "object", "and", "accumulation", "function", "going", "left", "to", "right", ".", "This", "is", "equivalent", "to", ":" ]
train
https://github.com/amaembo/streamex/blob/936bbd1b7dfbcf64a3b990682bfc848213441d14/src/main/java/one/util/streamex/IntStreamEx.java#L826-L830
thorntail/thorntail
fractions/topology-webapp/src/main/java/org/wildfly/swarm/topology/webapp/TopologyWebAppFraction.java
TopologyWebAppFraction.proxyService
public void proxyService(String serviceName, String contextPath) { """ Set up a load-balancing reverse proxy for the given service at the given context path. Requests to this proxy will be load-balanced among all instances of the service, as provided by our Topology. @param serviceName the name of the service...
java
public void proxyService(String serviceName, String contextPath) { if (proxiedServiceMappings().containsValue(contextPath)) { throw new IllegalArgumentException("Cannot proxy multiple services under the same context path"); } proxiedServiceMappings.put(serviceName, contextPath); ...
[ "public", "void", "proxyService", "(", "String", "serviceName", ",", "String", "contextPath", ")", "{", "if", "(", "proxiedServiceMappings", "(", ")", ".", "containsValue", "(", "contextPath", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Ca...
Set up a load-balancing reverse proxy for the given service at the given context path. Requests to this proxy will be load-balanced among all instances of the service, as provided by our Topology. @param serviceName the name of the service to proxy @param contextPath the context path expose the proxy under
[ "Set", "up", "a", "load", "-", "balancing", "reverse", "proxy", "for", "the", "given", "service", "at", "the", "given", "context", "path", ".", "Requests", "to", "this", "proxy", "will", "be", "load", "-", "balanced", "among", "all", "instances", "of", "...
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/fractions/topology-webapp/src/main/java/org/wildfly/swarm/topology/webapp/TopologyWebAppFraction.java#L55-L60
dashorst/wicket-stuff-markup-validator
isorelax/src/main/java/org/iso_relax/verifier/VerifierFactory.java
VerifierFactory.compileSchema
public Schema compileSchema( InputStream stream, String systemId ) throws VerifierConfigurationException, SAXException, IOException { """ processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads...
java
public Schema compileSchema( InputStream stream, String systemId ) throws VerifierConfigurationException, SAXException, IOException { InputSource is = new InputSource(stream); is.setSystemId(systemId); return compileSchema(is); }
[ "public", "Schema", "compileSchema", "(", "InputStream", "stream", ",", "String", "systemId", ")", "throws", "VerifierConfigurationException", ",", "SAXException", ",", "IOException", "{", "InputSource", "is", "=", "new", "InputSource", "(", "stream", ")", ";", "i...
processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads. @param systemId The system Id of this input stream.
[ "processes", "a", "schema", "into", "a", "Schema", "object", "which", "is", "a", "compiled", "representation", "of", "a", "schema", "." ]
train
https://github.com/dashorst/wicket-stuff-markup-validator/blob/9e529a4dc8bfdbbe4c794f3132ef400a006560a1/isorelax/src/main/java/org/iso_relax/verifier/VerifierFactory.java#L152-L158
micronaut-projects/micronaut-core
jdbc/src/main/java/io/micronaut/jdbc/CalculatedSettings.java
CalculatedSettings.getUrl
public String getUrl() { """ Determines the URL based on the configured value. If the URL is not configured, search for an embedded database driver on the classpath and retrieve a default URL for it. @return The calculated URL """ final String url = basicJdbcConfiguration.getConfiguredUrl(); ...
java
public String getUrl() { final String url = basicJdbcConfiguration.getConfiguredUrl(); if (calculatedUrl == null || StringUtils.hasText(url)) { calculatedUrl = url; if (!StringUtils.hasText(calculatedUrl) && embeddedDatabaseConnection.isPresent()) { calculatedUrl ...
[ "public", "String", "getUrl", "(", ")", "{", "final", "String", "url", "=", "basicJdbcConfiguration", ".", "getConfiguredUrl", "(", ")", ";", "if", "(", "calculatedUrl", "==", "null", "||", "StringUtils", ".", "hasText", "(", "url", ")", ")", "{", "calcula...
Determines the URL based on the configured value. If the URL is not configured, search for an embedded database driver on the classpath and retrieve a default URL for it. @return The calculated URL
[ "Determines", "the", "URL", "based", "on", "the", "configured", "value", ".", "If", "the", "URL", "is", "not", "configured", "search", "for", "an", "embedded", "database", "driver", "on", "the", "classpath", "and", "retrieve", "a", "default", "URL", "for", ...
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/jdbc/src/main/java/io/micronaut/jdbc/CalculatedSettings.java#L101-L114
RestComm/jdiameter
core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java
IPConverter.InetAddressByIPv6
public static InetAddress InetAddressByIPv6(String address) { """ Convert defined string to IPv6 object instance @param address string representation of ip address @return IPv6 object instance """ StringTokenizer addressTokens = new StringTokenizer(address, ":"); byte[] bytes = new byte[16]; i...
java
public static InetAddress InetAddressByIPv6(String address) { StringTokenizer addressTokens = new StringTokenizer(address, ":"); byte[] bytes = new byte[16]; if (addressTokens.countTokens() == 8) { int count = 0; while (addressTokens.hasMoreTokens()) { int word = Integer.parseInt(a...
[ "public", "static", "InetAddress", "InetAddressByIPv6", "(", "String", "address", ")", "{", "StringTokenizer", "addressTokens", "=", "new", "StringTokenizer", "(", "address", ",", "\":\"", ")", ";", "byte", "[", "]", "bytes", "=", "new", "byte", "[", "16", "...
Convert defined string to IPv6 object instance @param address string representation of ip address @return IPv6 object instance
[ "Convert", "defined", "string", "to", "IPv6", "object", "instance" ]
train
https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/helpers/IPConverter.java#L95-L115
PeterisP/LVTagger
src/main/java/edu/stanford/nlp/util/StringUtils.java
StringUtils.trim
public static String trim(String s, int maxWidth) { """ Returns s if it's at most maxWidth chars, otherwise chops right side to fit. """ if (s.length() <= maxWidth) { return (s); } return (s.substring(0, maxWidth)); }
java
public static String trim(String s, int maxWidth) { if (s.length() <= maxWidth) { return (s); } return (s.substring(0, maxWidth)); }
[ "public", "static", "String", "trim", "(", "String", "s", ",", "int", "maxWidth", ")", "{", "if", "(", "s", ".", "length", "(", ")", "<=", "maxWidth", ")", "{", "return", "(", "s", ")", ";", "}", "return", "(", "s", ".", "substring", "(", "0", ...
Returns s if it's at most maxWidth chars, otherwise chops right side to fit.
[ "Returns", "s", "if", "it", "s", "at", "most", "maxWidth", "chars", "otherwise", "chops", "right", "side", "to", "fit", "." ]
train
https://github.com/PeterisP/LVTagger/blob/b3d44bab9ec07ace0d13612c448a6b7298c1f681/src/main/java/edu/stanford/nlp/util/StringUtils.java#L518-L523
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/BaseField.java
BaseField.removeListener
public void removeListener(BaseListener listener, boolean bFreeListener) { """ Remove this listener from the chain. @param listener The listener to remove. @param bFreeListener If true, the listener is also freed. """ if (m_listener != null) { if (m_listener == listener) ...
java
public void removeListener(BaseListener listener, boolean bFreeListener) { if (m_listener != null) { if (m_listener == listener) { m_listener = (FieldListener)listener.getNextListener(); listener.unlink(bFreeListener); // remove theBehavior...
[ "public", "void", "removeListener", "(", "BaseListener", "listener", ",", "boolean", "bFreeListener", ")", "{", "if", "(", "m_listener", "!=", "null", ")", "{", "if", "(", "m_listener", "==", "listener", ")", "{", "m_listener", "=", "(", "FieldListener", ")"...
Remove this listener from the chain. @param listener The listener to remove. @param bFreeListener If true, the listener is also freed.
[ "Remove", "this", "listener", "from", "the", "chain", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseField.java#L293-L305
netty/netty
common/src/main/java/io/netty/util/internal/MathUtil.java
MathUtil.isOutOfBounds
public static boolean isOutOfBounds(int index, int length, int capacity) { """ Determine if the requested {@code index} and {@code length} will fit within {@code capacity}. @param index The starting index. @param length The length which will be utilized (starting from {@code index}). @param capacity The capacit...
java
public static boolean isOutOfBounds(int index, int length, int capacity) { return (index | length | (index + length) | (capacity - (index + length))) < 0; }
[ "public", "static", "boolean", "isOutOfBounds", "(", "int", "index", ",", "int", "length", ",", "int", "capacity", ")", "{", "return", "(", "index", "|", "length", "|", "(", "index", "+", "length", ")", "|", "(", "capacity", "-", "(", "index", "+", "...
Determine if the requested {@code index} and {@code length} will fit within {@code capacity}. @param index The starting index. @param length The length which will be utilized (starting from {@code index}). @param capacity The capacity that {@code index + length} is allowed to be within. @return {@code true} if the requ...
[ "Determine", "if", "the", "requested", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/common/src/main/java/io/netty/util/internal/MathUtil.java#L63-L65
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/DrizzleResultSet.java
DrizzleResultSet.getTime
public Time getTime(final String columnLabel, final Calendar cal) throws SQLException { """ Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>java.sql.Time</code> object in the Java programming language. This method uses the given calendar to constru...
java
public Time getTime(final String columnLabel, final Calendar cal) throws SQLException { return getValueObject(columnLabel).getTime(cal); }
[ "public", "Time", "getTime", "(", "final", "String", "columnLabel", ",", "final", "Calendar", "cal", ")", "throws", "SQLException", "{", "return", "getValueObject", "(", "columnLabel", ")", ".", "getTime", "(", "cal", ")", ";", "}" ]
Retrieves the value of the designated column in the current row of this <code>ResultSet</code> object as a <code>java.sql.Time</code> object in the Java programming language. This method uses the given calendar to construct an appropriate millisecond value for the time if the underlying database does not store timezone...
[ "Retrieves", "the", "value", "of", "the", "designated", "column", "in", "the", "current", "row", "of", "this", "<code", ">", "ResultSet<", "/", "code", ">", "object", "as", "a", "<code", ">", "java", ".", "sql", ".", "Time<", "/", "code", ">", "object"...
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/DrizzleResultSet.java#L2142-L2144
morfologik/morfologik-stemming
morfologik-fsa/src/main/java/morfologik/fsa/FSA.java
FSA.getSequences
public Iterable<ByteBuffer> getSequences(final int node) { """ Returns an iterator over all binary sequences starting at the given FSA state (node) and ending in final nodes. This corresponds to a set of suffixes of a given prefix from all sequences stored in the automaton. <p> The returned iterator is a {@l...
java
public Iterable<ByteBuffer> getSequences(final int node) { if (node == 0) { return Collections.<ByteBuffer> emptyList(); } return new Iterable<ByteBuffer>() { public Iterator<ByteBuffer> iterator() { return new ByteSequenceIterator(FSA.this, node); } }; }
[ "public", "Iterable", "<", "ByteBuffer", ">", "getSequences", "(", "final", "int", "node", ")", "{", "if", "(", "node", "==", "0", ")", "{", "return", "Collections", ".", "<", "ByteBuffer", ">", "emptyList", "(", ")", ";", "}", "return", "new", "Iterab...
Returns an iterator over all binary sequences starting at the given FSA state (node) and ending in final nodes. This corresponds to a set of suffixes of a given prefix from all sequences stored in the automaton. <p> The returned iterator is a {@link ByteBuffer} whose contents changes on each call to {@link Iterator#ne...
[ "Returns", "an", "iterator", "over", "all", "binary", "sequences", "starting", "at", "the", "given", "FSA", "state", "(", "node", ")", "and", "ending", "in", "final", "nodes", ".", "This", "corresponds", "to", "a", "set", "of", "suffixes", "of", "a", "gi...
train
https://github.com/morfologik/morfologik-stemming/blob/9d9099cc5ec4155a0eb8dfecdc23d01cbd734f6e/morfologik-fsa/src/main/java/morfologik/fsa/FSA.java#L145-L155
opentelecoms-org/zrtp-java
src/zorg/ZRTP.java
ZRTP.handleIncomingMessage
public void handleIncomingMessage(byte[] data, int offset, int len) { """ Handle an incoming ZRTP message. Assumes RTP headers and trailing CRC have been stripped by caller @param aMsg byte array containing the ZRTP message """ synchronized(messageQueue) { messageQueue.add(new IncomingMessage(data, o...
java
public void handleIncomingMessage(byte[] data, int offset, int len) { synchronized(messageQueue) { messageQueue.add(new IncomingMessage(data, offset, len)); } synchronized(lock) { lock.notifyAll(); } }
[ "public", "void", "handleIncomingMessage", "(", "byte", "[", "]", "data", ",", "int", "offset", ",", "int", "len", ")", "{", "synchronized", "(", "messageQueue", ")", "{", "messageQueue", ".", "add", "(", "new", "IncomingMessage", "(", "data", ",", "offset...
Handle an incoming ZRTP message. Assumes RTP headers and trailing CRC have been stripped by caller @param aMsg byte array containing the ZRTP message
[ "Handle", "an", "incoming", "ZRTP", "message", ".", "Assumes", "RTP", "headers", "and", "trailing", "CRC", "have", "been", "stripped", "by", "caller" ]
train
https://github.com/opentelecoms-org/zrtp-java/blob/10a0c77866c5d1b1504df161db9a447f5069ed54/src/zorg/ZRTP.java#L1902-L1909
classgraph/classgraph
src/main/java/io/github/classgraph/ClassInfoList.java
ClassInfoList.loadClasses
public <T> List<Class<T>> loadClasses(final Class<T> superclassOrInterfaceType) { """ Convert this list of {@link ClassInfo} objects to a list of {@code Class<?>} objects, casting each item in the list to the requested superclass or interface type. Causes the classloader to load the class named by each {@link Cl...
java
public <T> List<Class<T>> loadClasses(final Class<T> superclassOrInterfaceType) { return loadClasses(superclassOrInterfaceType, /* ignoreExceptions = */ false); }
[ "public", "<", "T", ">", "List", "<", "Class", "<", "T", ">", ">", "loadClasses", "(", "final", "Class", "<", "T", ">", "superclassOrInterfaceType", ")", "{", "return", "loadClasses", "(", "superclassOrInterfaceType", ",", "/* ignoreExceptions = */", "false", ...
Convert this list of {@link ClassInfo} objects to a list of {@code Class<?>} objects, casting each item in the list to the requested superclass or interface type. Causes the classloader to load the class named by each {@link ClassInfo} object, if it is not already loaded. <p> <b>Important note:</b> since {@code superc...
[ "Convert", "this", "list", "of", "{", "@link", "ClassInfo", "}", "objects", "to", "a", "list", "of", "{", "@code", "Class<?", ">", "}", "objects", "casting", "each", "item", "in", "the", "list", "to", "the", "requested", "superclass", "or", "interface", ...
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfoList.java#L240-L242
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java
JobOperations.terminateJob
public void terminateJob(String jobId, String terminateReason) throws BatchErrorException, IOException { """ Terminates the specified job, marking it as completed. @param jobId The ID of the job. @param terminateReason The message to describe the reason the job has terminated. This text will appear when you ca...
java
public void terminateJob(String jobId, String terminateReason) throws BatchErrorException, IOException { terminateJob(jobId, terminateReason, null); }
[ "public", "void", "terminateJob", "(", "String", "jobId", ",", "String", "terminateReason", ")", "throws", "BatchErrorException", ",", "IOException", "{", "terminateJob", "(", "jobId", ",", "terminateReason", ",", "null", ")", ";", "}" ]
Terminates the specified job, marking it as completed. @param jobId The ID of the job. @param terminateReason The message to describe the reason the job has terminated. This text will appear when you call {@link JobExecutionInformation#terminateReason()}. @throws BatchErrorException Exception thrown when an error resp...
[ "Terminates", "the", "specified", "job", "marking", "it", "as", "completed", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/JobOperations.java#L370-L372
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/postprocess/impl/css/base64/Base64ImageEncoderPostProcessor.java
Base64ImageEncoderPostProcessor.prependBase64EncodedResources
protected void prependBase64EncodedResources(StringBuffer sb, Map<String, Base64EncodedResource> encodedImages) { """ Prepend the base64 encoded resources to the bundle data @param sb the string buffer containing the processed bundle data @param encodedImages a map of encoded images """ Iterator<Entry<...
java
protected void prependBase64EncodedResources(StringBuffer sb, Map<String, Base64EncodedResource> encodedImages) { Iterator<Entry<String, Base64EncodedResource>> it = encodedImages.entrySet().iterator(); StringBuilder mhtml = new StringBuilder(); String lineSeparator = StringUtils.STR_LINE_FEED; mhtml.append("/*...
[ "protected", "void", "prependBase64EncodedResources", "(", "StringBuffer", "sb", ",", "Map", "<", "String", ",", "Base64EncodedResource", ">", "encodedImages", ")", "{", "Iterator", "<", "Entry", "<", "String", ",", "Base64EncodedResource", ">", ">", "it", "=", ...
Prepend the base64 encoded resources to the bundle data @param sb the string buffer containing the processed bundle data @param encodedImages a map of encoded images
[ "Prepend", "the", "base64", "encoded", "resources", "to", "the", "bundle", "data" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/postprocess/impl/css/base64/Base64ImageEncoderPostProcessor.java#L152-L173
Axway/Grapes
server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java
OrganizationResource.removeCorporateGroupIdPrefix
@DELETE @Path("/ { """ Remove an existing Corporate GroupId from an organization. @return Response """name}" + ServerAPI.GET_CORPORATE_GROUPIDS) public Response removeCorporateGroupIdPrefix(@Auth final DbCredential credential, @PathParam("name") final String organizationId, final String corporateGro...
java
@DELETE @Path("/{name}" + ServerAPI.GET_CORPORATE_GROUPIDS) public Response removeCorporateGroupIdPrefix(@Auth final DbCredential credential, @PathParam("name") final String organizationId, final String corporateGroupId){ LOG.info("Got an remove a corporate groupId prefix request for organization " + or...
[ "@", "DELETE", "@", "Path", "(", "\"/{name}\"", "+", "ServerAPI", ".", "GET_CORPORATE_GROUPIDS", ")", "public", "Response", "removeCorporateGroupIdPrefix", "(", "@", "Auth", "final", "DbCredential", "credential", ",", "@", "PathParam", "(", "\"name\"", ")", "final...
Remove an existing Corporate GroupId from an organization. @return Response
[ "Remove", "an", "existing", "Corporate", "GroupId", "from", "an", "organization", "." ]
train
https://github.com/Axway/Grapes/blob/ce9cc73d85f83eaa5fbc991abb593915a8c8374e/server/src/main/java/org/axway/grapes/server/webapp/resources/OrganizationResource.java#L172-L188
threerings/narya
tools/src/main/java/com/threerings/presents/tools/ActionScriptUtils.java
ActionScriptUtils.addExistingImports
public static void addExistingImports (String asFile, ImportSet imports) { """ Adds an existing ActionScript file's imports to the given ImportSet. @param asFile a String containing the contents of an ActionScript file """ // Discover the location of the 'public class' declaration. // We won't...
java
public static void addExistingImports (String asFile, ImportSet imports) { // Discover the location of the 'public class' declaration. // We won't search past there. Matcher m = AS_PUBLIC_CLASS_DECL.matcher(asFile); int searchTo = asFile.length(); if (m.find()) { ...
[ "public", "static", "void", "addExistingImports", "(", "String", "asFile", ",", "ImportSet", "imports", ")", "{", "// Discover the location of the 'public class' declaration.", "// We won't search past there.", "Matcher", "m", "=", "AS_PUBLIC_CLASS_DECL", ".", "matcher", "(",...
Adds an existing ActionScript file's imports to the given ImportSet. @param asFile a String containing the contents of an ActionScript file
[ "Adds", "an", "existing", "ActionScript", "file", "s", "imports", "to", "the", "given", "ImportSet", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/tools/src/main/java/com/threerings/presents/tools/ActionScriptUtils.java#L46-L60
camunda/camunda-xml-model
src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java
DomUtil.getEmptyDocument
public static DomDocument getEmptyDocument(DocumentBuilderFactory documentBuilderFactory) { """ Get an empty DOM document @param documentBuilderFactory the factory to build to DOM document @return the new empty document @throws ModelParseException if unable to create a new document """ try { Doc...
java
public static DomDocument getEmptyDocument(DocumentBuilderFactory documentBuilderFactory) { try { DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder(); return new DomDocumentImpl(documentBuilder.newDocument()); } catch (ParserConfigurationException e) { throw new Model...
[ "public", "static", "DomDocument", "getEmptyDocument", "(", "DocumentBuilderFactory", "documentBuilderFactory", ")", "{", "try", "{", "DocumentBuilder", "documentBuilder", "=", "documentBuilderFactory", ".", "newDocumentBuilder", "(", ")", ";", "return", "new", "DomDocume...
Get an empty DOM document @param documentBuilderFactory the factory to build to DOM document @return the new empty document @throws ModelParseException if unable to create a new document
[ "Get", "an", "empty", "DOM", "document" ]
train
https://github.com/camunda/camunda-xml-model/blob/85b3f879e26d063f71c94cfd21ac17d9ff6baf4d/src/main/java/org/camunda/bpm/model/xml/impl/util/DomUtil.java#L218-L225
threerings/narya
core/src/main/java/com/threerings/bureau/server/BureauRegistry.java
BureauRegistry.startAgent
public void startAgent (AgentObject agent) { """ Starts a new agent using the data in the given object, creating a new bureau if necessary. """ agent.setLocal(AgentData.class, new AgentData()); Bureau bureau = _bureaus.get(agent.bureauId); if (bureau != null && bureau.ready()) { ...
java
public void startAgent (AgentObject agent) { agent.setLocal(AgentData.class, new AgentData()); Bureau bureau = _bureaus.get(agent.bureauId); if (bureau != null && bureau.ready()) { _omgr.registerObject(agent); log.info("Bureau ready, sending createAgent", "agent", a...
[ "public", "void", "startAgent", "(", "AgentObject", "agent", ")", "{", "agent", ".", "setLocal", "(", "AgentData", ".", "class", ",", "new", "AgentData", "(", ")", ")", ";", "Bureau", "bureau", "=", "_bureaus", ".", "get", "(", "agent", ".", "bureauId", ...
Starts a new agent using the data in the given object, creating a new bureau if necessary.
[ "Starts", "a", "new", "agent", "using", "the", "data", "in", "the", "given", "object", "creating", "a", "new", "bureau", "if", "necessary", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/bureau/server/BureauRegistry.java#L244-L280
eclipse/hawkbit
hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java
SPUIComponentProvider.getLink
public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon, final String targetOpen, final String style) { """ Method to create a link. @param id of the link @param name of the link @param resource path of the link @param icon of the link @pa...
java
public static Link getLink(final String id, final String name, final String resource, final FontAwesome icon, final String targetOpen, final String style) { final Link link = new Link(name, new ExternalResource(resource)); link.setId(id); link.setIcon(icon); link.setDescript...
[ "public", "static", "Link", "getLink", "(", "final", "String", "id", ",", "final", "String", "name", ",", "final", "String", "resource", ",", "final", "FontAwesome", "icon", ",", "final", "String", "targetOpen", ",", "final", "String", "style", ")", "{", "...
Method to create a link. @param id of the link @param name of the link @param resource path of the link @param icon of the link @param targetOpen specify how the link should be open (f. e. new windows = _blank) @param style chosen style of the link. Might be {@code null} if no style should be used @return a link UI co...
[ "Method", "to", "create", "a", "link", "." ]
train
https://github.com/eclipse/hawkbit/blob/9884452ad42f3b4827461606d8a9215c8625a7fe/hawkbit-ui/src/main/java/org/eclipse/hawkbit/ui/components/SPUIComponentProvider.java#L316-L331
Azure/azure-sdk-for-java
mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingEndpointsInner.java
StreamingEndpointsInner.beginUpdate
public StreamingEndpointInner beginUpdate(String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters) { """ Update StreamingEndpoint. Updates a existing StreamingEndpoint. @param resourceGroupName The name of the resource group within the Azure subscription. ...
java
public StreamingEndpointInner beginUpdate(String resourceGroupName, String accountName, String streamingEndpointName, StreamingEndpointInner parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, accountName, streamingEndpointName, parameters).toBlocking().single().body(); }
[ "public", "StreamingEndpointInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "streamingEndpointName", ",", "StreamingEndpointInner", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceG...
Update StreamingEndpoint. Updates a existing StreamingEndpoint. @param resourceGroupName The name of the resource group within the Azure subscription. @param accountName The Media Services account name. @param streamingEndpointName The name of the StreamingEndpoint. @param parameters StreamingEndpoint properties neede...
[ "Update", "StreamingEndpoint", ".", "Updates", "a", "existing", "StreamingEndpoint", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/mediaservices/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/implementation/StreamingEndpointsInner.java#L845-L847
ops4j/org.ops4j.base
ops4j-base-store/src/main/java/org/ops4j/store/StoreFactory.java
StoreFactory.anonymousStore
public static Store<InputStream> anonymousStore() throws IOException { """ If the store must be unique, here is it. @return unique storage @throws java.io.IOException in case no temp folder has been found. """ File temp = File.createTempFile( "ops4j-store-anonymous-", "" ); temp.d...
java
public static Store<InputStream> anonymousStore() throws IOException { File temp = File.createTempFile( "ops4j-store-anonymous-", "" ); temp.delete(); temp.mkdir(); return new TemporaryStore( temp, true ); }
[ "public", "static", "Store", "<", "InputStream", ">", "anonymousStore", "(", ")", "throws", "IOException", "{", "File", "temp", "=", "File", ".", "createTempFile", "(", "\"ops4j-store-anonymous-\"", ",", "\"\"", ")", ";", "temp", ".", "delete", "(", ")", ";"...
If the store must be unique, here is it. @return unique storage @throws java.io.IOException in case no temp folder has been found.
[ "If", "the", "store", "must", "be", "unique", "here", "is", "it", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-store/src/main/java/org/ops4j/store/StoreFactory.java#L97-L104
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.order_orderId_details_orderDetailId_GET
public OvhOrderDetail order_orderId_details_orderDetailId_GET(Long orderId, Long orderDetailId) throws IOException { """ Get this object properties REST: GET /me/order/{orderId}/details/{orderDetailId} @param orderId [required] @param orderDetailId [required] """ String qPath = "/me/order/{orderId}/deta...
java
public OvhOrderDetail order_orderId_details_orderDetailId_GET(Long orderId, Long orderDetailId) throws IOException { String qPath = "/me/order/{orderId}/details/{orderDetailId}"; StringBuilder sb = path(qPath, orderId, orderDetailId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp,...
[ "public", "OvhOrderDetail", "order_orderId_details_orderDetailId_GET", "(", "Long", "orderId", ",", "Long", "orderDetailId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/me/order/{orderId}/details/{orderDetailId}\"", ";", "StringBuilder", "sb", "=", "path"...
Get this object properties REST: GET /me/order/{orderId}/details/{orderDetailId} @param orderId [required] @param orderDetailId [required]
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L1957-L1962
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.mergeCertificateAsync
public ServiceFuture<CertificateBundle> mergeCertificateAsync(String vaultBaseUrl, String certificateName, List<byte[]> x509Certificates, final ServiceCallback<CertificateBundle> serviceCallback) { """ Merges a certificate or a certificate chain with a key pair existing on the server. The MergeCertificate operati...
java
public ServiceFuture<CertificateBundle> mergeCertificateAsync(String vaultBaseUrl, String certificateName, List<byte[]> x509Certificates, final ServiceCallback<CertificateBundle> serviceCallback) { return ServiceFuture.fromResponse(mergeCertificateWithServiceResponseAsync(vaultBaseUrl, certificateName, x509Cert...
[ "public", "ServiceFuture", "<", "CertificateBundle", ">", "mergeCertificateAsync", "(", "String", "vaultBaseUrl", ",", "String", "certificateName", ",", "List", "<", "byte", "[", "]", ">", "x509Certificates", ",", "final", "ServiceCallback", "<", "CertificateBundle", ...
Merges a certificate or a certificate chain with a key pair existing on the server. The MergeCertificate operation performs the merging of a certificate or certificate chain with a key pair currently available in the service. This operation requires the certificates/create permission. @param vaultBaseUrl The vault nam...
[ "Merges", "a", "certificate", "or", "a", "certificate", "chain", "with", "a", "key", "pair", "existing", "on", "the", "server", ".", "The", "MergeCertificate", "operation", "performs", "the", "merging", "of", "a", "certificate", "or", "certificate", "chain", "...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L7926-L7928
lightblueseas/vintage-time
src/main/java/de/alpharogroup/date/CalculateDateExtensions.java
CalculateDateExtensions.substractDaysFromDate
public static Date substractDaysFromDate(final Date date, final int substractDays) { """ Substract days to the given Date object and returns it. @param date The Date object to substract the days. @param substractDays The days to substract. @return The resulted Date object. """ final Calendar dateOnCal...
java
public static Date substractDaysFromDate(final Date date, final int substractDays) { final Calendar dateOnCalendar = Calendar.getInstance(); dateOnCalendar.setTime(date); dateOnCalendar.add(Calendar.DATE, substractDays * -1); return dateOnCalendar.getTime(); }
[ "public", "static", "Date", "substractDaysFromDate", "(", "final", "Date", "date", ",", "final", "int", "substractDays", ")", "{", "final", "Calendar", "dateOnCalendar", "=", "Calendar", ".", "getInstance", "(", ")", ";", "dateOnCalendar", ".", "setTime", "(", ...
Substract days to the given Date object and returns it. @param date The Date object to substract the days. @param substractDays The days to substract. @return The resulted Date object.
[ "Substract", "days", "to", "the", "given", "Date", "object", "and", "returns", "it", "." ]
train
https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/CalculateDateExtensions.java#L388-L394
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/base/CommandInterceptor.java
CommandInterceptor.invokeNextInterceptor
public final Object invokeNextInterceptor(InvocationContext ctx, VisitableCommand command) throws Throwable { """ Invokes the next interceptor in the chain. This is how interceptor implementations should pass a call up the chain to the next interceptor. @param ctx invocation context @param command comman...
java
public final Object invokeNextInterceptor(InvocationContext ctx, VisitableCommand command) throws Throwable { Object maybeStage = nextInterceptor.visitCommand(ctx, command); if (maybeStage instanceof SimpleAsyncInvocationStage) { return ((InvocationStage) maybeStage).get(); } else { ...
[ "public", "final", "Object", "invokeNextInterceptor", "(", "InvocationContext", "ctx", ",", "VisitableCommand", "command", ")", "throws", "Throwable", "{", "Object", "maybeStage", "=", "nextInterceptor", ".", "visitCommand", "(", "ctx", ",", "command", ")", ";", "...
Invokes the next interceptor in the chain. This is how interceptor implementations should pass a call up the chain to the next interceptor. @param ctx invocation context @param command command to pass up the chain. @return return value of the invocation @throws Throwable in the event of problems
[ "Invokes", "the", "next", "interceptor", "in", "the", "chain", ".", "This", "is", "how", "interceptor", "implementations", "should", "pass", "a", "call", "up", "the", "chain", "to", "the", "next", "interceptor", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/base/CommandInterceptor.java#L117-L124
arxanchain/java-common
src/main/java/com/arxanfintech/common/util/ByteUtil.java
ByteUtil.matchingNibbleLength
public static int matchingNibbleLength(byte[] a, byte[] b) { """ Returns the amount of nibbles that match each other from 0 ... amount will never be larger than smallest input @param a first input @param b second input @return Number of bytes that match """ int i = 0; int length = a.len...
java
public static int matchingNibbleLength(byte[] a, byte[] b) { int i = 0; int length = a.length < b.length ? a.length : b.length; while (i < length) { if (a[i] != b[i]) return i; i++; } return i; }
[ "public", "static", "int", "matchingNibbleLength", "(", "byte", "[", "]", "a", ",", "byte", "[", "]", "b", ")", "{", "int", "i", "=", "0", ";", "int", "length", "=", "a", ".", "length", "<", "b", ".", "length", "?", "a", ".", "length", ":", "b"...
Returns the amount of nibbles that match each other from 0 ... amount will never be larger than smallest input @param a first input @param b second input @return Number of bytes that match
[ "Returns", "the", "amount", "of", "nibbles", "that", "match", "each", "other", "from", "0", "...", "amount", "will", "never", "be", "larger", "than", "smallest", "input" ]
train
https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L135-L144
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.updateCustomPrebuiltEntityRole
public OperationStatus updateCustomPrebuiltEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) { """ Update an entity role for a given entity. @param appId The application ID. @param versionId The ...
java
public OperationStatus updateCustomPrebuiltEntityRole(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) { return updateCustomPrebuiltEntityRoleWithServiceResponseAsync(appId, versionId, entityId, roleId, upd...
[ "public", "OperationStatus", "updateCustomPrebuiltEntityRole", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "entityId", ",", "UUID", "roleId", ",", "UpdateCustomPrebuiltEntityRoleOptionalParameter", "updateCustomPrebuiltEntityRoleOptionalParameter", ")", "{", ...
Update an entity role for a given entity. @param appId The application ID. @param versionId The version ID. @param entityId The entity ID. @param roleId The entity role ID. @param updateCustomPrebuiltEntityRoleOptionalParameter the object representing the optional parameters to be set before calling this API @throws I...
[ "Update", "an", "entity", "role", "for", "a", "given", "entity", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L13663-L13665
alipay/sofa-hessian
src/main/java/com/caucho/hessian/io/Hessian2Output.java
Hessian2Output.writeByteBufferPart
public void writeByteBufferPart(byte[] buffer, int offset, int length) throws IOException { """ Writes a byte buffer to the stream. <code><pre> b b16 b18 bytes </pre></code> """ while (length > 0) { flushIfFull(); int sublen = _buffer.length - _offset; ...
java
public void writeByteBufferPart(byte[] buffer, int offset, int length) throws IOException { while (length > 0) { flushIfFull(); int sublen = _buffer.length - _offset; if (length < sublen) sublen = length; _buffer[_offset++] = BC_BINA...
[ "public", "void", "writeByteBufferPart", "(", "byte", "[", "]", "buffer", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "while", "(", "length", ">", "0", ")", "{", "flushIfFull", "(", ")", ";", "int", "sublen", "=", "_b...
Writes a byte buffer to the stream. <code><pre> b b16 b18 bytes </pre></code>
[ "Writes", "a", "byte", "buffer", "to", "the", "stream", "." ]
train
https://github.com/alipay/sofa-hessian/blob/89e4f5af28602101dab7b498995018871616357b/src/main/java/com/caucho/hessian/io/Hessian2Output.java#L1224-L1245
google/closure-templates
java/src/com/google/template/soy/jssrc/dsl/GoogRequire.java
GoogRequire.createTypeRequireWithAlias
public static GoogRequire createTypeRequireWithAlias(String symbol, String alias) { """ Creates a new {@code GoogRequire} that requires the given symbol and aliases it to the given name: {@code var alias = goog.requireType('symbol'); } """ CodeChunkUtils.checkId(alias); return new AutoValue_GoogRequir...
java
public static GoogRequire createTypeRequireWithAlias(String symbol, String alias) { CodeChunkUtils.checkId(alias); return new AutoValue_GoogRequire( symbol, VariableDeclaration.builder(alias) .setRhs(GOOG_REQUIRE_TYPE.call(stringLiteral(symbol))) .build(), /*isTyp...
[ "public", "static", "GoogRequire", "createTypeRequireWithAlias", "(", "String", "symbol", ",", "String", "alias", ")", "{", "CodeChunkUtils", ".", "checkId", "(", "alias", ")", ";", "return", "new", "AutoValue_GoogRequire", "(", "symbol", ",", "VariableDeclaration",...
Creates a new {@code GoogRequire} that requires the given symbol and aliases it to the given name: {@code var alias = goog.requireType('symbol'); }
[ "Creates", "a", "new", "{" ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/dsl/GoogRequire.java#L70-L78
line/armeria
core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java
ServerSentEvents.fromStream
public static <T> HttpResponse fromStream(HttpHeaders headers, Stream<T> contentStream, HttpHeaders trailingHeaders, Executor executor, Function<? super T, ? extends ServerSentEvent> converter) { """ Creates a new Server-Se...
java
public static <T> HttpResponse fromStream(HttpHeaders headers, Stream<T> contentStream, HttpHeaders trailingHeaders, Executor executor, Function<? super T, ? extends ServerSentEvent> converter) { requireNonNull(headers, ...
[ "public", "static", "<", "T", ">", "HttpResponse", "fromStream", "(", "HttpHeaders", "headers", ",", "Stream", "<", "T", ">", "contentStream", ",", "HttpHeaders", "trailingHeaders", ",", "Executor", "executor", ",", "Function", "<", "?", "super", "T", ",", "...
Creates a new Server-Sent Events stream from the specified {@link Stream} and {@code converter}. @param headers the HTTP headers supposed to send @param contentStream the {@link Stream} which publishes the objects supposed to send as contents @param trailingHeaders the trailing HTTP headers supposed to send @param exe...
[ "Creates", "a", "new", "Server", "-", "Sent", "Events", "stream", "from", "the", "specified", "{", "@link", "Stream", "}", "and", "{", "@code", "converter", "}", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/streaming/ServerSentEvents.java#L240-L250
google/closure-compiler
src/com/google/javascript/jscomp/CheckJSDoc.java
CheckJSDoc.validateFunctionJsDoc
private void validateFunctionJsDoc(Node n, JSDocInfo info) { """ Checks that JSDoc intended for a function is actually attached to a function. """ if (info == null) { return; } if (info.containsFunctionDeclaration() && !info.hasType() && !isJSDocOnFunctionNode(n, info)) { // This JSDo...
java
private void validateFunctionJsDoc(Node n, JSDocInfo info) { if (info == null) { return; } if (info.containsFunctionDeclaration() && !info.hasType() && !isJSDocOnFunctionNode(n, info)) { // This JSDoc should be attached to a FUNCTION node, or an assignment // with a function as the RHS, e...
[ "private", "void", "validateFunctionJsDoc", "(", "Node", "n", ",", "JSDocInfo", "info", ")", "{", "if", "(", "info", "==", "null", ")", "{", "return", ";", "}", "if", "(", "info", ".", "containsFunctionDeclaration", "(", ")", "&&", "!", "info", ".", "h...
Checks that JSDoc intended for a function is actually attached to a function.
[ "Checks", "that", "JSDoc", "intended", "for", "a", "function", "is", "actually", "attached", "to", "a", "function", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/CheckJSDoc.java#L419-L433
radkovo/CSSBox
src/main/java/org/fit/cssbox/layout/BoxFactory.java
BoxFactory.computeInheritedStyle
private void computeInheritedStyle(ElementBox dest, ElementBox parent) { """ Computes the style of a node based on its parent using the CSS inheritance. @param dest the box whose style should be computed @param parent the parent box """ NodeData newstyle = dest.getStyle().inheritFrom(parent.getStyle(...
java
private void computeInheritedStyle(ElementBox dest, ElementBox parent) { NodeData newstyle = dest.getStyle().inheritFrom(parent.getStyle()); dest.setStyle(newstyle); }
[ "private", "void", "computeInheritedStyle", "(", "ElementBox", "dest", ",", "ElementBox", "parent", ")", "{", "NodeData", "newstyle", "=", "dest", ".", "getStyle", "(", ")", ".", "inheritFrom", "(", "parent", ".", "getStyle", "(", ")", ")", ";", "dest", "....
Computes the style of a node based on its parent using the CSS inheritance. @param dest the box whose style should be computed @param parent the parent box
[ "Computes", "the", "style", "of", "a", "node", "based", "on", "its", "parent", "using", "the", "CSS", "inheritance", "." ]
train
https://github.com/radkovo/CSSBox/blob/38aaf8f22d233d7b4dbc12a56cdbc72b447bc559/src/main/java/org/fit/cssbox/layout/BoxFactory.java#L989-L993
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java
PluralRules.matches
@Deprecated public boolean matches(FixedDecimal sample, String keyword) { """ Given a number information, and keyword, return whether the keyword would match the number. @param sample The number information for which the rule has to be determined. @param keyword The keyword to filter on @deprecated This A...
java
@Deprecated public boolean matches(FixedDecimal sample, String keyword) { return rules.select(sample, keyword); }
[ "@", "Deprecated", "public", "boolean", "matches", "(", "FixedDecimal", "sample", ",", "String", "keyword", ")", "{", "return", "rules", ".", "select", "(", "sample", ",", "keyword", ")", ";", "}" ]
Given a number information, and keyword, return whether the keyword would match the number. @param sample The number information for which the rule has to be determined. @param keyword The keyword to filter on @deprecated This API is ICU internal only. @hide original deprecated declaration @hide draft / provisional / ...
[ "Given", "a", "number", "information", "and", "keyword", "return", "whether", "the", "keyword", "would", "match", "the", "number", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/PluralRules.java#L2029-L2032
eduarddrenth/ConfigurableReports
src/main/java/com/vectorprint/report/itext/BaseReportGenerator.java
BaseReportGenerator.handleException
protected int handleException(Exception ex, OutputStream output) throws VectorPrintRuntimeException { """ This method will be called when exceptions are thrown in {@link #createReportBody(com.itextpdf.text.Document, com.vectorprint.report.data.ReportDataHolder)} or {@link DebugHelper#appendDebugInfo(com.itextpdf...
java
protected int handleException(Exception ex, OutputStream output) throws VectorPrintRuntimeException { if (getSettings().getBooleanProperty(Boolean.TRUE, ReportConstants.STOPONERROR)) { throw (ex instanceof VectorPrintRuntimeException) ? (VectorPrintRuntimeException) ex : new Vec...
[ "protected", "int", "handleException", "(", "Exception", "ex", ",", "OutputStream", "output", ")", "throws", "VectorPrintRuntimeException", "{", "if", "(", "getSettings", "(", ")", ".", "getBooleanProperty", "(", "Boolean", ".", "TRUE", ",", "ReportConstants", "."...
This method will be called when exceptions are thrown in {@link #createReportBody(com.itextpdf.text.Document, com.vectorprint.report.data.ReportDataHolder)} or {@link DebugHelper#appendDebugInfo(com.itextpdf.text.pdf.PdfWriter, com.itextpdf.text.Document, com.vectorprint.configuration.EnhancedMap, com.vectorprint.repor...
[ "This", "method", "will", "be", "called", "when", "exceptions", "are", "thrown", "in", "{", "@link", "#createReportBody", "(", "com", ".", "itextpdf", ".", "text", ".", "Document", "com", ".", "vectorprint", ".", "report", ".", "data", ".", "ReportDataHolder...
train
https://github.com/eduarddrenth/ConfigurableReports/blob/b5fb7a89e16d9b35f557f3bf620594f821fa1552/src/main/java/com/vectorprint/report/itext/BaseReportGenerator.java#L279-L321
primefaces-extensions/core
src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java
SheetRenderer.encodeFooter
private void encodeFooter(final FacesContext context, final ResponseWriter responseWriter, final Sheet sheet) throws IOException { """ Encode the sheet footer @param context @param responseWriter @param sheet @throws IOException """ // footer final UIComponent footer = she...
java
private void encodeFooter(final FacesContext context, final ResponseWriter responseWriter, final Sheet sheet) throws IOException { // footer final UIComponent footer = sheet.getFacet("footer"); if (footer != null) { responseWriter.startElement("div", null); ...
[ "private", "void", "encodeFooter", "(", "final", "FacesContext", "context", ",", "final", "ResponseWriter", "responseWriter", ",", "final", "Sheet", "sheet", ")", "throws", "IOException", "{", "// footer", "final", "UIComponent", "footer", "=", "sheet", ".", "getF...
Encode the sheet footer @param context @param responseWriter @param sheet @throws IOException
[ "Encode", "the", "sheet", "footer" ]
train
https://github.com/primefaces-extensions/core/blob/afdbca591f60f47898e3517e1e939bc2f63d5355/src/main/java/org/primefaces/extensions/component/sheet/SheetRenderer.java#L664-L674
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/lss/LssClient.java
LssClient.listSecurityPolicies
public ListSecurityPoliciesResponse listSecurityPolicies() { """ List all your live security policys. @return The list of all your live security policys """ ListSecurityPoliciesRequest request = new ListSecurityPoliciesRequest(); InternalRequest internalRequest = createRequest(HttpMethodName...
java
public ListSecurityPoliciesResponse listSecurityPolicies() { ListSecurityPoliciesRequest request = new ListSecurityPoliciesRequest(); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_SECURITY_POLICY); return invokeHttpClient(internalRequest, ListSecurityPoliciesR...
[ "public", "ListSecurityPoliciesResponse", "listSecurityPolicies", "(", ")", "{", "ListSecurityPoliciesRequest", "request", "=", "new", "ListSecurityPoliciesRequest", "(", ")", ";", "InternalRequest", "internalRequest", "=", "createRequest", "(", "HttpMethodName", ".", "GET"...
List all your live security policys. @return The list of all your live security policys
[ "List", "all", "your", "live", "security", "policys", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/lss/LssClient.java#L1243-L1247
jasminb/jsonapi-converter
src/main/java/com/github/jasminb/jsonapi/ResourceConverter.java
ResourceConverter.readObjectCollection
@Deprecated public <T> List<T> readObjectCollection(byte [] data, Class<T> clazz) { """ Converts rawdata input into a collection of requested output objects. @param data raw data input @param clazz target type @param <T> type @return collection of converted elements @throws RuntimeException in case conversio...
java
@Deprecated public <T> List<T> readObjectCollection(byte [] data, Class<T> clazz) { return readDocumentCollection(data, clazz).get(); }
[ "@", "Deprecated", "public", "<", "T", ">", "List", "<", "T", ">", "readObjectCollection", "(", "byte", "[", "]", "data", ",", "Class", "<", "T", ">", "clazz", ")", "{", "return", "readDocumentCollection", "(", "data", ",", "clazz", ")", ".", "get", ...
Converts rawdata input into a collection of requested output objects. @param data raw data input @param clazz target type @param <T> type @return collection of converted elements @throws RuntimeException in case conversion fails
[ "Converts", "rawdata", "input", "into", "a", "collection", "of", "requested", "output", "objects", "." ]
train
https://github.com/jasminb/jsonapi-converter/blob/73b41c3b9274e70e62b3425071ca8afdc7bddaf6/src/main/java/com/github/jasminb/jsonapi/ResourceConverter.java#L161-L164
MTDdk/jawn
jawn-core/src/main/java/net/javapla/jawn/core/templates/ContentTemplateLoader.java
ContentTemplateLoader.getTemplateNameForResult
public String getTemplateNameForResult(Route route, Result response) { """ If the template is specified by the user with a suffix corresponding to the template engine suffix, then this is removed before returning the template. Suffixes such as .st or .ftl.html @param route @param response @return """ ...
java
public String getTemplateNameForResult(Route route, Result response) { String template = response.template(); if (template == null) { if (route != null) { String controllerPath = RouterHelper.getReverseRouteFast(route.getController()); ...
[ "public", "String", "getTemplateNameForResult", "(", "Route", "route", ",", "Result", "response", ")", "{", "String", "template", "=", "response", ".", "template", "(", ")", ";", "if", "(", "template", "==", "null", ")", "{", "if", "(", "route", "!=", "n...
If the template is specified by the user with a suffix corresponding to the template engine suffix, then this is removed before returning the template. Suffixes such as .st or .ftl.html @param route @param response @return
[ "If", "the", "template", "is", "specified", "by", "the", "user", "with", "a", "suffix", "corresponding", "to", "the", "template", "engine", "suffix", "then", "this", "is", "removed", "before", "returning", "the", "template", ".", "Suffixes", "such", "as", "....
train
https://github.com/MTDdk/jawn/blob/4ec2d09b97d413efdead7487e6075e5bfd13b925/jawn-core/src/main/java/net/javapla/jawn/core/templates/ContentTemplateLoader.java#L59-L82
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.writeUtf8String
public static File writeUtf8String(String content, String path) throws IORuntimeException { """ 将String写入文件,覆盖模式,字符集为UTF-8 @param content 写入的内容 @param path 文件路径 @return 写入的文件 @throws IORuntimeException IO异常 """ return writeString(content, path, CharsetUtil.CHARSET_UTF_8); }
java
public static File writeUtf8String(String content, String path) throws IORuntimeException { return writeString(content, path, CharsetUtil.CHARSET_UTF_8); }
[ "public", "static", "File", "writeUtf8String", "(", "String", "content", ",", "String", "path", ")", "throws", "IORuntimeException", "{", "return", "writeString", "(", "content", ",", "path", ",", "CharsetUtil", ".", "CHARSET_UTF_8", ")", ";", "}" ]
将String写入文件,覆盖模式,字符集为UTF-8 @param content 写入的内容 @param path 文件路径 @return 写入的文件 @throws IORuntimeException IO异常
[ "将String写入文件,覆盖模式,字符集为UTF", "-", "8" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2695-L2697
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneId.java
ZoneId.ofWithPrefix
private static ZoneId ofWithPrefix(String zoneId, int prefixLength, boolean checkAvailable) { """ Parse once a prefix is established. @param zoneId the time-zone ID, not null @param prefixLength the length of the prefix, 2 or 3 @return the zone ID, not null @throws DateTimeException if the zone ID has an i...
java
private static ZoneId ofWithPrefix(String zoneId, int prefixLength, boolean checkAvailable) { String prefix = zoneId.substring(0, prefixLength); if (zoneId.length() == prefixLength) { return ofOffset(prefix, ZoneOffset.UTC); } if (zoneId.charAt(prefixLength) != '+' && zoneId....
[ "private", "static", "ZoneId", "ofWithPrefix", "(", "String", "zoneId", ",", "int", "prefixLength", ",", "boolean", "checkAvailable", ")", "{", "String", "prefix", "=", "zoneId", ".", "substring", "(", "0", ",", "prefixLength", ")", ";", "if", "(", "zoneId",...
Parse once a prefix is established. @param zoneId the time-zone ID, not null @param prefixLength the length of the prefix, 2 or 3 @return the zone ID, not null @throws DateTimeException if the zone ID has an invalid format
[ "Parse", "once", "a", "prefix", "is", "established", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/time/ZoneId.java#L430-L447
datacleaner/AnalyzerBeans
core/src/main/java/org/eobjects/analyzer/result/AbstractCrosstabResultReducer.java
AbstractCrosstabResultReducer.createMasterCrosstab
protected Crosstab<Serializable> createMasterCrosstab(Collection<? extends R> results) { """ Builds the master crosstab, including all dimensions and categories that will be included in the final result. By default this method will use the first result's crosstab dimensions and categories, assuming that they ...
java
protected Crosstab<Serializable> createMasterCrosstab(Collection<? extends R> results) { final R firstResult = results.iterator().next(); final Crosstab<?> firstCrosstab = firstResult.getCrosstab(); final Class<?> valueClass = firstCrosstab.getValueClass(); final CrosstabDimension dimen...
[ "protected", "Crosstab", "<", "Serializable", ">", "createMasterCrosstab", "(", "Collection", "<", "?", "extends", "R", ">", "results", ")", "{", "final", "R", "firstResult", "=", "results", ".", "iterator", "(", ")", ".", "next", "(", ")", ";", "final", ...
Builds the master crosstab, including all dimensions and categories that will be included in the final result. By default this method will use the first result's crosstab dimensions and categories, assuming that they are all the same. Subclasses can override this method to build the other dimensions. @param results ...
[ "Builds", "the", "master", "crosstab", "including", "all", "dimensions", "and", "categories", "that", "will", "be", "included", "in", "the", "final", "result", "." ]
train
https://github.com/datacleaner/AnalyzerBeans/blob/f82dae080d80d2a647b706a5fb22b3ea250613b3/core/src/main/java/org/eobjects/analyzer/result/AbstractCrosstabResultReducer.java#L98-L109
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java
TrainingsImpl.createImageTags
public ImageTagCreateSummary createImageTags(UUID projectId, CreateImageTagsOptionalParameter createImageTagsOptionalParameter) { """ Associate a set of images with a set of tags. @param projectId The project id @param createImageTagsOptionalParameter the object representing the optional parameters to be set b...
java
public ImageTagCreateSummary createImageTags(UUID projectId, CreateImageTagsOptionalParameter createImageTagsOptionalParameter) { return createImageTagsWithServiceResponseAsync(projectId, createImageTagsOptionalParameter).toBlocking().single().body(); }
[ "public", "ImageTagCreateSummary", "createImageTags", "(", "UUID", "projectId", ",", "CreateImageTagsOptionalParameter", "createImageTagsOptionalParameter", ")", "{", "return", "createImageTagsWithServiceResponseAsync", "(", "projectId", ",", "createImageTagsOptionalParameter", ")"...
Associate a set of images with a set of tags. @param projectId The project id @param createImageTagsOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request ...
[ "Associate", "a", "set", "of", "images", "with", "a", "set", "of", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/customvision/training/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/training/implementation/TrainingsImpl.java#L3599-L3601
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLOutputUtil.java
XMLOutputUtil.writeFileList
public static void writeFileList(XMLOutput xmlOutput, String tagName, Iterator<File> listValueIterator) throws IOException { """ Write a list of Strings to document as elements with given tag name. @param xmlOutput the XMLOutput object to write to @param tagName the tag name @param listValueIterator Iterat...
java
public static void writeFileList(XMLOutput xmlOutput, String tagName, Iterator<File> listValueIterator) throws IOException { while (listValueIterator.hasNext()) { xmlOutput.openTag(tagName); xmlOutput.writeText(listValueIterator.next().getPath()); xmlOutput.closeTag(tagName);...
[ "public", "static", "void", "writeFileList", "(", "XMLOutput", "xmlOutput", ",", "String", "tagName", ",", "Iterator", "<", "File", ">", "listValueIterator", ")", "throws", "IOException", "{", "while", "(", "listValueIterator", ".", "hasNext", "(", ")", ")", "...
Write a list of Strings to document as elements with given tag name. @param xmlOutput the XMLOutput object to write to @param tagName the tag name @param listValueIterator Iterator over String values to write
[ "Write", "a", "list", "of", "Strings", "to", "document", "as", "elements", "with", "given", "tag", "name", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLOutputUtil.java#L93-L99
pravega/pravega
common/src/main/java/io/pravega/common/util/BitConverter.java
BitConverter.writeLong
public static int writeLong(byte[] target, int offset, long value) { """ Writes the given 64-bit Long to the given byte array at the given offset. @param target The byte array to write to. @param offset The offset within the byte array to write at. @param value The value to write. @return The number of byte...
java
public static int writeLong(byte[] target, int offset, long value) { target[offset] = (byte) (value >>> 56); target[offset + 1] = (byte) (value >>> 48); target[offset + 2] = (byte) (value >>> 40); target[offset + 3] = (byte) (value >>> 32); target[offset + 4] = (byte) (value >>> ...
[ "public", "static", "int", "writeLong", "(", "byte", "[", "]", "target", ",", "int", "offset", ",", "long", "value", ")", "{", "target", "[", "offset", "]", "=", "(", "byte", ")", "(", "value", ">>>", "56", ")", ";", "target", "[", "offset", "+", ...
Writes the given 64-bit Long to the given byte array at the given offset. @param target The byte array to write to. @param offset The offset within the byte array to write at. @param value The value to write. @return The number of bytes written.
[ "Writes", "the", "given", "64", "-", "bit", "Long", "to", "the", "given", "byte", "array", "at", "the", "given", "offset", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/BitConverter.java#L183-L193
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/Validate.java
Validate.notEmpty
public static <T extends CharSequence> T notEmpty(final T chars, final String message, final Object... values) { """ <p>Validate that the specified argument character sequence is neither {@code null} nor a length of zero (no characters); otherwise throwing an exception with the specified message. <pre>Validat...
java
public static <T extends CharSequence> T notEmpty(final T chars, final String message, final Object... values) { if (chars == null) { throw new NullPointerException(StringUtils.simpleFormat(message, values)); } if (chars.length() == 0) { throw new IllegalArgumentException...
[ "public", "static", "<", "T", "extends", "CharSequence", ">", "T", "notEmpty", "(", "final", "T", "chars", ",", "final", "String", "message", ",", "final", "Object", "...", "values", ")", "{", "if", "(", "chars", "==", "null", ")", "{", "throw", "new",...
<p>Validate that the specified argument character sequence is neither {@code null} nor a length of zero (no characters); otherwise throwing an exception with the specified message. <pre>Validate.notEmpty(myString, "The string must not be empty");</pre> @param <T> the character sequence type @param chars the characte...
[ "<p", ">", "Validate", "that", "the", "specified", "argument", "character", "sequence", "is", "neither", "{", "@code", "null", "}", "nor", "a", "length", "of", "zero", "(", "no", "characters", ")", ";", "otherwise", "throwing", "an", "exception", "with", "...
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/Validate.java#L398-L406
SonarSource/sonarqube
server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java
DatabaseUtils.executeLargeInputs
public static <OUTPUT, INPUT extends Comparable<INPUT>> List<OUTPUT> executeLargeInputs(Collection<INPUT> input, Function<List<INPUT>, List<OUTPUT>> function) { """ Partition by 1000 elements a list of input and execute a function on each part. The goal is to prevent issue with ORACLE when there's more than 100...
java
public static <OUTPUT, INPUT extends Comparable<INPUT>> List<OUTPUT> executeLargeInputs(Collection<INPUT> input, Function<List<INPUT>, List<OUTPUT>> function) { return executeLargeInputs(input, function, i -> i); }
[ "public", "static", "<", "OUTPUT", ",", "INPUT", "extends", "Comparable", "<", "INPUT", ">", ">", "List", "<", "OUTPUT", ">", "executeLargeInputs", "(", "Collection", "<", "INPUT", ">", "input", ",", "Function", "<", "List", "<", "INPUT", ">", ",", "List...
Partition by 1000 elements a list of input and execute a function on each part. The goal is to prevent issue with ORACLE when there's more than 1000 elements in a 'in ('X', 'Y', ...)' and with MsSQL when there's more than 2000 parameters in a query
[ "Partition", "by", "1000", "elements", "a", "list", "of", "input", "and", "execute", "a", "function", "on", "each", "part", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-core/src/main/java/org/sonar/db/DatabaseUtils.java#L107-L109
geomajas/geomajas-project-client-gwt
client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java
DomHelper.applyAbsolutePosition
private void applyAbsolutePosition(Element element, Coordinate position) { """ Apply an absolute position on an element. @param element The element that needs an absolute position. @param position The position as a Coordinate. """ Dom.setStyleAttribute(element, "position", "absolute"); Dom.setStyleAt...
java
private void applyAbsolutePosition(Element element, Coordinate position) { Dom.setStyleAttribute(element, "position", "absolute"); Dom.setStyleAttribute(element, "left", (int) position.getX() + "px"); Dom.setStyleAttribute(element, "top", (int) position.getY() + "px"); }
[ "private", "void", "applyAbsolutePosition", "(", "Element", "element", ",", "Coordinate", "position", ")", "{", "Dom", ".", "setStyleAttribute", "(", "element", ",", "\"position\"", ",", "\"absolute\"", ")", ";", "Dom", ".", "setStyleAttribute", "(", "element", ...
Apply an absolute position on an element. @param element The element that needs an absolute position. @param position The position as a Coordinate.
[ "Apply", "an", "absolute", "position", "on", "an", "element", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt/blob/1c1adc48deb192ed825265eebcc74d70bbf45670/client/src/main/java/org/geomajas/gwt/client/gfx/context/DomHelper.java#L492-L496
PureSolTechnologies/commons
misc/src/main/java/com/puresoltechnologies/commons/misc/io/FileUtilities.java
FileUtilities.writeFile
public static boolean writeFile(File directory, File fileName, String text) { """ This method writes the content of a String into a file specified by a directory and its fileName. @param directory is the output directory. @param fileName is the file name of the target file. @param text is the text to be w...
java
public static boolean writeFile(File directory, File fileName, String text) { try { File destination = new File(directory, fileName.getPath()); File parent = destination.getParentFile(); if (!parent.exists()) { if (!parent.mkdirs()) { return false; } } RandomAccessFile ra = new Rando...
[ "public", "static", "boolean", "writeFile", "(", "File", "directory", ",", "File", "fileName", ",", "String", "text", ")", "{", "try", "{", "File", "destination", "=", "new", "File", "(", "directory", ",", "fileName", ".", "getPath", "(", ")", ")", ";", ...
This method writes the content of a String into a file specified by a directory and its fileName. @param directory is the output directory. @param fileName is the file name of the target file. @param text is the text to be written into the file. @return <code>true</code> is returned in case of success. <code>false</co...
[ "This", "method", "writes", "the", "content", "of", "a", "String", "into", "a", "file", "specified", "by", "a", "directory", "and", "its", "fileName", "." ]
train
https://github.com/PureSolTechnologies/commons/blob/f98c23d8841a1ff61632ff17fe7d24f99dbc1d44/misc/src/main/java/com/puresoltechnologies/commons/misc/io/FileUtilities.java#L102-L126
nohana/Amalgam
amalgam/src/main/java/com/amalgam/graphics/BitmapUtils.java
BitmapUtils.storeOnExternalStorage
@TargetApi(Build.VERSION_CODES.FROYO) public static File storeOnExternalStorage(Context context, Bitmap bitmap, String type, String path, String filename, Bitmap.CompressFormat format, int quality) { """ Store the bitmap on the external storage path. @param context the context. @param bitmap to store. @para...
java
@TargetApi(Build.VERSION_CODES.FROYO) public static File storeOnExternalStorage(Context context, Bitmap bitmap, String type, String path, String filename, Bitmap.CompressFormat format, int quality) { if (!Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState())) { // we cannot sav...
[ "@", "TargetApi", "(", "Build", ".", "VERSION_CODES", ".", "FROYO", ")", "public", "static", "File", "storeOnExternalStorage", "(", "Context", "context", ",", "Bitmap", "bitmap", ",", "String", "type", ",", "String", "path", ",", "String", "filename", ",", "...
Store the bitmap on the external storage path. @param context the context. @param bitmap to store. @param type type of the bitmap. @param path file path. @param filename file name. @param format bitmap format. @param quality the quality of the compressed bitmap. @return the compressed bitmap file.
[ "Store", "the", "bitmap", "on", "the", "external", "storage", "path", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/graphics/BitmapUtils.java#L225-L238
jcustenborder/connect-utils
connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java
ConfigUtils.trustManagerFactory
public static TrustManagerFactory trustManagerFactory(AbstractConfig config, String key) { """ Method will create a TrustManagerFactory based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return TrustManagerFactory based on the type specified...
java
public static TrustManagerFactory trustManagerFactory(AbstractConfig config, String key) { final String trustManagerFactoryType = config.getString(key); try { return TrustManagerFactory.getInstance(trustManagerFactoryType); } catch (NoSuchAlgorithmException e) { ConfigException exception = new C...
[ "public", "static", "TrustManagerFactory", "trustManagerFactory", "(", "AbstractConfig", "config", ",", "String", "key", ")", "{", "final", "String", "trustManagerFactoryType", "=", "config", ".", "getString", "(", "key", ")", ";", "try", "{", "return", "TrustMana...
Method will create a TrustManagerFactory based on the Algorithm type specified in the config. @param config Config to read from. @param key Key to read from @return TrustManagerFactory based on the type specified in the config.
[ "Method", "will", "create", "a", "TrustManagerFactory", "based", "on", "the", "Algorithm", "type", "specified", "in", "the", "config", "." ]
train
https://github.com/jcustenborder/connect-utils/blob/19add138921f59ffcc85282d7aad551eeb582370/connect-utils/src/main/java/com/github/jcustenborder/kafka/connect/utils/config/ConfigUtils.java#L421-L434
google/closure-compiler
src/com/google/javascript/jscomp/NodeUtil.java
NodeUtil.isValidPropertyName
static boolean isValidPropertyName(FeatureSet mode, String name) { """ Determines whether the given name can appear on the right side of the dot operator. Many properties (like reserved words) cannot, in ES3. """ if (isValidSimpleName(name)) { return true; } else { return mode.has(Feature....
java
static boolean isValidPropertyName(FeatureSet mode, String name) { if (isValidSimpleName(name)) { return true; } else { return mode.has(Feature.KEYWORDS_AS_PROPERTIES) && TokenStream.isKeyword(name); } }
[ "static", "boolean", "isValidPropertyName", "(", "FeatureSet", "mode", ",", "String", "name", ")", "{", "if", "(", "isValidSimpleName", "(", "name", ")", ")", "{", "return", "true", ";", "}", "else", "{", "return", "mode", ".", "has", "(", "Feature", "."...
Determines whether the given name can appear on the right side of the dot operator. Many properties (like reserved words) cannot, in ES3.
[ "Determines", "whether", "the", "given", "name", "can", "appear", "on", "the", "right", "side", "of", "the", "dot", "operator", ".", "Many", "properties", "(", "like", "reserved", "words", ")", "cannot", "in", "ES3", "." ]
train
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/NodeUtil.java#L4229-L4235
Impetus/Kundera
src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java
HBaseSchemaManager.addColumnFamilyAndSetProperties
private void addColumnFamilyAndSetProperties(HTableDescriptor tableDescriptor, String colFamilyName) { """ Adds the column family and set properties. @param tableDescriptor the table descriptor @param colFamilyName the sec table """ if (!tableDescriptor.hasFamily(colFamilyName.getBytes())) ...
java
private void addColumnFamilyAndSetProperties(HTableDescriptor tableDescriptor, String colFamilyName) { if (!tableDescriptor.hasFamily(colFamilyName.getBytes())) { HColumnDescriptor hColumnDescriptor = getColumnDescriptor(colFamilyName); tableDescriptor.addFamily(hColumnDescri...
[ "private", "void", "addColumnFamilyAndSetProperties", "(", "HTableDescriptor", "tableDescriptor", ",", "String", "colFamilyName", ")", "{", "if", "(", "!", "tableDescriptor", ".", "hasFamily", "(", "colFamilyName", ".", "getBytes", "(", ")", ")", ")", "{", "HColum...
Adds the column family and set properties. @param tableDescriptor the table descriptor @param colFamilyName the sec table
[ "Adds", "the", "column", "family", "and", "set", "properties", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-hbase/kundera-hbase-v2/src/main/java/com/impetus/client/hbase/schemamanager/HBaseSchemaManager.java#L362-L370
google/error-prone-javac
src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java
MemoryFileManager.inferBinaryName
@Override public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file) { """ Infers a binary name of a file object based on a location. The binary name returned might not be a valid binary name according to <cite>The Java&trade { throw new UnsupportedOperationException("Not s...
java
@Override public String inferBinaryName(JavaFileManager.Location location, JavaFileObject file) { if (file instanceof OutputMemoryJavaFileObject) { OutputMemoryJavaFileObject ofo = (OutputMemoryJavaFileObject) file; proc.debug(DBG_FMGR, "inferBinaryName %s => %s\n", file, ofo.getName...
[ "@", "Override", "public", "String", "inferBinaryName", "(", "JavaFileManager", ".", "Location", "location", ",", "JavaFileObject", "file", ")", "{", "if", "(", "file", "instanceof", "OutputMemoryJavaFileObject", ")", "{", "OutputMemoryJavaFileObject", "ofo", "=", "...
Infers a binary name of a file object based on a location. The binary name returned might not be a valid binary name according to <cite>The Java&trade { throw new UnsupportedOperationException("Not supported yet."); } Language Specification</cite>. @param location a location @param file a file object @return ...
[ "Infers", "a", "binary", "name", "of", "a", "file", "object", "based", "on", "a", "location", ".", "The", "binary", "name", "returned", "might", "not", "be", "a", "valid", "binary", "name", "according", "to", "<cite", ">", "The", "Java&trade", "{", "thro...
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.jshell/share/classes/jdk/jshell/MemoryFileManager.java#L282-L291
xiaosunzhu/resource-utils
src/main/java/net/sunyijun/resource/config/Configs.java
Configs.getSelfConfig
public static String getSelfConfig(String configAbsoluteClassPath, IConfigKey key) { """ Get self config string. @param configAbsoluteClassPath config path. @param key config key in configAbsoluteClassPath config file @return config value string. Return null if not add config file or not c...
java
public static String getSelfConfig(String configAbsoluteClassPath, IConfigKey key) { OneProperties configs = otherConfigs.get(configAbsoluteClassPath); if (configs == null) { addSelfConfigs(configAbsoluteClassPath, null); configs = otherConfigs.get(configAbsoluteClassPath); ...
[ "public", "static", "String", "getSelfConfig", "(", "String", "configAbsoluteClassPath", ",", "IConfigKey", "key", ")", "{", "OneProperties", "configs", "=", "otherConfigs", ".", "get", "(", "configAbsoluteClassPath", ")", ";", "if", "(", "configs", "==", "null", ...
Get self config string. @param configAbsoluteClassPath config path. @param key config key in configAbsoluteClassPath config file @return config value string. Return null if not add config file or not config in config file. @see #addSelfConfigs(String, OneProperties)
[ "Get", "self", "config", "string", "." ]
train
https://github.com/xiaosunzhu/resource-utils/blob/4f2bf3f36df10195a978f122ed682ba1eb0462b5/src/main/java/net/sunyijun/resource/config/Configs.java#L205-L215
a-schild/jave2
jave-core/src/main/java/ws/schild/jave/MultimediaObject.java
MultimediaObject.getInfo
public MultimediaInfo getInfo() throws InputFormatException, EncoderException { """ Returns a set informations about a multimedia file, if its format is supported for decoding. @return A set of informations about the file and its contents. @throws InputFormatException If the format of the source f...
java
public MultimediaInfo getInfo() throws InputFormatException, EncoderException { if (inputFile.canRead()) { FFMPEGExecutor ffmpeg = locator.createExecutor(); ffmpeg.addArgument("-i"); ffmpeg.addArgument(inputFile.getAbsolutePath()); try ...
[ "public", "MultimediaInfo", "getInfo", "(", ")", "throws", "InputFormatException", ",", "EncoderException", "{", "if", "(", "inputFile", ".", "canRead", "(", ")", ")", "{", "FFMPEGExecutor", "ffmpeg", "=", "locator", ".", "createExecutor", "(", ")", ";", "ffmp...
Returns a set informations about a multimedia file, if its format is supported for decoding. @return A set of informations about the file and its contents. @throws InputFormatException If the format of the source file cannot be recognized and decoded. @throws EncoderException If a problem occurs calling the underlying...
[ "Returns", "a", "set", "informations", "about", "a", "multimedia", "file", "if", "its", "format", "is", "supported", "for", "decoding", "." ]
train
https://github.com/a-schild/jave2/blob/1e7d6a1ca7c27cc63570f1aabb5c84ee124f3e26/jave-core/src/main/java/ws/schild/jave/MultimediaObject.java#L95-L122
pravega/pravega
controller/src/main/java/io/pravega/controller/metrics/StreamMetrics.java
StreamMetrics.updateStream
public void updateStream(String scope, String streamName, Duration latency) { """ This method increments the global and Stream-specific counters of Stream updates and reports the latency of the operation. @param scope Scope. @param streamName Name of the Stream. @param latency Latency of the...
java
public void updateStream(String scope, String streamName, Duration latency) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(UPDATE_STREAM), 1); DYNAMIC_LOGGER.incCounterValue(UPDATE_STREAM, 1, streamTags(scope, streamName)); updateStreamLatency.reportSuccessValue(latency.toMillis()); }
[ "public", "void", "updateStream", "(", "String", "scope", ",", "String", "streamName", ",", "Duration", "latency", ")", "{", "DYNAMIC_LOGGER", ".", "incCounterValue", "(", "globalMetricName", "(", "UPDATE_STREAM", ")", ",", "1", ")", ";", "DYNAMIC_LOGGER", ".", ...
This method increments the global and Stream-specific counters of Stream updates and reports the latency of the operation. @param scope Scope. @param streamName Name of the Stream. @param latency Latency of the updateStream operation.
[ "This", "method", "increments", "the", "global", "and", "Stream", "-", "specific", "counters", "of", "Stream", "updates", "and", "reports", "the", "latency", "of", "the", "operation", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/metrics/StreamMetrics.java#L139-L143
inkstand-io/scribble
scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java
Directory.addPartitionInternal
protected void addPartitionInternal(final String partitionId, final String suffix) throws Exception { """ Creates an AVL implementation based in-memory partition. A partition is required to add entries or import LIDF data. Once the partition was added, the context entry has to be created. If you're using the ldif...
java
protected void addPartitionInternal(final String partitionId, final String suffix) throws Exception { //NOSONAR final DirectoryService service = this.getDirectoryService(); final CacheService cacheService = service.getCacheService(); final SchemaManager schemaManager = service.getSchemaManager...
[ "protected", "void", "addPartitionInternal", "(", "final", "String", "partitionId", ",", "final", "String", "suffix", ")", "throws", "Exception", "{", "//NOSONAR", "final", "DirectoryService", "service", "=", "this", ".", "getDirectoryService", "(", ")", ";", "fin...
Creates an AVL implementation based in-memory partition. A partition is required to add entries or import LIDF data. Once the partition was added, the context entry has to be created. If you're using the ldif import, the use of this method and the ldif file may look like <pre> <code> directory.addPartition(&quot;scribb...
[ "Creates", "an", "AVL", "implementation", "based", "in", "-", "memory", "partition", ".", "A", "partition", "is", "required", "to", "add", "entries", "or", "import", "LIDF", "data", ".", "Once", "the", "partition", "was", "added", "the", "context", "entry", ...
train
https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-ldap/src/main/java/io/inkstand/scribble/rules/ldap/Directory.java#L264-L284
facebookarchive/hadoop-20
src/core/org/apache/hadoop/util/UTF8ByteArrayUtils.java
UTF8ByteArrayUtils.findBytes
public static int findBytes(byte [] utf, int start, int end, byte[] b) { """ Find the first occurrence of the given bytes b in a UTF-8 encoded string @param utf a byte array containing a UTF-8 encoded string @param start starting offset @param end ending position @param b the bytes to find @return position th...
java
public static int findBytes(byte [] utf, int start, int end, byte[] b) { int matchEnd = end - b.length; for(int i=start; i<=matchEnd; i++) { boolean matched = true; for(int j=0; j<b.length; j++) { if (utf[i+j] != b[j]) { matched = false; break; } } if ...
[ "public", "static", "int", "findBytes", "(", "byte", "[", "]", "utf", ",", "int", "start", ",", "int", "end", ",", "byte", "[", "]", "b", ")", "{", "int", "matchEnd", "=", "end", "-", "b", ".", "length", ";", "for", "(", "int", "i", "=", "start...
Find the first occurrence of the given bytes b in a UTF-8 encoded string @param utf a byte array containing a UTF-8 encoded string @param start starting offset @param end ending position @param b the bytes to find @return position that first byte occures otherwise -1
[ "Find", "the", "first", "occurrence", "of", "the", "given", "bytes", "b", "in", "a", "UTF", "-", "8", "encoded", "string" ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/core/org/apache/hadoop/util/UTF8ByteArrayUtils.java#L47-L62
ironjacamar/ironjacamar
codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java
MbeanImplCodeGen.writeGetConnection
private void writeGetConnection(Definition def, Writer out, int indent) throws IOException { """ Output getConnection method @param def definition @param out Writer @param indent space number @throws IOException ioException """ String connInterface = def.getMcfDefs().get(0).getConnInterfaceCl...
java
private void writeGetConnection(Definition def, Writer out, int indent) throws IOException { String connInterface = def.getMcfDefs().get(0).getConnInterfaceClass(); String cfInterface = def.getMcfDefs().get(0).getCfInterfaceClass(); writeWithIndent(out, indent, "/**\n"); writeWithIndent(out,...
[ "private", "void", "writeGetConnection", "(", "Definition", "def", ",", "Writer", "out", ",", "int", "indent", ")", "throws", "IOException", "{", "String", "connInterface", "=", "def", ".", "getMcfDefs", "(", ")", ".", "get", "(", "0", ")", ".", "getConnIn...
Output getConnection method @param def definition @param out Writer @param indent space number @throws IOException ioException
[ "Output", "getConnection", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/codegenerator/src/main/java/org/ironjacamar/codegenerator/code/MbeanImplCodeGen.java#L205-L232
broadinstitute/barclay
src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java
CommandLineArgumentParser.loadCollectionListFile
private static List<String> loadCollectionListFile(final String collectionListFile) { """ Read a list file and return a list of the collection values contained in it Any line that starts with {@link CommandLineArgumentParser#ARGUMENT_FILE_COMMENT} is ignored. @param collectionListFile a text file containing li...
java
private static List<String> loadCollectionListFile(final String collectionListFile) { try (BufferedReader reader = new BufferedReader(new FileReader(collectionListFile))){ return reader.lines() .map(String::trim) .filter(line -> !line.isEmpty()) ...
[ "private", "static", "List", "<", "String", ">", "loadCollectionListFile", "(", "final", "String", "collectionListFile", ")", "{", "try", "(", "BufferedReader", "reader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "collectionListFile", ")", ")", ...
Read a list file and return a list of the collection values contained in it Any line that starts with {@link CommandLineArgumentParser#ARGUMENT_FILE_COMMENT} is ignored. @param collectionListFile a text file containing list values @return false if a fatal error occurred
[ "Read", "a", "list", "file", "and", "return", "a", "list", "of", "the", "collection", "values", "contained", "in", "it", "Any", "line", "that", "starts", "with", "{", "@link", "CommandLineArgumentParser#ARGUMENT_FILE_COMMENT", "}", "is", "ignored", "." ]
train
https://github.com/broadinstitute/barclay/blob/7e56d725766b0da3baff23e79a31c3d01c3589c2/src/main/java/org/broadinstitute/barclay/argparser/CommandLineArgumentParser.java#L643-L653
tvesalainen/util
util/src/main/java/org/vesalainen/nio/channels/ChannelHelper.java
ChannelHelper.writeAll
public static void writeAll(GatheringByteChannel ch, ByteBuffer[] bbs, int offset, int length) throws IOException { """ Attempts to write all remaining data in bbs. @param ch Target @param bbs @param offset @param length @throws IOException If couldn't write all. """ long all = 0; for (i...
java
public static void writeAll(GatheringByteChannel ch, ByteBuffer[] bbs, int offset, int length) throws IOException { long all = 0; for (int ii=0;ii<length;ii++) { all += bbs[offset+ii].remaining(); } int count = 0; while (all > 0) { ...
[ "public", "static", "void", "writeAll", "(", "GatheringByteChannel", "ch", ",", "ByteBuffer", "[", "]", "bbs", ",", "int", "offset", ",", "int", "length", ")", "throws", "IOException", "{", "long", "all", "=", "0", ";", "for", "(", "int", "ii", "=", "0...
Attempts to write all remaining data in bbs. @param ch Target @param bbs @param offset @param length @throws IOException If couldn't write all.
[ "Attempts", "to", "write", "all", "remaining", "data", "in", "bbs", "." ]
train
https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/channels/ChannelHelper.java#L277-L301
looly/hutool
hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java
DateUtil.isIn
public static boolean isIn(Date date, Date beginDate, Date endDate) { """ 当前日期是否在日期指定范围内<br> 起始日期和结束日期可以互换 @param date 被检查的日期 @param beginDate 起始日期 @param endDate 结束日期 @return 是否在范围内 @since 3.0.8 """ if (date instanceof DateTime) { return ((DateTime) date).isIn(beginDate, endDate); } else { ...
java
public static boolean isIn(Date date, Date beginDate, Date endDate) { if (date instanceof DateTime) { return ((DateTime) date).isIn(beginDate, endDate); } else { return new DateTime(date).isIn(beginDate, endDate); } }
[ "public", "static", "boolean", "isIn", "(", "Date", "date", ",", "Date", "beginDate", ",", "Date", "endDate", ")", "{", "if", "(", "date", "instanceof", "DateTime", ")", "{", "return", "(", "(", "DateTime", ")", "date", ")", ".", "isIn", "(", "beginDat...
当前日期是否在日期指定范围内<br> 起始日期和结束日期可以互换 @param date 被检查的日期 @param beginDate 起始日期 @param endDate 结束日期 @return 是否在范围内 @since 3.0.8
[ "当前日期是否在日期指定范围内<br", ">", "起始日期和结束日期可以互换" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/date/DateUtil.java#L1366-L1372
gallandarakhneorg/afc
core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java
Transform2D.makeScaleMatrix
public void makeScaleMatrix(double scaleX, double scaleY) { """ Sets the value of this matrix to the given scaling, without rotation. <p>This function changes all the elements of the matrix, including the shearing and the translation. <p>After a call to this function, the matrix will contains (? means any...
java
public void makeScaleMatrix(double scaleX, double scaleY) { this.m00 = scaleX; this.m01 = 0.; this.m02 = 0.; this.m10 = 0.; this.m11 = scaleY; this.m12 = 0.; this.m20 = 0.; this.m21 = 0.; this.m22 = 1.; }
[ "public", "void", "makeScaleMatrix", "(", "double", "scaleX", ",", "double", "scaleY", ")", "{", "this", ".", "m00", "=", "scaleX", ";", "this", ".", "m01", "=", "0.", ";", "this", ".", "m02", "=", "0.", ";", "this", ".", "m10", "=", "0.", ";", "...
Sets the value of this matrix to the given scaling, without rotation. <p>This function changes all the elements of the matrix, including the shearing and the translation. <p>After a call to this function, the matrix will contains (? means any value): <pre> [ sx 0 0 ] [ 0 sy 0 ] [ 0 0 1 ] </pre> ...
[ "Sets", "the", "value", "of", "this", "matrix", "to", "the", "given", "scaling", "without", "rotation", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/maths/mathgeom/src/main/java/org/arakhne/afc/math/geometry/d2/Transform2D.java#L639-L651
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java
MapComposedElement.setPointAt
public boolean setPointAt(int groupIndex, int indexInGroup, double x, double y, boolean canonize) { """ Set the specified point at the given index in the specified group. @param groupIndex is the index of the group @param indexInGroup is the index of the ponit in the group (0 for the first point of the group....
java
public boolean setPointAt(int groupIndex, int indexInGroup, double x, double y, boolean canonize) { final int startIndex = firstInGroup(groupIndex); // Besure that the member's index is in the group index's range final int groupMemberCount = getPointCountInGroup(groupIndex); if (indexInGroup < 0) { throw ne...
[ "public", "boolean", "setPointAt", "(", "int", "groupIndex", ",", "int", "indexInGroup", ",", "double", "x", ",", "double", "y", ",", "boolean", "canonize", ")", "{", "final", "int", "startIndex", "=", "firstInGroup", "(", "groupIndex", ")", ";", "// Besure ...
Set the specified point at the given index in the specified group. @param groupIndex is the index of the group @param indexInGroup is the index of the ponit in the group (0 for the first point of the group...). @param x is the new value. @param y is the new value. @param canonize indicates if the function {@link #cano...
[ "Set", "the", "specified", "point", "at", "the", "given", "index", "in", "the", "specified", "group", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapComposedElement.java#L1025-L1054
voldemort/voldemort
src/java/voldemort/utils/RebalanceUtils.java
RebalanceUtils.dumpAnalysisToFile
public static void dumpAnalysisToFile(String outputDirName, String baseFileName, PartitionBalance partitionBalance) { """ Prints a balance analysis to a file. @param outputDirName @param baseFileName suffix '.analysis' is appen...
java
public static void dumpAnalysisToFile(String outputDirName, String baseFileName, PartitionBalance partitionBalance) { if(outputDirName != null) { File outputDir = new File(outputDirName); if(!outputDir.ex...
[ "public", "static", "void", "dumpAnalysisToFile", "(", "String", "outputDirName", ",", "String", "baseFileName", ",", "PartitionBalance", "partitionBalance", ")", "{", "if", "(", "outputDirName", "!=", "null", ")", "{", "File", "outputDir", "=", "new", "File", "...
Prints a balance analysis to a file. @param outputDirName @param baseFileName suffix '.analysis' is appended to baseFileName. @param partitionBalance
[ "Prints", "a", "balance", "analysis", "to", "a", "file", "." ]
train
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/utils/RebalanceUtils.java#L595-L611
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/RecurseDirectoryAndAddFiles.java
RecurseDirectoryAndAddFiles.recurseAndAddFiles
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file) { """ Recurses the given folder and creates the FileModels vertices for the child files to the graph. """ if (javaConfigurationService.checkIfIgnored(eve...
java
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file) { if (javaConfigurationService.checkIfIgnored(event, file)) return; String filePath = file.getFilePath(); File fileReference = ne...
[ "private", "void", "recurseAndAddFiles", "(", "GraphRewrite", "event", ",", "FileService", "fileService", ",", "WindupJavaConfigurationService", "javaConfigurationService", ",", "FileModel", "file", ")", "{", "if", "(", "javaConfigurationService", ".", "checkIfIgnored", "...
Recurses the given folder and creates the FileModels vertices for the child files to the graph.
[ "Recurses", "the", "given", "folder", "and", "creates", "the", "FileModels", "vertices", "for", "the", "child", "files", "to", "the", "graph", "." ]
train
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/RecurseDirectoryAndAddFiles.java#L51-L81
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.DL
public static HtmlTree DL(Content body) { """ Generates a DL tag with some content. @param body content for the tag @return an HtmlTree object for the DL tag """ HtmlTree htmltree = new HtmlTree(HtmlTag.DL, nullCheck(body)); return htmltree; }
java
public static HtmlTree DL(Content body) { HtmlTree htmltree = new HtmlTree(HtmlTag.DL, nullCheck(body)); return htmltree; }
[ "public", "static", "HtmlTree", "DL", "(", "Content", "body", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "DL", ",", "nullCheck", "(", "body", ")", ")", ";", "return", "htmltree", ";", "}" ]
Generates a DL tag with some content. @param body content for the tag @return an HtmlTree object for the DL tag
[ "Generates", "a", "DL", "tag", "with", "some", "content", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L321-L324
alkacon/opencms-core
src/org/opencms/util/CmsParameterEscaper.java
CmsParameterEscaper.readPolicy
public static Policy readPolicy(CmsObject cms, String sitePath) { """ Helper method for reading an AntiSamy policy file from the VFS.<p> @param cms the current CMS context @param sitePath the site path of the policy file @return the policy object for the given path """ try { CmsF...
java
public static Policy readPolicy(CmsObject cms, String sitePath) { try { CmsFile policyFile = cms.readFile(sitePath); ByteArrayInputStream input = new ByteArrayInputStream(policyFile.getContents()); // we use the deprecated method here because it is the only way to loa...
[ "public", "static", "Policy", "readPolicy", "(", "CmsObject", "cms", ",", "String", "sitePath", ")", "{", "try", "{", "CmsFile", "policyFile", "=", "cms", ".", "readFile", "(", "sitePath", ")", ";", "ByteArrayInputStream", "input", "=", "new", "ByteArrayInputS...
Helper method for reading an AntiSamy policy file from the VFS.<p> @param cms the current CMS context @param sitePath the site path of the policy file @return the policy object for the given path
[ "Helper", "method", "for", "reading", "an", "AntiSamy", "policy", "file", "from", "the", "VFS", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsParameterEscaper.java#L96-L115
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/openStreetMap/OpenStreetMapRenderer.java
OpenStreetMapRenderer.encodeBegin
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { """ This methods generates the HTML code of the current b:openStreetMap. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate...
java
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { if (!component.isRendered()) { return; } OpenStreetMap openStreetMap = (OpenStreetMap) component; ResponseWriter rw = context.getResponseWriter(); String clientId = openStreetMap.getClientId(); rw.st...
[ "@", "Override", "public", "void", "encodeBegin", "(", "FacesContext", "context", ",", "UIComponent", "component", ")", "throws", "IOException", "{", "if", "(", "!", "component", ".", "isRendered", "(", ")", ")", "{", "return", ";", "}", "OpenStreetMap", "op...
This methods generates the HTML code of the current b:openStreetMap. <code>encodeBegin</code> generates the start of the component. After the, the JSF framework calls <code>encodeChildren()</code> to generate the HTML code between the beginning and the end of the component. For instance, in the case of a panel componen...
[ "This", "methods", "generates", "the", "HTML", "code", "of", "the", "current", "b", ":", "openStreetMap", ".", "<code", ">", "encodeBegin<", "/", "code", ">", "generates", "the", "start", "of", "the", "component", ".", "After", "the", "the", "JSF", "framew...
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/openStreetMap/OpenStreetMapRenderer.java#L59-L74
jbundle/jbundle
thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageReceiver.java
BaseMessageReceiver.setNewFilterProperties
public void setNewFilterProperties(BaseMessageFilter messageFilter, Object[][] mxProperties, Map<String, Object> propFilter) { """ Update this filter with this new information. Override this to do something if there is a remote version of this filter. @param messageFilter The message filter I am updating. @para...
java
public void setNewFilterProperties(BaseMessageFilter messageFilter, Object[][] mxProperties, Map<String, Object> propFilter) { this.getMessageFilterList().setNewFilterTree(messageFilter, mxProperties); }
[ "public", "void", "setNewFilterProperties", "(", "BaseMessageFilter", "messageFilter", ",", "Object", "[", "]", "[", "]", "mxProperties", ",", "Map", "<", "String", ",", "Object", ">", "propFilter", ")", "{", "this", ".", "getMessageFilterList", "(", ")", ".",...
Update this filter with this new information. Override this to do something if there is a remote version of this filter. @param messageFilter The message filter I am updating. @param propKeys New key filter information (ie, bookmark=345). @param propFilter New filter information.
[ "Update", "this", "filter", "with", "this", "new", "information", ".", "Override", "this", "to", "do", "something", "if", "there", "is", "a", "remote", "version", "of", "this", "filter", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageReceiver.java#L160-L163