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
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/collection/PdfCollectionItem.java
PdfCollectionItem.setPrefix
public void setPrefix(String key, String prefix) { """ Adds a prefix for the Collection item. You can only use this method after you have set the value of the item. @param prefix a prefix """ PdfName fieldname = new PdfName(key); PdfObject o = get(fieldname); if (o == null) throw new IllegalArgument...
java
public void setPrefix(String key, String prefix) { PdfName fieldname = new PdfName(key); PdfObject o = get(fieldname); if (o == null) throw new IllegalArgumentException("You must set a value before adding a prefix."); PdfDictionary dict = new PdfDictionary(PdfName.COLLECTIONSUBITEM); dict.put(PdfName.D, o)...
[ "public", "void", "setPrefix", "(", "String", "key", ",", "String", "prefix", ")", "{", "PdfName", "fieldname", "=", "new", "PdfName", "(", "key", ")", ";", "PdfObject", "o", "=", "get", "(", "fieldname", ")", ";", "if", "(", "o", "==", "null", ")", ...
Adds a prefix for the Collection item. You can only use this method after you have set the value of the item. @param prefix a prefix
[ "Adds", "a", "prefix", "for", "the", "Collection", "item", ".", "You", "can", "only", "use", "this", "method", "after", "you", "have", "set", "the", "value", "of", "the", "item", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/collection/PdfCollectionItem.java#L108-L117
iipc/webarchive-commons
src/main/java/org/archive/io/warc/WARCReaderFactory.java
WARCReaderFactory.getArchiveReader
protected ArchiveReader getArchiveReader(final String f, final InputStream is, final boolean atFirstRecord) throws IOException { """ /* Note that the ARC companion does this differently, with quite a lot of duplication. @see org.archive.io.arc.ARCReaderFactory.getArchiveReader(String, InputStream, boolea...
java
protected ArchiveReader getArchiveReader(final String f, final InputStream is, final boolean atFirstRecord) throws IOException { // Check if it's compressed, based on file extension. if( f.endsWith(".gz") ) { return new CompressedWARCReader(f, is, atFirstRecord); } else { return new Unc...
[ "protected", "ArchiveReader", "getArchiveReader", "(", "final", "String", "f", ",", "final", "InputStream", "is", ",", "final", "boolean", "atFirstRecord", ")", "throws", "IOException", "{", "// Check if it's compressed, based on file extension.", "if", "(", "f", ".", ...
/* Note that the ARC companion does this differently, with quite a lot of duplication. @see org.archive.io.arc.ARCReaderFactory.getArchiveReader(String, InputStream, boolean)
[ "/", "*", "Note", "that", "the", "ARC", "companion", "does", "this", "differently", "with", "quite", "a", "lot", "of", "duplication", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/warc/WARCReaderFactory.java#L108-L117
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/filter/SubCurrentFilter.java
SubCurrentFilter.setMainKey
public boolean setMainKey(boolean bDisplayOption, Boolean boolSetModified, boolean bSetIfModified) { """ Setup the target key field. Restore the original value if this is called for initial or end (ie., boolSetModified us TRUE). @oaram bDisplayOption If true, display changes. @param boolSetModified - If not nul...
java
public boolean setMainKey(boolean bDisplayOption, Boolean boolSetModified, boolean bSetIfModified) { super.setMainKey(bDisplayOption, boolSetModified, bSetIfModified); boolean bNonNulls = false; // Default to yes, all keys are null. if (Boolean.TRUE.equals(boolSetModified)) { // O...
[ "public", "boolean", "setMainKey", "(", "boolean", "bDisplayOption", ",", "Boolean", "boolSetModified", ",", "boolean", "bSetIfModified", ")", "{", "super", ".", "setMainKey", "(", "bDisplayOption", ",", "boolSetModified", ",", "bSetIfModified", ")", ";", "boolean",...
Setup the target key field. Restore the original value if this is called for initial or end (ie., boolSetModified us TRUE). @oaram bDisplayOption If true, display changes. @param boolSetModified - If not null, set this field's modified flag to this value @return false If this key was set to all nulls.
[ "Setup", "the", "target", "key", "field", ".", "Restore", "the", "original", "value", "if", "this", "is", "called", "for", "initial", "or", "end", "(", "ie", ".", "boolSetModified", "us", "TRUE", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/filter/SubCurrentFilter.java#L130-L152
UrielCh/ovh-java-sdk
ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java
ApiOvhIpLoadbalancing.serviceName_udp_farm_farmId_DELETE
public void serviceName_udp_farm_farmId_DELETE(String serviceName, Long farmId) throws IOException { """ Delete an UDP Farm REST: DELETE /ipLoadbalancing/{serviceName}/udp/farm/{farmId} @param serviceName [required] The internal name of your IP load balancing @param farmId [required] Id of your farm API be...
java
public void serviceName_udp_farm_farmId_DELETE(String serviceName, Long farmId) throws IOException { String qPath = "/ipLoadbalancing/{serviceName}/udp/farm/{farmId}"; StringBuilder sb = path(qPath, serviceName, farmId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "serviceName_udp_farm_farmId_DELETE", "(", "String", "serviceName", ",", "Long", "farmId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ipLoadbalancing/{serviceName}/udp/farm/{farmId}\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Delete an UDP Farm REST: DELETE /ipLoadbalancing/{serviceName}/udp/farm/{farmId} @param serviceName [required] The internal name of your IP load balancing @param farmId [required] Id of your farm API beta
[ "Delete", "an", "UDP", "Farm" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ipLoadbalancing/src/main/java/net/minidev/ovh/api/ApiOvhIpLoadbalancing.java#L927-L931
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.safeLookup
public static <A, B> B safeLookup(Map<A, B> map, A key) { """ Helper method for looking up a value in a map which may be null.<p> @param <A> the key type @param <B> the value type @param map the map (which may be null) @param key the map key @return the value of the map at the given key, or null if the ma...
java
public static <A, B> B safeLookup(Map<A, B> map, A key) { if (map == null) { return null; } return map.get(key); }
[ "public", "static", "<", "A", ",", "B", ">", "B", "safeLookup", "(", "Map", "<", "A", ",", "B", ">", "map", ",", "A", "key", ")", "{", "if", "(", "map", "==", "null", ")", "{", "return", "null", ";", "}", "return", "map", ".", "get", "(", "...
Helper method for looking up a value in a map which may be null.<p> @param <A> the key type @param <B> the value type @param map the map (which may be null) @param key the map key @return the value of the map at the given key, or null if the map is null
[ "Helper", "method", "for", "looking", "up", "a", "value", "in", "a", "map", "which", "may", "be", "null", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L283-L289
reactor/reactor-netty
src/main/java/reactor/netty/tcp/TcpClient.java
TcpClient.wiretap
public final TcpClient wiretap(boolean enable) { """ Apply or remove a wire logger configuration using {@link TcpClient} category and {@code DEBUG} logger level @param enable Specifies whether the wire logger configuration will be added to the pipeline @return a new {@link TcpClient} """ if (enable) { ...
java
public final TcpClient wiretap(boolean enable) { if (enable) { return bootstrap(b -> BootstrapHandlers.updateLogSupport(b, LOGGING_HANDLER)); } else { return bootstrap(b -> BootstrapHandlers.removeConfiguration(b, NettyPipeline.LoggingHandler)); } }
[ "public", "final", "TcpClient", "wiretap", "(", "boolean", "enable", ")", "{", "if", "(", "enable", ")", "{", "return", "bootstrap", "(", "b", "->", "BootstrapHandlers", ".", "updateLogSupport", "(", "b", ",", "LOGGING_HANDLER", ")", ")", ";", "}", "else",...
Apply or remove a wire logger configuration using {@link TcpClient} category and {@code DEBUG} logger level @param enable Specifies whether the wire logger configuration will be added to the pipeline @return a new {@link TcpClient}
[ "Apply", "or", "remove", "a", "wire", "logger", "configuration", "using", "{", "@link", "TcpClient", "}", "category", "and", "{", "@code", "DEBUG", "}", "logger", "level" ]
train
https://github.com/reactor/reactor-netty/blob/4ed14316e1d7fca3cecd18d6caa5f2251e159e49/src/main/java/reactor/netty/tcp/TcpClient.java#L528-L535
jbake-org/jbake
jbake-core/src/main/java/org/jbake/app/ContentStore.java
ContentStore.mergeDocument
public ODocument mergeDocument(Map<String, ? extends Object> incomingDocMap) { """ Get a document by sourceUri and update it from the given map. @param incomingDocMap The document's db columns. @return The saved document. @throws IllegalArgumentException if sourceUri or docType are null, or if the document does...
java
public ODocument mergeDocument(Map<String, ? extends Object> incomingDocMap) { String sourceUri = (String) incomingDocMap.get(DocumentAttributes.SOURCE_URI.toString()); if (null == sourceUri) throw new IllegalArgumentException("Document sourceUri is null."); String docType = (Str...
[ "public", "ODocument", "mergeDocument", "(", "Map", "<", "String", ",", "?", "extends", "Object", ">", "incomingDocMap", ")", "{", "String", "sourceUri", "=", "(", "String", ")", "incomingDocMap", ".", "get", "(", "DocumentAttributes", ".", "SOURCE_URI", ".", ...
Get a document by sourceUri and update it from the given map. @param incomingDocMap The document's db columns. @return The saved document. @throws IllegalArgumentException if sourceUri or docType are null, or if the document doesn't exist.
[ "Get", "a", "document", "by", "sourceUri", "and", "update", "it", "from", "the", "given", "map", "." ]
train
https://github.com/jbake-org/jbake/blob/beb9042a54bf0eb168821d524c88b9ea0bee88dc/jbake-core/src/main/java/org/jbake/app/ContentStore.java#L194-L215
biojava/biojava
biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java
WorkSheet.replaceColumnValues
public void replaceColumnValues(String column, HashMap<String, String> values) throws Exception { """ Change values in a column where 0 = something and 1 = something different @param column @param values @throws Exception """ for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row,...
java
public void replaceColumnValues(String column, HashMap<String, String> values) throws Exception { for (String row : rowLookup.keySet()) { String oldValue = this.getCell(row, column); String newValue = values.get(oldValue); this.addCell(row, column, newValue); } }
[ "public", "void", "replaceColumnValues", "(", "String", "column", ",", "HashMap", "<", "String", ",", "String", ">", "values", ")", "throws", "Exception", "{", "for", "(", "String", "row", ":", "rowLookup", ".", "keySet", "(", ")", ")", "{", "String", "o...
Change values in a column where 0 = something and 1 = something different @param column @param values @throws Exception
[ "Change", "values", "in", "a", "column", "where", "0", "=", "something", "and", "1", "=", "something", "different" ]
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-survival/src/main/java/org/biojava/nbio/survival/data/WorkSheet.java#L618-L625
looly/hutool
hutool-http/src/main/java/cn/hutool/http/HttpUtil.java
HttpUtil.downloadFile
public static long downloadFile(String url, File destFile, int timeout) { """ 下载远程文件 @param url 请求的url @param destFile 目标文件或目录,当为目录时,取URL中的文件名,取不到使用编码后的URL做为文件名 @param timeout 超时,单位毫秒,-1表示默认超时 @return 文件大小 @since 4.0.4 """ return downloadFile(url, destFile, timeout, null); }
java
public static long downloadFile(String url, File destFile, int timeout) { return downloadFile(url, destFile, timeout, null); }
[ "public", "static", "long", "downloadFile", "(", "String", "url", ",", "File", "destFile", ",", "int", "timeout", ")", "{", "return", "downloadFile", "(", "url", ",", "destFile", ",", "timeout", ",", "null", ")", ";", "}" ]
下载远程文件 @param url 请求的url @param destFile 目标文件或目录,当为目录时,取URL中的文件名,取不到使用编码后的URL做为文件名 @param timeout 超时,单位毫秒,-1表示默认超时 @return 文件大小 @since 4.0.4
[ "下载远程文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-http/src/main/java/cn/hutool/http/HttpUtil.java#L278-L280
gliga/ekstazi
org.ekstazi.core/src/main/java/org/ekstazi/maven/AbstractMojoInterceptor.java
AbstractMojoInterceptor.getField
protected static Object getField(String fieldName, Object mojo) throws Exception { """ Gets the value of the field. This is an alternative to invoking a get method. @param fieldName Name of the field to get @param mojo Mojo @return Value of the field @throws Exception If getting the field value using rel...
java
protected static Object getField(String fieldName, Object mojo) throws Exception { Field field = null; try { field = mojo.getClass().getDeclaredField(fieldName); } catch (NoSuchFieldException ex) { // Ignore exception and try superclass. field = mojo.getClass(...
[ "protected", "static", "Object", "getField", "(", "String", "fieldName", ",", "Object", "mojo", ")", "throws", "Exception", "{", "Field", "field", "=", "null", ";", "try", "{", "field", "=", "mojo", ".", "getClass", "(", ")", ".", "getDeclaredField", "(", ...
Gets the value of the field. This is an alternative to invoking a get method. @param fieldName Name of the field to get @param mojo Mojo @return Value of the field @throws Exception If getting the field value using relection goes wrong
[ "Gets", "the", "value", "of", "the", "field", ".", "This", "is", "an", "alternative", "to", "invoking", "a", "get", "method", "." ]
train
https://github.com/gliga/ekstazi/blob/5bf4d39a13305afe62f8b8d2d7b4c573d37d42a1/org.ekstazi.core/src/main/java/org/ekstazi/maven/AbstractMojoInterceptor.java#L168-L178
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java
FeatureOverlayQuery.tileFeatureCount
public long tileFeatureCount(Point point, double zoom) { """ Get the count of features in the tile at the point coordinate and zoom level @param point point location @param zoom zoom level @return count """ int zoomValue = (int) zoom; long tileFeaturesCount = tileFeatureCount(point, zoomV...
java
public long tileFeatureCount(Point point, double zoom) { int zoomValue = (int) zoom; long tileFeaturesCount = tileFeatureCount(point, zoomValue); return tileFeaturesCount; }
[ "public", "long", "tileFeatureCount", "(", "Point", "point", ",", "double", "zoom", ")", "{", "int", "zoomValue", "=", "(", "int", ")", "zoom", ";", "long", "tileFeaturesCount", "=", "tileFeatureCount", "(", "point", ",", "zoomValue", ")", ";", "return", "...
Get the count of features in the tile at the point coordinate and zoom level @param point point location @param zoom zoom level @return count
[ "Get", "the", "count", "of", "features", "in", "the", "tile", "at", "the", "point", "coordinate", "and", "zoom", "level" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/tiles/overlay/FeatureOverlayQuery.java#L229-L233
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/AbstractKMeans.java
AbstractKMeans.plusEquals
public static void plusEquals(double[] sum, NumberVector vec) { """ Similar to VMath.plusEquals, but accepts a number vector. @param sum Aggregation array @param vec Vector to add """ for(int d = 0; d < sum.length; d++) { sum[d] += vec.doubleValue(d); } }
java
public static void plusEquals(double[] sum, NumberVector vec) { for(int d = 0; d < sum.length; d++) { sum[d] += vec.doubleValue(d); } }
[ "public", "static", "void", "plusEquals", "(", "double", "[", "]", "sum", ",", "NumberVector", "vec", ")", "{", "for", "(", "int", "d", "=", "0", ";", "d", "<", "sum", ".", "length", ";", "d", "++", ")", "{", "sum", "[", "d", "]", "+=", "vec", ...
Similar to VMath.plusEquals, but accepts a number vector. @param sum Aggregation array @param vec Vector to add
[ "Similar", "to", "VMath", ".", "plusEquals", "but", "accepts", "a", "number", "vector", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/kmeans/AbstractKMeans.java#L183-L187
StripesFramework/stripes-stuff
src/main/java/org/stripesstuff/plugin/waitpage/WaitPageInterceptor.java
WaitPageInterceptor.createContextAndRedirect
private Resolution createContextAndRedirect(ExecutionContext executionContext, WaitPage annotation) throws IOException { """ Create a wait context to execute event in background. @param executionContext execution context @param annotation wait page annotation @return redirect redirect user so that wait page app...
java
private Resolution createContextAndRedirect(ExecutionContext executionContext, WaitPage annotation) throws IOException { // Create context used to call the event in background. Context context = this.createContext(executionContext); context.actionBean = executionContext.getActionBean(); ...
[ "private", "Resolution", "createContextAndRedirect", "(", "ExecutionContext", "executionContext", ",", "WaitPage", "annotation", ")", "throws", "IOException", "{", "// Create context used to call the event in background.", "Context", "context", "=", "this", ".", "createContext"...
Create a wait context to execute event in background. @param executionContext execution context @param annotation wait page annotation @return redirect redirect user so that wait page appears @throws IOException could not create background request
[ "Create", "a", "wait", "context", "to", "execute", "event", "in", "background", "." ]
train
https://github.com/StripesFramework/stripes-stuff/blob/51ad92b4bd5862ba34d7c18c5829fb00ea3a3811/src/main/java/org/stripesstuff/plugin/waitpage/WaitPageInterceptor.java#L204-L254
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/ExecutionGraphCache.java
ExecutionGraphCache.getExecutionGraph
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { """ Gets the {@link AccessExecutionGraph} for the given {@link JobID} and caches it. The {@link AccessExecutionGraph} will be requested again after the refresh interval has passed or if the graph could ...
java
public CompletableFuture<AccessExecutionGraph> getExecutionGraph(JobID jobId, RestfulGateway restfulGateway) { return getExecutionGraphInternal(jobId, restfulGateway).thenApply(Function.identity()); }
[ "public", "CompletableFuture", "<", "AccessExecutionGraph", ">", "getExecutionGraph", "(", "JobID", "jobId", ",", "RestfulGateway", "restfulGateway", ")", "{", "return", "getExecutionGraphInternal", "(", "jobId", ",", "restfulGateway", ")", ".", "thenApply", "(", "Fun...
Gets the {@link AccessExecutionGraph} for the given {@link JobID} and caches it. The {@link AccessExecutionGraph} will be requested again after the refresh interval has passed or if the graph could not be retrieved from the given gateway. @param jobId identifying the {@link ArchivedExecutionGraph} to get @param restfu...
[ "Gets", "the", "{", "@link", "AccessExecutionGraph", "}", "for", "the", "given", "{", "@link", "JobID", "}", "and", "caches", "it", ".", "The", "{", "@link", "AccessExecutionGraph", "}", "will", "be", "requested", "again", "after", "the", "refresh", "interva...
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/ExecutionGraphCache.java#L83-L85
JDBDT/jdbdt
src/main/java/org/jdbdt/Log.java
Log.write
void write(CallInfo callInfo, SimpleAssertion assertion) { """ Log simple assertion. @param callInfo Call info. @param assertion Delta assertion. """ Element rootNode = root(callInfo); if (assertion.getSource() != null) { write(rootNode, assertion.getSource()); } Element saNode = create...
java
void write(CallInfo callInfo, SimpleAssertion assertion) { Element rootNode = root(callInfo); if (assertion.getSource() != null) { write(rootNode, assertion.getSource()); } Element saNode = createNode(rootNode, SIMPLE_ASSERTION_TAG); if (! assertion.passed()) { Element errorsNode = creat...
[ "void", "write", "(", "CallInfo", "callInfo", ",", "SimpleAssertion", "assertion", ")", "{", "Element", "rootNode", "=", "root", "(", "callInfo", ")", ";", "if", "(", "assertion", ".", "getSource", "(", ")", "!=", "null", ")", "{", "write", "(", "rootNod...
Log simple assertion. @param callInfo Call info. @param assertion Delta assertion.
[ "Log", "simple", "assertion", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/Log.java#L298-L312
w3c/epubcheck
src/main/java/org/idpf/epubcheck/util/css/CssScanner.java
CssScanner.isNextEscape
private boolean isNextEscape() throws IOException { """ Returns true if reader next() is the start of a valid escape sequence. @return whether or not the reader is at the start of a valid escape sequence. @throws IOException """ boolean result = false; Mark mark = reader.mark(); int ch = ...
java
private boolean isNextEscape() throws IOException { boolean result = false; Mark mark = reader.mark(); int ch = reader.next(); if (ch == '\\') { try { Optional<CssEscape> esc = new CssEscape(reader, builder) .create(); result = esc.isPresent(); }...
[ "private", "boolean", "isNextEscape", "(", ")", "throws", "IOException", "{", "boolean", "result", "=", "false", ";", "Mark", "mark", "=", "reader", ".", "mark", "(", ")", ";", "int", "ch", "=", "reader", ".", "next", "(", ")", ";", "if", "(", "ch", ...
Returns true if reader next() is the start of a valid escape sequence. @return whether or not the reader is at the start of a valid escape sequence. @throws IOException
[ "Returns", "true", "if", "reader", "next", "()", "is", "the", "start", "of", "a", "valid", "escape", "sequence", "." ]
train
https://github.com/w3c/epubcheck/blob/4d5a24d9f2878a2a5497eb11c036cc18fe2c0a78/src/main/java/org/idpf/epubcheck/util/css/CssScanner.java#L1000-L1021
ops4j/org.ops4j.pax.exam2
containers/pax-exam-container-eclipse/src/main/java/org/ops4j/pax/exam/container/eclipse/EclipseOptions.java
EclipseOptions.fromTarget
public static EclipseTargetPlatform fromTarget(InputStream targetDefinition, File cacheFolder) throws IOException { """ Use an Eclipse Target file to provision bundles from, the cache folder can be used to specify a location where the resolve result of the target is stored (e.g. if the target is based on...
java
public static EclipseTargetPlatform fromTarget(InputStream targetDefinition, File cacheFolder) throws IOException { return new TargetResolver(targetDefinition, cacheFolder); }
[ "public", "static", "EclipseTargetPlatform", "fromTarget", "(", "InputStream", "targetDefinition", ",", "File", "cacheFolder", ")", "throws", "IOException", "{", "return", "new", "TargetResolver", "(", "targetDefinition", ",", "cacheFolder", ")", ";", "}" ]
Use an Eclipse Target file to provision bundles from, the cache folder can be used to specify a location where the resolve result of the target is stored (e.g. if the target is based on software-sites) the cache will be refreshed if the sequenceNumber changes but in no other circumstances so it might be needed to clear...
[ "Use", "an", "Eclipse", "Target", "file", "to", "provision", "bundles", "from", "the", "cache", "folder", "can", "be", "used", "to", "specify", "a", "location", "where", "the", "resolve", "result", "of", "the", "target", "is", "stored", "(", "e", ".", "g...
train
https://github.com/ops4j/org.ops4j.pax.exam2/blob/7f83796cbbb857123d8fc7fe817a7637218d5d77/containers/pax-exam-container-eclipse/src/main/java/org/ops4j/pax/exam/container/eclipse/EclipseOptions.java#L132-L135
Viascom/groundwork
service-result/src/main/java/ch/viascom/groundwork/serviceresult/exception/ServiceException.java
ServiceException.addRequestParameter
public ServiceException addRequestParameter(String key, String value) { """ Adds a name-value pair to the request parameter list. @return The exception which is used. """ this.fault.addRequestParam(key, value); return this; }
java
public ServiceException addRequestParameter(String key, String value) { this.fault.addRequestParam(key, value); return this; }
[ "public", "ServiceException", "addRequestParameter", "(", "String", "key", ",", "String", "value", ")", "{", "this", ".", "fault", ".", "addRequestParam", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a name-value pair to the request parameter list. @return The exception which is used.
[ "Adds", "a", "name", "-", "value", "pair", "to", "the", "request", "parameter", "list", "." ]
train
https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/service-result/src/main/java/ch/viascom/groundwork/serviceresult/exception/ServiceException.java#L102-L105
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/ApiClient.java
ApiClient.processHeaderParams
public void processHeaderParams(Map<String, String> headerParams, Request.Builder reqBuilder) { """ Set header parameters to the request builder, including default headers. @param headerParams Header parameters in the ofrm of Map @param reqBuilder Reqeust.Builder """ for (Entry<String, String> para...
java
public void processHeaderParams(Map<String, String> headerParams, Request.Builder reqBuilder) { for (Entry<String, String> param : headerParams.entrySet()) { reqBuilder.header(param.getKey(), parameterToString(param.getValue())); } for (Entry<String, String> header : defaultHeaderMap...
[ "public", "void", "processHeaderParams", "(", "Map", "<", "String", ",", "String", ">", "headerParams", ",", "Request", ".", "Builder", "reqBuilder", ")", "{", "for", "(", "Entry", "<", "String", ",", "String", ">", "param", ":", "headerParams", ".", "entr...
Set header parameters to the request builder, including default headers. @param headerParams Header parameters in the ofrm of Map @param reqBuilder Reqeust.Builder
[ "Set", "header", "parameters", "to", "the", "request", "builder", "including", "default", "headers", "." ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/ApiClient.java#L1025-L1034
mikepenz/FastAdapter
library-core/src/main/java/com/mikepenz/fastadapter/listeners/OnBindViewHolderListenerImpl.java
OnBindViewHolderListenerImpl.onFailedToRecycleView
@Override public boolean onFailedToRecycleView(RecyclerView.ViewHolder viewHolder, int position) { """ is called when the ViewHolder is in a transient state. return true if you want to reuse that view anyways @param viewHolder the viewHolder for the view which failed to recycle @param position the posit...
java
@Override public boolean onFailedToRecycleView(RecyclerView.ViewHolder viewHolder, int position) { IItem item = (IItem) viewHolder.itemView.getTag(R.id.fastadapter_item); if (item != null) { boolean recycle = item.failedToRecycle(viewHolder); if (viewHolder instanceof FastAda...
[ "@", "Override", "public", "boolean", "onFailedToRecycleView", "(", "RecyclerView", ".", "ViewHolder", "viewHolder", ",", "int", "position", ")", "{", "IItem", "item", "=", "(", "IItem", ")", "viewHolder", ".", "itemView", ".", "getTag", "(", "R", ".", "id",...
is called when the ViewHolder is in a transient state. return true if you want to reuse that view anyways @param viewHolder the viewHolder for the view which failed to recycle @param position the position of this viewHolder @return true if we want to recycle anyways (false - it get's destroyed)
[ "is", "called", "when", "the", "ViewHolder", "is", "in", "a", "transient", "state", ".", "return", "true", "if", "you", "want", "to", "reuse", "that", "view", "anyways" ]
train
https://github.com/mikepenz/FastAdapter/blob/3b2412abe001ba58422e0125846b704d4dba4ae9/library-core/src/main/java/com/mikepenz/fastadapter/listeners/OnBindViewHolderListenerImpl.java#L106-L117
phax/ph-oton
ph-oton-app/src/main/java/com/helger/photon/app/url/LinkHelper.java
LinkHelper.getURIWithContext
@Nonnull public static String getURIWithContext (@Nonnull final String sHRef) { """ Prefix the passed href with the relative context path in case the passed href has no protocol yet.<br> Important: this method does not add the session ID in case cookies are disabled by the client! @param sHRef The href to...
java
@Nonnull public static String getURIWithContext (@Nonnull final String sHRef) { ValueEnforcer.notNull (sHRef, "HRef"); // If known protocol, keep it if (hasKnownProtocol (sHRef)) return sHRef; final String sContextPath = ServletContextPathHolder.getContextPath (); return _getURIWithConte...
[ "@", "Nonnull", "public", "static", "String", "getURIWithContext", "(", "@", "Nonnull", "final", "String", "sHRef", ")", "{", "ValueEnforcer", ".", "notNull", "(", "sHRef", ",", "\"HRef\"", ")", ";", "// If known protocol, keep it", "if", "(", "hasKnownProtocol", ...
Prefix the passed href with the relative context path in case the passed href has no protocol yet.<br> Important: this method does not add the session ID in case cookies are disabled by the client! @param sHRef The href to be extended. May not be <code>null</code>. @return Either the original href if already absolute ...
[ "Prefix", "the", "passed", "href", "with", "the", "relative", "context", "path", "in", "case", "the", "passed", "href", "has", "no", "protocol", "yet", ".", "<br", ">", "Important", ":", "this", "method", "does", "not", "add", "the", "session", "ID", "in...
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-app/src/main/java/com/helger/photon/app/url/LinkHelper.java#L142-L153
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.mapping
public static void mapping(String mappedFieldName,Class<?> mappedClass, Class<?> targetClass) { """ Thrown when there is an error in the configuration. @param mappedFieldName name of the mapped field @param mappedClass mapped field's class @param targetClass target field's class """ throw new MappingErro...
java
public static void mapping(String mappedFieldName,Class<?> mappedClass, Class<?> targetClass){ throw new MappingErrorException(MSG.INSTANCE.message(mappingErrorException2,mappedFieldName,mappedClass.getSimpleName(),targetClass.getSimpleName())); }
[ "public", "static", "void", "mapping", "(", "String", "mappedFieldName", ",", "Class", "<", "?", ">", "mappedClass", ",", "Class", "<", "?", ">", "targetClass", ")", "{", "throw", "new", "MappingErrorException", "(", "MSG", ".", "INSTANCE", ".", "message", ...
Thrown when there is an error in the configuration. @param mappedFieldName name of the mapped field @param mappedClass mapped field's class @param targetClass target field's class
[ "Thrown", "when", "there", "is", "an", "error", "in", "the", "configuration", "." ]
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L455-L457
bwkimmel/java-util
src/main/java/ca/eandb/util/io/FileUtil.java
FileUtil.writeObjectToFile
public static void writeObjectToFile(File file, Object object) throws IOException { """ Writes a single object to a file. @param file The <code>File</code> to write to. @param object The <code>Object</code> to write. @throws IOException If the file could not be written. """ FileOutputStream fs = new Fil...
java
public static void writeObjectToFile(File file, Object object) throws IOException { FileOutputStream fs = new FileOutputStream(file); ObjectOutputStream os = new ObjectOutputStream(fs); os.writeObject(object); os.close(); }
[ "public", "static", "void", "writeObjectToFile", "(", "File", "file", ",", "Object", "object", ")", "throws", "IOException", "{", "FileOutputStream", "fs", "=", "new", "FileOutputStream", "(", "file", ")", ";", "ObjectOutputStream", "os", "=", "new", "ObjectOutp...
Writes a single object to a file. @param file The <code>File</code> to write to. @param object The <code>Object</code> to write. @throws IOException If the file could not be written.
[ "Writes", "a", "single", "object", "to", "a", "file", "." ]
train
https://github.com/bwkimmel/java-util/blob/0c03664d42f0e6b111f64447f222aa73c2819e5c/src/main/java/ca/eandb/util/io/FileUtil.java#L161-L166
iipc/webarchive-commons
src/main/java/org/archive/util/FileUtils.java
FileUtils.getRegexFileFilter
public static IOFileFilter getRegexFileFilter(String regex) { """ Get a @link java.io.FileFilter that filters files based on a regular expression. @param regex the regular expression the files must match. @return the newly created filter. """ // Inner class defining the RegexFileFilter cla...
java
public static IOFileFilter getRegexFileFilter(String regex) { // Inner class defining the RegexFileFilter class RegexFileFilter implements IOFileFilter { Pattern pattern; protected RegexFileFilter(String re) { pattern = Pattern.compile(re); } ...
[ "public", "static", "IOFileFilter", "getRegexFileFilter", "(", "String", "regex", ")", "{", "// Inner class defining the RegexFileFilter", "class", "RegexFileFilter", "implements", "IOFileFilter", "{", "Pattern", "pattern", ";", "protected", "RegexFileFilter", "(", "String"...
Get a @link java.io.FileFilter that filters files based on a regular expression. @param regex the regular expression the files must match. @return the newly created filter.
[ "Get", "a", "@link", "java", ".", "io", ".", "FileFilter", "that", "filters", "files", "based", "on", "a", "regular", "expression", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/util/FileUtils.java#L235-L254
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.getByRecommendedElasticPool
public DatabaseInner getByRecommendedElasticPool(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { """ Gets a database inside of a recommented elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain thi...
java
public DatabaseInner getByRecommendedElasticPool(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { return getByRecommendedElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).toBlocking().single().body()...
[ "public", "DatabaseInner", "getByRecommendedElasticPool", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "recommendedElasticPoolName", ",", "String", "databaseName", ")", "{", "return", "getByRecommendedElasticPoolWithServiceResponseAsync", "(",...
Gets a database inside of a recommented elastic pool. @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 recommendedElasticPoolName The name of the elastic pool...
[ "Gets", "a", "database", "inside", "of", "a", "recommented", "elastic", "pool", "." ]
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/DatabasesInner.java#L1540-L1542
UrielCh/ovh-java-sdk
ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java
ApiOvhOrder.dedicated_nasha_new_GET
public ArrayList<String> dedicated_nasha_new_GET(OvhNasHAZoneEnum datacenter, OvhNasHAOfferEnum model) throws IOException { """ Get allowed durations for 'new' option REST: GET /order/dedicated/nasha/new @param datacenter [required] Nas HA localization @param model [required] Capacity of Nas HA offer """ ...
java
public ArrayList<String> dedicated_nasha_new_GET(OvhNasHAZoneEnum datacenter, OvhNasHAOfferEnum model) throws IOException { String qPath = "/order/dedicated/nasha/new"; StringBuilder sb = path(qPath); query(sb, "datacenter", datacenter); query(sb, "model", model); String resp = exec(qPath, "GET", sb.toString(...
[ "public", "ArrayList", "<", "String", ">", "dedicated_nasha_new_GET", "(", "OvhNasHAZoneEnum", "datacenter", ",", "OvhNasHAOfferEnum", "model", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/order/dedicated/nasha/new\"", ";", "StringBuilder", "sb", "=", ...
Get allowed durations for 'new' option REST: GET /order/dedicated/nasha/new @param datacenter [required] Nas HA localization @param model [required] Capacity of Nas HA offer
[ "Get", "allowed", "durations", "for", "new", "option" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-order/src/main/java/net/minidev/ovh/api/ApiOvhOrder.java#L2123-L2130
HeidelTime/heideltime
src/jflexcrf/Viterbi.java
Viterbi.computeVi
public void computeVi(List seq, int pos, DoubleVector Vi, boolean isExp) { """ Compute vi. @param seq the seq @param pos the pos @param Vi the vi @param isExp the is exp """ Vi.assign(0.0); // start scan features for sequence "seq" at position "pos" model.taggerFGen.startScanSFeaturesAt(seq, pos); ...
java
public void computeVi(List seq, int pos, DoubleVector Vi, boolean isExp) { Vi.assign(0.0); // start scan features for sequence "seq" at position "pos" model.taggerFGen.startScanSFeaturesAt(seq, pos); // examine all features at position "pos" while (model.taggerFGen.hasNextSFeature()) { Feature f = model.tag...
[ "public", "void", "computeVi", "(", "List", "seq", ",", "int", "pos", ",", "DoubleVector", "Vi", ",", "boolean", "isExp", ")", "{", "Vi", ".", "assign", "(", "0.0", ")", ";", "// start scan features for sequence \"seq\" at position \"pos\"", "model", ".", "tagge...
Compute vi. @param seq the seq @param pos the pos @param Vi the vi @param isExp the is exp
[ "Compute", "vi", "." ]
train
https://github.com/HeidelTime/heideltime/blob/4ef5002eb5ecfeb818086ff7e394e792ee360335/src/jflexcrf/Viterbi.java#L139-L159
jbundle/jbundle
base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java
BaseMessageTransport.addMessageTransportType
public void addMessageTransportType(BaseMessage externalTrxMessage) { """ From this external message, get the message information (in a map). @param externalMessage The external message. """ String strTransportType = this.getMessageTransportType(); Record recMessageTransport = this.getRecord(M...
java
public void addMessageTransportType(BaseMessage externalTrxMessage) { String strTransportType = this.getMessageTransportType(); Record recMessageTransport = this.getRecord(MessageTransportModel.MESSAGE_TRANSPORT_FILE); if (recMessageTransport == null) recMessageTransport = Record...
[ "public", "void", "addMessageTransportType", "(", "BaseMessage", "externalTrxMessage", ")", "{", "String", "strTransportType", "=", "this", ".", "getMessageTransportType", "(", ")", ";", "Record", "recMessageTransport", "=", "this", ".", "getRecord", "(", "MessageTran...
From this external message, get the message information (in a map). @param externalMessage The external message.
[ "From", "this", "external", "message", "get", "the", "message", "information", "(", "in", "a", "map", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/transport/BaseMessageTransport.java#L468-L494
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/core/KerasPermute.java
KerasPermute.getInputPreprocessor
@Override public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException { """ Gets appropriate DL4J InputPreProcessor for given InputTypes. @param inputType Array of InputTypes @return DL4J InputPreProcessor @throws InvalidKerasConfigurationExc...
java
@Override public InputPreProcessor getInputPreprocessor(InputType... inputType) throws InvalidKerasConfigurationException { if (inputType.length > 1) throw new InvalidKerasConfigurationException( "Keras Permute layer accepts only one input (received " + inputType....
[ "@", "Override", "public", "InputPreProcessor", "getInputPreprocessor", "(", "InputType", "...", "inputType", ")", "throws", "InvalidKerasConfigurationException", "{", "if", "(", "inputType", ".", "length", ">", "1", ")", "throw", "new", "InvalidKerasConfigurationExcept...
Gets appropriate DL4J InputPreProcessor for given InputTypes. @param inputType Array of InputTypes @return DL4J InputPreProcessor @throws InvalidKerasConfigurationException Invalid Keras config @see InputPreProcessor
[ "Gets", "appropriate", "DL4J", "InputPreProcessor", "for", "given", "InputTypes", "." ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/core/KerasPermute.java#L92-L122
VoltDB/voltdb
src/frontend/org/voltdb/client/ClientConfig.java
ClientConfig.enableKerberosAuthentication
public void enableKerberosAuthentication(final String loginContextEntryKey) { """ <p>Use the provided JAAS login context entry key to get the authentication credentials held by the caller<p> @param loginContextEntryKey JAAS login context config entry designation """ try { LoginContext lc ...
java
public void enableKerberosAuthentication(final String loginContextEntryKey) { try { LoginContext lc = new LoginContext(loginContextEntryKey); lc.login(); m_subject = lc.getSubject(); } catch (SecurityException | LoginException ex) { throw new IllegalArgumentExce...
[ "public", "void", "enableKerberosAuthentication", "(", "final", "String", "loginContextEntryKey", ")", "{", "try", "{", "LoginContext", "lc", "=", "new", "LoginContext", "(", "loginContextEntryKey", ")", ";", "lc", ".", "login", "(", ")", ";", "m_subject", "=", ...
<p>Use the provided JAAS login context entry key to get the authentication credentials held by the caller<p> @param loginContextEntryKey JAAS login context config entry designation
[ "<p", ">", "Use", "the", "provided", "JAAS", "login", "context", "entry", "key", "to", "get", "the", "authentication", "credentials", "held", "by", "the", "caller<p", ">" ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/ClientConfig.java#L440-L448
google/error-prone-javac
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java
HtmlTree.META
public static HtmlTree META(String name, String content) { """ Generates a META tag with the name and content attributes. @param name name attribute @param content type of content @return an HtmlTree object for the META tag """ HtmlTree htmltree = new HtmlTree(HtmlTag.META); htmltree.addAt...
java
public static HtmlTree META(String name, String content) { HtmlTree htmltree = new HtmlTree(HtmlTag.META); htmltree.addAttr(HtmlAttr.NAME, nullCheck(name)); htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content)); return htmltree; }
[ "public", "static", "HtmlTree", "META", "(", "String", "name", ",", "String", "content", ")", "{", "HtmlTree", "htmltree", "=", "new", "HtmlTree", "(", "HtmlTag", ".", "META", ")", ";", "htmltree", ".", "addAttr", "(", "HtmlAttr", ".", "NAME", ",", "null...
Generates a META tag with the name and content attributes. @param name name attribute @param content type of content @return an HtmlTree object for the META tag
[ "Generates", "a", "META", "tag", "with", "the", "name", "and", "content", "attributes", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java#L591-L596
OpenCompare/OpenCompare
org.opencompare/pcmdata-importers/src/main/java/pcm_Filter/mutate/PCMMutate.java
PCMMutate.clear_ligne
private static PCM clear_ligne(PCM pcm, PCM pcm_return) { """ Enlever les lignes inutiles @param pcm : Le pcm @return Le pcm avec les lignes inutiles en moins """ List<Product> pdts = pcm.getProducts(); List<Cell> cells = new ArrayList<Cell>() ; for (Product pr : pdts) { float nbCellsEmpty = ...
java
private static PCM clear_ligne(PCM pcm, PCM pcm_return){ List<Product> pdts = pcm.getProducts(); List<Cell> cells = new ArrayList<Cell>() ; for (Product pr : pdts) { float nbCellsEmpty = 0 ; // On ajoute les cellules du product dans une liste cells = pr.getCells(); // On traite les infos des ce...
[ "private", "static", "PCM", "clear_ligne", "(", "PCM", "pcm", ",", "PCM", "pcm_return", ")", "{", "List", "<", "Product", ">", "pdts", "=", "pcm", ".", "getProducts", "(", ")", ";", "List", "<", "Cell", ">", "cells", "=", "new", "ArrayList", "<", "Ce...
Enlever les lignes inutiles @param pcm : Le pcm @return Le pcm avec les lignes inutiles en moins
[ "Enlever", "les", "lignes", "inutiles" ]
train
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/pcmdata-importers/src/main/java/pcm_Filter/mutate/PCMMutate.java#L53-L80
joniles/mpxj
src/main/java/net/sf/mpxj/mpx/Record.java
Record.getPercentage
public Number getPercentage(int field) throws MPXJException { """ Accessor method used to retrieve an Number instance representing the contents of an individual field. If the field does not exist in the record, null is returned. @param field the index number of the field to be retrieved @return the value of ...
java
public Number getPercentage(int field) throws MPXJException { Number result; if ((field < m_fields.length) && (m_fields[field].length() != 0)) { try { result = m_formats.getPercentageDecimalFormat().parse(m_fields[field]); } catch (ParseException ex...
[ "public", "Number", "getPercentage", "(", "int", "field", ")", "throws", "MPXJException", "{", "Number", "result", ";", "if", "(", "(", "field", "<", "m_fields", ".", "length", ")", "&&", "(", "m_fields", "[", "field", "]", ".", "length", "(", ")", "!=...
Accessor method used to retrieve an Number instance representing the contents of an individual field. If the field does not exist in the record, null is returned. @param field the index number of the field to be retrieved @return the value of the required field @throws MPXJException normally thrown when parsing fails
[ "Accessor", "method", "used", "to", "retrieve", "an", "Number", "instance", "representing", "the", "contents", "of", "an", "individual", "field", ".", "If", "the", "field", "does", "not", "exist", "in", "the", "record", "null", "is", "returned", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/mpx/Record.java#L451-L473
gallandarakhneorg/afc
core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java
XMLUtil.getAttributeValueWithDefault
@Pure public static String getAttributeValueWithDefault(Node document, String defaultValue, String... path) { """ Replies the value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. @param document is the XML document t...
java
@Pure public static String getAttributeValueWithDefault(Node document, String defaultValue, String... path) { assert document != null : AssertMessages.notNullParameter(0); return getAttributeValueWithDefault(document, true, defaultValue, path); }
[ "@", "Pure", "public", "static", "String", "getAttributeValueWithDefault", "(", "Node", "document", ",", "String", "defaultValue", ",", "String", "...", "path", ")", "{", "assert", "document", "!=", "null", ":", "AssertMessages", ".", "notNullParameter", "(", "0...
Replies the value that corresponds to the specified attribute's path. <p>The path is an ordered list of tag's names and ended by the name of the attribute. @param document is the XML document to explore. @param defaultValue is the default value to reply if no attribute value was found. @param path is the list of and ...
[ "Replies", "the", "value", "that", "corresponds", "to", "the", "specified", "attribute", "s", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/core/inputoutput/src/main/java/org/arakhne/afc/inputoutput/xml/XMLUtil.java#L1292-L1296
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java
AsmInvokeDistributeFactory.createIf
private static void createIf(MethodVisitor mv, Method method, Label next, Label start, String className, Class<?> parentClass) { """ 创建if分支的byte code @param mv MethodVisitor @param method Method @param next 下一个分支的起始位置 @param start 该分支的结束位置 """ // 标记分支开始位置 mv...
java
private static void createIf(MethodVisitor mv, Method method, Label next, Label start, String className, Class<?> parentClass) { // 标记分支开始位置 mv.visitLabel(start); mv.visitFrame(F_SAME, 0, null, 0, null); // 比较方法声明类 stringEquals(mv, () -> mv.visitV...
[ "private", "static", "void", "createIf", "(", "MethodVisitor", "mv", ",", "Method", "method", ",", "Label", "next", ",", "Label", "start", ",", "String", "className", ",", "Class", "<", "?", ">", "parentClass", ")", "{", "// 标记分支开始位置", "mv", ".", "visitLab...
创建if分支的byte code @param mv MethodVisitor @param method Method @param next 下一个分支的起始位置 @param start 该分支的结束位置
[ "创建if分支的byte", "code" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java#L236-L277
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.addPrebuiltAsync
public Observable<List<PrebuiltEntityExtractor>> addPrebuiltAsync(UUID appId, String versionId, List<String> prebuiltExtractorNames) { """ Adds a list of prebuilt entity extractors to the application. @param appId The application ID. @param versionId The version ID. @param prebuiltExtractorNames An array of p...
java
public Observable<List<PrebuiltEntityExtractor>> addPrebuiltAsync(UUID appId, String versionId, List<String> prebuiltExtractorNames) { return addPrebuiltWithServiceResponseAsync(appId, versionId, prebuiltExtractorNames).map(new Func1<ServiceResponse<List<PrebuiltEntityExtractor>>, List<PrebuiltEntityExtractor>>...
[ "public", "Observable", "<", "List", "<", "PrebuiltEntityExtractor", ">", ">", "addPrebuiltAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "List", "<", "String", ">", "prebuiltExtractorNames", ")", "{", "return", "addPrebuiltWithServiceResponseAsync", ...
Adds a list of prebuilt entity extractors to the application. @param appId The application ID. @param versionId The version ID. @param prebuiltExtractorNames An array of prebuilt entity extractor names. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the List&lt;Preb...
[ "Adds", "a", "list", "of", "prebuilt", "entity", "extractors", "to", "the", "application", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java#L2117-L2124
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/util/ShapeGenerator.java
ShapeGenerator.createRoundRectangle
public Shape createRoundRectangle(final int x, final int y, final int w, final int h, final CornerSize size, final CornerStyle topLeft, final CornerStyle bottomLeft, final CornerStyle bottomRight, final CornerStyle topRight) { """ Return a path for a rectangle with optionally rounded corners. @param...
java
public Shape createRoundRectangle(final int x, final int y, final int w, final int h, final CornerSize size, final CornerStyle topLeft, final CornerStyle bottomLeft, final CornerStyle bottomRight, final CornerStyle topRight) { return createRoundRectangleInternal(x, y, w, h, size.getRadius(w, h), top...
[ "public", "Shape", "createRoundRectangle", "(", "final", "int", "x", ",", "final", "int", "y", ",", "final", "int", "w", ",", "final", "int", "h", ",", "final", "CornerSize", "size", ",", "final", "CornerStyle", "topLeft", ",", "final", "CornerStyle", "bot...
Return a path for a rectangle with optionally rounded corners. @param x the X coordinate of the upper-left corner of the rectangle @param y the Y coordinate of the upper-left corner of the rectangle @param w the width of the rectangle @param h the height of the rectangle @pa...
[ "Return", "a", "path", "for", "a", "rectangle", "with", "optionally", "rounded", "corners", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/util/ShapeGenerator.java#L239-L242
jamesagnew/hapi-fhir
hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PortUtil.java
PortUtil.isAvailable
private static boolean isAvailable(int thePort) { """ This method checks if we are able to bind a given port to both 0.0.0.0 and localhost in order to be sure it's truly available. """ ourLog.info("Testing a bind on thePort {}", thePort); try (ServerSocket ss = new ServerSocket()) { ss.setReuseAddress(...
java
private static boolean isAvailable(int thePort) { ourLog.info("Testing a bind on thePort {}", thePort); try (ServerSocket ss = new ServerSocket()) { ss.setReuseAddress(true); ss.bind(new InetSocketAddress("0.0.0.0", thePort)); try (DatagramSocket ds = new DatagramSocket()) { ds.setReuseAddress(true); ...
[ "private", "static", "boolean", "isAvailable", "(", "int", "thePort", ")", "{", "ourLog", ".", "info", "(", "\"Testing a bind on thePort {}\"", ",", "thePort", ")", ";", "try", "(", "ServerSocket", "ss", "=", "new", "ServerSocket", "(", ")", ")", "{", "ss", ...
This method checks if we are able to bind a given port to both 0.0.0.0 and localhost in order to be sure it's truly available.
[ "This", "method", "checks", "if", "we", "are", "able", "to", "bind", "a", "given", "port", "to", "both", "0", ".", "0", ".", "0", ".", "0", "and", "localhost", "in", "order", "to", "be", "sure", "it", "s", "truly", "available", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/PortUtil.java#L192-L219
OpenCompare/OpenCompare
org.opencompare/api-java/src/main/java/org/opencompare/api/java/PCMMetadata.java
PCMMetadata.getSortedFeatures
public List<Feature> getSortedFeatures() { """ Return the sorted features concordingly with metadata @return an ordered list of features """ ArrayList<Feature> result = new ArrayList<>(pcm.getConcreteFeatures()); Collections.sort(result, new Comparator<Feature>() { @Override ...
java
public List<Feature> getSortedFeatures() { ArrayList<Feature> result = new ArrayList<>(pcm.getConcreteFeatures()); Collections.sort(result, new Comparator<Feature>() { @Override public int compare(Feature f1, Feature f2) { Integer fp1 = getFeaturePosition(f1); ...
[ "public", "List", "<", "Feature", ">", "getSortedFeatures", "(", ")", "{", "ArrayList", "<", "Feature", ">", "result", "=", "new", "ArrayList", "<>", "(", "pcm", ".", "getConcreteFeatures", "(", ")", ")", ";", "Collections", ".", "sort", "(", "result", "...
Return the sorted features concordingly with metadata @return an ordered list of features
[ "Return", "the", "sorted", "features", "concordingly", "with", "metadata" ]
train
https://github.com/OpenCompare/OpenCompare/blob/6cd776466b375cb8ecca08fcd94e573d65e20b14/org.opencompare/api-java/src/main/java/org/opencompare/api/java/PCMMetadata.java#L119-L130
pac4j/pac4j
pac4j-oauth/src/main/java/org/pac4j/oauth/profile/facebook/FacebookProfileCreator.java
FacebookProfileCreator.addExchangeToken
protected String addExchangeToken(final String url, final OAuth2AccessToken accessToken) { """ Adds the token to the URL in question. If we require appsecret_proof, then this method will also add the appsecret_proof parameter to the URL, as Facebook expects. @param url the URL to modify @param accessToken the...
java
protected String addExchangeToken(final String url, final OAuth2AccessToken accessToken) { final FacebookProfileDefinition profileDefinition = (FacebookProfileDefinition) configuration.getProfileDefinition(); final FacebookConfiguration facebookConfiguration = (FacebookConfiguration) configuration; ...
[ "protected", "String", "addExchangeToken", "(", "final", "String", "url", ",", "final", "OAuth2AccessToken", "accessToken", ")", "{", "final", "FacebookProfileDefinition", "profileDefinition", "=", "(", "FacebookProfileDefinition", ")", "configuration", ".", "getProfileDe...
Adds the token to the URL in question. If we require appsecret_proof, then this method will also add the appsecret_proof parameter to the URL, as Facebook expects. @param url the URL to modify @param accessToken the token we're passing back and forth @return url with additional parameter(s)
[ "Adds", "the", "token", "to", "the", "URL", "in", "question", ".", "If", "we", "require", "appsecret_proof", "then", "this", "method", "will", "also", "add", "the", "appsecret_proof", "parameter", "to", "the", "URL", "as", "Facebook", "expects", "." ]
train
https://github.com/pac4j/pac4j/blob/d9cd029f8783792b31dd48bf1e32f80628f2c4a3/pac4j-oauth/src/main/java/org/pac4j/oauth/profile/facebook/FacebookProfileCreator.java#L92-L100
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.withObjectInputStream
public static <T> T withObjectInputStream(Path path, @ClosureParams(value = SimpleType.class, options = "java.io.ObjectInputStream") Closure<T> closure) throws IOException { """ Create a new ObjectInputStream for this file and pass it to the closure. This method ensures the stream is closed after the closure retu...
java
public static <T> T withObjectInputStream(Path path, @ClosureParams(value = SimpleType.class, options = "java.io.ObjectInputStream") Closure<T> closure) throws IOException { return IOGroovyMethods.withStream(newObjectInputStream(path), closure); }
[ "public", "static", "<", "T", ">", "T", "withObjectInputStream", "(", "Path", "path", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.io.ObjectInputStream\"", ")", "Closure", "<", "T", ">", "closure", ")...
Create a new ObjectInputStream for this file and pass it to the closure. This method ensures the stream is closed after the closure returns. @param path a Path @param closure a closure @return the value returned by the closure @throws java.io.IOException if an IOException occurs. @see org.codehaus.groovy.runtime.IO...
[ "Create", "a", "new", "ObjectInputStream", "for", "this", "file", "and", "pass", "it", "to", "the", "closure", ".", "This", "method", "ensures", "the", "stream", "is", "closed", "after", "the", "closure", "returns", "." ]
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L175-L177
CloudSlang/cs-actions
cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java
AwsSignatureV4.getStringToSign
public String getStringToSign(String requestDate, String credentialScope, String canonicalRequest) throws SignatureException { """ Combines the inputs into a string with a fixed structure and calculates the canonical request digest. This string can be used with the derived signing key to create an AWS signature. ...
java
public String getStringToSign(String requestDate, String credentialScope, String canonicalRequest) throws SignatureException { try { return AWS4_SIGNING_ALGORITHM + LINE_SEPARATOR + requestDate + LINE_SEPARATOR + credentialScope + LINE_SEPARATOR + new String(Hex.encode(calculateH...
[ "public", "String", "getStringToSign", "(", "String", "requestDate", ",", "String", "credentialScope", ",", "String", "canonicalRequest", ")", "throws", "SignatureException", "{", "try", "{", "return", "AWS4_SIGNING_ALGORITHM", "+", "LINE_SEPARATOR", "+", "requestDate",...
Combines the inputs into a string with a fixed structure and calculates the canonical request digest. This string can be used with the derived signing key to create an AWS signature. @param requestDate Request date in YYYYMMDD'T'HHMMSS'Z' format. @param credentialScope Request credential scope. @param canonicalR...
[ "Combines", "the", "inputs", "into", "a", "string", "with", "a", "fixed", "structure", "and", "calculates", "the", "canonical", "request", "digest", ".", "This", "string", "can", "be", "used", "with", "the", "derived", "signing", "key", "to", "create", "an",...
train
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureV4.java#L81-L88
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java
CommerceRegionPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the commerce regions where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CommerceRegion commerceRegion : findByUuid_C(uuid, companyId, QueryUtil.A...
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CommerceRegion commerceRegion : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commerceRegion); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CommerceRegion", "commerceRegion", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUti...
Removes all the commerce regions where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "commerce", "regions", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceRegionPersistenceImpl.java#L1401-L1407
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java
AmazonS3Client.getAcl
private AccessControlList getAcl(String bucketName, String key, String versionId, boolean isRequesterPays, AmazonWebServiceRequest originalRequest) { """ <p> Gets the Amazon S3 {@link AccessControlList} (ACL) for the specified resource. (bucket if only the bucketName parameter is specified, otherwise...
java
private AccessControlList getAcl(String bucketName, String key, String versionId, boolean isRequesterPays, AmazonWebServiceRequest originalRequest) { if (originalRequest == null) originalRequest = new GenericBucketRequest(bucketName); Request<AmazonWebServiceRequest> request = createRequest...
[ "private", "AccessControlList", "getAcl", "(", "String", "bucketName", ",", "String", "key", ",", "String", "versionId", ",", "boolean", "isRequesterPays", ",", "AmazonWebServiceRequest", "originalRequest", ")", "{", "if", "(", "originalRequest", "==", "null", ")", ...
<p> Gets the Amazon S3 {@link AccessControlList} (ACL) for the specified resource. (bucket if only the bucketName parameter is specified, otherwise the object with the specified key in the bucket). </p> @param bucketName The name of the bucket whose ACL should be returned if the key parameter is not specified, otherwi...
[ "<p", ">", "Gets", "the", "Amazon", "S3", "{", "@link", "AccessControlList", "}", "(", "ACL", ")", "for", "the", "specified", "resource", ".", "(", "bucket", "if", "only", "the", "bucketName", "parameter", "is", "specified", "otherwise", "the", "object", "...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3Client.java#L3864-L3888
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectMatch
public void expectMatch(String name, String message, List<String> values) { """ Validates to fields to (case-sensitive) match @param name The field to check @param message A custom error message instead of the default one @param values A list of given values to check against """ String value = Opt...
java
public void expectMatch(String name, String message, List<String> values) { String value = Optional.ofNullable(get(name)).orElse(""); if (!(values).contains(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MATCH_VALUES_KEY.name(), name))); } }
[ "public", "void", "expectMatch", "(", "String", "name", ",", "String", "message", ",", "List", "<", "String", ">", "values", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"",...
Validates to fields to (case-sensitive) match @param name The field to check @param message A custom error message instead of the default one @param values A list of given values to check against
[ "Validates", "to", "fields", "to", "(", "case", "-", "sensitive", ")", "match" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L234-L240
fhoeben/hsac-fitnesse-fixtures
src/main/java/nl/hsac/fitnesse/fixture/slim/ListFixture.java
ListFixture.copyValuesFromTo
public void copyValuesFromTo(Collection<Object> source, List<Object> target) { """ Adds values to list. @param source list whose values are to be copied. @param target list to get element value from. """ target.addAll(source); }
java
public void copyValuesFromTo(Collection<Object> source, List<Object> target) { target.addAll(source); }
[ "public", "void", "copyValuesFromTo", "(", "Collection", "<", "Object", ">", "source", ",", "List", "<", "Object", ">", "target", ")", "{", "target", ".", "addAll", "(", "source", ")", ";", "}" ]
Adds values to list. @param source list whose values are to be copied. @param target list to get element value from.
[ "Adds", "values", "to", "list", "." ]
train
https://github.com/fhoeben/hsac-fitnesse-fixtures/blob/4e9018d7386a9aa65bfcbf07eb28ae064edd1732/src/main/java/nl/hsac/fitnesse/fixture/slim/ListFixture.java#L166-L168
GerdHolz/TOVAL
src/de/invation/code/toval/validate/Validate.java
Validate.inclusiveBetween
public static <T extends Object> void inclusiveBetween(T start, T end, Comparable<T> value) { """ Checks if the given value lies in between the start and end values (inclusive). @param start The start value (lower bound). @param end The end value (upper bound). @param value The comparable value to validate. @t...
java
public static <T extends Object> void inclusiveBetween(T start, T end, Comparable<T> value) { if(!validation) return; Validate.notNull(start); Validate.notNull(end); Validate.notNull(value); if(value.compareTo(start) < 0) throw new ParameterException(ErrorCode.RANGEVIOLATION, "Parameter is not in range ["...
[ "public", "static", "<", "T", "extends", "Object", ">", "void", "inclusiveBetween", "(", "T", "start", ",", "T", "end", ",", "Comparable", "<", "T", ">", "value", ")", "{", "if", "(", "!", "validation", ")", "return", ";", "Validate", ".", "notNull", ...
Checks if the given value lies in between the start and end values (inclusive). @param start The start value (lower bound). @param end The end value (upper bound). @param value The comparable value to validate. @throws ParameterException if some parameters are <code>null</code>, the given value lies not between the sta...
[ "Checks", "if", "the", "given", "value", "lies", "in", "between", "the", "start", "and", "end", "values", "(", "inclusive", ")", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/validate/Validate.java#L361-L370
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/BetaDistribution.java
BetaDistribution.logpdf
public static double logpdf(double val, double alpha, double beta) { """ Static version of the PDF of the beta distribution @param val Value @param alpha Shape parameter a @param beta Shape parameter b @return probability density """ return (alpha <= 0. || beta <= 0. || Double.isNaN(alpha) || Double....
java
public static double logpdf(double val, double alpha, double beta) { return (alpha <= 0. || beta <= 0. || Double.isNaN(alpha) || Double.isNaN(beta) || Double.isNaN(val)) ? Double.NaN : // (val < 0. || val > 1.) ? Double.NEGATIVE_INFINITY : // val == 0. ? (alpha > 1. ? Double.NEGATIVE_INFINITY : ...
[ "public", "static", "double", "logpdf", "(", "double", "val", ",", "double", "alpha", ",", "double", "beta", ")", "{", "return", "(", "alpha", "<=", "0.", "||", "beta", "<=", "0.", "||", "Double", ".", "isNaN", "(", "alpha", ")", "||", "Double", ".",...
Static version of the PDF of the beta distribution @param val Value @param alpha Shape parameter a @param beta Shape parameter b @return probability density
[ "Static", "version", "of", "the", "PDF", "of", "the", "beta", "distribution" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/statistics/distribution/BetaDistribution.java#L213-L219
craftercms/profile
security-provider/src/main/java/org/craftercms/security/processors/impl/SavedRequestAwareProcessor.java
SavedRequestAwareProcessor.processRequest
public void processRequest(RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception { """ Checks if there's a request in the request cache (which means that a previous request was cached). If there's one, the request cache creates a new request by merging the saved request with the c...
java
public void processRequest(RequestContext context, RequestSecurityProcessorChain processorChain) throws Exception { HttpServletRequest request = context.getRequest(); HttpServletResponse response = context.getResponse(); HttpServletRequest wrappedSavedRequest = requestCache.getMatchingRequest(re...
[ "public", "void", "processRequest", "(", "RequestContext", "context", ",", "RequestSecurityProcessorChain", "processorChain", ")", "throws", "Exception", "{", "HttpServletRequest", "request", "=", "context", ".", "getRequest", "(", ")", ";", "HttpServletResponse", "resp...
Checks if there's a request in the request cache (which means that a previous request was cached). If there's one, the request cache creates a new request by merging the saved request with the current request. The new request is used through the rest of the processor chain. @param context the context which hold...
[ "Checks", "if", "there", "s", "a", "request", "in", "the", "request", "cache", "(", "which", "means", "that", "a", "previous", "request", "was", "cached", ")", ".", "If", "there", "s", "one", "the", "request", "cache", "creates", "a", "new", "request", ...
train
https://github.com/craftercms/profile/blob/d829c1136b0fd21d87dc925cb7046cbd38a300a4/security-provider/src/main/java/org/craftercms/security/processors/impl/SavedRequestAwareProcessor.java#L59-L71
apache/flink
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AggregateOperationFactory.java
AggregateOperationFactory.createAggregate
public TableOperation createAggregate( List<Expression> groupings, List<Expression> aggregates, TableOperation child) { """ Creates a valid {@link AggregateTableOperation} operation. @param groupings expressions describing grouping key of aggregates @param aggregates expressions describing aggregation...
java
public TableOperation createAggregate( List<Expression> groupings, List<Expression> aggregates, TableOperation child) { validateGroupings(groupings); validateAggregates(aggregates); List<PlannerExpression> convertedGroupings = bridge(groupings); List<PlannerExpression> convertedAggregates = bridge(agg...
[ "public", "TableOperation", "createAggregate", "(", "List", "<", "Expression", ">", "groupings", ",", "List", "<", "Expression", ">", "aggregates", ",", "TableOperation", "child", ")", "{", "validateGroupings", "(", "groupings", ")", ";", "validateAggregates", "("...
Creates a valid {@link AggregateTableOperation} operation. @param groupings expressions describing grouping key of aggregates @param aggregates expressions describing aggregation functions @param child relational operation on top of which to apply the aggregation @return valid aggregate operation
[ "Creates", "a", "valid", "{", "@link", "AggregateTableOperation", "}", "operation", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/operations/AggregateOperationFactory.java#L90-L115
Azure/azure-sdk-for-java
sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ServerAdvisorsInner.java
ServerAdvisorsInner.listByServerAsync
public Observable<List<AdvisorInner>> listByServerAsync(String resourceGroupName, String serverName) { """ Gets a list of server advisors. @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 serv...
java
public Observable<List<AdvisorInner>> listByServerAsync(String resourceGroupName, String serverName) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName).map(new Func1<ServiceResponse<List<AdvisorInner>>, List<AdvisorInner>>() { @Override public List<AdvisorInner>...
[ "public", "Observable", "<", "List", "<", "AdvisorInner", ">", ">", "listByServerAsync", "(", "String", "resourceGroupName", ",", "String", "serverName", ")", "{", "return", "listByServerWithServiceResponseAsync", "(", "resourceGroupName", ",", "serverName", ")", ".",...
Gets a list of server advisors. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @throws IllegalArgumentException thrown if parameters fail the validation @return th...
[ "Gets", "a", "list", "of", "server", "advisors", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/implementation/ServerAdvisorsInner.java#L107-L114
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java
ImageMiscOps.addUniform
public static void addUniform(GrayS32 input, Random rand , int min , int max) { """ Adds uniform i.i.d noise to each pixel in the image. Noise range is min &le; X &lt; max. """ int range = max-min; int[] data = input.data; for (int y = 0; y < input.height; y++) { int index = input.getStartIndex() +...
java
public static void addUniform(GrayS32 input, Random rand , int min , int max) { int range = max-min; int[] data = input.data; for (int y = 0; y < input.height; y++) { int index = input.getStartIndex() + y * input.getStride(); for (int x = 0; x < input.width; x++) { int value = (data[index] ) + rand.ne...
[ "public", "static", "void", "addUniform", "(", "GrayS32", "input", ",", "Random", "rand", ",", "int", "min", ",", "int", "max", ")", "{", "int", "range", "=", "max", "-", "min", ";", "int", "[", "]", "data", "=", "input", ".", "data", ";", "for", ...
Adds uniform i.i.d noise to each pixel in the image. Noise range is min &le; X &lt; max.
[ "Adds", "uniform", "i", ".", "i", ".", "d", "noise", "to", "each", "pixel", "in", "the", "image", ".", "Noise", "range", "is", "min", "&le", ";", "X", "&lt", ";", "max", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/misc/ImageMiscOps.java#L3627-L3639
digipost/sdp-shared
api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java
Wss4jInterceptor.updateContextWithResults
@SuppressWarnings("unchecked") private void updateContextWithResults(final MessageContext messageContext, final WSHandlerResult result) { """ Puts the results of WS-Security headers processing in the message context. Some actions like Signature Confirmation require this. """ List<WSHandlerResult> ...
java
@SuppressWarnings("unchecked") private void updateContextWithResults(final MessageContext messageContext, final WSHandlerResult result) { List<WSHandlerResult> handlerResults; if ((handlerResults = (List<WSHandlerResult>) messageContext.getProperty(WSHandlerConstants.RECV_RESULTS)) == null) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "updateContextWithResults", "(", "final", "MessageContext", "messageContext", ",", "final", "WSHandlerResult", "result", ")", "{", "List", "<", "WSHandlerResult", ">", "handlerResults", ";", "if", ...
Puts the results of WS-Security headers processing in the message context. Some actions like Signature Confirmation require this.
[ "Puts", "the", "results", "of", "WS", "-", "Security", "headers", "processing", "in", "the", "message", "context", ".", "Some", "actions", "like", "Signature", "Confirmation", "require", "this", "." ]
train
https://github.com/digipost/sdp-shared/blob/c34920a993b65ff0908dab9d9c92140ded7312bc/api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java#L419-L428
grycap/coreutils
coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/http/Http2Client.java
Http2Client.asyncPostBytes
public void asyncPostBytes(final String url, final String mediaType, final Supplier<byte[]> supplier, final Callback callback) { """ Posts the content of a buffer of bytes to a server via a HTTP POST request. @param url - URL target of this request @param mediaType - Content-Type header for this request @param ...
java
public void asyncPostBytes(final String url, final String mediaType, final Supplier<byte[]> supplier, final Callback callback) { final String url2 = requireNonNull(trimToNull(url), "A non-empty URL expected"); final String mediaType2 = requireNonNull(trimToNull(mediaType), "A non-empty media type expected"); requ...
[ "public", "void", "asyncPostBytes", "(", "final", "String", "url", ",", "final", "String", "mediaType", ",", "final", "Supplier", "<", "byte", "[", "]", ">", "supplier", ",", "final", "Callback", "callback", ")", "{", "final", "String", "url2", "=", "requi...
Posts the content of a buffer of bytes to a server via a HTTP POST request. @param url - URL target of this request @param mediaType - Content-Type header for this request @param supplier - supplies the content of this request @param callback - is called back when the response is readable
[ "Posts", "the", "content", "of", "a", "buffer", "of", "bytes", "to", "a", "server", "via", "a", "HTTP", "POST", "request", "." ]
train
https://github.com/grycap/coreutils/blob/e6db61dc50b49ea7276c0c29c7401204681a10c2/coreutils-fiber/src/main/java/es/upv/grycap/coreutils/fiber/http/Http2Client.java#L126-L144
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleSystem.java
ParticleSystem.getNewParticle
public Particle getNewParticle(ParticleEmitter emitter, float life) { """ Get a new particle from the system. This should be used by emitters to request particles @param emitter The emitter requesting the particle @param life The time the new particle should live for @return A particle from the system ""...
java
public Particle getNewParticle(ParticleEmitter emitter, float life) { ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter); ArrayList available = pool.available; if (available.size() > 0) { Particle p = (Particle) available.remove(available.size()-1); p.init(emitter, life); p.set...
[ "public", "Particle", "getNewParticle", "(", "ParticleEmitter", "emitter", ",", "float", "life", ")", "{", "ParticlePool", "pool", "=", "(", "ParticlePool", ")", "particlesByEmitter", ".", "get", "(", "emitter", ")", ";", "ArrayList", "available", "=", "pool", ...
Get a new particle from the system. This should be used by emitters to request particles @param emitter The emitter requesting the particle @param life The time the new particle should live for @return A particle from the system
[ "Get", "a", "new", "particle", "from", "the", "system", ".", "This", "should", "be", "used", "by", "emitters", "to", "request", "particles" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleSystem.java#L546-L561
Azure/azure-sdk-for-java
eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java
DomainsInner.regenerateKey
public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, String domainName, String keyName) { """ Regenerate key for a domain. Regenerate a shared access key for a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the do...
java
public DomainSharedAccessKeysInner regenerateKey(String resourceGroupName, String domainName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, domainName, keyName).toBlocking().single().body(); }
[ "public", "DomainSharedAccessKeysInner", "regenerateKey", "(", "String", "resourceGroupName", ",", "String", "domainName", ",", "String", "keyName", ")", "{", "return", "regenerateKeyWithServiceResponseAsync", "(", "resourceGroupName", ",", "domainName", ",", "keyName", "...
Regenerate key for a domain. Regenerate a shared access key for a domain. @param resourceGroupName The name of the resource group within the user's subscription. @param domainName Name of the domain @param keyName Key name to regenerate key1 or key2 @throws IllegalArgumentException thrown if parameters fail the valida...
[ "Regenerate", "key", "for", "a", "domain", ".", "Regenerate", "a", "shared", "access", "key", "for", "a", "domain", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventgrid/resource-manager/v2018_09_15_preview/src/main/java/com/microsoft/azure/management/eventgrid/v2018_09_15_preview/implementation/DomainsInner.java#L1163-L1165
apache/incubator-druid
server/src/main/java/org/apache/druid/curator/discovery/DiscoveryModule.java
DiscoveryModule.register
public static void register(Binder binder, Annotation annotation) { """ Requests that the annotated DruidNode instance be injected and published as part of the lifecycle. That is, this module will announce the DruidNode instance returned by injector.getInstance(Key.get(DruidNode.class, annotation)) automatical...
java
public static void register(Binder binder, Annotation annotation) { registerKey(binder, Key.get(new TypeLiteral<DruidNode>(){}, annotation)); }
[ "public", "static", "void", "register", "(", "Binder", "binder", ",", "Annotation", "annotation", ")", "{", "registerKey", "(", "binder", ",", "Key", ".", "get", "(", "new", "TypeLiteral", "<", "DruidNode", ">", "(", ")", "{", "}", ",", "annotation", ")"...
Requests that the annotated DruidNode instance be injected and published as part of the lifecycle. That is, this module will announce the DruidNode instance returned by injector.getInstance(Key.get(DruidNode.class, annotation)) automatically. Announcement will happen in the ANNOUNCEMENTS stage of the Lifecycle @param...
[ "Requests", "that", "the", "annotated", "DruidNode", "instance", "be", "injected", "and", "published", "as", "part", "of", "the", "lifecycle", "." ]
train
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/server/src/main/java/org/apache/druid/curator/discovery/DiscoveryModule.java#L112-L115
pippo-java/pippo
pippo-session-parent/pippo-session-mongodb/src/main/java/ro/pippo/session/mongodb/MongoDBSessionDataStorage.java
MongoDBSessionDataStorage.createIndex
private void createIndex(long idleTime) { """ Create TTL index @param idleTime idle time in seconds @see <a href="https://docs.mongodb.com/manual/core/index-ttl/">Mongo docs</a> """ try { this.sessions.createIndex( new Document(SESSION_TTL, 1), ne...
java
private void createIndex(long idleTime) { try { this.sessions.createIndex( new Document(SESSION_TTL, 1), new IndexOptions() .expireAfter(idleTime, TimeUnit.SECONDS) .name(SESSION_INDEX_NAME)); } catch (MongoExcep...
[ "private", "void", "createIndex", "(", "long", "idleTime", ")", "{", "try", "{", "this", ".", "sessions", ".", "createIndex", "(", "new", "Document", "(", "SESSION_TTL", ",", "1", ")", ",", "new", "IndexOptions", "(", ")", ".", "expireAfter", "(", "idleT...
Create TTL index @param idleTime idle time in seconds @see <a href="https://docs.mongodb.com/manual/core/index-ttl/">Mongo docs</a>
[ "Create", "TTL", "index" ]
train
https://github.com/pippo-java/pippo/blob/cb5ccb453bffcc3cf386adc660674812d10b9726/pippo-session-parent/pippo-session-mongodb/src/main/java/ro/pippo/session/mongodb/MongoDBSessionDataStorage.java#L113-L128
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/ContentRest.java
ContentRest.getContent
@GET public Response getContent(@PathParam("spaceID") String spaceID, @PathParam("contentID") String contentID, @QueryParam("storeID") String storeID, @QueryParam("attachment") boolean attachment, ...
java
@GET public Response getContent(@PathParam("spaceID") String spaceID, @PathParam("contentID") String contentID, @QueryParam("storeID") String storeID, @QueryParam("attachment") boolean attachment, ...
[ "@", "GET", "public", "Response", "getContent", "(", "@", "PathParam", "(", "\"spaceID\"", ")", "String", "spaceID", ",", "@", "PathParam", "(", "\"contentID\"", ")", "String", "contentID", ",", "@", "QueryParam", "(", "\"storeID\"", ")", "String", "storeID", ...
see ContentResource.getContent() see ContentResource.getContentProperties() @return 200 response with content stream as body and content properties as headers
[ "see", "ContentResource", ".", "getContent", "()", "see", "ContentResource", ".", "getContentProperties", "()" ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/ContentRest.java#L83-L120
gallandarakhneorg/afc
advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/attr/DBaseFileAttributePool.java
DBaseFileAttributePool.getProvider
@Pure public static DBaseFileAttributeProvider getProvider(URI dbaseFile, int recordNumber) { """ Get an attribute container that corresponds to the specified file. @param dbaseFile is the file to read @param recordNumber is the index of the record inside the file ({@code 0..size-1}). @return a container or ...
java
@Pure public static DBaseFileAttributeProvider getProvider(URI dbaseFile, int recordNumber) { final DBaseFileAttributePool pool = getPool(dbaseFile); if (pool != null) { final DBaseFileAttributeAccessor accessor = pool.getAccessor(recordNumber); if (accessor != null) { return new DBaseFileAttributeProvid...
[ "@", "Pure", "public", "static", "DBaseFileAttributeProvider", "getProvider", "(", "URI", "dbaseFile", ",", "int", "recordNumber", ")", "{", "final", "DBaseFileAttributePool", "pool", "=", "getPool", "(", "dbaseFile", ")", ";", "if", "(", "pool", "!=", "null", ...
Get an attribute container that corresponds to the specified file. @param dbaseFile is the file to read @param recordNumber is the index of the record inside the file ({@code 0..size-1}). @return a container or <code>null</code> on error
[ "Get", "an", "attribute", "container", "that", "corresponds", "to", "the", "specified", "file", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/dbasefile/src/main/java/org/arakhne/afc/io/dbase/attr/DBaseFileAttributePool.java#L181-L191
UrielCh/ovh-java-sdk
ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java
ApiOvhTelephony.billingAccount_voicemail_serviceName_directories_id_download_GET
public OvhPcsFile billingAccount_voicemail_serviceName_directories_id_download_GET(String billingAccount, String serviceName, Long id, OvhServiceVoicemailAudioFormatEnum format) throws IOException { """ Get a url to download the sound file REST: GET /telephony/{billingAccount}/voicemail/{serviceName}/directorie...
java
public OvhPcsFile billingAccount_voicemail_serviceName_directories_id_download_GET(String billingAccount, String serviceName, Long id, OvhServiceVoicemailAudioFormatEnum format) throws IOException { String qPath = "/telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}/download"; StringBuilder sb = pa...
[ "public", "OvhPcsFile", "billingAccount_voicemail_serviceName_directories_id_download_GET", "(", "String", "billingAccount", ",", "String", "serviceName", ",", "Long", "id", ",", "OvhServiceVoicemailAudioFormatEnum", "format", ")", "throws", "IOException", "{", "String", "qPa...
Get a url to download the sound file REST: GET /telephony/{billingAccount}/voicemail/{serviceName}/directories/{id}/download @param format [required] File format wanted @param billingAccount [required] The name of your billingAccount @param serviceName [required] @param id [required] Id of the object
[ "Get", "a", "url", "to", "download", "the", "sound", "file" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-telephony/src/main/java/net/minidev/ovh/api/ApiOvhTelephony.java#L7926-L7932
igniterealtime/Smack
smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java
ChatManager.createChat
public Chat createChat(EntityJid userJID, String thread, ChatMessageListener listener) { """ Creates a new chat using the specified thread ID, then returns it. @param userJID the jid of the user this chat is with @param thread the thread of the created chat. @param listener the optional listener to add to the...
java
public Chat createChat(EntityJid userJID, String thread, ChatMessageListener listener) { if (thread == null) { thread = nextID(); } Chat chat = threadChats.get(thread); if (chat != null) { throw new IllegalArgumentException("ThreadID is already used"); } ...
[ "public", "Chat", "createChat", "(", "EntityJid", "userJID", ",", "String", "thread", ",", "ChatMessageListener", "listener", ")", "{", "if", "(", "thread", "==", "null", ")", "{", "thread", "=", "nextID", "(", ")", ";", "}", "Chat", "chat", "=", "thread...
Creates a new chat using the specified thread ID, then returns it. @param userJID the jid of the user this chat is with @param thread the thread of the created chat. @param listener the optional listener to add to the chat @return the created chat.
[ "Creates", "a", "new", "chat", "using", "the", "specified", "thread", "ID", "then", "returns", "it", "." ]
train
https://github.com/igniterealtime/Smack/blob/870756997faec1e1bfabfac0cd6c2395b04da873/smack-im/src/main/java/org/jivesoftware/smack/chat/ChatManager.java#L247-L258
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.createTempFile
public static File createTempFile(String prefix, String suffix, File dir, boolean isReCreat) throws IORuntimeException { """ 创建临时文件<br> 创建后的文件名为 prefix[Randon].suffix From com.jodd.io.FileUtil @param prefix 前缀,至少3个字符 @param suffix 后缀,如果null则使用默认.tmp @param dir 临时文件创建的所在目录 @param isReCreat 是否重新创建文件(删掉原来的,创建新...
java
public static File createTempFile(String prefix, String suffix, File dir, boolean isReCreat) throws IORuntimeException { int exceptionsCount = 0; while (true) { try { File file = File.createTempFile(prefix, suffix, dir).getCanonicalFile(); if (isReCreat) { file.delete(); file.createNewFi...
[ "public", "static", "File", "createTempFile", "(", "String", "prefix", ",", "String", "suffix", ",", "File", "dir", ",", "boolean", "isReCreat", ")", "throws", "IORuntimeException", "{", "int", "exceptionsCount", "=", "0", ";", "while", "(", "true", ")", "{"...
创建临时文件<br> 创建后的文件名为 prefix[Randon].suffix From com.jodd.io.FileUtil @param prefix 前缀,至少3个字符 @param suffix 后缀,如果null则使用默认.tmp @param dir 临时文件创建的所在目录 @param isReCreat 是否重新创建文件(删掉原来的,创建新的) @return 临时文件 @throws IORuntimeException IO异常
[ "创建临时文件<br", ">", "创建后的文件名为", "prefix", "[", "Randon", "]", ".", "suffix", "From", "com", ".", "jodd", ".", "io", ".", "FileUtil" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L897-L913
ManfredTremmel/gwt-bean-validators
gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/apache/commons/beanutils/BeanUtils.java
BeanUtils.getProperty
public static String getProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { """ <p> Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. </p> <p> ...
java
public static String getProperty(final Object pbean, final String pname) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return Objects.toString(PropertyUtils.getProperty(pbean, pname), null); }
[ "public", "static", "String", "getProperty", "(", "final", "Object", "pbean", ",", "final", "String", "pname", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", ",", "NoSuchMethodException", "{", "return", "Objects", ".", "toString", "(", "P...
<p> Return the value of the specified property of the specified bean, no matter which property reference format is used, as a String. </p> <p> For more details see <code>BeanUtilsBean</code>. </p> @param pbean Bean whose property is to be extracted @param pname Possibly indexed and/or nested name of the property to b...
[ "<p", ">", "Return", "the", "value", "of", "the", "specified", "property", "of", "the", "specified", "bean", "no", "matter", "which", "property", "reference", "format", "is", "used", "as", "a", "String", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwt-bean-validators/src/main/super/de/knightsoftnet/validators/supersource/org/apache/commons/beanutils/BeanUtils.java#L47-L51
apiman/apiman
manager/api/war/wildfly8/src/main/java/io/apiman/manager/api/war/wildfly8/Wildfly8PluginRegistry.java
Wildfly8PluginRegistry.getPluginDir
private static File getPluginDir() { """ Creates the directory to use for the plugin registry. The location of the plugin registry is in the Wildfly data directory. """ String dataDirPath = System.getProperty("jboss.server.data.dir"); //$NON-NLS-1$ File dataDir = new File(dataDirPath); ...
java
private static File getPluginDir() { String dataDirPath = System.getProperty("jboss.server.data.dir"); //$NON-NLS-1$ File dataDir = new File(dataDirPath); if (!dataDir.isDirectory()) { throw new RuntimeException("Failed to find WildFly data directory at: " + dataDirPath); //$NON-NLS-...
[ "private", "static", "File", "getPluginDir", "(", ")", "{", "String", "dataDirPath", "=", "System", ".", "getProperty", "(", "\"jboss.server.data.dir\"", ")", ";", "//$NON-NLS-1$", "File", "dataDir", "=", "new", "File", "(", "dataDirPath", ")", ";", "if", "(",...
Creates the directory to use for the plugin registry. The location of the plugin registry is in the Wildfly data directory.
[ "Creates", "the", "directory", "to", "use", "for", "the", "plugin", "registry", ".", "The", "location", "of", "the", "plugin", "registry", "is", "in", "the", "Wildfly", "data", "directory", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/war/wildfly8/src/main/java/io/apiman/manager/api/war/wildfly8/Wildfly8PluginRegistry.java#L48-L56
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateKeyAsync
public Observable<KeyBundle> updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, List<JsonWebKeyOperation> keyOps, KeyAttributes keyAttributes, Map<String, String> tags) { """ The update key operation changes specified attributes of a stored key and can be applied to any key type and key version...
java
public Observable<KeyBundle> updateKeyAsync(String vaultBaseUrl, String keyName, String keyVersion, List<JsonWebKeyOperation> keyOps, KeyAttributes keyAttributes, Map<String, String> tags) { return updateKeyWithServiceResponseAsync(vaultBaseUrl, keyName, keyVersion, keyOps, keyAttributes, tags).map(new Func1<Se...
[ "public", "Observable", "<", "KeyBundle", ">", "updateKeyAsync", "(", "String", "vaultBaseUrl", ",", "String", "keyName", ",", "String", "keyVersion", ",", "List", "<", "JsonWebKeyOperation", ">", "keyOps", ",", "KeyAttributes", "keyAttributes", ",", "Map", "<", ...
The update key operation changes specified attributes of a stored key and can be applied to any key type and key version stored in Azure Key Vault. In order to perform this operation, the key must already exist in the Key Vault. Note: The cryptographic material of a key itself cannot be changed. This operation requires...
[ "The", "update", "key", "operation", "changes", "specified", "attributes", "of", "a", "stored", "key", "and", "can", "be", "applied", "to", "any", "key", "type", "and", "key", "version", "stored", "in", "Azure", "Key", "Vault", ".", "In", "order", "to", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L1309-L1316
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/CharInfo.java
CharInfo.defineChar2StringMapping
boolean defineChar2StringMapping(String outputString, char inputChar) { """ Call this method to register a char to String mapping, for example to map '<' to "&lt;". @param outputString The String to map to. @param inputChar The char to map from. @return true if the mapping is not one of: <ul> <li> '<' to "&l...
java
boolean defineChar2StringMapping(String outputString, char inputChar) { CharKey character = new CharKey(inputChar); m_charToString.put(character, outputString); set(inputChar); // mark the character has having a mapping to a String boolean extraMapping = extraEntity(output...
[ "boolean", "defineChar2StringMapping", "(", "String", "outputString", ",", "char", "inputChar", ")", "{", "CharKey", "character", "=", "new", "CharKey", "(", "inputChar", ")", ";", "m_charToString", ".", "put", "(", "character", ",", "outputString", ")", ";", ...
Call this method to register a char to String mapping, for example to map '<' to "&lt;". @param outputString The String to map to. @param inputChar The char to map from. @return true if the mapping is not one of: <ul> <li> '<' to "&lt;" <li> '>' to "&gt;" <li> '&' to "&amp;" <li> '"' to "&quot;" </ul>
[ "Call", "this", "method", "to", "register", "a", "char", "to", "String", "mapping", "for", "example", "to", "map", "<", "to", "&lt", ";", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/CharInfo.java#L738-L747
JadiraOrg/jadira
cloning/src/main/java/org/jadira/reflection/core/misc/ClassUtils.java
ClassUtils.collectInstanceFields
public static Field[] collectInstanceFields(Class<?> c, Class<?> limitExclusive) { """ Produces an array with all the instance fields of the specified class @param c The class specified @param limitExclusive Fields from this class or higher in the hierarchy will not be returned @return The array of matched Fiel...
java
public static Field[] collectInstanceFields(Class<?> c, Class<?> limitExclusive) { return collectFields(c, 0, Modifier.STATIC, limitExclusive); }
[ "public", "static", "Field", "[", "]", "collectInstanceFields", "(", "Class", "<", "?", ">", "c", ",", "Class", "<", "?", ">", "limitExclusive", ")", "{", "return", "collectFields", "(", "c", ",", "0", ",", "Modifier", ".", "STATIC", ",", "limitExclusive...
Produces an array with all the instance fields of the specified class @param c The class specified @param limitExclusive Fields from this class or higher in the hierarchy will not be returned @return The array of matched Fields
[ "Produces", "an", "array", "with", "all", "the", "instance", "fields", "of", "the", "specified", "class" ]
train
https://github.com/JadiraOrg/jadira/blob/d55d0238395f0cb900531f1f08b4b2d87fa9a4f6/cloning/src/main/java/org/jadira/reflection/core/misc/ClassUtils.java#L132-L135
lets-blade/blade
src/main/java/com/blade/kit/StringKit.java
StringKit.dup
public static String dup(char c, int num) { """ Copy characters @param c characters @param num character number @return new characters """ if (c == 0 || num < 1) return ""; StringBuilder sb = new StringBuilder(num); for (int i = 0; i < num; i++) sb.append(...
java
public static String dup(char c, int num) { if (c == 0 || num < 1) return ""; StringBuilder sb = new StringBuilder(num); for (int i = 0; i < num; i++) sb.append(c); return sb.toString(); }
[ "public", "static", "String", "dup", "(", "char", "c", ",", "int", "num", ")", "{", "if", "(", "c", "==", "0", "||", "num", "<", "1", ")", "return", "\"\"", ";", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "num", ")", ";", "for", "("...
Copy characters @param c characters @param num character number @return new characters
[ "Copy", "characters" ]
train
https://github.com/lets-blade/blade/blob/60624ee528be12122c49a9ad1713e336b959e59a/src/main/java/com/blade/kit/StringKit.java#L243-L250
Azure/azure-sdk-for-java
batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java
PoolOperations.getPool
public CloudPool getPool(String poolId, DetailLevel detailLevel) throws BatchErrorException, IOException { """ Gets the specified {@link CloudPool}. @param poolId The ID of the pool to get. @param detailLevel A {@link DetailLevel} used for controlling which properties are retrieved from the service. @retur...
java
public CloudPool getPool(String poolId, DetailLevel detailLevel) throws BatchErrorException, IOException { return getPool(poolId, detailLevel, null); }
[ "public", "CloudPool", "getPool", "(", "String", "poolId", ",", "DetailLevel", "detailLevel", ")", "throws", "BatchErrorException", ",", "IOException", "{", "return", "getPool", "(", "poolId", ",", "detailLevel", ",", "null", ")", ";", "}" ]
Gets the specified {@link CloudPool}. @param poolId The ID of the pool to get. @param detailLevel A {@link DetailLevel} used for controlling which properties are retrieved from the service. @return A {@link CloudPool} containing information about the specified Azure Batch pool. @throws BatchErrorException Exception th...
[ "Gets", "the", "specified", "{", "@link", "CloudPool", "}", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/batch/data-plane/src/main/java/com/microsoft/azure/batch/PoolOperations.java#L190-L192
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/config/DefaultDataGridConfig.java
DefaultDataGridConfig.getStyleModel
public StyleModel getStyleModel(String name, String classPrefix) { """ Get a {@link StyleModel} given a model name and a style class prefix. This class exposes two available style names: <table> <tr><td>Name</td><td>Description</td><td>Implementation Class</td></tr> <tr><td><code>empty</code></td> <td>Render...
java
public StyleModel getStyleModel(String name, String classPrefix) { if(name == null || name.equals(STYLE_POLICY_NAME_DEFAULT)) { if(classPrefix != null) return new DefaultStyleModel(classPrefix); else return DEFAULT_STYLE_POLICY; } else if(name != null && n...
[ "public", "StyleModel", "getStyleModel", "(", "String", "name", ",", "String", "classPrefix", ")", "{", "if", "(", "name", "==", "null", "||", "name", ".", "equals", "(", "STYLE_POLICY_NAME_DEFAULT", ")", ")", "{", "if", "(", "classPrefix", "!=", "null", "...
Get a {@link StyleModel} given a model name and a style class prefix. This class exposes two available style names: <table> <tr><td>Name</td><td>Description</td><td>Implementation Class</td></tr> <tr><td><code>empty</code></td> <td>Renders CSS style classes that are non-prefixed and generally empty.</td> <td>{@link Em...
[ "Get", "a", "{" ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/databinding/datagrid/runtime/config/DefaultDataGridConfig.java#L178-L187
brianwhu/xillium
base/src/main/java/org/xillium/base/beans/Beans.java
Beans.getKnownField
public static Field getKnownField(Class<?> type, String name) throws NoSuchFieldException { """ Returns a known field by name from the given class disregarding its access control setting, looking through all super classes if needed. @param type the class to start with @param name the name of the field @retur...
java
public static Field getKnownField(Class<?> type, String name) throws NoSuchFieldException { NoSuchFieldException last = null; do { try { Field field = type.getDeclaredField(name); field.setAccessible(true); return field; } catch (No...
[ "public", "static", "Field", "getKnownField", "(", "Class", "<", "?", ">", "type", ",", "String", "name", ")", "throws", "NoSuchFieldException", "{", "NoSuchFieldException", "last", "=", "null", ";", "do", "{", "try", "{", "Field", "field", "=", "type", "....
Returns a known field by name from the given class disregarding its access control setting, looking through all super classes if needed. @param type the class to start with @param name the name of the field @return a Field object representing the known field @throws NoSuchFieldException if the field is not found
[ "Returns", "a", "known", "field", "by", "name", "from", "the", "given", "class", "disregarding", "its", "access", "control", "setting", "looking", "through", "all", "super", "classes", "if", "needed", "." ]
train
https://github.com/brianwhu/xillium/blob/e8dbf8cb6589fa1031a0bfcdcb58cb03d2ba7799/base/src/main/java/org/xillium/base/beans/Beans.java#L161-L174
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.setCSSClass
public static void setCSSClass(Element e, String cssclass) { """ Set the CSS class of an Element. See also {@link #addCSSClass} and {@link #removeCSSClass}. @param e Element @param cssclass class to set. """ setAtt(e, SVGConstants.SVG_CLASS_ATTRIBUTE, cssclass); }
java
public static void setCSSClass(Element e, String cssclass) { setAtt(e, SVGConstants.SVG_CLASS_ATTRIBUTE, cssclass); }
[ "public", "static", "void", "setCSSClass", "(", "Element", "e", ",", "String", "cssclass", ")", "{", "setAtt", "(", "e", ",", "SVGConstants", ".", "SVG_CLASS_ATTRIBUTE", ",", "cssclass", ")", ";", "}" ]
Set the CSS class of an Element. See also {@link #addCSSClass} and {@link #removeCSSClass}. @param e Element @param cssclass class to set.
[ "Set", "the", "CSS", "class", "of", "an", "Element", ".", "See", "also", "{", "@link", "#addCSSClass", "}", "and", "{", "@link", "#removeCSSClass", "}", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L337-L339
springfox/springfox
springfox-core/src/main/java/springfox/documentation/builders/ResponseMessageBuilder.java
ResponseMessageBuilder.headersWithDescription
public ResponseMessageBuilder headersWithDescription(Map<String, Header> headers) { """ Updates the response headers @param headers headers with description @return this @since 2.5.0 """ this.headers.putAll(nullToEmptyMap(headers)); return this; }
java
public ResponseMessageBuilder headersWithDescription(Map<String, Header> headers) { this.headers.putAll(nullToEmptyMap(headers)); return this; }
[ "public", "ResponseMessageBuilder", "headersWithDescription", "(", "Map", "<", "String", ",", "Header", ">", "headers", ")", "{", "this", ".", "headers", ".", "putAll", "(", "nullToEmptyMap", "(", "headers", ")", ")", ";", "return", "this", ";", "}" ]
Updates the response headers @param headers headers with description @return this @since 2.5.0
[ "Updates", "the", "response", "headers" ]
train
https://github.com/springfox/springfox/blob/e40e2d6f4b345ffa35cd5c0ca7a12589036acaf7/springfox-core/src/main/java/springfox/documentation/builders/ResponseMessageBuilder.java#L123-L126
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/vpc/VpcClient.java
VpcClient.listVpcs
public ListVpcsResponse listVpcs(ListVpcsRequest request) { """ Return a list of vpcs owned by the authenticated user. @param request The request containing all options for listing own's vpc. @return The response containing a list of vpcs owned by the authenticated user. """ checkNotNull(request, "...
java
public ListVpcsResponse listVpcs(ListVpcsRequest request) { checkNotNull(request, "request should not be null."); InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, VPC_PREFIX); if (request.getMarker() != null) { internalRequest.addParameter("marker", r...
[ "public", "ListVpcsResponse", "listVpcs", "(", "ListVpcsRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "this", ".", "createRequest", "(", "request", ",", "Http...
Return a list of vpcs owned by the authenticated user. @param request The request containing all options for listing own's vpc. @return The response containing a list of vpcs owned by the authenticated user.
[ "Return", "a", "list", "of", "vpcs", "owned", "by", "the", "authenticated", "user", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L200-L213
ixa-ehu/kaflib
src/main/java/ixa/kaflib/KAFDocument.java
KAFDocument.newPredicate
public Predicate newPredicate(Span<Term> span) { """ Creates a new srl predicate. It assigns an appropriate ID to it. The predicate is added to the document. @param span span containing all the targets of the predicate @return a new predicate """ String newId = idManager.getNextId(AnnotationType.PREDICATE);...
java
public Predicate newPredicate(Span<Term> span) { String newId = idManager.getNextId(AnnotationType.PREDICATE); Predicate newPredicate = new Predicate(newId, span); annotationContainer.add(newPredicate, Layer.SRL, AnnotationType.PREDICATE); return newPredicate; }
[ "public", "Predicate", "newPredicate", "(", "Span", "<", "Term", ">", "span", ")", "{", "String", "newId", "=", "idManager", ".", "getNextId", "(", "AnnotationType", ".", "PREDICATE", ")", ";", "Predicate", "newPredicate", "=", "new", "Predicate", "(", "newI...
Creates a new srl predicate. It assigns an appropriate ID to it. The predicate is added to the document. @param span span containing all the targets of the predicate @return a new predicate
[ "Creates", "a", "new", "srl", "predicate", ".", "It", "assigns", "an", "appropriate", "ID", "to", "it", ".", "The", "predicate", "is", "added", "to", "the", "document", "." ]
train
https://github.com/ixa-ehu/kaflib/blob/3921f55d9ae4621736a329418f6334fb721834b8/src/main/java/ixa/kaflib/KAFDocument.java#L1007-L1012
gallandarakhneorg/afc
advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java
MultiMapLayer.fireLayerAddedEvent
protected void fireLayerAddedEvent(MapLayer layer, int index) { """ Fire the event that indicates a layer was added. @param layer is the added layer. @param index is the insertion index. """ fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.ADD_CHILD, index, layer.isTemporaryLay...
java
protected void fireLayerAddedEvent(MapLayer layer, int index) { fireLayerHierarchyChangedEvent(new MapLayerHierarchyEvent(this, layer, Type.ADD_CHILD, index, layer.isTemporaryLayer())); }
[ "protected", "void", "fireLayerAddedEvent", "(", "MapLayer", "layer", ",", "int", "index", ")", "{", "fireLayerHierarchyChangedEvent", "(", "new", "MapLayerHierarchyEvent", "(", "this", ",", "layer", ",", "Type", ".", "ADD_CHILD", ",", "index", ",", "layer", "."...
Fire the event that indicates a layer was added. @param layer is the added layer. @param index is the insertion index.
[ "Fire", "the", "event", "that", "indicates", "a", "layer", "was", "added", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/maplayer/MultiMapLayer.java#L443-L445
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedConnection.java
MemcachedConnection.handleReadsWhenChannelEndOfStream
private Operation handleReadsWhenChannelEndOfStream(final Operation currentOp, final MemcachedNode node, final ByteBuffer rbuf) throws IOException { """ Deal with an operation where the channel reached the end of a stream. @param currentOp the current operation to read. @param node the node for that operat...
java
private Operation handleReadsWhenChannelEndOfStream(final Operation currentOp, final MemcachedNode node, final ByteBuffer rbuf) throws IOException { if (currentOp instanceof TapOperation) { currentOp.getCallback().complete(); ((TapOperation) currentOp).streamClosed(OperationState.COMPLETE); g...
[ "private", "Operation", "handleReadsWhenChannelEndOfStream", "(", "final", "Operation", "currentOp", ",", "final", "MemcachedNode", "node", ",", "final", "ByteBuffer", "rbuf", ")", "throws", "IOException", "{", "if", "(", "currentOp", "instanceof", "TapOperation", ")"...
Deal with an operation where the channel reached the end of a stream. @param currentOp the current operation to read. @param node the node for that operation. @param rbuf the read buffer. @return the next operation on the node to read. @throws IOException if disconnect while reading.
[ "Deal", "with", "an", "operation", "where", "the", "channel", "reached", "the", "end", "of", "a", "stream", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedConnection.java#L913-L927
apache/spark
common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java
UTF8String.fromAddress
public static UTF8String fromAddress(Object base, long offset, int numBytes) { """ Creates an UTF8String from given address (base and offset) and length. """ return new UTF8String(base, offset, numBytes); }
java
public static UTF8String fromAddress(Object base, long offset, int numBytes) { return new UTF8String(base, offset, numBytes); }
[ "public", "static", "UTF8String", "fromAddress", "(", "Object", "base", ",", "long", "offset", ",", "int", "numBytes", ")", "{", "return", "new", "UTF8String", "(", "base", ",", "offset", ",", "numBytes", ")", ";", "}" ]
Creates an UTF8String from given address (base and offset) and length.
[ "Creates", "an", "UTF8String", "from", "given", "address", "(", "base", "and", "offset", ")", "and", "length", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/common/unsafe/src/main/java/org/apache/spark/unsafe/types/UTF8String.java#L134-L136
borball/weixin-sdk
weixin-common/src/main/java/com/riversoft/weixin/common/decrypt/MessageDecryption.java
MessageDecryption.decryptEcho
public String decryptEcho(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { """ 验证URL @param msgSignature 签名串,对应URL参数的msg_signature @param timeStamp 时间戳,对应URL参数的timestamp @param nonce 随机串,对应URL参数的nonce @param echoStr 随机串,对应URL参数的echostr @return 解密之后的ec...
java
public String decryptEcho(String msgSignature, String timeStamp, String nonce, String echoStr) throws AesException { String signature = SHA1.getSHA1(token, timeStamp, nonce, echoStr); if (!signature.equals(msgSignature)) { throw new AesException(AesException.ValidateSignatureError); ...
[ "public", "String", "decryptEcho", "(", "String", "msgSignature", ",", "String", "timeStamp", ",", "String", "nonce", ",", "String", "echoStr", ")", "throws", "AesException", "{", "String", "signature", "=", "SHA1", ".", "getSHA1", "(", "token", ",", "timeStam...
验证URL @param msgSignature 签名串,对应URL参数的msg_signature @param timeStamp 时间戳,对应URL参数的timestamp @param nonce 随机串,对应URL参数的nonce @param echoStr 随机串,对应URL参数的echostr @return 解密之后的echostr @throws AesException 执行失败,请查看该异常的错误码和具体的错误信息
[ "验证URL" ]
train
https://github.com/borball/weixin-sdk/blob/32bf5e45cdd8d0d28074e83954e1ec62dcf25cb7/weixin-common/src/main/java/com/riversoft/weixin/common/decrypt/MessageDecryption.java#L248-L256
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/workmanager/transport/remote/AbstractRemoteTransport.java
AbstractRemoteTransport.localWorkManagerAdd
public void localWorkManagerAdd(Address address, T physicalAddress) { """ localWorkManagerAdd @param address the logical address @param physicalAddress the physical address """ if (trace) log.tracef("LOCAL_WORKMANAGER_ADD(%s, %s)", address, physicalAddress); join(address, physicalAddr...
java
public void localWorkManagerAdd(Address address, T physicalAddress) { if (trace) log.tracef("LOCAL_WORKMANAGER_ADD(%s, %s)", address, physicalAddress); join(address, physicalAddress); }
[ "public", "void", "localWorkManagerAdd", "(", "Address", "address", ",", "T", "physicalAddress", ")", "{", "if", "(", "trace", ")", "log", ".", "tracef", "(", "\"LOCAL_WORKMANAGER_ADD(%s, %s)\"", ",", "address", ",", "physicalAddress", ")", ";", "join", "(", "...
localWorkManagerAdd @param address the logical address @param physicalAddress the physical address
[ "localWorkManagerAdd" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/workmanager/transport/remote/AbstractRemoteTransport.java#L771-L777
ops4j/org.ops4j.base
ops4j-base-io/src/main/java/org/ops4j/io/ZipExploder.java
ZipExploder.copyFileEntry
@Deprecated public void copyFileEntry(String destDir, ZipFile zf, ZipEntry ze) throws IOException { """ copy a single entry from the archive @param destDir @param zf @param ze @throws IOException @deprecated use {@link #copyFileEntry(File, ZipFile, ZipEntry)} for a type save variant """ //D...
java
@Deprecated public void copyFileEntry(String destDir, ZipFile zf, ZipEntry ze) throws IOException { //Delegation to preferred method copyFileEntry(new File(destDir), zf, ze); }
[ "@", "Deprecated", "public", "void", "copyFileEntry", "(", "String", "destDir", ",", "ZipFile", "zf", ",", "ZipEntry", "ze", ")", "throws", "IOException", "{", "//Delegation to preferred method", "copyFileEntry", "(", "new", "File", "(", "destDir", ")", ",", "zf...
copy a single entry from the archive @param destDir @param zf @param ze @throws IOException @deprecated use {@link #copyFileEntry(File, ZipFile, ZipEntry)} for a type save variant
[ "copy", "a", "single", "entry", "from", "the", "archive" ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-io/src/main/java/org/ops4j/io/ZipExploder.java#L290-L294
Azure/azure-sdk-for-java
resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java
ResourceGroupsInner.exportTemplateAsync
public Observable<ResourceGroupExportResultInner> exportTemplateAsync(String resourceGroupName, ExportTemplateRequest parameters) { """ Captures the specified resource group as a template. @param resourceGroupName The name of the resource group to export as a template. @param parameters Parameters for exportin...
java
public Observable<ResourceGroupExportResultInner> exportTemplateAsync(String resourceGroupName, ExportTemplateRequest parameters) { return exportTemplateWithServiceResponseAsync(resourceGroupName, parameters).map(new Func1<ServiceResponse<ResourceGroupExportResultInner>, ResourceGroupExportResultInner>() { ...
[ "public", "Observable", "<", "ResourceGroupExportResultInner", ">", "exportTemplateAsync", "(", "String", "resourceGroupName", ",", "ExportTemplateRequest", "parameters", ")", "{", "return", "exportTemplateWithServiceResponseAsync", "(", "resourceGroupName", ",", "parameters", ...
Captures the specified resource group as a template. @param resourceGroupName The name of the resource group to export as a template. @param parameters Parameters for exporting the template. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ResourceGroupExportResul...
[ "Captures", "the", "specified", "resource", "group", "as", "a", "template", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/resources/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/resources/v2016_09_01/implementation/ResourceGroupsInner.java#L876-L883
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.getSecretsAsync
public Observable<Page<SecretItem>> getSecretsAsync(final String vaultBaseUrl, final Integer maxresults) { """ List secrets in a specified key vault. The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual se...
java
public Observable<Page<SecretItem>> getSecretsAsync(final String vaultBaseUrl, final Integer maxresults) { return getSecretsWithServiceResponseAsync(vaultBaseUrl, maxresults) .map(new Func1<ServiceResponse<Page<SecretItem>>, Page<SecretItem>>() { @Override public Page...
[ "public", "Observable", "<", "Page", "<", "SecretItem", ">", ">", "getSecretsAsync", "(", "final", "String", "vaultBaseUrl", ",", "final", "Integer", "maxresults", ")", "{", "return", "getSecretsWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "maxresults", ")",...
List secrets in a specified key vault. The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list permission. @param vaultBaseU...
[ "List", "secrets", "in", "a", "specified", "key", "vault", ".", "The", "Get", "Secrets", "operation", "is", "applicable", "to", "the", "entire", "vault", ".", "However", "only", "the", "base", "secret", "identifier", "and", "its", "attributes", "are", "provi...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L4075-L4083
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java
NodeSet.addNodesInDocOrder
public void addNodesInDocOrder(NodeList nodelist, XPathContext support) { """ Copy NodeList members into this nodelist, adding in document order. If a node is null, don't add it. @param nodelist List of nodes to be added @param support The XPath runtime context. @throws RuntimeException thrown if this NodeS...
java
public void addNodesInDocOrder(NodeList nodelist, XPathContext support) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); int nChildren = nodelist.getLength(); for (int i = 0; i < nChi...
[ "public", "void", "addNodesInDocOrder", "(", "NodeList", "nodelist", ",", "XPathContext", "support", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER...
Copy NodeList members into this nodelist, adding in document order. If a node is null, don't add it. @param nodelist List of nodes to be added @param support The XPath runtime context. @throws RuntimeException thrown if this NodeSet is not of a mutable type.
[ "Copy", "NodeList", "members", "into", "this", "nodelist", "adding", "in", "document", "order", ".", "If", "a", "node", "is", "null", "don", "t", "add", "it", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L516-L533
jenkinsci/java-client-api
jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java
JenkinsServer.createView
public JenkinsServer createView(String viewName, String viewXml, Boolean crumbFlag) throws IOException { """ Create a view on the server using the provided xml. @param viewName name of the view to be created. @param viewXml The configuration for the view. @param crumbFlag <code>true</code> to add <b>crumbIssu...
java
public JenkinsServer createView(String viewName, String viewXml, Boolean crumbFlag) throws IOException { return createView(null, viewName, viewXml, crumbFlag); }
[ "public", "JenkinsServer", "createView", "(", "String", "viewName", ",", "String", "viewXml", ",", "Boolean", "crumbFlag", ")", "throws", "IOException", "{", "return", "createView", "(", "null", ",", "viewName", ",", "viewXml", ",", "crumbFlag", ")", ";", "}" ...
Create a view on the server using the provided xml. @param viewName name of the view to be created. @param viewXml The configuration for the view. @param crumbFlag <code>true</code> to add <b>crumbIssuer</b> <code>false</code> otherwise. @throws IOException in case of an error.
[ "Create", "a", "view", "on", "the", "server", "using", "the", "provided", "xml", "." ]
train
https://github.com/jenkinsci/java-client-api/blob/c4f5953d3d4dda92cd946ad3bf2b811524c32da9/jenkins-client/src/main/java/com/offbytwo/jenkins/JenkinsServer.java#L414-L416
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Context.java
AT_Context.setFrameTopBottomMargin
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom) { """ Sets the top and bottom frame margin. @param frameTop margin @param frameBottom margin @return this to allow chaining """ if(frameTop>-1 && frameBottom>-1){ this.frameTopMargin = frameTop; this.frameBottomMargin = fram...
java
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom){ if(frameTop>-1 && frameBottom>-1){ this.frameTopMargin = frameTop; this.frameBottomMargin = frameBottom; } return this; }
[ "public", "AT_Context", "setFrameTopBottomMargin", "(", "int", "frameTop", ",", "int", "frameBottom", ")", "{", "if", "(", "frameTop", ">", "-", "1", "&&", "frameBottom", ">", "-", "1", ")", "{", "this", ".", "frameTopMargin", "=", "frameTop", ";", "this",...
Sets the top and bottom frame margin. @param frameTop margin @param frameBottom margin @return this to allow chaining
[ "Sets", "the", "top", "and", "bottom", "frame", "margin", "." ]
train
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Context.java#L294-L300
feedzai/pdb
src/main/java/com/feedzai/commons/sql/abstraction/dml/result/ResultIterator.java
ResultIterator.nextResult
public ResultColumn[] nextResult() throws DatabaseEngineException { """ Retrieves the values of the next row in the result set as an array oj objects. <p> This method provides an optimized version of the {@link #next()} method with less overhead. <p> This method also closes the result set upon the last call on...
java
public ResultColumn[] nextResult() throws DatabaseEngineException { try { if (closed) { return null; } if (!resultSet.next()) { close(); return null; } ResultColumn[] temp = new ResultColumn[columnNam...
[ "public", "ResultColumn", "[", "]", "nextResult", "(", ")", "throws", "DatabaseEngineException", "{", "try", "{", "if", "(", "closed", ")", "{", "return", "null", ";", "}", "if", "(", "!", "resultSet", ".", "next", "(", ")", ")", "{", "close", "(", "...
Retrieves the values of the next row in the result set as an array oj objects. <p> This method provides an optimized version of the {@link #next()} method with less overhead. <p> This method also closes the result set upon the last call on the result set. </p> <p> If the statement in place is not a {@link PreparedState...
[ "Retrieves", "the", "values", "of", "the", "next", "row", "in", "the", "result", "set", "as", "an", "array", "oj", "objects", ".", "<p", ">", "This", "method", "provides", "an", "optimized", "version", "of", "the", "{", "@link", "#next", "()", "}", "me...
train
https://github.com/feedzai/pdb/blob/fe07ca08417e0ddcd620a36aa1fdbca7f338be98/src/main/java/com/feedzai/commons/sql/abstraction/dml/result/ResultIterator.java#L186-L208
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java
ElemLiteralResult.getAttributeNS
public String getAttributeNS(String namespaceURI, String localName) { """ Return the raw value of the attribute. @param namespaceURI Namespace URI of attribute node to get @param localName Local part of qualified name of attribute node to get @return The Attr value as a string, or the empty string if that a...
java
public String getAttributeNS(String namespaceURI, String localName) { AVT avt = getLiteralResultAttributeNS(namespaceURI, localName); if ((null != avt)) { return avt.getSimpleString(); } return EMPTYSTRING; }
[ "public", "String", "getAttributeNS", "(", "String", "namespaceURI", ",", "String", "localName", ")", "{", "AVT", "avt", "=", "getLiteralResultAttributeNS", "(", "namespaceURI", ",", "localName", ")", ";", "if", "(", "(", "null", "!=", "avt", ")", ")", "{", ...
Return the raw value of the attribute. @param namespaceURI Namespace URI of attribute node to get @param localName Local part of qualified name of attribute node to get @return The Attr value as a string, or the empty string if that attribute does not have a specified or default value
[ "Return", "the", "raw", "value", "of", "the", "attribute", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java#L221-L232
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java
FileUtil.readLines
public static List<String> readLines(URL url, String charset) throws IORuntimeException { """ 从文件中读取每一行数据 @param url 文件的URL @param charset 字符集 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常 """ return readLines(url, charset, new ArrayList<String>()); }
java
public static List<String> readLines(URL url, String charset) throws IORuntimeException { return readLines(url, charset, new ArrayList<String>()); }
[ "public", "static", "List", "<", "String", ">", "readLines", "(", "URL", "url", ",", "String", "charset", ")", "throws", "IORuntimeException", "{", "return", "readLines", "(", "url", ",", "charset", ",", "new", "ArrayList", "<", "String", ">", "(", ")", ...
从文件中读取每一行数据 @param url 文件的URL @param charset 字符集 @return 文件中的每行内容的集合List @throws IORuntimeException IO异常
[ "从文件中读取每一行数据" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/FileUtil.java#L2307-L2309
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java
JournalRecoveryLog.writeStringArray
private String writeStringArray(String name, String[] values) { """ Helper for the {@link #log(ConsumerJournalEntry)} method. Writes the values of a string array """ StringBuffer buffer = new StringBuffer(); buffer.append(" ").append(name).append("=["); for (int i = 0; i < value...
java
private String writeStringArray(String name, String[] values) { StringBuffer buffer = new StringBuffer(); buffer.append(" ").append(name).append("=["); for (int i = 0; i < values.length; i++) { buffer.append("'").append(values[i]).append("'"); if (i < values.length...
[ "private", "String", "writeStringArray", "(", "String", "name", ",", "String", "[", "]", "values", ")", "{", "StringBuffer", "buffer", "=", "new", "StringBuffer", "(", ")", ";", "buffer", ".", "append", "(", "\" \"", ")", ".", "append", "(", "name",...
Helper for the {@link #log(ConsumerJournalEntry)} method. Writes the values of a string array
[ "Helper", "for", "the", "{" ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/recoverylog/JournalRecoveryLog.java#L190-L201
landawn/AbacusUtil
src/com/landawn/abacus/android/util/SQLiteExecutor.java
SQLiteExecutor.registerWriteOnlyProps
public static void registerWriteOnlyProps(Class<?> targetClass, Collection<String> writeOnlyPropNames) { """ The properties will be ignored by update/updateAll/batchUpdate operations if the input is an entity. @param targetClass @param writeOnlyPropNames """ N.checkArgument(N.isEntity(targetClass)...
java
public static void registerWriteOnlyProps(Class<?> targetClass, Collection<String> writeOnlyPropNames) { N.checkArgument(N.isEntity(targetClass), ClassUtil.getCanonicalClassName(targetClass) + " is not an entity class with getter/setter methods"); N.checkArgNotNullOrEmpty(writeOnlyPropNames, "'writeOn...
[ "public", "static", "void", "registerWriteOnlyProps", "(", "Class", "<", "?", ">", "targetClass", ",", "Collection", "<", "String", ">", "writeOnlyPropNames", ")", "{", "N", ".", "checkArgument", "(", "N", ".", "isEntity", "(", "targetClass", ")", ",", "Clas...
The properties will be ignored by update/updateAll/batchUpdate operations if the input is an entity. @param targetClass @param writeOnlyPropNames
[ "The", "properties", "will", "be", "ignored", "by", "update", "/", "updateAll", "/", "batchUpdate", "operations", "if", "the", "input", "is", "an", "entity", "." ]
train
https://github.com/landawn/AbacusUtil/blob/544b7720175d15e9329f83dd22a8cc5fa4515e12/src/com/landawn/abacus/android/util/SQLiteExecutor.java#L151-L166
eobermuhlner/big-math
ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java
BigDecimalMath.cosh
public static BigDecimal cosh(BigDecimal x, MathContext mathContext) { """ Calculates the hyperbolic cosine of {@link BigDecimal} x. <p>See: <a href="https://en.wikipedia.org/wiki/Hyperbolic_function">Wikipedia: Hyperbolic function</a></p> @param x the {@link BigDecimal} to calculate the hyperbolic cosine fo...
java
public static BigDecimal cosh(BigDecimal x, MathContext mathContext) { checkMathContext(mathContext); MathContext mc = new MathContext(mathContext.getPrecision() + 4, mathContext.getRoundingMode()); BigDecimal result = CoshCalculator.INSTANCE.calculate(x, mc); return round(result, mathContext); }
[ "public", "static", "BigDecimal", "cosh", "(", "BigDecimal", "x", ",", "MathContext", "mathContext", ")", "{", "checkMathContext", "(", "mathContext", ")", ";", "MathContext", "mc", "=", "new", "MathContext", "(", "mathContext", ".", "getPrecision", "(", ")", ...
Calculates the hyperbolic cosine of {@link BigDecimal} x. <p>See: <a href="https://en.wikipedia.org/wiki/Hyperbolic_function">Wikipedia: Hyperbolic function</a></p> @param x the {@link BigDecimal} to calculate the hyperbolic cosine for @param mathContext the {@link MathContext} used for the result @return the calcula...
[ "Calculates", "the", "hyperbolic", "cosine", "of", "{", "@link", "BigDecimal", "}", "x", "." ]
train
https://github.com/eobermuhlner/big-math/blob/52c4fc334d0d722b295de740c1018ee400e3e8f2/ch.obermuhlner.math.big/src/main/java/ch/obermuhlner/math/big/BigDecimalMath.java#L1550-L1555
apptentive/apptentive-android
apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java
Apptentive.getTitleFromApptentivePush
public static String getTitleFromApptentivePush(Map<String, String> data) { """ Use this method in your push receiver to get the notification title you can use to construct a {@link android.app.Notification} object. @param data A {@link Map}&lt;{@link String},{@link String}&gt; containing the Apptentive Push ...
java
public static String getTitleFromApptentivePush(Map<String, String> data) { try { if (!ApptentiveInternal.checkRegistered()) { return null; } if (data == null) { return null; } return data.get(ApptentiveInternal.TITLE_DEFAULT); } catch (Exception e) { ApptentiveLog.e(PUSH, e, "Exception wh...
[ "public", "static", "String", "getTitleFromApptentivePush", "(", "Map", "<", "String", ",", "String", ">", "data", ")", "{", "try", "{", "if", "(", "!", "ApptentiveInternal", ".", "checkRegistered", "(", ")", ")", "{", "return", "null", ";", "}", "if", "...
Use this method in your push receiver to get the notification title you can use to construct a {@link android.app.Notification} object. @param data A {@link Map}&lt;{@link String},{@link String}&gt; containing the Apptentive Push data. Pass in what you receive in the the Service or BroadcastReceiver that is used by yo...
[ "Use", "this", "method", "in", "your", "push", "receiver", "to", "get", "the", "notification", "title", "you", "can", "use", "to", "construct", "a", "{", "@link", "android", ".", "app", ".", "Notification", "}", "object", "." ]
train
https://github.com/apptentive/apptentive-android/blob/887c08d7bd5ae6488a90366dfb58f58938861a93/apptentive/src/main/java/com/apptentive/android/sdk/Apptentive.java#L805-L819
iipc/webarchive-commons
src/main/java/org/archive/io/ReplayInputStream.java
ReplayInputStream.readContentTo
public void readContentTo(OutputStream os, long maxSize) throws IOException { """ Convenience method to copy content out to target stream. @param os stream to write content to @param maxSize maximum count of bytes to copy @throws IOException """ setToResponseBodyStart(); byte[] buf = new byt...
java
public void readContentTo(OutputStream os, long maxSize) throws IOException { setToResponseBodyStart(); byte[] buf = new byte[4096]; int c = read(buf); long tot = 0; while (c != -1 && tot < maxSize) { os.write(buf,0,c); c = read(buf); tot += c;...
[ "public", "void", "readContentTo", "(", "OutputStream", "os", ",", "long", "maxSize", ")", "throws", "IOException", "{", "setToResponseBodyStart", "(", ")", ";", "byte", "[", "]", "buf", "=", "new", "byte", "[", "4096", "]", ";", "int", "c", "=", "read",...
Convenience method to copy content out to target stream. @param os stream to write content to @param maxSize maximum count of bytes to copy @throws IOException
[ "Convenience", "method", "to", "copy", "content", "out", "to", "target", "stream", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/ReplayInputStream.java#L234-L244
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml10
public static void escapeXml10(final Reader reader, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level) throws IOException { """ <p> Perform a (configurable) XML 1.0 <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> ...
java
public static void escapeXml10(final Reader reader, final Writer writer, final XmlEscapeType type, final XmlEscapeLevel level) throws IOException { escapeXml(reader, writer, XmlEscapeSymbols.XML10_SYMBOLS, type, level); }
[ "public", "static", "void", "escapeXml10", "(", "final", "Reader", "reader", ",", "final", "Writer", "writer", ",", "final", "XmlEscapeType", "type", ",", "final", "XmlEscapeLevel", "level", ")", "throws", "IOException", "{", "escapeXml", "(", "reader", ",", "...
<p> Perform a (configurable) XML 1.0 <strong>escape</strong> operation on a <tt>Reader</tt> input, writing results to a <tt>Writer</tt>. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values. ...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "XML", "1", ".", "0", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "Reader<", "/", "tt", ">", "input", "writing", "results", "to", "a", "<tt", ">", "Writer<", ...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L1589-L1592
kmi/iserve
iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java
Util.getMatchType
public static DiscoMatchType getMatchType(boolean isSubsume, boolean isPlugin) { """ Given the match between concepts obtain the match type @param isSubsume true if the concept match is subsumes @param isPlugin true if the concept match is plugin @return Exact, Plugin or Subsumes depending on the values ...
java
public static DiscoMatchType getMatchType(boolean isSubsume, boolean isPlugin) { if (isSubsume) { if (isPlugin) { // If plugin and subsume -> this is an exact match return DiscoMatchType.Exact; } return DiscoMatchType.Subsume; } else { ...
[ "public", "static", "DiscoMatchType", "getMatchType", "(", "boolean", "isSubsume", ",", "boolean", "isPlugin", ")", "{", "if", "(", "isSubsume", ")", "{", "if", "(", "isPlugin", ")", "{", "// If plugin and subsume -> this is an exact match", "return", "DiscoMatchType"...
Given the match between concepts obtain the match type @param isSubsume true if the concept match is subsumes @param isPlugin true if the concept match is plugin @return Exact, Plugin or Subsumes depending on the values
[ "Given", "the", "match", "between", "concepts", "obtain", "the", "match", "type" ]
train
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-semantic-discovery/src/main/java/uk/ac/open/kmi/iserve/discovery/disco/Util.java#L513-L526
Chorus-bdd/Chorus
interpreter/chorus-subsystem/src/main/java/org/chorusbdd/chorus/subsystem/SubsystemDiscovery.java
SubsystemDiscovery.discoverSubsystems
public HashMap<String, Class> discoverSubsystems(List<String> basePackages) { """ Scans the classpath for handler classes @param basePackages name of the base package under which a recursive scan for @Handler classes will be performed @return a Map of subsystemId -&gt; implementationClass """ retur...
java
public HashMap<String, Class> discoverSubsystems(List<String> basePackages) { return discoverSubsystems(basePackages, log); }
[ "public", "HashMap", "<", "String", ",", "Class", ">", "discoverSubsystems", "(", "List", "<", "String", ">", "basePackages", ")", "{", "return", "discoverSubsystems", "(", "basePackages", ",", "log", ")", ";", "}" ]
Scans the classpath for handler classes @param basePackages name of the base package under which a recursive scan for @Handler classes will be performed @return a Map of subsystemId -&gt; implementationClass
[ "Scans", "the", "classpath", "for", "handler", "classes" ]
train
https://github.com/Chorus-bdd/Chorus/blob/1eea7ca858876bce821bb49b43fd5b6ba1737997/interpreter/chorus-subsystem/src/main/java/org/chorusbdd/chorus/subsystem/SubsystemDiscovery.java#L53-L55
jhipster/jhipster
jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java
QueryService.buildSpecification
protected <X> Specification<ENTITY> buildSpecification(Filter<X> filter, Function<Root<ENTITY>, Expression<X>> metaclassFunction) { """ Helper function to return a specification for filtering on a single field, where equality, and null/non-null conditions are supported. @param filter the individual ...
java
protected <X> Specification<ENTITY> buildSpecification(Filter<X> filter, Function<Root<ENTITY>, Expression<X>> metaclassFunction) { if (filter.getEquals() != null) { return equalsSpecification(metaclassFunction, filter.getEquals()); } else if (filter.getIn() != null) { return val...
[ "protected", "<", "X", ">", "Specification", "<", "ENTITY", ">", "buildSpecification", "(", "Filter", "<", "X", ">", "filter", ",", "Function", "<", "Root", "<", "ENTITY", ">", ",", "Expression", "<", "X", ">", ">", "metaclassFunction", ")", "{", "if", ...
Helper function to return a specification for filtering on a single field, where equality, and null/non-null conditions are supported. @param filter the individual attribute filter coming from the frontend. @param metaclassFunction the function, which navigates from the current entity to a column, for which...
[ "Helper", "function", "to", "return", "a", "specification", "for", "filtering", "on", "a", "single", "field", "where", "equality", "and", "null", "/", "non", "-", "null", "conditions", "are", "supported", "." ]
train
https://github.com/jhipster/jhipster/blob/5dcf4239c7cc035e188ef02447d3c628fac5c5d9/jhipster-framework/src/main/java/io/github/jhipster/service/QueryService.java#L69-L78
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/collection/MultiMap.java
MultiMap.removeValue
public boolean removeValue(String name, V value) { """ Remove value. @param name The entry key. @param value The entry value. @return true if it was removed. """ List<V> lo = get(name); if ((lo == null) || (lo.isEmpty())) { return false; } boolean ret = lo.remo...
java
public boolean removeValue(String name, V value) { List<V> lo = get(name); if ((lo == null) || (lo.isEmpty())) { return false; } boolean ret = lo.remove(value); if (lo.isEmpty()) { remove(name); } else { put(name, lo); } ...
[ "public", "boolean", "removeValue", "(", "String", "name", ",", "V", "value", ")", "{", "List", "<", "V", ">", "lo", "=", "get", "(", "name", ")", ";", "if", "(", "(", "lo", "==", "null", ")", "||", "(", "lo", ".", "isEmpty", "(", ")", ")", "...
Remove value. @param name The entry key. @param value The entry value. @return true if it was removed.
[ "Remove", "value", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/collection/MultiMap.java#L227-L239