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
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java
ModuleIndexWriter.addModulesList
protected void addModulesList(Collection<ModuleElement> modules, String text, String tableSummary, Content body) { """ Add the list of modules. @param text The table caption @param tableSummary the summary of the table tag @param body the content tree to which the module list will be added """ Con...
java
protected void addModulesList(Collection<ModuleElement> modules, String text, String tableSummary, Content body) { Content table = (configuration.isOutputHtml5()) ? HtmlTree.TABLE(HtmlStyle.overviewSummary, getTableCaption(new RawHtml(text))) : HtmlTree.TABLE(HtmlStyle.overviewSu...
[ "protected", "void", "addModulesList", "(", "Collection", "<", "ModuleElement", ">", "modules", ",", "String", "text", ",", "String", "tableSummary", ",", "Content", "body", ")", "{", "Content", "table", "=", "(", "configuration", ".", "isOutputHtml5", "(", ")...
Add the list of modules. @param text The table caption @param tableSummary the summary of the table tag @param body the content tree to which the module list will be added
[ "Add", "the", "list", "of", "modules", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ModuleIndexWriter.java#L144-L160
google/error-prone-javac
src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
SerializedFormBuilder.buildClassSerializedForm
public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) { """ Build the class serialized form. @param node the XML element that specifies which components to document @param packageSerializedTree content tree to which the documentation will be added """ Content classSerial...
java
public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) { Content classSerializedTree = writer.getClassSerializedHeader(); ClassDoc[] classes = currentPackage.allClasses(false); Arrays.sort(classes); for (ClassDoc classDoc : classes) { currentClass =...
[ "public", "void", "buildClassSerializedForm", "(", "XMLNode", "node", ",", "Content", "packageSerializedTree", ")", "{", "Content", "classSerializedTree", "=", "writer", ".", "getClassSerializedHeader", "(", ")", ";", "ClassDoc", "[", "]", "classes", "=", "currentPa...
Build the class serialized form. @param node the XML element that specifies which components to document @param packageSerializedTree content tree to which the documentation will be added
[ "Build", "the", "class", "serialized", "form", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java#L214-L232
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/modules/r/interpolation2d/core/TPSInterpolator.java
TPSInterpolator.fillOsubMatrix
private void fillOsubMatrix( Coordinate[] controlPoints, GeneralMatrix L ) { """ Fill O submatrix (<a href="http://elonen.iki.fi/code/tpsdemo/index.html"> see more here</a>) """ int controlPointsNum = controlPoints.length; for( int i = controlPointsNum; i < (controlPointsNum + 3); i++ ) { ...
java
private void fillOsubMatrix( Coordinate[] controlPoints, GeneralMatrix L ) { int controlPointsNum = controlPoints.length; for( int i = controlPointsNum; i < (controlPointsNum + 3); i++ ) { for( int j = controlPointsNum; j < (controlPointsNum + 3); j++ ) { L.setElement(i, j, 0...
[ "private", "void", "fillOsubMatrix", "(", "Coordinate", "[", "]", "controlPoints", ",", "GeneralMatrix", "L", ")", "{", "int", "controlPointsNum", "=", "controlPoints", ".", "length", ";", "for", "(", "int", "i", "=", "controlPointsNum", ";", "i", "<", "(", ...
Fill O submatrix (<a href="http://elonen.iki.fi/code/tpsdemo/index.html"> see more here</a>)
[ "Fill", "O", "submatrix", "(", "<a", "href", "=", "http", ":", "//", "elonen", ".", "iki", ".", "fi", "/", "code", "/", "tpsdemo", "/", "index", ".", "html", ">", "see", "more", "here<", "/", "a", ">", ")" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/modules/r/interpolation2d/core/TPSInterpolator.java#L155-L162
alkacon/opencms-core
src/org/opencms/i18n/CmsEncoder.java
CmsEncoder.createString
public static String createString(byte[] bytes, String encoding) { """ Creates a String out of a byte array with the specified encoding, falling back to the system default in case the encoding name is not valid.<p> Use this method as a replacement for <code>new String(byte[], encoding)</code> to avoid possibl...
java
public static String createString(byte[] bytes, String encoding) { String enc = encoding.intern(); if (enc != OpenCms.getSystemInfo().getDefaultEncoding()) { enc = lookupEncoding(enc, null); } if (enc != null) { try { return new String(bytes, enc)...
[ "public", "static", "String", "createString", "(", "byte", "[", "]", "bytes", ",", "String", "encoding", ")", "{", "String", "enc", "=", "encoding", ".", "intern", "(", ")", ";", "if", "(", "enc", "!=", "OpenCms", ".", "getSystemInfo", "(", ")", ".", ...
Creates a String out of a byte array with the specified encoding, falling back to the system default in case the encoding name is not valid.<p> Use this method as a replacement for <code>new String(byte[], encoding)</code> to avoid possible encoding problems.<p> @param bytes the bytes to decode @param encoding the en...
[ "Creates", "a", "String", "out", "of", "a", "byte", "array", "with", "the", "specified", "encoding", "falling", "back", "to", "the", "system", "default", "in", "case", "the", "encoding", "name", "is", "not", "valid", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsEncoder.java#L213-L239
elki-project/elki
addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java
XSplitter.add2MBR
private void add2MBR(int[] entrySorting, List<Heap<DoubleIntPair>> pqUB, List<Heap<DoubleIntPair>> pqLB, int index) { """ Adds the minimum and maximum bounds of the MBR of entry number <code>entrySorting[index]</code> to the dimension-wise upper and lower bound priority queues <code>pqUBFirst</code> and <code>p...
java
private void add2MBR(int[] entrySorting, List<Heap<DoubleIntPair>> pqUB, List<Heap<DoubleIntPair>> pqLB, int index) { SpatialComparable currMBR = node.getEntry(entrySorting[index]); for(int d = 0; d < currMBR.getDimensionality(); d++) { double max = currMBR.getMax(d); pqUB.get(d).add(new DoubleIntPa...
[ "private", "void", "add2MBR", "(", "int", "[", "]", "entrySorting", ",", "List", "<", "Heap", "<", "DoubleIntPair", ">", ">", "pqUB", ",", "List", "<", "Heap", "<", "DoubleIntPair", ">", ">", "pqLB", ",", "int", "index", ")", "{", "SpatialComparable", ...
Adds the minimum and maximum bounds of the MBR of entry number <code>entrySorting[index]</code> to the dimension-wise upper and lower bound priority queues <code>pqUBFirst</code> and <code>pqLBFirst</code>. @param entrySorting a sorting providing the mapping of <code>index</code> to the entry to be added @param pqUB O...
[ "Adds", "the", "minimum", "and", "maximum", "bounds", "of", "the", "MBR", "of", "entry", "number", "<code", ">", "entrySorting", "[", "index", "]", "<", "/", "code", ">", "to", "the", "dimension", "-", "wise", "upper", "and", "lower", "bound", "priority"...
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/xtree/src/main/java/de/lmu/ifi/dbs/elki/index/tree/spatial/rstarvariants/xtree/util/XSplitter.java#L302-L310
ept/warc-hadoop
src/main/java/com/martinkl/warc/mapred/WARCOutputFormat.java
WARCOutputFormat.getRecordWriter
@Override public RecordWriter<NullWritable, WARCWritable> getRecordWriter(FileSystem fs, JobConf job, String filename, Progressable progress) throws IOException { """ Creates a new output file in WARC format, and returns a RecordWriter for wri...
java
@Override public RecordWriter<NullWritable, WARCWritable> getRecordWriter(FileSystem fs, JobConf job, String filename, Progressable progress) throws IOException { return new WARCWriter(job, filename, progress); }
[ "@", "Override", "public", "RecordWriter", "<", "NullWritable", ",", "WARCWritable", ">", "getRecordWriter", "(", "FileSystem", "fs", ",", "JobConf", "job", ",", "String", "filename", ",", "Progressable", "progress", ")", "throws", "IOException", "{", "return", ...
Creates a new output file in WARC format, and returns a RecordWriter for writing to it.
[ "Creates", "a", "new", "output", "file", "in", "WARC", "format", "and", "returns", "a", "RecordWriter", "for", "writing", "to", "it", "." ]
train
https://github.com/ept/warc-hadoop/blob/f41cbb8002c29053eed9206e50ab9787de7da67f/src/main/java/com/martinkl/warc/mapred/WARCOutputFormat.java#L38-L42
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.cudnnSetTensor
public static int cudnnSetTensor( cudnnHandle handle, cudnnTensorDescriptor yDesc, Pointer y, Pointer valuePtr) { """ Set all values of a tensor to a given value : y[i] = value[0] """ return checkResult(cudnnSetTensorNative(handle, yDesc, y, valuePtr)); }
java
public static int cudnnSetTensor( cudnnHandle handle, cudnnTensorDescriptor yDesc, Pointer y, Pointer valuePtr) { return checkResult(cudnnSetTensorNative(handle, yDesc, y, valuePtr)); }
[ "public", "static", "int", "cudnnSetTensor", "(", "cudnnHandle", "handle", ",", "cudnnTensorDescriptor", "yDesc", ",", "Pointer", "y", ",", "Pointer", "valuePtr", ")", "{", "return", "checkResult", "(", "cudnnSetTensorNative", "(", "handle", ",", "yDesc", ",", "...
Set all values of a tensor to a given value : y[i] = value[0]
[ "Set", "all", "values", "of", "a", "tensor", "to", "a", "given", "value", ":", "y", "[", "i", "]", "=", "value", "[", "0", "]" ]
train
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L690-L697
nmorel/gwt-jackson
gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/property/FieldAccessor.java
FieldAccessor.getAccessor
public Accessor getAccessor( final String beanName, Object... params ) { """ <p>getAccessor</p> @param beanName a {@link java.lang.String} object. @param params a {@link java.lang.Object} object. @return a {@link com.github.nmorel.gwtjackson.rebind.property.FieldAccessor.Accessor} object. """ fina...
java
public Accessor getAccessor( final String beanName, Object... params ) { final boolean useJsni; if ( useMethod ) { useJsni = method.get().isPrivate() || (!samePackage && !method.get().isPublic()); } // else use the field else { useJsni = field.get().isPriv...
[ "public", "Accessor", "getAccessor", "(", "final", "String", "beanName", ",", "Object", "...", "params", ")", "{", "final", "boolean", "useJsni", ";", "if", "(", "useMethod", ")", "{", "useJsni", "=", "method", ".", "get", "(", ")", ".", "isPrivate", "("...
<p>getAccessor</p> @param beanName a {@link java.lang.String} object. @param params a {@link java.lang.Object} object. @return a {@link com.github.nmorel.gwtjackson.rebind.property.FieldAccessor.Accessor} object.
[ "<p", ">", "getAccessor<", "/", "p", ">" ]
train
https://github.com/nmorel/gwt-jackson/blob/3fdc4350a27a9b64fc437d5fe516bf9191b74824/gwt-jackson/src/main/java/com/github/nmorel/gwtjackson/rebind/property/FieldAccessor.java#L130-L140
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/Response.java
Response.andHeaders
public Response andHeaders(Map<HttpString, String> headers) { """ Adds an additional header map to the response. Already existing values with the same key are overwritten. @param headers The headers map to add @return A response object {@link io.mangoo.routing.Response} """ Objects.requireNonNull(...
java
public Response andHeaders(Map<HttpString, String> headers) { Objects.requireNonNull(headers, Required.HEADERS.toString()); this.headers.putAll(headers); return this; }
[ "public", "Response", "andHeaders", "(", "Map", "<", "HttpString", ",", "String", ">", "headers", ")", "{", "Objects", ".", "requireNonNull", "(", "headers", ",", "Required", ".", "HEADERS", ".", "toString", "(", ")", ")", ";", "this", ".", "headers", "....
Adds an additional header map to the response. Already existing values with the same key are overwritten. @param headers The headers map to add @return A response object {@link io.mangoo.routing.Response}
[ "Adds", "an", "additional", "header", "map", "to", "the", "response", ".", "Already", "existing", "values", "with", "the", "same", "key", "are", "overwritten", "." ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/Response.java#L439-L444
alkacon/opencms-core
src/org/opencms/file/CmsRequestContext.java
CmsRequestContext.addSiteRoot
public String addSiteRoot(String siteRoot, String resourcename) { """ Adds the given site root of this context to the given resource name, taking into account special folders like "/system" where no site root must be added, and also translates the resource name with the configured the directory translator.<p> ...
java
public String addSiteRoot(String siteRoot, String resourcename) { if ((resourcename == null) || (siteRoot == null)) { return null; } siteRoot = getAdjustedSiteRoot(siteRoot, resourcename); StringBuffer result = new StringBuffer(128); result.append(siteRoot); ...
[ "public", "String", "addSiteRoot", "(", "String", "siteRoot", ",", "String", "resourcename", ")", "{", "if", "(", "(", "resourcename", "==", "null", ")", "||", "(", "siteRoot", "==", "null", ")", ")", "{", "return", "null", ";", "}", "siteRoot", "=", "...
Adds the given site root of this context to the given resource name, taking into account special folders like "/system" where no site root must be added, and also translates the resource name with the configured the directory translator.<p> @param siteRoot the site root to add @param resourcename the resource name @re...
[ "Adds", "the", "given", "site", "root", "of", "this", "context", "to", "the", "given", "resource", "name", "taking", "into", "account", "special", "folders", "like", "/", "system", "where", "no", "site", "root", "must", "be", "added", "and", "also", "trans...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/file/CmsRequestContext.java#L204-L219
infinispan/infinispan
core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java
BaseAsyncInterceptor.asyncInvokeNext
public final Object asyncInvokeNext(InvocationContext ctx, VisitableCommand command, CompletionStage<?> delay) { """ Suspend the invocation until {@code delay} completes, then if successful invoke the next interceptor. <p>If {@code delay} is null or already completed norma...
java
public final Object asyncInvokeNext(InvocationContext ctx, VisitableCommand command, CompletionStage<?> delay) { if (delay == null || CompletionStages.isCompletedSuccessfully(delay)) { return invokeNext(ctx, command); } return asyncValue(delay).thenApply...
[ "public", "final", "Object", "asyncInvokeNext", "(", "InvocationContext", "ctx", ",", "VisitableCommand", "command", ",", "CompletionStage", "<", "?", ">", "delay", ")", "{", "if", "(", "delay", "==", "null", "||", "CompletionStages", ".", "isCompletedSuccessfully...
Suspend the invocation until {@code delay} completes, then if successful invoke the next interceptor. <p>If {@code delay} is null or already completed normally, immediately invoke the next interceptor in this thread.</p> <p>If {@code delay} completes exceptionally, skip the next interceptor and continue with the exce...
[ "Suspend", "the", "invocation", "until", "{", "@code", "delay", "}", "completes", "then", "if", "successful", "invoke", "the", "next", "interceptor", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/core/src/main/java/org/infinispan/interceptors/BaseAsyncInterceptor.java#L226-L232
EdwardRaff/JSAT
JSAT/src/jsat/DataSet.java
DataSet.getDataWeights
public Vec getDataWeights() { """ This method returns the weight of each data point in a single Vector. When all data points have the same weight, this will return a vector that uses fixed memory instead of allocating a full double backed array. @return a vector that will return the weight for each data point...
java
public Vec getDataWeights() { final int N = this.size(); if(N == 0) return new DenseVector(0); //assume everyone has the same weight until proven otherwise. double weight = getWeight(0); double[] weights_copy = null; for(int i = 1; i < N;...
[ "public", "Vec", "getDataWeights", "(", ")", "{", "final", "int", "N", "=", "this", ".", "size", "(", ")", ";", "if", "(", "N", "==", "0", ")", "return", "new", "DenseVector", "(", "0", ")", ";", "//assume everyone has the same weight until proven otherwise....
This method returns the weight of each data point in a single Vector. When all data points have the same weight, this will return a vector that uses fixed memory instead of allocating a full double backed array. @return a vector that will return the weight for each data point with the same corresponding index.
[ "This", "method", "returns", "the", "weight", "of", "each", "data", "point", "in", "a", "single", "Vector", ".", "When", "all", "data", "points", "have", "the", "same", "weight", "this", "will", "return", "a", "vector", "that", "uses", "fixed", "memory", ...
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/DataSet.java#L880-L907
enioka/jqm
jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/JqmEngineFactory.java
JqmEngineFactory.startEngine
public static JqmEngineOperations startEngine(String name, JqmEngineHandler handler) { """ Creates and start an engine representing the node named as the given parameter. @param name name of the node, as present in the configuration (case sensitive) @param handler can be null. A set of callbacks hooked on di...
java
public static JqmEngineOperations startEngine(String name, JqmEngineHandler handler) { JqmEngine e = new JqmEngine(); e.start(name, handler); return e; }
[ "public", "static", "JqmEngineOperations", "startEngine", "(", "String", "name", ",", "JqmEngineHandler", "handler", ")", "{", "JqmEngine", "e", "=", "new", "JqmEngine", "(", ")", ";", "e", ".", "start", "(", "name", ",", "handler", ")", ";", "return", "e"...
Creates and start an engine representing the node named as the given parameter. @param name name of the node, as present in the configuration (case sensitive) @param handler can be null. A set of callbacks hooked on different engine life cycle events. @return an object allowing to stop the engine.
[ "Creates", "and", "start", "an", "engine", "representing", "the", "node", "named", "as", "the", "given", "parameter", "." ]
train
https://github.com/enioka/jqm/blob/391733b8e291404b97c714c3727a241c4a861f98/jqm-all/jqm-engine/src/main/java/com/enioka/jqm/tools/JqmEngineFactory.java#L23-L28
ist-dresden/composum
sling/core/commons/src/main/java/com/composum/sling/core/InheritedValues.java
InheritedValues.findOriginAndValue
public HierarchyScanResult findOriginAndValue(String name, Class<?> type) { """ Searches the value along the repositories hierarchy by the entry point and path determined before. @param name the property name or path @param type the expected type of the value @return the value found or <code>null</code> if no...
java
public HierarchyScanResult findOriginAndValue(String name, Class<?> type) { Object value; findEntryPoint(); String path = getRelativePath(name); for (Resource parent = entryPoint; parent != null; parent = parent.getParent()) { ValueMap parentProps = parent.adaptTo(ValueMap.cl...
[ "public", "HierarchyScanResult", "findOriginAndValue", "(", "String", "name", ",", "Class", "<", "?", ">", "type", ")", "{", "Object", "value", ";", "findEntryPoint", "(", ")", ";", "String", "path", "=", "getRelativePath", "(", "name", ")", ";", "for", "(...
Searches the value along the repositories hierarchy by the entry point and path determined before. @param name the property name or path @param type the expected type of the value @return the value found or <code>null</code> if no such value found in one of the appropriate parent nodes
[ "Searches", "the", "value", "along", "the", "repositories", "hierarchy", "by", "the", "entry", "point", "and", "path", "determined", "before", "." ]
train
https://github.com/ist-dresden/composum/blob/ebc79f559f6022c935240c19102539bdfb1bd1e2/sling/core/commons/src/main/java/com/composum/sling/core/InheritedValues.java#L155-L172
mapsforge/mapsforge
sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java
DatabaseUtils.appendValueToSql
public static final void appendValueToSql(StringBuilder sql, Object value) { """ Appends an Object to an SQL string with the proper escaping, etc. """ if (value == null) { sql.append("NULL"); } else if (value instanceof Boolean) { Boolean bool = (Boolean)value; ...
java
public static final void appendValueToSql(StringBuilder sql, Object value) { if (value == null) { sql.append("NULL"); } else if (value instanceof Boolean) { Boolean bool = (Boolean)value; if (bool) { sql.append('1'); } else { ...
[ "public", "static", "final", "void", "appendValueToSql", "(", "StringBuilder", "sql", ",", "Object", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "sql", ".", "append", "(", "\"NULL\"", ")", ";", "}", "else", "if", "(", "value", "insta...
Appends an Object to an SQL string with the proper escaping, etc.
[ "Appends", "an", "Object", "to", "an", "SQL", "string", "with", "the", "proper", "escaping", "etc", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/sqlite-android/src/main/java/org/sqlite/database/DatabaseUtils.java#L373-L386
nabedge/mixer2
src/main/java/org/mixer2/xhtml/AbstractJaxb.java
AbstractJaxb.insertBeforeId
public boolean insertBeforeId(String id, String insString) throws TagTypeUnmatchException { """ <p>insert string before the element having specified id attribute.</p> @param id @param insString @return true if success to insert. if no hit, return false. @throws TagTypeUnmatchException """ ...
java
public boolean insertBeforeId(String id, String insString) throws TagTypeUnmatchException { return InsertByIdUtil.insertBeforeId(id, insString, this); }
[ "public", "boolean", "insertBeforeId", "(", "String", "id", ",", "String", "insString", ")", "throws", "TagTypeUnmatchException", "{", "return", "InsertByIdUtil", ".", "insertBeforeId", "(", "id", ",", "insString", ",", "this", ")", ";", "}" ]
<p>insert string before the element having specified id attribute.</p> @param id @param insString @return true if success to insert. if no hit, return false. @throws TagTypeUnmatchException
[ "<p", ">", "insert", "string", "before", "the", "element", "having", "specified", "id", "attribute", ".", "<", "/", "p", ">" ]
train
https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/AbstractJaxb.java#L530-L533
before/quality-check
modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java
ConditionalCheck.isNumber
@ArgumentsChecked @Throws( { """ Ensures that a String argument is a number. @param condition condition must be {@code true}^ so that the check will be performed @param value value which must be a number @throws IllegalNumberArgumentException if the given argument {@code value} is not a number """ Ill...
java
@ArgumentsChecked @Throws({ IllegalNullArgumentException.class, IllegalNumberArgumentException.class }) public static void isNumber(final boolean condition, @Nonnull final String value) { if (condition) { Check.isNumber(value); } }
[ "@", "ArgumentsChecked", "@", "Throws", "(", "{", "IllegalNullArgumentException", ".", "class", ",", "IllegalNumberArgumentException", ".", "class", "}", ")", "public", "static", "void", "isNumber", "(", "final", "boolean", "condition", ",", "@", "Nonnull", "final...
Ensures that a String argument is a number. @param condition condition must be {@code true}^ so that the check will be performed @param value value which must be a number @throws IllegalNumberArgumentException if the given argument {@code value} is not a number
[ "Ensures", "that", "a", "String", "argument", "is", "a", "number", "." ]
train
https://github.com/before/quality-check/blob/a75c32c39434ddb1f89bece57acae0536724c15a/modules/quality-check/src/main/java/net/sf/qualitycheck/ConditionalCheck.java#L812-L818
talsma-ict/umldoclet
src/main/java/nl/talsmasoftware/umldoclet/util/FileUtils.java
FileUtils.openReaderTo
public static Reader openReaderTo(String basedir, URI uri, String charsetName) throws IOException { """ Opens a reader to the specified URI. <p> If the call {@code uri.toURL().openStream()} succeeds, a reader is wrapped and returned. Otherwise, if the URI is absolute, an attempt is made to open it as a file. If...
java
public static Reader openReaderTo(String basedir, URI uri, String charsetName) throws IOException { try { return new InputStreamReader(uri.toURL().openStream(), charsetName); } catch (IOException | RuntimeException ex) { try { File uriAsFile = uri.isAbsolute() && ...
[ "public", "static", "Reader", "openReaderTo", "(", "String", "basedir", ",", "URI", "uri", ",", "String", "charsetName", ")", "throws", "IOException", "{", "try", "{", "return", "new", "InputStreamReader", "(", "uri", ".", "toURL", "(", ")", ".", "openStream...
Opens a reader to the specified URI. <p> If the call {@code uri.toURL().openStream()} succeeds, a reader is wrapped and returned. Otherwise, if the URI is absolute, an attempt is made to open it as a file. If this also fails, a last effort is made to open the uri relative to the specified {@code basedir} directory. @p...
[ "Opens", "a", "reader", "to", "the", "specified", "URI", ".", "<p", ">", "If", "the", "call", "{", "@code", "uri", ".", "toURL", "()", ".", "openStream", "()", "}", "succeeds", "a", "reader", "is", "wrapped", "and", "returned", ".", "Otherwise", "if", ...
train
https://github.com/talsma-ict/umldoclet/blob/373b23f2646603fddca4a495e9eccbb4a4491fdf/src/main/java/nl/talsmasoftware/umldoclet/util/FileUtils.java#L124-L137
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java
FactoryThresholdBinary.blockMinMax
public static <T extends ImageGray<T>> InputToBinary<T> blockMinMax(ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, double minimumSpread, Class<T> inputType) { """ Applies a very fast non-overlapping block thresholding algorithm which uses min/max statistics. @s...
java
public static <T extends ImageGray<T>> InputToBinary<T> blockMinMax(ConfigLength regionWidth, double scale, boolean down, boolean thresholdFromLocalBlocks, double minimumSpread, Class<T> inputType) { if( BOverrideFactoryThresholdBinary.blockMinMax != null ) return BOverrideFactoryThresholdBinary.blockMin...
[ "public", "static", "<", "T", "extends", "ImageGray", "<", "T", ">", ">", "InputToBinary", "<", "T", ">", "blockMinMax", "(", "ConfigLength", "regionWidth", ",", "double", "scale", ",", "boolean", "down", ",", "boolean", "thresholdFromLocalBlocks", ",", "doubl...
Applies a very fast non-overlapping block thresholding algorithm which uses min/max statistics. @see ThresholdBlockMinMax @param regionWidth Approximate size of block region @param scale Scale factor adjust for threshold. 1.0 means no change. @param down Should it threshold up or down. @param minimumSpread If the di...
[ "Applies", "a", "very", "fast", "non", "-", "overlapping", "block", "thresholding", "algorithm", "which", "uses", "min", "/", "max", "statistics", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/factory/filter/binary/FactoryThresholdBinary.java#L155-L173
boncey/Flickr4Java
src/main/java/com/flickr4java/flickr/groups/pools/PoolsInterface.java
PoolsInterface.getContext
public PhotoContext getContext(String photoId, String groupId) throws FlickrException { """ Get the context for a photo in the group pool. This method does not require authentication. @param photoId The photo ID @param groupId The group ID @return The PhotoContext @throws FlickrException """ ...
java
public PhotoContext getContext(String photoId, String groupId) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_CONTEXT); parameters.put("photo_id", photoId); parameters.put("group_id", groupId); ...
[ "public", "PhotoContext", "getContext", "(", "String", "photoId", ",", "String", "groupId", ")", "throws", "FlickrException", "{", "Map", "<", "String", ",", "Object", ">", "parameters", "=", "new", "HashMap", "<", "String", ",", "Object", ">", "(", ")", "...
Get the context for a photo in the group pool. This method does not require authentication. @param photoId The photo ID @param groupId The group ID @return The PhotoContext @throws FlickrException
[ "Get", "the", "context", "for", "a", "photo", "in", "the", "group", "pool", "." ]
train
https://github.com/boncey/Flickr4Java/blob/f66987ba0e360e5fb7730efbbb8c51f3d978fc25/src/main/java/com/flickr4java/flickr/groups/pools/PoolsInterface.java#L89-L117
http-builder-ng/http-builder-ng
http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java
HttpBuilder.putAsync
public <T> CompletableFuture<T> putAsync(final Class<T> type, @DelegatesTo(HttpConfig.class) final Closure closure) { """ Executes an asynchronous PUT request on the configured URI (asynchronous alias to the `put(Class,Closure)` method), with additional configuration provided by the configuration closure. The res...
java
public <T> CompletableFuture<T> putAsync(final Class<T> type, @DelegatesTo(HttpConfig.class) final Closure closure) { return CompletableFuture.supplyAsync(() -> put(type, closure), getExecutor()); }
[ "public", "<", "T", ">", "CompletableFuture", "<", "T", ">", "putAsync", "(", "final", "Class", "<", "T", ">", "type", ",", "@", "DelegatesTo", "(", "HttpConfig", ".", "class", ")", "final", "Closure", "closure", ")", "{", "return", "CompletableFuture", ...
Executes an asynchronous PUT request on the configured URI (asynchronous alias to the `put(Class,Closure)` method), with additional configuration provided by the configuration closure. The result will be cast to the specified `type`. [source,groovy] ---- def http = HttpBuilder.configure { request.uri = 'http://localho...
[ "Executes", "an", "asynchronous", "PUT", "request", "on", "the", "configured", "URI", "(", "asynchronous", "alias", "to", "the", "put", "(", "Class", "Closure", ")", "method", ")", "with", "additional", "configuration", "provided", "by", "the", "configuration", ...
train
https://github.com/http-builder-ng/http-builder-ng/blob/865f37732c102c748d3db8b905199dac9222a525/http-builder-ng-core/src/main/java/groovyx/net/http/HttpBuilder.java#L1054-L1056
casbin/jcasbin
src/main/java/org/casbin/jcasbin/rbac/DefaultRoleManager.java
DefaultRoleManager.deleteLink
@Override public void deleteLink(String name1, String name2, String... domain) { """ deleteLink deletes the inheritance link between role: name1 and role: name2. aka role: name1 does not inherit role: name2 any more. domain is a prefix to the roles. """ if (domain.length == 1) { name1...
java
@Override public void deleteLink(String name1, String name2, String... domain) { if (domain.length == 1) { name1 = domain[0] + "::" + name1; name2 = domain[0] + "::" + name2; } else if (domain.length > 1) { throw new Error("error: domain should be 1 parameter"); ...
[ "@", "Override", "public", "void", "deleteLink", "(", "String", "name1", ",", "String", "name2", ",", "String", "...", "domain", ")", "{", "if", "(", "domain", ".", "length", "==", "1", ")", "{", "name1", "=", "domain", "[", "0", "]", "+", "\"::\"", ...
deleteLink deletes the inheritance link between role: name1 and role: name2. aka role: name1 does not inherit role: name2 any more. domain is a prefix to the roles.
[ "deleteLink", "deletes", "the", "inheritance", "link", "between", "role", ":", "name1", "and", "role", ":", "name2", ".", "aka", "role", ":", "name1", "does", "not", "inherit", "role", ":", "name2", "any", "more", ".", "domain", "is", "a", "prefix", "to"...
train
https://github.com/casbin/jcasbin/blob/b46d7a756b6c39cdb17e0600607e5fcdc66edd11/src/main/java/org/casbin/jcasbin/rbac/DefaultRoleManager.java#L85-L101
line/armeria
core/src/main/java/com/linecorp/armeria/server/cors/CorsServiceBuilder.java
CorsServiceBuilder.preflightResponseHeader
public CorsServiceBuilder preflightResponseHeader(CharSequence name, Object... values) { """ Returns HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers t...
java
public CorsServiceBuilder preflightResponseHeader(CharSequence name, Object... values) { firstPolicyBuilder.preflightResponseHeader(name, values); return this; }
[ "public", "CorsServiceBuilder", "preflightResponseHeader", "(", "CharSequence", "name", ",", "Object", "...", "values", ")", "{", "firstPolicyBuilder", ".", "preflightResponseHeader", "(", "name", ",", "values", ")", ";", "return", "this", ";", "}" ]
Returns HTTP response headers that should be added to a CORS preflight response. <p>An intermediary like a load balancer might require that a CORS preflight request have certain headers set. This enables such headers to be added. @param name the name of the HTTP header. @param values the values for the HTTP header. @...
[ "Returns", "HTTP", "response", "headers", "that", "should", "be", "added", "to", "a", "CORS", "preflight", "response", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/cors/CorsServiceBuilder.java#L301-L304
spotbugs/spotbugs
spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java
Project.makeAbsoluteCwdCandidates
private List<String> makeAbsoluteCwdCandidates(String fileName) { """ Make the given filename absolute relative to the current working directory candidates. If the given filename exists in more than one of the working directories, a list of these existing absolute paths is returned. The returned list is gu...
java
private List<String> makeAbsoluteCwdCandidates(String fileName) { List<String> candidates = new ArrayList<>(); boolean hasProtocol = (URLClassPath.getURLProtocol(fileName) != null); if (hasProtocol) { candidates.add(fileName); return candidates; } if (ne...
[ "private", "List", "<", "String", ">", "makeAbsoluteCwdCandidates", "(", "String", "fileName", ")", "{", "List", "<", "String", ">", "candidates", "=", "new", "ArrayList", "<>", "(", ")", ";", "boolean", "hasProtocol", "=", "(", "URLClassPath", ".", "getURLP...
Make the given filename absolute relative to the current working directory candidates. If the given filename exists in more than one of the working directories, a list of these existing absolute paths is returned. The returned list is guaranteed to be non-empty. The returned paths might exist or not exist and might b...
[ "Make", "the", "given", "filename", "absolute", "relative", "to", "the", "current", "working", "directory", "candidates", "." ]
train
https://github.com/spotbugs/spotbugs/blob/f6365c6eea6515035bded38efa4a7c8b46ccf28c/spotbugs/src/main/java/edu/umd/cs/findbugs/Project.java#L988-L1014
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/sarl/actionprototype/DefaultActionPrototypeProvider.java
DefaultActionPrototypeProvider.createPrototype
protected InferredPrototype createPrototype(QualifiedActionName id, boolean isVarargs, FormalParameterProvider parameters) { """ Build and replies the inferred action signature for the element with the given ID. This function creates the different signatures according to the definition, or not, of default val...
java
protected InferredPrototype createPrototype(QualifiedActionName id, boolean isVarargs, FormalParameterProvider parameters) { assert parameters != null; final ActionParameterTypes key = new ActionParameterTypes(isVarargs, parameters.getFormalParameterCount()); final Map<ActionParameterTypes, List<InferredStanda...
[ "protected", "InferredPrototype", "createPrototype", "(", "QualifiedActionName", "id", ",", "boolean", "isVarargs", ",", "FormalParameterProvider", "parameters", ")", "{", "assert", "parameters", "!=", "null", ";", "final", "ActionParameterTypes", "key", "=", "new", "...
Build and replies the inferred action signature for the element with the given ID. This function creates the different signatures according to the definition, or not, of default values for the formal parameters. @param id identifier of the function. @param isVarargs indicates if the signature has a variatic parameter....
[ "Build", "and", "replies", "the", "inferred", "action", "signature", "for", "the", "element", "with", "the", "given", "ID", ".", "This", "function", "creates", "the", "different", "signatures", "according", "to", "the", "definition", "or", "not", "of", "defaul...
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/sarl/actionprototype/DefaultActionPrototypeProvider.java#L239-L267
Azure/azure-sdk-for-java
containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java
ManagedClustersInner.beginUpdateTagsAsync
public Observable<ManagedClusterInner> beginUpdateTagsAsync(String resourceGroupName, String resourceName) { """ Updates tags on a managed cluster. Updates a managed cluster with the specified tags. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster re...
java
public Observable<ManagedClusterInner> beginUpdateTagsAsync(String resourceGroupName, String resourceName) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, resourceName).map(new Func1<ServiceResponse<ManagedClusterInner>, ManagedClusterInner>() { @Override public Manag...
[ "public", "Observable", "<", "ManagedClusterInner", ">", "beginUpdateTagsAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ")", "{", "return", "beginUpdateTagsWithServiceResponseAsync", "(", "resourceGroupName", ",", "resourceName", ")", ".", "map...
Updates tags on a managed cluster. Updates a managed cluster with the specified tags. @param resourceGroupName The name of the resource group. @param resourceName The name of the managed cluster resource. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ManagedClu...
[ "Updates", "tags", "on", "a", "managed", "cluster", ".", "Updates", "a", "managed", "cluster", "with", "the", "specified", "tags", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/containerservice/resource-manager/v2019_02_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_02_01/implementation/ManagedClustersInner.java#L1191-L1198
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java
FEELImpl.newEvaluationContext
public EvaluationContextImpl newEvaluationContext(Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) { """ Creates a new EvaluationContext using this FEEL instance classloader, and the supplied parameters listeners and inputVariables """ return newEvaluationContext(this.classL...
java
public EvaluationContextImpl newEvaluationContext(Collection<FEELEventListener> listeners, Map<String, Object> inputVariables) { return newEvaluationContext(this.classLoader, listeners, inputVariables); }
[ "public", "EvaluationContextImpl", "newEvaluationContext", "(", "Collection", "<", "FEELEventListener", ">", "listeners", ",", "Map", "<", "String", ",", "Object", ">", "inputVariables", ")", "{", "return", "newEvaluationContext", "(", "this", ".", "classLoader", ",...
Creates a new EvaluationContext using this FEEL instance classloader, and the supplied parameters listeners and inputVariables
[ "Creates", "a", "new", "EvaluationContext", "using", "this", "FEEL", "instance", "classloader", "and", "the", "supplied", "parameters", "listeners", "and", "inputVariables" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/FEELImpl.java#L170-L172
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/util/SerializableUtil.java
SerializableUtil.save
public static void save(Object o, File file) { """ Serializes the object to the provided file. @param o the object to be stored in the file @param file the file in which the object should be stored """ try { FileOutputStream fos = new FileOutputStream(file); ObjectOutputStre...
java
public static void save(Object o, File file) { try { FileOutputStream fos = new FileOutputStream(file); ObjectOutputStream outStream = new ObjectOutputStream(new BufferedOutputStream(fos)); outStream.writeObject(o); outStream.close(); } ca...
[ "public", "static", "void", "save", "(", "Object", "o", ",", "File", "file", ")", "{", "try", "{", "FileOutputStream", "fos", "=", "new", "FileOutputStream", "(", "file", ")", ";", "ObjectOutputStream", "outStream", "=", "new", "ObjectOutputStream", "(", "ne...
Serializes the object to the provided file. @param o the object to be stored in the file @param file the file in which the object should be stored
[ "Serializes", "the", "object", "to", "the", "provided", "file", "." ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/util/SerializableUtil.java#L70-L80
neoremind/fluent-validator
fluent-validator/src/main/java/com/baidu/unbiz/fluentvalidator/QuickValidator.java
QuickValidator.doAndGetComplexResult2
public static ComplexResult2 doAndGetComplexResult2(Decorator decorator, ValidatorContext context) { """ Execute validation by using a new FluentValidator instance with a shared context. The result type is {@link ComplexResult2} @param decorator Same as decorator design pattern, provided to add more functions ...
java
public static ComplexResult2 doAndGetComplexResult2(Decorator decorator, ValidatorContext context) { return validate(decorator, FluentValidator.checkAll(), context, ResultCollectors.toComplex2()); }
[ "public", "static", "ComplexResult2", "doAndGetComplexResult2", "(", "Decorator", "decorator", ",", "ValidatorContext", "context", ")", "{", "return", "validate", "(", "decorator", ",", "FluentValidator", ".", "checkAll", "(", ")", ",", "context", ",", "ResultCollec...
Execute validation by using a new FluentValidator instance with a shared context. The result type is {@link ComplexResult2} @param decorator Same as decorator design pattern, provided to add more functions to the fluentValidator @param context Validation context which can be shared @return ComplexResult2
[ "Execute", "validation", "by", "using", "a", "new", "FluentValidator", "instance", "with", "a", "shared", "context", ".", "The", "result", "type", "is", "{", "@link", "ComplexResult2", "}" ]
train
https://github.com/neoremind/fluent-validator/blob/b516970591aa9468b44ba63938b98ec341fd6ead/fluent-validator/src/main/java/com/baidu/unbiz/fluentvalidator/QuickValidator.java#L51-L53
docusign/docusign-java-client
src/main/java/com/docusign/esign/client/auth/JWTUtils.java
JWTUtils.generateJWTAssertionFromByteArray
public static String generateJWTAssertionFromByteArray(byte[] rsaPrivateKey, String oAuthBasePath, String clientId, String userId, long expiresIn, String scopes) throws IllegalArgumentException, JWTCreationException, IOException { """ Helper method to create a JWT token for the JWT flow @param rsaPrivateKey the b...
java
public static String generateJWTAssertionFromByteArray(byte[] rsaPrivateKey, String oAuthBasePath, String clientId, String userId, long expiresIn, String scopes) throws IllegalArgumentException, JWTCreationException, IOException { if (expiresIn <= 0L) { throw new IllegalArgumentException("expiresIn should be a non...
[ "public", "static", "String", "generateJWTAssertionFromByteArray", "(", "byte", "[", "]", "rsaPrivateKey", ",", "String", "oAuthBasePath", ",", "String", "clientId", ",", "String", "userId", ",", "long", "expiresIn", ",", "String", "scopes", ")", "throws", "Illega...
Helper method to create a JWT token for the JWT flow @param rsaPrivateKey the byte contents of the RSA private key @param oAuthBasePath DocuSign OAuth base path (account-d.docusign.com for the developer sandbox and account.docusign.com for the production platform) @param clientId DocuSign OAuth Client Id (AKA Integrato...
[ "Helper", "method", "to", "create", "a", "JWT", "token", "for", "the", "JWT", "flow" ]
train
https://github.com/docusign/docusign-java-client/blob/17ae82ace0f023e98edf813be832950568212e34/src/main/java/com/docusign/esign/client/auth/JWTUtils.java#L45-L69
Stratio/stratio-cassandra
src/java/com/stratio/cassandra/index/service/ClusteringKeyMapper.java
ClusteringKeyMapper.addFields
public final void addFields(Document document, CellName cellName) { """ Adds to the specified document the clustering key contained in the specified cell name. @param document The document where the clustering key is going to be added. @param cellName A cell name containing the clustering key to be added. ...
java
public final void addFields(Document document, CellName cellName) { String serializedKey = ByteBufferUtils.toString(cellName.toByteBuffer()); Field field = new StringField(FIELD_NAME, serializedKey, Field.Store.YES); document.add(field); }
[ "public", "final", "void", "addFields", "(", "Document", "document", ",", "CellName", "cellName", ")", "{", "String", "serializedKey", "=", "ByteBufferUtils", ".", "toString", "(", "cellName", ".", "toByteBuffer", "(", ")", ")", ";", "Field", "field", "=", "...
Adds to the specified document the clustering key contained in the specified cell name. @param document The document where the clustering key is going to be added. @param cellName A cell name containing the clustering key to be added.
[ "Adds", "to", "the", "specified", "document", "the", "clustering", "key", "contained", "in", "the", "specified", "cell", "name", "." ]
train
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/com/stratio/cassandra/index/service/ClusteringKeyMapper.java#L110-L114
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.getHierarchicalEntityRoles
public List<EntityRole> getHierarchicalEntityRoles(UUID appId, String versionId, UUID hEntityId) { """ Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @throws IllegalArgumentException thrown if p...
java
public List<EntityRole> getHierarchicalEntityRoles(UUID appId, String versionId, UUID hEntityId) { return getHierarchicalEntityRolesWithServiceResponseAsync(appId, versionId, hEntityId).toBlocking().single().body(); }
[ "public", "List", "<", "EntityRole", ">", "getHierarchicalEntityRoles", "(", "UUID", "appId", ",", "String", "versionId", ",", "UUID", "hEntityId", ")", "{", "return", "getHierarchicalEntityRolesWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "hEntityI...
Get All Entity Roles for a given entity. @param appId The application ID. @param versionId The version ID. @param hEntityId The hierarchical entity extractor ID. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws ...
[ "Get", "All", "Entity", "Roles", "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#L9339-L9341
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/br_broker/br_broker.java
br_broker.update
public static br_broker update(nitro_service client, br_broker resource) throws Exception { """ <pre> Use this operation to modify Unified Repeater Instance. </pre> """ resource.validate("modify"); return ((br_broker[]) resource.update_resource(client))[0]; }
java
public static br_broker update(nitro_service client, br_broker resource) throws Exception { resource.validate("modify"); return ((br_broker[]) resource.update_resource(client))[0]; }
[ "public", "static", "br_broker", "update", "(", "nitro_service", "client", ",", "br_broker", "resource", ")", "throws", "Exception", "{", "resource", ".", "validate", "(", "\"modify\"", ")", ";", "return", "(", "(", "br_broker", "[", "]", ")", "resource", "....
<pre> Use this operation to modify Unified Repeater Instance. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "modify", "Unified", "Repeater", "Instance", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/br_broker/br_broker.java#L497-L501
ArcBees/gwtquery
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java
WidgetsUtils.hideAndAfter
public static void hideAndAfter(Element e, Widget widget) { """ Append a widget to a dom element, and hide it. Element classes will be copied to the new widget. """ assert e != null && widget != null; if ($(e).widget() != null && $(e).widget().isAttached()) { replaceWidget($(e).widget(), widget,...
java
public static void hideAndAfter(Element e, Widget widget) { assert e != null && widget != null; if ($(e).widget() != null && $(e).widget().isAttached()) { replaceWidget($(e).widget(), widget, false); } else { detachWidget(widget); hideAndAfter(e, widget.getElement()); attachWidget(wi...
[ "public", "static", "void", "hideAndAfter", "(", "Element", "e", ",", "Widget", "widget", ")", "{", "assert", "e", "!=", "null", "&&", "widget", "!=", "null", ";", "if", "(", "$", "(", "e", ")", ".", "widget", "(", ")", "!=", "null", "&&", "$", "...
Append a widget to a dom element, and hide it. Element classes will be copied to the new widget.
[ "Append", "a", "widget", "to", "a", "dom", "element", "and", "hide", "it", ".", "Element", "classes", "will", "be", "copied", "to", "the", "new", "widget", "." ]
train
https://github.com/ArcBees/gwtquery/blob/93e02bc8eb030081061c56134ebee1f585981107/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/widgets/WidgetsUtils.java#L50-L59
grails/grails-core
grails-encoder/src/main/groovy/org/grails/buffer/StringCharArrayAccessor.java
StringCharArrayAccessor.writeStringAsCharArray
static public void writeStringAsCharArray(Writer writer, String str, int off, int len) throws IOException { """ Writes a portion of a string to a target java.io.Writer with direct access to the char[] of the java.lang.String @param writer target java.io.Writer for output @param str A String @param of...
java
static public void writeStringAsCharArray(Writer writer, String str, int off, int len) throws IOException { if (!enabled) { writeStringFallback(writer, str, off, len); return; } char[] value; int internalOffset=0; try { value = (char[])valueFi...
[ "static", "public", "void", "writeStringAsCharArray", "(", "Writer", "writer", ",", "String", "str", ",", "int", "off", ",", "int", "len", ")", "throws", "IOException", "{", "if", "(", "!", "enabled", ")", "{", "writeStringFallback", "(", "writer", ",", "s...
Writes a portion of a string to a target java.io.Writer with direct access to the char[] of the java.lang.String @param writer target java.io.Writer for output @param str A String @param off Offset from which to start writing characters @param len Number of characters to write @throws IOException If an I/O er...
[ "Writes", "a", "portion", "of", "a", "string", "to", "a", "target", "java", ".", "io", ".", "Writer", "with", "direct", "access", "to", "the", "char", "[]", "of", "the", "java", ".", "lang", ".", "String" ]
train
https://github.com/grails/grails-core/blob/c0b08aa995b0297143b75d05642abba8cb7b4122/grails-encoder/src/main/groovy/org/grails/buffer/StringCharArrayAccessor.java#L113-L133
opentok/Opentok-Java-SDK
src/main/java/com/opentok/OpenTok.java
OpenTok.setArchiveLayout
public void setArchiveLayout(String archiveId, ArchiveProperties properties) throws OpenTokException { """ Sets the layout type for a composed archive. For a description of layout types, see <a href="https://tokbox.com/developer/guides/archiving/layout-control.html">Customizing the video layout for composed arch...
java
public void setArchiveLayout(String archiveId, ArchiveProperties properties) throws OpenTokException { if (StringUtils.isEmpty(archiveId) || properties == null) { throw new InvalidArgumentException("ArchiveId is not valid or properties are null"); } this.client.setArchiveLayout(archi...
[ "public", "void", "setArchiveLayout", "(", "String", "archiveId", ",", "ArchiveProperties", "properties", ")", "throws", "OpenTokException", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "archiveId", ")", "||", "properties", "==", "null", ")", "{", "throw"...
Sets the layout type for a composed archive. For a description of layout types, see <a href="https://tokbox.com/developer/guides/archiving/layout-control.html">Customizing the video layout for composed archives</a>. @param archiveId {String} The archive ID. @param properties This ArchiveProperties object defining the...
[ "Sets", "the", "layout", "type", "for", "a", "composed", "archive", ".", "For", "a", "description", "of", "layout", "types", "see", "<a", "href", "=", "https", ":", "//", "tokbox", ".", "com", "/", "developer", "/", "guides", "/", "archiving", "/", "la...
train
https://github.com/opentok/Opentok-Java-SDK/blob/d71b7999facc3131c415aebea874ea55776d477f/src/main/java/com/opentok/OpenTok.java#L502-L507
wildfly/wildfly-core
server/src/main/java/org/jboss/as/server/deployment/reflect/ClassReflectionIndexUtil.java
ClassReflectionIndexUtil.findRequiredMethod
public static Method findRequiredMethod(final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> clazz, final Method method) throws DeploymentUnitProcessingException { """ Finds and returns a method corresponding to the passed <code>method</code>, which may be declared in the super class of the p...
java
public static Method findRequiredMethod(final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> clazz, final Method method) throws DeploymentUnitProcessingException { Assert.checkNotNullParam("method", method); final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierFor...
[ "public", "static", "Method", "findRequiredMethod", "(", "final", "DeploymentReflectionIndex", "deploymentReflectionIndex", ",", "final", "Class", "<", "?", ">", "clazz", ",", "final", "Method", "method", ")", "throws", "DeploymentUnitProcessingException", "{", "Assert"...
Finds and returns a method corresponding to the passed <code>method</code>, which may be declared in the super class of the passed <code>classReflectionIndex</code>. <p/> <p/> Throws {@link org.jboss.as.server.deployment.DeploymentUnitProcessingException} if no such method is found. @param deploymentReflectionIndex Th...
[ "Finds", "and", "returns", "a", "method", "corresponding", "to", "the", "passed", "<code", ">", "method<", "/", "code", ">", "which", "may", "be", "declared", "in", "the", "super", "class", "of", "the", "passed", "<code", ">", "classReflectionIndex<", "/", ...
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/reflect/ClassReflectionIndexUtil.java#L119-L123
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the commerce price lists where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CommercePriceList commercePriceList : findByUuid_C(uuid, companyId, Q...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommercePriceList commercePriceList : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceList); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommercePriceList", "commercePriceList", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "Qu...
Removes all the commerce price lists where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "price", "lists", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L1411-L1417
radkovo/jStyleParser
src/main/java/cz/vutbr/web/css/CSSFactory.java
CSSFactory.getUsedStyles
public static final StyleSheet getUsedStyles(Document doc, String encoding, URL base, MediaSpec media, NetworkProcessor network) { """ Loads all the style sheets used from the specified DOM tree. The following style specifications are evaluated: <ul> <li>The style sheets included using the <code>link</code> and...
java
public static final StyleSheet getUsedStyles(Document doc, String encoding, URL base, MediaSpec media, NetworkProcessor network) { SourceData pair = new SourceData(base, network, media); Traversal<StyleSheet> traversal = new CSSAssignTraversal(doc, encoding, pair, NodeFilter.SHOW_EL...
[ "public", "static", "final", "StyleSheet", "getUsedStyles", "(", "Document", "doc", ",", "String", "encoding", ",", "URL", "base", ",", "MediaSpec", "media", ",", "NetworkProcessor", "network", ")", "{", "SourceData", "pair", "=", "new", "SourceData", "(", "ba...
Loads all the style sheets used from the specified DOM tree. The following style specifications are evaluated: <ul> <li>The style sheets included using the <code>link</code> and <code>style</code> tags. <li>Inline styles specified using the <code>style</code> element attribute. <li><strong>Proprietary extension:</stron...
[ "Loads", "all", "the", "style", "sheets", "used", "from", "the", "specified", "DOM", "tree", ".", "The", "following", "style", "specifications", "are", "evaluated", ":", "<ul", ">", "<li", ">", "The", "style", "sheets", "included", "using", "the", "<code", ...
train
https://github.com/radkovo/jStyleParser/blob/8ab049ac6866aa52c4d7deee25c9e294e7191957/src/main/java/cz/vutbr/web/css/CSSFactory.java#L570-L580
doubledutch/LazyJSON
src/main/java/me/doubledutch/lazyjson/LazyArray.java
LazyArray.getJSONArray
public LazyArray getJSONArray(int index) throws LazyException { """ Returns the JSON array stored at the given index. @param index the location of the value in this array @return the value if it could be parsed as a JSON array @throws LazyException if the index is out of bounds """ LazyNode token=getVal...
java
public LazyArray getJSONArray(int index) throws LazyException{ LazyNode token=getValueToken(index); if(token.type!=LazyNode.ARRAY)throw new LazyException("Requested value is not an array",token); LazyArray arr= new LazyArray(token); arr.parent=this; return arr; }
[ "public", "LazyArray", "getJSONArray", "(", "int", "index", ")", "throws", "LazyException", "{", "LazyNode", "token", "=", "getValueToken", "(", "index", ")", ";", "if", "(", "token", ".", "type", "!=", "LazyNode", ".", "ARRAY", ")", "throw", "new", "LazyE...
Returns the JSON array stored at the given index. @param index the location of the value in this array @return the value if it could be parsed as a JSON array @throws LazyException if the index is out of bounds
[ "Returns", "the", "JSON", "array", "stored", "at", "the", "given", "index", "." ]
train
https://github.com/doubledutch/LazyJSON/blob/1a223f57fc0cb9941bc175739697ac95da5618cc/src/main/java/me/doubledutch/lazyjson/LazyArray.java#L436-L442
nielsbasjes/logparser
parser-core/src/main/java/nl/basjes/parse/core/Parser.java
Parser.getCasts
public EnumSet<Casts> getCasts(String name) throws MissingDissectorsException, InvalidDissectorException { """ Returns the casts possible for the specified path. Before you call 'getCasts' the actual parser needs to be constructed. Simply calling getPossiblePaths does not build the actual parser. If you want to...
java
public EnumSet<Casts> getCasts(String name) throws MissingDissectorsException, InvalidDissectorException { assembleDissectors(); return castsOfTargets.get(name); }
[ "public", "EnumSet", "<", "Casts", ">", "getCasts", "(", "String", "name", ")", "throws", "MissingDissectorsException", ",", "InvalidDissectorException", "{", "assembleDissectors", "(", ")", ";", "return", "castsOfTargets", ".", "get", "(", "name", ")", ";", "}"...
Returns the casts possible for the specified path. Before you call 'getCasts' the actual parser needs to be constructed. Simply calling getPossiblePaths does not build the actual parser. If you want to get the casts for all possible paths the code looks something like this: <pre>{@code Parser<Object> dummyParser= new H...
[ "Returns", "the", "casts", "possible", "for", "the", "specified", "path", ".", "Before", "you", "call", "getCasts", "the", "actual", "parser", "needs", "to", "be", "constructed", ".", "Simply", "calling", "getPossiblePaths", "does", "not", "build", "the", "act...
train
https://github.com/nielsbasjes/logparser/blob/236d5bf91926addab82b20387262bb35da8512cd/parser-core/src/main/java/nl/basjes/parse/core/Parser.java#L126-L129
wnameless/rubycollect4j
src/main/java/net/sf/rubycollect4j/RubyObject.java
RubyObject.send
public static <E> E send(Object o, String methodName, Float arg) { """ Executes a method of any Object by Java reflection. @param o an Object @param methodName name of the method @param arg a Float @return the result of the method called """ return send(o, methodName, (Object) arg); }
java
public static <E> E send(Object o, String methodName, Float arg) { return send(o, methodName, (Object) arg); }
[ "public", "static", "<", "E", ">", "E", "send", "(", "Object", "o", ",", "String", "methodName", ",", "Float", "arg", ")", "{", "return", "send", "(", "o", ",", "methodName", ",", "(", "Object", ")", "arg", ")", ";", "}" ]
Executes a method of any Object by Java reflection. @param o an Object @param methodName name of the method @param arg a Float @return the result of the method called
[ "Executes", "a", "method", "of", "any", "Object", "by", "Java", "reflection", "." ]
train
https://github.com/wnameless/rubycollect4j/blob/b8b8d8eccaca2254a3d09b91745882fb7a0d5add/src/main/java/net/sf/rubycollect4j/RubyObject.java#L255-L257
meltmedia/cadmium
servlets/src/main/java/com/meltmedia/cadmium/servlets/AbstractSecureRedirectStrategy.java
AbstractSecureRedirectStrategy.makeSecure
@Override public void makeSecure(HttpServletRequest request, HttpServletResponse response) throws IOException { """ Sends a moved perminately redirect to the secure form of the request URL. @request the request to make secure. @response the response for the request. """ response.setStatus(HttpSer...
java
@Override public void makeSecure(HttpServletRequest request, HttpServletResponse response) throws IOException { response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); response.setHeader("Location", secureUrl(request, response)); response.getOutputStream().flush(); response.getOutputStream...
[ "@", "Override", "public", "void", "makeSecure", "(", "HttpServletRequest", "request", ",", "HttpServletResponse", "response", ")", "throws", "IOException", "{", "response", ".", "setStatus", "(", "HttpServletResponse", ".", "SC_MOVED_PERMANENTLY", ")", ";", "response...
Sends a moved perminately redirect to the secure form of the request URL. @request the request to make secure. @response the response for the request.
[ "Sends", "a", "moved", "perminately", "redirect", "to", "the", "secure", "form", "of", "the", "request", "URL", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/servlets/src/main/java/com/meltmedia/cadmium/servlets/AbstractSecureRedirectStrategy.java#L154-L162
RobotiumTech/robotium
robotium-solo/src/main/java/com/robotium/solo/Solo.java
Solo.waitForText
public boolean waitForText(String text, int minimumNumberOfMatches, long timeout, boolean scroll, boolean onlyVisible) { """ Waits for the specified text to appear. @param text the text to wait for, specified as a regular expression @param minimumNumberOfMatches the minimum number of matches that are expected ...
java
public boolean waitForText(String text, int minimumNumberOfMatches, long timeout, boolean scroll, boolean onlyVisible) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "waitForText(\""+text+"\", "+minimumNumberOfMatches+", "+timeout+", "+scroll+", "+onlyVisible+")"); } return (waiter.waitForText...
[ "public", "boolean", "waitForText", "(", "String", "text", ",", "int", "minimumNumberOfMatches", ",", "long", "timeout", ",", "boolean", "scroll", ",", "boolean", "onlyVisible", ")", "{", "if", "(", "config", ".", "commandLogging", ")", "{", "Log", ".", "d",...
Waits for the specified text to appear. @param text the text to wait for, specified as a regular expression @param minimumNumberOfMatches the minimum number of matches that are expected to be found. {@code 0} means any number of matches @param timeout the the amount of time in milliseconds to wait @param scroll {@code...
[ "Waits", "for", "the", "specified", "text", "to", "appear", "." ]
train
https://github.com/RobotiumTech/robotium/blob/75e567c38f26a6a87dc8bef90b3886a20e28d291/robotium-solo/src/main/java/com/robotium/solo/Solo.java#L436-L442
Mozu/mozu-java
mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java
ProductUrl.addProductInCatalogUrl
public static MozuUrl addProductInCatalogUrl(String productCode, String responseFields) { """ Get Resource Url for AddProductInCatalog @param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product. @param responseFields Filtering syntax appended t...
java
public static MozuUrl addProductInCatalogUrl(String productCode, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs?responseFields={responseFields}"); formatter.formatUrl("productCode", productCode); formatter.formatUrl("re...
[ "public", "static", "MozuUrl", "addProductInCatalogUrl", "(", "String", "productCode", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/catalog/admin/products/{productCode}/ProductInCatalogs?responseFields={...
Get Resource Url for AddProductInCatalog @param productCode The unique, user-defined product code of a product, used throughout to reference and associate to a product. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This paramete...
[ "Get", "Resource", "Url", "for", "AddProductInCatalog" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-java-core/src/main/java/com/mozu/api/urls/commerce/catalog/admin/ProductUrl.java#L102-L108
samskivert/samskivert
src/main/java/com/samskivert/util/Runnables.java
Runnables.asRunnable
public static Runnable asRunnable (Object instance, String methodName) { """ Creates a runnable that invokes the specified method on the specified instance via reflection. <p> NOTE: if you specify a protected or private method this method will call {@link Method#setAccessible} to make the method accessible. I...
java
public static Runnable asRunnable (Object instance, String methodName) { Class<?> clazz = instance.getClass(); Method method = findMethod(clazz, methodName); if (Modifier.isStatic(method.getModifiers())) { throw new IllegalArgumentException( clazz.getName() + "." ...
[ "public", "static", "Runnable", "asRunnable", "(", "Object", "instance", ",", "String", "methodName", ")", "{", "Class", "<", "?", ">", "clazz", "=", "instance", ".", "getClass", "(", ")", ";", "Method", "method", "=", "findMethod", "(", "clazz", ",", "m...
Creates a runnable that invokes the specified method on the specified instance via reflection. <p> NOTE: if you specify a protected or private method this method will call {@link Method#setAccessible} to make the method accessible. If you're writing secure code or need to run in a sandbox, don't use this functionality...
[ "Creates", "a", "runnable", "that", "invokes", "the", "specified", "method", "on", "the", "specified", "instance", "via", "reflection", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Runnables.java#L37-L46
zxing/zxing
android/src/com/google/zxing/client/android/camera/CameraManager.java
CameraManager.getFramingRect
public synchronized Rect getFramingRect() { """ Calculates the framing rect which the UI should draw to show the user where to place the barcode. This target helps with alignment as well as forces the user to hold the device far enough away to ensure the image will be in focus. @return The rectangle to draw o...
java
public synchronized Rect getFramingRect() { if (framingRect == null) { if (camera == null) { return null; } Point screenResolution = configManager.getScreenResolution(); if (screenResolution == null) { // Called early, before init even finished return null; } ...
[ "public", "synchronized", "Rect", "getFramingRect", "(", ")", "{", "if", "(", "framingRect", "==", "null", ")", "{", "if", "(", "camera", "==", "null", ")", "{", "return", "null", ";", "}", "Point", "screenResolution", "=", "configManager", ".", "getScreen...
Calculates the framing rect which the UI should draw to show the user where to place the barcode. This target helps with alignment as well as forces the user to hold the device far enough away to ensure the image will be in focus. @return The rectangle to draw on screen in window coordinates.
[ "Calculates", "the", "framing", "rect", "which", "the", "UI", "should", "draw", "to", "show", "the", "user", "where", "to", "place", "the", "barcode", ".", "This", "target", "helps", "with", "alignment", "as", "well", "as", "forces", "the", "user", "to", ...
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/android/src/com/google/zxing/client/android/camera/CameraManager.java#L213-L233
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/jboss/logging/Logger.java
Logger.getLogger
public static Logger getLogger(Class<?> clazz, String suffix) { """ Get a Logger instance given the name of a class with the given suffix. <p/> <p>This will include a logger separator between logger name and suffix @param clazz the Class whose name will be used as the logger name @param suffix a suffix to ap...
java
public static Logger getLogger(Class<?> clazz, String suffix) { return getLogger(clazz.getName(), suffix); }
[ "public", "static", "Logger", "getLogger", "(", "Class", "<", "?", ">", "clazz", ",", "String", "suffix", ")", "{", "return", "getLogger", "(", "clazz", ".", "getName", "(", ")", ",", "suffix", ")", ";", "}" ]
Get a Logger instance given the name of a class with the given suffix. <p/> <p>This will include a logger separator between logger name and suffix @param clazz the Class whose name will be used as the logger name @param suffix a suffix to append to the logger name @return the logger
[ "Get", "a", "Logger", "instance", "given", "the", "name", "of", "a", "class", "with", "the", "given", "suffix", ".", "<p", "/", ">", "<p", ">", "This", "will", "include", "a", "logger", "separator", "between", "logger", "name", "and", "suffix" ]
train
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/jboss/logging/Logger.java#L2494-L2496
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/mains/DependencyGenericMain.java
DependencyGenericMain.addDocIterators
protected void addDocIterators(Collection<Iterator<Document>> docIters, String[] fileNames) throws IOException { """ Adds a {@link DependencyFileDocumentIterator} to {@code docIters} for each file name provided. """ boolean removeHeader = argOptions.hasOption('H'); ...
java
protected void addDocIterators(Collection<Iterator<Document>> docIters, String[] fileNames) throws IOException { boolean removeHeader = argOptions.hasOption('H'); for (String s : fileNames) docIters.add( new DependencyFileDocumentIterator(s, rem...
[ "protected", "void", "addDocIterators", "(", "Collection", "<", "Iterator", "<", "Document", ">", ">", "docIters", ",", "String", "[", "]", "fileNames", ")", "throws", "IOException", "{", "boolean", "removeHeader", "=", "argOptions", ".", "hasOption", "(", "'"...
Adds a {@link DependencyFileDocumentIterator} to {@code docIters} for each file name provided.
[ "Adds", "a", "{" ]
train
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/mains/DependencyGenericMain.java#L141-L168
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexWriter.java
IndexWriter.generateBucketDelete
private void generateBucketDelete(TableBucket bucket, UpdateInstructions update) { """ Generates one or more {@link AttributeUpdate}s that will delete a {@link TableBucket}. @param bucket The {@link TableBucket} to delete. @param update A {@link UpdateInstructions} object to collect updates into. ...
java
private void generateBucketDelete(TableBucket bucket, UpdateInstructions update) { if (bucket.exists()) { update.withAttribute(new AttributeUpdate(bucket.getHash(), AttributeUpdateType.Replace, Attributes.NULL_ATTRIBUTE_VALUE)); update.bucketRemoved(); } }
[ "private", "void", "generateBucketDelete", "(", "TableBucket", "bucket", ",", "UpdateInstructions", "update", ")", "{", "if", "(", "bucket", ".", "exists", "(", ")", ")", "{", "update", ".", "withAttribute", "(", "new", "AttributeUpdate", "(", "bucket", ".", ...
Generates one or more {@link AttributeUpdate}s that will delete a {@link TableBucket}. @param bucket The {@link TableBucket} to delete. @param update A {@link UpdateInstructions} object to collect updates into.
[ "Generates", "one", "or", "more", "{", "@link", "AttributeUpdate", "}", "s", "that", "will", "delete", "a", "{", "@link", "TableBucket", "}", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/IndexWriter.java#L210-L215
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java
DisasterRecoveryConfigurationsInner.failoverAllowDataLoss
public void failoverAllowDataLoss(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { """ Fails over from the current primary server to this server. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resource. ...
java
public void failoverAllowDataLoss(String resourceGroupName, String serverName, String disasterRecoveryConfigurationName) { failoverAllowDataLossWithServiceResponseAsync(resourceGroupName, serverName, disasterRecoveryConfigurationName).toBlocking().last().body(); }
[ "public", "void", "failoverAllowDataLoss", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "disasterRecoveryConfigurationName", ")", "{", "failoverAllowDataLossWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ",", "disast...
Fails over from the current primary server to this server. This operation might result in data loss. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param disaster...
[ "Fails", "over", "from", "the", "current", "primary", "server", "to", "this", "server", ".", "This", "operation", "might", "result", "in", "data", "loss", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DisasterRecoveryConfigurationsInner.java#L802-L804
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/parser/PdfContentStreamProcessor.java
PdfContentStreamProcessor.registerContentOperator
public void registerContentOperator(String operatorString, ContentOperator operator) { """ Registers a content operator that will be called when the specified operator string is encountered during content processing. Each operator may be registered only once (it is not legal to have multiple operators with the sa...
java
public void registerContentOperator(String operatorString, ContentOperator operator) { if (operators.containsKey(operatorString)) { throw new IllegalArgumentException("Operator " + operatorString + " already registered"); } operators.put(operatorString, operator); }
[ "public", "void", "registerContentOperator", "(", "String", "operatorString", ",", "ContentOperator", "operator", ")", "{", "if", "(", "operators", ".", "containsKey", "(", "operatorString", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Operator...
Registers a content operator that will be called when the specified operator string is encountered during content processing. Each operator may be registered only once (it is not legal to have multiple operators with the same operatorString) @param operatorString the operator id @param operator the operator that will r...
[ "Registers", "a", "content", "operator", "that", "will", "be", "called", "when", "the", "specified", "operator", "string", "is", "encountered", "during", "content", "processing", ".", "Each", "operator", "may", "be", "registered", "only", "once", "(", "it", "i...
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/parser/PdfContentStreamProcessor.java#L142-L147
querydsl/querydsl
querydsl-core/src/main/java/com/querydsl/core/types/dsl/SimpleExpression.java
SimpleExpression.notIn
public final BooleanExpression notIn(CollectionExpression<?,? extends T> right) { """ Create a {@code this not in right} expression @param right rhs of the comparison @return this not in right """ return Expressions.booleanOperation(Ops.NOT_IN, mixin, right); }
java
public final BooleanExpression notIn(CollectionExpression<?,? extends T> right) { return Expressions.booleanOperation(Ops.NOT_IN, mixin, right); }
[ "public", "final", "BooleanExpression", "notIn", "(", "CollectionExpression", "<", "?", ",", "?", "extends", "T", ">", "right", ")", "{", "return", "Expressions", ".", "booleanOperation", "(", "Ops", ".", "NOT_IN", ",", "mixin", ",", "right", ")", ";", "}"...
Create a {@code this not in right} expression @param right rhs of the comparison @return this not in right
[ "Create", "a", "{", "@code", "this", "not", "in", "right", "}", "expression" ]
train
https://github.com/querydsl/querydsl/blob/2bf234caf78549813a1e0f44d9c30ecc5ef734e3/querydsl-core/src/main/java/com/querydsl/core/types/dsl/SimpleExpression.java#L320-L322
Azure/azure-sdk-for-java
iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/CertificatesInner.java
CertificatesInner.generateVerificationCode
public CertificateWithNonceDescriptionInner generateVerificationCode(String resourceGroupName, String resourceName, String certificateName, String ifMatch) { """ Generate verification code for proof of possession flow. Generates verification code for proof of possession flow. The verification code will be used to...
java
public CertificateWithNonceDescriptionInner generateVerificationCode(String resourceGroupName, String resourceName, String certificateName, String ifMatch) { return generateVerificationCodeWithServiceResponseAsync(resourceGroupName, resourceName, certificateName, ifMatch).toBlocking().single().body(); }
[ "public", "CertificateWithNonceDescriptionInner", "generateVerificationCode", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "String", "certificateName", ",", "String", "ifMatch", ")", "{", "return", "generateVerificationCodeWithServiceResponseAsync", "...
Generate verification code for proof of possession flow. Generates verification code for proof of possession flow. The verification code will be used to generate a leaf certificate. @param resourceGroupName The name of the resource group that contains the IoT hub. @param resourceName The name of the IoT hub. @param ce...
[ "Generate", "verification", "code", "for", "proof", "of", "possession", "flow", ".", "Generates", "verification", "code", "for", "proof", "of", "possession", "flow", ".", "The", "verification", "code", "will", "be", "used", "to", "generate", "a", "leaf", "cert...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/implementation/CertificatesInner.java#L592-L594
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRResourceVolume.java
GVRResourceVolume.openResource
public GVRAndroidResource openResource(String filePath) throws IOException { """ Opens a file from the volume. The filePath is relative to the defaultPath. @param filePath File path of the resource to open. @throws IOException """ // Error tolerance: Remove initial '/' introduced by file::///fi...
java
public GVRAndroidResource openResource(String filePath) throws IOException { // Error tolerance: Remove initial '/' introduced by file::///filename // In this case, the path is interpreted as relative to defaultPath, // which is the root of the filesystem. if (filePath.startsWith(File.se...
[ "public", "GVRAndroidResource", "openResource", "(", "String", "filePath", ")", "throws", "IOException", "{", "// Error tolerance: Remove initial '/' introduced by file::///filename", "// In this case, the path is interpreted as relative to defaultPath,", "// which is the root of the filesys...
Opens a file from the volume. The filePath is relative to the defaultPath. @param filePath File path of the resource to open. @throws IOException
[ "Opens", "a", "file", "from", "the", "volume", ".", "The", "filePath", "is", "relative", "to", "the", "defaultPath", "." ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRResourceVolume.java#L281-L340
facebookarchive/hive-dwrf
hive-dwrf/src/main/java/com/facebook/hive/orc/lazy/LazyTreeReader.java
LazyTreeReader.get
public Object get(long currentRow, Object previous) throws IOException { """ Returns the value corresponding to currentRow, suitable for calling from outside @param currentRow @param previous @return @throws IOException """ seekToRow(currentRow); return next(previous); }
java
public Object get(long currentRow, Object previous) throws IOException { seekToRow(currentRow); return next(previous); }
[ "public", "Object", "get", "(", "long", "currentRow", ",", "Object", "previous", ")", "throws", "IOException", "{", "seekToRow", "(", "currentRow", ")", ";", "return", "next", "(", "previous", ")", ";", "}" ]
Returns the value corresponding to currentRow, suitable for calling from outside @param currentRow @param previous @return @throws IOException
[ "Returns", "the", "value", "corresponding", "to", "currentRow", "suitable", "for", "calling", "from", "outside" ]
train
https://github.com/facebookarchive/hive-dwrf/blob/a7b4fcf28a57e006a2fc041d40cf7e5ad16e6b45/hive-dwrf/src/main/java/com/facebook/hive/orc/lazy/LazyTreeReader.java#L224-L227
OpenLiberty/open-liberty
dev/com.ibm.ws.cdi.1.2.jsf/src/com/ibm/ws/cdi/jsf/IBMViewHandler.java
IBMViewHandler.getActionURL
@Override public String getActionURL(FacesContext facesContext, String viewId) { """ Allow the delegate to produce the action URL. If the conversation is long-running, append the conversation id request parameter to the query string part of the URL, but only if the request parameter is not already present. ...
java
@Override public String getActionURL(FacesContext facesContext, String viewId) { facesContext.getAttributes().put(Container.CONTEXT_ID_KEY, contextID); return super.getActionURL(facesContext, viewId); }
[ "@", "Override", "public", "String", "getActionURL", "(", "FacesContext", "facesContext", ",", "String", "viewId", ")", "{", "facesContext", ".", "getAttributes", "(", ")", ".", "put", "(", "Container", ".", "CONTEXT_ID_KEY", ",", "contextID", ")", ";", "retur...
Allow the delegate to produce the action URL. If the conversation is long-running, append the conversation id request parameter to the query string part of the URL, but only if the request parameter is not already present. <p/> This covers form actions Ajax calls, and redirect URLs (which we want) and link hrefs (which...
[ "Allow", "the", "delegate", "to", "produce", "the", "action", "URL", ".", "If", "the", "conversation", "is", "long", "-", "running", "append", "the", "conversation", "id", "request", "parameter", "to", "the", "query", "string", "part", "of", "the", "URL", ...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.cdi.1.2.jsf/src/com/ibm/ws/cdi/jsf/IBMViewHandler.java#L44-L48
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/ScrollBarButtonPainter.java
ScrollBarButtonPainter.paintArrowButton
private void paintArrowButton(Graphics2D g, double x, double y) { """ DOCUMENT ME! @param g DOCUMENT ME! @param x DOCUMENT ME! @param y DOCUMENT ME! """ Shape s = shapeGenerator.createArrowLeft(x, y, 4, 6); g.setPaint(getScrollBarButtonArrowPaint()); g.fill(s); }
java
private void paintArrowButton(Graphics2D g, double x, double y) { Shape s = shapeGenerator.createArrowLeft(x, y, 4, 6); g.setPaint(getScrollBarButtonArrowPaint()); g.fill(s); }
[ "private", "void", "paintArrowButton", "(", "Graphics2D", "g", ",", "double", "x", ",", "double", "y", ")", "{", "Shape", "s", "=", "shapeGenerator", ".", "createArrowLeft", "(", "x", ",", "y", ",", "4", ",", "6", ")", ";", "g", ".", "setPaint", "(",...
DOCUMENT ME! @param g DOCUMENT ME! @param x DOCUMENT ME! @param y DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/ScrollBarButtonPainter.java#L366-L371
pressgang-ccms/PressGangCCMSCommonUtilities
src/main/java/org/jboss/pressgang/ccms/utils/common/FileUtilities.java
FileUtilities.copyFile
public static void copyFile(final File src, final File dest) throws IOException { """ Copies a file or directory from one location to another location on a local system.<br /><br /> Note: The destination location must exist, otherwise a IOException will be thrown. @param src The Source File or Directory to be...
java
public static void copyFile(final File src, final File dest) throws IOException { if (src.isDirectory()) { // if the directory does not exist, create it if (!dest.exists()) { dest.mkdir(); } // get all the directory contents fi...
[ "public", "static", "void", "copyFile", "(", "final", "File", "src", ",", "final", "File", "dest", ")", "throws", "IOException", "{", "if", "(", "src", ".", "isDirectory", "(", ")", ")", "{", "// if the directory does not exist, create it\r", "if", "(", "!", ...
Copies a file or directory from one location to another location on a local system.<br /><br /> Note: The destination location must exist, otherwise a IOException will be thrown. @param src The Source File or Directory to be copied to the dest location. @param dest The Destination location to copy the Source content ...
[ "Copies", "a", "file", "or", "directory", "from", "one", "location", "to", "another", "location", "on", "a", "local", "system", ".", "<br", "/", ">", "<br", "/", ">", "Note", ":", "The", "destination", "location", "must", "exist", "otherwise", "a", "IOEx...
train
https://github.com/pressgang-ccms/PressGangCCMSCommonUtilities/blob/5ebf5ed30a94c34c33f4708caa04a8da99cbb15c/src/main/java/org/jboss/pressgang/ccms/utils/common/FileUtilities.java#L138-L173
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java
DocTreeScanner.visitThrows
@Override public R visitThrows(ThrowsTree node, P p) { """ {@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning """ R r = scan(node.getExceptionName(), p); r = scanAndReduce(node.g...
java
@Override public R visitThrows(ThrowsTree node, P p) { R r = scan(node.getExceptionName(), p); r = scanAndReduce(node.getDescription(), p, r); return r; }
[ "@", "Override", "public", "R", "visitThrows", "(", "ThrowsTree", "node", ",", "P", "p", ")", "{", "R", "r", "=", "scan", "(", "node", ".", "getExceptionName", "(", ")", ",", "p", ")", ";", "r", "=", "scanAndReduce", "(", "node", ".", "getDescription...
{@inheritDoc} This implementation scans the children in left to right order. @param node {@inheritDoc} @param p {@inheritDoc} @return the result of scanning
[ "{", "@inheritDoc", "}", "This", "implementation", "scans", "the", "children", "in", "left", "to", "right", "order", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/source/util/DocTreeScanner.java#L459-L464
TheHortonMachine/hortonmachine
dbs/src/main/java/org/hortonmachine/dbs/h2gis/H2GisServer.java
H2GisServer.startWebServerMode
public static Server startWebServerMode( String port, boolean doSSL, boolean ifExists, String baseDir ) throws SQLException { """ Start the web server mode. @param port the optional port to use. @param doSSL if <code>true</code>, ssl is used. @param ifExists is <code>true</code>, the database to connect to ha...
java
public static Server startWebServerMode( String port, boolean doSSL, boolean ifExists, String baseDir ) throws SQLException { List<String> params = new ArrayList<>(); params.add("-webAllowOthers"); if (port != null) { params.add("-webPort"); params.add(port); } ...
[ "public", "static", "Server", "startWebServerMode", "(", "String", "port", ",", "boolean", "doSSL", ",", "boolean", "ifExists", ",", "String", "baseDir", ")", "throws", "SQLException", "{", "List", "<", "String", ">", "params", "=", "new", "ArrayList", "<>", ...
Start the web server mode. @param port the optional port to use. @param doSSL if <code>true</code>, ssl is used. @param ifExists is <code>true</code>, the database to connect to has to exist. @param baseDir an optional basedir into which it is allowed to connect. @return @throws SQLException
[ "Start", "the", "web", "server", "mode", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/dbs/src/main/java/org/hortonmachine/dbs/h2gis/H2GisServer.java#L99-L122
phax/ph-commons
ph-xml/src/main/java/com/helger/xml/transform/XMLTransformerFactory.java
XMLTransformerFactory.makeTransformerFactorySecure
public static void makeTransformerFactorySecure (@Nonnull final TransformerFactory aFactory, @Nullable final String... aAllowedExternalSchemes) { """ Set the secure processing feature to a {@link TransformerFactory}. See https://docs.oracle.com/javase/tutorial/ja...
java
public static void makeTransformerFactorySecure (@Nonnull final TransformerFactory aFactory, @Nullable final String... aAllowedExternalSchemes) { ValueEnforcer.notNull (aFactory, "Factory"); try { aFactory.setFeature (XMLConstants.FEATURE_SECURE_PR...
[ "public", "static", "void", "makeTransformerFactorySecure", "(", "@", "Nonnull", "final", "TransformerFactory", "aFactory", ",", "@", "Nullable", "final", "String", "...", "aAllowedExternalSchemes", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aFactory", ",", "\...
Set the secure processing feature to a {@link TransformerFactory}. See https://docs.oracle.com/javase/tutorial/jaxp/properties/properties.html for details. @param aFactory The factory to secure. May not be <code>null</code>. @param aAllowedExternalSchemes Optional external URL schemes that are allowed to be accessed (...
[ "Set", "the", "secure", "processing", "feature", "to", "a", "{", "@link", "TransformerFactory", "}", ".", "See", "https", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "tutorial", "/", "jaxp", "/", "properties", "/", "properties", "."...
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-xml/src/main/java/com/helger/xml/transform/XMLTransformerFactory.java#L96-L117
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/context/option/mapper/OptionParser.java
OptionParser.parseValue
@SuppressWarnings("unchecked") public static <V, T extends Enum & Option> V parseValue(final T option, final String value) { """ Parse option value from string. Only basic conversions are supported: like string, boolean, integer, double, enum value, enum by class and arrays of these types (see {@link StringCo...
java
@SuppressWarnings("unchecked") public static <V, T extends Enum & Option> V parseValue(final T option, final String value) { Preconditions.checkState(StringUtils.isNotBlank(value), "Empty value is not allowed for option %s", option); try { return (V) StringConverter.conve...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "V", ",", "T", "extends", "Enum", "&", "Option", ">", "V", "parseValue", "(", "final", "T", "option", ",", "final", "String", "value", ")", "{", "Preconditions", ".", "checkState"...
Parse option value from string. Only basic conversions are supported: like string, boolean, integer, double, enum value, enum by class and arrays of these types (see {@link StringConverter}). @param option option enum @param value string value @param <V> option value type @param <T> option type @return parsed o...
[ "Parse", "option", "value", "from", "string", ".", "Only", "basic", "conversions", "are", "supported", ":", "like", "string", "boolean", "integer", "double", "enum", "value", "enum", "by", "class", "and", "arrays", "of", "these", "types", "(", "see", "{", ...
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/context/option/mapper/OptionParser.java#L45-L55
sarl/sarl
contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java
PyGenerator._before
protected void _before(SarlCapacityUses uses, IExtraLanguageGeneratorContext context) { """ Mark the functions of the used capacities in order to have a valid feature call within the code. @param uses the capacity uses. @param context the context. """ // Rename the function in order to produce the good f...
java
protected void _before(SarlCapacityUses uses, IExtraLanguageGeneratorContext context) { // Rename the function in order to produce the good features at the calls. for (final JvmTypeReference capacity : uses.getCapacities()) { final JvmType type = capacity.getType(); if (type instanceof JvmDeclaredType) { ...
[ "protected", "void", "_before", "(", "SarlCapacityUses", "uses", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "// Rename the function in order to produce the good features at the calls.", "for", "(", "final", "JvmTypeReference", "capacity", ":", "uses", ".", "g...
Mark the functions of the used capacities in order to have a valid feature call within the code. @param uses the capacity uses. @param context the context.
[ "Mark", "the", "functions", "of", "the", "used", "capacities", "in", "order", "to", "have", "a", "valid", "feature", "call", "within", "the", "code", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/contribs/io.sarl.pythongenerator/io.sarl.pythongenerator.generator/src/io/sarl/pythongenerator/generator/generator/PyGenerator.java#L1035-L1043
Viascom/groundwork
foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/response/serviceresult/FoxHttpServiceResultResponse.java
FoxHttpServiceResultResponse.getContent
public <T extends Serializable> T getContent(Class<T> contentClass) throws FoxHttpResponseException { """ Get the content of the service result @param contentClass class of the return object @return deserialized content of the service result @throws FoxHttpResponseException Exception during the deserializatio...
java
public <T extends Serializable> T getContent(Class<T> contentClass) throws FoxHttpResponseException { return getContent(contentClass, false); }
[ "public", "<", "T", "extends", "Serializable", ">", "T", "getContent", "(", "Class", "<", "T", ">", "contentClass", ")", "throws", "FoxHttpResponseException", "{", "return", "getContent", "(", "contentClass", ",", "false", ")", ";", "}" ]
Get the content of the service result @param contentClass class of the return object @return deserialized content of the service result @throws FoxHttpResponseException Exception during the deserialization
[ "Get", "the", "content", "of", "the", "service", "result" ]
train
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/response/serviceresult/FoxHttpServiceResultResponse.java#L188-L190
mfornos/humanize
humanize-icu/src/main/java/humanize/ICUHumanize.java
ICUHumanize.formatDate
public static String formatDate(final Date value, final Locale locale) { """ <p> Same as {@link #formatDate(Date) formatDate} for the specified locale. </p> @param value Date to be formatted @param locale Target locale @return String representation of the date """ return withinLocale(new Calla...
java
public static String formatDate(final Date value, final Locale locale) { return withinLocale(new Callable<String>() { public String call() throws Exception { return formatDate(value); } }, locale); }
[ "public", "static", "String", "formatDate", "(", "final", "Date", "value", ",", "final", "Locale", "locale", ")", "{", "return", "withinLocale", "(", "new", "Callable", "<", "String", ">", "(", ")", "{", "public", "String", "call", "(", ")", "throws", "E...
<p> Same as {@link #formatDate(Date) formatDate} for the specified locale. </p> @param value Date to be formatted @param locale Target locale @return String representation of the date
[ "<p", ">", "Same", "as", "{", "@link", "#formatDate", "(", "Date", ")", "formatDate", "}", "for", "the", "specified", "locale", ".", "<", "/", "p", ">" ]
train
https://github.com/mfornos/humanize/blob/59fc103045de9d217c9e77dbcb7621f992f46c63/humanize-icu/src/main/java/humanize/ICUHumanize.java#L684-L693
meltmedia/cadmium
captcha/src/main/java/com/meltmedia/cadmium/captcha/CaptchaValidator.java
CaptchaValidator.isValid
public boolean isValid(HttpServletRequest request, String challenge, String response) { """ Validates the captcha response. @param request @param challenge @param response @return """ String remoteAddr = request.getRemoteAddr(); log.info("Challenge Field Name = [{}]", challenge); log.info("Re...
java
public boolean isValid(HttpServletRequest request, String challenge, String response) { String remoteAddr = request.getRemoteAddr(); log.info("Challenge Field Name = [{}]", challenge); log.info("Response Field Name = [{}]", response); if(challenge != null && response != null && challenge.trim().length()...
[ "public", "boolean", "isValid", "(", "HttpServletRequest", "request", ",", "String", "challenge", ",", "String", "response", ")", "{", "String", "remoteAddr", "=", "request", ".", "getRemoteAddr", "(", ")", ";", "log", ".", "info", "(", "\"Challenge Field Name =...
Validates the captcha response. @param request @param challenge @param response @return
[ "Validates", "the", "captcha", "response", "." ]
train
https://github.com/meltmedia/cadmium/blob/bca585030e141803a73b58abb128d130157b6ddf/captcha/src/main/java/com/meltmedia/cadmium/captcha/CaptchaValidator.java#L80-L89
spring-projects/spring-social
spring-social-core/src/main/java/org/springframework/social/oauth2/OAuth2Template.java
OAuth2Template.postForAccessGrant
@SuppressWarnings("unchecked") protected AccessGrant postForAccessGrant(String accessTokenUrl, MultiValueMap<String, String> parameters) { """ Posts the request for an access grant to the provider. The default implementation uses RestTemplate to request the access token and expects a JSON response to be bound to...
java
@SuppressWarnings("unchecked") protected AccessGrant postForAccessGrant(String accessTokenUrl, MultiValueMap<String, String> parameters) { Map<String, Object> result = getRestTemplate().postForObject(accessTokenUrl, parameters, Map.class); if (result == null) { throw new RestClientException("access token endpoi...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "AccessGrant", "postForAccessGrant", "(", "String", "accessTokenUrl", ",", "MultiValueMap", "<", "String", ",", "String", ">", "parameters", ")", "{", "Map", "<", "String", ",", "Object", ">", "res...
Posts the request for an access grant to the provider. The default implementation uses RestTemplate to request the access token and expects a JSON response to be bound to a Map. The information in the Map will be used to create an {@link AccessGrant}. Since the OAuth 2 specification indicates that an access token respo...
[ "Posts", "the", "request", "for", "an", "access", "grant", "to", "the", "provider", ".", "The", "default", "implementation", "uses", "RestTemplate", "to", "request", "the", "access", "token", "and", "expects", "a", "JSON", "response", "to", "be", "bound", "t...
train
https://github.com/spring-projects/spring-social/blob/e41cfecb288022b83c79413b58f52511c3c9d4fc/spring-social-core/src/main/java/org/springframework/social/oauth2/OAuth2Template.java#L241-L248
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java
SDBaseOps.replaceWhere
public SDVariable replaceWhere(String name, SDVariable update, SDVariable from, Condition condition) { """ Element-wise replace where condition:<br> out[i] = from[i] if condition(update[i]) is satisfied, or<br> out[i] = update[i] if condition(update[i]) is NOT satisfied @param name Name of the output var...
java
public SDVariable replaceWhere(String name, SDVariable update, SDVariable from, Condition condition) { SDVariable ret = f().replaceWhere(update, from, condition); return updateVariableNameAndReference(ret, name); }
[ "public", "SDVariable", "replaceWhere", "(", "String", "name", ",", "SDVariable", "update", ",", "SDVariable", "from", ",", "Condition", "condition", ")", "{", "SDVariable", "ret", "=", "f", "(", ")", ".", "replaceWhere", "(", "update", ",", "from", ",", "...
Element-wise replace where condition:<br> out[i] = from[i] if condition(update[i]) is satisfied, or<br> out[i] = update[i] if condition(update[i]) is NOT satisfied @param name Name of the output variable @param update Source array @param from Replacement values array (used conditionally). Must be same sha...
[ "Element", "-", "wise", "replace", "where", "condition", ":", "<br", ">", "out", "[", "i", "]", "=", "from", "[", "i", "]", "if", "condition", "(", "update", "[", "i", "]", ")", "is", "satisfied", "or<br", ">", "out", "[", "i", "]", "=", "update"...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/ops/SDBaseOps.java#L1717-L1720
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/style/StyleUtilities.java
StyleUtilities.checkSameNameStyle
public static String checkSameNameStyle( List<StyleWrapper> styles, String styleName ) { """ Checks if the list of {@link StyleWrapper}s supplied contains one with the supplied name. <p>If the style is contained it adds an index to the name. @param styles the list of style wrappers to check. @param styleNam...
java
public static String checkSameNameStyle( List<StyleWrapper> styles, String styleName ) { int index = 1; String name = styleName.trim(); for( int i = 0; i < styles.size(); i++ ) { StyleWrapper styleWrapper = styles.get(i); String tmpName = styleWrapper.getName(); ...
[ "public", "static", "String", "checkSameNameStyle", "(", "List", "<", "StyleWrapper", ">", "styles", ",", "String", "styleName", ")", "{", "int", "index", "=", "1", ";", "String", "name", "=", "styleName", ".", "trim", "(", ")", ";", "for", "(", "int", ...
Checks if the list of {@link StyleWrapper}s supplied contains one with the supplied name. <p>If the style is contained it adds an index to the name. @param styles the list of style wrappers to check. @param styleName the name of the style to find. @return the new name of the style.
[ "Checks", "if", "the", "list", "of", "{", "@link", "StyleWrapper", "}", "s", "supplied", "contains", "one", "with", "the", "supplied", "name", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/style/StyleUtilities.java#L832-L859
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.beginGetTroubleshooting
public TroubleshootingResultInner beginGetTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { """ Initiate troubleshooting on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network...
java
public TroubleshootingResultInner beginGetTroubleshooting(String resourceGroupName, String networkWatcherName, TroubleshootingParameters parameters) { return beginGetTroubleshootingWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).toBlocking().single().body(); }
[ "public", "TroubleshootingResultInner", "beginGetTroubleshooting", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "TroubleshootingParameters", "parameters", ")", "{", "return", "beginGetTroubleshootingWithServiceResponseAsync", "(", "resourceGroupName...
Initiate troubleshooting on a specified resource. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher resource. @param parameters Parameters that define the resource to troubleshoot. @throws IllegalArgumentException thrown if parameters fail the validation...
[ "Initiate", "troubleshooting", "on", "a", "specified", "resource", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java#L1539-L1541
jayantk/jklol
src/com/jayantkrish/jklol/util/IntMultimap.java
IntMultimap.invertFrom
public static IntMultimap invertFrom(Multimap<? extends Integer, ? extends Integer> map) { """ Creates a new multimap that reverses the keys and values in {@code map}. @param map @return """ if (map instanceof IntMultimap) { IntMultimap other = (IntMultimap) map; // This is unnecessary, but...
java
public static IntMultimap invertFrom(Multimap<? extends Integer, ? extends Integer> map) { if (map instanceof IntMultimap) { IntMultimap other = (IntMultimap) map; // This is unnecessary, but it makes this method easier to implement. other.reindexItems(); int[] newSortedKeys = Arrays.copyOf...
[ "public", "static", "IntMultimap", "invertFrom", "(", "Multimap", "<", "?", "extends", "Integer", ",", "?", "extends", "Integer", ">", "map", ")", "{", "if", "(", "map", "instanceof", "IntMultimap", ")", "{", "IntMultimap", "other", "=", "(", "IntMultimap", ...
Creates a new multimap that reverses the keys and values in {@code map}. @param map @return
[ "Creates", "a", "new", "multimap", "that", "reverses", "the", "keys", "and", "values", "in", "{", "@code", "map", "}", "." ]
train
https://github.com/jayantk/jklol/blob/d27532ca83e212d51066cf28f52621acc3fd44cc/src/com/jayantkrish/jklol/util/IntMultimap.java#L126-L143
xm-online/xm-commons
xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/service/PermissionCheckService.java
PermissionCheckService.createCondition
public String createCondition(Authentication authentication, Object privilegeKey, SpelTranslator translator) { """ Create condition with replaced subject variables. <p>SpEL condition translated to SQL condition with replacing #returnObject to returnObject and enriching #subject.* from Subject object (see {@lin...
java
public String createCondition(Authentication authentication, Object privilegeKey, SpelTranslator translator) { if (!hasPermission(authentication, privilegeKey)) { throw new AccessDeniedException("Access is denied"); } String roleKey = getRoleKey(authentication); Permission ...
[ "public", "String", "createCondition", "(", "Authentication", "authentication", ",", "Object", "privilegeKey", ",", "SpelTranslator", "translator", ")", "{", "if", "(", "!", "hasPermission", "(", "authentication", ",", "privilegeKey", ")", ")", "{", "throw", "new"...
Create condition with replaced subject variables. <p>SpEL condition translated to SQL condition with replacing #returnObject to returnObject and enriching #subject.* from Subject object (see {@link Subject}). <p>As an option, SpEL could be translated to SQL via {@link SpelExpression} method {@code getAST()} with trav...
[ "Create", "condition", "with", "replaced", "subject", "variables", "." ]
train
https://github.com/xm-online/xm-commons/blob/43eb2273adb96f40830d7b905ee3a767b8715caf/xm-commons-permission/src/main/java/com/icthh/xm/commons/permission/service/PermissionCheckService.java#L118-L134
Whiley/WhileyCompiler
src/main/java/wyc/io/WhileyFileParser.java
WhileyFileParser.parseAccessExpression
private Expr parseAccessExpression(EnclosingScope scope, boolean terminated) { """ Parse an <i>access expression</i>, which has the form: <pre> AccessExpr::= PrimaryExpr | AccessExpr '[' AdditiveExpr ']' | AccessExpr '[' AdditiveExpr ".." AdditiveExpr ']' | AccessExpr '.' Identifier | AccessExpr '.' Identi...
java
private Expr parseAccessExpression(EnclosingScope scope, boolean terminated) { int start = index; Expr lhs = parseTermExpression(scope, terminated); Token token; while ((token = tryAndMatchOnLine(LeftSquare)) != null || (token = tryAndMatch(terminated, Dot, MinusGreater, ColonColon)) != null) { switch (...
[ "private", "Expr", "parseAccessExpression", "(", "EnclosingScope", "scope", ",", "boolean", "terminated", ")", "{", "int", "start", "=", "index", ";", "Expr", "lhs", "=", "parseTermExpression", "(", "scope", ",", "terminated", ")", ";", "Token", "token", ";", ...
Parse an <i>access expression</i>, which has the form: <pre> AccessExpr::= PrimaryExpr | AccessExpr '[' AdditiveExpr ']' | AccessExpr '[' AdditiveExpr ".." AdditiveExpr ']' | AccessExpr '.' Identifier | AccessExpr '.' Identifier '(' [ Expr (',' Expr)* ] ')' | AccessExpr "->" Identifier </pre> <p> Access expressions a...
[ "Parse", "an", "<i", ">", "access", "expression<", "/", "i", ">", "which", "has", "the", "form", ":" ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyc/io/WhileyFileParser.java#L2194-L2230
Ordinastie/MalisisCore
src/main/java/net/malisis/core/registry/ModEventRegistry.java
ModEventRegistry.registerCallback
public <T extends FMLEvent> void registerCallback(Class<T> clazz, IFMLEventCallback<T> consumer) { """ Registers a {@link IFMLEventCallback} that will be called when MalisisCore will reach the specified {@link FMLEvent}.<br> Note that the callbacks are propcessed during MalisisCore events and not the child mods. ...
java
public <T extends FMLEvent> void registerCallback(Class<T> clazz, IFMLEventCallback<T> consumer) { super.registerCallback(consumer, CallbackOption.of((FMLEventPredicate<T>) clazz::isInstance)); }
[ "public", "<", "T", "extends", "FMLEvent", ">", "void", "registerCallback", "(", "Class", "<", "T", ">", "clazz", ",", "IFMLEventCallback", "<", "T", ">", "consumer", ")", "{", "super", ".", "registerCallback", "(", "consumer", ",", "CallbackOption", ".", ...
Registers a {@link IFMLEventCallback} that will be called when MalisisCore will reach the specified {@link FMLEvent}.<br> Note that the callbacks are propcessed during MalisisCore events and not the child mods. @param <T> the generic type @param clazz the clazz @param consumer the consumer
[ "Registers", "a", "{", "@link", "IFMLEventCallback", "}", "that", "will", "be", "called", "when", "MalisisCore", "will", "reach", "the", "specified", "{", "@link", "FMLEvent", "}", ".", "<br", ">", "Note", "that", "the", "callbacks", "are", "propcessed", "du...
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/registry/ModEventRegistry.java#L63-L66
jaxio/javaee-lab
javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java
GenericRepository.findProperty
@Transactional public <T> List<T> findProperty(Class<T> propertyType, E entity, SearchParameters sp, String path) { """ /* Find a list of E property. @param propertyType type of the property @param entity a sample entity whose non-null properties may be used as search hints @param sp carr...
java
@Transactional public <T> List<T> findProperty(Class<T> propertyType, E entity, SearchParameters sp, String path) { return findProperty(propertyType, entity, sp, metamodelUtil.toAttributes(path, type)); }
[ "@", "Transactional", "public", "<", "T", ">", "List", "<", "T", ">", "findProperty", "(", "Class", "<", "T", ">", "propertyType", ",", "E", "entity", ",", "SearchParameters", "sp", ",", "String", "path", ")", "{", "return", "findProperty", "(", "propert...
/* Find a list of E property. @param propertyType type of the property @param entity a sample entity whose non-null properties may be used as search hints @param sp carries additional search information @param path the path to the property @return the entities property matching the search.
[ "/", "*", "Find", "a", "list", "of", "E", "property", "." ]
train
https://github.com/jaxio/javaee-lab/blob/61238b967952446d81cc68424a4e809093a77fcf/javaee7-jpa-query-by-example/src/main/java/com/jaxio/jpa/querybyexample/GenericRepository.java#L244-L247
apache/flink
flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java
GlobalConfiguration.loadConfiguration
public static Configuration loadConfiguration() { """ Loads the global configuration from the environment. Fails if an error occurs during loading. Returns an empty configuration object if the environment variable is not set. In production this variable is set but tests and local execution/debugging don't have t...
java
public static Configuration loadConfiguration() { final String configDir = System.getenv(ConfigConstants.ENV_FLINK_CONF_DIR); if (configDir == null) { return new Configuration(); } return loadConfiguration(configDir, null); }
[ "public", "static", "Configuration", "loadConfiguration", "(", ")", "{", "final", "String", "configDir", "=", "System", ".", "getenv", "(", "ConfigConstants", ".", "ENV_FLINK_CONF_DIR", ")", ";", "if", "(", "configDir", "==", "null", ")", "{", "return", "new",...
Loads the global configuration from the environment. Fails if an error occurs during loading. Returns an empty configuration object if the environment variable is not set. In production this variable is set but tests and local execution/debugging don't have this environment variable set. That's why we should fail if it...
[ "Loads", "the", "global", "configuration", "from", "the", "environment", ".", "Fails", "if", "an", "error", "occurs", "during", "loading", ".", "Returns", "an", "empty", "configuration", "object", "if", "the", "environment", "variable", "is", "not", "set", "."...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java#L65-L71
kiegroup/droolsjbpm-integration
kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/marshalling/MarshallerFactory.java
MarshallerFactory.getMarshaller
public static Marshaller getMarshaller(Set<Class<?>> classes, MarshallingFormat format, ClassLoader classLoader) { """ Builds new marshaller for given format and class loader @param classes optional custom classes to be added to marshaller - might be null @param format marshaller format that marshaller should be...
java
public static Marshaller getMarshaller(Set<Class<?>> classes, MarshallingFormat format, ClassLoader classLoader) { return builder.build(classes, format, classLoader); }
[ "public", "static", "Marshaller", "getMarshaller", "(", "Set", "<", "Class", "<", "?", ">", ">", "classes", ",", "MarshallingFormat", "format", ",", "ClassLoader", "classLoader", ")", "{", "return", "builder", ".", "build", "(", "classes", ",", "format", ","...
Builds new marshaller for given format and class loader @param classes optional custom classes to be added to marshaller - might be null @param format marshaller format that marshaller should be built for @param classLoader classloader to be used by the marshaller @return new instance of the marshaller
[ "Builds", "new", "marshaller", "for", "given", "format", "and", "class", "loader" ]
train
https://github.com/kiegroup/droolsjbpm-integration/blob/6c26200ab03855dbb92b56ca0c6363cdec0eaf2c/kie-server-parent/kie-server-api/src/main/java/org/kie/server/api/marshalling/MarshallerFactory.java#L49-L51
m-m-m/util
nls/src/main/java/net/sf/mmm/util/nls/impl/AbstractResourceBundleNlsTemplateResolver.java
AbstractResourceBundleNlsTemplateResolver.resolveTemplate
@Deprecated protected NlsTemplate resolveTemplate(NlsReversedResourceBundle reversedBundle, String internationalizedMessage) { """ This method {@link #resolveTemplate(String) resolves} the {@link NlsTemplate} from the given {@link NlsReversedResourceBundle}. @param reversedBundle is the resource-bundle that ...
java
@Deprecated protected NlsTemplate resolveTemplate(NlsReversedResourceBundle reversedBundle, String internationalizedMessage) { // ResourceBundleReverse reverseBundle = getReverseBundle(resourceBundle); String key = reversedBundle.getKey(internationalizedMessage); if (key != null) { return new NlsTe...
[ "@", "Deprecated", "protected", "NlsTemplate", "resolveTemplate", "(", "NlsReversedResourceBundle", "reversedBundle", ",", "String", "internationalizedMessage", ")", "{", "// ResourceBundleReverse reverseBundle = getReverseBundle(resourceBundle);", "String", "key", "=", "reversedBu...
This method {@link #resolveTemplate(String) resolves} the {@link NlsTemplate} from the given {@link NlsReversedResourceBundle}. @param reversedBundle is the resource-bundle that potentially declare the {@code internationalizedMessage}. @param internationalizedMessage is the message for which the {@link NlsTemplate} is...
[ "This", "method", "{", "@link", "#resolveTemplate", "(", "String", ")", "resolves", "}", "the", "{", "@link", "NlsTemplate", "}", "from", "the", "given", "{", "@link", "NlsReversedResourceBundle", "}", "." ]
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/nls/src/main/java/net/sf/mmm/util/nls/impl/AbstractResourceBundleNlsTemplateResolver.java#L47-L56
b3dgs/lionengine
lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/selector/SelectorRefresher.java
SelectorRefresher.createCheck
private static StateUpdater createCheck(Cursor cursor, SelectorModel model, AtomicReference<StateUpdater> start) { """ Create check action. @param cursor The cursor reference. @param model The selector model. @param start The start action. @return The check action. """ return (extrp, current) -> ...
java
private static StateUpdater createCheck(Cursor cursor, SelectorModel model, AtomicReference<StateUpdater> start) { return (extrp, current) -> { if (model.isEnabled() && cursor.getClick() == 0) { return start.get(); } return current; ...
[ "private", "static", "StateUpdater", "createCheck", "(", "Cursor", "cursor", ",", "SelectorModel", "model", ",", "AtomicReference", "<", "StateUpdater", ">", "start", ")", "{", "return", "(", "extrp", ",", "current", ")", "->", "{", "if", "(", "model", ".", ...
Create check action. @param cursor The cursor reference. @param model The selector model. @param start The start action. @return The check action.
[ "Create", "check", "action", "." ]
train
https://github.com/b3dgs/lionengine/blob/cac3d5578532cf11724a737b9f09e71bf9995ab2/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/collidable/selector/SelectorRefresher.java#L49-L59
SimiaCryptus/utilities
java-util/src/main/java/com/simiacryptus/util/binary/bitset/CountTreeBitsCollection.java
CountTreeBitsCollection.readTerminalCount
protected long readTerminalCount(final BitInputStream in, final long size) throws IOException { """ Read terminal count long. @param in the in @param size the size @return the long @throws IOException the io exception """ if (SERIALIZATION_CHECKS) { in.expect(SerializationChecks.BeforeTer...
java
protected long readTerminalCount(final BitInputStream in, final long size) throws IOException { if (SERIALIZATION_CHECKS) { in.expect(SerializationChecks.BeforeTerminal); } final long readBoundedLong = in.readBoundedLong(1 + size); if (SERIALIZATION_CHECKS) { in.expect(SerializationCheck...
[ "protected", "long", "readTerminalCount", "(", "final", "BitInputStream", "in", ",", "final", "long", "size", ")", "throws", "IOException", "{", "if", "(", "SERIALIZATION_CHECKS", ")", "{", "in", ".", "expect", "(", "SerializationChecks", ".", "BeforeTerminal", ...
Read terminal count long. @param in the in @param size the size @return the long @throws IOException the io exception
[ "Read", "terminal", "count", "long", "." ]
train
https://github.com/SimiaCryptus/utilities/blob/b5a5e73449aae57de7dbfca2ed7a074432c5b17e/java-util/src/main/java/com/simiacryptus/util/binary/bitset/CountTreeBitsCollection.java#L227-L237
Omertron/api-themoviedb
src/main/java/com/omertron/themoviedbapi/methods/TmdbCollections.java
TmdbCollections.getCollectionInfo
public CollectionInfo getCollectionInfo(int collectionId, String language) throws MovieDbException { """ This method is used to retrieve all of the basic information about a movie collection. You can get the ID needed for this method by making a getMovieInfo request for the belongs_to_collection. @param co...
java
public CollectionInfo getCollectionInfo(int collectionId, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, collectionId); parameters.add(Param.LANGUAGE, language); URL url = new ApiUrl(apiKey, MethodBase.COLLECTION).bu...
[ "public", "CollectionInfo", "getCollectionInfo", "(", "int", "collectionId", ",", "String", "language", ")", "throws", "MovieDbException", "{", "TmdbParameters", "parameters", "=", "new", "TmdbParameters", "(", ")", ";", "parameters", ".", "add", "(", "Param", "."...
This method is used to retrieve all of the basic information about a movie collection. You can get the ID needed for this method by making a getMovieInfo request for the belongs_to_collection. @param collectionId @param language @return @throws MovieDbException
[ "This", "method", "is", "used", "to", "retrieve", "all", "of", "the", "basic", "information", "about", "a", "movie", "collection", "." ]
train
https://github.com/Omertron/api-themoviedb/blob/bf132d7c7271734e13b58ba3bc92bba46f220118/src/main/java/com/omertron/themoviedbapi/methods/TmdbCollections.java#L67-L80
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java
ContentSpecParser.isSpecTopicMetaData
private boolean isSpecTopicMetaData(final String key, final String value) { """ Checks if a metadata line is a spec topic. @param key The metadata key. @param value The metadata value. @return True if the line is a spec topic metadata element, otherwise false. """ if (ContentSpecUtilities.isSpec...
java
private boolean isSpecTopicMetaData(final String key, final String value) { if (ContentSpecUtilities.isSpecTopicMetaData(key)) { // Abstracts can be plain text so check an opening bracket exists if (key.equalsIgnoreCase(CommonConstants.CS_ABSTRACT_TITLE) || key.equalsIgnoreCase( ...
[ "private", "boolean", "isSpecTopicMetaData", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "if", "(", "ContentSpecUtilities", ".", "isSpecTopicMetaData", "(", "key", ")", ")", "{", "// Abstracts can be plain text so check an opening bracket e...
Checks if a metadata line is a spec topic. @param key The metadata key. @param value The metadata value. @return True if the line is a spec topic metadata element, otherwise false.
[ "Checks", "if", "a", "metadata", "line", "is", "a", "spec", "topic", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecParser.java#L759-L772
lucee/Lucee
core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java
ASMUtil.getAttributeString
public static String getAttributeString(Tag tag, String attrName, String defaultValue) { """ extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException """ Literal lit = getAttributeLiteral(tag, attrName, null); if (lit == null) return defaultVal...
java
public static String getAttributeString(Tag tag, String attrName, String defaultValue) { Literal lit = getAttributeLiteral(tag, attrName, null); if (lit == null) return defaultValue; return lit.getString(); }
[ "public", "static", "String", "getAttributeString", "(", "Tag", "tag", ",", "String", "attrName", ",", "String", "defaultValue", ")", "{", "Literal", "lit", "=", "getAttributeLiteral", "(", "tag", ",", "attrName", ",", "null", ")", ";", "if", "(", "lit", "...
extract the content of a attribut @param cfxdTag @param attrName @return attribute value @throws EvaluatorException
[ "extract", "the", "content", "of", "a", "attribut" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/bytecode/util/ASMUtil.java#L357-L361
WiQuery/wiquery
wiquery-core/src/main/java/org/odlabs/wiquery/core/options/Options.java
Options.putLiteral
public Options putLiteral(String key, String value) { """ <p> Puts a {@link String} value as a JavaScript literal for the given name. <p> Note that the JavaScript resulting from this options will be <code>'value'</code> </p> </p> @param key the option name. @param value the {@link LiteralOption} value. ...
java
public Options putLiteral(String key, String value) { putOption(key, new LiteralOption(value)); return this; }
[ "public", "Options", "putLiteral", "(", "String", "key", ",", "String", "value", ")", "{", "putOption", "(", "key", ",", "new", "LiteralOption", "(", "value", ")", ")", ";", "return", "this", ";", "}" ]
<p> Puts a {@link String} value as a JavaScript literal for the given name. <p> Note that the JavaScript resulting from this options will be <code>'value'</code> </p> </p> @param key the option name. @param value the {@link LiteralOption} value.
[ "<p", ">", "Puts", "a", "{", "@link", "String", "}", "value", "as", "a", "JavaScript", "literal", "for", "the", "given", "name", ".", "<p", ">", "Note", "that", "the", "JavaScript", "resulting", "from", "this", "options", "will", "be", "<code", ">", "v...
train
https://github.com/WiQuery/wiquery/blob/1b8d60c7a3c37b90fd68c9cd0ff97178fcbcbb08/wiquery-core/src/main/java/org/odlabs/wiquery/core/options/Options.java#L615-L619
ckpoint/CheckPoint
src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java
ValidationDataRepository.findByMethodAndUrlAndNameAndParentId
public ValidationData findByMethodAndUrlAndNameAndParentId(String method, String url, String name, Long parentId) { """ Find by method and url and name and parent id validation data. @param method the method @param url the url @param name the name @param parentId the parent id @return the validat...
java
public ValidationData findByMethodAndUrlAndNameAndParentId(String method, String url, String name, Long parentId) { if (parentId == null) { return this.findByMethodAndUrlAndName(method, url, name).stream().filter(d -> d.getParentId() == null).findAny().orElse(null); } return this.fin...
[ "public", "ValidationData", "findByMethodAndUrlAndNameAndParentId", "(", "String", "method", ",", "String", "url", ",", "String", "name", ",", "Long", "parentId", ")", "{", "if", "(", "parentId", "==", "null", ")", "{", "return", "this", ".", "findByMethodAndUrl...
Find by method and url and name and parent id validation data. @param method the method @param url the url @param name the name @param parentId the parent id @return the validation data
[ "Find", "by", "method", "and", "url", "and", "name", "and", "parent", "id", "validation", "data", "." ]
train
https://github.com/ckpoint/CheckPoint/blob/2c2b1a87a88485d49ea6afa34acdf16ef4134f19/src/main/java/hsim/checkpoint/core/repository/ValidationDataRepository.java#L239-L246
igniterealtime/Smack
smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
PacketParserUtils.parseStreamError
public static StreamError parseStreamError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { """ Parses stream error packets. @param parser the XML parser. @param outerXmlEnvironment the outer XML environment (optional). @return an st...
java
public static StreamError parseStreamError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException { final int initialDepth = parser.getDepth(); List<ExtensionElement> extensions = new ArrayList<>(); Map<String, String> descript...
[ "public", "static", "StreamError", "parseStreamError", "(", "XmlPullParser", "parser", ",", "XmlEnvironment", "outerXmlEnvironment", ")", "throws", "XmlPullParserException", ",", "IOException", ",", "SmackParsingException", "{", "final", "int", "initialDepth", "=", "parse...
Parses stream error packets. @param parser the XML parser. @param outerXmlEnvironment the outer XML environment (optional). @return an stream error packet. @throws IOException @throws XmlPullParserException @throws SmackParsingException
[ "Parses", "stream", "error", "packets", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java#L821-L863
m-m-m/util
pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/base/accessor/AbstractPojoPropertyAccessorBuilder.java
AbstractPojoPropertyAccessorBuilder.getPropertyName
protected String getPropertyName(String methodName, int prefixLength, int suffixLength) { """ This method gets the according {@link net.sf.mmm.util.pojo.descriptor.api.PojoPropertyDescriptor#getName() property-name} for the given {@code methodName}. <br> This is the un-capitalized substring of the {@code methodN...
java
protected String getPropertyName(String methodName, int prefixLength, int suffixLength) { int len = methodName.length(); int end = len - suffixLength; if (prefixLength < end) { String methodSuffix = methodName.substring(prefixLength, end); StringBuffer sb = new StringBuffer(methodSuffix); ...
[ "protected", "String", "getPropertyName", "(", "String", "methodName", ",", "int", "prefixLength", ",", "int", "suffixLength", ")", "{", "int", "len", "=", "methodName", ".", "length", "(", ")", ";", "int", "end", "=", "len", "-", "suffixLength", ";", "if"...
This method gets the according {@link net.sf.mmm.util.pojo.descriptor.api.PojoPropertyDescriptor#getName() property-name} for the given {@code methodName}. <br> This is the un-capitalized substring of the {@code methodName} after the prefix (given via {@code prefixLength}). @param methodName is the {@link java.lang.re...
[ "This", "method", "gets", "the", "according", "{", "@link", "net", ".", "sf", ".", "mmm", ".", "util", ".", "pojo", ".", "descriptor", ".", "api", ".", "PojoPropertyDescriptor#getName", "()", "property", "-", "name", "}", "for", "the", "given", "{", "@co...
train
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/pojo/src/main/java/net/sf/mmm/util/pojo/descriptor/base/accessor/AbstractPojoPropertyAccessorBuilder.java#L133-L144
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataHasValueImpl_CustomFieldSerializer.java
OWLDataHasValueImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDataHasValueImpl instance) throws SerializationException { """ Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt...
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLDataHasValueImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLDataHasValueImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{", "@link", "com", ".", "google", ".", "gwt", ".", "user", ".", "client", ".", "rpc", ".", "SerializationStreamReader", "}", "." ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLDataHasValueImpl_CustomFieldSerializer.java#L93-L96
sagiegurari/fax4j
src/main/java/org/fax4j/spi/AbstractFaxJobMonitor.java
AbstractFaxJobMonitor.monitorFaxJob
public void monitorFaxJob(FaxClientSpi faxClientSpi,FaxJob faxJob) { """ This function starts monitoring the requested fax job. @param faxClientSpi The fax client SPI @param faxJob The fax job to monitor """ if(faxClientSpi==null) { throw new FaxException("Fax client SPI n...
java
public void monitorFaxJob(FaxClientSpi faxClientSpi,FaxJob faxJob) { if(faxClientSpi==null) { throw new FaxException("Fax client SPI not provided."); } if(faxJob==null) { throw new FaxException("Fax job not provided."); } String id=faxJ...
[ "public", "void", "monitorFaxJob", "(", "FaxClientSpi", "faxClientSpi", ",", "FaxJob", "faxJob", ")", "{", "if", "(", "faxClientSpi", "==", "null", ")", "{", "throw", "new", "FaxException", "(", "\"Fax client SPI not provided.\"", ")", ";", "}", "if", "(", "fa...
This function starts monitoring the requested fax job. @param faxClientSpi The fax client SPI @param faxJob The fax job to monitor
[ "This", "function", "starts", "monitoring", "the", "requested", "fax", "job", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/AbstractFaxJobMonitor.java#L115-L134
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/taskmanager/Task.java
Task.setParams
void setParams(String hostID, TaskRecord taskRecord) { """ Set the execution parameters for this task. This method is called by the {@link TaskManagerService} immediately after constructing the job object. @param hostID Identifier of the executing node (IP address). @param taskRecord {@link TaskReco...
java
void setParams(String hostID, TaskRecord taskRecord) { m_hostID = hostID; m_taskRecord = taskRecord; assert m_taskRecord.getTaskID().equals(getTaskID()); }
[ "void", "setParams", "(", "String", "hostID", ",", "TaskRecord", "taskRecord", ")", "{", "m_hostID", "=", "hostID", ";", "m_taskRecord", "=", "taskRecord", ";", "assert", "m_taskRecord", ".", "getTaskID", "(", ")", ".", "equals", "(", "getTaskID", "(", ")", ...
Set the execution parameters for this task. This method is called by the {@link TaskManagerService} immediately after constructing the job object. @param hostID Identifier of the executing node (IP address). @param taskRecord {@link TaskRecord} containing the task's current execution properties from the Task...
[ "Set", "the", "execution", "parameters", "for", "this", "task", ".", "This", "method", "is", "called", "by", "the", "{", "@link", "TaskManagerService", "}", "immediately", "after", "constructing", "the", "job", "object", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/Task.java#L82-L86
cloudfoundry/uaa
server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/IdpMetadataGenerator.java
IdpMetadataGenerator.getDiscoveryURL
protected String getDiscoveryURL(String entityBaseURL, String entityAlias) { """ Provides set discovery request url or generates a default when none was provided. Primarily value set on extenedMetadata property idpDiscoveryURL is used, when empty local property customDiscoveryURL is used, when empty URL is autom...
java
protected String getDiscoveryURL(String entityBaseURL, String entityAlias) { if (extendedMetadata != null && extendedMetadata.getIdpDiscoveryURL() != null && extendedMetadata.getIdpDiscoveryURL().length() > 0) { return extendedMetadata.getIdpDiscoveryURL(); } else { ...
[ "protected", "String", "getDiscoveryURL", "(", "String", "entityBaseURL", ",", "String", "entityAlias", ")", "{", "if", "(", "extendedMetadata", "!=", "null", "&&", "extendedMetadata", ".", "getIdpDiscoveryURL", "(", ")", "!=", "null", "&&", "extendedMetadata", "....
Provides set discovery request url or generates a default when none was provided. Primarily value set on extenedMetadata property idpDiscoveryURL is used, when empty local property customDiscoveryURL is used, when empty URL is automatically generated. @param entityBaseURL base URL for generation of endpoints @param en...
[ "Provides", "set", "discovery", "request", "url", "or", "generates", "a", "default", "when", "none", "was", "provided", ".", "Primarily", "value", "set", "on", "extenedMetadata", "property", "idpDiscoveryURL", "is", "used", "when", "empty", "local", "property", ...
train
https://github.com/cloudfoundry/uaa/blob/e8df3d7060580c92d33461106399f9e4f36e3cd2/server/src/main/java/org/cloudfoundry/identity/uaa/provider/saml/idp/IdpMetadataGenerator.java#L775-L782
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.relativeEllipticalArc
public SVGPath relativeEllipticalArc(double rx, double ry, double ar, double la, double sp, double[] xy) { """ Elliptical arc curve to the given relative coordinates. @param rx x radius @param ry y radius @param ar x-axis-rotation @param la large arc flag, if angle &gt;= 180 deg @param sp sweep flag, if arc...
java
public SVGPath relativeEllipticalArc(double rx, double ry, double ar, double la, double sp, double[] xy) { return append(PATH_ARC_RELATIVE).append(rx).append(ry).append(ar).append(la).append(sp).append(xy[0]).append(xy[1]); }
[ "public", "SVGPath", "relativeEllipticalArc", "(", "double", "rx", ",", "double", "ry", ",", "double", "ar", ",", "double", "la", ",", "double", "sp", ",", "double", "[", "]", "xy", ")", "{", "return", "append", "(", "PATH_ARC_RELATIVE", ")", ".", "appen...
Elliptical arc curve to the given relative coordinates. @param rx x radius @param ry y radius @param ar x-axis-rotation @param la large arc flag, if angle &gt;= 180 deg @param sp sweep flag, if arc will be drawn in positive-angle direction @param xy new coordinates
[ "Elliptical", "arc", "curve", "to", "the", "given", "relative", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L605-L607
f2prateek/dart
henson/src/main/java/dart/henson/Bundler.java
Bundler.put
public Bundler put(String key, Parcelable value) { """ Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Parcelable object, or null @return this bundler instance to...
java
public Bundler put(String key, Parcelable value) { delegate.putParcelable(key, value); return this; }
[ "public", "Bundler", "put", "(", "String", "key", ",", "Parcelable", "value", ")", "{", "delegate", ".", "putParcelable", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Inserts a Parcelable value into the mapping of the underlying Bundle, replacing any existing value for the given key. Either key or value may be null. @param key a String, or null @param value a Parcelable object, or null @return this bundler instance to chain method calls
[ "Inserts", "a", "Parcelable", "value", "into", "the", "mapping", "of", "the", "underlying", "Bundle", "replacing", "any", "existing", "value", "for", "the", "given", "key", ".", "Either", "key", "or", "value", "may", "be", "null", "." ]
train
https://github.com/f2prateek/dart/blob/7163b1b148e5141817975ae7dad99d58a8589aeb/henson/src/main/java/dart/henson/Bundler.java#L348-L351
google/gson
gson/src/main/java/com/google/gson/stream/JsonWriter.java
JsonWriter.open
private JsonWriter open(int empty, String openBracket) throws IOException { """ Enters a new scope by appending any necessary whitespace and the given bracket. """ beforeValue(); push(empty); out.write(openBracket); return this; }
java
private JsonWriter open(int empty, String openBracket) throws IOException { beforeValue(); push(empty); out.write(openBracket); return this; }
[ "private", "JsonWriter", "open", "(", "int", "empty", ",", "String", "openBracket", ")", "throws", "IOException", "{", "beforeValue", "(", ")", ";", "push", "(", "empty", ")", ";", "out", ".", "write", "(", "openBracket", ")", ";", "return", "this", ";",...
Enters a new scope by appending any necessary whitespace and the given bracket.
[ "Enters", "a", "new", "scope", "by", "appending", "any", "necessary", "whitespace", "and", "the", "given", "bracket", "." ]
train
https://github.com/google/gson/blob/63ee47cb642c8018e5cddd639aa2be143220ad4b/gson/src/main/java/com/google/gson/stream/JsonWriter.java#L325-L330
classgraph/classgraph
src/main/java/io/github/classgraph/MethodParameterInfo.java
MethodParameterInfo.modifiersToString
static void modifiersToString(final int modifiers, final StringBuilder buf) { """ Convert modifiers into a string representation, e.g. "public static final". @param modifiers The field or method modifiers. @param buf The buffer to write the result into. """ if ((modifiers & Modifier.FINAL) != 0) ...
java
static void modifiersToString(final int modifiers, final StringBuilder buf) { if ((modifiers & Modifier.FINAL) != 0) { buf.append("final "); } if ((modifiers & 0x1000) != 0) { buf.append("synthetic "); } if ((modifiers & 0x8000) != 0) { buf.app...
[ "static", "void", "modifiersToString", "(", "final", "int", "modifiers", ",", "final", "StringBuilder", "buf", ")", "{", "if", "(", "(", "modifiers", "&", "Modifier", ".", "FINAL", ")", "!=", "0", ")", "{", "buf", ".", "append", "(", "\"final \"", ")", ...
Convert modifiers into a string representation, e.g. "public static final". @param modifiers The field or method modifiers. @param buf The buffer to write the result into.
[ "Convert", "modifiers", "into", "a", "string", "representation", "e", ".", "g", ".", "public", "static", "final", "." ]
train
https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MethodParameterInfo.java#L305-L315
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/commands/HotSpotJavaDumperImpl.java
HotSpotJavaDumperImpl.getToolsJar
private static File getToolsJar() { """ Gets tools.jar from the JDK, or null if not found (for example, when running with a JRE rather than a JDK, or when running on Mac). """ String javaHome = System.getProperty("java.home"); File file = new File(javaHome, "../lib/tools.jar"); if (!fi...
java
private static File getToolsJar() { String javaHome = System.getProperty("java.home"); File file = new File(javaHome, "../lib/tools.jar"); if (!file.exists()) { file = new File(javaHome, "lib/tools.jar"); if (!file.exists()) { return null; } ...
[ "private", "static", "File", "getToolsJar", "(", ")", "{", "String", "javaHome", "=", "System", ".", "getProperty", "(", "\"java.home\"", ")", ";", "File", "file", "=", "new", "File", "(", "javaHome", ",", "\"../lib/tools.jar\"", ")", ";", "if", "(", "!", ...
Gets tools.jar from the JDK, or null if not found (for example, when running with a JRE rather than a JDK, or when running on Mac).
[ "Gets", "tools", ".", "jar", "from", "the", "JDK", "or", "null", "if", "not", "found", "(", "for", "example", "when", "running", "with", "a", "JRE", "rather", "than", "a", "JDK", "or", "when", "running", "on", "Mac", ")", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.boot.core/src/com/ibm/ws/kernel/boot/internal/commands/HotSpotJavaDumperImpl.java#L292-L303
nguillaumin/slick2d-maven
slick2d-packulike/src/main/java/org/newdawn/slick/tools/packulike/Packer.java
Packer.getSpriteAt
public Sprite getSpriteAt(int x, int y) { """ Get the sprite a given location on the current sheet @param x The x coordinate to look for the sprite @param y The y coordinate to look for the sprite @return The sprite found at the given location or null if no sprite can be found """ for (int i=0;i<sprite...
java
public Sprite getSpriteAt(int x, int y) { for (int i=0;i<sprites.size();i++) { if (((Sprite) sprites.get(i)).contains(x,y)) { return ((Sprite) sprites.get(i)); } } return null; }
[ "public", "Sprite", "getSpriteAt", "(", "int", "x", ",", "int", "y", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "sprites", ".", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "(", "(", "Sprite", ")", "sprites", ".", ...
Get the sprite a given location on the current sheet @param x The x coordinate to look for the sprite @param y The y coordinate to look for the sprite @return The sprite found at the given location or null if no sprite can be found
[ "Get", "the", "sprite", "a", "given", "location", "on", "the", "current", "sheet" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-packulike/src/main/java/org/newdawn/slick/tools/packulike/Packer.java#L267-L275
sabomichal/liquibase-mssql
src/java/liquibase/ext/mssql/sqlgenerator/AddPrimaryKeyGeneratorMSSQL.java
AddPrimaryKeyGeneratorMSSQL.generateMSSQLSql
private Sql[] generateMSSQLSql(AddPrimaryKeyStatementMSSQL statement, Database database, SqlGeneratorChain sqlGeneratorChain) { """ The extension's implementation is essentially a copy/paste of the default implementation, with the following changes: 1) Removed other database platform specific logic other than M...
java
private Sql[] generateMSSQLSql(AddPrimaryKeyStatementMSSQL statement, Database database, SqlGeneratorChain sqlGeneratorChain) { String sql; if (statement.getConstraintName() == null) { sql = "ALTER TABLE " + database.escapeTableName(statement.getCatalogName(), statement.getSchemaName(), statement.getTable...
[ "private", "Sql", "[", "]", "generateMSSQLSql", "(", "AddPrimaryKeyStatementMSSQL", "statement", ",", "Database", "database", ",", "SqlGeneratorChain", "sqlGeneratorChain", ")", "{", "String", "sql", ";", "if", "(", "statement", ".", "getConstraintName", "(", ")", ...
The extension's implementation is essentially a copy/paste of the default implementation, with the following changes: 1) Removed other database platform specific logic other than MSSQL (purely to simplify) 2) Added support for setting fillFactor @param statement @param database @param sqlGeneratorChain @return
[ "The", "extension", "s", "implementation", "is", "essentially", "a", "copy", "/", "paste", "of", "the", "default", "implementation", "with", "the", "following", "changes", ":" ]
train
https://github.com/sabomichal/liquibase-mssql/blob/476021dc5d6654242efbb765cd784e88c2129a99/src/java/liquibase/ext/mssql/sqlgenerator/AddPrimaryKeyGeneratorMSSQL.java#L52-L78
apache/groovy
src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java
IOGroovyMethods.filterLine
public static Writable filterLine(InputStream self, @ClosureParams(value=SimpleType.class, options="java.lang.String") Closure predicate) { """ Filter lines from an input stream using a closure predicate. The closure will be passed each line as a String, and it should return <code>true</code> if the line should...
java
public static Writable filterLine(InputStream self, @ClosureParams(value=SimpleType.class, options="java.lang.String") Closure predicate) { return filterLine(newReader(self), predicate); }
[ "public", "static", "Writable", "filterLine", "(", "InputStream", "self", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.lang.String\"", ")", "Closure", "predicate", ")", "{", "return", "filterLine", "(", ...
Filter lines from an input stream using a closure predicate. The closure will be passed each line as a String, and it should return <code>true</code> if the line should be passed to the writer. @param self an input stream @param predicate a closure which returns boolean and takes a line @return a writable which ...
[ "Filter", "lines", "from", "an", "input", "stream", "using", "a", "closure", "predicate", ".", "The", "closure", "will", "be", "passed", "each", "line", "as", "a", "String", "and", "it", "should", "return", "<code", ">", "true<", "/", "code", ">", "if", ...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/src/main/java/org/codehaus/groovy/runtime/IOGroovyMethods.java#L1532-L1534